claude-prism 1.8.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-prism",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "AI agent harness implementing the EUDEC methodology",
5
5
  "author": { "name": "lazysaturday91" },
6
6
  "repository": "https://github.com/lazysaturday91/claude-prism",
package/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.8.1] — 2026-03-09
9
+
10
+ ### Changed
11
+ - **ESSENCE phase expanded** — Entry Judgment (Top-down/Bottom-up/Hybrid), Top-Down Removal Method with Counterexample test, Bottom-Up Competitive Exploration for novel problems
12
+ - **Scope Classification** added to DECOMPOSE — Core/Support/Out of Scope concentric circle model; "Out of Scope must not be empty" constraint
13
+ - **Self-Correction Triggers** — each trigger now specifies explicit fallback phase (→ ESSENCE/UNDERSTAND/DECOMPOSE); new triggers for scope expansion and error type oscillation
14
+ - `rules-lean.md` synced with Entry Judgment summary and fallback annotations
15
+
8
16
  ## [1.8.0] — 2026-03-06
9
17
 
10
18
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-prism",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "AI agent harness implementing the EUDEC methodology — Essence, Understand, Decompose, Execute, Checkpoint.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -30,6 +30,13 @@ For the full methodology, run `/claude-prism:prism`.
30
30
  | **Standard** | 3-5 files, 50-200 LOC | Run `/claude-prism:prism` for full EUDEC guidance |
31
31
  | **Full** | 6+ files, 200+ LOC, or unclear scope | Run `/claude-prism:prism` for full EUDEC with plan file |
32
32
 
33
+ ## Entry Judgment
34
+
35
+ Before extracting essence: "Can existing elements be removed from this problem?"
36
+ - **YES** (prior art exists) → Top-down: list components, remove one at a time, what remains is essence
37
+ - **NO** (blank slate) → Bottom-up: collect broadly, score, compete 2-3 candidates, select survivor
38
+ - **PARTIAL** → Split the problem, apply each path to its part
39
+
33
40
  ## Task Type Derivation
34
41
 
35
42
  | Essence Character | Type | Path |
@@ -69,11 +76,12 @@ After 3 failed fixes: STOP. Discuss with user.
69
76
 
70
77
  ## Self-Correction Triggers
71
78
 
72
- - Same file edited 3+ times → investigate root cause
73
- - Editing file not in plan → scope change needed?
74
- - 3 consecutive test failures → back to essence
79
+ - Same file edited 3+ times → investigate root cause → **Fallback: UNDERSTAND**
80
+ - Editing file not in plan → scope change needed? → **Fallback: DECOMPOSE**
81
+ - 3 consecutive test failures → **Fallback: ESSENCE (was the essence wrong?)**
75
82
  - 5 turns autonomous → report progress before continuing
76
- - Adding workarounds to fix workarounds → design problem, step back
83
+ - Adding workarounds to fix workarounds → **Fallback: ESSENCE (re-extract)**
84
+ - Scope expanding beyond plan → **Fallback: DECOMPOSE (re-classify scope)**
77
85
 
78
86
  ## Rationalization Defense
79
87
 
@@ -29,13 +29,41 @@ The approach: **Essence → Simplify → Expand**. Strip down to the core of the
29
29
 
30
30
  Starting point for all work. Strip down to the core of the problem before implementation.
31
31
 
32
- ### 1-1. Essence Extraction (3 Steps)
32
+ Essence = "the thing without which it ceases to be what it is."
33
33
 
34
- | Step | Question | Output |
35
- |------|----------|--------|
36
- | **Extract** | "What do they actually want?" | Essence statement (1 sentence) |
37
- | **Simplify** | "What's the smallest working version?" | Minimal case |
38
- | **Expansion path** | "How do we grow from here?" | Expansion steps (2-4 steps) |
34
+ ### 1-1. Entry Judgment
35
+
36
+ Before extracting essence, determine the approach:
37
+
38
+ > "Can existing elements be removed from this problem?" (Are there references, prior art, existing solutions?)
39
+
40
+ | Answer | Meaning | Path |
41
+ |--------|---------|------|
42
+ | **YES** | References, existing products, prior art exist | → Top-down (removal method) |
43
+ | **NO** | No precedent, blank slate, novel domain | → Bottom-up (competitive exploration) |
44
+ | **PARTIAL** | Some parts have references, some don't | → Hybrid (split, apply each path independently, merge in output) |
45
+
46
+ Most coding tasks are **YES** (top-down). Bottom-up is for genuinely novel problems (new product direction, undefined feature space).
47
+
48
+ ### 1-2. Essence Extraction — Top-Down (Removal Method)
49
+
50
+ The default path. Remove non-essential elements to reveal what remains.
51
+
52
+ ```
53
+ Step 1. List all components of the problem/system
54
+ Step 2. Remove one at a time, asking:
55
+ "Without this, is it still the thing?"
56
+ → YES (still the thing) → not essential, remove
57
+ → NO (no longer the thing) → essence candidate
58
+ Step 3. Validate remaining candidates:
59
+ "Do these alone justify the thing's existence?"
60
+ → YES → essence confirmed
61
+ → NO → restore one removed item, re-test
62
+ Step 4. Counterexample test:
63
+ "Can I name one scenario where this essence is wrong?"
64
+ → NO → proceed
65
+ → YES → weaken confidence, document the counterexample, and verify the essence still holds from a different angle (e.g., different user persona, edge case, or opposing assumption)
66
+ ```
39
67
 
40
68
  **Output format:**
41
69
  ```
@@ -45,7 +73,28 @@ Starting point for all work. Strip down to the core of the problem before implem
45
73
  - Expansion path: minimal → [step1] → [step2] → [complete]
46
74
  ```
47
75
 
48
- ### 1-2. Task Type Derivation
76
+ ### 1-3. Essence Extraction — Bottom-Up (Competitive Exploration)
77
+
78
+ For novel problems with no prior art. Generate multiple essence candidates, compete them, select the survivor.
79
+
80
+ ```
81
+ Step 1. Collect broadly (don't judge yet — quantity > quality)
82
+ Stop when: information saturates OR 3+ independent perspectives gathered OR time box hit
83
+ Step 2. Filter (two-pass):
84
+ 1st pass: gut feel — strong / moderate / weak (drop weak)
85
+ 2nd pass: score remaining on frequency (1-3), impact (1-3), connectivity (1-3)
86
+ → 7-9 points: essence candidate
87
+ → 4-6 points: support element (reuse in DECOMPOSE)
88
+ Step 3. Cluster similar candidates → select top 2-3
89
+ If only 1 candidate remains → create its opposite, compete them
90
+ Step 4. Parallel exploration: "If this were the essence, what would we build?"
91
+ → Score difference ≤2 or irreversible decision → explore all equally
92
+ → Score difference >2 and reversible → staged elimination
93
+ Step 5. Converge: which candidate solves the user's problem more directly?
94
+ Feasibility is NOT a factor here (that's DECOMPOSE's job)
95
+ ```
96
+
97
+ ### 1-4. Task Type Derivation
49
98
 
50
99
  The task type naturally emerges from the essence:
51
100
 
@@ -59,7 +108,7 @@ The task type naturally emerges from the essence:
59
108
 
60
109
  **Migration shortcut**: When applying the same transformation to 10+ files, don't decompose into individual file tasks. Define the pattern once, apply in batches of 5-10, verify after each batch. Scope guard thresholds are raised automatically when a plan file exists.
61
110
 
62
- ### 1-3. Essence Validation (Error Prevention)
111
+ ### 1-5. Essence Validation (Error Prevention)
63
112
 
64
113
  | Trap | Response |
65
114
  |------|----------|
@@ -70,15 +119,7 @@ The task type naturally emerges from the essence:
70
119
 
71
120
  **Core test**: If the essence statement contains specific technology/tool names → it's still at solution level, not essence. Go one level higher.
72
121
 
73
- ### 1-4. Quality Gate: ESSENCE UNDERSTAND
74
-
75
- Before moving to UNDERSTAND, verify:
76
- - [ ] Essence statement is technology-neutral (holds without naming specific tools/libraries)
77
- - [ ] Minimal case is truly "minimal" (can it be reduced further?)
78
- - [ ] Each step in the expansion path works independently
79
- - [ ] Task type has been clearly derived
80
-
81
- ### 1-5. Adaptive Weight (Task Size Routing)
122
+ ### 1-6. Adaptive Weight (Task Size Routing)
82
123
 
83
124
  After extracting essence and task type, assess task weight to select the appropriate EUDEC path:
84
125
 
@@ -98,6 +139,15 @@ After extracting essence and task type, assess task weight to select the appropr
98
139
 
99
140
  Bugfixes skip ESSENCE extraction, UNDERSTAND ceremony, and DECOMPOSE entirely. The 4-step debugging protocol (4-3) is the complete path.
100
141
 
142
+ ### 1-7. Quality Gate: ESSENCE → UNDERSTAND
143
+
144
+ Before moving to UNDERSTAND, verify:
145
+ - [ ] Essence statement is technology-neutral (holds without naming specific tools/libraries)
146
+ - [ ] Minimal case is truly "minimal" (can it be reduced further?)
147
+ - [ ] Each step in the expansion path works independently
148
+ - [ ] Task type has been clearly derived
149
+ - [ ] Counterexample test passed (no unresolved counterexamples)
150
+
101
151
  ---
102
152
 
103
153
  ## EUDEC 2. UNDERSTAND — Understanding Protocol
@@ -171,7 +221,23 @@ If no code change is needed (architecture review, cause analysis, investigation)
171
221
  | **Refactor** | 3+ files affected (same advisory as Feature) | Decompose into batches. Plan file if 6+ files or 3+ modules. |
172
222
  | **Investigation** | — | Skip decomposition. Define exploration scope. |
173
223
 
174
- ### 3-2. Decomposition Principles (Feature/Refactor only)
224
+ ### 3-2. Scope Classification (before decomposing)
225
+
226
+ Before breaking into batches, classify all changes using the concentric circle model:
227
+
228
+ ```
229
+ "Is this required for the essence to work?"
230
+ → YES → Core (must be in scope)
231
+ → NO → "Does this amplify the essence's value?"
232
+ → YES → Support (nice to have, lower priority)
233
+ → NO → Out of Scope (explicitly excluded)
234
+ ```
235
+
236
+ - Only **Core** items enter batch decomposition
237
+ - **Support** items are noted for later (not in current plan)
238
+ - **Out of Scope** must not be empty — if everything is "Core", scope classification has failed (return to ESSENCE)
239
+
240
+ ### 3-3. Decomposition Principles (Feature/Refactor only)
175
241
 
176
242
  1. **Independent verification**: each unit has a pass criterion
177
243
  2. **Files specified**: each task lists files to create/modify
@@ -188,7 +254,7 @@ If no code change is needed (architecture review, cause analysis, investigation)
188
254
  - **[S]-only: up to 8 per batch** (independent small changes can be batched aggressively)
189
255
  - Aligns with 4-1 adaptive batch size (simple/mechanical: 5-8 per batch)
190
256
 
191
- ### 3-3. Plan File Persistence
257
+ ### 3-4. Plan File Persistence
192
258
 
193
259
  Save multi-step plans (6+ files) as markdown:
194
260
  - **Path**: `.prism/plans/YYYY-MM-DD-<topic>.md`
@@ -229,7 +295,7 @@ Tech stack, key decisions, 2-3 sentences max.
229
295
  - [Known unknowns or potential blockers]
230
296
  ```
231
297
 
232
- ### 3-4. Pre-Decomposition Check
298
+ ### 3-5. Pre-Decomposition Check
233
299
 
234
300
  Before creating the plan:
235
301
  - [ ] **Codebase audit**: grep/search to verify targets actually exist in code (don't trust assumptions from prior sessions)
@@ -240,7 +306,7 @@ Before creating the plan:
240
306
 
241
307
  **Staleness prevention**: If plan targets (files to change, patterns to replace) no longer exist in the codebase, mark them as "already completed" before starting execution. Never start a plan without verifying its targets are real.
242
308
 
243
- ### 3-5. Quality Gate: DECOMPOSE → EXECUTE
309
+ ### 3-6. Quality Gate: DECOMPOSE → EXECUTE
244
310
 
245
311
  Before starting execution, all must pass:
246
312
  - [ ] Plan file exists and targets verified against codebase
@@ -315,24 +381,24 @@ Choose verification proportional to the **risk of the change**, not the file pat
315
381
 
316
382
  ### 4-4. Self-Correction Triggers
317
383
 
318
- - Same file edited 3+ times → "Possible thrashing. Investigate root cause."
319
- - Editing file not in plan → "Scope change needed?"
320
- - 3 consecutive test failures → "Approach problem. Back to ESSENCE did we get the essence wrong?"
384
+ - Same file edited 3+ times → "Possible thrashing. Investigate root cause." → **Fallback: UNDERSTAND (re-examine the problem)**
385
+ - Editing file not in plan → "Scope change needed?" → **Fallback: DECOMPOSE (re-classify scope)**
386
+ - 3 consecutive test failures → "Approach problem." **Fallback: ESSENCE (was the essence wrong?)**
321
387
  - New package needed → "Confirm with user"
322
388
  - 5 turns autonomous → "Report progress before continuing"
323
- - Adding workarounds to fix workarounds → "Design problem. Step back."
389
+ - Adding workarounds to fix workarounds → "Design problem." **Fallback: ESSENCE (re-extract)**
324
390
  - Copy-pasting similar code 3+ times → "Need abstraction? Ask user."
325
391
  - Dependency version mismatch detected → "Resolve before continuing."
326
392
  - Plan file checkboxes not updated after batch → "Update plan checkboxes and frontmatter before continuing"
393
+ - Scope expanding beyond plan → "Scope creep." → **Fallback: DECOMPOSE (re-run scope classification)**
394
+ - Error messages changing type across fixes → "Chasing symptoms, not root cause." → **Fallback: ESSENCE**
327
395
 
328
396
  **Goal Recitation** (prevents drift in long sessions):
329
397
  - At every batch boundary, re-read the plan file and confirm: "Current work aligns with: [original goal]"
330
398
  - If current work does not serve the original goal → STOP, report drift, return to plan
331
399
 
332
400
  **Thrashing Detector** (beyond simple edit counting):
333
- - Successive edits reverting previous changes (oscillation) → "Reverting own work. Wrong approach."
334
- - Scope of changes expanding beyond plan → "Scope creep. Return to DECOMPOSE."
335
- - Error messages changing type across fixes → "Chasing symptoms, not root cause. Back to ESSENCE."
401
+ - Successive edits reverting previous changes (oscillation) → "Reverting own work. Wrong approach." → **Fallback: ESSENCE**
336
402
 
337
403
  ### 4-5. Scope Guard
338
404