prizmkit 1.0.152 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create-prizmkit.js +27 -2
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/claude/paths.js +1 -1
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +482 -57
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +2 -6
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +48 -8
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +54 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +47 -10
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +11 -0
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +9 -0
- package/bundled/dev-pipeline/templates/sections/critical-paths-full.md +12 -0
- package/bundled/dev-pipeline/templates/sections/critical-paths-lite.md +7 -0
- package/bundled/dev-pipeline/templates/sections/directory-convention-agent.md +8 -0
- package/bundled/dev-pipeline/templates/sections/directory-convention-full.md +9 -0
- package/bundled/dev-pipeline/templates/sections/directory-convention-lite.md +6 -0
- package/bundled/dev-pipeline/templates/sections/failure-capture.md +21 -0
- package/bundled/dev-pipeline/templates/sections/failure-log-check.md +8 -0
- package/bundled/dev-pipeline/templates/sections/feature-context.md +23 -0
- package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +15 -0
- package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +15 -0
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +31 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +36 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +26 -0
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +14 -0
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +20 -0
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-critic-code.md +24 -0
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +45 -0
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan.md +24 -0
- package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +36 -0
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +24 -0
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +41 -0
- package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +32 -0
- package/bundled/dev-pipeline/templates/sections/phase-plan-agent.md +17 -0
- package/bundled/dev-pipeline/templates/sections/phase-plan-lite.md +16 -0
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +28 -0
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +36 -0
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +82 -0
- package/bundled/dev-pipeline/templates/sections/phase0-init.md +4 -0
- package/bundled/dev-pipeline/templates/sections/phase0-test-baseline.md +12 -0
- package/bundled/dev-pipeline/templates/sections/resume-header.md +2 -0
- package/bundled/dev-pipeline/templates/sections/session-context.md +6 -0
- package/bundled/dev-pipeline/templates/sections/subagent-timeout-recovery.md +6 -0
- package/bundled/skills/_metadata.json +21 -177
- package/bundled/skills/app-planner/SKILL.md +22 -3
- package/bundled/skills/app-planner/references/project-brief-guide.md +110 -0
- package/bundled/skills/bug-fix-workflow/SKILL.md +4 -0
- package/bundled/skills/bug-planner/SKILL.md +2 -2
- package/bundled/skills/dev-pipeline-launcher/SKILL.md +1 -1
- package/bundled/skills/prizm-kit/SKILL.md +18 -47
- package/bundled/skills/prizm-kit/assets/project-memory-template.md +1 -1
- package/bundled/skills/prizmkit-analyze/SKILL.md +4 -4
- package/bundled/skills/prizmkit-init/SKILL.md +4 -4
- package/bundled/skills/prizmkit-plan/SKILL.md +126 -108
- package/bundled/skills/prizmkit-plan/assets/plan-template.md +1 -2
- package/bundled/skills/refactor-workflow/SKILL.md +142 -124
- package/bundled/team/prizm-dev-team.json +2 -8
- package/package.json +1 -1
- package/src/clean.js +8 -0
- package/src/gitignore-template.js +12 -0
- package/src/index.js +3 -22
- package/src/scaffold.js +20 -11
- package/src/upgrade.js +6 -31
- package/bundled/skills/prizmkit-clarify/SKILL.md +0 -93
- package/bundled/skills/prizmkit-specify/SKILL.md +0 -118
- package/bundled/skills/prizmkit-specify/assets/spec-template.md +0 -56
- package/bundled/skills/prizmkit-tool-adr-manager/SKILL.md +0 -67
- package/bundled/skills/prizmkit-tool-adr-manager/assets/adr-template.md +0 -26
- package/bundled/skills/prizmkit-tool-api-doc-generator/SKILL.md +0 -55
- package/bundled/skills/prizmkit-tool-bug-reproducer/SKILL.md +0 -61
- package/bundled/skills/prizmkit-tool-ci-cd-generator/SKILL.md +0 -53
- package/bundled/skills/prizmkit-tool-db-migration/SKILL.md +0 -64
- package/bundled/skills/prizmkit-tool-dependency-health/SKILL.md +0 -122
- package/bundled/skills/prizmkit-tool-deployment-strategy/SKILL.md +0 -57
- package/bundled/skills/prizmkit-tool-error-triage/SKILL.md +0 -54
- package/bundled/skills/prizmkit-tool-log-analyzer/SKILL.md +0 -54
- package/bundled/skills/prizmkit-tool-monitoring-setup/SKILL.md +0 -74
- package/bundled/skills/prizmkit-tool-onboarding-generator/SKILL.md +0 -69
- package/bundled/skills/prizmkit-tool-perf-profiler/SKILL.md +0 -54
- package/bundled/skills/prizmkit-tool-security-audit/SKILL.md +0 -129
- package/bundled/skills/prizmkit-tool-tech-debt-tracker/SKILL.md +0 -138
|
@@ -28,7 +28,7 @@ from datetime import datetime, timezone
|
|
|
28
28
|
# Ordered pipeline phases — index defines forward-only progression.
|
|
29
29
|
# Phase detection is monotonic: once a phase is reached, earlier phases
|
|
30
30
|
# cannot be re-entered (prevents false positives from file content mentions).
|
|
31
|
-
PHASE_ORDER = ["
|
|
31
|
+
PHASE_ORDER = ["plan", "analyze", "implement", "code-review", "retrospective", "commit"]
|
|
32
32
|
|
|
33
33
|
# Keywords for phase detection.
|
|
34
34
|
# "strong" keywords are skill invocations — high confidence, but still
|
|
@@ -36,13 +36,9 @@ PHASE_ORDER = ["specify", "plan", "analyze", "implement", "code-review", "retros
|
|
|
36
36
|
# "weak" keywords are contextual hints — also forward-only, used when no
|
|
37
37
|
# strong keyword matches.
|
|
38
38
|
PHASE_KEYWORDS = {
|
|
39
|
-
"specify": {
|
|
40
|
-
"strong": ["prizmkit-specify"],
|
|
41
|
-
"weak": ["spec.md", "specification", "gathering requirements"],
|
|
42
|
-
},
|
|
43
39
|
"plan": {
|
|
44
40
|
"strong": ["prizmkit-plan"],
|
|
45
|
-
"weak": ["plan.md", "architecture", "task checklist", "task breakdown"],
|
|
41
|
+
"weak": ["spec.md", "plan.md", "specification", "architecture", "task checklist", "task breakdown", "gathering requirements"],
|
|
46
42
|
},
|
|
47
43
|
"analyze": {
|
|
48
44
|
"strong": ["prizmkit-analyze"],
|
|
@@ -23,6 +23,12 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
|
|
|
23
23
|
|
|
24
24
|
{{ACCEPTANCE_CRITERIA}}
|
|
25
25
|
|
|
26
|
+
### Project Brief
|
|
27
|
+
|
|
28
|
+
> Distilled summary of the project's key requirements and design decisions, captured during planning. When your feature implementation touches any of these key points, ensure alignment.
|
|
29
|
+
|
|
30
|
+
{{PROJECT_BRIEF}}
|
|
31
|
+
|
|
26
32
|
### Dependencies (Already Completed)
|
|
27
33
|
|
|
28
34
|
{{COMPLETED_DEPENDENCIES}}
|
|
@@ -41,7 +47,7 @@ You are running in headless mode with a FINITE context window. Exceeding it will
|
|
|
41
47
|
4. **One task at a time** — In Phase 3 (implement), complete and test one task before starting the next.
|
|
42
48
|
5. **Minimize tool output** — When running commands, use `| head -20` or `| tail -20` to limit output. Never dump entire test suites or logs.
|
|
43
49
|
6. **No intermediate commits** — Do NOT run `git add`/`git commit` during Phase 1-3. All changes are committed once at the end in Phase 4 via `/prizmkit-committer`.
|
|
44
|
-
7. **Capture test output once** — When running
|
|
50
|
+
7. **Capture test output once** — When running test suites, always use `$TEST_CMD 2>&1 | tee /tmp/test-out.txt | tail -20`. Then grep `/tmp/test-out.txt` for details. Never re-run the suite just to apply a different filter.
|
|
45
51
|
|
|
46
52
|
---
|
|
47
53
|
|
|
@@ -130,14 +136,11 @@ grep -q '^/binary-name$' .gitignore || echo '/binary-name' >> .gitignore
|
|
|
130
136
|
```
|
|
131
137
|
Never commit compiled binaries, build output, or generated artifacts.
|
|
132
138
|
|
|
133
|
-
**3a.** Detect
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
node --test tests/**/*.test.js 2>&1 | tail -3 # Node built-in
|
|
137
|
-
npm test 2>&1 | tail -3 # npm fallback
|
|
138
|
-
```
|
|
139
|
-
Record the working command as `TEST_CMD`. Then record baseline failures (if any):
|
|
139
|
+
**3a.** Detect test commands and record baseline:
|
|
140
|
+
|
|
141
|
+
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` (one or more commands). Then record baseline:
|
|
140
142
|
```bash
|
|
143
|
+
# Run each test command, capture output
|
|
141
144
|
$TEST_CMD 2>&1 | tee /tmp/test-baseline.txt | tail -20
|
|
142
145
|
```
|
|
143
146
|
|
|
@@ -191,6 +194,43 @@ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without
|
|
|
191
194
|
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.
|
|
192
195
|
{{END_IF_BROWSER_INTERACTION}}
|
|
193
196
|
|
|
197
|
+
### Phase 3.8: Local Deploy Verification
|
|
198
|
+
|
|
199
|
+
You just implemented this feature — you know the project's tech stack and build tools.
|
|
200
|
+
|
|
201
|
+
1. **Build**: Run the project's build/compile commands. If a required tool is missing, install it first.
|
|
202
|
+
2. **Fix**: If build fails with code errors (type errors, missing imports, config issues), fix them (max 2 rounds), then re-verify.
|
|
203
|
+
3. **Assess and record** — append to context-snapshot.md:
|
|
204
|
+
- **ALL builds pass** → `## Deploy Verification: PASS` — proceed to commit
|
|
205
|
+
- **Some builds fail with fixable errors** → fix and re-verify (already handled in step 2)
|
|
206
|
+
- **Cannot build locally** (missing system-level deps you cannot install) → Generate `DEPLOY.md` with:
|
|
207
|
+
```
|
|
208
|
+
# Local Development Setup
|
|
209
|
+
|
|
210
|
+
## Prerequisites
|
|
211
|
+
- [tool]: [install instruction]
|
|
212
|
+
|
|
213
|
+
## Build Steps
|
|
214
|
+
1. [exact command]
|
|
215
|
+
|
|
216
|
+
## Run / Dev Mode
|
|
217
|
+
[exact command to start the app locally]
|
|
218
|
+
|
|
219
|
+
## Verify
|
|
220
|
+
[how to confirm the app is running correctly]
|
|
221
|
+
```
|
|
222
|
+
Record: `## Deploy Verification: PARTIAL — see DEPLOY.md for missing prerequisites`
|
|
223
|
+
|
|
224
|
+
Deploy verification does NOT block the commit, but you MUST attempt it.
|
|
225
|
+
|
|
226
|
+
**Step 4 — Smoke test** (only if build passed and project can be started):
|
|
227
|
+
1. Start the project locally (e.g., `make dev`, `npm start`, `go run .`, etc.)
|
|
228
|
+
2. Verify basic functionality: hit key endpoints, check health routes, confirm the UI loads
|
|
229
|
+
3. Stop the server process you started — do NOT leave it running
|
|
230
|
+
4. Record smoke test results in `## Deploy Verification` section
|
|
231
|
+
|
|
232
|
+
If the project cannot be started locally (e.g., requires external services, databases, credentials), skip the smoke test and note why.
|
|
233
|
+
|
|
194
234
|
### Phase 4: Architecture Sync & Commit (SINGLE COMMIT)
|
|
195
235
|
|
|
196
236
|
**4a.** Run `/prizmkit-retrospective` — maintains `.prizm-docs/` (architecture index):
|
|
@@ -23,6 +23,12 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
|
|
|
23
23
|
|
|
24
24
|
{{ACCEPTANCE_CRITERIA}}
|
|
25
25
|
|
|
26
|
+
### Project Brief
|
|
27
|
+
|
|
28
|
+
> Distilled summary of the project's key requirements and design decisions, captured during planning. When your feature implementation touches any of these key points, ensure alignment.
|
|
29
|
+
|
|
30
|
+
{{PROJECT_BRIEF}}
|
|
31
|
+
|
|
26
32
|
### Dependencies (Already Completed)
|
|
27
33
|
|
|
28
34
|
{{COMPLETED_DEPENDENCIES}}
|
|
@@ -41,7 +47,7 @@ You are running in headless mode with a FINITE context window. Exceeding it will
|
|
|
41
47
|
4. **One task at a time** — In Phase 4 (implement), complete and test one task before starting the next.
|
|
42
48
|
5. **Minimize tool output** — When running commands, use `| head -20` or `| tail -20` to limit output. Never dump entire test suites or logs.
|
|
43
49
|
6. **No intermediate commits** — Do NOT run `git add`/`git commit` during Phase 1-5. All changes are committed once at the end in Phase 6 via `/prizmkit-committer`.
|
|
44
|
-
7. **Capture test output once** — When running
|
|
50
|
+
7. **Capture test output once** — When running test suites, always use `$TEST_CMD 2>&1 | tee /tmp/test-out.txt | tail -20`. Then grep `/tmp/test-out.txt` for details. Never re-run the suite just to apply a different filter.
|
|
45
51
|
|
|
46
52
|
---
|
|
47
53
|
|
|
@@ -82,6 +88,16 @@ If any agent times out:
|
|
|
82
88
|
Check `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — if exists, skip Phase 1 and proceed to Phase {{RESUME_PHASE}}.
|
|
83
89
|
{{END_IF_RESUME}}
|
|
84
90
|
|
|
91
|
+
### Phase 0.5: Detect Test Commands
|
|
92
|
+
|
|
93
|
+
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:
|
|
94
|
+
```bash
|
|
95
|
+
$TEST_CMD 2>&1 | tee /tmp/test-baseline.txt | tail -20
|
|
96
|
+
```
|
|
97
|
+
Save pre-existing failing tests as `BASELINE_FAILURES`.
|
|
98
|
+
|
|
99
|
+
> **⚠️ Test Output Rule**: Always capture test output to a temp file (`tee /tmp/test-out.txt`). Then grep the file instead of re-running the suite.
|
|
100
|
+
|
|
85
101
|
### Phase 1: Build Context Snapshot (you, the orchestrator)
|
|
86
102
|
|
|
87
103
|
**Check for previous failure log:**
|
|
@@ -302,6 +318,43 @@ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without
|
|
|
302
318
|
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.
|
|
303
319
|
{{END_IF_BROWSER_INTERACTION}}
|
|
304
320
|
|
|
321
|
+
### Phase 5.8: Local Deploy Verification
|
|
322
|
+
|
|
323
|
+
You just implemented this feature — you know the project's tech stack and build tools.
|
|
324
|
+
|
|
325
|
+
1. **Build**: Run the project's build/compile commands. If a required tool is missing, install it first.
|
|
326
|
+
2. **Fix**: If build fails with code errors (type errors, missing imports, config issues), fix them (max 2 rounds), then re-verify.
|
|
327
|
+
3. **Assess and record** — append to context-snapshot.md:
|
|
328
|
+
- **ALL builds pass** → `## Deploy Verification: PASS` — proceed to commit
|
|
329
|
+
- **Some builds fail with fixable errors** → fix and re-verify (already handled in step 2)
|
|
330
|
+
- **Cannot build locally** (missing system-level deps you cannot install) → Generate `DEPLOY.md` with:
|
|
331
|
+
```
|
|
332
|
+
# Local Development Setup
|
|
333
|
+
|
|
334
|
+
## Prerequisites
|
|
335
|
+
- [tool]: [install instruction]
|
|
336
|
+
|
|
337
|
+
## Build Steps
|
|
338
|
+
1. [exact command]
|
|
339
|
+
|
|
340
|
+
## Run / Dev Mode
|
|
341
|
+
[exact command to start the app locally]
|
|
342
|
+
|
|
343
|
+
## Verify
|
|
344
|
+
[how to confirm the app is running correctly]
|
|
345
|
+
```
|
|
346
|
+
Record: `## Deploy Verification: PARTIAL — see DEPLOY.md for missing prerequisites`
|
|
347
|
+
|
|
348
|
+
Deploy verification does NOT block the commit, but you MUST attempt it.
|
|
349
|
+
|
|
350
|
+
**Step 4 — Smoke test** (only if build passed and project can be started):
|
|
351
|
+
1. Start the project locally (e.g., `make dev`, `npm start`, `go run .`, etc.)
|
|
352
|
+
2. Verify basic functionality: hit key endpoints, check health routes, confirm the UI loads
|
|
353
|
+
3. Stop the server process you started — do NOT leave it running
|
|
354
|
+
4. Record smoke test results in `## Deploy Verification` section
|
|
355
|
+
|
|
356
|
+
If the project cannot be started locally (e.g., requires external services, databases, credentials), skip the smoke test and note why.
|
|
357
|
+
|
|
305
358
|
### Phase 6: Architecture Sync & Commit (SINGLE COMMIT)
|
|
306
359
|
|
|
307
360
|
**6a.** Run `/prizmkit-retrospective` — maintains `.prizm-docs/` (architecture index):
|
|
@@ -23,6 +23,12 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
|
|
|
23
23
|
|
|
24
24
|
{{ACCEPTANCE_CRITERIA}}
|
|
25
25
|
|
|
26
|
+
### Project Brief
|
|
27
|
+
|
|
28
|
+
> Distilled summary of the project's key requirements and design decisions, captured during planning. When your feature implementation touches any of these key points, ensure alignment.
|
|
29
|
+
|
|
30
|
+
{{PROJECT_BRIEF}}
|
|
31
|
+
|
|
26
32
|
### Dependencies (Already Completed)
|
|
27
33
|
|
|
28
34
|
{{COMPLETED_DEPENDENCIES}}
|
|
@@ -75,23 +81,18 @@ If any agent times out:
|
|
|
75
81
|
- **CP-0**: Verify `.prizm-docs/root.prizm`, `.prizmkit/config.json` exist
|
|
76
82
|
{{END_IF_INIT_NEEDED}}
|
|
77
83
|
{{IF_INIT_DONE}}
|
|
78
|
-
### Phase 0: Record Test Baseline & Detect Test
|
|
84
|
+
### Phase 0: Record Test Baseline & Detect Test Commands
|
|
79
85
|
|
|
80
|
-
**Step 1 — Detect
|
|
81
|
-
```bash
|
|
82
|
-
# Try in order, use the first one that exits 0
|
|
83
|
-
node --test tests/**/*.test.js 2>&1 | tail -3 # Node built-in
|
|
84
|
-
npm test 2>&1 | tail -3 # npm script fallback
|
|
85
|
-
```
|
|
86
|
-
Record the working command as `TEST_CMD`. If both fail, record `TEST_CMD="npm test"` as default.
|
|
86
|
+
**Step 1 — Detect test commands**: 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`.
|
|
87
87
|
|
|
88
88
|
**Step 2 — Record pre-existing failure baseline**:
|
|
89
89
|
```bash
|
|
90
|
+
# Run each test command, capture output
|
|
90
91
|
$TEST_CMD 2>&1 | tee /tmp/test-baseline.txt | tail -20
|
|
91
92
|
```
|
|
92
93
|
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.
|
|
93
94
|
|
|
94
|
-
> **⚠️ Test Output Rule**: Always capture test output to a temp file (`tee /tmp/test-out.txt`). Then grep the file instead of re-running the suite.
|
|
95
|
+
> **⚠️ Test Output Rule**: Always capture test output to a temp file (`tee /tmp/test-out.txt`). Then grep the file instead of re-running the suite.
|
|
95
96
|
{{END_IF_INIT_DONE}}
|
|
96
97
|
|
|
97
98
|
### Step 1: Initialize
|
|
@@ -182,7 +183,7 @@ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing
|
|
|
182
183
|
ls .prizmkit/specs/{{FEATURE_SLUG}}/spec.md .prizmkit/specs/{{FEATURE_SLUG}}/plan.md 2>/dev/null
|
|
183
184
|
```
|
|
184
185
|
|
|
185
|
-
- spec.md missing: Run `/prizmkit-
|
|
186
|
+
- spec.md missing: Run `/prizmkit-plan` → generate spec.md. Resolve any `[NEEDS CLARIFICATION]` markers using the feature description — do NOT pause for interactive input.
|
|
186
187
|
- plan.md missing: Run `/prizmkit-plan` → generate plan.md (architecture, components, interface design, data model, testing strategy, risk assessment, and Tasks section with `[ ]` checkboxes)
|
|
187
188
|
|
|
188
189
|
> All files go under `.prizmkit/specs/{{FEATURE_SLUG}}/`. Confirm each with `ls` after writing.
|
|
@@ -400,6 +401,42 @@ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without
|
|
|
400
401
|
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.
|
|
401
402
|
{{END_IF_BROWSER_INTERACTION}}
|
|
402
403
|
|
|
404
|
+
### Phase 5.8: Local Deploy Verification
|
|
405
|
+
|
|
406
|
+
You just implemented this feature — you know the project's tech stack and build tools.
|
|
407
|
+
|
|
408
|
+
1. **Build**: Run the project's build/compile commands. If a required tool is missing, install it first.
|
|
409
|
+
2. **Fix**: If build fails with code errors (type errors, missing imports, config issues), fix them (max 2 rounds), then re-verify.
|
|
410
|
+
3. **Assess and record** — append to context-snapshot.md:
|
|
411
|
+
- **ALL builds pass** → `## Deploy Verification: PASS` — proceed to commit
|
|
412
|
+
- **Some builds fail with fixable errors** → fix and re-verify (already handled in step 2)
|
|
413
|
+
- **Cannot build locally** (missing system-level deps you cannot install) → Generate `DEPLOY.md` with:
|
|
414
|
+
```
|
|
415
|
+
# Local Development Setup
|
|
416
|
+
|
|
417
|
+
## Prerequisites
|
|
418
|
+
- [tool]: [install instruction]
|
|
419
|
+
|
|
420
|
+
## Build Steps
|
|
421
|
+
1. [exact command]
|
|
422
|
+
|
|
423
|
+
## Run / Dev Mode
|
|
424
|
+
[exact command to start the app locally]
|
|
425
|
+
|
|
426
|
+
## Verify
|
|
427
|
+
[how to confirm the app is running correctly]
|
|
428
|
+
```
|
|
429
|
+
Record: `## Deploy Verification: PARTIAL — see DEPLOY.md for missing prerequisites`
|
|
430
|
+
|
|
431
|
+
Deploy verification does NOT block the commit, but you MUST attempt it.
|
|
432
|
+
|
|
433
|
+
**Step 4 — Smoke test** (only if build passed and project can be started):
|
|
434
|
+
1. Start the project locally (e.g., `make dev`, `npm start`, `go run .`, etc.)
|
|
435
|
+
2. Verify basic functionality: hit key endpoints, check health routes, confirm the UI loads
|
|
436
|
+
3. Stop the server process you started — do NOT leave it running
|
|
437
|
+
4. Record smoke test results in `## Deploy Verification` section
|
|
438
|
+
|
|
439
|
+
If the project cannot be started locally (e.g., requires external services, databases, credentials), skip the smoke test and note why.
|
|
403
440
|
|
|
404
441
|
### Phase 6: Retrospective & Commit (SINGLE COMMIT) — DO NOT SKIP
|
|
405
442
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Context Budget Rules (CRITICAL — read before any phase)
|
|
2
|
+
|
|
3
|
+
You are running in headless mode with a FINITE context window. Exceeding it will crash the session and lose all work. Follow these rules strictly:
|
|
4
|
+
|
|
5
|
+
1. **context-snapshot.md is your single source of truth** — After it is built, ALWAYS read context-snapshot.md instead of re-reading individual source files
|
|
6
|
+
2. **Never re-read your own writes** — After you create/modify a file, do NOT read it back to verify. Trust your write was correct.
|
|
7
|
+
3. **Stay focused** — Do NOT explore code unrelated to this feature. No curiosity-driven reads.
|
|
8
|
+
4. **One task at a time** — Complete and test one task before starting the next.
|
|
9
|
+
5. **Minimize tool output** — When running commands, use `| head -20` or `| tail -20` to limit output. Never dump entire test suites or logs.
|
|
10
|
+
6. **No intermediate commits** — Do NOT run `git add`/`git commit` during implementation phases. All changes are committed once at the end via `/prizmkit-committer`.
|
|
11
|
+
7. **Capture test output once** — When running test suites, always use `$TEST_CMD 2>&1 | tee /tmp/test-out.txt | tail -20`. Then grep `/tmp/test-out.txt` for details. Never re-run the suite just to apply a different filter.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## Critical Paths
|
|
2
|
+
|
|
3
|
+
| Resource | Path |
|
|
4
|
+
|----------|------|
|
|
5
|
+
| Feature Artifacts Dir | `.prizmkit/specs/{{FEATURE_SLUG}}/` |
|
|
6
|
+
| Context Snapshot | `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` |
|
|
7
|
+
| Dev Agent Def | {{DEV_SUBAGENT_PATH}} |
|
|
8
|
+
| Reviewer Agent Def | {{REVIEWER_SUBAGENT_PATH}} |
|
|
9
|
+
| Project Root | {{PROJECT_ROOT}} |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## Critical Paths
|
|
2
|
+
|
|
3
|
+
| Resource | Path |
|
|
4
|
+
|----------|------|
|
|
5
|
+
| Feature Artifacts Dir | `.prizmkit/specs/{{FEATURE_SLUG}}/` |
|
|
6
|
+
| Context Snapshot | `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` |
|
|
7
|
+
| Team Config | `{{TEAM_CONFIG_PATH}}` |
|
|
8
|
+
| Dev Agent Def | {{DEV_SUBAGENT_PATH}} |
|
|
9
|
+
| Reviewer Agent Def | {{REVIEWER_SUBAGENT_PATH}} |
|
|
10
|
+
| Critic Agent Def | {{CRITIC_SUBAGENT_PATH}} |
|
|
11
|
+
| Project Root | {{PROJECT_ROOT}} |
|
|
12
|
+
| Feature List Path | {{FEATURE_LIST_PATH}} |
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## PrizmKit Directory Convention
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← orchestrator writes Sections 1-4; Dev appends Implementation Log; Reviewer appends Review Notes
|
|
5
|
+
.prizmkit/specs/{{FEATURE_SLUG}}/plan.md ← includes Tasks section
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
**`context-snapshot.md`** is the shared knowledge base. Orchestrator writes Sections 1-4; Dev appends Implementation Log; Reviewer appends Review Notes. Append-only after initial creation.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## PrizmKit Directory Convention
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← orchestrator writes Sections 1-4; Dev appends Implementation Log; Reviewer appends Review Notes
|
|
5
|
+
.prizmkit/specs/{{FEATURE_SLUG}}/spec.md
|
|
6
|
+
.prizmkit/specs/{{FEATURE_SLUG}}/plan.md ← includes Tasks section
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
**`context-snapshot.md`** is the shared knowledge base. Orchestrator writes Sections 1-4; Dev appends Implementation Log; Reviewer appends Review Notes. This eliminates redundant I/O across all agents.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## Failure Capture Protocol
|
|
2
|
+
|
|
3
|
+
If you encounter an unrecoverable error, context overflow, or are about to exit without completing all phases:
|
|
4
|
+
|
|
5
|
+
1. Write `.prizmkit/specs/{{FEATURE_SLUG}}/failure-log.md` BEFORE exiting:
|
|
6
|
+
```
|
|
7
|
+
FAILURE_TYPE: timeout | test_failure | review_rejected | context_overflow | unknown
|
|
8
|
+
PHASE: <which phase failed>
|
|
9
|
+
ROOT_CAUSE: <1-2 sentence explanation>
|
|
10
|
+
ATTEMPTED: <approaches already tried>
|
|
11
|
+
SUGGESTION: <what the next session should try differently>
|
|
12
|
+
DISCOVERED_TRAPS:
|
|
13
|
+
- [CRITICAL|HIGH|LOW] <gotcha discovered during this failed session> | FIX: <approach>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
2. This file is intentionally lightweight — write it BEFORE context runs out.
|
|
17
|
+
|
|
18
|
+
**Lifecycle**: failure-log.md is a temporary cross-session artifact. Do NOT commit it to git. After a successful session (all phases complete + commit done), delete it:
|
|
19
|
+
```bash
|
|
20
|
+
rm -f .prizmkit/specs/{{FEATURE_SLUG}}/failure-log.md
|
|
21
|
+
```
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
**Check for previous failure log:**
|
|
2
|
+
```bash
|
|
3
|
+
cat .prizmkit/specs/{{FEATURE_SLUG}}/failure-log.md 2>/dev/null || echo "NO_PREVIOUS_FAILURE"
|
|
4
|
+
```
|
|
5
|
+
If failure-log.md exists:
|
|
6
|
+
- Read ROOT_CAUSE and SUGGESTION — adjust your approach accordingly
|
|
7
|
+
- Read DISCOVERED_TRAPS — if any are genuine, inject into .prizm-docs/ during the commit phase retrospective
|
|
8
|
+
- Do NOT delete failure-log.md until this session completes all phases and commits successfully
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<feature-context>
|
|
2
|
+
### Feature Description
|
|
3
|
+
|
|
4
|
+
{{FEATURE_DESCRIPTION}}
|
|
5
|
+
|
|
6
|
+
### Acceptance Criteria
|
|
7
|
+
|
|
8
|
+
{{ACCEPTANCE_CRITERIA}}
|
|
9
|
+
|
|
10
|
+
### Project Brief
|
|
11
|
+
|
|
12
|
+
> Distilled summary of the project's key requirements and design decisions, captured during planning. When your feature implementation touches any of these key points, ensure alignment.
|
|
13
|
+
|
|
14
|
+
{{PROJECT_BRIEF}}
|
|
15
|
+
|
|
16
|
+
### Dependencies (Already Completed)
|
|
17
|
+
|
|
18
|
+
{{COMPLETED_DEPENDENCIES}}
|
|
19
|
+
|
|
20
|
+
### App Global Context
|
|
21
|
+
|
|
22
|
+
{{GLOBAL_CONTEXT}}
|
|
23
|
+
</feature-context>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
### Analyze — Reviewer Subagent
|
|
2
|
+
|
|
3
|
+
Spawn Reviewer agent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false).
|
|
4
|
+
|
|
5
|
+
Prompt:
|
|
6
|
+
> "Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
7
|
+
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has project context, Section 4 has file manifest.
|
|
8
|
+
> 2. Run prizmkit-analyze: cross-check `plan.md` (including Tasks section) against feature description and acceptance criteria for consistency.
|
|
9
|
+
> 3. Before flagging CRITICAL or HIGH issues, read the relevant source files listed in the File Manifest to verify.
|
|
10
|
+
> Report: CRITICAL, HIGH, MEDIUM issues found (or 'No issues found')."
|
|
11
|
+
|
|
12
|
+
Wait for Reviewer to return.
|
|
13
|
+
- If CRITICAL issues found: fix them yourself — read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full project context. Fix ONLY the listed CRITICAL issues in plan.md. Then re-run analyze (max 1 round).
|
|
14
|
+
|
|
15
|
+
**CP-2**: No CRITICAL issues.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
### Analyze — Reviewer Agent
|
|
2
|
+
|
|
3
|
+
Spawn Reviewer agent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false).
|
|
4
|
+
|
|
5
|
+
Prompt:
|
|
6
|
+
> "Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
7
|
+
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has project context, Section 4 has file manifest.
|
|
8
|
+
> 2. Run prizmkit-analyze: cross-check `spec.md` and `plan.md` (including Tasks section) for consistency.
|
|
9
|
+
> 3. Before flagging CRITICAL or HIGH issues, read the relevant source files listed in the File Manifest to verify.
|
|
10
|
+
> Report: CRITICAL, HIGH, MEDIUM issues found (or 'No issues found')."
|
|
11
|
+
|
|
12
|
+
Wait for Reviewer to return.
|
|
13
|
+
- If CRITICAL issues found: fix them yourself — read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full project context. Fix ONLY the listed CRITICAL issues in spec.md/plan.md. Then re-run analyze (max 1 round).
|
|
14
|
+
|
|
15
|
+
**CP-2**: No CRITICAL issues.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
### Browser Verification (playwright-cli) — MANDATORY
|
|
2
|
+
|
|
3
|
+
You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without actually running playwright-cli.
|
|
4
|
+
|
|
5
|
+
**Startup**:
|
|
6
|
+
1. Check if port is already in use: `lsof -ti:3001 | xargs kill -9 2>/dev/null || true`
|
|
7
|
+
2. Start dev server: `{{BROWSER_SETUP_COMMAND}}`
|
|
8
|
+
3. Wait for server to be ready: poll `{{BROWSER_URL}}` with `curl -s -o /dev/null -w "%{http_code}"` until it returns 200 or 302 (max 30 seconds, 2s interval)
|
|
9
|
+
4. If the page requires authentication, use playwright-cli to register a test user and log in first
|
|
10
|
+
|
|
11
|
+
**Verification**:
|
|
12
|
+
5. Use `playwright-cli` to open `{{BROWSER_URL}}`, then verify:
|
|
13
|
+
{{BROWSER_VERIFY_STEPS}}
|
|
14
|
+
6. Take a final screenshot for evidence
|
|
15
|
+
|
|
16
|
+
**Cleanup (REQUIRED — you started it, you stop it)**:
|
|
17
|
+
7. Stop the dev server process you started in step 2 (kill the process)
|
|
18
|
+
8. Verify port is released: `lsof -ti:3001 | xargs kill -9 2>/dev/null || true`
|
|
19
|
+
|
|
20
|
+
**Reporting**:
|
|
21
|
+
9. Append results to `context-snapshot.md`:
|
|
22
|
+
```
|
|
23
|
+
## Browser Verification
|
|
24
|
+
URL: {{BROWSER_URL}}
|
|
25
|
+
Steps executed: [list]
|
|
26
|
+
Screenshot: [path]
|
|
27
|
+
Result: PASS / FAIL (reason)
|
|
28
|
+
Server cleanup: confirmed
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
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.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
### Architecture Sync & Commit (SINGLE COMMIT) — DO NOT SKIP
|
|
2
|
+
|
|
3
|
+
**For bug fixes**: run `/prizmkit-retrospective` for structural sync only (skip knowledge injection unless a new TRAPS was discovered). Use `fix(<scope>):` commit prefix.
|
|
4
|
+
|
|
5
|
+
**a.** Check if feature already committed:
|
|
6
|
+
```bash
|
|
7
|
+
git log --oneline | grep "{{FEATURE_ID}}" | head -3
|
|
8
|
+
```
|
|
9
|
+
- 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.
|
|
10
|
+
- If no existing commit → proceed normally with b–d.
|
|
11
|
+
|
|
12
|
+
**b.** Run `/prizmkit-retrospective` (**before commit**, maintains `.prizm-docs/` architecture index):
|
|
13
|
+
- **Structural sync**: update KEY_FILES/INTERFACES/DEPENDENCIES/file counts for changed modules
|
|
14
|
+
- **Architecture knowledge** (feature sessions only): extract TRAPS, RULES, DECISIONS from completed work into `.prizm-docs/`
|
|
15
|
+
- **L2 coverage check**: For any module/sub-module with source files created or significantly modified in this session but no L2 `.prizm` doc — evaluate whether L2 is warranted and create if so. The current session has the best context for accurate KEY_FILES, TRAPS, and DECISIONS.
|
|
16
|
+
- Stage doc changes: `git add .prizm-docs/`
|
|
17
|
+
⚠️ Do NOT commit here. Only stage.
|
|
18
|
+
- **For bug-fix sessions**: structural sync only, skip knowledge injection unless a genuinely new pitfall was discovered
|
|
19
|
+
|
|
20
|
+
**c.** Stage all feature code explicitly (NEVER use `git add -A` or `git add .`):
|
|
21
|
+
```bash
|
|
22
|
+
git add <specific-files-created-or-modified>
|
|
23
|
+
git add .prizm-docs/
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**d.** Run `/prizmkit-committer` → THE ONLY commit for this feature:
|
|
27
|
+
`feat({{FEATURE_ID}}): {{FEATURE_TITLE}}`
|
|
28
|
+
This single commit includes: feature code + tests + .prizm-docs/ updates. Do NOT push.
|
|
29
|
+
- MANDATORY: commit must be done via `/prizmkit-committer` skill. Do NOT run manual `git add`/`git commit` as a substitute.
|
|
30
|
+
- Do NOT run `update-feature-status.py` here — the pipeline runner handles feature-list.json updates automatically after session exit.
|
|
31
|
+
|
|
32
|
+
**e.** Final verification:
|
|
33
|
+
```bash
|
|
34
|
+
git status --short
|
|
35
|
+
```
|
|
36
|
+
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.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
### Architecture Sync & Commit (SINGLE COMMIT)
|
|
2
|
+
|
|
3
|
+
**a.** Run `/prizmkit-retrospective` — maintains `.prizm-docs/` (architecture index):
|
|
4
|
+
1. **Structural sync**: Use `git diff --cached --name-status` to locate changed modules, update KEY_FILES/INTERFACES/DEPENDENCIES/file counts in affected `.prizm-docs/` files
|
|
5
|
+
2. **Architecture knowledge** (feature sessions only): Extract TRAPS/RULES/DECISIONS from completed work into `.prizm-docs/`
|
|
6
|
+
3. **L2 coverage check**: For any module/sub-module with source files created or significantly modified in this session but no L2 `.prizm` doc — evaluate whether L2 is warranted and create if so. The current session has the best context for accurate KEY_FILES, TRAPS, and DECISIONS.
|
|
7
|
+
4. Stage doc changes: `git add .prizm-docs/`
|
|
8
|
+
⚠️ Do NOT commit here. Only stage.
|
|
9
|
+
|
|
10
|
+
**b.** Stage all feature code explicitly (NEVER use `git add -A` or `git add .`):
|
|
11
|
+
```bash
|
|
12
|
+
git add <specific-files-created-or-modified>
|
|
13
|
+
git add .prizm-docs/
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**c.** Run `/prizmkit-committer` → THE ONLY commit for this feature:
|
|
17
|
+
`feat({{FEATURE_ID}}): {{FEATURE_TITLE}}`
|
|
18
|
+
This single commit includes: feature code + tests + .prizm-docs/ updates. Do NOT push.
|
|
19
|
+
- MANDATORY: commit must be done via `/prizmkit-committer` skill. Do NOT run manual `git add`/`git commit` as a substitute.
|
|
20
|
+
- Do NOT run `update-feature-status.py` here — the pipeline runner handles feature-list.json updates automatically after session exit.
|
|
21
|
+
|
|
22
|
+
**d.** Final verification:
|
|
23
|
+
```bash
|
|
24
|
+
git status --short
|
|
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.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
- **Section 3 — Prizm Context**: full content of root.prizm and relevant L1/L2 docs
|
|
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
|
+
### Files to Modify
|
|
4
|
+
| File | Why Needed | Key Interfaces |
|
|
5
|
+
|------|-----------|----------------|
|
|
6
|
+
| `<source-dir>/config.js` | Add runtime config layer | `config` (Zod object), `configSchema` |
|
|
7
|
+
|
|
8
|
+
### Files for Reference
|
|
9
|
+
| File | Why Needed | Key Interfaces |
|
|
10
|
+
|------|-----------|----------------|
|
|
11
|
+
| `<source-dir>/security/permission-guard.js` | Permission check integration | `checkCommandPermission(userId, cmd)` |
|
|
12
|
+
|
|
13
|
+
### Known TRAPS (from .prizm-docs/)
|
|
14
|
+
- <trap entries extracted from L1/L2 docs>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
### Build Context Snapshot
|
|
2
|
+
|
|
3
|
+
```bash
|
|
4
|
+
ls .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md 2>/dev/null && echo "EXISTS" || echo "MISSING"
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
If MISSING — build it now:
|
|
8
|
+
1. Read `.prizm-docs/root.prizm` and relevant L1/L2 prizm docs
|
|
9
|
+
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:
|
|
10
|
+
```bash
|
|
11
|
+
find . -maxdepth 2 -type f \( -name "*.js" -o -name "*.ts" -o -name "*.py" -o -name "*.go" -o -name "*.java" -o -name "*.rb" -o -name "*.rs" \) -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/build/*' -not -path '*/vendor/*' | head -30
|
|
12
|
+
```
|
|
13
|
+
Identify the top-level source directories from the results.
|
|
14
|
+
3. Scan the detected source directories for files related to this feature; read each one
|
|
15
|
+
4. Write `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`:
|
|
16
|
+
- **Section 1 — Feature Brief**: feature description + acceptance criteria (copy from above)
|
|
17
|
+
- **Section 2 — Project Structure**: run the following to get a visual directory tree, then paste output:
|
|
18
|
+
```bash
|
|
19
|
+
find . -maxdepth 2 -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/build/*' -not -path '*/__pycache__/*' -not -path '*/vendor/*' | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|
|
20
|
+
```
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
- **Section 3 — Prizm Context**: content of root.prizm and relevant L1/L2 docs
|
|
2
|
+
- **Section 4 — Existing Source Files**: **full verbatim content** of each related file in fenced code blocks (with `### path/to/file` heading and line count). Include ALL files needed for implementation and review — downstream phases read this section instead of re-reading individual source files
|
|
3
|
+
- **Section 5 — Existing Tests**: full content of related test files as code block
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
### Code Challenge — Critic Agent
|
|
2
|
+
|
|
3
|
+
**Guard**: Verify critic agent file exists before spawning:
|
|
4
|
+
```bash
|
|
5
|
+
ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "CRITIC:MISSING"
|
|
6
|
+
```
|
|
7
|
+
If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent not installed — skipping Code Challenge."
|
|
8
|
+
|
|
9
|
+
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", run_in_background=false).
|
|
10
|
+
|
|
11
|
+
Prompt:
|
|
12
|
+
> "Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
13
|
+
> **MODE: Code Challenge**
|
|
14
|
+
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — Implementation Log section shows what Dev changed.
|
|
15
|
+
> 2. Read `.prizm-docs/root.prizm` and relevant module docs for RULES/PATTERNS.
|
|
16
|
+
> 3. Read the actual source files changed (from Implementation Log).
|
|
17
|
+
> 4. Read comparable existing source files in the same module for style comparison.
|
|
18
|
+
> 5. Challenge code integration quality: style fit, robustness, existing code cohesion, hidden impact.
|
|
19
|
+
> Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report.md` (overwrite) with findings (or 'No significant challenges')."
|
|
20
|
+
|
|
21
|
+
Wait for Critic to return.
|
|
22
|
+
- Read challenge-report.md. For items marked CRITICAL/HIGH: spawn Dev to fix, then proceed to Review.
|
|
23
|
+
|
|
24
|
+
**CP-3.5**: Code challenges reviewed and resolved.
|