Replace 4 separate instruction files with 1 real file + symlinks: - .github/copilot-instructions.md is the canonical instruction file - CLAUDE.md and .cursorrules are symlinks to it - AGENTS.md stays as global config (not a project instruction file) This eliminates all sync/merge logic - changes propagate automatically. Changes: - AGENTS.md: rewrite Cross-Tool Instruction Files section for symlink convention - librarian.md: simplify to maintain single instruction file + verify symlinks - lead.md: simplify PHASE-WRAP and Documentation Completion Gate - commands (init, bootstrap-memory, save-memory): update for symlink model - doc-coverage skill: verify symlinks exist and point correctly
2.5 KiB
Bootstrap Project Memory Files
RUN { git ls-files; git ls-files --others --exclude-standard; } 2>/dev/null | sort -u READ README.md
You are bootstrapping .memory/ files for this project.
Your job is to inspect the codebase and create an initial memory baseline in plain markdown files. Capture architecture, core modules, conventions, and key decisions so future sessions can resume quickly.
Step 1: Create .memory/ structure
Create (if missing):
.memory/
knowledge.md
decisions.md
plans/
research/
.memory/ is tracked in git.
Step 2: Inspect project structure
Run git ls-files to understand the project layout, then read README.md and
the highest-signal files for architecture and conventions.
Also check for existing cross-tool instruction files (AGENTS.md, CLAUDE.md,
.github/copilot-instructions.md, .cursorrules) — they may contain project
knowledge from other tools or team members that should be incorporated.
Identify:
- What the project does (primary capabilities)
- Core modules/subsystems and responsibilities
- Key patterns/conventions (naming, layering, testing, config)
Step 3: Write initial knowledge.md
Populate .memory/knowledge.md with:
- Project purpose and scope
- Architecture overview
- Key modules with file paths
- Important implementation patterns/conventions
Use markdown sections with max 2 heading levels.
Step 4: Seed decisions.md
Populate .memory/decisions.md with any clear, durable decisions found in docs
or code patterns (for example: stack choices, testing strategy, architectural
constraints). Include rationale when known.
Step 5: Initialize plans/research folders
- If active in-progress work is discoverable, create
.memory/plans/<feature>.mdwith scope, tasks, and acceptance criteria. - If research artifacts are discovered, create
.memory/research/<topic>.mdwith findings and references.
Step 6: Update instruction file
If .github/copilot-instructions.md exists, update it with any new project knowledge
discovered during bootstrap (architecture, conventions, commands). The symlinks
(AGENTS.md, CLAUDE.md, .cursorrules) will automatically reflect changes.
If the instruction file doesn't exist, note that /init should be run to create it.
Guidelines
- Be specific with file paths, APIs, parameters, and behavioral details.
- Keep sections concise and scannable.
- Prefer durable knowledge over transient status notes.
- Add markdown cross-references between related entries (for example, knowledge entries linking to decisions).