prizmkit 1.1.70 → 1.1.74
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/bundled/VERSION.json +3 -3
- package/bundled/agents/prizm-dev-team-dev.md +11 -1
- package/bundled/dev-pipeline/lib/common.sh +427 -0
- package/bundled/dev-pipeline/lib/heartbeat.sh +101 -36
- package/bundled/dev-pipeline/run-feature.sh +109 -29
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +198 -3
- package/bundled/dev-pipeline/scripts/update-feature-status.py +27 -3
- package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +21 -0
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +5 -9
- package/bundled/dev-pipeline/templates/sections/feature-context.md +3 -18
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +11 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +11 -0
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +6 -12
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +10 -3
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +1 -0
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +4 -8
- package/bundled/dev-pipeline-windows/lib/common.ps1 +61 -1
- package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +325 -16
- package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +198 -3
- package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +27 -3
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +21 -0
- package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +1 -1
- package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +27 -0
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +543 -14
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +664 -14
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +741 -14
- package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +2 -2
- package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +1 -1
- package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +3 -3
- package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +3 -18
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +239 -40
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +75 -26
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +142 -36
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +13 -2
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +12 -1
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +7 -17
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +10 -3
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +3 -1
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +7 -3
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +1 -3
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +2 -2
- package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +13 -17
- package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +2 -4
- package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +1 -1
- package/bundled/skills/_metadata.json +1 -1
- package/package.json +1 -1
|
@@ -1,62 +1,168 @@
|
|
|
1
1
|
### Browser Verification (playwright-cli) — MANDATORY
|
|
2
2
|
|
|
3
|
-
You MUST execute this phase
|
|
3
|
+
You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without actually running playwright-cli.
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**Using: playwright-cli**
|
|
6
|
+
|
|
7
|
+
**CRITICAL CONSTRAINT — playwright-cli ONLY, NO Playwright MCP**:
|
|
8
|
+
- You MUST use `playwright-cli` (the CLI tool) for ALL browser interactions in this phase
|
|
9
|
+
- **NEVER** use Playwright MCP server, Playwright MCP tools, or any MCP-based browser automation
|
|
10
|
+
- If you have Playwright MCP configured, IGNORE it entirely — use the CLI command `playwright-cli` exclusively
|
|
11
|
+
- All browser actions go through `playwright-cli <command>` in the PowerShell tool, not through any MCP tool call
|
|
12
|
+
|
|
13
|
+
**Step 0 — Playwright CLI Readiness Check (BLOCKING — must pass before any browser action)**:
|
|
14
|
+
|
|
15
|
+
0a. Check if `playwright-cli` is installed:
|
|
6
16
|
```powershell
|
|
7
17
|
$playwright = Get-Command playwright-cli -ErrorAction SilentlyContinue
|
|
8
|
-
if ($playwright) { playwright-cli --version } else { "
|
|
18
|
+
if ($playwright) { playwright-cli --version } else { "NOT_INSTALLED" }
|
|
9
19
|
```
|
|
10
|
-
|
|
11
|
-
If playwright-cli is not available, install it:
|
|
20
|
+
If output is `NOT_INSTALLED`, install it:
|
|
12
21
|
```powershell
|
|
13
22
|
npm install -g @playwright/cli@latest
|
|
23
|
+
```
|
|
24
|
+
Then verify installation succeeded:
|
|
25
|
+
```powershell
|
|
14
26
|
playwright-cli --version
|
|
15
27
|
```
|
|
28
|
+
If installation fails, log the error in context-snapshot.md under `## Browser Verification: SKIPPED — playwright-cli installation failed` and proceed to the next phase. Do NOT attempt browser verification without playwright-cli.
|
|
16
29
|
|
|
17
|
-
|
|
30
|
+
0b. Learn playwright-cli usage (run once per session to understand available commands):
|
|
18
31
|
```powershell
|
|
19
|
-
|
|
20
|
-
if ($DEV_PORT -eq "{{DEV_PORT}}") {
|
|
21
|
-
$detected = node -e "const p=require('./package.json'); const s = p.scripts ? p.scripts.dev : ''; const m=s.match(/-p\s+(\d+)/); console.log(m?m[1]:'')"
|
|
22
|
-
if ($detected) { $DEV_PORT = $detected } else { $DEV_PORT = "3000" }
|
|
23
|
-
}
|
|
24
|
-
"Detected DEV_PORT=$DEV_PORT"
|
|
25
|
-
$portBusy = Get-NetTCPConnection -LocalPort ([int]$DEV_PORT) -ErrorAction SilentlyContinue
|
|
26
|
-
if ($portBusy) { "PORT_IN_USE" } else { "PORT_FREE" }
|
|
27
|
-
$server = Start-Process -FilePath "powershell" -ArgumentList @("-NoProfile", "-Command", "<start-command>") -PassThru
|
|
28
|
-
$DEV_SERVER_PID = $server.Id
|
|
32
|
+
playwright-cli --help
|
|
29
33
|
```
|
|
34
|
+
Use this output to determine the correct commands for your verification steps. Do NOT guess command syntax — refer to the help output.
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
0c. Check if playwright-cli skill is installed for the current AI platform:
|
|
37
|
+
```powershell
|
|
38
|
+
$currentPlatform = "unknown"
|
|
39
|
+
$skillDir = $null
|
|
40
|
+
if (Get-Command claude -ErrorAction SilentlyContinue) {
|
|
41
|
+
$currentPlatform = "claude"
|
|
42
|
+
$skillDir = Join-Path $HOME ".claude\skills"
|
|
43
|
+
} elseif (Get-Command cbc -ErrorAction SilentlyContinue) {
|
|
44
|
+
$currentPlatform = "codebuddy"
|
|
45
|
+
$skillDir = Join-Path $HOME ".cbc\skills"
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
$skillExists = $false
|
|
49
|
+
if ($skillDir) {
|
|
50
|
+
$directSkill = Join-Path $skillDir "playwright-cli"
|
|
51
|
+
$matchingSkills = Get-ChildItem -Path $skillDir -Filter "playwright*" -ErrorAction SilentlyContinue
|
|
52
|
+
$skillExists = (Test-Path -LiteralPath $directSkill) -or [bool]$matchingSkills
|
|
53
|
+
}
|
|
54
|
+
if ($skillExists) { "SKILL_EXISTS" } else { "SKILL_MISSING" }
|
|
55
|
+
```
|
|
56
|
+
If `SKILL_MISSING`:
|
|
57
|
+
```powershell
|
|
58
|
+
playwright-cli install --skills
|
|
59
|
+
```
|
|
60
|
+
If the current platform is NOT claude, move the installed skill files to the correct location:
|
|
32
61
|
```powershell
|
|
33
|
-
$
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
62
|
+
$claudeSkillDir = Join-Path $HOME ".claude\skills"
|
|
63
|
+
$sourceSkill = Join-Path $claudeSkillDir "playwright-cli"
|
|
64
|
+
if ($currentPlatform -ne "claude" -and $currentPlatform -ne "unknown" -and $skillDir -and (Test-Path -LiteralPath $sourceSkill)) {
|
|
65
|
+
New-Item -ItemType Directory -Force -Path $skillDir | Out-Null
|
|
66
|
+
Copy-Item -Recurse -Force -Path $sourceSkill -Destination $skillDir
|
|
67
|
+
"Moved playwright-cli skill from claude to $currentPlatform"
|
|
39
68
|
}
|
|
40
|
-
if (-not $ready) { "DEV_SERVER_NOT_READY" }
|
|
41
69
|
```
|
|
42
70
|
|
|
43
|
-
|
|
71
|
+
0d. Read the installed playwright-cli skill for workflow guidance:
|
|
72
|
+
After skill installation, read the skill's SKILL.md to understand recommended workflows and patterns. Use these patterns to construct your verification flow — do NOT invent your own patterns if the skill provides them.
|
|
73
|
+
|
|
74
|
+
**Step 1 — Start Dev Server**:
|
|
75
|
+
|
|
76
|
+
You know this project's tech stack. Detect and start the dev server yourself:
|
|
77
|
+
|
|
78
|
+
1. Identify the dev server start command from project config (`package.json` scripts, `Makefile`, `docker-compose.yml`, etc.)
|
|
79
|
+
2. **Detect the dev server port** — use the pre-detected port from pipeline if available, otherwise extract from project config. Do NOT hardcode or guess the port:
|
|
80
|
+
```powershell
|
|
81
|
+
$DEV_PORT = "{{DEV_PORT}}"
|
|
82
|
+
if ($DEV_PORT -eq "{{DEV_PORT}}" -or [string]::IsNullOrWhiteSpace($DEV_PORT)) {
|
|
83
|
+
$detectedPort = ""
|
|
84
|
+
if (Test-Path -LiteralPath "package.json") {
|
|
85
|
+
$detectedPort = node -e "const p=require('./package.json'); const s=(p.scripts?.dev) || ''; const m=s.match(/-p\s+(\d+)/); console.log(m?m[1]:'')"
|
|
86
|
+
}
|
|
87
|
+
if (-not $detectedPort -and $env:NEXT_PUBLIC_SITE_URL -match ':([0-9]+)') {
|
|
88
|
+
$detectedPort = $Matches[1]
|
|
89
|
+
}
|
|
90
|
+
if ($detectedPort) { $DEV_PORT = $detectedPort } else { $DEV_PORT = "3000" }
|
|
91
|
+
}
|
|
92
|
+
"Detected DEV_PORT=$DEV_PORT"
|
|
93
|
+
```
|
|
94
|
+
3. Verify the port is available and start the dev server in the background, capturing its process id:
|
|
95
|
+
```powershell
|
|
96
|
+
$portBusy = Get-NetTCPConnection -LocalPort ([int]$DEV_PORT) -ErrorAction SilentlyContinue
|
|
97
|
+
if ($portBusy) { "PORT_IN_USE" } else { "PORT_FREE" }
|
|
98
|
+
$devServerCommand = "<start-command>"
|
|
99
|
+
$server = Start-Process -FilePath "powershell" -ArgumentList @("-NoProfile", "-Command", $devServerCommand) -PassThru
|
|
100
|
+
$DEV_SERVER_PID = $server.Id
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Wait for server to be ready: poll `http://localhost:$DEV_PORT` until it returns 200 or 302 (max 30 seconds, 2s interval):
|
|
104
|
+
```powershell
|
|
105
|
+
$ready = $false
|
|
106
|
+
for ($i = 0; $i -lt 15; $i++) {
|
|
107
|
+
try {
|
|
108
|
+
$response = Invoke-WebRequest -Uri "http://localhost:$DEV_PORT" -UseBasicParsing -TimeoutSec 2
|
|
109
|
+
if ($response.StatusCode -in @(200, 302)) { $ready = $true; break }
|
|
110
|
+
} catch {
|
|
111
|
+
Start-Sleep -Seconds 2
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (-not $ready) { "DEV_SERVER_NOT_READY" }
|
|
115
|
+
```
|
|
116
|
+
4. Open the app in playwright-cli: `playwright-cli open "http://localhost:$DEV_PORT"`
|
|
117
|
+
5. If the page requires authentication, use playwright-cli to register a test user and log in first
|
|
118
|
+
|
|
119
|
+
**Step 2 — Verification**:
|
|
120
|
+
|
|
121
|
+
Use `playwright-cli snapshot` on the running app to discover actual element refs, then verify these goals:
|
|
44
122
|
{{BROWSER_VERIFY_STEPS}}
|
|
45
123
|
|
|
46
|
-
|
|
124
|
+
Construct your verification workflow based on:
|
|
125
|
+
1. The playwright-cli skill documentation (read in Step 0d)
|
|
126
|
+
2. The `playwright-cli --help` output (captured in Step 0b)
|
|
127
|
+
3. The current task's Verification Gates and implemented features
|
|
47
128
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
playwright-cli
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
129
|
+
Decide the concrete playwright-cli actions (click, fill, snapshot, screenshot, etc.) yourself based on the snapshot output and your knowledge of the implemented code. The goals above describe WHAT to verify — you determine HOW using playwright-cli commands.
|
|
130
|
+
|
|
131
|
+
Take a final screenshot for evidence: `playwright-cli screenshot`
|
|
132
|
+
|
|
133
|
+
**Step 3 — Cleanup (REQUIRED — you started it, you stop it)**:
|
|
134
|
+
|
|
135
|
+
1. Close the playwright-cli browser: `playwright-cli close`
|
|
136
|
+
2. Stop the dev server process and any remaining process bound to the dev server port:
|
|
137
|
+
```powershell
|
|
138
|
+
if ($DEV_SERVER_PID) { Stop-Process -Id $DEV_SERVER_PID -Force -ErrorAction SilentlyContinue }
|
|
139
|
+
Get-NetTCPConnection -LocalPort ([int]$DEV_PORT) -ErrorAction SilentlyContinue |
|
|
140
|
+
Select-Object -ExpandProperty OwningProcess -Unique |
|
|
141
|
+
ForEach-Object { Stop-Process -Id $_ -Force -ErrorAction SilentlyContinue }
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Step 4 — Reporting**:
|
|
145
|
+
|
|
146
|
+
Append results to `context-snapshot.md`:
|
|
147
|
+
```
|
|
148
|
+
## Browser Verification
|
|
149
|
+
Tool: <playwright-cli or opencli>
|
|
150
|
+
URL: http://localhost:$DEV_PORT
|
|
151
|
+
Dev Server Command: <actual command used>
|
|
152
|
+
Tool version: <version>
|
|
153
|
+
Steps executed: [list of commands used]
|
|
154
|
+
Screenshot: [path]
|
|
155
|
+
Result: PASS / FAIL (reason)
|
|
156
|
+
Server cleanup: confirmed
|
|
157
|
+
Browser cleanup: confirmed
|
|
55
158
|
```
|
|
56
159
|
|
|
57
|
-
|
|
160
|
+
If verification fails, log the failure details but continue to commit. Failures do NOT block the commit, but you MUST attempt verification and MUST clean up the dev server.
|
|
58
161
|
|
|
59
|
-
**Checkpoint update**:
|
|
162
|
+
**Checkpoint update**: Run the update script to set step `browser-verification` to `"completed"`:
|
|
60
163
|
```powershell
|
|
61
|
-
Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py
|
|
164
|
+
Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py `
|
|
165
|
+
--checkpoint-path {{CHECKPOINT_PATH}} `
|
|
166
|
+
--step browser-verification `
|
|
167
|
+
--status completed
|
|
62
168
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**a.** Check if feature already committed:
|
|
4
4
|
```powershell
|
|
5
|
-
git log --oneline | Select-String "{{FEATURE_ID}}" | Select-Object -First 3
|
|
5
|
+
git log --oneline | Select-String -Pattern "{{FEATURE_ID}}" | Select-Object -First 3
|
|
6
6
|
```
|
|
7
7
|
- If a commit for `{{FEATURE_ID}}` already exists → **skip d** (do NOT run /prizmkit-committer, do NOT run git reset, do NOT stage or unstage anything). Proceed directly to e Final verification.
|
|
8
8
|
- If no existing commit → proceed normally with b–d.
|
|
@@ -30,7 +30,7 @@ This single commit includes: feature code + tests + .prizmkit/prizm-docs/ update
|
|
|
30
30
|
```powershell
|
|
31
31
|
git status --short
|
|
32
32
|
```
|
|
33
|
-
Working tree MUST be clean after this step. If any feature-related files remain, stage them into the SAME commit via `git add <file>; git commit --amend --no-edit`, do NOT create a separate commit.
|
|
33
|
+
Working tree MUST be clean after this step. If any feature-related files remain, stage them into the SAME commit via `git add <file>; if ($LASTEXITCODE -eq 0) { git commit --amend --no-edit }`, do NOT create a separate commit.
|
|
34
34
|
|
|
35
35
|
**f.** Write completion summary for downstream dependency context:
|
|
36
36
|
|
|
@@ -69,3 +69,14 @@ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py `
|
|
|
69
69
|
--step prizmkit-committer `
|
|
70
70
|
--status completed
|
|
71
71
|
```
|
|
72
|
+
|
|
73
|
+
### TERMINAL STOP — S09 Completed
|
|
74
|
+
|
|
75
|
+
After all of the following are true, the session is **TERMINAL**:
|
|
76
|
+
|
|
77
|
+
- `/prizmkit-committer` has completed
|
|
78
|
+
- `git status --short` is clean (except ignored/local-only pipeline artifacts)
|
|
79
|
+
- `.prizmkit/specs/{{FEATURE_SLUG}}/completion-summary.json` is written
|
|
80
|
+
- the S09 / `prizmkit-committer` checkpoint is marked `completed`
|
|
81
|
+
|
|
82
|
+
At that point, stop immediately. Do **not** process delayed teammate/reviewer findings, do **not** edit files, do **not** amend the commit, and do **not** start any new tool calls. Any findings that arrive after S09 is completed are follow-up work for a later session, not part of this feature commit.
|
|
@@ -23,7 +23,7 @@ This single commit includes: feature code + tests + .prizmkit/prizm-docs/ update
|
|
|
23
23
|
```powershell
|
|
24
24
|
git status --short
|
|
25
25
|
```
|
|
26
|
-
Working tree MUST be clean after this step. If any feature-related files remain, stage them into the SAME commit via `git add <file>; git commit --amend --no-edit`, do NOT create a separate commit.
|
|
26
|
+
Working tree MUST be clean after this step. If any feature-related files remain, stage them into the SAME commit via `git add <file>; if ($LASTEXITCODE -eq 0) { git commit --amend --no-edit }`, do NOT create a separate commit.
|
|
27
27
|
|
|
28
28
|
**e.** Write completion summary for downstream dependency context:
|
|
29
29
|
|
|
@@ -62,3 +62,14 @@ Invoke-PrizmPython {{PIPELINE_DIR}}\scripts\update-checkpoint.py `
|
|
|
62
62
|
--step prizmkit-committer `
|
|
63
63
|
--status completed
|
|
64
64
|
```
|
|
65
|
+
|
|
66
|
+
### TERMINAL STOP — S09 Completed
|
|
67
|
+
|
|
68
|
+
After all of the following are true, the session is **TERMINAL**:
|
|
69
|
+
|
|
70
|
+
- `/prizmkit-committer` has completed
|
|
71
|
+
- `git status --short` is clean (except ignored/local-only pipeline artifacts)
|
|
72
|
+
- `.prizmkit/specs/{{FEATURE_SLUG}}/completion-summary.json` is written
|
|
73
|
+
- the S09 / `prizmkit-committer` checkpoint is marked `completed`
|
|
74
|
+
|
|
75
|
+
At that point, stop immediately. Do **not** process delayed teammate/reviewer findings, do **not** edit files, do **not** amend the commit, and do **not** start any new tool calls. Any findings that arrive after S09 is completed are follow-up work for a later session, not part of this feature commit.
|
package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
- **Section 3 —
|
|
1
|
+
- **Section 3 — Key TRAPS & RULES**: extract only relevant TRAPS/RULES from prizm-docs. Do NOT copy full L0/L1/L2 content — the orchestrator already loaded them.
|
|
2
2
|
- **Section 4 — File Manifest**: For each file relevant to this feature, list: file path, why it's needed (modify/reference/test), key interface signatures (function names + params + return types). Do NOT include full file content — agents read files on-demand. Format:
|
|
3
3
|
### Files to Modify
|
|
4
4
|
| File | Why Needed | Key Interfaces |
|
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
### Build Context Snapshot
|
|
2
2
|
|
|
3
3
|
```powershell
|
|
4
|
-
if (Test-Path .prizmkit
|
|
4
|
+
if (Test-Path .prizmkit\specs\{{FEATURE_SLUG}}\context-snapshot.md) { "EXISTS" } else { "MISSING" }
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
If MISSING — build it now:
|
|
8
8
|
1. Read `.prizmkit/prizm-docs/root.prizm` and relevant L1/L2 prizm docs
|
|
9
|
-
2.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Identify the top-level source directories from the results.
|
|
16
|
-
3. Scan the detected source directories for files related to this feature; read each one
|
|
17
|
-
4. Write `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`:
|
|
18
|
-
- **Section 1 — Task Contract**: Objective, scope rule, non-scope rule, and Verification Gates from the Task Contract above
|
|
19
|
-
- **Section 2 — Project Structure**: run the following to get a visual directory tree, then paste output:
|
|
20
|
-
```powershell
|
|
21
|
-
Get-ChildItem -Path . -Directory -Recurse -Depth 2 -ErrorAction SilentlyContinue |
|
|
22
|
-
Where-Object { $_.FullName -notmatch '\\(node_modules|\.git|dist|build|__pycache__|vendor)(\\|$)' } |
|
|
23
|
-
Select-Object -ExpandProperty FullName
|
|
24
|
-
```
|
|
9
|
+
2. Read source files listed in the feature's scope (use prizm-docs KEY_FILES for guidance)
|
|
10
|
+
3. Write `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`:
|
|
11
|
+
- **Section 1 — Feature Brief**: 2-3 line feature description from Task Contract
|
|
12
|
+
- **Section 2 — Verification Gates**: gate checklist from Task Contract
|
|
13
|
+
- **Section 3 — Key TRAPS & RULES**: extract only relevant TRAPS/RULES from prizm-docs that apply to files in this scope. Do NOT copy full L0/L1/L2 content.
|
|
14
|
+
- **Section 4 — File Manifest**: file path, why needed, key interfaces. Format: Files to Modify | Files for Reference tables.
|
package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
- **Section 3 —
|
|
2
|
-
- **Section 4 —
|
|
3
|
-
|
|
1
|
+
- **Section 3 — Key TRAPS & RULES**: extract only relevant TRAPS/RULES from prizm-docs that apply to files in this scope. Do NOT copy full L0/L1/L2 content.
|
|
2
|
+
- **Section 4 — File Manifest**: For each relevant file, list path, why needed, key interface signatures. Use table format:
|
|
3
|
+
|
|
4
|
+
### Files to Modify
|
|
5
|
+
| File | Why Needed | Key Interfaces |
|
|
6
|
+
|------|-----------|----------------|
|
|
7
|
+
|
|
8
|
+
### Files for Reference
|
|
9
|
+
| File | Why Needed | Key Interfaces |
|
|
10
|
+
|------|-----------|----------------|
|
|
4
11
|
|
|
5
12
|
|
|
6
13
|
**Checkpoint update**: Run the update script to set step `context-snapshot` to `"completed"`:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Guard**: Verify critic agent file exists before spawning:
|
|
4
4
|
```powershell
|
|
5
|
-
if (Test-Path "{{CRITIC_SUBAGENT_PATH}}") { "CRITIC:READY" } else { "CRITIC:MISSING" }
|
|
5
|
+
if (Test-Path -LiteralPath "{{CRITIC_SUBAGENT_PATH}}") { "CRITIC:READY" } else { "CRITIC:MISSING" }
|
|
6
6
|
```
|
|
7
7
|
If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent not installed — skipping Plan Challenge."
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Guard**: Verify critic agent file exists before spawning:
|
|
4
4
|
```powershell
|
|
5
|
-
if (Test-Path "{{CRITIC_SUBAGENT_PATH}}") { "CRITIC:READY" } else { "CRITIC:MISSING" }
|
|
5
|
+
if (Test-Path -LiteralPath "{{CRITIC_SUBAGENT_PATH}}") { "CRITIC:READY" } else { "CRITIC:MISSING" }
|
|
6
6
|
```
|
|
7
7
|
If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent not installed — skipping Plan Challenge."
|
|
8
8
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|-----------|-------|
|
|
8
8
|
| subagent_type | prizm-dev-team-dev |
|
|
9
9
|
| run_in_background | false |
|
|
10
|
+
| isolation | Leave empty — Dev works directly in the repo, no worktree |
|
|
10
11
|
|
|
11
12
|
**Agent spawn failure policy**:
|
|
12
13
|
- If spawning Dev fails with team/config/lock errors, retry at most once.
|
|
@@ -28,7 +29,8 @@ Wait for Dev to return. Implementation may proceed only when tasks are complete
|
|
|
28
29
|
**Gate Check — Implementation Log**:
|
|
29
30
|
After Dev agent returns, verify the Implementation Log was written:
|
|
30
31
|
```powershell
|
|
31
|
-
|
|
32
|
+
$contextSnapshot = '.prizmkit\specs\{{FEATURE_SLUG}}\context-snapshot.md'
|
|
33
|
+
if ((Test-Path $contextSnapshot) -and (Select-String -Path $contextSnapshot -Pattern '## Implementation Log' -Quiet)) { "GATE:PASS" } else { "GATE:MISSING" }
|
|
32
34
|
```
|
|
33
35
|
If GATE:MISSING — send message to Dev (re-spawn if needed): "Write the '## Implementation Log' section to context-snapshot.md before I can proceed to review. Include: files changed/created, key decisions, deviations from plan, notable discoveries."
|
|
34
36
|
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
Before spawning Dev, check plan.md Tasks section:
|
|
6
6
|
```powershell
|
|
7
|
-
|
|
7
|
+
if (Test-Path -LiteralPath ".prizmkit/specs/{{FEATURE_SLUG}}/plan.md") {
|
|
8
|
+
(Select-String -Path ".prizmkit/specs/{{FEATURE_SLUG}}/plan.md" -Pattern '^- \[ \]' -ErrorAction SilentlyContinue).Count
|
|
9
|
+
} else {
|
|
10
|
+
0
|
|
11
|
+
}
|
|
8
12
|
```
|
|
9
13
|
- If result is `0` (all tasks already `[x]`) → **SKIP this phase**, go directly to Review. Do NOT spawn Dev.
|
|
10
14
|
- If result is non-zero → spawn Dev agent below.
|
|
@@ -33,12 +37,12 @@ Select-String -Pattern '^\- \[ \]' .prizmkit/specs/{{FEATURE_SLUG}}/plan.md 2>$n
|
|
|
33
37
|
**Gate Check — Implementation Log**:
|
|
34
38
|
After Dev agent returns, verify the Implementation Log was written:
|
|
35
39
|
```powershell
|
|
36
|
-
if (Select-String -Path .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md -Pattern "## Implementation Log" -Quiet) { "GATE:PASS" } else { "GATE:MISSING" }
|
|
40
|
+
if (Select-String -Path ".prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md" -Pattern "## Implementation Log" -Quiet -ErrorAction SilentlyContinue) { "GATE:PASS" } else { "GATE:MISSING" }
|
|
37
41
|
```
|
|
38
42
|
If GATE:MISSING — send message to Dev (re-spawn if needed): "Write the '## Implementation Log' section to context-snapshot.md before I can proceed to review. Include: files changed/created, key decisions, deviations from plan, notable discoveries."
|
|
39
43
|
|
|
40
44
|
Wait for Dev to return. **If Dev times out before all tasks are `[x]`**:
|
|
41
|
-
1. Check progress: `Select-String -
|
|
45
|
+
1. Check progress: `(Select-String -Path ".prizmkit/specs/{{FEATURE_SLUG}}/plan.md" -Pattern '^- \[ \]' -ErrorAction SilentlyContinue).Count`
|
|
42
46
|
2. If any tasks remain: re-spawn Dev with this recovery prompt:
|
|
43
47
|
> {{AGENT_PROMPT_DEV_RESUME}}
|
|
44
48
|
3. Max 2 recovery retries. After 2 failures, orchestrator implements remaining tasks directly.
|
|
@@ -10,9 +10,7 @@
|
|
|
10
10
|
You know this project's tech stack. Identify ALL test commands that apply (e.g., `go test ./...`, `npm test`, `cargo test`, `pytest`, `make test`, etc.). Record them as `TEST_CMDS`. Then record baseline:
|
|
11
11
|
```powershell
|
|
12
12
|
# Run each test command, capture output
|
|
13
|
-
& {
|
|
14
|
-
{{TEST_CMD}}
|
|
15
|
-
} 2>&1 | Tee-Object (Join-Path $env:TEMP "test-baseline.txt") | Select-Object -Last 20
|
|
13
|
+
& { {{TEST_CMD}} } 2>&1 | Tee-Object (Join-Path $env:TEMP "test-baseline.txt") | Select-Object -Last 20
|
|
16
14
|
```
|
|
17
15
|
|
|
18
16
|
**3b.** Run `/prizmkit-implement` — this handles the full implementation cycle:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
### Plan & Tasks
|
|
2
2
|
|
|
3
3
|
```powershell
|
|
4
|
-
|
|
4
|
+
Test-Path -LiteralPath ".prizmkit/specs/{{FEATURE_SLUG}}/plan.md"
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
If missing, run `/prizmkit-plan` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/` to generate `plan.md`:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
### Plan & Tasks
|
|
2
2
|
|
|
3
3
|
```powershell
|
|
4
|
-
Get-ChildItem .prizmkit/specs/{{FEATURE_SLUG}}/ -ErrorAction SilentlyContinue
|
|
4
|
+
Get-ChildItem -LiteralPath ".prizmkit/specs/{{FEATURE_SLUG}}/" -ErrorAction SilentlyContinue
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
If plan.md missing, run `/prizmkit-plan` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`:
|
|
@@ -7,7 +7,7 @@ The skill runs an internal review-fix loop (Reviewer Agent → filter → Dev Ag
|
|
|
7
7
|
**Gate Check — Review Report**:
|
|
8
8
|
After `/prizmkit-code-review` returns, verify the review report:
|
|
9
9
|
```powershell
|
|
10
|
-
if (Select-String -Path .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md -Pattern "## Verdict" -Quiet) { "GATE:PASS" } else { "GATE:MISSING" }
|
|
10
|
+
if (Select-String -Path ".prizmkit/specs/{{FEATURE_SLUG}}/review-report.md" -Pattern "## Verdict" -Quiet -ErrorAction SilentlyContinue) { "GATE:PASS" } else { "GATE:MISSING" }
|
|
11
11
|
```
|
|
12
12
|
If GATE:MISSING:
|
|
13
13
|
- Do not re-run `/prizmkit-code-review` in an unbounded report-repair loop.
|
|
@@ -7,7 +7,7 @@ The skill runs an internal review-fix loop (Reviewer Agent → filter → Dev Ag
|
|
|
7
7
|
**Gate Check — Review Report**:
|
|
8
8
|
After `/prizmkit-code-review` returns, verify the review report:
|
|
9
9
|
```powershell
|
|
10
|
-
if (Select-String -Path .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md -Pattern "## Verdict" -Quiet) { "GATE:PASS" } else { "GATE:MISSING" }
|
|
10
|
+
if (Select-String -Path ".prizmkit/specs/{{FEATURE_SLUG}}/review-report.md" -Pattern "## Verdict" -Quiet -ErrorAction SilentlyContinue) { "GATE:PASS" } else { "GATE:MISSING" }
|
|
11
11
|
```
|
|
12
12
|
If GATE:MISSING:
|
|
13
13
|
- Do not re-run `/prizmkit-code-review` in an unbounded report-repair loop.
|
|
@@ -19,7 +19,7 @@ Read `review-report.md` and check the Verdict:
|
|
|
19
19
|
- `PASS` → proceed to next phase
|
|
20
20
|
- `NEEDS_FIXES` → the skill exhausted its max rounds; log the remaining findings and proceed (do not retry externally)
|
|
21
21
|
|
|
22
|
-
Run the full test suite:
|
|
22
|
+
Run the full test suite: `& { {{TEST_CMD}} } 2>&1 | Tee-Object (Join-Path $env:TEMP "review-test-out.txt") | Select-Object -Last 20`
|
|
23
23
|
|
|
24
24
|
**CP-3**: Review complete, report written, and the Test Failure Recovery Protocol's Success Rule is satisfied.
|
|
25
25
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Check existing artifacts first:
|
|
4
4
|
```powershell
|
|
5
|
-
Get-ChildItem .prizmkit
|
|
5
|
+
if (Test-Path .prizmkit\specs\{{FEATURE_SLUG}}) { Get-ChildItem .prizmkit\specs\{{FEATURE_SLUG}} | Select-Object -ExpandProperty Name } else { "MISSING" }
|
|
6
6
|
```
|
|
7
7
|
|
|
8
8
|
- Both (spec.md, plan.md) exist → **SKIP to CP-1**
|
|
@@ -14,22 +14,17 @@ Get-ChildItem .prizmkit/specs/{{FEATURE_SLUG}}/ -ErrorAction SilentlyContinue
|
|
|
14
14
|
1. Read `.prizmkit/prizm-docs/root.prizm` and relevant L1/L2 prizm docs
|
|
15
15
|
2. Detect source code directories: read KEY_FILES and STRUCTURE sections from `root.prizm` to identify where source code lives (e.g. `src/`, `app/`, `lib/`, `cmd/`, `packages/`, or project root). If `root.prizm` is missing, scan the project tree:
|
|
16
16
|
```powershell
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
Get-ChildItem -Path . -File -Recurse -Depth 2 -Include *.js,*.ts,*.py,*.go,*.java,*.rb,*.rs -ErrorAction SilentlyContinue |
|
|
18
|
+
Where-Object { $_.FullName -notmatch '\\(node_modules|\.git|dist|build|vendor)(\\|$)' } |
|
|
19
|
+
Select-Object -First 30 -ExpandProperty FullName
|
|
20
20
|
```
|
|
21
21
|
Identify the top-level source directories from the results.
|
|
22
22
|
3. Scan the detected source directories for files related to this feature; read each one
|
|
23
23
|
4. Write `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`:
|
|
24
|
-
- **Section 1 —
|
|
25
|
-
- **Section 2 —
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Where-Object { $_.FullName -notmatch '\\(node_modules|\.git|dist|build|__pycache__|vendor)(\\|$)' } |
|
|
29
|
-
Select-Object -ExpandProperty FullName
|
|
30
|
-
```
|
|
31
|
-
- **Section 3 — Prizm Context**: full content of root.prizm and relevant L1/L2 docs
|
|
32
|
-
- **Section 4 — File Manifest**: For each file relevant to this feature, list: file path, why it's needed (modify/reference/test), key interface signatures (function names + params + return types). Do NOT include full file content — agents read files on-demand. Format:
|
|
24
|
+
- **Section 1 — Feature Brief**: feature description (copy from Task Contract above, 2-3 lines only)
|
|
25
|
+
- **Section 2 — Verification Gates**: copy the gate checklist from the Task Contract above
|
|
26
|
+
- **Section 3 — Key TRAPS & RULES**: extract TRAPS and RULES entries from loaded prizm-docs that apply to files in this feature's scope. Do NOT copy full L0/L1/L2 content — only the specific TRAPS/RULES lines relevant to the files listed in Section 4.
|
|
27
|
+
- **Section 4 — File Manifest**: For each file relevant to this feature, list path, why needed (modify/reference/test), key interface signatures. Do NOT include full file content. Format:
|
|
33
28
|
### Files to Modify
|
|
34
29
|
| File | Why Needed | Key Interfaces |
|
|
35
30
|
|------|-----------|----------------|
|
|
@@ -42,21 +37,22 @@ Get-ChildItem .prizmkit/specs/{{FEATURE_SLUG}}/ -ErrorAction SilentlyContinue
|
|
|
42
37
|
|
|
43
38
|
### Known TRAPS (from .prizmkit/prizm-docs/)
|
|
44
39
|
- <trap entries extracted from L1/L2 docs>
|
|
45
|
-
|
|
46
|
-
5. Confirm: `ls .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`
|
|
40
|
+
5. Confirm with PowerShell: `if (Test-Path .prizmkit\specs\{{FEATURE_SLUG}}\context-snapshot.md) { "EXISTS" } else { "MISSING" }`
|
|
47
41
|
|
|
48
42
|
**After Step A**: Use context-snapshot.md Section 4 File Manifest to guide targeted file reads. Do NOT scan directories or read unrelated files.
|
|
49
43
|
|
|
50
44
|
**Step B — Planning Artifacts** (generate only missing files):
|
|
51
45
|
|
|
52
46
|
```powershell
|
|
53
|
-
|
|
47
|
+
@('.prizmkit\specs\{{FEATURE_SLUG}}\spec.md', '.prizmkit\specs\{{FEATURE_SLUG}}\plan.md') | ForEach-Object {
|
|
48
|
+
if (Test-Path $_) { $_ }
|
|
49
|
+
}
|
|
54
50
|
```
|
|
55
51
|
|
|
56
52
|
- spec.md missing: Run `/prizmkit-plan` → generate spec.md. Resolve any `[NEEDS CLARIFICATION]` markers using the task description — do NOT pause for interactive input.
|
|
57
53
|
- plan.md missing: Run `/prizmkit-plan` → generate plan.md (change approach, components, interface design, data model, testing strategy, risk assessment, and Tasks section with `[ ]` checkboxes)
|
|
58
54
|
|
|
59
|
-
> All files go under `.prizmkit/specs/{{FEATURE_SLUG}}/`. Confirm each with `
|
|
55
|
+
> All files go under `.prizmkit/specs/{{FEATURE_SLUG}}/`. Confirm each with `Test-Path` after writing.
|
|
60
56
|
|
|
61
57
|
**Database Design Gate** (if feature involves data persistence — new tables, schema changes, new entities):
|
|
62
58
|
Before proceeding past CP-1, verify:
|
|
@@ -5,13 +5,11 @@
|
|
|
5
5
|
**Step 2 — Record pre-existing failure baseline**:
|
|
6
6
|
```powershell
|
|
7
7
|
# Run each test command, capture output
|
|
8
|
-
& {
|
|
9
|
-
{{TEST_CMD}}
|
|
10
|
-
} 2>&1 | Tee-Object (Join-Path $env:TEMP "test-baseline.txt") | Select-Object -Last 20
|
|
8
|
+
& { {{TEST_CMD}} } 2>&1 | Tee-Object (Join-Path $env:TEMP "test-baseline.txt") | Select-Object -Last 20
|
|
11
9
|
```
|
|
12
10
|
Save the list of **pre-existing failing tests** (if any) as `BASELINE_FAILURES`. These are known failures that existed before this session — Dev must NOT be blamed for them, but must list them in COMPLETION_SIGNAL.
|
|
13
11
|
|
|
14
|
-
> **Test Output Rule**: Always capture test output to a temp file (`
|
|
12
|
+
> **Test Output Rule**: Always capture test output to a temp file (`Tee-Object (Join-Path $env:TEMP "test-out.txt")`). Then use Select-String on the file instead of re-running the suite.
|
|
15
13
|
|
|
16
14
|
|
|
17
15
|
**Checkpoint update**: Run the update script to set step `test-baseline` to `"completed"`:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Subagent Timeout Recovery
|
|
2
2
|
|
|
3
3
|
If any agent times out:
|
|
4
|
-
1. `
|
|
4
|
+
1. `Get-ChildItem -LiteralPath ".prizmkit/specs/{{FEATURE_SLUG}}/" -ErrorAction SilentlyContinue` — check what exists
|
|
5
5
|
2. If `context-snapshot.md` exists: open recovery prompt with `"Read .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md for project context and any Implementation Log/Review Notes from previous agents. Run git diff HEAD to see actual code changes already made. Do NOT re-read individual source files unless the File Manifest directs you to."` + only remaining steps + `model: "lite"`
|
|
6
6
|
3. Max 2 retries per phase. After 2 failures, orchestrator completes the work directly and appends a Recovery Note to context-snapshot.md.
|