claude-prism 1.4.0 → 1.5.0
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.
- package/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +11 -0
- package/README.md +13 -2
- package/package.json +7 -3
- package/templates/commands/claude-prism/prism.md +13 -3
- package/templates/rules.md +43 -37
- package/templates/skills/prism/SKILL.md +13 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-prism",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"description": "AI agent harness implementing the EUDEC methodology",
|
|
5
5
|
"author": { "name": "lazysaturday91" },
|
|
6
6
|
"repository": "https://github.com/lazysaturday91/claude-prism",
|
|
7
7
|
"license": "MIT",
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ 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.5.0] — 2026-03-04
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **Adaptive Weight routing** — EUDEC path auto-scales by task size (Lightweight/Standard/Full)
|
|
12
|
+
- **Bugfix Fast Path** — 4-step lightweight path: symptom → cause → fix → verify (skips formal EUDEC)
|
|
13
|
+
- **Verification Fallback Ladder** simplified from 6 levels to 3 (Tests/Build/Diff)
|
|
14
|
+
- **Adaptive checkpoints** — frequency proportional to task weight (no pause for lightweight)
|
|
15
|
+
- **Rationalization Defense** compressed from 17 to 4 highest-impact items
|
|
16
|
+
- Section numbering corrected (4-8 moved after 4-7)
|
|
17
|
+
- Package description and keywords updated with "agent harness" positioning
|
|
18
|
+
|
|
8
19
|
## [1.4.0] — 2026-03-03
|
|
9
20
|
|
|
10
21
|
### Added
|
package/README.md
CHANGED
|
@@ -16,7 +16,12 @@
|
|
|
16
16
|
|
|
17
17
|
# claude-prism
|
|
18
18
|
|
|
19
|
-
**EUDEC methodology
|
|
19
|
+
**AI agent harness implementing the EUDEC methodology for reliable AI-assisted coding.**
|
|
20
|
+
|
|
21
|
+
Prism is an [agent harness](https://martinfowler.com/articles/exploring-gen-ai/harness-engineering.html) —
|
|
22
|
+
the infrastructure that channels AI coding agents toward correct, verified output.
|
|
23
|
+
It combines a behavioral methodology (EUDEC), deterministic hooks for enforcement,
|
|
24
|
+
session lifecycle automation, and adaptive process weight that scales with task complexity.
|
|
20
25
|
|
|
21
26
|
Installs the EUDEC methodology — **Essence, Understand, Decompose, Execute, Checkpoint** — directly into your project's Claude Code environment. Includes a session transition protocol (Handoff) that bookends the core cycle. Seven hooks enforce the methodology and automate session management.
|
|
22
27
|
|
|
@@ -75,10 +80,16 @@ Injected into `CLAUDE.md`, EUDEC is a behavioral framework that corrects how AI
|
|
|
75
80
|
- **Medium risk** (new components, API integration): Build + runtime check
|
|
76
81
|
- **Low risk** (imports, types, renaming): Build/lint passes
|
|
77
82
|
- **No test infra** (legacy PHP, WordPress): Grep-based static check + syntax validation
|
|
78
|
-
- Fallback:
|
|
83
|
+
- Fallback Ladder: Tests → Build → Diff (use highest available)
|
|
79
84
|
|
|
80
85
|
**Quality gates** between phases prevent executing on broken baselines.
|
|
81
86
|
|
|
87
|
+
**v1.5.0:**
|
|
88
|
+
- **Adaptive Weight**: EUDEC auto-scales — lightweight (1-2 files), standard, or full path
|
|
89
|
+
- **Bugfix Fast Path**: symptom → cause → fix → verify (skips formal EUDEC cycle)
|
|
90
|
+
- **Streamlined verification**: 3-level fallback ladder (Tests → Build → Diff)
|
|
91
|
+
- **Adaptive checkpoints**: no pause for small tasks, summary for medium, full for large
|
|
92
|
+
|
|
82
93
|
**New in v1.4.0:**
|
|
83
94
|
- **Native Claude Code plugin** — `claude plugin install claude-prism` for zero-config setup
|
|
84
95
|
- **4 new hook events** — PreCompact (auto-HANDOFF), SessionEnd (session protection), SubagentStart (scope injection), TaskCompleted (plan auto-update)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-prism",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"description": "AI agent harness implementing the EUDEC methodology — Essence, Understand, Decompose, Execute, Checkpoint.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"prism": "./bin/cli.mjs"
|
|
@@ -21,7 +21,11 @@
|
|
|
21
21
|
"claude-code-hooks",
|
|
22
22
|
"udec",
|
|
23
23
|
"eudec",
|
|
24
|
-
"ai-agent"
|
|
24
|
+
"ai-agent",
|
|
25
|
+
"harness-engineering",
|
|
26
|
+
"agent-harness",
|
|
27
|
+
"ai-harness",
|
|
28
|
+
"context-engineering"
|
|
25
29
|
],
|
|
26
30
|
"engines": {
|
|
27
31
|
"node": ">=18"
|
|
@@ -17,12 +17,22 @@ When this command is invoked, follow the EUDEC framework strictly:
|
|
|
17
17
|
|
|
18
18
|
| Essence Character | Type | Path |
|
|
19
19
|
|-------------------|------|------|
|
|
20
|
-
| "X is broken" | Bugfix |
|
|
20
|
+
| "X is broken" | Bugfix | Fast Path (below) |
|
|
21
21
|
| "X should be possible" | Feature | UNDERSTAND → DECOMPOSE → EXECUTE → CHECKPOINT |
|
|
22
22
|
| "All X must become Y" | Migration | UNDERSTAND → pattern → batch apply → verify |
|
|
23
23
|
| "X's structure must change" | Refactor | UNDERSTAND → DECOMPOSE → EXECUTE → CHECKPOINT |
|
|
24
24
|
| "Why does X happen?" | Investigation | explore → analyze → report |
|
|
25
25
|
|
|
26
|
+
2b. **Adaptive Weight** — select EUDEC path by task size:
|
|
27
|
+
|
|
28
|
+
| Weight | Criteria | Path |
|
|
29
|
+
|--------|----------|------|
|
|
30
|
+
| **Lightweight** | 1-2 files, <50 LOC, clear scope | Essence (1 line) → Execute → Verify → Done |
|
|
31
|
+
| **Standard** | 3-5 files, 50-200 LOC | Full EUDEC, summary checkpoints |
|
|
32
|
+
| **Full** | 6+ files, 200+ LOC, or unclear scope | Full EUDEC with plan file + full checkpoints |
|
|
33
|
+
|
|
34
|
+
Lightweight skips formal UNDERSTAND and DECOMPOSE. Bugfix fast path (regardless of file count): reproduce → root cause → minimal fix → verify (skips ESSENCE/UNDERSTAND/DECOMPOSE entirely).
|
|
35
|
+
|
|
26
36
|
## U — UNDERSTAND
|
|
27
37
|
|
|
28
38
|
3. **Explore first**: Read package.json, project structure, related files before asking anything
|
|
@@ -89,7 +99,7 @@ When this command is invoked, follow the EUDEC framework strictly:
|
|
|
89
99
|
- **Medium risk** (new components with logic, API integration): Build + lint pass
|
|
90
100
|
- **Low risk** (imports, types, style, renaming): Build/lint passes
|
|
91
101
|
- **No test infra** (legacy PHP, WordPress, etc.): Grep-based static check + syntax validation
|
|
92
|
-
-
|
|
102
|
+
- **Verification Fallback Ladder** (use highest available): Tests → Build → Diff
|
|
93
103
|
21. **Scope Guard**: Before each change, ask: "Was this requested?" If no → don't do it
|
|
94
104
|
22. **Goal Recitation**: At every batch boundary, re-read the plan and confirm: "Current work aligns with: [original goal]"
|
|
95
105
|
23. **Self-correction triggers (Thrashing Detector)**:
|
|
@@ -124,7 +134,7 @@ When this command is invoked, follow the EUDEC framework strictly:
|
|
|
124
134
|
|
|
125
135
|
28. **Plan-Reality sync**: Grep for plan targets, mark vanished targets as "already completed", add newly discovered targets.
|
|
126
136
|
29. Include: verification results, files modified, tests status
|
|
127
|
-
30. **Checkpoint policy
|
|
137
|
+
30. **Checkpoint policy** (proportional to weight): Lightweight — no pause, report with evidence. Standard — summary (1-2 lines). Full — full dashboard + "Continue?"
|
|
128
138
|
31. Ask: "Continue to next batch?"
|
|
129
139
|
32. User can redirect, adjust scope, or stop at any checkpoint
|
|
130
140
|
|
package/templates/rules.md
CHANGED
|
@@ -39,7 +39,7 @@ The task type naturally emerges from the essence:
|
|
|
39
39
|
|
|
40
40
|
| Essence Character | Type | Path |
|
|
41
41
|
|-------------------|------|------|
|
|
42
|
-
| "X is broken" | Bugfix |
|
|
42
|
+
| "X is broken" | Bugfix | Fast Path (1-5) |
|
|
43
43
|
| "X should be possible" | Feature | UNDERSTAND → DECOMPOSE → EXECUTE → CHECKPOINT |
|
|
44
44
|
| "All X must become Y" | Migration | UNDERSTAND → pattern → batch apply → verify |
|
|
45
45
|
| "X's structure must change" | Refactor | UNDERSTAND → DECOMPOSE → EXECUTE → CHECKPOINT |
|
|
@@ -66,6 +66,26 @@ Before moving to UNDERSTAND, verify:
|
|
|
66
66
|
- [ ] Each step in the expansion path works independently
|
|
67
67
|
- [ ] Task type has been clearly derived
|
|
68
68
|
|
|
69
|
+
### 1-5. Adaptive Weight (Task Size Routing)
|
|
70
|
+
|
|
71
|
+
After extracting essence and task type, assess task weight to select the appropriate EUDEC path:
|
|
72
|
+
|
|
73
|
+
| Weight | Criteria | Path |
|
|
74
|
+
|--------|----------|------|
|
|
75
|
+
| **Lightweight** | 1-2 files, <50 LOC, clear scope | Essence (1 line) → Execute → Verify → Done |
|
|
76
|
+
| **Standard** | 3-5 files, 50-200 LOC | Full EUDEC, summary checkpoints |
|
|
77
|
+
| **Full** | 6+ files, 200+ LOC, or unclear scope | Full EUDEC with plan file + full checkpoints |
|
|
78
|
+
|
|
79
|
+
**Lightweight path** skips formal UNDERSTAND (sufficiency assessment, question rounds, alignment confirmation) and DECOMPOSE. The essence statement still grounds the work but takes one line, not a full section.
|
|
80
|
+
|
|
81
|
+
**Bugfix fast path** (regardless of file count):
|
|
82
|
+
1. Reproduce the symptom
|
|
83
|
+
2. Trace to root cause
|
|
84
|
+
3. Minimal fix (smallest change that resolves the cause)
|
|
85
|
+
4. Verify (test/build/diff)
|
|
86
|
+
|
|
87
|
+
Bugfixes skip ESSENCE extraction, UNDERSTAND ceremony, and DECOMPOSE entirely. The 4-step debugging protocol (4-3) is the complete path.
|
|
88
|
+
|
|
69
89
|
---
|
|
70
90
|
|
|
71
91
|
## EUDEC 2. UNDERSTAND — Understanding Protocol
|
|
@@ -247,14 +267,11 @@ Choose verification proportional to the **risk of the change**, not the file pat
|
|
|
247
267
|
|
|
248
268
|
**Verification Fallback Ladder** (use highest available level):
|
|
249
269
|
|
|
250
|
-
| Level | Method |
|
|
251
|
-
|
|
252
|
-
| 1.
|
|
253
|
-
| 2.
|
|
254
|
-
| 3.
|
|
255
|
-
| 4. Lint/Static Analysis | No new warnings | Linter |
|
|
256
|
-
| 5. Smoke Check | App starts, key routes respond | curl, browser |
|
|
257
|
-
| 6. Manual Diff Review | `git diff` reviewed for regressions | git |
|
|
270
|
+
| Level | Method | When |
|
|
271
|
+
|-------|--------|------|
|
|
272
|
+
| 1. Tests | Automated tests (unit, integration, e2e) | Test infrastructure exists |
|
|
273
|
+
| 2. Build | Compiles + lint without new errors | No tests for this area |
|
|
274
|
+
| 3. Diff | `git diff` reviewed for regressions | No build tooling |
|
|
258
275
|
|
|
259
276
|
**Every change must have SOME verification.** If no tooling exists, `git diff` review is the minimum.
|
|
260
277
|
|
|
@@ -327,13 +344,6 @@ When delegating work to sub-agents:
|
|
|
327
344
|
|
|
328
345
|
**Never mark a delegated task as complete without reading the actual file state.**
|
|
329
346
|
|
|
330
|
-
### 4-8. Checkpoint Integration
|
|
331
|
-
|
|
332
|
-
Claude Code creates automatic checkpoints on every edit. Use `Esc+Esc` or `/rewind` to restore.
|
|
333
|
-
- Before risky changes: checkpoint exists automatically
|
|
334
|
-
- After failed batch: consider `/rewind` to restore clean state before retry
|
|
335
|
-
- Checkpoints complement Git-as-Memory: git for cross-session, checkpoints for intra-session
|
|
336
|
-
|
|
337
347
|
### 4-7. Project-Type Verification Examples
|
|
338
348
|
|
|
339
349
|
| Project Type | Syntax Check | Smoke Test | Approval Test |
|
|
@@ -343,6 +353,13 @@ Claude Code creates automatic checkpoints on every edit. Use `Esc+Esc` or `/rewi
|
|
|
343
353
|
| **Scripts/CLI** | Language syntax check | Run with known inputs, compare outputs | Capture stdout before/after |
|
|
344
354
|
| **Infra/Config** | `terraform plan`, `docker build` | Dry-run deploy | Compare plan output before/after |
|
|
345
355
|
|
|
356
|
+
### 4-8. Checkpoint Integration
|
|
357
|
+
|
|
358
|
+
Claude Code creates automatic checkpoints on every edit. Use `Esc+Esc` or `/rewind` to restore.
|
|
359
|
+
- Before risky changes: checkpoint exists automatically
|
|
360
|
+
- After failed batch: consider `/rewind` to restore clean state before retry
|
|
361
|
+
- Checkpoints complement Git-as-Memory: git for cross-session, checkpoints for intra-session
|
|
362
|
+
|
|
346
363
|
---
|
|
347
364
|
|
|
348
365
|
## EUDEC 5. CHECKPOINT — Confirmation Protocol
|
|
@@ -373,10 +390,12 @@ After each batch:
|
|
|
373
390
|
3. If new targets discovered → add to plan's "Risks / Open Questions"
|
|
374
391
|
4. Update plan file's `Codebase Audit` section with fresh counts
|
|
375
392
|
|
|
376
|
-
**Checkpoint frequency
|
|
377
|
-
- **
|
|
378
|
-
- **
|
|
379
|
-
- **
|
|
393
|
+
**Checkpoint frequency** (proportional to task weight):
|
|
394
|
+
- **Lightweight tasks**: no checkpoint pause — report completion with evidence
|
|
395
|
+
- **Standard tasks**: summary checkpoint (1-2 lines: what done, verification result, next)
|
|
396
|
+
- **Full tasks**: full checkpoint with progress dashboard + "Continue?"
|
|
397
|
+
- **Phase boundary**: always stop (mandatory, all weights)
|
|
398
|
+
- **Blocker encountered**: always stop (mandatory, all weights)
|
|
380
399
|
|
|
381
400
|
**Progress dashboard:**
|
|
382
401
|
```
|
|
@@ -456,27 +475,14 @@ When a session starts:
|
|
|
456
475
|
|
|
457
476
|
## 7. Rationalization Defense
|
|
458
477
|
|
|
459
|
-
If any of these
|
|
478
|
+
If any of these come to mind, **stop and return to principles**:
|
|
460
479
|
|
|
461
480
|
| Excuse | Reality |
|
|
462
481
|
|--------|---------|
|
|
463
|
-
| "Too simple to decompose" | 3+ files = always decompose (unless migration type) |
|
|
464
|
-
| "Don't want to bother the user" | If vague, must ask. No guessing |
|
|
465
|
-
| "I'll add tests later" | Tests come first for high-risk changes |
|
|
466
|
-
| "Just this once" | No exceptions |
|
|
467
|
-
| "User said to proceed" | One approval ≠ unlimited delegation |
|
|
468
482
|
| "I know what they mean" | Verify. Assumption is the root of all bugs |
|
|
469
|
-
| "While I'm here, let me also..." | Scope creep.
|
|
470
|
-
| "
|
|
471
|
-
| "
|
|
472
|
-
| "The existing code is messy anyway" | Fix what was asked. Note the rest for later |
|
|
473
|
-
| "The plan says 0% so we start fresh" | Grep the codebase. Prior work may already exist |
|
|
474
|
-
| "Other plans won't conflict" | Check `.prism/plans/` for overlapping files |
|
|
475
|
-
| "Tests pass, so it must be correct" | Passing tests only prove what you tested. Check edge cases and negative cases |
|
|
476
|
-
| "3 files is too few to decompose" | Depends on coupling. 2 files in a tightly-coupled legacy system may need decomposition |
|
|
477
|
-
| "I already grasped the essence" | If the essence statement contains technology names, it's still at solution level |
|
|
478
|
-
| "No need to simplify, just implement" | Starting without a minimal case drowns you in complexity |
|
|
479
|
-
| "Expansion path can wait" | Without expansion direction, the minimal case becomes a dead end |
|
|
483
|
+
| "While I'm here, let me also..." | Scope creep. Note it for later, stay on task |
|
|
484
|
+
| "Too simple to decompose" | Check file count and coupling. Simple ≠ small |
|
|
485
|
+
| "I'll add tests later" | High-risk changes: tests come first. No exceptions |
|
|
480
486
|
|
|
481
487
|
## 8. Completion Declaration Rules
|
|
482
488
|
|
|
@@ -47,12 +47,22 @@ AI agents optimize for speed, not correctness. Without structure, they skip unde
|
|
|
47
47
|
|
|
48
48
|
| Essence Character | Type | Path |
|
|
49
49
|
|-------------------|------|------|
|
|
50
|
-
| "X is broken" | Bugfix |
|
|
50
|
+
| "X is broken" | Bugfix | Fast Path (below) |
|
|
51
51
|
| "X should be possible" | Feature | UNDERSTAND → DECOMPOSE → EXECUTE → CHECKPOINT |
|
|
52
52
|
| "All X must become Y" | Migration | UNDERSTAND → pattern → batch apply → verify |
|
|
53
53
|
| "X's structure must change" | Refactor | UNDERSTAND → DECOMPOSE → EXECUTE → CHECKPOINT |
|
|
54
54
|
| "Why does X happen?" | Investigation | explore → analyze → report |
|
|
55
55
|
|
|
56
|
+
2b. **Adaptive Weight** — select EUDEC path by task size:
|
|
57
|
+
|
|
58
|
+
| Weight | Criteria | Path |
|
|
59
|
+
|--------|----------|------|
|
|
60
|
+
| **Lightweight** | 1-2 files, <50 LOC, clear scope | Essence (1 line) → Execute → Verify → Done |
|
|
61
|
+
| **Standard** | 3-5 files, 50-200 LOC | Full EUDEC, summary checkpoints |
|
|
62
|
+
| **Full** | 6+ files, 200+ LOC, or unclear scope | Full EUDEC with plan file + full checkpoints |
|
|
63
|
+
|
|
64
|
+
Lightweight skips formal UNDERSTAND and DECOMPOSE. Bugfix fast path (regardless of file count): reproduce → root cause → minimal fix → verify (skips ESSENCE/UNDERSTAND/DECOMPOSE entirely).
|
|
65
|
+
|
|
56
66
|
## U — UNDERSTAND
|
|
57
67
|
|
|
58
68
|
3. **Explore first**: Read package.json, project structure, related files before asking anything
|
|
@@ -119,7 +129,7 @@ AI agents optimize for speed, not correctness. Without structure, they skip unde
|
|
|
119
129
|
- **Medium risk** (new components with logic, API integration): Build + lint pass
|
|
120
130
|
- **Low risk** (imports, types, style, renaming): Build/lint passes
|
|
121
131
|
- **No test infra** (legacy PHP, WordPress, etc.): Grep-based static check + syntax validation
|
|
122
|
-
-
|
|
132
|
+
- **Verification Fallback Ladder** (use highest available): Tests → Build → Diff
|
|
123
133
|
21. **Scope Guard**: Before each change, ask: "Was this requested?" If no → don't do it
|
|
124
134
|
22. **Goal Recitation**: At every batch boundary, re-read the plan and confirm: "Current work aligns with: [original goal]"
|
|
125
135
|
23. **Self-correction triggers (Thrashing Detector)**:
|
|
@@ -154,7 +164,7 @@ AI agents optimize for speed, not correctness. Without structure, they skip unde
|
|
|
154
164
|
|
|
155
165
|
28. **Plan-Reality sync**: Grep for plan targets, mark vanished targets as "already completed", add newly discovered targets.
|
|
156
166
|
29. Include: verification results, files modified, tests status
|
|
157
|
-
30. **Checkpoint policy
|
|
167
|
+
30. **Checkpoint policy** (proportional to weight): Lightweight — no pause, report with evidence. Standard — summary (1-2 lines). Full — full dashboard + "Continue?"
|
|
158
168
|
31. Ask: "Continue to next batch?"
|
|
159
169
|
32. User can redirect, adjust scope, or stop at any checkpoint
|
|
160
170
|
|