feat: wire librarian as the primary agent for documentation and instruction file maintenance

Expand librarian role to own cross-tool instruction file sync,
.memory/ file maintenance, and knowledge merge workflows. Lead
now proactively dispatches librarian in PHASE-WRAP and Documentation
Completion Gate instead of handling docs inline.
This commit is contained in:
2026-03-08 19:58:08 +00:00
parent f9880638e9
commit 5fd7fc1bf7
4 changed files with 67 additions and 27 deletions

View File

@@ -55,19 +55,20 @@ Example cross-reference:
Re-read updated `.memory/` files to confirm they reflect current understanding.
Report what was added/updated and where.
## Step 6: Sync cross-tool instruction files when project knowledge changed
## Step 6: Delegate instruction file sync to librarian
Check whether `.memory/knowledge.md` was **materially** updated in this save.
Material updates include project-level changes such as architecture, conventions,
or build/test/lint commands.
If `.memory/knowledge.md` was **materially** updated in this save (architecture,
conventions, commands — not just plans/research), dispatch the `librarian`
subagent to:
- If there was a material `knowledge.md` update:
- Read current instruction files: `AGENTS.md`, `CLAUDE.md`,
`.github/copilot-instructions.md`, `.cursorrules`
- Update them to reflect the new core project knowledge while preserving
tool-specific formatting and project-specific content.
- If updates were only plans/research/tracking details (no project-level
knowledge change), do **not** update instruction files.
1. Read all cross-tool instruction files (`AGENTS.md`, `CLAUDE.md`,
`.github/copilot-instructions.md`, `.cursorrules`)
2. Check for knowledge in instruction files not yet in `.memory/knowledge.md`
and merge it inward
3. Update instruction files to reflect new `.memory/knowledge.md` content
4. Report sync status
If updates were only plans/research/tracking details, skip this step.
## Guidelines