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

@@ -138,6 +138,11 @@ Minimum viable workflow for well-understood follow-on work: **PLAN → EXECUTE
- What was tricky
- What patterns should be reused
- Memory: record reusable patterns in `.memory/decisions.md` under `## Retrospective: <topic>`.
- **Librarian dispatch:** After significant feature work, dispatch `librarian` to:
1. Update project documentation (README, docs/*)
2. Sync cross-tool instruction files (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.cursorrules`)
3. Update `.memory/knowledge.md` with new architecture/pattern knowledge
4. Merge any knowledge from instruction files that other tools may have added
## Knowledge Freshness Loop
@@ -367,4 +372,4 @@ This is a ~30-second mental check, not a full review. If something looks obvious
- For every completed project change set, documentation must be created or updated.
- Minimum required documentation coverage: `README` + relevant `docs/*` files + cross-tool instruction files (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.cursorrules`) when project conventions, commands, architecture, workflow, policies, or agent behavior changes.
- **Documentation is a completion gate, not a follow-up task.** Do not declare a task done, ask "what's next?", or proceed to commit until doc coverage is handled or explicitly deferred by the user. Waiting for the user to ask is a failure.
- Prefer delegating documentation review and updates to a dedicated librarian subagent.
- **Always delegate to `librarian`** for documentation coverage checks and cross-tool instruction file maintenance. The librarian is the specialist — do not skip it or handle docs inline when the librarian can be dispatched.