Selaa lähdekoodia

feat(capitalize): add CAPITALIZE step across completion skills

Registries only get filled if something actively writes to them.
Without integration, the 3-question ritual is aspirational text.
Adds a CAPITALIZE step at the end of every completion skill so work
milestones automatically propose BDR/LRN/BLK entries from context.

- ship-feature STEP 9 — decision/learning/blocker candidates per feature
- bugfix STEP 7 — always propose BLK with root cause; LRN if pattern reusable
- hotfix STEP 5 — default skip; only prompt when non-obvious lesson surfaces
- feat STEP 6 — propose BDR for design choice, LRN for pattern
- commit-change Phase 4 — analyze the commit batch, propose grouped entries

Every variant also appends a one-liner to .claude/memory/journal.md under
today's date heading.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bastien 3 viikkoa sitten
vanhempi
sitoutus
b0dff47d78
5 muutettua tiedostoa jossa 104 lisäystä ja 0 poistoa
  1. 21 0
      agents/bugfixer.md
  2. 26 0
      agents/commit-changer.md
  3. 19 0
      agents/feater.md
  4. 12 0
      agents/hotfixer.md
  5. 26 0
      skills/ship-feature/SKILL.md

+ 21 - 0
agents/bugfixer.md

@@ -129,6 +129,27 @@ Load `$HOME/.claude/agents/doc-syncer.md`.
 Execute in automatic mode:
 `auto-mode scope: <list of files modified during this session>`
 
+## STEP 7 — CAPITALIZE (memory registries)
+
+A bugfix with an understood root cause is almost always worth one entry:
+
+1. Propose a `BLK-XXX` entry in `.claude/memory/blockers.md` pre-filled from STEP 3 diagnosis:
+   - `friction` = symptom
+   - `real_cause` = root cause identified
+   - `solution` = the fix applied
+   - `status` = resolved
+2. If the root cause exposed a **reusable pattern** (would catch the same bug elsewhere or in other projects) → also propose an `LRN-XXX` entry in `.claude/memory/learnings.md`.
+3. Present as:
+   ```
+   CAPITALIZE — proposé
+     BLK-XXX — <friction> — resolved
+     [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`.
+
+If the bug was trivial and the root cause not transferable → skip with `CAPITALIZE: trivial, skip`.
+
 ---
 
 ## RULES

+ 26 - 0
agents/commit-changer.md

@@ -100,3 +100,29 @@ when the diff alone isn't self-explanatory.
   artificially split what was done as one action
 - **Sensitive files** (.env, credentials, keys): warn the user and
   exclude them from commits by default
+
+### Phase 4: Capitalize (memory registries)
+
+After all commits are created, inspect the set as a whole:
+
+- Any commit that represents a **design/architecture choice** (new dependency,
+  refactor with rationale, API shape decision) → propose an entry in
+  `.claude/memory/decisions.md` (BDR-XXX) with pre-filled alternatives.
+- Any commit that resolves a **non-trivial bug with a root cause** → propose
+  an entry in `.claude/memory/blockers.md` (BLK-XXX, status: resolved).
+- Any commit whose content taught something **reusable beyond the immediate fix**
+  (a pattern, a gotcha, a surprising API behaviour) → propose an entry in
+  `.claude/memory/learnings.md` (LRN-XXX).
+
+Present grouped candidates:
+```
+CAPITALIZE — depuis les <N> commits créés
+  [decisions.md]   BDR-XXX — <titre> (ref commit <hash>)
+  [blockers.md]    BLK-XXX — <friction> — resolved (ref commit <hash>)
+  [learnings.md]   LRN-XXX — <pattern>
+Valider ? (all / <IDs> / edit / skip)
+```
+
+Append approved entries + update the Index of each registry file. Add a line to today's heading in `.claude/memory/journal.md` summarising the commit batch.
+
+If all commits are pure chore/docs/style with nothing to log → skip with `CAPITALIZE: rien à logger`.

+ 19 - 0
agents/feater.md

@@ -119,6 +119,25 @@ Load `$HOME/.claude/agents/doc-syncer.md`.
 Execute in automatic mode:
 `auto-mode scope: <list of files modified during this session>`
 
+## STEP 6 — CAPITALIZE (memory registries)
+
+A small feature may or may not involve a design choice. Scan the work for:
+
+- **Non-trivial design choice** (even small: a library pick, a naming convention, a data-model tradeoff) → propose `BDR-XXX` in `.claude/memory/decisions.md` with alternatives considered.
+- **Reusable pattern or gotcha encountered** → propose `LRN-XXX` in `.claude/memory/learnings.md`.
+
+Present the candidates grouped:
+```
+CAPITALIZE — proposé
+  [decisions.md]   BDR-XXX — <titre> (optionnel)
+  [learnings.md]   LRN-XXX — <pattern> (optionnel)
+Valider ? (all / <IDs> / edit / skip)
+```
+
+Always append a 1-line entry to today's heading in `.claude/memory/journal.md`.
+
+If no substantive capture candidate → skip with `CAPITALIZE: rien à logger`.
+
 ---
 
 ## RULES

+ 12 - 0
agents/hotfixer.md

@@ -74,6 +74,18 @@ Load `$HOME/.claude/agents/doc-syncer.md`.
 Execute in automatic mode:
 `auto-mode scope: <list of files modified during this session>`
 
+## STEP 5 — CAPITALIZE (memory registries, lightweight)
+
+Hotfixes are often trivial (typo, config, import) — skip by default. But if the fix revealed something non-obvious:
+
+- Wrong default that should never have been merged → propose `LRN-XXX` in `.claude/memory/learnings.md`.
+- Bug that cost real time to locate despite being "superficial" → propose `BLK-XXX` in `.claude/memory/blockers.md` (status: resolved).
+
+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).
+
 ---
 
 ## RULES

+ 26 - 0
skills/ship-feature/SKILL.md

@@ -119,6 +119,32 @@ Load `$HOME/.claude/agents/doc-syncer.md`.
 Execute in automatic mode:
 `auto-mode scope: <list of files modified during this session>`
 
+## STEP 9 — CAPITALIZE (memory registries)
+Feature shipped implies at least one design decision worth capturing. Run this before declaring done:
+
+1. Scan conversation context for:
+   - **Design / architecture choices with rationale** → candidate for `decisions.md` (BDR-XXX).
+   - **Reusable patterns, surprising discoveries** → candidate for `learnings.md` (LRN-XXX).
+   - **Dead-ends with identified root cause** → candidate for `blockers.md` (BLK-XXX).
+2. For each candidate, pre-fill a full entry (ID, date, title, body per registry schema) from conversation context.
+3. Present them grouped:
+   ```
+   CAPITALIZE — registres proposés
+   
+   [ decisions.md ]
+     BDR-XXX — <titre> — <1-line why>
+   [ learnings.md ]
+     LRN-XXX — <pattern>
+   [ blockers.md ]
+     (aucun)
+   
+   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`).
+
+If nothing substantive to log → print `CAPITALIZE: rien à logger (travail trivial)` and skip.
+
 ---
 
 ## RULES