Updates project-context.md and project-plan.md to reflect current truth. Invoke explicitly with /evolve or when user says 'update docs' or 'sync docs'.
Update project-context.md, project-plan.md, or both to reflect current truth. Three modes:
/evolve context [what changed] — update only project-context.md/evolve plan [what changed] — update only project-plan.md/evolve [what changed] — full chain: optional research → discussion → context → plan → cross-checkParse the user's argument:
context → Context-only modeplan → Plan-only modeRead current project-context.md. If it doesn't exist, stop — tell user to run /meta-init first.
Identify what changed. Compare new information against current document. List every field that needs updating.
Edit sections in place. Update affected fields directly so the body shows current truth. Keep same structure and formatting — change values, not layout.
Build changelog entry. Read format from ../../references/evolve-context-diff.md. For each changed field:
**[Section]: [Field]**: "[old]" -> "[new]"Insert changelog at top (newest first, append-only). Use today's date and platform (CLAUDE/CODEX/GEMINI/COPILOT).
Verify completeness. Every changed field in the body must have a corresponding "was → now" line. Missing entries = lost history.
Read current project-plan.md. If it doesn't exist, stop — tell user to run /meta-init first.
Identify what changed. Determine which work units were completed, added, removed, re-scoped, or had dependency changes.
Edit sections in place. Update affected work units directly:
Build changelog entry. Read format from ../../references/evolve-plan-diff.md. For each change:
[work unit] — [brief outcome][work unit] — [why needed][work unit] — "[old]" -> "[new]"[work unit] — [why no longer needed][work unit] depends on / unblocked by [what]Insert changelog at top (newest first, append-only).
Verify completeness. Every status change must have a corresponding changelog line.
Assess whether the change involves unfamiliar territory — new technology, domain shift, unclear tradeoffs.
Trigger research if ANY are true:
Skip research if ALL are true:
If research needed: Ask user, then run /meta-research scoped tightly to the change. P0-only mode unless broader coverage requested.
After research (or if the change has multiple valid approaches):
Skip this phase if the user made a clear, unambiguous decision and just wants docs updated.
Run the Context-Only Mode instructions above.
Transition: If the change only affected context (e.g., glossary update, constraint clarification) with zero plan impact, tell the user and exit. Otherwise proceed.
Run the Plan-Only Mode instructions above. Pass any new context from Phase 1 (e.g., Key Decision changes affecting dependencies).
After both phases complete:
Verify no contradictions between project-context.md and project-plan.md:
If inconsistencies found, flag to user and ask which document is correct. Fix before exiting.
Present summary: files modified, fields updated, work units affected, research incorporated, inconsistencies resolved.
project-context.md and project-plan.md serve two audiences each: someone who wants current state (reads the body) and someone who wants the decision trail (reads the changelog). Edit-in-place keeps the body authoritative. Changelog-as-diff preserves history without cluttering the body.
User: "We switched from REST to GraphQL. Update the docs."
Mode: Full. Phase 0 — GraphQL is new, ask to research. Phase 0.5 — present
schema-first vs code-first. Phase 1 — update tech stack, architecture, Key
Decisions. Phase 2 — update work units. Phase 3 — cross-check.
User: "WU-4 is done and we discovered we need a migration script."
Mode: Full (both docs affected). Skip Phase 0/0.5 (straightforward). Phase 1 —
update Current State. Phase 2 — mark WU-4 complete, add migration work unit.
User: "/evolve context — we're removing mobile from scope, web only."
Mode: Context-only. Update scope/platform, remove mobile Key Decision. Changelog.
User: "/evolve plan — WU-3 done, auth middleware working with JWT."
Mode: Plan-only. Mark WU-3 complete. Changelog.
User: "Dropped the admin panel from MVP."
Mode: Full. Skip research. Phase 1 — update scope. Phase 2 — remove admin work
units, update dependencies. Flag if other features depended on it.
Before completing, read and follow ../../references/cross-cutting-rules.md.