@claude-pw/framework 0.7.0 → 0.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.
package/README.es.md CHANGED
@@ -169,8 +169,8 @@ Issue capturado. ¿Arreglar ahora? (sí/no)
169
169
  ```
170
170
  mi-proyecto/
171
171
  ├── .claude/
172
- │ ├── commands/ 10 slash commands (/cpw-*)
173
- │ ├── agents/ 11 agentes especializados
172
+ │ ├── commands/ 11 slash commands (/cpw-*)
173
+ │ ├── agents/ 12 agentes especializados (4 con memoria persistente)
174
174
  │ ├── rules/ 3 reglas context-aware (git, interfaces, testing)
175
175
  │ ├── hooks/ Hooks Node.js (statusline, monitor de contexto)
176
176
  │ └── settings.json
package/README.ja.md CHANGED
@@ -169,8 +169,8 @@ Issue captured. Fix now? (yes/no)
169
169
  ```
170
170
  my-project/
171
171
  ├── .claude/
172
- │ ├── commands/ 10個のスラッシュコマンド (/cpw-*)
173
- │ ├── agents/ 11個の専門エージェント
172
+ │ ├── commands/ 11個のスラッシュコマンド (/cpw-*)
173
+ │ ├── agents/ 12個の専門エージェント(4つに永続メモリ)
174
174
  │ ├── rules/ 3つのコンテキスト対応ルール(git、インターフェース、テスト)
175
175
  │ ├── hooks/ Node.js フック(ステータスライン、コンテキストモニター)
176
176
  │ └── settings.json
package/README.md CHANGED
@@ -169,8 +169,8 @@ Issue captured. Fix now? (yes/no)
169
169
  ```
170
170
  my-project/
171
171
  ├── .claude/
172
- │ ├── commands/ 10 slash commands (/cpw-*)
173
- │ ├── agents/ 11 specialized agents
172
+ │ ├── commands/ 11 slash commands (/cpw-*)
173
+ │ ├── agents/ 12 specialized agents (4 with persistent memory)
174
174
  │ ├── rules/ 3 context-aware rules (git, interfaces, testing)
175
175
  │ ├── hooks/ Node.js hooks (statusline, context monitor)
176
176
  │ └── settings.json
package/README.pt-br.md CHANGED
@@ -169,8 +169,8 @@ Issue captured. Fix now? (yes/no)
169
169
  ```
170
170
  my-project/
171
171
  ├── .claude/
172
- │ ├── commands/ 10 slash commands (/cpw-*)
173
- │ ├── agents/ 11 agentes especializados
172
+ │ ├── commands/ 11 slash commands (/cpw-*)
173
+ │ ├── agents/ 12 agentes especializados (4 com memória persistente)
174
174
  │ ├── rules/ 3 regras sensíveis ao contexto (git, interfaces, testes)
175
175
  │ ├── hooks/ Hooks Node.js (statusline, monitor de contexto)
176
176
  │ └── settings.json
package/README.zh-cn.md CHANGED
@@ -169,8 +169,8 @@ UAT 演练:
169
169
  ```
170
170
  my-project/
171
171
  ├── .claude/
172
- │ ├── commands/ 10 个斜杠命令(/cpw-*)
173
- │ ├── agents/ 11 个专用代理
172
+ │ ├── commands/ 11 个斜杠命令(/cpw-*)
173
+ │ ├── agents/ 12 个专用代理(4 个具有持久记忆)
174
174
  │ ├── rules/ 3 个上下文感知规则(git、interfaces、testing)
175
175
  │ ├── hooks/ Node.js 钩子(状态栏、上下文监控)
176
176
  │ └── settings.json
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-pw/framework",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "description": "Structured Project Workflow for Claude Code — adaptive pipeline, context management, quality gates",
5
5
  "bin": {
6
6
  "claude-pw": "./install.js"
@@ -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: debugger
3
3
  description: Structured debug with scientific method -- state persists between sessions
4
4
  tools: Read, Glob, Grep, Bash, Write
5
5
  model: sonnet
6
+ memory: project
6
7
  ---
7
8
 
8
9
  Systematic debug. Your state is saved in a file that survives context resets.
@@ -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
- - [links to docs, repos, articles]
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.
@@ -270,7 +270,7 @@ Estimated context resets: [N / based on step count, suggest /clear every 3 steps
270
270
  ```
271
271
 
272
272
  Ask: "Execute this plan? (yes / adjust / cancel)"
273
- - **yes**: create `.planning/.phase-active` (enables auto-approve for tool permissions), then proceed with auto-advance
273
+ - **yes**: create `.planning/.phase-active` (enables auto-approve for tool permissions via PreToolUse hook), then proceed with auto-advance.
274
274
  - **adjust**: ask what to change (skip a step, reorder, modify pipeline). Update sub-plan if needed, re-present.
275
275
  - **cancel**: exit --phase mode, continue as normal /cpw-next-step (step by step)
276
276