grimoire-record
Persistence authorization
A user request to record or update knowledge authorizes writes for that requested scope, subject to write restrictions; do not ask for redundant confirmation. A settled fact, a correction in conversation, or a batch discovered by grimoire-refine is not write authorization. A coordinator must pass through the user's recording authorization and scope, not infer it from invoking a workflow or selecting spec/ticket output.
Without that authorization, return qualifying candidates as unpersisted, pending approval. Do not create or modify knowledge-store files. Apply the recording procedures below only to authorized updates.
What to record
Write only .grimoire/CONTEXT.md, its indexed CONTEXT-[domain].md files, and adr/. Do not bootstrap the store, interview the user, or write specs/tickets.
Record project-specific definitions, aliases, relationships, and consequential durable architectural choices or constraints whose rationale helps future work. Skip transient details, speculation, unconfirmed assumptions, trivial defaults, and information already clear from code. Ordinary requirements belong in the task contract, not automatically in this knowledge store.
Read existing relevant entries before writing. Resolve factual conflicts from evidence; return material unresolved conflicts to the user or coordinator instead of inventing knowledge.
Before qualifying writes, verify a knowledge store exists: an artifact-only .grimoire/ is not initialization. If absent, report that grimoire-init is needed to establish CONTEXT/ADR; do not bootstrap it through recording. Create missing target files/directories only within authorized maintenance of an existing store. When writes are restricted, report qualifying pending items, not a persistence claim.
Batch related settled updates within each user turn. Under grimoire-refine, process the coordinator's authorized qualifying batch before a user-turn pause or artifact handoff; return the completion report below. Reuse relevant reads unless sources changed or conflicts require rechecking. Do not independently settle decisions or launch clarification.