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:
bchanot committed 2026-10-28 14:19:21 +01:00
1 parent 6c9bb7c58b
commit f15c360b95
12 files changed
+45 -38

No files matched your search

+1 -1
View File
@@ -272,7 +272,7 @@ A bugfix with an understood root cause is almost always worth one entry:
[LRN-XXX — <pattern>] (optionnel)
Valider ? (all / blockers-only / edit / skip)
```
4. Append approved entries + update the Index. Add a line to today's heading in `.claude/memory/journal.md`.
4. Write approved entries per `lib/capitalize-commit.md` § WRITE: a new blocker `add blocker … --status resolved`, an existing one now fixed `status <BLK-ID> "resolved <hash>"`, an LRN `add learning …` (no status); the journal line `memory.sh journal`.
**Language rule**: written entries are ALWAYS English AND caveman — fragments, articles dropped, code/IDs/quoted errors verbatim — per CLAUDE.md "Memory registries" (Always English, always caveman). The interactive gate may mirror the user's language; the appended entries must not.
+5 -11
View File
@@ -140,7 +140,7 @@ with no dedup.
For every candidate from STEP 1 (and STEP 1B), check whether it is already
captured before proposing it. Pull the distinctive keyword(s) of the candidate
and grep the relevant registry (Index + bodies):
and grep the relevant registry (headings + bodies):
```bash
# Example: candidate is a learning about "cd -P symlink resolution"
@@ -246,14 +246,8 @@ Registries first (in registry order), then the TODO.
Registry entries — for each approved:
1. Read the target registry file.
2. Next sequential ID = scan existing `## <PREFIX>-NNN` body headings, take max,
+1 (e.g. last `## BDR-018` → `BDR-019`). Never reuse, never renumber.
3. Append the full entry at the **end** of the body (never rewrite existing
entries — append-only).
4. Add one row to the `## Index` table at the top: `| <ID> | <date> | <title>
| <status> |` (column set varies per file — match that file's header row).
5. Body in **caveman English** per CLAUDE.md memory format: drop articles +
1. Write each approved entry per `lib/capitalize-commit.md` § WRITE (`memory.sh add`, one call each; a resolved blocker: `memory.sh status <ID> "resolved <hash>"`).
2. Body in **caveman English** per CLAUDE.md memory format: drop articles +
filler, fragments OK, short synonyms. Keep code/URLs/error-quotes/IDs/dates
verbatim. Entries are ALWAYS English even if the STEP 3 prompt mirrored the
user's language.
@@ -269,8 +263,7 @@ TODO — for each approved:
Write one timeline line under today's `## YYYY-MM-DD` heading — even if every
candidate was skipped or already captured.
- Heading exists → append a bullet.
- Missing → create `## YYYY-MM-DD` and write 3-5 bullets summarizing the session.
- `bash "$HOME/.claude/lib/memory.sh" journal "<line>"` per bullet (it creates today's heading when missing).
Reference any IDs written this run AND the TODO ops:
`BDR-019 + LRN-026 capitalized; checked 1 done, added 1 task.`
@@ -302,6 +295,7 @@ Follow `~/.claude/lib/capitalize-commit.md`:
- **rc 3** → unsafe git state (detached / merge / rebase) or not a git repo:
memory stays in the working tree, surface the helper's stderr, do NOT retry.
The flush is safe on disk; STEP 6 must say NOT committed, not ✅-all.
- **rc 5 / rc 6** → nothing committed; surface the helper's stderr; meaning and recovery in `lib/capitalize-commit.md` (rc 6: fix the registry, then /commit-change). STEP 6 says NOT committed.
- **rc 0, hash EMPTY → must NOT happen from this step.** STEP 5 always writes
the journal line, so memory is ALWAYS pending at 5B → the helper always has
≥1 change → the hash is non-empty by construction. An empty hash here means
+1 -1
View File
@@ -245,7 +245,7 @@ CAPITALIZE — proposé
Valider ? (all / <IDs> / edit / skip)
```
Always append a 1-line entry to today's heading in `.claude/memory/journal.md`.
Approved entries and the always-written 1-line journal entry: per `lib/capitalize-commit.md` § WRITE (`memory.sh add` / `memory.sh journal`).
**Language rule**: written entries are ALWAYS English AND caveman — fragments, articles dropped, code/IDs/quoted errors verbatim — per CLAUDE.md "Memory registries" (Always English, always caveman). The interactive gate may mirror the user's language; the appended entries must not.
+1 -1
View File
@@ -231,7 +231,7 @@ Hotfixes are often trivial (typo, config, import) — skip by default. But if th
Default behaviour: `CAPITALIZE: hotfix trivial, skip` (no prompt, no output).
Ask the user only when there is an actual candidate to propose.
Always append a 1-line entry to today's heading in `.claude/memory/journal.md` (even trivial hotfix — journal is timeline, not signal).
Always append a 1-line journal entry (even trivial hotfix — journal is timeline, not signal) and any approved BLK/LRN per `lib/capitalize-commit.md` § WRITE.
**Language rule**: the journal line and any proposed BLK/LRN entries are ALWAYS written English AND caveman — fragments, articles dropped, code/IDs/quoted errors verbatim — per CLAUDE.md "Memory registries" (Always English, always caveman).
+1 -3
View File
@@ -298,9 +298,7 @@ capitalizes NOTHING. Do NOT fabricate a BDR to fill the step. Print
[ decisions.md ] BDR-XXX — <decision> — <1-line why>
Valider lesquels ? (all / <IDs> / edit / skip)
```
3. Append approved entries to the existing registries (bootstrapped at STEP 5,
in the root commit) + update the Index. Append a journal line under today's
heading in `.claude/memory/journal.md`.
3. Write approved entries to the registries bootstrapped at STEP 5 (in the root commit), and the journal line, per `lib/capitalize-commit.md` § WRITE.
**Hash rule — founding decisions carry NO commit hash; use path + date only.**
This is by nature, not an omission: a founding decision is made at DESIGN
+1 -1
View File
@@ -1179,7 +1179,7 @@ per the project's commit convention), and verifies every rule is in
hash and `git -C <ROOT> show --stat <hash>`, the user decides.
S7 — AFTER. `claude -p "/context"` again from `<ROOT>`; append to that
project's `.claude/memory/journal.md` under today's date: `CLAUDE.md
project's journal (`bash "$HOME/.claude/lib/memory.sh" -C <ROOT> journal`): `CLAUDE.md
split: <k> sections → .claude/rules/ (<names>), always-on <before> →
<after>`. Tell the user the proof step: a fresh session in that project
that Reads one file per rule, then `jq -c 'select(.memory_type=="Project"
+2 -2
View File
@@ -270,8 +270,8 @@ Feature shipped implies at least one design decision worth capturing. Run this B
Valider lesquels ? (all / <IDs> / edit / skip)
```
4. Append approved entries to the registries. Update the Index table at the top of each file.
5. Append a one-line entry to `.claude/memory/journal.md` under today's date heading (`## YYYY-MM-DD`).
4. Write approved entries per `lib/capitalize-commit.md` § WRITE (`memory.sh add`, one call each; no Index to update).
5. Journal line: `memory.sh journal` (same section).
**Language rule**: written entries are ALWAYS English AND caveman — fragments, articles dropped, code/IDs/quoted errors verbatim — per CLAUDE.md "Memory registries" (Always English, always caveman). The interactive gate above may mirror the user's language; the appended entries must not.