Refreshes stale `.ai/memory/constitution.md` from the repo. Ships with the scaffold; install or register wherever the agentic tool expects skills (path is tool-specific).
Where this file lives: In this repository, skills live under skills/update-brain/. In a consuming project, copy or register SKILL.md wherever your agent or tool expects it (for example .cursor/skills/, a Copilot prompts path, or another convention). Custom commands refer to the skill by name only—there is no required location under .ai/. Treat the skill file you loaded as authoritative.
Reconcile .ai/memory/constitution.md with the current repository when long-term brain has drifted (wrong commands, outdated stack, missing dependencies, architecture that no longer matches layout or README). This is refresh, not greenfield: preserve accurate narrative where it still holds; change only what contradicts provable evidence.
Use the same discovery order as the constitution-init skill: README → manifests → task runners → CI → layout. You may re-read for the detailed manifest list and section-by-section guidance; adds reconciliation rules below.
constitution-initupdate-brain.ai/memory/constitution.md end-to-end before editing..ai/memory/reference-index.md if it exists — you will optionally align it when drift is provable from README/manifests/paths (see below).package.json (or equivalent), or CI says Y, update the constitution to Y (or mark [REQUIRES CLARIFICATION: ...] if evidence conflicts).[placeholder] style gaps and the repo now supplies a fact, fill it. If still unknown, use [REQUIRES CLARIFICATION: ...] rather than guessing.If discovery shows a material architecture change (new major framework, split monolith, different database, replaced test runner):
.ai/memory/adr-log.md explaining the change. Do not write a full ADR unless the user asked you to.Update .ai/memory/reference-index.md only when:
Do not fabricate URLs. If a contract moved but you cannot find the new location, add a [REQUIRES CLARIFICATION] note or a stub row with TBD and a short question — or suggest the user add the link after /update-brain.
Same as constitution-init: do not read secret material from .env or key files; do not put secrets in constitution.md or reference-index.md.
[REQUIRES CLARIFICATION] entries./update-brain).constitution.md and compared against README/manifests/CI/layout.constitution-init discovery order; fixed contradictions with minimal edits.reference-index.md touched only when provably wrong or safely updatable..ai/session/plan.md or tasks unless the user asked.