@claude-pw/framework 0.6.1 → 0.8.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/README.es.md +2 -1
- package/README.ja.md +2 -1
- package/README.md +2 -1
- package/README.pt-br.md +2 -1
- package/README.zh-cn.md +2 -1
- package/install.js +2 -2
- package/package.json +1 -1
- package/templates/claude/agents/code-reviewer.md +77 -0
- package/templates/claude/agents/codebase-mapper.md +39 -0
- package/templates/claude/agents/debugger.md +1 -0
- package/templates/claude/agents/decision-impact.md +1 -0
- package/templates/claude/agents/implementer.md +1 -0
- package/templates/claude/agents/interface-reviewer.md +1 -0
- package/templates/claude/agents/learning-extractor.md +2 -0
- package/templates/claude/agents/plan-checker.md +1 -0
- package/templates/claude/agents/researcher.md +6 -5
- package/templates/claude/agents/spike-explorer.md +1 -0
- package/templates/claude/commands/cpw-next-step.md +1 -1
package/README.es.md
CHANGED
|
@@ -129,7 +129,7 @@ Issue capturado. ¿Arreglar ahora? (sí/no)
|
|
|
129
129
|
|---------|----------|
|
|
130
130
|
| `/cpw-startup` | Sesión de discovery — detecta modo, entrevista, genera plan |
|
|
131
131
|
| `/cpw-discuss` | Captura preferencias y resuelve ambigüedades antes de construir |
|
|
132
|
-
| `/cpw-next-step` | Ejecuta pipeline, cierra pasos, valida fases, corre UAT |
|
|
132
|
+
| `/cpw-next-step` | Ejecuta pipeline, cierra pasos, valida fases, corre UAT (`--phase` para planear + auto-avanzar toda la fase) |
|
|
133
133
|
| `/cpw-pause` | Guarda estado de sesión para retomar después |
|
|
134
134
|
| `/cpw-quick` | Tarea ad-hoc fuera del pipeline (detección de scope-creep, `--auto`) |
|
|
135
135
|
| `/cpw-debug` | Sesión de debug persistente — sobrevive resets de contexto |
|
|
@@ -137,6 +137,7 @@ Issue capturado. ¿Arreglar ahora? (sí/no)
|
|
|
137
137
|
| `/cpw-todos` | Captura ideas para después o revisa todos pendientes |
|
|
138
138
|
| `/cpw-reflect` | Revisa correcciones capturadas, convierte en learnings (`--scan-history`, `--dedupe`) |
|
|
139
139
|
| `/cpw-impact` | Analiza impacto de decisiones en todo el plan |
|
|
140
|
+
| `/cpw-update` | Actualización inteligente del framework — diff, merge de conflictos, preserva customizaciones |
|
|
140
141
|
|
|
141
142
|
## Configuración
|
|
142
143
|
|
package/README.ja.md
CHANGED
|
@@ -129,7 +129,7 @@ Issue captured. Fix now? (yes/no)
|
|
|
129
129
|
|---------|-------------|
|
|
130
130
|
| `/cpw-startup` | ディスカバリーセッション — モード検出、インタビュー、計画生成 |
|
|
131
131
|
| `/cpw-discuss` | ビルド前に好みの把握と曖昧さの解消 |
|
|
132
|
-
| `/cpw-next-step` | パイプライン実行、ステップクローズ、フェーズバリデーション、UAT
|
|
132
|
+
| `/cpw-next-step` | パイプライン実行、ステップクローズ、フェーズバリデーション、UAT 実行(`--phase` でフェーズ全体を計画 + 自動実行)|
|
|
133
133
|
| `/cpw-pause` | セッション状態を保存して後で再開 |
|
|
134
134
|
| `/cpw-quick` | パイプライン外のアドホックタスク(スコープクリープ検出、`--auto`) |
|
|
135
135
|
| `/cpw-debug` | 永続デバッグセッション — コンテキストリセット後も継続 |
|
|
@@ -137,6 +137,7 @@ Issue captured. Fix now? (yes/no)
|
|
|
137
137
|
| `/cpw-todos` | アイデアの記録または保留中の TODO の確認 |
|
|
138
138
|
| `/cpw-reflect` | キャプチャした修正をレビューし、学習に変換(`--scan-history`, `--dedupe`) |
|
|
139
139
|
| `/cpw-impact` | 計画全体にわたる意思決定の影響分析 |
|
|
140
|
+
| `/cpw-update` | スマートフレームワーク更新 — 差分、コンフリクトマージ、カスタマイズ保持 |
|
|
140
141
|
|
|
141
142
|
## 設定
|
|
142
143
|
|
package/README.md
CHANGED
|
@@ -129,7 +129,7 @@ Issue captured. Fix now? (yes/no)
|
|
|
129
129
|
|---------|-------------|
|
|
130
130
|
| `/cpw-startup` | Discovery session — detect mode, interview, generate plan |
|
|
131
131
|
| `/cpw-discuss` | Capture preferences and resolve ambiguities before building |
|
|
132
|
-
| `/cpw-next-step` | Execute pipeline, close steps, validate phases, run UAT |
|
|
132
|
+
| `/cpw-next-step` | Execute pipeline, close steps, validate phases, run UAT (`--phase` to plan + auto-advance entire phase) |
|
|
133
133
|
| `/cpw-pause` | Save session state for later resume |
|
|
134
134
|
| `/cpw-quick` | Ad-hoc task outside the pipeline (scope-creep detection, `--auto`) |
|
|
135
135
|
| `/cpw-debug` | Persistent debug session — survives context resets |
|
|
@@ -137,6 +137,7 @@ Issue captured. Fix now? (yes/no)
|
|
|
137
137
|
| `/cpw-todos` | Capture ideas for later or review pending todos |
|
|
138
138
|
| `/cpw-reflect` | Review captured corrections, convert to learnings (`--scan-history`, `--dedupe`) |
|
|
139
139
|
| `/cpw-impact` | Analyze decision impact across the entire plan |
|
|
140
|
+
| `/cpw-update` | Smart framework update — diff, merge conflicts, preserve customizations |
|
|
140
141
|
|
|
141
142
|
## Configuration
|
|
142
143
|
|
package/README.pt-br.md
CHANGED
|
@@ -129,7 +129,7 @@ Issue captured. Fix now? (yes/no)
|
|
|
129
129
|
|---------|-----------|
|
|
130
130
|
| `/cpw-startup` | Sessão de descoberta — detectar modo, entrevistar, gerar plano |
|
|
131
131
|
| `/cpw-discuss` | Capturar preferências e resolver ambiguidades antes de construir |
|
|
132
|
-
| `/cpw-next-step` | Executar pipeline, fechar etapas, validar fases, executar UAT |
|
|
132
|
+
| `/cpw-next-step` | Executar pipeline, fechar etapas, validar fases, executar UAT (`--phase` para planejar + auto-avançar toda a fase) |
|
|
133
133
|
| `/cpw-pause` | Salvar estado da sessão para retomar depois |
|
|
134
134
|
| `/cpw-quick` | Tarefa avulsa fora do pipeline (detecção de scope-creep, `--auto`) |
|
|
135
135
|
| `/cpw-debug` | Sessão de debug persistente — sobrevive a resets de contexto |
|
|
@@ -137,6 +137,7 @@ Issue captured. Fix now? (yes/no)
|
|
|
137
137
|
| `/cpw-todos` | Capturar ideias para depois ou revisar todos pendentes |
|
|
138
138
|
| `/cpw-reflect` | Revisar correções capturadas, converter em aprendizados (`--scan-history`, `--dedupe`) |
|
|
139
139
|
| `/cpw-impact` | Analisar impacto de decisões em todo o plano |
|
|
140
|
+
| `/cpw-update` | Atualização inteligente do framework — diff, merge de conflitos, preserva customizações |
|
|
140
141
|
|
|
141
142
|
## Configuração
|
|
142
143
|
|
package/README.zh-cn.md
CHANGED
|
@@ -129,7 +129,7 @@ UAT 演练:
|
|
|
129
129
|
|------|------|
|
|
130
130
|
| `/cpw-startup` | 发现会话——检测模式、访谈、生成计划 |
|
|
131
131
|
| `/cpw-discuss` | 构建前捕获偏好和解决歧义 |
|
|
132
|
-
| `/cpw-next-step` | 执行流水线、关闭步骤、验证阶段、运行 UAT
|
|
132
|
+
| `/cpw-next-step` | 执行流水线、关闭步骤、验证阶段、运行 UAT(`--phase` 规划 + 自动推进整个阶段)|
|
|
133
133
|
| `/cpw-pause` | 保存会话状态以便稍后恢复 |
|
|
134
134
|
| `/cpw-quick` | 流水线外的临时任务(范围蔓延检测、`--auto`) |
|
|
135
135
|
| `/cpw-debug` | 持久化调试会话——跨上下文重置存活 |
|
|
@@ -137,6 +137,7 @@ UAT 演练:
|
|
|
137
137
|
| `/cpw-todos` | 捕获想法或查看待办事项 |
|
|
138
138
|
| `/cpw-reflect` | 审查捕获的修正,转化为学习成果(`--scan-history`、`--dedupe`) |
|
|
139
139
|
| `/cpw-impact` | 分析决策对整个计划的影响 |
|
|
140
|
+
| `/cpw-update` | 智能框架更新 — 差异对比、冲突合并、保留自定义 |
|
|
140
141
|
|
|
141
142
|
## 配置
|
|
142
143
|
|
package/install.js
CHANGED
|
@@ -117,13 +117,13 @@ function applyModelProfile(agentsDir, configFile) {
|
|
|
117
117
|
'phase-validator': 'opus', 'session-recovery': 'opus', debugger: 'opus',
|
|
118
118
|
researcher: 'opus', 'codebase-mapper': 'opus', 'plan-checker': 'opus',
|
|
119
119
|
'spike-explorer': 'opus', 'decision-impact': 'opus', 'interface-reviewer': 'opus',
|
|
120
|
-
'learning-extractor': 'opus', implementer: 'opus',
|
|
120
|
+
'learning-extractor': 'opus', implementer: 'opus', 'code-reviewer': 'opus',
|
|
121
121
|
},
|
|
122
122
|
budget: {
|
|
123
123
|
'phase-validator': 'sonnet', 'session-recovery': 'haiku', debugger: 'haiku',
|
|
124
124
|
researcher: 'sonnet', 'codebase-mapper': 'haiku', 'plan-checker': 'haiku',
|
|
125
125
|
'spike-explorer': 'haiku', 'decision-impact': 'haiku', 'interface-reviewer': 'haiku',
|
|
126
|
-
'learning-extractor': 'haiku', implementer: 'sonnet',
|
|
126
|
+
'learning-extractor': 'haiku', implementer: 'sonnet', 'code-reviewer': 'sonnet',
|
|
127
127
|
},
|
|
128
128
|
};
|
|
129
129
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-reviewer
|
|
3
|
+
description: Code review — security, quality, performance, conventions compliance
|
|
4
|
+
tools: Read, Glob, Grep, Bash
|
|
5
|
+
model: sonnet
|
|
6
|
+
memory: project
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
> **Mandatory Initial Read**: If your prompt contains a `<files_to_read>` block, you MUST read every listed file before any other action. Skip files marked `(if exists)` when absent. This is your primary context.
|
|
10
|
+
|
|
11
|
+
## Pipeline Context
|
|
12
|
+
|
|
13
|
+
### Called by
|
|
14
|
+
- `/cpw-next-step` ACCEPTANCE stage (optional — when step involves significant code changes)
|
|
15
|
+
- User directly for ad-hoc reviews
|
|
16
|
+
|
|
17
|
+
### Output consumed by
|
|
18
|
+
- `/cpw-next-step` includes review findings in ACCEPTANCE summary
|
|
19
|
+
- User reads directly for ad-hoc reviews
|
|
20
|
+
|
|
21
|
+
Report problems only. If everything is clean: "Review passed."
|
|
22
|
+
|
|
23
|
+
## Project Context
|
|
24
|
+
After mandatory read, check `docs/conventions.md` and `.claude/rules/` for project-specific standards to enforce.
|
|
25
|
+
|
|
26
|
+
## Review dimensions
|
|
27
|
+
|
|
28
|
+
### 1. Security (check first)
|
|
29
|
+
- Input validation on all external data
|
|
30
|
+
- No hardcoded secrets, tokens, or credentials
|
|
31
|
+
- SQL/NoSQL injection vectors
|
|
32
|
+
- XSS in rendered output
|
|
33
|
+
- Auth/authz on protected routes
|
|
34
|
+
- Sensitive data exposure in logs or errors
|
|
35
|
+
|
|
36
|
+
### 2. Correctness
|
|
37
|
+
- Logic matches the design intent
|
|
38
|
+
- Edge cases handled (null, empty, boundary values)
|
|
39
|
+
- Error handling: no silent failures, errors propagated or logged
|
|
40
|
+
- Resource cleanup (connections, file handles, timers)
|
|
41
|
+
|
|
42
|
+
### 3. Performance
|
|
43
|
+
- No N+1 queries or unbounded loops
|
|
44
|
+
- Appropriate use of indexes, caching, pagination
|
|
45
|
+
- No unnecessary re-renders or re-computations
|
|
46
|
+
- Async operations where I/O bound
|
|
47
|
+
|
|
48
|
+
### 4. Conventions compliance
|
|
49
|
+
- Follows `docs/conventions.md` if it exists
|
|
50
|
+
- Follows `.claude/rules/*.md` patterns
|
|
51
|
+
- Consistent naming, structure, error handling with rest of codebase
|
|
52
|
+
- No `any` / `unknown` without justification (TypeScript)
|
|
53
|
+
|
|
54
|
+
### 5. Test coverage
|
|
55
|
+
- New code has corresponding tests
|
|
56
|
+
- Edge cases tested
|
|
57
|
+
- Tests are meaningful (not just coverage theater)
|
|
58
|
+
|
|
59
|
+
## Output format
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
## Code Review
|
|
63
|
+
|
|
64
|
+
### Critical (must fix)
|
|
65
|
+
- [file:line] [description]
|
|
66
|
+
|
|
67
|
+
### Warnings (should fix)
|
|
68
|
+
- [file:line] [description]
|
|
69
|
+
|
|
70
|
+
### Suggestions (nice to have)
|
|
71
|
+
- [file:line] [description]
|
|
72
|
+
|
|
73
|
+
### Passed
|
|
74
|
+
- [what was checked and found clean]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
If no issues found in a category, omit it. If all clean: "Review passed."
|
|
@@ -3,6 +3,7 @@ name: codebase-mapper
|
|
|
3
3
|
description: Analyzes existing codebase and produces structured documentation
|
|
4
4
|
tools: Read, Glob, Grep, Bash
|
|
5
5
|
model: sonnet
|
|
6
|
+
memory: project
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
You analyze an existing codebase to document its current state.
|
|
@@ -24,6 +25,9 @@ You analyze an existing codebase to document its current state.
|
|
|
24
25
|
| `## Conventions` | `docs/conventions.md` | Code style rules for the project |
|
|
25
26
|
| `## Integrations` | `docs/architecture.md` | Dependency mapping |
|
|
26
27
|
| `## Concerns` | `docs/tech-debt.md` | Bluefield rewrite prioritization |
|
|
28
|
+
| `## Dependencies` | `docs/architecture.md` | Dependency audit, upgrade planning |
|
|
29
|
+
| `## Patterns` | `docs/architecture.md` | Architecture decisions |
|
|
30
|
+
| `## Dev Workflow` | `docs/tooling.md` | Makefile generation, onboarding |
|
|
27
31
|
|
|
28
32
|
Use the exact section headers above — the startup command parses them by name.
|
|
29
33
|
|
|
@@ -76,6 +80,22 @@ Scan wide, read selectively. Do NOT read every file — use Glob/Grep to identif
|
|
|
76
80
|
- Identify services: databases, caches, message queues, cloud services
|
|
77
81
|
- Result: list of integrations with type and usage
|
|
78
82
|
|
|
83
|
+
### 5.5 Dependency analysis
|
|
84
|
+
- Identify top 10 significant dependencies (skip types packages and basic utils)
|
|
85
|
+
- For each: what it does in THIS project's context, not generic description
|
|
86
|
+
- Flag version constraints that matter (e.g., React 18 vs 19, Next.js 14 vs 15)
|
|
87
|
+
- Note unusual or custom packages (anything not widely known)
|
|
88
|
+
- Result: dependency table with role and notes
|
|
89
|
+
|
|
90
|
+
### 5.7 Pattern recognition
|
|
91
|
+
Detect these patterns if present:
|
|
92
|
+
- **Monorepo**: packages/, apps/, turbo.json, pnpm-workspace.yaml, lerna.json
|
|
93
|
+
- **State management**: Redux, Zustand, Jotai, Pinia, MobX, Context API
|
|
94
|
+
- **Auth**: NextAuth, Clerk, Auth0, Supabase Auth, custom JWT
|
|
95
|
+
- **Deployment**: vercel.json, netlify.toml, fly.toml, Dockerfile, k8s/
|
|
96
|
+
- **Data flow**: trace how data moves from user action → API → database → response
|
|
97
|
+
- Result: list of detected patterns with confidence
|
|
98
|
+
|
|
79
99
|
### 6. Concerns and technical debt
|
|
80
100
|
- Search for: TODO, FIXME, HACK, XXX, TEMP in the code
|
|
81
101
|
- Identify large files (>400 lines)
|
|
@@ -109,6 +129,25 @@ The /cpw-startup command handles splitting it into docs/ files.
|
|
|
109
129
|
## Integrations
|
|
110
130
|
[table: name, type, usage]
|
|
111
131
|
|
|
132
|
+
## Dependencies
|
|
133
|
+
| Package | Role in project | Version | Notes |
|
|
134
|
+
|---------|----------------|---------|-------|
|
|
135
|
+
[top 10 significant deps]
|
|
136
|
+
|
|
137
|
+
## Patterns
|
|
138
|
+
- Monorepo: [yes/no — tool if yes]
|
|
139
|
+
- State: [library or "none"]
|
|
140
|
+
- Auth: [approach]
|
|
141
|
+
- Deploy: [target]
|
|
142
|
+
- Data flow: [user → API → DB → response summary]
|
|
143
|
+
|
|
144
|
+
## Dev Workflow
|
|
145
|
+
- Install: [command]
|
|
146
|
+
- Dev: [command]
|
|
147
|
+
- Test: [command]
|
|
148
|
+
- Build: [command]
|
|
149
|
+
- Deploy: [command or "manual"]
|
|
150
|
+
|
|
112
151
|
## Concerns
|
|
113
152
|
[prioritized list with location]
|
|
114
153
|
```
|
|
@@ -3,6 +3,7 @@ name: decision-impact
|
|
|
3
3
|
description: Impact of a decision on the entire plan
|
|
4
4
|
tools: Read, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
6
|
+
maxTurns: 10
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
> **Mandatory Initial Read**: If your prompt contains a `<files_to_read>` block, you MUST read every listed file before any other action. Skip files marked `(if exists)` when absent. This is your primary context.
|
|
@@ -3,6 +3,7 @@ name: implementer
|
|
|
3
3
|
description: Implements approved design and runs tests in fresh context — keeps orchestrator lean
|
|
4
4
|
tools: Read, Glob, Grep, Bash, Write, Edit
|
|
5
5
|
model: sonnet
|
|
6
|
+
maxTurns: 50
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
You receive an approved design and implement it with a fresh context window.
|
|
@@ -3,6 +3,7 @@ name: interface-reviewer
|
|
|
3
3
|
description: Interface consistency
|
|
4
4
|
tools: Read, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
6
|
+
maxTurns: 10
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
> **Mandatory Initial Read**: If your prompt contains a `<files_to_read>` block, you MUST read every listed file before any other action. Skip files marked `(if exists)` when absent. This is your primary context.
|
|
@@ -3,6 +3,8 @@ name: learning-extractor
|
|
|
3
3
|
description: Analyzes session corrections and extracts actionable learnings
|
|
4
4
|
tools: Read, Glob, Grep
|
|
5
5
|
model: haiku
|
|
6
|
+
memory: project
|
|
7
|
+
maxTurns: 5
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
Your job: decide if a correction is a generalizable learning and where it should live.
|
|
@@ -3,6 +3,7 @@ name: plan-checker
|
|
|
3
3
|
description: Project status without polluting context
|
|
4
4
|
tools: Read, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
6
|
+
maxTurns: 5
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
> **Mandatory Initial Read**: If your prompt contains a `<files_to_read>` block, you MUST read every listed file before any other action. Skip files marked `(if exists)` when absent. This is your primary context.
|
|
@@ -49,10 +49,11 @@ When asked to evaluate options:
|
|
|
49
49
|
- Search top 3-5 options in npm/pypi/crates/etc.
|
|
50
50
|
- For each one evaluate:
|
|
51
51
|
- Maintenance: last release, commit frequency, open issues
|
|
52
|
-
- Popularity: downloads, stars
|
|
52
|
+
- Popularity: downloads, stars, community size
|
|
53
53
|
- API: quality, documentation, examples
|
|
54
54
|
- Size: bundle size, transitive dependencies
|
|
55
55
|
- License: compatible?
|
|
56
|
+
- Community: adoption trends, known issues, expert opinions
|
|
56
57
|
- Recommend one with justification
|
|
57
58
|
|
|
58
59
|
### 2. Architecture/patterns
|
|
@@ -79,17 +80,17 @@ Context: [what decision this research feeds]
|
|
|
79
80
|
Type: [library | architecture | feasibility]
|
|
80
81
|
|
|
81
82
|
## Findings
|
|
82
|
-
[concrete findings with data]
|
|
83
|
+
[concrete findings with data — mark each as HIGH/MEDIUM/LOW confidence]
|
|
83
84
|
|
|
84
85
|
## Options (if applicable)
|
|
85
|
-
| Option | Pros | Cons | Recommendation |
|
|
86
|
-
|
|
86
|
+
| Option | Pros | Cons | Community adoption | Recommendation |
|
|
87
|
+
|--------|------|------|-------------------|----------------|
|
|
87
88
|
|
|
88
89
|
## Recommendation
|
|
89
90
|
[concrete recommendation with justification]
|
|
90
91
|
|
|
91
92
|
## Sources
|
|
92
|
-
|
|
93
|
+
[numbered citations — use format: [N] Author/Project. "Title." Platform, Date. URL]
|
|
93
94
|
```
|
|
94
95
|
|
|
95
96
|
Report summary to the caller. The detail stays in the file for future reference.
|
|
@@ -3,6 +3,7 @@ name: spike-explorer
|
|
|
3
3
|
description: Isolated technical exploration -- tests code and reports feasibility
|
|
4
4
|
tools: Read, Glob, Grep, Bash, WebSearch
|
|
5
5
|
model: sonnet
|
|
6
|
+
maxTurns: 20
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
Difference from researcher: you TEST code (disposable POC). The researcher only searches for info.
|
|
@@ -266,7 +266,7 @@ Estimated context resets: [N / based on step count, suggest /clear every 3 steps
|
|
|
266
266
|
```
|
|
267
267
|
|
|
268
268
|
Ask: "Execute this plan? (yes / adjust / cancel)"
|
|
269
|
-
- **yes**: proceed with auto-advance
|
|
269
|
+
- **yes**: proceed with auto-advance. When delegating to agents during --phase, spawn them with `permissionMode: bypassPermissions` to avoid permission interruptions.
|
|
270
270
|
- **adjust**: ask what to change (skip a step, reorder, modify pipeline). Update sub-plan if needed, re-present.
|
|
271
271
|
- **cancel**: exit --phase mode, continue as normal /cpw-next-step (step by step)
|
|
272
272
|
|