prizmkit 1.1.57 → 1.1.60
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/bin/create-prizmkit.js +8 -6
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/codex/agent-adapter.js +38 -0
- package/bundled/adapters/codex/paths.js +27 -0
- package/bundled/adapters/codex/rules-adapter.js +30 -0
- package/bundled/adapters/codex/settings-adapter.js +27 -0
- package/bundled/adapters/codex/skill-adapter.js +65 -0
- package/bundled/adapters/codex/team-adapter.js +37 -0
- package/bundled/dev-pipeline/.env.example +2 -1
- package/bundled/dev-pipeline/README.md +10 -7
- package/bundled/dev-pipeline/lib/common.sh +278 -37
- package/bundled/dev-pipeline/run-bugfix.sh +10 -61
- package/bundled/dev-pipeline/run-feature.sh +10 -78
- package/bundled/dev-pipeline/run-recovery.sh +10 -46
- package/bundled/dev-pipeline/run-refactor.sh +10 -61
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +17 -7
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -3
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +9 -3
- package/bundled/dev-pipeline/scripts/utils.py +6 -4
- package/bundled/dev-pipeline-windows/.env.example +28 -0
- package/bundled/dev-pipeline-windows/README.md +30 -0
- package/bundled/dev-pipeline-windows/SCHEMA_ANALYSIS.md +525 -0
- package/bundled/dev-pipeline-windows/assets/feature-list-example.json +146 -0
- package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +138 -0
- package/bundled/dev-pipeline-windows/launch-bugfix-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/launch-feature-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/launch-refactor-daemon.ps1 +9 -0
- package/bundled/dev-pipeline-windows/lib/common.ps1 +432 -0
- package/bundled/dev-pipeline-windows/lib/daemon.ps1 +140 -0
- package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +446 -0
- package/bundled/dev-pipeline-windows/lib/reset.ps1 +87 -0
- package/bundled/dev-pipeline-windows/reset-bug.ps1 +9 -0
- package/bundled/dev-pipeline-windows/reset-feature.ps1 +9 -0
- package/bundled/dev-pipeline-windows/reset-refactor.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-bugfix.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-feature.ps1 +9 -0
- package/bundled/dev-pipeline-windows/run-recovery.ps1 +76 -0
- package/bundled/dev-pipeline-windows/run-refactor.ps1 +9 -0
- package/bundled/dev-pipeline-windows/scripts/check-session-status.py +228 -0
- package/bundled/dev-pipeline-windows/scripts/cleanup-logs.py +192 -0
- package/bundled/dev-pipeline-windows/scripts/detect-stuck.py +530 -0
- package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +1737 -0
- package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +685 -0
- package/bundled/dev-pipeline-windows/scripts/generate-recovery-prompt.py +805 -0
- package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +763 -0
- package/bundled/dev-pipeline-windows/scripts/init-bugfix-pipeline.py +316 -0
- package/bundled/dev-pipeline-windows/scripts/init-dev-team.py +134 -0
- package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +380 -0
- package/bundled/dev-pipeline-windows/scripts/init-refactor-pipeline.py +399 -0
- package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +388 -0
- package/bundled/dev-pipeline-windows/scripts/patch-completion-notes.py +191 -0
- package/bundled/dev-pipeline-windows/scripts/update-bug-status.py +864 -0
- package/bundled/dev-pipeline-windows/scripts/update-checkpoint.py +173 -0
- package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +1501 -0
- package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +1073 -0
- package/bundled/dev-pipeline-windows/scripts/utils.py +542 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/critic-plan-challenge.md +7 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-fix.md +7 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +30 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-resume.md +5 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +7 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +46 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +43 -0
- package/bundled/dev-pipeline-windows/templates/bug-fix-list-schema.json +263 -0
- package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +320 -0
- package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +237 -0
- package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +331 -0
- package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +270 -0
- package/bundled/dev-pipeline-windows/templates/sections/ac-verification-checklist.md +13 -0
- package/bundled/dev-pipeline-windows/templates/sections/checkpoint-system.md +91 -0
- package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +33 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-agent.md +10 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-full.md +12 -0
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-lite.md +7 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-agent.md +8 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-full.md +9 -0
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-lite.md +6 -0
- package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +21 -0
- package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +31 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +72 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +63 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +62 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +71 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +64 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +23 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +24 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +12 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +53 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +32 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +37 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +50 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +52 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +27 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +29 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +77 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase0-init.md +13 -0
- package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +23 -0
- package/bundled/dev-pipeline-windows/templates/sections/session-context.md +5 -0
- package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +6 -0
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-agent.md +67 -0
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-lite.md +58 -0
- package/bundled/dev-pipeline-windows/templates/session-status-schema.json +83 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +26 -18
- package/bundled/skills/app-planner/references/architecture-decisions.md +9 -5
- package/bundled/skills/app-planner/references/frontend-design-guide.md +1 -1
- package/bundled/skills/feature-planner/SKILL.md +9 -2
- package/bundled/skills/prizmkit-init/SKILL.md +7 -6
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +2 -0
- package/bundled/skills-windows/app-planner/SKILL.md +639 -0
- package/bundled/skills-windows/app-planner/assets/app-design-guide.md +101 -0
- package/bundled/skills-windows/app-planner/references/architecture-decisions.md +52 -0
- package/bundled/skills-windows/app-planner/references/brainstorm-guide.md +101 -0
- package/bundled/skills-windows/app-planner/references/frontend-design-guide.md +71 -0
- package/bundled/skills-windows/app-planner/references/project-brief-guide.md +82 -0
- package/bundled/skills-windows/app-planner/references/red-team-checklist.md +40 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +609 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/fixed-rules.md +285 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/question-bank.md +249 -0
- package/bundled/skills-windows/app-planner/references/rules/backend/template.md +173 -0
- package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +373 -0
- package/bundled/skills-windows/app-planner/references/rules/database/fixed-rules.md +211 -0
- package/bundled/skills-windows/app-planner/references/rules/database/question-bank.md +184 -0
- package/bundled/skills-windows/app-planner/references/rules/database/template.md +158 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +810 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/fixed-rules.md +188 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +302 -0
- package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +320 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +639 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/fixed-rules.md +290 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/question-bank.md +232 -0
- package/bundled/skills-windows/app-planner/references/rules/mobile/template.md +175 -0
- package/bundled/skills-windows/bug-fix-workflow/SKILL.md +415 -0
- package/bundled/skills-windows/bug-planner/SKILL.md +395 -0
- package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +43 -0
- package/bundled/skills-windows/bug-planner/references/critic-and-verification.md +44 -0
- package/bundled/skills-windows/bug-planner/references/error-recovery.md +73 -0
- package/bundled/skills-windows/bug-planner/references/input-formats.md +53 -0
- package/bundled/skills-windows/bug-planner/references/schema-validation.md +25 -0
- package/bundled/skills-windows/bug-planner/references/severity-rules.md +16 -0
- package/bundled/skills-windows/bug-planner/scripts/validate-bug-list.py +322 -0
- package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +380 -0
- package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +441 -0
- package/bundled/skills-windows/feature-pipeline-launcher/scripts/preflight-check.py +462 -0
- package/bundled/skills-windows/feature-planner/SKILL.md +401 -0
- package/bundled/skills-windows/feature-planner/assets/evaluation-guide.md +64 -0
- package/bundled/skills-windows/feature-planner/assets/planning-guide.md +214 -0
- package/bundled/skills-windows/feature-planner/references/browser-interaction.md +59 -0
- package/bundled/skills-windows/feature-planner/references/completeness-review.md +57 -0
- package/bundled/skills-windows/feature-planner/references/decomposition-patterns.md +75 -0
- package/bundled/skills-windows/feature-planner/references/error-recovery.md +90 -0
- package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +112 -0
- package/bundled/skills-windows/feature-planner/references/new-project-planning.md +85 -0
- package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +1029 -0
- package/bundled/skills-windows/feature-workflow/SKILL.md +531 -0
- package/bundled/skills-windows/prizmkit-init/SKILL.md +356 -0
- package/bundled/skills-windows/prizmkit-init/assets/project-brief-template.md +82 -0
- package/bundled/skills-windows/prizmkit-init/references/config-schema.md +68 -0
- package/bundled/skills-windows/prizmkit-init/references/rules/layer-detection.md +41 -0
- package/bundled/skills-windows/prizmkit-init/references/tech-stack-catalog.md +13 -0
- package/bundled/skills-windows/prizmkit-init/references/update-supplement.md +9 -0
- package/bundled/skills-windows/recovery-workflow/SKILL.md +456 -0
- package/bundled/skills-windows/recovery-workflow/evals/evals.json +46 -0
- package/bundled/skills-windows/recovery-workflow/scripts/detect-recovery-state.py +544 -0
- package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +406 -0
- package/bundled/skills-windows/refactor-planner/SKILL.md +540 -0
- package/bundled/skills-windows/refactor-planner/assets/planning-guide.md +292 -0
- package/bundled/skills-windows/refactor-planner/references/behavior-preservation.md +301 -0
- package/bundled/skills-windows/refactor-planner/references/refactor-scoping-guide.md +221 -0
- package/bundled/skills-windows/refactor-planner/scripts/validate-and-generate-refactor.py +858 -0
- package/bundled/skills-windows/refactor-workflow/SKILL.md +503 -0
- package/package.json +3 -2
- package/src/clean.js +73 -2
- package/src/config.js +159 -50
- package/src/detect-platform.js +16 -8
- package/src/external-skills.js +26 -19
- package/src/index.js +31 -9
- package/src/manifest.js +6 -2
- package/src/metadata.js +43 -5
- package/src/platforms.js +36 -0
- package/src/prompts.js +31 -6
- package/src/runtimes.js +20 -0
- package/src/scaffold.js +314 -110
- package/src/upgrade.js +81 -41
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
---
|
|
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)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Dev-Pipeline Launcher
|
|
7
|
+
|
|
8
|
+
Launch the autonomous development pipeline from within an AI CLI conversation. The pipeline runs as a fully detached background process -- closing the AI CLI session does NOT stop the pipeline.
|
|
9
|
+
|
|
10
|
+
### Execution Mode
|
|
11
|
+
|
|
12
|
+
Three execution modes are available. The user chooses one before configuring other options:
|
|
13
|
+
|
|
14
|
+
1. **Foreground** (recommended) — `.\.prizmkit\dev-pipeline\run-feature.ps1 run`. Visible output, direct error feedback, no orphaned processes.
|
|
15
|
+
2. **Background daemon** — `.\.prizmkit\dev-pipeline\launch-feature-daemon.ps1`. Runs fully detached, survives AI CLI session closure.
|
|
16
|
+
3. **Manual** — Display the assembled command(s) only. Do not execute anything. User runs them on their own.
|
|
17
|
+
|
|
18
|
+
### When to Use
|
|
19
|
+
|
|
20
|
+
**Start pipeline** -- User says:
|
|
21
|
+
- "run pipeline", "start pipeline", "start building", "launch dev-pipeline"
|
|
22
|
+
- "run the features", "execute feature list", "start implementing"
|
|
23
|
+
- "launch pipeline", "run the pipeline", "start auto-development"
|
|
24
|
+
- After feature-planner completes: "build it", "start developing from the feature list"
|
|
25
|
+
- "run only F-001 to F-005", "run features F-001,F-003", "only build these features"
|
|
26
|
+
|
|
27
|
+
**Check status** -- User says:
|
|
28
|
+
- "pipeline status", "check pipeline", "how's it going", "progress"
|
|
29
|
+
- "check progress", "what's the current situation"
|
|
30
|
+
|
|
31
|
+
**Stop pipeline** -- User says:
|
|
32
|
+
- "stop pipeline", "kill pipeline", "halt", "pause"
|
|
33
|
+
- "stop the pipeline", "pause the pipeline"
|
|
34
|
+
|
|
35
|
+
**Show logs** -- User says:
|
|
36
|
+
- "show logs", "pipeline logs", "tail logs", "what's happening"
|
|
37
|
+
- "view logs", "check the logs"
|
|
38
|
+
|
|
39
|
+
**Retry single feature node** -- User says:
|
|
40
|
+
- "retry F-003", "retry this feature", "retry this node", "re-run this feature"
|
|
41
|
+
|
|
42
|
+
**Do NOT use this skill when:**
|
|
43
|
+
- User wants to plan features (use `feature-planner` instead)
|
|
44
|
+
- User wants to implement a single feature manually within current session (use `prizmkit-implement`)
|
|
45
|
+
- User wants to define specs/plan (use `prizmkit-plan`)
|
|
46
|
+
|
|
47
|
+
### Prerequisites
|
|
48
|
+
|
|
49
|
+
Before any action, validate:
|
|
50
|
+
|
|
51
|
+
1. **dev-pipeline exists**: Confirm `.\.prizmkit\dev-pipeline\launch-feature-daemon.ps1` is present and executable
|
|
52
|
+
2. **For start**: `.prizmkit/plans/feature-list.json` must exist in `.prizmkit/plans/` (or user-specified path)
|
|
53
|
+
3. **Dependencies**: `python` or the Windows `py` launcher, `git`, and one AI CLI (`codex`, `claude`, or `cbc`) must be in PATH
|
|
54
|
+
4. **Python version**: Requires Python 3.8+ for dev-pipeline scripts
|
|
55
|
+
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).
|
|
56
|
+
|
|
57
|
+
Quick check:
|
|
58
|
+
```powershell
|
|
59
|
+
function Invoke-PrizmPython {
|
|
60
|
+
param([Parameter(ValueFromRemainingArguments = $true)][string[]]$Arguments)
|
|
61
|
+
$python = Get-Command python -ErrorAction SilentlyContinue
|
|
62
|
+
if ($python) {
|
|
63
|
+
& $python.Source -c 'import sys; raise SystemExit(0 if sys.version_info[0] == 3 else 1)' *> $null
|
|
64
|
+
if ($LASTEXITCODE -eq 0) {
|
|
65
|
+
& $python.Source @Arguments
|
|
66
|
+
return
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
$py = Get-Command py -ErrorAction SilentlyContinue
|
|
70
|
+
if ($py) {
|
|
71
|
+
& $py.Source -3 -c 'import sys; raise SystemExit(0 if sys.version_info[0] == 3 else 1)' *> $null
|
|
72
|
+
if ($LASTEXITCODE -eq 0) {
|
|
73
|
+
& $py.Source -3 @Arguments
|
|
74
|
+
return
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
throw "Python 3 is required. Install Python and ensure python or py is in PATH."
|
|
78
|
+
}
|
|
79
|
+
try {
|
|
80
|
+
$prizmPythonPath = Invoke-PrizmPython -c "import sys; print(sys.executable)"
|
|
81
|
+
"Python OK: $prizmPythonPath"
|
|
82
|
+
} catch {
|
|
83
|
+
"Missing Python: install Python 3 and ensure python or py is in PATH"
|
|
84
|
+
}
|
|
85
|
+
Get-Command git
|
|
86
|
+
$aiCli = @("codex", "claude", "cbc") | Where-Object { Get-Command $_ -ErrorAction SilentlyContinue } | Select-Object -First 1
|
|
87
|
+
if ($aiCli) { "AI CLI OK: $aiCli" } else { "Missing AI CLI: install codex, claude, or cbc" }
|
|
88
|
+
# Optional: browser interaction support (check both tools — features may use either)
|
|
89
|
+
if (Get-Command playwright-cli -ErrorAction SilentlyContinue) { "playwright-cli OK" } else { "playwright-cli not found (playwright browser verification will be skipped)" }
|
|
90
|
+
if (Get-Command opencli -ErrorAction SilentlyContinue) { "opencli OK" } else { "opencli not found (opencli browser verification will be skipped)" }
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
If `.prizmkit/plans/feature-list.json` is missing, inform user:
|
|
94
|
+
> "No .prizmkit/plans/feature-list.json found. Run the `feature-planner` skill first to generate one, or provide a path to your feature list."
|
|
95
|
+
|
|
96
|
+
### Workflow
|
|
97
|
+
|
|
98
|
+
Detect user intent from their message, then follow the corresponding workflow:
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
#### Intent A: Start Pipeline
|
|
103
|
+
|
|
104
|
+
> **Execution model**: The pipeline processes features **sequentially** (one at a time, in order). The `dependencies` field in feature-list.json is reserved for future parallel execution support and does NOT affect current execution order.
|
|
105
|
+
|
|
106
|
+
1. **Check prerequisites**:
|
|
107
|
+
```powershell
|
|
108
|
+
if (Test-Path .prizmkit/plans/feature-list.json) { "Found" } else { "Missing" }
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
2. **Check not already running**:
|
|
112
|
+
```powershell
|
|
113
|
+
.\.prizmkit\dev-pipeline\launch-feature-daemon.ps1 status
|
|
114
|
+
```
|
|
115
|
+
If running, inform user and ask: "Pipeline is already running. Want to restart it, check status, or view logs?"
|
|
116
|
+
|
|
117
|
+
3. **Show feature summary** (so user knows what will be built):
|
|
118
|
+
```powershell
|
|
119
|
+
$data = Get-Content .prizmkit\plans\feature-list.json -Raw | ConvertFrom-Json
|
|
120
|
+
$features = @($data.features)
|
|
121
|
+
"Total features: $($features.Count)"
|
|
122
|
+
foreach ($feature in $features) {
|
|
123
|
+
$title = if ($feature.title) { $feature.title } else { "untitled" }
|
|
124
|
+
" $($feature.id): $title"
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
If pipeline state already exists, use the status command instead:
|
|
128
|
+
```powershell
|
|
129
|
+
Invoke-PrizmPython .prizmkit/dev-pipeline/scripts/update-feature-status.py `
|
|
130
|
+
--feature-list .prizmkit/plans/feature-list.json `
|
|
131
|
+
--state-dir .prizmkit/state/features `
|
|
132
|
+
--action status
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
4. **Run environment preflight checks** (database connectivity, migrations, dev server):
|
|
136
|
+
|
|
137
|
+
Run the preflight script to auto-detect the database type, verify env vars, test connectivity, and check migration status:
|
|
138
|
+
```powershell
|
|
139
|
+
Invoke-PrizmPython ${SKILL_DIR}/scripts/preflight-check.py .prizmkit/plans/feature-list.json
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The script:
|
|
143
|
+
- Reads `global_context.database` from `.prizmkit/plans/feature-list.json` and `.prizmkit/config.json`
|
|
144
|
+
- Scans `.env.local` / `.env` for connection variables (supports Supabase, PostgreSQL, MySQL, MongoDB, Firebase, and generic `DATABASE_URL`)
|
|
145
|
+
- Tests connectivity using the appropriate method per database type
|
|
146
|
+
- Checks migration status (Prisma, Drizzle, Supabase raw SQL, or generic migration directories)
|
|
147
|
+
- Checks if the dev server is running (from `browser_interaction` URLs)
|
|
148
|
+
- Outputs `PREFLIGHT ✓` (pass), `PREFLIGHT ⚠` (warning), or `PREFLIGHT ℹ` (info) lines
|
|
149
|
+
- Exits 0 (all clear), 1 (warnings found), or 2 (error — feature list not found)
|
|
150
|
+
|
|
151
|
+
If the script reports `⚠` warnings, present them to the user and ask:
|
|
152
|
+
> "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?"
|
|
153
|
+
|
|
154
|
+
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).
|
|
155
|
+
|
|
156
|
+
If `global_context.database` is absent and no features mention database keywords, the script skips DB checks automatically.
|
|
157
|
+
|
|
158
|
+
5. **Ask execution mode** (first user decision — SEPARATE `AskUserQuestion` call):
|
|
159
|
+
|
|
160
|
+
⛔ **This MUST be its own standalone `AskUserQuestion` call.** Do NOT combine execution mode with step 6 config questions. The execution mode question is asked ALONE, user responds, THEN you proceed to step 6.
|
|
161
|
+
|
|
162
|
+
Use `AskUserQuestion` with exactly 1 question:
|
|
163
|
+
|
|
164
|
+
**Question 1 — Execution mode** (multiSelect: false):
|
|
165
|
+
- Foreground (Recommended) — pipeline runs in the current session via `run-feature.ps1 run`. Visible output and direct error feedback.
|
|
166
|
+
- Background daemon — pipeline runs fully detached via `launch-feature-daemon.ps1`. Survives AI CLI session closure.
|
|
167
|
+
- Manual — display the final assembled commands only. Do not execute anything. User runs them on their own.
|
|
168
|
+
|
|
169
|
+
⚠️ STOP HERE and wait for user response before continuing to step 6.
|
|
170
|
+
|
|
171
|
+
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. You MUST ask the user to configure options and WAIT for their response BEFORE proceeding to step 7.
|
|
172
|
+
|
|
173
|
+
⛔ **HARD STOP**: You MUST call `AskUserQuestion` with the 4 questions below and WAIT for the user's response. You MUST NOT:
|
|
174
|
+
- Combine step 5 and step 6 into one `AskUserQuestion` call (this is the most common violation — execution mode MUST be asked separately in step 5)
|
|
175
|
+
- Skip this step and jump to step 7
|
|
176
|
+
- Merge step 6 and step 7 into one response
|
|
177
|
+
- Assume default values and show the command without asking
|
|
178
|
+
- Show the command as text and ask "ready?" without presenting the options
|
|
179
|
+
If you find yourself writing the final command before the user has answered these 4 questions, STOP — you are violating this rule.
|
|
180
|
+
|
|
181
|
+
Use `AskUserQuestion` to present ALL 4 configuration choices (the full 4-question budget goes to config, NOT shared with execution mode):
|
|
182
|
+
|
|
183
|
+
**Question 1 — Critic review** (multiSelect: false):
|
|
184
|
+
- Off (default) — Skip adversarial review
|
|
185
|
+
- On — Enable adversarial critic review: an independent AI agent reviews the spec/plan for completeness and the implementation for defects, edge cases, and missing requirements. Adds ~5-10 min per feature.
|
|
186
|
+
|
|
187
|
+
**Question 2 — Verbose logging** (multiSelect: false):
|
|
188
|
+
- On (default) — Detailed AI session logs including tool calls and subagent activity
|
|
189
|
+
- Off — Minimal logging
|
|
190
|
+
|
|
191
|
+
**Question 3 — Max retries** (multiSelect: false):
|
|
192
|
+
- 3 (default)
|
|
193
|
+
- 1
|
|
194
|
+
- 5
|
|
195
|
+
|
|
196
|
+
**Question 4 — Advanced config?** (multiSelect: false):
|
|
197
|
+
- No (default) — Use defaults for session timeout and failure behavior
|
|
198
|
+
- Yes — Configure session timeout and stop-on-failure options
|
|
199
|
+
|
|
200
|
+
Default Critic to Off unless features have `estimated_complexity: "high"` or above (in which case default to On).
|
|
201
|
+
|
|
202
|
+
**If user chose "Yes" to Advanced config**, ask a second round of `AskUserQuestion`:
|
|
203
|
+
|
|
204
|
+
**Question 1 — Session timeout** (multiSelect: false):
|
|
205
|
+
- None (default) — No timeout
|
|
206
|
+
- 30 min — `SESSION_TIMEOUT=1800`
|
|
207
|
+
- 1 hour — `SESSION_TIMEOUT=3600`
|
|
208
|
+
- 2 hours — `SESSION_TIMEOUT=7200`
|
|
209
|
+
|
|
210
|
+
**Question 2 — Stop on failure** (multiSelect: false):
|
|
211
|
+
- Off (default) — Pipeline continues to next task after failure
|
|
212
|
+
- On — Pipeline halts immediately when a task exhausts all retries (`STOP_ON_FAILURE=1`)
|
|
213
|
+
|
|
214
|
+
**Environment variable mapping** (for translating user responses → env vars):
|
|
215
|
+
|
|
216
|
+
| Config choice | Environment variable |
|
|
217
|
+
|-----------|---------------------|
|
|
218
|
+
| Critic: On | `ENABLE_CRITIC=true` |
|
|
219
|
+
| Verbose: Off | `VERBOSE=0` |
|
|
220
|
+
| Verbose: On | `VERBOSE=1` |
|
|
221
|
+
| Max retries: N | `MAX_RETRIES=N` |
|
|
222
|
+
| Timeout: value | `SESSION_TIMEOUT=<seconds>` |
|
|
223
|
+
| Stop on failure: On | `STOP_ON_FAILURE=1` |
|
|
224
|
+
|
|
225
|
+
**Advanced environment variables** (not exposed in interactive menu, pass via `--env`):
|
|
226
|
+
|
|
227
|
+
| Variable | Default | Purpose |
|
|
228
|
+
|----------|---------|---------|
|
|
229
|
+
| `MODEL` | (none) | AI model override (e.g. `claude-opus-4.6`) |
|
|
230
|
+
| `PIPELINE_MODE` | (none) | Override mode for all features: `lite`\|`standard`\|`full` |
|
|
231
|
+
|
|
232
|
+
⚠️ STOP HERE and wait for user response before continuing to step 7.
|
|
233
|
+
|
|
234
|
+
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.
|
|
235
|
+
|
|
236
|
+
**Foreground command:**
|
|
237
|
+
```powershell
|
|
238
|
+
$env:VERBOSE = "1"; .\.prizmkit\dev-pipeline\run-feature.ps1 run .prizmkit/plans/feature-list.json
|
|
239
|
+
```
|
|
240
|
+
With all options:
|
|
241
|
+
```powershell
|
|
242
|
+
$env:VERBOSE = "1"; $env:ENABLE_CRITIC = "true"; $env:MAX_RETRIES = "5"; $env:SESSION_TIMEOUT = "3600"
|
|
243
|
+
.\.prizmkit\dev-pipeline\run-feature.ps1 run .prizmkit/plans/feature-list.json --features F-001:F-005
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**Background daemon command:**
|
|
247
|
+
```powershell
|
|
248
|
+
.\.prizmkit\dev-pipeline\launch-feature-daemon.ps1 start .prizmkit/plans/feature-list.json --env "VERBOSE=1"
|
|
249
|
+
```
|
|
250
|
+
With all options:
|
|
251
|
+
```powershell
|
|
252
|
+
.\.prizmkit\dev-pipeline\launch-feature-daemon.ps1 start .prizmkit/plans/feature-list.json --features F-001:F-005 `
|
|
253
|
+
--env "VERBOSE=1 ENABLE_CRITIC=true MAX_RETRIES=5"
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
**Manual mode**: Print the assembled command(s) and **stop here**. Do not execute anything. Do not proceed to step 8.
|
|
257
|
+
```
|
|
258
|
+
# To run in foreground:
|
|
259
|
+
$env:VERBOSE = "1"; .\.prizmkit\dev-pipeline\run-feature.ps1 run .prizmkit/plans/feature-list.json
|
|
260
|
+
|
|
261
|
+
# To run in background (detached):
|
|
262
|
+
.\.prizmkit\dev-pipeline\launch-feature-daemon.ps1 start .prizmkit/plans/feature-list.json --env "VERBOSE=1"
|
|
263
|
+
|
|
264
|
+
# To check status:
|
|
265
|
+
.\.prizmkit\dev-pipeline\run-feature.ps1 status .prizmkit/plans/feature-list.json
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
8. **Confirm and launch** (Foreground and Background only — Manual mode ends at step 7):
|
|
269
|
+
|
|
270
|
+
Ask: "Ready to launch the pipeline with the above command?"
|
|
271
|
+
|
|
272
|
+
After user confirms, execute the command from step 7.
|
|
273
|
+
|
|
274
|
+
9. **Post-launch** (depends on execution mode):
|
|
275
|
+
|
|
276
|
+
**If foreground**: Pipeline runs to completion in the terminal. After it finishes:
|
|
277
|
+
- Summarize results: total features, succeeded, failed, skipped
|
|
278
|
+
- If all succeeded: each feature session has already run `prizmkit-retrospective` internally. Ask user what's next.
|
|
279
|
+
- If some failed: show failed feature IDs and suggest `reset-feature.ps1 <F-XXX> --clean --run` for a fresh retry
|
|
280
|
+
- **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)
|
|
281
|
+
|
|
282
|
+
**If background daemon**:
|
|
283
|
+
1. Verify launch:
|
|
284
|
+
```powershell
|
|
285
|
+
.\.prizmkit\dev-pipeline\launch-feature-daemon.ps1 status
|
|
286
|
+
```
|
|
287
|
+
2. Start log monitoring — Use the PowerShell terminal with `run_in_background: true`:
|
|
288
|
+
```powershell
|
|
289
|
+
Get-Content -Wait -Tail 50 .prizmkit/state/daemon/feature-daemon.log
|
|
290
|
+
```
|
|
291
|
+
3. Report to user:
|
|
292
|
+
- Pipeline PID
|
|
293
|
+
- Log file location
|
|
294
|
+
- "You can ask me 'pipeline status' or 'show logs' at any time"
|
|
295
|
+
- "Closing this session will NOT stop the pipeline"
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
#### Intent B: Check Status
|
|
300
|
+
|
|
301
|
+
1. **Check daemon status**:
|
|
302
|
+
```powershell
|
|
303
|
+
.\.prizmkit\dev-pipeline\launch-feature-daemon.ps1 status
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
2. **Show feature-level progress**:
|
|
307
|
+
```powershell
|
|
308
|
+
Invoke-PrizmPython .prizmkit/dev-pipeline/scripts/update-feature-status.py `
|
|
309
|
+
--feature-list .prizmkit/plans/feature-list.json `
|
|
310
|
+
--state-dir .prizmkit/state/features `
|
|
311
|
+
--action status
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
3. **Show recent log activity** (last 20 lines):
|
|
315
|
+
```powershell
|
|
316
|
+
Get-Content -Tail 20 .prizmkit/state/daemon/feature-daemon.log
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
4. **Summarize** to user: total features, completed, in-progress, failed, pending.
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
#### Intent C: Stop Pipeline
|
|
324
|
+
|
|
325
|
+
1. **Stop the daemon**:
|
|
326
|
+
```powershell
|
|
327
|
+
.\.prizmkit\dev-pipeline\launch-feature-daemon.ps1 stop
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
2. **Verify stopped**:
|
|
331
|
+
```powershell
|
|
332
|
+
.\.prizmkit\dev-pipeline\launch-feature-daemon.ps1 status
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
3. **Inform user**: "Pipeline stopped. State is preserved -- you can resume later with 'start pipeline' and it will pick up where it left off."
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
#### Intent D: Show Logs
|
|
340
|
+
|
|
341
|
+
1. **Check if running**:
|
|
342
|
+
```powershell
|
|
343
|
+
.\.prizmkit\dev-pipeline\launch-feature-daemon.ps1 status
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
2. **If running** -- Start live tail with PowerShell terminal `run_in_background: true`:
|
|
347
|
+
```powershell
|
|
348
|
+
Get-Content -Wait -Tail 50 .prizmkit/state/daemon/feature-daemon.log
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
3. **If not running** -- Show last 50 lines:
|
|
352
|
+
```powershell
|
|
353
|
+
Get-Content -Tail 50 .prizmkit/state/daemon/feature-daemon.log
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
4. **For per-feature session logs** (when user asks about a specific feature):
|
|
357
|
+
```powershell
|
|
358
|
+
# Check feature status for last session ID
|
|
359
|
+
Get-Content .prizmkit/state/features/features/<FEATURE_ID>/status.json -ErrorAction SilentlyContinue
|
|
360
|
+
# Then tail that feature's session log
|
|
361
|
+
Get-Content -Tail 100 .prizmkit/state/features/features/<FEATURE_ID>/sessions/<SESSION_ID>/logs/session.log
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
#### Intent E: Retry Single Feature Node
|
|
367
|
+
|
|
368
|
+
When user says "retry F-003" or "clean retry F-003":
|
|
369
|
+
|
|
370
|
+
```powershell
|
|
371
|
+
.\.prizmkit\dev-pipeline\reset-feature.ps1 F-003 --clean --run .prizmkit/plans/feature-list.json
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
Notes:
|
|
375
|
+
- `reset-feature.ps1 F-003 --clean --run` performs a clean reset for `F-003` before retrying that feature — this gives a fresh start.
|
|
376
|
+
- Keep pipeline daemon mode for main run management (`launch-feature-daemon.ps1`).
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
#### Post-Pipeline Browser Verification
|
|
381
|
+
|
|
382
|
+
After pipeline completion, if features have `browser_interaction` fields and the corresponding browser tool (`playwright-cli` or `opencli`) is installed:
|
|
383
|
+
|
|
384
|
+
1. **Check which features qualify**:
|
|
385
|
+
```powershell
|
|
386
|
+
$data = Get-Content .prizmkit\plans\feature-list.json -Raw | ConvertFrom-Json
|
|
387
|
+
foreach ($feature in @($data.features)) {
|
|
388
|
+
if ($feature.browser_interaction -and $feature.status -eq "completed") {
|
|
389
|
+
$tool = if ($feature.browser_interaction.tool) { $feature.browser_interaction.tool } else { "auto" }
|
|
390
|
+
" $($feature.id): $($feature.title) (tool: $tool)"
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
2. **Ask user**: "N features have browser verification configured. Run browser verification now? (Y/n)"
|
|
396
|
+
|
|
397
|
+
3. **If yes**, for each qualifying feature:
|
|
398
|
+
- Start dev server if `setup_command` is specified
|
|
399
|
+
- Select browser tool based on `browser_interaction.tool`:
|
|
400
|
+
- `"playwright-cli"` → Use `playwright-cli snapshot` to discover element refs, then verify each goal in `verify_steps`
|
|
401
|
+
- `"opencli"` → Use `opencli browser` to interact with Chrome's logged-in session (ideal for OAuth/third-party verification)
|
|
402
|
+
- `"auto"` → AI chooses the appropriate tool based on context (default: `playwright-cli` for local dev, `opencli` for authenticated flows)
|
|
403
|
+
- Take a screenshot after verification
|
|
404
|
+
- Close browser and stop dev server
|
|
405
|
+
|
|
406
|
+
4. **Report results**:
|
|
407
|
+
- For each feature: URL opened, tool used, steps executed, screenshot path
|
|
408
|
+
- If any step fails: flag as verification failure
|
|
409
|
+
|
|
410
|
+
**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.
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
### Error Handling
|
|
415
|
+
|
|
416
|
+
| Error | Action |
|
|
417
|
+
|-------|--------|
|
|
418
|
+
| `.prizmkit/plans/feature-list.json` not found | Tell user to run `feature-planner` skill first |
|
|
419
|
+
| JSON parsing failed | Use the bundled Python validation/status scripts instead of external JSON tools |
|
|
420
|
+
| AI CLI not in PATH | Check Codex (`codex`), Claude (`claude`), or CodeBuddy (`cbc`) installation |
|
|
421
|
+
| Pipeline already running | Show status, ask if user wants to stop and restart |
|
|
422
|
+
| PID file stale (process dead) | `launch-feature-daemon.ps1` auto-cleans, retry start |
|
|
423
|
+
| Launch failed (process died immediately) | Show last 20 lines of log: `Get-Content -Tail 20 .prizmkit/state/daemon/feature-daemon.log` |
|
|
424
|
+
| Feature stuck/blocked | Use `reset-feature.ps1 <F-XXX> --clean --run` for a fresh retry |
|
|
425
|
+
| All features blocked/failed | Show status, suggest daemon-safe recovery: `.\.prizmkit\dev-pipeline\reset-feature.ps1 <F-XXX> --clean --run .prizmkit/plans/feature-list.json` |
|
|
426
|
+
| `playwright-cli` not installed | Browser verification skipped for playwright features (non-blocking). Suggest: `npm install -g @playwright/cli@latest; playwright-cli install --skills` |
|
|
427
|
+
| `opencli` not installed | Browser verification skipped for opencli features (non-blocking). Install opencli for Chrome session-based browser verification |
|
|
428
|
+
| PowerShell execution policy blocks script | Run `Set-ExecutionPolicy -Scope Process Bypass` for the current terminal |
|
|
429
|
+
| Pipeline stop failed | Use `Stop-Process -Id <PID> -Force`; inspect AI CLI processes with `Get-Process | Select-String codex` |
|
|
430
|
+
| `.env.local` missing or incomplete | Warn: database connection variables not found. Suggest creating env file with required connection variables for the project's database |
|
|
431
|
+
| Database unreachable | Warn: database features will produce mock-only tests. Suggest checking database service status and connection credentials |
|
|
432
|
+
| Migrations not applied | Warn: tables or schema referenced in migration files not found in database. Suggest applying pending migrations |
|
|
433
|
+
|
|
434
|
+
### Integration Notes
|
|
435
|
+
|
|
436
|
+
- **After feature-planner**: This is the natural next step. When user finishes planning and has `.prizmkit/plans/feature-list.json`, suggest launching the pipeline.
|
|
437
|
+
- **Session independence**: The pipeline runs completely detached. User can close the AI CLI session, open a new session later, and use this skill to check progress or stop the pipeline.
|
|
438
|
+
- **Single instance**: Only one pipeline can run at a time. The PID file prevents duplicates.
|
|
439
|
+
- **Pipeline coexistence**: Feature and bugfix pipelines use separate state directories (`.prizmkit/state/features/` vs `.prizmkit/state/bugfix/`), so they can run simultaneously without conflict.
|
|
440
|
+
- **State preservation**: Stopping and restarting the pipeline resumes from where it left off -- completed features are not re-run.
|
|
441
|
+
- **HANDOFF**: After pipeline completes all features, each session has already run `prizmkit-retrospective` internally. Ask user what's next.
|