prizmkit 1.1.130 → 1.1.131

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 (88) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/dev-pipeline/.env.example +1 -1
  3. package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +445 -8
  4. package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +87 -66
  5. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +53 -3
  6. package/bundled/dev-pipeline/prizmkit_runtime/runner_recovery.py +55 -25
  7. package/bundled/dev-pipeline/prizmkit_runtime/runner_status.py +4 -0
  8. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +15 -1
  9. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +396 -4
  10. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +54 -1
  11. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +54 -1
  12. package/bundled/dev-pipeline/scripts/prompt_framework.py +152 -1
  13. package/bundled/dev-pipeline/scripts/update-bug-status.py +53 -0
  14. package/bundled/dev-pipeline/scripts/update-checkpoint.py +294 -69
  15. package/bundled/dev-pipeline/scripts/update-feature-status.py +57 -0
  16. package/bundled/dev-pipeline/scripts/update-refactor-status.py +53 -0
  17. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +2 -2
  18. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +20 -14
  19. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +21 -4
  20. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +18 -0
  21. package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +1 -1
  22. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +5 -15
  23. package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +21 -0
  24. package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +10 -10
  25. package/bundled/dev-pipeline/templates/sections/headless-commit-authorization.md +16 -0
  26. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +26 -23
  27. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +12 -8
  28. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +1 -1
  29. package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +21 -0
  30. package/bundled/dev-pipeline/tests/test_checkpoint_state.py +362 -3
  31. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +310 -22
  32. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +132 -0
  33. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +91 -0
  34. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +411 -18
  35. package/bundled/dev-pipeline/tests/test_unified_cli.py +3 -3
  36. package/bundled/skills/_metadata.json +62 -25
  37. package/bundled/skills/app-planner/SKILL.md +4 -3
  38. package/bundled/skills/bug-fix-workflow/SKILL.md +89 -180
  39. package/bundled/skills/bug-planner/SKILL.md +12 -27
  40. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +131 -220
  41. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +36 -90
  42. package/bundled/skills/feature-pipeline-launcher/SKILL.md +129 -271
  43. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +35 -76
  44. package/bundled/skills/feature-planner/SKILL.md +27 -22
  45. package/bundled/skills/feature-planner/assets/planning-guide.md +4 -4
  46. package/bundled/skills/feature-workflow/SKILL.md +94 -121
  47. package/bundled/skills/prizmkit/SKILL.md +130 -94
  48. package/bundled/skills/prizmkit/references/workflow-state-protocol.md +181 -0
  49. package/bundled/skills/prizmkit-code-review/SKILL.md +114 -84
  50. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +1 -1
  51. package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +181 -0
  52. package/bundled/skills/prizmkit-committer/SKILL.md +131 -47
  53. package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +181 -0
  54. package/bundled/skills/prizmkit-implement/SKILL.md +99 -73
  55. package/bundled/skills/prizmkit-implement/references/implementation-subagent-procedure.md +1 -1
  56. package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +181 -0
  57. package/bundled/skills/prizmkit-init/SKILL.md +5 -5
  58. package/bundled/skills/prizmkit-plan/SKILL.md +132 -105
  59. package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +181 -0
  60. package/bundled/skills/prizmkit-retrospective/SKILL.md +111 -53
  61. package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +7 -6
  62. package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +5 -4
  63. package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +181 -0
  64. package/bundled/skills/prizmkit-test/SKILL.md +28 -6
  65. package/bundled/skills/prizmkit-test/references/examples.md +1 -1
  66. package/bundled/skills/prizmkit-test/references/test-report-template.md +1 -1
  67. package/bundled/skills/prizmkit-test/references/workflow-state-protocol.md +181 -0
  68. package/bundled/skills/prizmkit-workflow/SKILL.md +266 -0
  69. package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +181 -0
  70. package/bundled/skills/recovery-workflow/SKILL.md +62 -241
  71. package/bundled/skills/recovery-workflow/evals/evals.json +17 -33
  72. package/bundled/skills/recovery-workflow/references/detection.md +28 -52
  73. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +105 -439
  74. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +136 -275
  75. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +53 -88
  76. package/bundled/skills/refactor-planner/SKILL.md +12 -57
  77. package/bundled/skills/refactor-planner/references/behavior-preservation.md +111 -230
  78. package/bundled/skills/refactor-planner/references/error-recovery.md +37 -0
  79. package/bundled/skills/refactor-planner/references/planning-phases.md +11 -17
  80. package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +1 -1
  81. package/bundled/skills/refactor-workflow/SKILL.md +98 -139
  82. package/bundled/templates/project-memory-template.md +4 -4
  83. package/package.json +1 -1
  84. package/src/index.js +4 -0
  85. package/src/prompts.js +10 -3
  86. package/src/scaffold.js +1 -1
  87. package/bundled/dev-pipeline/tests/test-deploy-safety.sh +0 -223
  88. package/bundled/skills/feature-pipeline-launcher/scripts/preflight-check.py +0 -462
@@ -1,346 +1,204 @@
1
1
  ---
2
2
  name: "feature-pipeline-launcher"
3
- description: "Launch and manage the dev-pipeline from within an AI CLI session. Start pipeline in background, monitor logs, check status, stop pipeline. Use this skill whenever the user wants to start building features, run the pipeline, check pipeline progress, retry features, or stop the pipeline. Trigger on: 'run pipeline', 'start pipeline', 'start building', 'pipeline status', 'stop pipeline', 'retry feature', 'launch pipeline', 'start implementing', 'check pipeline status', 'stop the pipeline'. (project)"
3
+ description: "Build feature-pipeline commands from a validated .prizmkit/plans/feature-list.json without executing them. Produces foreground or background-daemon start commands plus status, logs, stop, and safe retry commands. Use whenever the user wants to run the feature pipeline, start building from an existing feature list, construct a feature subset command, inspect pipeline status, view logs, stop a run, or retry a feature. Trigger on: 'run pipeline', 'start pipeline', 'start building', 'build feature list', 'pipeline status', 'pipeline logs', 'stop pipeline', 'retry feature', 'clean retry F-001'."
4
4
  ---
5
5
 
6
- # Dev-Pipeline Launcher
6
+ # Feature Pipeline Command Builder
7
7
 
8
- Launch the autonomous development pipeline from within an AI CLI conversation. Only Background daemon mode is fully detached and survives AI CLI session closure; Foreground runs in the current session, and Manual prints commands without launching.
8
+ Build commands for the autonomous feature pipeline from within an AI CLI conversation. This skill reads configuration and planning inputs, asks only the choices needed to construct an accurate command, displays the command and its effects, then stops.
9
9
 
10
- Three execution modes are available (Foreground / Background daemon / Manual); they are defined authoritatively in **Intent A, step 5** below.
10
+ ## Command-Only Boundary
11
11
 
12
- ### When to Use
12
+ This skill:
13
13
 
14
- **Start pipeline** -- User says:
15
- - "run feature pipeline", "run pipeline", "start building features", "launch feature pipeline"
16
- - "start implementing", "execute feature list", "build all features"
17
- - After feature-planner completes: "build them", "start building from the list"
18
- - Supports running a feature subset (e.g. "run only F-001 to F-005", "run features F-001,F-003").
14
+ - reads a validated feature list and relevant configuration;
15
+ - builds prerequisite-check, start, status, logs, stop, and retry commands;
16
+ - explains command effects and destructive options before returning them;
17
+ - never executes shell commands, starts processes, follows logs, changes pipeline state, implements source code, or runs verification.
19
18
 
20
- **Check status** -- User says:
21
- - "pipeline status", "feature progress", "check the pipeline", "how's the build going"
19
+ Do not invoke another workflow or implementation skill from this command builder. The user decides where and when to run the returned command.
22
20
 
23
- **Stop pipeline** -- User says:
24
- - "stop pipeline", "stop the pipeline", "halt pipeline", "pause the build"
21
+ ## When to Use
25
22
 
26
- **Show logs** -- User says:
27
- - "pipeline logs", "show pipeline logs", "what's building"
23
+ Use this skill for:
28
24
 
29
- **Retry single feature** -- User says:
30
- - "retry F-001", "re-run F-001", "retry this feature"
25
+ - constructing a foreground or background-daemon feature pipeline command;
26
+ - selecting a feature subset such as `F-001:F-005` or `F-001,F-003`;
27
+ - constructing status, logs, stop, or retry commands;
28
+ - translating user-selected runtime options into environment variables.
31
29
 
32
- **Do NOT use this skill when:**
33
- - User wants to plan features (use `feature-planner` instead)
34
- - User wants to implement a single feature manually within current session (use `prizmkit-implement`)
35
- - User wants to define specs/plan (use `prizmkit-plan`)
30
+ Do not use it to:
36
31
 
37
- ### Prerequisites
32
+ - create or modify `.prizmkit/plans/feature-list.json` — use `feature-planner`;
33
+ - implement a feature in the current conversation;
34
+ - execute, monitor, or verify a pipeline run.
38
35
 
39
- Before any action, validate:
36
+ ## Inputs
40
37
 
41
- 1. **dev-pipeline exists**: Confirm `.prizmkit/dev-pipeline/cli.py` is present
42
- 2. **For start**: `.prizmkit/plans/feature-list.json` must exist in `.prizmkit/plans/` (or user-specified path)
43
- 3. **Dependencies**: `python3`, `git`, and the configured AI CLI must be in PATH. Resolve and report the AI CLI from `AI_CLI` env, then `.prizmkit/config.json` `ai_cli`, then fallback to `claude` only when neither is configured. Read `${SKILL_DIR}/references/configuration.md` §Configured AI CLI Prerequisite Check before running the AI CLI check.
44
- 4. **Python version**: Requires Python 3.10+ for the unified dev-pipeline runtime
45
- 5. **Browser tools** (optional): If any feature has `browser_interaction` field, check the corresponding tool is available. Features may specify `tool: "playwright-cli"`, `tool: "opencli"`, or `tool: "auto"` (AI chooses at runtime).
38
+ Default paths:
46
39
 
47
- Quick check:
48
- ```bash
49
- command -v python3 >/dev/null && command -v git >/dev/null && echo "Core dependencies OK"
50
- # AI CLI check: read `${SKILL_DIR}/references/configuration.md` §Configured AI CLI Prerequisite Check.
51
- # It must print `Configured AI CLI: <name>` and verify that exact executable.
52
- # Optional: browser interaction support (check both tools — features may use either)
53
- command -v playwright-cli && echo "playwright-cli OK" || echo "playwright-cli not found (playwright browser verification will be skipped)"
54
- command -v opencli && echo "opencli OK" || echo "opencli not found (opencli browser verification will be skipped)"
55
- ```
40
+ - Runtime CLI: `.prizmkit/dev-pipeline/cli.py`
41
+ - Feature plan: `.prizmkit/plans/feature-list.json`
56
42
 
57
- If `.prizmkit/plans/feature-list.json` is missing, inform user:
58
- > "No .prizmkit/plans/feature-list.json found. Run the `feature-planner` skill first to generate one, or provide a path to your feature list."
43
+ Accept a user-specified feature-list path when provided. Read the plan directly to summarize IDs, titles, dependencies, and current statuses. If the plan is missing or malformed, report that a valid feature plan is required and stop without constructing a start command.
59
44
 
60
- ### Workflow
45
+ Read `${SKILL_DIR}/references/configuration.md` before constructing prerequisite or runtime option fragments.
61
46
 
62
- Detect user intent from their message, then follow the corresponding workflow:
47
+ ## Intent Routing
63
48
 
64
- ---
49
+ Classify the request before asking configuration questions:
65
50
 
66
- #### Intent A: Start Pipeline
51
+ | Intent | Output |
52
+ |---|---|
53
+ | Start all or selected features | Prerequisite-check command plus one start command |
54
+ | Check status | Daemon status and item-level status commands |
55
+ | Show logs | Recent or follow-log command |
56
+ | Stop | Daemon stop command plus optional status command |
57
+ | Retry one feature | Standard or clean reset-and-run command with safety disclosure |
67
58
 
68
- > **Execution model**: The pipeline processes eligible features one at a time. The `dependencies` field is active: dependencies must complete before dependents are selected, and unrelated eligible items preserve stable list order.
59
+ Only the start intent uses the execution-mode and configuration rounds.
69
60
 
70
- 1. **Check prerequisites**:
71
- ```bash
72
- ls .prizmkit/plans/feature-list.json 2>/dev/null && echo "Found" || echo "Missing"
73
- ```
61
+ ## Start Command Workflow
74
62
 
75
- 2. **Check not already running**:
76
- ```bash
77
- python3 ./.prizmkit/dev-pipeline/cli.py daemon feature status 2>/dev/null
78
- ```
79
- If running, inform user and ask: "Pipeline is already running. Want to restart it, check status, or view logs?"
63
+ ### Step 1: Resolve inputs
80
64
 
81
- 3. **Show feature summary** (so user knows what will be built):
82
- ```bash
83
- python3 -c "
84
- import json
85
- with open('.prizmkit/plans/feature-list.json') as f:
86
- data = json.load(f)
87
- features = data.get('features', [])
88
- print(f'Total features: {len(features)}')
89
- for f in features:
90
- print(f\" {f['id']}: {f.get('title', 'untitled')}\")
91
- "
92
- ```
93
- If pipeline state already exists, use the status command instead:
94
- ```bash
95
- python3 ./.prizmkit/dev-pipeline/cli.py feature status .prizmkit/plans/feature-list.json
96
- ```
65
+ 1. Resolve the feature-list path.
66
+ 2. Read the list and summarize total, eligible, blocked, and selected feature IDs.
67
+ 3. Preserve an explicit user feature filter. Do not invent a subset.
68
+ 4. If an existing run is suspected from user context, include a status command in the output; do not run it.
97
69
 
98
- 4. **Run environment preflight checks** (database connectivity, migrations, dev server):
70
+ ### Step 2: Ask execution mode
99
71
 
100
- Run the preflight script to auto-detect the database type, verify env vars, test connectivity, and check migration status:
101
- ```bash
102
- python3 <feature-pipeline-launcher-skill-dir>/scripts/preflight-check.py .prizmkit/plans/feature-list.json
103
- ```
72
+ Use one `AskUserQuestion` call with exactly one question:
104
73
 
105
- Replace `<feature-pipeline-launcher-skill-dir>` with the resolved skill directory path before running. Do not execute a literal unresolved `${SKILL_DIR}` shell variable.
74
+ - **Foreground (Recommended)** build `feature run`; output remains attached to the user's terminal.
75
+ - **Background daemon** — build `daemon feature start`; the runtime manages detached execution and logs.
106
76
 
107
- The script:
108
- - Reads `global_context.database` from `.prizmkit/plans/feature-list.json` and `.prizmkit/config.json`
109
- - Scans `.env.local` / `.env` for connection variables (supports Supabase, PostgreSQL, MySQL, MongoDB, Firebase, and generic `DATABASE_URL`)
110
- - Tests connectivity using the appropriate method per database type
111
- - Checks migration status (Prisma, Drizzle, Supabase raw SQL, or generic migration directories)
112
- - Checks if the dev server is running (from `browser_interaction` URLs)
113
- - Outputs `PREFLIGHT ✓` (pass), `PREFLIGHT ⚠` (warning), or `PREFLIGHT ℹ` (info) lines
114
- - Exits 0 (all clear), 1 (warnings found), or 2 (error — feature list not found)
77
+ Wait for the response before asking configuration.
115
78
 
116
- If the script reports `⚠` warnings, present them to the user and ask:
117
- > "Environment preflight found issues (listed above). The pipeline can still run, but database-related features may produce code that passes mock tests without real database verification. Continue anyway?"
118
-
119
- Wait for user confirmation. If they want to fix issues first, suggest remediation based on the warnings (apply migrations, configure env vars, check database service status).
120
-
121
- If `global_context.database` is absent and no features mention database keywords, the script skips DB checks automatically.
122
-
123
- 5. **Ask execution mode** (first user decision):
124
-
125
- **RULE: Ask step 5 and step 6 in separate `AskUserQuestion` calls.** Combining them makes the model merge the questions and skip the mode selection. Ask execution mode ALONE here, wait for the response, THEN proceed to step 6.
126
-
127
- Use `AskUserQuestion` with exactly 1 question:
128
-
129
- **Question 1 — Execution mode** (multiSelect: false):
130
- - Foreground (Recommended) — pipeline runs in the current session via `python3 ./.prizmkit/dev-pipeline/cli.py feature run`. Visible output and direct error feedback.
131
- - Background daemon — pipeline runs fully detached via `python3 ./.prizmkit/dev-pipeline/cli.py daemon feature start .prizmkit/plans/feature-list.json`. Survives AI CLI session closure.
132
- - Manual — display the final assembled commands only. Do not execute anything. User runs them on their own.
133
-
134
- STOP HERE and wait for user response before continuing to step 6.
135
-
136
- 6. **Ask configuration options** — MANDATORY INTERACTIVE STEP, applies to ALL execution modes (Foreground, Background, AND Manual). This is a SEPARATE `AskUserQuestion` call from step 5 (see the RULE above). You MUST call `AskUserQuestion` with the 4 questions below and WAIT for the user's response before proceeding to step 7. Do NOT assume defaults, do NOT show the command as text and ask "ready?", and do NOT merge step 6 and step 7. If you find yourself writing the final command before the user has answered these 4 questions, STOP — you are violating this rule.
137
-
138
- Use `AskUserQuestion` to present ALL 3 configuration choices:
139
-
140
- **Question 1 — Verbose logging** (multiSelect: false):
141
- - On (default) — Detailed AI session logs including tool calls and subagent activity
142
- - Off — Minimal logging
143
-
144
- **Question 2 — Max retries** (multiSelect: false):
145
- - 3 (default)
146
- - 1
147
- - 5
148
-
149
- **Question 3 — Advanced config?** (multiSelect: false):
150
- - No (default) — Use defaults for failure behavior
151
- - Yes — Configure stop-on-failure, deploy-after-completion, and reasoning effort options
152
-
153
- **If user chose "Yes" to Advanced config**, ask a second round of `AskUserQuestion` — see the advanced config questions (stop-on-failure, deploy-after-completion, reasoning effort) in `${SKILL_DIR}/references/configuration.md`.
154
-
155
- Read `${SKILL_DIR}/references/configuration.md` for the current environment-variable mapping and advanced environment-variable tables.
156
-
157
-
158
- 7. **Show final command**: After user confirms configuration in step 6, assemble the complete command from execution mode + user-confirmed configuration, and present it to the user.
159
-
160
- **Foreground command:**
161
- ```bash
162
- VERBOSE=1 python3 ./.prizmkit/dev-pipeline/cli.py feature run .prizmkit/plans/feature-list.json
163
- ```
164
- Selected-options example:
165
- ```bash
166
- VERBOSE=1 MAX_RETRIES=5 STOP_ON_FAILURE=1 ENABLE_DEPLOY=1 PRIZMKIT_EFFORT=high \
167
- python3 ./.prizmkit/dev-pipeline/cli.py feature run .prizmkit/plans/feature-list.json --features F-001:F-005
168
- ```
169
-
170
- **Background daemon command:**
171
- ```bash
172
- python3 ./.prizmkit/dev-pipeline/cli.py daemon feature start .prizmkit/plans/feature-list.json --env "VERBOSE=1"
173
- ```
174
- Selected-options example:
175
- ```bash
176
- python3 ./.prizmkit/dev-pipeline/cli.py daemon feature start .prizmkit/plans/feature-list.json --features F-001:F-005 \
177
- --env "VERBOSE=1 MAX_RETRIES=5 STOP_ON_FAILURE=1 ENABLE_DEPLOY=1 PRIZMKIT_EFFORT=high"
178
- ```
179
-
180
- **Manual mode**: Print the assembled command(s) and **stop here**. Do not execute anything. Do not proceed to step 8.
181
- ```
182
- # To run in foreground:
183
- VERBOSE=1 python3 ./.prizmkit/dev-pipeline/cli.py feature run .prizmkit/plans/feature-list.json
184
-
185
- # To run in background (detached):
186
- python3 ./.prizmkit/dev-pipeline/cli.py daemon feature start .prizmkit/plans/feature-list.json --env "VERBOSE=1"
187
-
188
- # To check status:
189
- python3 ./.prizmkit/dev-pipeline/cli.py feature status .prizmkit/plans/feature-list.json
190
- ```
79
+ ### Step 3: Ask base configuration
191
80
 
192
- 8. **Confirm and launch** (Foreground and Background only — Manual mode ends at step 7):
81
+ Use a separate `AskUserQuestion` call with exactly three questions:
193
82
 
194
- Use a separate `AskUserQuestion` call: "Ready to launch the pipeline with the above command?"
195
- Options:
196
- - Launch now (Recommended)
197
- - Cancel
83
+ 1. **Verbose logging** On or Off.
84
+ 2. **Max retries** — 3, 1, 5, or a user-provided non-negative integer.
85
+ 3. **Advanced config** — No or Yes.
198
86
 
199
- After user confirms, execute the command from step 7.
87
+ If Advanced config is Yes, load the advanced question set from `${SKILL_DIR}/references/configuration.md`. Advanced configuration contains only stop-on-failure and reasoning effort.
200
88
 
201
- 9. **Post-launch** (depends on execution mode):
89
+ ### Step 4: Build command fragments
202
90
 
203
- **If foreground**: Pipeline runs to completion in the terminal. After it finishes:
204
- - Summarize results: total features, succeeded, failed, skipped
205
- - If all succeeded: each feature session has already run `prizmkit-retrospective` internally. Ask user what's next.
206
- - If some failed: show failed feature IDs and suggest `python3 ./.prizmkit/dev-pipeline/cli.py reset feature <F-XXX> --clean --run` for a fresh retry
207
- - **Browser verification**: If any completed features have `browser_interaction` and the corresponding browser tool (`playwright-cli` or `opencli`) is installed, offer to run browser verification (see Post-Pipeline Browser Verification)
91
+ Map confirmed choices to environment variables using `${SKILL_DIR}/references/configuration.md`.
208
92
 
209
- **If background daemon**:
210
- 1. Verify launch:
211
- ```bash
212
- python3 ./.prizmkit/dev-pipeline/cli.py daemon feature status
213
- ```
214
- 2. Start log monitoring — Use the Bash tool with `run_in_background: true`:
215
- ```bash
216
- python3 ./.prizmkit/dev-pipeline/cli.py daemon feature logs --follow
217
- ```
218
- 3. Report to user:
219
- - Pipeline PID
220
- - Log file location
221
- - "You can ask me 'pipeline status' or 'show logs' at any time"
222
- - "Closing this session will NOT stop the pipeline"
93
+ Build the prerequisite-check command separately from the pipeline command so the user can inspect each action:
223
94
 
224
- ---
95
+ ```bash
96
+ command -v python3 >/dev/null && command -v git >/dev/null && test -f .prizmkit/dev-pipeline/cli.py && python3 -c 'import sys; raise SystemExit(0 if sys.version_info >= (3, 10) else 1)'
97
+ ```
225
98
 
226
- #### Intent B: Check Status
99
+ Also include the configured AI CLI check fragment from the reference. These are returned commands, not checks performed by this skill.
227
100
 
228
- 1. **Check daemon status**:
229
- ```bash
230
- python3 ./.prizmkit/dev-pipeline/cli.py daemon feature status
231
- ```
101
+ ### Step 5: Return the start command
232
102
 
233
- 2. **Show feature-level progress**:
234
- ```bash
235
- python3 ./.prizmkit/dev-pipeline/cli.py feature status .prizmkit/plans/feature-list.json
236
- ```
103
+ Foreground template:
237
104
 
238
- 3. **Show recent log activity** (last 20 lines):
239
- ```bash
240
- python3 ./.prizmkit/dev-pipeline/cli.py daemon feature logs --lines 20
241
- ```
105
+ ```bash
106
+ VERBOSE=1 MAX_RETRIES=3 \
107
+ python3 ./.prizmkit/dev-pipeline/cli.py feature run .prizmkit/plans/feature-list.json
108
+ ```
242
109
 
243
- 4. **Summarize** to user: total features, completed, in-progress, failed, pending.
110
+ Foreground subset template:
244
111
 
245
- ---
112
+ ```bash
113
+ VERBOSE=1 MAX_RETRIES=3 \
114
+ python3 ./.prizmkit/dev-pipeline/cli.py feature run .prizmkit/plans/feature-list.json --features F-001:F-005
115
+ ```
246
116
 
247
- #### Intent C: Stop Pipeline
117
+ Background template:
248
118
 
249
- 1. **Stop the daemon**:
250
- ```bash
251
- python3 ./.prizmkit/dev-pipeline/cli.py daemon feature stop
252
- ```
119
+ ```bash
120
+ python3 ./.prizmkit/dev-pipeline/cli.py daemon feature start .prizmkit/plans/feature-list.json \
121
+ --env "VERBOSE=1 MAX_RETRIES=3"
122
+ ```
253
123
 
254
- 2. **Verify stopped**:
255
- ```bash
256
- python3 ./.prizmkit/dev-pipeline/cli.py daemon feature status 2>/dev/null || true
257
- ```
124
+ Background subset template:
258
125
 
259
- 3. **Inform user**: "Pipeline stopped. State is preserved -- you can resume later with 'start pipeline' and it will pick up where it left off."
126
+ ```bash
127
+ python3 ./.prizmkit/dev-pipeline/cli.py daemon feature start .prizmkit/plans/feature-list.json \
128
+ --features F-001:F-005 --env "VERBOSE=1 MAX_RETRIES=3"
129
+ ```
260
130
 
261
- ---
131
+ Return only the template matching the confirmed mode and options. Explain that the command has not been executed, then stop.
262
132
 
263
- #### Intent D: Show Logs
133
+ ## Status Command
264
134
 
265
- 1. **Check if running**:
266
- ```bash
267
- python3 ./.prizmkit/dev-pipeline/cli.py daemon feature status 2>/dev/null
268
- ```
135
+ Return both commands when the user asks for overall status:
269
136
 
270
- 2. **If running** -- Start live tail with Bash tool `run_in_background: true`:
271
- ```bash
272
- python3 ./.prizmkit/dev-pipeline/cli.py daemon feature logs --follow
273
- ```
137
+ ```bash
138
+ python3 ./.prizmkit/dev-pipeline/cli.py daemon feature status
139
+ python3 ./.prizmkit/dev-pipeline/cli.py feature status .prizmkit/plans/feature-list.json
140
+ ```
274
141
 
275
- 3. **If not running** -- Show last 50 lines:
276
- ```bash
277
- python3 ./.prizmkit/dev-pipeline/cli.py daemon feature logs --lines 50
278
- ```
142
+ Do not infer completion from the plan file alone when runtime state may exist.
279
143
 
280
- 4. **For per-feature session logs** (when user asks about a specific feature):
281
- ```bash
282
- # Check feature status for last session ID
283
- cat .prizmkit/state/features/<FEATURE_ID>/status.json 2>/dev/null
284
- # Then tail that feature's session log
285
- tail -100 .prizmkit/state/features/<FEATURE_ID>/sessions/<SESSION_ID>/logs/session.log
286
- ```
144
+ ## Logs Command
287
145
 
288
- ---
146
+ Recent logs:
289
147
 
290
- #### Intent E: Retry Single Feature Node
148
+ ```bash
149
+ python3 ./.prizmkit/dev-pipeline/cli.py daemon feature logs --lines 50
150
+ ```
291
151
 
292
- When user says "retry F-003" or "clean retry F-003":
152
+ Follow logs:
293
153
 
294
154
  ```bash
295
- python3 ./.prizmkit/dev-pipeline/cli.py reset feature F-003 --clean --run .prizmkit/plans/feature-list.json
155
+ python3 ./.prizmkit/dev-pipeline/cli.py daemon feature logs --follow
296
156
  ```
297
157
 
298
- Notes:
299
- - `python3 ./.prizmkit/dev-pipeline/cli.py reset feature <F-XXX> --clean --run .prizmkit/plans/feature-list.json` performs a full clean (deletes session history and artifacts) before retrying the selected feature — this gives a fresh start.
300
- - Keep pipeline daemon mode for main run management (`python3 ./.prizmkit/dev-pipeline/cli.py daemon feature start`, `python3 ./.prizmkit/dev-pipeline/cli.py daemon feature status`, or `python3 ./.prizmkit/dev-pipeline/cli.py daemon feature stop`).
158
+ When the user names a specific feature, also explain that per-feature session paths can be identified from `.prizmkit/state/features/<FEATURE_ID>/status.json`; do not read or tail them from this skill.
301
159
 
302
- ---
160
+ ## Stop Command
161
+
162
+ Return:
163
+
164
+ ```bash
165
+ python3 ./.prizmkit/dev-pipeline/cli.py daemon feature stop
166
+ ```
303
167
 
304
- #### Post-Pipeline Browser Verification
168
+ Optionally include the daemon status command for the user to run afterward. Do not claim the pipeline stopped until runtime output confirms it.
305
169
 
306
- After pipeline completion, if features have `browser_interaction` fields and the corresponding browser tool (`playwright-cli` or `opencli`) is installed:
170
+ ## Retry Command
307
171
 
308
- If list status may be stale, use the runtime status command as the source of truth for completion state:
309
- `python3 ./.prizmkit/dev-pipeline/cli.py feature status .prizmkit/plans/feature-list.json`.
172
+ A reset can discard uncommitted changes when the target task branch is currently checked out. Clean reset additionally deletes the task branch and clears its task history/artifacts. Never hide these effects behind the word “retry.”
310
173
 
311
- 1. **Check which completed features have browser verification configured**:
312
- - Read `browser_interaction` configuration from `.prizmkit/plans/feature-list.json`.
313
- - Use the runtime status command output to decide which configured features are actually completed.
314
- - Do not rely on list-file `status` alone when runtime state exists, because daemon/foreground bookkeeping may be newer than the plan file.
174
+ Use `AskUserQuestion` before constructing a retry command:
315
175
 
316
- 2. **Ask user**: "N features have browser verification configured. Run browser verification now? (Y/n)"
176
+ - **Standard retry (Recommended)** reset task status and rerun while preserving a non-current task branch; warn that an active task branch may still have uncommitted changes discarded by reset.
177
+ - **Clean retry** — perform the standard reset and also delete the task branch and clear task history/artifacts.
178
+ - **Cancel** — return no reset command.
317
179
 
318
- 3. **If yes**, for each qualifying feature:
319
- - Start dev server if `setup_command` is specified
320
- - Select browser tool based on `browser_interaction.tool`:
321
- - `"playwright-cli"` Use `playwright-cli snapshot` to discover element refs, then verify each goal in `verify_steps`
322
- - `"opencli"` → Use `opencli browser` to interact with Chrome's logged-in session (ideal for OAuth/third-party verification)
323
- - `"auto"` → AI chooses the appropriate tool based on context (default: `playwright-cli` for local dev, `opencli` for authenticated flows)
324
- - Take a screenshot after verification
325
- - Close browser and stop dev server
180
+ Standard template:
181
+
182
+ ```bash
183
+ python3 ./.prizmkit/dev-pipeline/cli.py reset feature F-001 --run .prizmkit/plans/feature-list.json
184
+ ```
326
185
 
327
- 4. **Report results**:
328
- - For each feature: URL opened, tool used, steps executed, screenshot path
329
- - If any step fails: flag as verification failure
186
+ Clean template:
330
187
 
331
- **Important**: Browser verification is best-effort — failures here do NOT change the feature's pipeline status. They serve as visual confirmation aids for the user.
188
+ ```bash
189
+ python3 ./.prizmkit/dev-pipeline/cli.py reset feature F-001 --clean --run .prizmkit/plans/feature-list.json
190
+ ```
332
191
 
333
- ---
192
+ For clean retry, require explicit acknowledgement of branch deletion and possible uncommitted-change loss before displaying the command.
334
193
 
335
- ### Error Handling
194
+ ## Output Contract
336
195
 
337
- Read `${SKILL_DIR}/references/configuration.md` for the full error handling table covering feature-list, dependency checks, pipeline state, browser tooling, permission, and deploy failures.
196
+ For every request, return:
338
197
 
339
- ### Integration Notes
198
+ 1. Intent and resolved target.
199
+ 2. Input plan path and selected IDs, when applicable.
200
+ 3. Assumptions and safety warnings.
201
+ 4. Exact command block.
202
+ 5. `Command execution: not performed by this skill.`
340
203
 
341
- - **After feature-planner**: This is the natural next step. When user finishes planning and has `.prizmkit/plans/feature-list.json`, suggest launching the pipeline.
342
- - **Session independence**: Only Background daemon mode runs detached. Foreground runs in the current AI CLI session, and Manual mode prints commands without launching.
343
- - **Single instance per family**: Only one feature pipeline can run at a time. Different pipeline families may coexist because they use separate daemon metadata and state directories.
344
- - **Pipeline coexistence**: Feature, bugfix, and refactor pipelines use separate state directories (`.prizmkit/state/features/`, `.prizmkit/state/bugfix/`, `.prizmkit/state/refactor/`), so all three can run simultaneously without conflict.
345
- - **State preservation**: Stopping and restarting the pipeline resumes from where it left off -- completed features are not re-run.
346
- - **HANDOFF**: After pipeline completes all features, each session has already run `prizmkit-retrospective` internally. Ask user what's next.
204
+ Never report command success, process IDs, log locations, task completion, verification results, or state changes unless the user later supplies authoritative runtime output for explanation.
@@ -1,50 +1,28 @@
1
- # Configuration Reference — Feature Pipeline Launcher
1
+ # Configuration Reference — Feature Pipeline Command Builder
2
2
 
3
- Environment variable mappings for the feature launcher.
3
+ Use this reference only to translate confirmed user choices into command fragments. The skill returns commands; it does not execute them.
4
4
 
5
- ## Advanced Config Questions (second AskUserQuestion round)
5
+ ## Configured AI CLI Prerequisite Command
6
6
 
7
- Asked only when the user chose "Yes" to Advanced config in step 6.
7
+ Runtime AI CLI selection is config-driven. Resolve the executable in this order:
8
8
 
9
- **Question 1 Stop on failure** (multiSelect: false):
10
- - Off (default) — Pipeline continues to next task after failure
11
- - On Pipeline halts immediately when a task exhausts all retries (`STOP_ON_FAILURE=1`)
9
+ 1. `AI_CLI` environment variable.
10
+ 2. `.prizmkit/config.json` `ai_cli`.
11
+ 3. `claude` only when neither is configured.
12
12
 
13
- **Question 2 Deploy after completion?** (multiSelect: false):
14
- - No (default) — Skip deployment after pipeline completes
15
- - Yes — Run /prizmkit-deploy automatically after all features complete successfully (`ENABLE_DEPLOY=1`). Deployment is blocked if any feature did not complete successfully (status not 'completed' or manually 'skipped').
13
+ Return this check command as part of start-command preparation:
16
14
 
17
- **Question 3 — Reasoning effort** (multiSelect: false):
18
- - Default (none) — Use CLI default
19
- - low — Minimize reasoning, fastest output (`PRIZMKIT_EFFORT=low`)
20
- - medium — Moderate reasoning (`PRIZMKIT_EFFORT=medium`)
21
- - high — Thorough reasoning for complex tasks (`PRIZMKIT_EFFORT=high`)
22
- - xhigh — Extensive reasoning (`PRIZMKIT_EFFORT=xhigh`)
23
- - max — Maximum reasoning, Claude Code only (`PRIZMKIT_EFFORT=max`)
24
-
25
- ## Configured AI CLI Prerequisite Check
26
-
27
- Read this section during launcher prerequisite validation before reporting AI CLI availability.
28
-
29
- Runtime AI CLI selection is config-driven. Resolve the executable name in this order:
30
- 1. `AI_CLI` environment variable when set.
31
- 2. `.prizmkit/config.json` `ai_cli` when present.
32
- 3. `claude` fallback only when neither is configured.
33
-
34
- Run this quick check from the project root:
35
15
  ```bash
36
- command -v python3 >/dev/null && command -v git >/dev/null || { echo "python3 or git missing"; exit 1; }
37
16
  AI_CLI="$(
38
17
  python3 - <<'PY'
39
18
  import json, os, shlex
40
19
  from pathlib import Path
41
20
  cli = os.environ.get("AI_CLI", "").strip()
42
21
  if not cli:
43
- config_path = Path(".prizmkit/config.json")
44
- if config_path.is_file():
22
+ path = Path(".prizmkit/config.json")
23
+ if path.is_file():
45
24
  try:
46
- data = json.loads(config_path.read_text(encoding="utf-8"))
47
- cli = str(data.get("ai_cli") or "").strip()
25
+ cli = str(json.loads(path.read_text(encoding="utf-8")).get("ai_cli") or "").strip()
48
26
  except (OSError, json.JSONDecodeError):
49
27
  cli = ""
50
28
  cli = cli or "claude"
@@ -55,56 +33,37 @@ except ValueError:
55
33
  PY
56
34
  )"
57
35
  printf 'Configured AI CLI: %s\n' "$AI_CLI"
58
- command -v "$AI_CLI" >/dev/null && printf 'AI CLI OK: %s\n' "$(command -v "$AI_CLI")" || { printf 'AI CLI not found: %s\n' "$AI_CLI"; exit 1; }
59
- echo "All dependencies OK"
36
+ command -v "$AI_CLI" >/dev/null
60
37
  ```
61
38
 
62
- Report the configured executable, for example `Configured AI CLI: claude`. Do not report the first arbitrary PATH match such as `cbc` when project config selects a different AI CLI.
39
+ Do not claim the configured executable exists until the user supplies successful command output.
63
40
 
64
- ## Environment Variable Mapping
41
+ ## Base Configuration Mapping
65
42
 
66
- Translating user responses to env vars:
43
+ | Choice | Command fragment |
44
+ |---|---|
45
+ | Verbose Off | `VERBOSE=0` |
46
+ | Verbose On | `VERBOSE=1` |
47
+ | Max retries N | `MAX_RETRIES=N` |
67
48
 
68
- | Config choice | Environment variable |
69
- |-----------|---------------------|
70
- | Verbose: Off | `VERBOSE=0` |
71
- | Verbose: On | `VERBOSE=1` |
72
- | Max retries: N | `MAX_RETRIES=N` |
73
- | Stop on failure: On | `STOP_ON_FAILURE=1` |
74
- | Deploy: Yes | `ENABLE_DEPLOY=1` |
75
- | Effort: value | `PRIZMKIT_EFFORT=<value>` |
49
+ ## Advanced Configuration Questions
76
50
 
77
- ## Advanced Environment Variables
51
+ Ask only when the user selected Advanced config.
78
52
 
79
- Not exposed in interactive menu, pass via `--env`:
53
+ 1. **Stop on failure**
54
+ - Off (default) — continue to other eligible tasks after a task exhausts retries.
55
+ - On — add `STOP_ON_FAILURE=1`.
56
+ 2. **Reasoning effort**
57
+ - Default — omit `PRIZMKIT_EFFORT`.
58
+ - `low`, `medium`, `high`, `xhigh`, or `max` — add `PRIZMKIT_EFFORT=<value>` after confirming the configured AI CLI supports it.
80
59
 
81
- | Variable | Default | Purpose |
82
- |----------|---------|---------|
83
- | `MODEL` | (none) | AI model override (e.g. `claude-opus-4.6`) |
84
- | `AUTO_PUSH` | `0` | Auto-push to remote after successful feature (`1` to enable) |
85
- | `DEV_BRANCH` | auto-generated | Custom dev branch name (default: `dev/{feature_id}-YYYYMMDDHHmm`) |
86
- | `HEARTBEAT_INTERVAL` | `30` | Heartbeat log interval in seconds |
87
- | `HEARTBEAT_STALE_THRESHOLD` | `600` | Max seconds without heartbeat before marking stale |
88
- | `PIPELINE_MODE` | (none) | Override mode for all features: `lite`\|`standard`\|`full` |
60
+ These are the complete advanced choices for this command builder.
89
61
 
90
- ## Error Handling
62
+ ## Command Construction Rules
91
63
 
92
- | Error | Action |
93
- |-------|--------|
94
- | `.prizmkit/plans/feature-list.json` not found | Tell user to run `feature-planner` skill first |
95
- | `python3` not installed | Install Python 3.10+ and rerun the Python runtime command |
96
- | `git` not installed | Install git; the Python runtime uses git for branch/worktree/status operations |
97
- | Configured AI CLI not in PATH | Install the executable selected by `AI_CLI` or `.prizmkit/config.json` `ai_cli`, or update the config to a CLI available in PATH. |
98
- | Pipeline already running | Show status, ask if user wants to stop and restart |
99
- | PID file stale (process dead) | `python3 ./.prizmkit/dev-pipeline/cli.py daemon feature start .prizmkit/plans/feature-list.json` auto-cleans, retry start |
100
- | Launch failed (process died immediately) | Show last 20 lines of log: `python3 ./.prizmkit/dev-pipeline/cli.py daemon feature logs --lines 20` |
101
- | Feature stuck/blocked | Use `python3 ./.prizmkit/dev-pipeline/cli.py reset feature <F-XXX> --clean --run` for a fresh retry |
102
- | All features blocked/failed | Show status, suggest daemon-safe recovery: `python3 ./.prizmkit/dev-pipeline/cli.py reset feature <F-XXX> --clean --run .prizmkit/plans/feature-list.json` |
103
- | `playwright-cli` not installed | Browser verification skipped for playwright features (non-blocking). Suggest: `npm install -g @playwright/cli@latest && playwright-cli install --skills` |
104
- | `opencli` not installed | Browser verification skipped for opencli features (non-blocking). Install opencli for Chrome session-based browser verification |
105
- | Permission denied running Python CLI | Ensure Python is installed and the command uses `python3 ./.prizmkit/dev-pipeline/cli.py ...` |
106
- | Pipeline stop failed (process won't die) | Process may be stuck in I/O wait. Try `kill -9 <PID>` manually. Check for orphaned child processes with `ps aux \| grep claude` |
107
- | Deploy session failed | Pipeline completed but deploy session exited non-zero. Check `.prizmkit/state/features/deploy/<session_id>/logs/session.log`. Retry manually: `/prizmkit-deploy`. |
108
- | `.env.local` missing or incomplete | Warn: database connection variables not found. Suggest creating env file with required connection variables for the project's database |
109
- | Database unreachable | Warn: database features will produce mock-only tests. Suggest checking database service status and connection credentials |
110
- | Migrations not applied | Warn: tables or schema referenced in migration files not found in database. Suggest applying pending migrations |
64
+ - Foreground: place environment assignments before `python3`.
65
+ - Background daemon: place assignments inside one `--env "..."` value.
66
+ - Include only confirmed options.
67
+ - Preserve the user-provided list path and feature filter.
68
+ - Shell-quote custom paths and values.
69
+ - Return one start command for the selected mode, never both.