init-memory: scaffold per-repo session memory
Scaffold the Cairn session-memory methodology in the current repo. The design principle is files are earned, not scaffolded: only Tier 0 is created here, and everything else appears on first genuine need.
If the user is ACCEPTING (default path)
- Guard: if
docs/NOW.mdalready exists, say the repo already has the structure and stop. - Ask exactly one question: "What is this project, in one sentence?" Use it to seed NOW.md. Do not ask anything else.
- Create Tier 0:
docs/NOW.mdfromtemplates/NOW.md(in this skill's directory), seeded with the user's answer and today's real date.docs/log/YYYY-MM-DD.md. Get the date fromdate +%F, never from memory. First content:## Session HH:MM - goal: scaffold session memory(time fromdate +%H:%M).
- Wire CLAUDE.md: append the full content of
templates/protocol.mdto the repo'sCLAUDE.md. CreateCLAUDE.mdif missing. If it exists, append after existing content with a blank line. Skip entirely if it already contains## Session Memory Protocol(never duplicate). - Do NOT create
GOTCHAS.md,REFERENCE.md, orARCHITECTURE.md. They are created on first genuine need, per the protocol. Do not mention them as "missing". - If
.claude/.no-memoryexists in the repo, delete it (the user changed their mind). - Report what was created and suggest committing the new files. Do not commit unless asked.
If the user is DECLINING ("no memory", "don't ask again")
Create an empty marker file .claude/.no-memory in the repo root (create the .claude/ dir if needed) and confirm: the memory offer will never appear again in this repo. They can run /init-memory later to opt back in.