Repository navigation
fix(aidd-context): keep memory README links relative on Windows - #987
Merged
blafourcade merged 2 commits intoOct 12, 2026
Merged
blafourcade merged 2 commits into
blafourcade merged 2 commits into
Conversation
memoryRelative stripped a prefix joined with the platform separator from a path normalised to "/", so on win32 it matched nothing and every README link kept its aidd_docs/memory/ prefix and pointed nowhere. Closes ai-driven-dev#986 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Run from inside a Claude Code session, the suite inherited CLAUDE_PROJECT_DIR and the hook would have rewritten that project's CLAUDE.md and memory README. Refs ai-driven-dev#986 Co-Authored-By: Claude Opus 5.5 <[email protected]>
blafourcade
approved these changes
Oct 12, 2026
Merged
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.
🎯 What & why
On Windows, the memory hook rewrote the table of contents of
aidd_docs/memory/README.mdwith links still prefixedaidd_docs/memory/, so every link in that file pointed nowhere and the hook staged the broken README into the next commit.🛠️ How it works
memoryRelativestrips the memory directory from a path it first normalises to/, but built that prefix withpath.join, which answersaidd_docs\memoryon win32. The prefix never matched, so nothing was stripped. Both sides of the comparison are now normalised to/. On posix the prefix holds no backslash, so behaviour there is unchanged.memoryRelativeonly feeds the README table of contents; theCLAUDE.md/AGENTS.mdblocks go through other helpers and are untouched.The regression test runs the real hook as a subprocess and reads the README it writes. A second commit keeps the whole file's subprocesses from inheriting
CLAUDE_PROJECT_DIR: run from inside a Claude Code session, the hook would otherwise move into the real project and rewrite itsCLAUDE.mdand README.🧪 How to verify
node scripts/check-tests-leave-git-alone.js -- node --test scripts/__tests__/update-memory.test.js: 16/16. On Windows, the new test fails without the fix on- [aidd_docs/memory/architecture.md](aidd_docs/memory/architecture.md).validate.ymlreplays the pre-commit on this PR.cli-ci.yml'schangesfilter does not matchplugins/aidd-context/**, so a later change toupdate_memory.jsalone would skip the Windows job that runs this test. Left out of scope.🔗 Linked issue
Closes #986
✅ I certify
🤖 Generated with Claude Code