feat(vault): add MEMORY.md root pointer index and memory-refresh command - #45
Merged
Conversation
MEMORY.md is a thin (<200 lines), agent-editable entry-point file: categorized pointers to the core files, rules, latest lint report, and recently active wiki pages. New module lib-memory.sh implements vault-tools.sh memory-refresh, which regenerates it deterministically (idempotent; recently-active section derived from git history with quotePath disabled for non-ASCII names). Doctor validates presence (warning-level, so older instances do not hard-fail) and the sub-200 line budget. Context loading order in CLAUDE.md, AGENTS.md, and CODEX.md now reads MEMORY.md as step 2. Adds tests/test-memory-refresh.sh. Design per issue discussion: agent-editable operational state with a deterministic refresh command, not an HR-012-protected file. Closes #11 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
# Conflicts: # .vault/scripts/vault-tools.sh # CHANGELOG.md
# Conflicts: # .vault/scripts/vault-tools.sh # CHANGELOG.md
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
Implements #11 with the design settled in triage: agent-editable operational state + deterministic refresh command (not an HR-012-protected file).
MEMORY.md(root, well under the 200-line budget): categorized pointers — core files, rules, latest lint report, recently active wiki pages. Ships in the pristine fresh-template state.vault-tools.sh memory-refresh(newlib-memory.sh): regenerates it deterministically and idempotently; recently-active section derived from git history (core.quotePath=falseso non-ASCII names survive); safe whenmemory/notes/doesn't exist.Verification
test-memory-refresh.sh(generation, line budget, idempotency, doctor acceptance) passes; crash repro from adversarial review (missingmemory/notes/under pipefail) fixed and re-verified; doctor exit 0; shellcheck/markdownlint clean.Closes #11
🤖 Generated with Claude Code