@claude-pw/framework 0.6.0 → 0.7.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 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-pw/framework",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Structured Project Workflow for Claude Code — adaptive pipeline, context management, quality gates",
5
5
  "bin": {
6
6
  "claude-pw": "./install.js"
@@ -8,6 +8,10 @@ description: "Load context and execute the next pipeline stage"
8
8
 
9
9
  ## 0. Health check (session start)
10
10
 
11
+ ### Orphan phase-active cleanup
12
+ If `.planning/.phase-active` exists AND `--phase` flag is NOT active:
13
+ - Delete the file (leftover from interrupted session)
14
+
11
15
  ### Post-update detection
12
16
  If `.planning/.updated-from` exists:
13
17
  - Read the file — it contains the previous version
@@ -266,7 +270,7 @@ Estimated context resets: [N / based on step count, suggest /clear every 3 steps
266
270
  ```
267
271
 
268
272
  Ask: "Execute this plan? (yes / adjust / cancel)"
269
- - **yes**: proceed with auto-advance (normal --phase behavior)
273
+ - **yes**: create `.planning/.phase-active` (enables auto-approve for tool permissions), then proceed with auto-advance
270
274
  - **adjust**: ask what to change (skip a step, reorder, modify pipeline). Update sub-plan if needed, re-present.
271
275
  - **cancel**: exit --phase mode, continue as normal /cpw-next-step (step by step)
272
276
 
@@ -576,11 +580,22 @@ If all deliverables passed (or issues were fixed):
576
580
  ## Session notes
577
581
  - (empty)
578
582
  ```
579
- - If autoAdvance is **off**: Recommend /clear, then report:
583
+ - Delete `.planning/.phase-active` if it exists (re-enables normal tool permissions)
584
+ - If `--phase` flag is active: STOP. Do NOT advance to next phase. Report:
585
+ ```
586
+ Phase N complete. UAT passed.
587
+
588
+ Next: run `/clear`, then `/cpw-next-step` (or `/cpw-next-step --phase`) for Phase N+1.
589
+
590
+ Optional before starting:
591
+ /cpw-discuss — clarify ambiguities for the next phase
592
+ /cpw-todos — review pending todos
593
+ ```
594
+ - If autoAdvance is **off** (and no --phase): Recommend /clear, then report:
580
595
  "Phase N complete. Before starting Phase N+1:"
581
596
  " 1. `/cpw-discuss` — clarify ambiguities for the next phase"
582
597
  " 2. `/cpw-todos` — review pending todos (some may fit the next phase)"
583
598
  " 3. `/cpw-next-step` — start directly"
584
- - If autoAdvance is **auto** or **yolo**: Suggest /clear for context refresh, then automatically continue with Phase N+1 (run tooling audit → first step).
599
+ - If autoAdvance is **auto** or **yolo** (and no --phase): Suggest /clear for context refresh, then automatically continue with Phase N+1 (run tooling audit → first step).
585
600
 
586
601
  NEVER advance between phases without completing UAT first (in any mode).
@@ -0,0 +1,16 @@
1
+ #!/bin/bash
2
+ # Auto-approve tool calls during --phase execution
3
+ # Created by: /cpw-next-step --phase (creates .planning/.phase-active)
4
+ # Removed by: /cpw-next-step at UAT or phase end
5
+
6
+ PHASE_FILE=".planning/.phase-active"
7
+
8
+ if [ -f "$PHASE_FILE" ]; then
9
+ # Check for stale file (>24h)
10
+ if [ "$(find "$PHASE_FILE" -mmin +1440 2>/dev/null)" ]; then
11
+ rm -f "$PHASE_FILE"
12
+ exit 0
13
+ fi
14
+ echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow","permissionDecisionReason":"--phase active: plan approved by user"}}'
15
+ fi
16
+ exit 0
@@ -4,6 +4,15 @@
4
4
  "command": "node .claude/hooks/cpw-statusline.js"
5
5
  },
6
6
  "hooks": {
7
+ "PreToolUse": [
8
+ {
9
+ "matcher": "",
10
+ "hooks": [{
11
+ "type": "command",
12
+ "command": "bash .claude/hooks/cpw-phase-approve.sh"
13
+ }]
14
+ }
15
+ ],
7
16
  "UserPromptSubmit": [
8
17
  {
9
18
  "matcher": "",