Init Brain
Invoke as /afk:init-brain. Use it to set up a project for AFK for the first time: it scaffolds a brain/ vault so the hooks and memory skills have somewhere to read and write, and authors a tight CLAUDE.md (with an AGENTS.md symlink) that onboards any agent to the repo and points at the brain.
What it does
Init Brain does two things. First, it runs an idempotent scaffold script that creates the brain/ directory structure if it is missing, never overwriting existing content, then refines any auto-detected doc site stubs by replacing placeholder scope lines with real one-line descriptions of what those docs cover. Second, it authors (or repairs) a tight, deliberate CLAUDE.md following references/claude-md-guide.md, with an AGENTS.md symlinked to it — never dump-generated like /init.
- Creates (only if missing):
brain/,brain/index.md,brain/principles.md+brain/principles/,brain/context.md(the domain glossaryafk:grillgrows),brain/decisions/+brain/decisions/index.md(ADRsafk:grillrecords), andbrain/plans/+brain/plans/index.md. - If the project already has a doc site (VitePress, Docusaurus, MkDocs, etc.), also seeds
brain/sources/<name>.mdstubs pointing at those docs rather than copying their content. - Authors a
CLAUDE.md— the highest-leverage file in the repo, since it loads into every session — researching the stack, layout, and commands first rather than dump-generating it, then symlinksAGENTS.mdto it so every harness reads one file. An existingCLAUDE.mdis not overwritten; it only gets a brain pointer if one is missing. - The vault is also created lazily by
afk:reflectandafk:brainon demand;init-brainis the explicit up-front path. Because the scaffold is idempotent, it is safe to re-run to addCLAUDE.md/AGENTS.mdto a project that already has a vault.
Output artifact: a scaffolded brain/ vault at the project root plus an authored CLAUDE.md (with AGENTS.md symlinked to it). The PostToolUse hook keeps brain/index.md in sync from that point on.