docs(memory): one WRITE section in capitalize-commit.md, every flow cites it; Index steps removed; doctrine names the single writer
This commit is contained in:
1 parent
6c9bb7c58b
commit
f15c360b95
12 files changed
+45
-38
No files matched your search
@@ -39,8 +39,7 @@ blocker already solved.
|
||||
no-match) → no-op naturally; only the ABSENT / no-file case needed the guard. The REGEX
|
||||
is the filter, not the file list: the glob also reads journal.md (date-keyed
|
||||
`## YYYY-MM-DD`) and any non-entry file, which contribute zero matches — no need to
|
||||
exclude them. Do NOT read the `## Index` table: it drifts (entries land in the body, the
|
||||
manual Index update lapses — measured 32-40% missing on a mature repo); headings cannot.
|
||||
exclude them. Do NOT read a `## Index` table (v1 registries may still carry one; it drifted 32-40% on a mature repo; v2 has none); headings cannot drift.
|
||||
|
||||
3. SELECT — IDs whose title bears on $REQUEST. Judge on titles (one dense line each), not
|
||||
on bodies. Over-inclusion is SAFE: an entry that proves non-binding costs one bare ref
|
||||
@@ -97,9 +96,8 @@ is not the current flow having TREATED it as a constraint. Re-surfacing is the f
|
||||
|
||||
## HARD RULE — read-only
|
||||
|
||||
Touches nothing. No write, no Index update, no memory mutation. Symmetric to
|
||||
capitalize-commit's surgical scope (there: stage ONLY memory; here: stage NOTHING). Index
|
||||
backfill, if ever wanted, is `/prune-memory` passe D — never this snippet.
|
||||
Touches nothing. No write, no memory mutation. Symmetric to
|
||||
capitalize-commit's surgical scope (there: stage ONLY memory; here: stage NOTHING). Registry writes go through `lib/memory.sh`, never this snippet.
|
||||
|
||||
## ORDERING (orchestrators only)
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# CAPITALIZE-COMMIT — couple the memory commit to the dev flow
|
||||
|
||||
Inline snippet. Include at the END of any dev flow's CAPITALIZE step, AFTER the
|
||||
approved registry / journal / TODO entries are written. It commits ONLY the
|
||||
Inline snippet for any dev flow's CAPITALIZE step: § WRITE says how the approved
|
||||
registry and journal entries are written, then the rest commits ONLY the
|
||||
memory, surgically, so the flow never leaves an uncommitted `.claude/memory`
|
||||
behind and never embarks dangling code.
|
||||
|
||||
This is the TAIL of capitalize, not a replacement: the SCAN + APPROVAL GATE that
|
||||
decide WHAT to write are unchanged and run before this snippet. Only the COMMIT
|
||||
of the already-approved entries is automated here.
|
||||
decide WHAT to write are unchanged and run before this snippet; § WRITE then
|
||||
writes them through lib/memory.sh and the COMMIT is automated here.
|
||||
|
||||
## WHEN TO RUN
|
||||
|
||||
@@ -29,6 +29,26 @@ If a flow should stay fully silent on a trivial run, that is the FLOW's gate
|
||||
policy (e.g. hotfix skipping the journal line), not this snippet's concern —
|
||||
tune it there.
|
||||
|
||||
## WRITE (before the commit)
|
||||
|
||||
Registry entries and journal lines are written only by `lib/memory.sh`,
|
||||
never by Edit or append; there is no `## Index` to update.
|
||||
|
||||
- Entry: caveman body to a scratch file, then
|
||||
`bash "$HOME/.claude/lib/memory.sh" [-C <project root>] add
|
||||
<decision|learning|blocker|eval> --title "<title>" --body-file <file>
|
||||
[--status <status>] [--supersedes <ID>]`. One call per entry; it
|
||||
allocates the ID under a lock and prints it. A blocker body quotes ≥1
|
||||
error in backticks. `-C` when the cwd is not the project root.
|
||||
- Status change on an existing entry:
|
||||
`bash "$HOME/.claude/lib/memory.sh" status <ID> "<word> …"`, the text
|
||||
starting with a status word (`resolved abc1234`, `open, reopened by …`,
|
||||
`superseded by BDR-NNN`).
|
||||
- Journal: `bash "$HOME/.claude/lib/memory.sh" journal "<line>"`.
|
||||
- rc 2 names its reason (title chars, empty body, a status not starting
|
||||
with a status word, an open code fence in the body or the registry,
|
||||
unknown ID, lock busy): fix the input and re-run.
|
||||
|
||||
## DO
|
||||
|
||||
1. Compose the message from the IDs just written + the flow, matching repo style
|
||||
|
||||
Reference in new issue
Block a user