Skip to content

Federate CLAUDE.md into per-project files; refresh README.md - #10

Merged
TheValiantOne merged 1 commit into
mainfrom
chore/federate-claude-md-docs
Aug 7, 2026
Merged

Federate CLAUDE.md into per-project files; refresh README.md#10
TheValiantOne merged 1 commit into
mainfrom
chore/federate-claude-md-docs

Conversation

@TheValiantOne

Copy link
Copy Markdown
Owner

Summary

  • Splits the root CLAUDE.md (which had grown to cover all four projects — WitcherScriptMerger.Core, the WinForms host, the Linux-capable WitcherScriptMerger.Headless host, and WitcherScriptMerger.Tests — in one file) into a short root CLAUDE.md plus one CLAUDE.md per project, each scoped to what's needed to work in that folder:
    • WitcherScriptMerger.Core/CLAUDE.md — folder map, AppState/IMergeNotifier design, FileMerger's interactive/headless split, DiffPlexMergeEngine (including the confirmed upstream DiffPlex bug and its measured failure rates), text-merge encoding, Paths.ValidateTextMergeDependencies/ValidateBundleDependencies, hash format, and the shared CLI/MCP orchestration (Cli/MergeOperations.cs, Mcp/WsmMcpTools.cs).
    • WitcherScriptMerger/CLAUDE.md — the WinForms host's own folder map, MainForm's IMergeNotifier translation, MessageBoxManager's known-broken relabeling hook, InteractiveMergeRunner, Program.cs's CLI/GUI/MCP startup flow for this host, the TFM 7.0-suffix constraint, and its build/run/publish commands.
    • WitcherScriptMerger.Headless/CLAUDE.md — its own routing, what it deliberately omits (GUI, console-attach, KDiff3), the two real cross-platform path-separator bugs its own WSL2 verification found and fixed, and its publish commands.
    • WitcherScriptMerger.Tests/CLAUDE.md — what's covered, the AppState.Settings-safety constraints tests must respect (moved here from the root file), and the WSM_TEST_GAME_DIR-gated live-install cross-check tests.
  • WitcherScriptMerger.Core/Mcp/CLAUDE.md (pre-existing, already correctly scoped) had two pointers into the old root file's now-deleted sections — retargeted to the new Core-level file, and extended with a Categories.BundleText internal-path allow-listing caveat the split would otherwise have silently dropped.
  • CONTRIBUTING.md's CLAUDE.md cross-references were also retargeted, since federation broke several of them (e.g. "see CLAUDE.md's Compatibility constraints" — that section no longer exists at root). This file is outside this unit's stated scope, but its pointers break as a direct, mechanical consequence of this change, so fixing them is included here rather than left dangling.
  • README.md rewritten from its original, largely unmodified upstream-era text (first-person "I threw together this tool" voice, no mention of the fork/CLI/MCP/DiffPlex/Headless host) to reflect the current state: this is a fork of AnotherSymbiote/WitcherScriptMerger, GUI + headless CLI + MCP + a Linux-capable host, corrected xxHash attribution (System.IO.Hashing, not the old hand-ported implementation), DiffPlex as an ordinary MIT-licensed NuGet dependency vs. QuickBMS/wcc_lite's unresolved-license external-binary status (needed only for bundle-content conflicts), and WSM's own GPLv2 license.

Every substantive fact from the original root file was traced to its new home rather than dropped — including the hash-format stability constraint, the DiffPlex bug's measured failure rates (0.35%–38.89% across edit densities, 100,000 trials), the text-encoding rationale, the historical gh pr create fork mistake, get_status's independently-reported textMergeDependenciesValid/bundleDependenciesValid fields, and the CustomLoadOrder.Refresh() null-ref fix IMergeNotifier provided.

AI assistance disclosure

This PR (the doc restructuring, content redistribution, and README rewrite) was substantially produced by Claude Code. Verified via:

  • dotnet build WitcherScriptMerger.sln — succeeds.
  • dotnet format whitespace WitcherScriptMerger.sln --verify-no-changes — passes (docs-only change; included per repo convention).
  • Every see X/CLAUDE.md cross-link walked and confirmed to resolve to a real file and (where quoted) an actual heading.
  • A fact inventory built from the original root CLAUDE.md, checked against each new file to confirm nothing was silently dropped.
  • Ran this repo's code-review skill against the diff; it surfaced three real gaps (the WinForms host's publish command being dropped, get_status's exact return-shape not being documented anywhere, and the CustomLoadOrder null-ref history being lost) — all three are fixed in this PR.

Known follow-up, not fixed here: six .cs files in WitcherScriptMerger.Core (AppState.cs, DiffPlexMergeEngine.cs, FileEncoding.cs, WsmMcpTools.cs, MergeOperations.cs, FileMerger.cs) have inline comments referencing pre-federation root CLAUDE.md section names (e.g. "CLAUDE.md's Compatibility constraints"). All six still resolve to the right file (the nearest CLAUDE.md from Core is now Core's own), and most of the referenced content moved there under a renamed heading, but two comments are now imprecise. Left out of this docs-only PR as a separate, small follow-up rather than expanding this diff into source-code comment edits.

Test plan

  • dotnet build WitcherScriptMerger.sln succeeds
  • dotnet format whitespace WitcherScriptMerger.sln --verify-no-changes passes
  • Every cross-link between the new/edited CLAUDE.md files resolves to a real file/heading
  • Content diffed against the original root CLAUDE.md fact-by-fact; nothing substantive dropped
  • code-review skill run against the diff; all three findings addressed

🤖 Generated with Claude Code

https://claude.ai/code/session_01GXAuGMLB44T5Zv5o5ZzKah

The root CLAUDE.md had grown to cover all four projects (Core, the WinForms
host, the Headless host, Tests) in one file. Split it into a short root
CLAUDE.md (overview, build pointers, architecture summary, cross-cutting
fork/licensing/decisions context) plus one CLAUDE.md per project, scoped to
what's needed to work in that folder:

- WitcherScriptMerger.Core/CLAUDE.md: AppState/IMergeNotifier design,
  FileMerger's interactive/headless split, DiffPlexMergeEngine (including the
  confirmed upstream DiffPlex bug and its measured failure rates), text-merge
  encoding, dependency validation, hash format, and the shared CLI/MCP
  orchestration.
- WitcherScriptMerger/CLAUDE.md: the WinForms host's own folder map, GUI
  notifier translation, MessageBoxManager's known-broken relabeling hook,
  InteractiveMergeRunner, Program.cs's CLI/GUI/MCP startup flow, the TFM 7.0
  constraint, and its build/run/publish commands.
- WitcherScriptMerger.Headless/CLAUDE.md: routing, what it omits, the two
  real cross-platform path-separator bugs found via WSL2 testing, and its
  publish commands.
- WitcherScriptMerger.Tests/CLAUDE.md: coverage, the AppState.Settings-safety
  constraints tests must respect, and the WSM_TEST_GAME_DIR-gated live-install
  tests.

WitcherScriptMerger.Core/Mcp/CLAUDE.md (pre-existing, correctly scoped) had two
pointers into the old root file's now-deleted sections; retargeted to the new
Core-level file, and extended with a bundle-internal-path allow-listing
caveat that the split would otherwise have dropped. CONTRIBUTING.md's
CLAUDE.md cross-references were retargeted for the same reason (outside this
unit's stated scope, but its pointers break as a direct result of this
change).

Every substantive fact from the original root file (hash-format stability,
the DiffPlex bug's measured rates, encoding rationale, the historical
gh pr create fork mistake, get_status's independent dependency fields, the
CustomLoadOrder null-ref fix) was traced to its new home rather than dropped.

README.md was rewritten from its original upstream-era text to reflect the
current fork: GUI + headless CLI + MCP + a Linux-capable host, the corrected
xxHash attribution (System.IO.Hashing, not the old hand-port), DiffPlex as an
ordinary MIT-licensed NuGet dependency vs. QuickBMS/wcc_lite's unresolved-
license external-binary status, and WSM's own GPLv2 license.

AI assistance disclosure: this change (the doc restructuring, content
redistribution, and README rewrite) was substantially produced by Claude
Code, reviewed via this repo's code-review skill, and verified against the
current source (grepped for exact method/field names, cross-checked every
"see X/CLAUDE.md" pointer, confirmed dotnet build and
dotnet format whitespace --verify-no-changes both still pass).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXAuGMLB44T5Zv5o5ZzKah
@TheValiantOne
TheValiantOne merged commit 198ee78 into main Aug 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant