Federate CLAUDE.md into per-project files; refresh README.md - #10
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLAUDE.md(which had grown to cover all four projects —WitcherScriptMerger.Core, the WinForms host, the Linux-capableWitcherScriptMerger.Headlesshost, andWitcherScriptMerger.Tests— in one file) into a short rootCLAUDE.mdplus oneCLAUDE.mdper project, each scoped to what's needed to work in that folder:WitcherScriptMerger.Core/CLAUDE.md— folder map,AppState/IMergeNotifierdesign,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'sIMergeNotifiertranslation,MessageBoxManager's known-broken relabeling hook,InteractiveMergeRunner,Program.cs's CLI/GUI/MCP startup flow for this host, the TFM7.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, theAppState.Settings-safety constraints tests must respect (moved here from the root file), and theWSM_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 aCategories.BundleTextinternal-path allow-listing caveat the split would otherwise have silently dropped.CONTRIBUTING.md'sCLAUDE.mdcross-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.mdrewritten 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 ofAnotherSymbiote/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 createfork mistake,get_status's independently-reportedtextMergeDependenciesValid/bundleDependenciesValidfields, and theCustomLoadOrder.Refresh()null-ref fixIMergeNotifierprovided.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).see X/CLAUDE.mdcross-link walked and confirmed to resolve to a real file and (where quoted) an actual heading.CLAUDE.md, checked against each new file to confirm nothing was silently dropped.code-reviewskill 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 theCustomLoadOrdernull-ref history being lost) — all three are fixed in this PR.Known follow-up, not fixed here: six
.csfiles inWitcherScriptMerger.Core(AppState.cs,DiffPlexMergeEngine.cs,FileEncoding.cs,WsmMcpTools.cs,MergeOperations.cs,FileMerger.cs) have inline comments referencing pre-federation rootCLAUDE.mdsection names (e.g. "CLAUDE.md's Compatibility constraints"). All six still resolve to the right file (the nearestCLAUDE.mdfrom 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.slnsucceedsdotnet format whitespace WitcherScriptMerger.sln --verify-no-changespassesCLAUDE.mdfiles resolves to a real file/headingCLAUDE.mdfact-by-fact; nothing substantive droppedcode-reviewskill run against the diff; all three findings addressed🤖 Generated with Claude Code
https://claude.ai/code/session_01GXAuGMLB44T5Zv5o5ZzKah