claude-prism 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +32 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,6 +9,7 @@
9
9
  [![npm version](https://img.shields.io/npm/v/claude-prism)](https://www.npmjs.com/package/claude-prism)
10
10
  [![license](https://img.shields.io/npm/l/claude-prism)](https://github.com/lazysaturday91/claude-prism/blob/main/LICENSE)
11
11
  [![node](https://img.shields.io/node/v/claude-prism)](https://nodejs.org)
12
+ [![CI](https://github.com/lazysaturday91/claude-prism/actions/workflows/ci.yml/badge.svg)](https://github.com/lazysaturday91/claude-prism/actions/workflows/ci.yml)
12
13
 
13
14
  > `ai-coding` · `methodology` · `udec` · `claude-code`
14
15
 
@@ -26,9 +27,9 @@ AI coding agents fail in predictable ways:
26
27
  |---|---|---|
27
28
  | Skip understanding | Builds the wrong thing for 30 minutes | UNDERSTAND phase |
28
29
  | No decomposition | One massive change that's hard to review | DECOMPOSE into verifiable batches |
29
- | No verification | "should work" without evidence | Risk-based verification strategy |
30
- | Scope creep | "While I'm here..." changes nobody asked for | Scope Guard in methodology |
31
- | Context loss | New session = start from scratch | HANDOFF protocol |
30
+ | No verification | "should work" without evidence | Risk-based verification + Fallback Ladder |
31
+ | Scope creep | "While I'm here..." changes nobody asked for | Scope Guard + Thrashing Detector |
32
+ | Context loss | New session = start from scratch | HANDOFF + Project Memory |
32
33
 
33
34
  **The biggest failure mode of AI coding isn't bad code — it's building the wrong thing.**
34
35
 
@@ -38,7 +39,7 @@ AI coding agents fail in predictable ways:
38
39
 
39
40
  ## What Prism Provides
40
41
 
41
- ### 1. UDEC v2 Methodology (the core product)
42
+ ### 1. UDEC v3 Methodology (the core product)
42
43
 
43
44
  Injected into `CLAUDE.md`, UDEC is a behavioral framework that corrects how AI agents approach tasks:
44
45
 
@@ -48,26 +49,30 @@ Injected into `CLAUDE.md`, UDEC is a behavioral framework that corrects how AI a
48
49
 
49
50
  ┌─────────────────── UDEC Core Cycle ───────────────────┐
50
51
  │ UNDERSTAND ── Sufficiency assessment → ask → align │
51
- │ │
52
- │ DECOMPOSE ── Batches → plan file for 6+ files [S][M][L]
53
- │ │
52
+ │ │ Environment validation
53
+ │ DECOMPOSE ── Batches → plan file → quality gate
54
+ │ │ Codebase audit → cross-plan check
54
55
  │ EXECUTE ── Adaptive batches → risk-based verification │
55
- │ │
56
- │ CHECKPOINT ── Report with evidence → get approval ─────┤
56
+ │ │ Goal recitation → thrashing detection
57
+ │ CHECKPOINT ── Report with evidence → plan-reality sync
57
58
  │ (loops back for next batch) │
58
59
  └────────────────────────────────────────────────────────┘
59
60
 
60
61
 
61
- HANDOFF ── Session transition doc next steps
62
+ HANDOFF ── Session transition doc + Project Memory
62
63
  (exit protocol)
63
64
  ```
64
65
 
65
66
  **Task-type aware**: Each task type (bugfix, feature, migration, refactor, investigation) follows a different optimal path. Migrations skip per-file decomposition. Bugfixes skip straight to locate-fix-verify. Investigations skip decomposition entirely.
66
67
 
67
- **Risk-based verification**: Verification matches the risk of the change, not the file path:
68
- - **High risk** (business logic, auth, state machines): TDD required
68
+ **Risk-based verification** with Fallback Ladder:
69
+ - **High risk** (business logic, auth, state machines): TDD required + negative tests
69
70
  - **Medium risk** (new components, API integration): Build + runtime check
70
71
  - **Low risk** (imports, types, renaming): Build/lint passes
72
+ - **No test infra** (legacy PHP, WordPress): Grep-based static check + syntax validation
73
+ - Fallback: Automated Tests → Approval Testing → Build → Lint → Smoke Check → Manual Diff
74
+
75
+ **Quality gates** between phases prevent executing on broken baselines.
71
76
 
72
77
  ### 2. Three Focused Hooks
73
78
 
@@ -86,13 +91,23 @@ Hooks enforce the methodology at critical points. All three are deterministic (n
86
91
  | Command | Purpose |
87
92
  |---------|---------|
88
93
  | `/claude-prism:prism` | Run full UDEC cycle |
89
- | `/claude-prism:checkpoint` | Check batch progress |
94
+ | `/claude-prism:checkpoint` | Check batch progress with plan-reality sync |
90
95
  | `/claude-prism:plan` | List/create/view plan files |
96
+ | `/claude-prism:analytics` | Show usage analytics (blocks, warns, tests) |
91
97
  | `/claude-prism:doctor` | Diagnose installation health |
92
98
  | `/claude-prism:stats` | Version, hooks, plan count |
93
99
  | `/claude-prism:update` | Update to latest version |
94
100
  | `/claude-prism:help` | Command reference |
95
101
 
102
+ ### 4. Analytics
103
+
104
+ Hook events (blocks, warnings) are automatically logged to session files. View aggregated statistics:
105
+
106
+ ```bash
107
+ prism analytics # Summary across all sessions
108
+ prism analytics --detail # Include per-session breakdown
109
+ ```
110
+
96
111
  ## Installation
97
112
 
98
113
  ```bash
@@ -109,7 +124,7 @@ your-project/
109
124
  ├── CLAUDE.md # UDEC methodology injected
110
125
  ├── .claude-prism.json # Hook configuration
111
126
  ├── .claude/
112
- │ ├── commands/claude-prism/ # 7 slash commands
127
+ │ ├── commands/claude-prism/ # 8 slash commands
113
128
  │ ├── hooks/ # pre-tool.mjs, post-tool.mjs
114
129
  │ ├── rules/ # commit-guard, test-tracker, plan-enforcement
115
130
  │ ├── lib/ # Shared dependencies
@@ -123,6 +138,7 @@ Edit `.claude-prism.json`:
123
138
 
124
139
  ```json
125
140
  {
141
+ "version": 1,
126
142
  "hooks": {
127
143
  "commit-guard": { "enabled": true, "maxTestAge": 300 },
128
144
  "test-tracker": { "enabled": true },
@@ -133,6 +149,7 @@ Edit `.claude-prism.json`:
133
149
 
134
150
  | Setting | Default | Description |
135
151
  |---------|---------|-------------|
152
+ | `version` | 1 | Config schema version (for future migrations) |
136
153
  | `commit-guard.maxTestAge` | 300 | Seconds before test run is considered stale |
137
154
  | `plan-enforcement.warnAt` | 6 | Unique source file count that triggers plan warning |
138
155
 
@@ -143,6 +160,7 @@ prism init [--no-hooks] [--global] [--dry-run] # Install
143
160
  prism check [--ci] # Verify installation
144
161
  prism doctor # Diagnose issues
145
162
  prism stats # Installation summary
163
+ prism analytics [--detail] # Usage analytics
146
164
  prism reset # Clear hook state
147
165
  prism update [--global] # Update to latest
148
166
  prism uninstall [--global] # Remove
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-prism",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "UDEC methodology framework for AI coding agents — Understand, Decompose, Execute, Checkpoint.",
5
5
  "type": "module",
6
6
  "bin": {