@claude-pw/framework 0.3.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/LICENSE +21 -0
- package/README.es.md +173 -0
- package/README.ja.md +173 -0
- package/README.md +173 -0
- package/README.pt-br.md +173 -0
- package/README.zh-cn.md +173 -0
- package/RELEASES.md +66 -0
- package/install.js +593 -0
- package/package.json +35 -0
- package/templates/CHANGELOG.md +6 -0
- package/templates/CLAUDE.md.tpl +38 -0
- package/templates/Makefile +37 -0
- package/templates/PLAN.md.tpl +18 -0
- package/templates/STATUS.md.tpl +15 -0
- package/templates/claude/agents/codebase-mapper.md +105 -0
- package/templates/claude/agents/debugger.md +90 -0
- package/templates/claude/agents/decision-impact.md +36 -0
- package/templates/claude/agents/implementer.md +73 -0
- package/templates/claude/agents/interface-reviewer.md +22 -0
- package/templates/claude/agents/learning-extractor.md +104 -0
- package/templates/claude/agents/phase-validator.md +108 -0
- package/templates/claude/agents/plan-checker.md +18 -0
- package/templates/claude/agents/researcher.md +85 -0
- package/templates/claude/agents/session-recovery.md +127 -0
- package/templates/claude/agents/spike-explorer.md +34 -0
- package/templates/claude/commands/cpw-debug.md +116 -0
- package/templates/claude/commands/cpw-discuss.md +70 -0
- package/templates/claude/commands/cpw-health.md +67 -0
- package/templates/claude/commands/cpw-impact.md +22 -0
- package/templates/claude/commands/cpw-next-step.md +492 -0
- package/templates/claude/commands/cpw-pause.md +49 -0
- package/templates/claude/commands/cpw-quick.md +83 -0
- package/templates/claude/commands/cpw-reflect.md +209 -0
- package/templates/claude/commands/cpw-startup.md +321 -0
- package/templates/claude/commands/cpw-todos.md +100 -0
- package/templates/claude/hooks/cpw-context-monitor.js +59 -0
- package/templates/claude/hooks/cpw-statusline.js +36 -0
- package/templates/claude/rules/git.md +27 -0
- package/templates/claude/rules/interfaces.md +9 -0
- package/templates/claude/rules/testing.md +8 -0
- package/templates/claude/settings.json +42 -0
- package/templates/docs/architecture.md +4 -0
- package/templates/docs/codebase-map.md +3 -0
- package/templates/docs/conventions.md +3 -0
- package/templates/docs/interfaces.md +10 -0
- package/templates/docs/tech-debt.md +3 -0
- package/templates/docs/tooling.md +15 -0
- package/templates/gitignore +17 -0
- package/templates/husky/pre-commit +23 -0
- package/templates/planning/config.json +11 -0
- package/templates/planning/learnings/applied.md +3 -0
- package/templates/planning/learnings/queue.md +5 -0
- package/templates/planning/quick/log.md +4 -0
- package/templates/plans/decisions.md +9 -0
- package/templates/plans/phase-0.md +57 -0
- package/templates/plans/phase-1.md +49 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dcdeve
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.es.md
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Claude Project Workflow
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@claude-pw/framework) [](https://github.com/dcdeve/claude-pw/actions) [](LICENSE)
|
|
4
|
+
|
|
5
|
+
[English](README.md) | **Español** | [中文](README.zh-cn.md) | [日本語](README.ja.md) | [Português](README.pt-br.md)
|
|
6
|
+
|
|
7
|
+
Workflow estructurado para proyectos con Claude Code.
|
|
8
|
+
|
|
9
|
+
Claude Code es potente pero sin estructura, los proyectos no triviales se vuelven caóticos — sin plan, sin gestión de contexto, sin quality gates, sin continuidad entre sesiones. claude-pw soluciona esto instalando comandos, agentes, reglas y hooks sobre las features nativas de Claude Code. Node.js + markdown, agnóstico al lenguaje.
|
|
10
|
+
|
|
11
|
+
## Inicio rápido
|
|
12
|
+
|
|
13
|
+
### Proyecto nuevo
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx @claude-pw/framework mi-proyecto
|
|
17
|
+
cd mi-proyecto && claude
|
|
18
|
+
/cpw-startup
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Proyecto existente
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
cd mi-proyecto-existente
|
|
25
|
+
npx @claude-pw/framework .
|
|
26
|
+
claude
|
|
27
|
+
/cpw-startup
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`/cpw-startup` detecta tu codebase automáticamente y pregunta cómo proceder:
|
|
31
|
+
- **Brownfield** — agregar estructura sobre tu código existente (incluye auditoría de tooling)
|
|
32
|
+
- **Bluefield** — planificar una reescritura o migración
|
|
33
|
+
|
|
34
|
+
### Actualizar
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx @claude-pw/framework --update
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Cómo funciona
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
/cpw-startup → /cpw-discuss → /cpw-next-step (repetir hasta terminar)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
1. **`/cpw-startup`** te entrevista, escanea código existente (si hay), y genera un plan con fases, pasos y docs de arquitectura
|
|
47
|
+
2. **`/cpw-discuss`** identifica zonas grises y captura tus preferencias antes de construir (opcional, por fase)
|
|
48
|
+
3. **`/cpw-next-step`** ejecuta un pipeline adaptativo por paso — luego cierra, commitea y avanza automáticamente
|
|
49
|
+
|
|
50
|
+
Cada paso pasa por:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
SPIKE? → DESIGN → BUILD-OR-BUY? → FEASIBILITY? → COMPATIBILITY? → IMPLEMENT → TEST → ACCEPTANCE → CLOSE
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Las etapas opcionales se saltan con razón. Las obligatorias (DESIGN, IMPLEMENT, TEST, ACCEPTANCE, CLOSE) siempre corren. Cuando una fase se completa, validación + user acceptance testing corren automáticamente.
|
|
57
|
+
|
|
58
|
+
STATUS.md siempre le dice a Claude dónde estás y qué cargar. Los sub-planes son pequeños (uno por fase). Los resets de contexto son seguros — `/cpw-next-step` retoma exactamente donde quedaste.
|
|
59
|
+
|
|
60
|
+
## Ejemplo de sesión
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
> /cpw-next-step
|
|
64
|
+
|
|
65
|
+
Fase 1, Paso 1.2: Middleware de contexto de tenant
|
|
66
|
+
|
|
67
|
+
Pipeline:
|
|
68
|
+
- SPIKE: skip (patrón estándar)
|
|
69
|
+
- DESIGN: ok
|
|
70
|
+
- BUILD-OR-BUY: skip (middleware custom)
|
|
71
|
+
- COMPATIBILITY: ok (verificar contra interfaz Auth)
|
|
72
|
+
- IMPLEMENT: ok
|
|
73
|
+
- TEST: ok
|
|
74
|
+
- ACCEPTANCE: ok
|
|
75
|
+
- CLOSE: ok
|
|
76
|
+
|
|
77
|
+
¿Procedo con DESIGN?
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Cuando todos los pasos de una fase se completan:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Validación de fase... APROBADA
|
|
84
|
+
Walkthrough de UAT:
|
|
85
|
+
|
|
86
|
+
[1/3] Login de usuario — ¿Funciona? > sí
|
|
87
|
+
[2/3] Cambio de tenant — ¿Funciona? > el selector no cambia el contexto
|
|
88
|
+
|
|
89
|
+
Issue capturado. ¿Arreglar ahora? (sí/no)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Qué lo hace diferente
|
|
93
|
+
|
|
94
|
+
| | claude-pw | BMAD | GSD | Taskmaster |
|
|
95
|
+
|---|---|---|---|---|
|
|
96
|
+
| **Pipeline** | 9 etapas adaptativas por paso | Fijo por macro-fase | 3 etapas fijas por fase | Ninguno |
|
|
97
|
+
| **Contexto** | Puntero STATUS.md (~50 líneas) + monitor runtime | Docs progresivos pesados | Monitor de contexto + subagentes frescos | Sin gestión |
|
|
98
|
+
| **Quality gates** | Validador de fase + UAT + pre-commit + RFC | Readiness check + code review + DoD | Verificador + UAT | Checker opcional |
|
|
99
|
+
| **Self-learning** | Captura por hook + reflect + extracción de skills | Ninguno | Ninguno | Básico |
|
|
100
|
+
| **Protección de interfaces** | Contratos protegidos por RFC + contract tests | Docs de arquitectura | Ninguno | Ninguno |
|
|
101
|
+
| **Automatización** | 3 modos (manual / auto / yolo) | Manual | Totalmente autónomo | Semi-auto |
|
|
102
|
+
|
|
103
|
+
**Solo en claude-pw:**
|
|
104
|
+
- Pipeline adaptativo que evalúa qué etapas aplican por paso (SPIKE, BUILD-OR-BUY, FEASIBILITY, COMPATIBILITY se saltan con razón cuando no aplican)
|
|
105
|
+
- Desarrollo interface-first con protección RFC y contract tests
|
|
106
|
+
- Correcciones capturadas automáticamente y ruteadas al comando que las causó (skill routing)
|
|
107
|
+
- Descubrimientos no obvios auto-extraídos como skills reutilizables para retrieval semántico
|
|
108
|
+
- SPIKE y BUILD-OR-BUY como etapas de primera clase en el pipeline
|
|
109
|
+
- Modos de startup (greenfield / brownfield / bluefield) con entrevista estructurada adaptada a cada uno
|
|
110
|
+
- Auditoría de tooling para proyectos brownfield (linter, tests, CI, pre-commit, dependencias)
|
|
111
|
+
|
|
112
|
+
## Comandos
|
|
113
|
+
|
|
114
|
+
| Comando | Qué hace |
|
|
115
|
+
|---------|----------|
|
|
116
|
+
| `/cpw-startup` | Sesión de discovery — detecta modo, entrevista, genera plan |
|
|
117
|
+
| `/cpw-discuss` | Captura preferencias y resuelve ambigüedades antes de construir |
|
|
118
|
+
| `/cpw-next-step` | Ejecuta pipeline, cierra pasos, valida fases, corre UAT |
|
|
119
|
+
| `/cpw-pause` | Guarda estado de sesión para retomar después |
|
|
120
|
+
| `/cpw-quick` | Tarea ad-hoc fuera del pipeline (detección de scope-creep, `--auto`) |
|
|
121
|
+
| `/cpw-debug` | Sesión de debug persistente — sobrevive resets de contexto |
|
|
122
|
+
| `/cpw-health` | Verifica y repara estado del proyecto |
|
|
123
|
+
| `/cpw-todos` | Captura ideas para después o revisa todos pendientes |
|
|
124
|
+
| `/cpw-reflect` | Revisa correcciones capturadas, convierte en learnings (`--scan-history`, `--dedupe`) |
|
|
125
|
+
| `/cpw-impact` | Analiza impacto de decisiones en todo el plan |
|
|
126
|
+
|
|
127
|
+
## Configuración
|
|
128
|
+
|
|
129
|
+
`/cpw-startup` pregunta tus preferencias y las guarda en `.planning/config.json`:
|
|
130
|
+
|
|
131
|
+
| Setting | Opciones | Default | Qué hace |
|
|
132
|
+
|---------|----------|---------|----------|
|
|
133
|
+
| `autoAdvance` | `off` / `auto` / `yolo` | `off` | `off` = aprobar cada etapa. `auto` = auto-avanzar, pausar para UAT. `yolo` = pausar solo en errores. |
|
|
134
|
+
| `granularity` | `coarse` / `standard` / `fine` | `standard` | Cuántas fases: 3-5 / 5-8 / 8-12 |
|
|
135
|
+
| `modelProfile` | `quality` / `balanced` / `budget` | `balanced` | Modelos de agentes: opus / sonnet+haiku / mayormente haiku |
|
|
136
|
+
| `modelOverrides` | `{}` | `{}` | Overrides por agente: `{"researcher": "opus"}` |
|
|
137
|
+
| `gitStrategy` | `trunk-based` / `feature-branch` / `gitflow` | `trunk-based` | `trunk-based` = push a main. `feature-branch` = rama por fase, PR para merge. `gitflow` = develop + feature branches. |
|
|
138
|
+
| `commitPlanning` | `true` / `false` | `false` | Trackear `.planning/` en git (para equipos) |
|
|
139
|
+
| `autoReflect` | `off` / `remind` / `auto` | `remind` | Auto-procesar learnings al fin de sesión o en CLOSE |
|
|
140
|
+
|
|
141
|
+
## Qué va en git
|
|
142
|
+
|
|
143
|
+
| Qué | Commiteado | Gitignored | Por qué |
|
|
144
|
+
|-----|------------|------------|---------|
|
|
145
|
+
| `.claude/` (comandos, agentes, reglas, hooks) | Sí | — | Workflow compartido — todo el equipo usa el mismo pipeline |
|
|
146
|
+
| `CLAUDE.md`, `PLAN.md`, `Makefile` | Sí | — | Estructura e instrucciones del proyecto |
|
|
147
|
+
| `plans/`, `docs/` | Sí | — | Planes, arquitectura, decisiones, convenciones |
|
|
148
|
+
| `.planning/` (config, learnings, debug, quick log) | Configurable | Default: gitignored | Usar `commitPlanning: true` para compartir estado con el equipo |
|
|
149
|
+
| `STATUS.md` | — | Siempre | Puntero de sesión personal — cada dev tiene el suyo |
|
|
150
|
+
| `.claude/settings.local.json` | — | Siempre | Settings personales de Claude Code |
|
|
151
|
+
|
|
152
|
+
## Qué se instala
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
mi-proyecto/
|
|
156
|
+
├── .claude/
|
|
157
|
+
│ ├── commands/ 10 slash commands (/cpw-*)
|
|
158
|
+
│ ├── agents/ 11 agentes especializados
|
|
159
|
+
│ ├── rules/ 3 reglas context-aware (git, interfaces, testing)
|
|
160
|
+
│ ├── hooks/ Hooks Node.js (statusline, monitor de contexto)
|
|
161
|
+
│ └── settings.json
|
|
162
|
+
├── plans/ Sub-planes por fase + log de decisiones
|
|
163
|
+
├── docs/ Arquitectura, interfaces, convenciones
|
|
164
|
+
├── .planning/ Estado local (gitignored)
|
|
165
|
+
├── CLAUDE.md Instrucciones para el agente
|
|
166
|
+
├── PLAN.md Índice del proyecto
|
|
167
|
+
├── STATUS.md Puntero de sesión (gitignored)
|
|
168
|
+
└── Makefile make status / plan / check / commit / push
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Licencia
|
|
172
|
+
|
|
173
|
+
MIT
|
package/README.ja.md
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Claude Project Workflow
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@claude-pw/framework) [](https://github.com/dcdeve/claude-pw/actions) [](LICENSE)
|
|
4
|
+
|
|
5
|
+
[English](README.md) | [Español](README.es.md) | [中文](README.zh-cn.md) | **日本語** | [Português](README.pt-br.md)
|
|
6
|
+
|
|
7
|
+
Claude Code のための構造化プロジェクトワークフロー。
|
|
8
|
+
|
|
9
|
+
Claude Code は強力ですが、構造がなければ非自明なプロジェクトは混沌とします — 計画なし、コンテキスト管理なし、品質ゲートなし、セッション間の継続性なし。claude-pw は Claude Code のネイティブ機能の上にコマンド、エージェント、ルール、フックをインストールすることでこれを解決します。純粋な Node.js + markdown、言語非依存。
|
|
10
|
+
|
|
11
|
+
## クイックスタート
|
|
12
|
+
|
|
13
|
+
### 新規プロジェクト
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx @claude-pw/framework my-project
|
|
17
|
+
cd my-project && claude
|
|
18
|
+
/cpw-startup
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 既存プロジェクト
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
cd my-existing-project
|
|
25
|
+
npx @claude-pw/framework .
|
|
26
|
+
claude
|
|
27
|
+
/cpw-startup
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`/cpw-startup` はコードベースを自動検出し、進め方を確認します:
|
|
31
|
+
- **Brownfield** — 既存コードの上に構造を追加(ツール健全性チェック含む)
|
|
32
|
+
- **Bluefield** — リライトまたはマイグレーションを計画
|
|
33
|
+
|
|
34
|
+
### アップデート
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx @claude-pw/framework --update
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## 仕組み
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
/cpw-startup → /cpw-discuss → /cpw-next-step(完了まで繰り返し)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
1. **`/cpw-startup`** インタビューを行い、既存コード(あれば)をスキャンし、フェーズ・ステップ・アーキテクチャドキュメントを含む計画を生成
|
|
47
|
+
2. **`/cpw-discuss`** グレーゾーンを特定し、ビルド前にあなたの好みを把握(任意、フェーズごと)
|
|
48
|
+
3. **`/cpw-next-step`** ステップごとに適応型パイプラインを実行 — 完了後、自動的にクローズ・コミット・次へ進行
|
|
49
|
+
|
|
50
|
+
各ステップは以下を経由します:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
SPIKE? → DESIGN → BUILD-OR-BUY? → FEASIBILITY? → COMPATIBILITY? → IMPLEMENT → TEST → ACCEPTANCE → CLOSE
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
オプションステージは理由付きでスキップされます。必須ステージ(DESIGN, IMPLEMENT, TEST, ACCEPTANCE, CLOSE)は常に実行されます。フェーズ完了時、バリデーション + ユーザー受入テストが自動実行されます。
|
|
57
|
+
|
|
58
|
+
STATUS.md は常に Claude に現在地と読み込むべきものを伝えます。サブプランは小さく保たれます(フェーズごとに1つ)。コンテキストリセットは安全です — `/cpw-next-step` は中断した場所から正確に再開します。
|
|
59
|
+
|
|
60
|
+
## セッション例
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
> /cpw-next-step
|
|
64
|
+
|
|
65
|
+
Phase 1, Step 1.2: Tenant context middleware
|
|
66
|
+
|
|
67
|
+
Pipeline:
|
|
68
|
+
- SPIKE: skip (standard pattern)
|
|
69
|
+
- DESIGN: ok
|
|
70
|
+
- BUILD-OR-BUY: skip (custom middleware)
|
|
71
|
+
- COMPATIBILITY: ok (verify against Auth interface)
|
|
72
|
+
- IMPLEMENT: ok
|
|
73
|
+
- TEST: ok
|
|
74
|
+
- ACCEPTANCE: ok
|
|
75
|
+
- CLOSE: ok
|
|
76
|
+
|
|
77
|
+
Proceed with DESIGN?
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
フェーズ内の全ステップが完了すると:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Phase validation... APPROVED
|
|
84
|
+
UAT walkthrough:
|
|
85
|
+
|
|
86
|
+
[1/3] User login — Does it work? > yes
|
|
87
|
+
[2/3] Tenant switching — Does it work? > selector doesn't switch context
|
|
88
|
+
|
|
89
|
+
Issue captured. Fix now? (yes/no)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## 他との違い
|
|
93
|
+
|
|
94
|
+
| | claude-pw | BMAD | GSD | Taskmaster |
|
|
95
|
+
|---|---|---|---|---|
|
|
96
|
+
| **パイプライン** | ステップごとに9つの適応型ステージ | マクロフェーズごとに固定 | フェーズごとに3つの固定ステージ | なし |
|
|
97
|
+
| **コンテキスト** | STATUS.md ポインター(約50行)+ ランタイムモニター | 重い漸進的ドキュメント | コンテキストモニター + 新規サブエージェント | 管理なし |
|
|
98
|
+
| **品質ゲート** | フェーズバリデーター + UAT + pre-commit + RFC | 準備チェック + コードレビュー + DoD | ベリファイヤー + UAT | オプションチェッカー |
|
|
99
|
+
| **自己学習** | フックキャプチャ + リフレクト + スキル抽出 | なし | なし | 基本的 |
|
|
100
|
+
| **インターフェース保護** | RFC 保護されたコントラクト + コントラクトテスト | アーキテクチャドキュメント | なし | なし |
|
|
101
|
+
| **自動化** | 3モード(manual / auto / yolo) | 手動 | 完全自律 | 半自動 |
|
|
102
|
+
|
|
103
|
+
**claude-pw だけの機能:**
|
|
104
|
+
- ステップごとに適用するステージを評価する適応型パイプライン(SPIKE, BUILD-OR-BUY, FEASIBILITY, COMPATIBILITY は該当しない場合、理由付きでスキップ)
|
|
105
|
+
- RFC 保護とコントラクトテストによるインターフェースファーストの開発
|
|
106
|
+
- 修正が自動キャプチャされ、原因となったコマンドにルーティング(スキルルーティング)
|
|
107
|
+
- 非自明な発見がセマンティック検索用の再利用可能スキルとして自動抽出
|
|
108
|
+
- SPIKE と BUILD-OR-BUY をファーストクラスのパイプラインステージとして搭載
|
|
109
|
+
- スタートアップモード(greenfield / brownfield / bluefield)と各モードに適応した構造化インタビュー
|
|
110
|
+
- Brownfield プロジェクト向けツール健全性チェック(リンター、テスト、CI、pre-commit、依存関係)
|
|
111
|
+
|
|
112
|
+
## コマンド
|
|
113
|
+
|
|
114
|
+
| コマンド | 機能 |
|
|
115
|
+
|---------|-------------|
|
|
116
|
+
| `/cpw-startup` | ディスカバリーセッション — モード検出、インタビュー、計画生成 |
|
|
117
|
+
| `/cpw-discuss` | ビルド前に好みの把握と曖昧さの解消 |
|
|
118
|
+
| `/cpw-next-step` | パイプライン実行、ステップクローズ、フェーズバリデーション、UAT 実行 |
|
|
119
|
+
| `/cpw-pause` | セッション状態を保存して後で再開 |
|
|
120
|
+
| `/cpw-quick` | パイプライン外のアドホックタスク(スコープクリープ検出、`--auto`) |
|
|
121
|
+
| `/cpw-debug` | 永続デバッグセッション — コンテキストリセット後も継続 |
|
|
122
|
+
| `/cpw-health` | プロジェクト状態のチェックと修復 |
|
|
123
|
+
| `/cpw-todos` | アイデアの記録または保留中の TODO の確認 |
|
|
124
|
+
| `/cpw-reflect` | キャプチャした修正をレビューし、学習に変換(`--scan-history`, `--dedupe`) |
|
|
125
|
+
| `/cpw-impact` | 計画全体にわたる意思決定の影響分析 |
|
|
126
|
+
|
|
127
|
+
## 設定
|
|
128
|
+
|
|
129
|
+
`/cpw-startup` で好みを確認し、`.planning/config.json` に保存します:
|
|
130
|
+
|
|
131
|
+
| 設定 | オプション | デフォルト | 機能 |
|
|
132
|
+
|---------|---------|---------|-------------|
|
|
133
|
+
| `autoAdvance` | `off` / `auto` / `yolo` | `off` | `off` = 各ステージを承認。`auto` = 自動進行、UAT で一時停止。`yolo` = エラー時のみ一時停止。 |
|
|
134
|
+
| `granularity` | `coarse` / `standard` / `fine` | `standard` | フェーズ数:3-5 / 5-8 / 8-12 |
|
|
135
|
+
| `modelProfile` | `quality` / `balanced` / `budget` | `balanced` | エージェントモデル:opus / sonnet+haiku / ほぼ haiku |
|
|
136
|
+
| `modelOverrides` | `{}` | `{}` | エージェントごとのオーバーライド:`{"researcher": "opus"}` |
|
|
137
|
+
| `gitStrategy` | `trunk-based` / `feature-branch` / `gitflow` | `trunk-based` | `trunk-based` = main にプッシュ。`feature-branch` = フェーズごとにブランチ、PR でマージ。`gitflow` = develop + feature ブランチ。 |
|
|
138
|
+
| `commitPlanning` | `true` / `false` | `false` | `.planning/` を git で追跡(チーム向け) |
|
|
139
|
+
| `autoReflect` | `off` / `remind` / `auto` | `remind` | セッション終了時または CLOSE ステージで学習を自動処理 |
|
|
140
|
+
|
|
141
|
+
## git に入れるもの
|
|
142
|
+
|
|
143
|
+
| 対象 | コミット | Gitignore | 理由 |
|
|
144
|
+
|------|-----------|------------|-----|
|
|
145
|
+
| `.claude/`(コマンド、エージェント、ルール、フック) | する | — | 共有ワークフロー — チーム全員が同じパイプラインを使用 |
|
|
146
|
+
| `CLAUDE.md`, `PLAN.md`, `Makefile` | する | — | プロジェクト構造と手順 |
|
|
147
|
+
| `plans/`, `docs/` | する | — | 計画、アーキテクチャ、決定事項、規約 |
|
|
148
|
+
| `.planning/`(設定、学習、デバッグ、クイックログ) | 設定可能 | デフォルト:gitignore | `commitPlanning: true` でチームと計画状態を共有 |
|
|
149
|
+
| `STATUS.md` | — | 常に | 個人のセッションポインター — 各開発者が独自に持つ |
|
|
150
|
+
| `.claude/settings.local.json` | — | 常に | 個人の Claude Code 設定 |
|
|
151
|
+
|
|
152
|
+
## 生成されるもの
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
my-project/
|
|
156
|
+
├── .claude/
|
|
157
|
+
│ ├── commands/ 10個のスラッシュコマンド (/cpw-*)
|
|
158
|
+
│ ├── agents/ 11個の専門エージェント
|
|
159
|
+
│ ├── rules/ 3つのコンテキスト対応ルール(git、インターフェース、テスト)
|
|
160
|
+
│ ├── hooks/ Node.js フック(ステータスライン、コンテキストモニター)
|
|
161
|
+
│ └── settings.json
|
|
162
|
+
├── plans/ フェーズごとのサブプラン + 決定ログ
|
|
163
|
+
├── docs/ アーキテクチャ、インターフェース、規約
|
|
164
|
+
├── .planning/ ローカル状態(gitignore)
|
|
165
|
+
├── CLAUDE.md エージェント向け手順
|
|
166
|
+
├── PLAN.md プロジェクトインデックス
|
|
167
|
+
├── STATUS.md セッションポインター(gitignore)
|
|
168
|
+
└── Makefile make status / plan / check / commit / push
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## ライセンス
|
|
172
|
+
|
|
173
|
+
MIT
|
package/README.md
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Claude Project Workflow
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@claude-pw/framework) [](https://github.com/dcdeve/claude-pw/actions) [](LICENSE)
|
|
4
|
+
|
|
5
|
+
**English** | [Español](README.es.md) | [中文](README.zh-cn.md) | [日本語](README.ja.md) | [Português](README.pt-br.md)
|
|
6
|
+
|
|
7
|
+
Structured Project Workflow for Claude Code.
|
|
8
|
+
|
|
9
|
+
Claude Code is powerful but without structure, non-trivial projects get chaotic — no plan, no context management, no quality gates, no continuity between sessions. claude-pw fixes this by installing commands, agents, rules, and hooks on top of Claude Code's native features. Pure Node.js + markdown, language-agnostic.
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
### New project
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx @claude-pw/framework my-project
|
|
17
|
+
cd my-project && claude
|
|
18
|
+
/cpw-startup
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Existing project
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
cd my-existing-project
|
|
25
|
+
npx @claude-pw/framework .
|
|
26
|
+
claude
|
|
27
|
+
/cpw-startup
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`/cpw-startup` auto-detects your codebase and asks how you want to proceed:
|
|
31
|
+
- **Brownfield** — add structure on top of your existing code (includes tooling health check)
|
|
32
|
+
- **Bluefield** — plan a rewrite or migration
|
|
33
|
+
|
|
34
|
+
### Update
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx @claude-pw/framework --update
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## How it works
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
/cpw-startup → /cpw-discuss → /cpw-next-step (repeat until done)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
1. **`/cpw-startup`** interviews you, scans existing code (if any), and generates a plan with phases, steps, and architecture docs
|
|
47
|
+
2. **`/cpw-discuss`** identifies gray areas and captures your preferences before building (optional, per phase)
|
|
48
|
+
3. **`/cpw-next-step`** runs an adaptive pipeline per step — then closes, commits, and advances automatically
|
|
49
|
+
|
|
50
|
+
Every step goes through:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
SPIKE? → DESIGN → BUILD-OR-BUY? → FEASIBILITY? → COMPATIBILITY? → IMPLEMENT → TEST → ACCEPTANCE → CLOSE
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Optional stages are skipped with reason. Mandatory stages (DESIGN, IMPLEMENT, TEST, ACCEPTANCE, CLOSE) always run. When a phase completes, validation + user acceptance testing run automatically.
|
|
57
|
+
|
|
58
|
+
STATUS.md always tells Claude where you are and what to load. Sub-plans stay small (one per phase). Context resets are safe — `/cpw-next-step` picks up exactly where you left off.
|
|
59
|
+
|
|
60
|
+
## Example session
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
> /cpw-next-step
|
|
64
|
+
|
|
65
|
+
Phase 1, Step 1.2: Tenant context middleware
|
|
66
|
+
|
|
67
|
+
Pipeline:
|
|
68
|
+
- SPIKE: skip (standard pattern)
|
|
69
|
+
- DESIGN: ok
|
|
70
|
+
- BUILD-OR-BUY: skip (custom middleware)
|
|
71
|
+
- COMPATIBILITY: ok (verify against Auth interface)
|
|
72
|
+
- IMPLEMENT: ok
|
|
73
|
+
- TEST: ok
|
|
74
|
+
- ACCEPTANCE: ok
|
|
75
|
+
- CLOSE: ok
|
|
76
|
+
|
|
77
|
+
Proceed with DESIGN?
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
When all steps in a phase complete:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Phase validation... APPROVED
|
|
84
|
+
UAT walkthrough:
|
|
85
|
+
|
|
86
|
+
[1/3] User login — Does it work? > yes
|
|
87
|
+
[2/3] Tenant switching — Does it work? > selector doesn't switch context
|
|
88
|
+
|
|
89
|
+
Issue captured. Fix now? (yes/no)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## What makes it different
|
|
93
|
+
|
|
94
|
+
| | claude-pw | BMAD | GSD | Taskmaster |
|
|
95
|
+
|---|---|---|---|---|
|
|
96
|
+
| **Pipeline** | 9 adaptive stages per step | Fixed per macro-phase | 3 fixed stages per phase | None |
|
|
97
|
+
| **Context** | STATUS.md pointer (~50 lines) + runtime monitor | Heavy progressive docs | Context monitor + fresh subagents | No management |
|
|
98
|
+
| **Quality gates** | Phase validator + UAT + pre-commit + RFC | Readiness check + code review + DoD | Verifier + UAT | Optional checker |
|
|
99
|
+
| **Self-learning** | Hook capture + reflect + skill extraction | None | None | Basic |
|
|
100
|
+
| **Interface protection** | RFC-protected contracts + contract tests | Architecture docs | None | None |
|
|
101
|
+
| **Automation** | 3 modes (manual / auto / yolo) | Manual | Full autonomous | Semi-auto |
|
|
102
|
+
|
|
103
|
+
**Only in claude-pw:**
|
|
104
|
+
- Adaptive pipeline that evaluates which stages apply per step (SPIKE, BUILD-OR-BUY, FEASIBILITY, COMPATIBILITY skipped with reason when they don't apply)
|
|
105
|
+
- Interface-first development with RFC protection and contract tests
|
|
106
|
+
- Corrections captured automatically and routed back to the command that caused them (skill routing)
|
|
107
|
+
- Non-obvious discoveries auto-extracted as reusable skills for semantic retrieval
|
|
108
|
+
- SPIKE and BUILD-OR-BUY as first-class pipeline stages
|
|
109
|
+
- Startup modes (greenfield / brownfield / bluefield) with structured interview adapted to each
|
|
110
|
+
- Tooling health check for brownfield projects (linter, tests, CI, pre-commit, dependencies)
|
|
111
|
+
|
|
112
|
+
## Commands
|
|
113
|
+
|
|
114
|
+
| Command | What it does |
|
|
115
|
+
|---------|-------------|
|
|
116
|
+
| `/cpw-startup` | Discovery session — detect mode, interview, generate plan |
|
|
117
|
+
| `/cpw-discuss` | Capture preferences and resolve ambiguities before building |
|
|
118
|
+
| `/cpw-next-step` | Execute pipeline, close steps, validate phases, run UAT |
|
|
119
|
+
| `/cpw-pause` | Save session state for later resume |
|
|
120
|
+
| `/cpw-quick` | Ad-hoc task outside the pipeline (scope-creep detection, `--auto`) |
|
|
121
|
+
| `/cpw-debug` | Persistent debug session — survives context resets |
|
|
122
|
+
| `/cpw-health` | Check and repair project state |
|
|
123
|
+
| `/cpw-todos` | Capture ideas for later or review pending todos |
|
|
124
|
+
| `/cpw-reflect` | Review captured corrections, convert to learnings (`--scan-history`, `--dedupe`) |
|
|
125
|
+
| `/cpw-impact` | Analyze decision impact across the entire plan |
|
|
126
|
+
|
|
127
|
+
## Configuration
|
|
128
|
+
|
|
129
|
+
`/cpw-startup` asks your preferences and saves them to `.planning/config.json`:
|
|
130
|
+
|
|
131
|
+
| Setting | Options | Default | What it does |
|
|
132
|
+
|---------|---------|---------|-------------|
|
|
133
|
+
| `autoAdvance` | `off` / `auto` / `yolo` | `off` | `off` = approve each stage. `auto` = auto-advance, pause for UAT. `yolo` = pause only on errors. |
|
|
134
|
+
| `granularity` | `coarse` / `standard` / `fine` | `standard` | How many phases: 3-5 / 5-8 / 8-12 |
|
|
135
|
+
| `modelProfile` | `quality` / `balanced` / `budget` | `balanced` | Agent models: opus / sonnet+haiku / mostly haiku |
|
|
136
|
+
| `modelOverrides` | `{}` | `{}` | Per-agent overrides: `{"researcher": "opus"}` |
|
|
137
|
+
| `gitStrategy` | `trunk-based` / `feature-branch` / `gitflow` | `trunk-based` | `trunk-based` = push to main. `feature-branch` = branch per phase, PR to merge. `gitflow` = develop + feature branches. |
|
|
138
|
+
| `commitPlanning` | `true` / `false` | `false` | Track `.planning/` in git (for teams) |
|
|
139
|
+
| `autoReflect` | `off` / `remind` / `auto` | `remind` | Auto-process learnings at session end or CLOSE stage |
|
|
140
|
+
|
|
141
|
+
## What goes in git
|
|
142
|
+
|
|
143
|
+
| What | Committed | Gitignored | Why |
|
|
144
|
+
|------|-----------|------------|-----|
|
|
145
|
+
| `.claude/` (commands, agents, rules, hooks) | Yes | — | Shared workflow — everyone on the team uses the same pipeline |
|
|
146
|
+
| `CLAUDE.md`, `PLAN.md`, `Makefile` | Yes | — | Project structure and instructions |
|
|
147
|
+
| `plans/`, `docs/` | Yes | — | Plans, architecture, decisions, conventions |
|
|
148
|
+
| `.planning/` (config, learnings, debug, quick log) | Configurable | Default: gitignored | Set `commitPlanning: true` to share planning state with your team |
|
|
149
|
+
| `STATUS.md` | — | Always | Personal session pointer — each dev has their own |
|
|
150
|
+
| `.claude/settings.local.json` | — | Always | Personal Claude Code settings |
|
|
151
|
+
|
|
152
|
+
## What you get
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
my-project/
|
|
156
|
+
├── .claude/
|
|
157
|
+
│ ├── commands/ 10 slash commands (/cpw-*)
|
|
158
|
+
│ ├── agents/ 11 specialized agents
|
|
159
|
+
│ ├── rules/ 3 context-aware rules (git, interfaces, testing)
|
|
160
|
+
│ ├── hooks/ Node.js hooks (statusline, context monitor)
|
|
161
|
+
│ └── settings.json
|
|
162
|
+
├── plans/ Sub-plans per phase + decisions log
|
|
163
|
+
├── docs/ Architecture, interfaces, conventions
|
|
164
|
+
├── .planning/ Local state (gitignored)
|
|
165
|
+
├── CLAUDE.md Agent instructions
|
|
166
|
+
├── PLAN.md Project index
|
|
167
|
+
├── STATUS.md Session pointer (gitignored)
|
|
168
|
+
└── Makefile make status / plan / check / commit / push
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## License
|
|
172
|
+
|
|
173
|
+
MIT
|