feat(analyze-before-plan): read-before bookend — scan memory (+code) before planning
Shared include lib/analyze-before-plan.md (two-pass on '## <PREFIX>-' headings, disposition-not-reading invariant, guarded no-op). Wired into the dev flows: ship-feature STEP 0d (analyzer code+memory, INPUT INJECTION into brainstorm/plan + STEP 3 reconciliation gate), bugfix STEP 2.5 (blockers-first), feat STEP 0.6 (decisions-first, MINI-PLAN names in-force or states none), hotfix opt-in. analyzer gains a RELATED MEMORY output section pointing at the include (DRY). init-project / onboard no-op by construction (guarded scan on absent/empty registries). Mirror of the coupled-capitalize write-after (BDR-034): read-before / write-after bookend. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ho5EQCFTSvYamuRtVZpp2d
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
07e846f0a6
commit
67c6a8165d
@@ -58,6 +58,13 @@ Follow `$HOME/.claude/lib/design-gate.md`:
|
||||
tell the user to run `/profile design` before proceeding.
|
||||
- If no signals → skip (zero overhead).
|
||||
|
||||
## STEP 0.6 — MEMORY READ-BEFORE (decisions-first)
|
||||
|
||||
Run the scan per `$HOME/.claude/lib/analyze-before-plan.md`, decisions-weighted: a BDR may
|
||||
already constrain or forbid the approach; an LRN may name a gotcha to apply. Emit RELATED
|
||||
MEMORY; feed STEP 1 MINI-PLAN. Inline consumption — reader = planner, no injection.
|
||||
`.claude/memory/` absent → guarded no-op (zero overhead on a memory-less repo).
|
||||
|
||||
## STEP 1 — MINI-PLAN
|
||||
|
||||
Quick mental model, not a formal plan document:
|
||||
@@ -66,6 +73,9 @@ Quick mental model, not a formal plan document:
|
||||
2. Describe the approach in 2-5 bullet points.
|
||||
3. Note any edge cases to handle.
|
||||
4. If tests exist for the area, note which tests to add/update.
|
||||
5. Disposition (from STEP 0.6): name each in-force BDR/LRN this plan honors
|
||||
(`honors BDR-xxx by …`), or state `no in-force decision constrains this feature`.
|
||||
A plan with neither = read-then-ignore; the disposition must surface as a trace.
|
||||
|
||||
Print the plan as a compact checklist:
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user