prizmkit 1.1.1 → 1.1.3
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/adapters/claude/agent-adapter.js +18 -0
- package/bundled/adapters/claude/command-adapter.js +1 -27
- package/bundled/agents/prizm-dev-team-critic.md +2 -0
- package/bundled/agents/prizm-dev-team-dev.md +2 -0
- package/bundled/agents/prizm-dev-team-reviewer.md +2 -0
- package/bundled/dev-pipeline/README.md +63 -63
- package/bundled/dev-pipeline/assets/feature-list-example.json +1 -1
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +1 -1
- package/bundled/dev-pipeline/{launch-daemon.sh → launch-feature-daemon.sh} +33 -33
- package/bundled/dev-pipeline/launch-refactor-daemon.sh +454 -0
- package/bundled/dev-pipeline/lib/branch.sh +1 -1
- package/bundled/dev-pipeline/reset-feature.sh +3 -3
- package/bundled/dev-pipeline/reset-refactor.sh +312 -0
- package/bundled/dev-pipeline/{retry-bug.sh → retry-bugfix.sh} +47 -59
- package/bundled/dev-pipeline/retry-feature.sh +41 -54
- package/bundled/dev-pipeline/retry-refactor.sh +358 -0
- package/bundled/dev-pipeline/run-bugfix.sh +6 -0
- package/bundled/dev-pipeline/{run.sh → run-feature.sh} +31 -31
- package/bundled/dev-pipeline/run-refactor.sh +787 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +177 -10
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +419 -0
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +393 -0
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +726 -0
- package/bundled/dev-pipeline/templates/agent-prompts/critic-code-challenge.md +13 -0
- package/bundled/dev-pipeline/templates/agent-prompts/critic-plan-challenge.md +7 -0
- package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +7 -0
- package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +26 -0
- package/bundled/dev-pipeline/templates/agent-prompts/dev-resume.md +5 -0
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +5 -0
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +12 -0
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +29 -2
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +8 -7
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +11 -10
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +2 -3
- package/bundled/dev-pipeline/templates/feature-list-schema.json +1 -1
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +159 -0
- package/bundled/dev-pipeline/templates/sections/ac-verification-checklist.md +13 -0
- package/bundled/dev-pipeline/templates/sections/feature-context.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +9 -8
- package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +9 -8
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +2 -1
- package/bundled/dev-pipeline/templates/sections/phase-critic-code.md +8 -10
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +9 -10
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan.md +8 -9
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +7 -10
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +8 -15
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +7 -12
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +8 -19
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery.md +75 -0
- package/bundled/skills/_metadata.json +33 -6
- package/bundled/skills/app-planner/SKILL.md +105 -320
- package/bundled/skills/app-planner/assets/app-design-guide.md +101 -0
- package/bundled/skills/app-planner/references/frontend-design-guide.md +1 -1
- package/bundled/skills/app-planner/references/project-brief-guide.md +49 -80
- package/bundled/skills/bug-fix-workflow/SKILL.md +2 -2
- package/bundled/skills/bug-planner/SKILL.md +68 -5
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +3 -2
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +19 -5
- package/bundled/skills/{dev-pipeline-launcher → feature-pipeline-launcher}/SKILL.md +32 -32
- package/bundled/skills/feature-planner/SKILL.md +337 -0
- package/bundled/skills/{app-planner → feature-planner}/assets/evaluation-guide.md +4 -4
- package/bundled/skills/{app-planner → feature-planner}/assets/planning-guide.md +3 -171
- package/bundled/skills/{app-planner → feature-planner}/references/browser-interaction.md +6 -5
- package/bundled/skills/feature-planner/references/decomposition-patterns.md +75 -0
- package/bundled/skills/{app-planner → feature-planner}/references/error-recovery.md +8 -8
- package/bundled/skills/{app-planner → feature-planner}/references/incremental-feature-planning.md +1 -1
- package/bundled/skills/{app-planner/references/new-app-planning.md → feature-planner/references/new-project-planning.md} +1 -1
- package/bundled/skills/{app-planner → feature-planner}/scripts/validate-and-generate.py +4 -4
- package/bundled/skills/feature-workflow/SKILL.md +23 -23
- package/bundled/skills/prizm-kit/SKILL.md +1 -3
- package/bundled/skills/prizmkit-analyze/SKILL.md +2 -5
- package/bundled/skills/prizmkit-code-review/SKILL.md +2 -2
- package/bundled/skills/prizmkit-committer/SKILL.md +4 -8
- package/bundled/skills/prizmkit-deploy/SKILL.md +1 -5
- package/bundled/skills/prizmkit-implement/SKILL.md +3 -50
- package/bundled/skills/prizmkit-init/SKILL.md +5 -77
- package/bundled/skills/prizmkit-plan/SKILL.md +1 -12
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +6 -24
- package/bundled/skills/prizmkit-prizm-docs/assets/PRIZM-SPEC.md +21 -0
- package/bundled/skills/prizmkit-retrospective/SKILL.md +12 -117
- package/bundled/skills/recovery-workflow/SKILL.md +166 -316
- package/bundled/skills/recovery-workflow/evals/evals.json +29 -13
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +232 -274
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +352 -0
- package/bundled/skills/refactor-planner/SKILL.md +436 -0
- package/bundled/skills/refactor-planner/assets/planning-guide.md +292 -0
- package/bundled/skills/refactor-planner/references/behavior-preservation.md +301 -0
- package/bundled/skills/refactor-planner/references/refactor-scoping-guide.md +221 -0
- package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +786 -0
- package/bundled/skills/refactor-workflow/SKILL.md +299 -319
- package/package.json +1 -1
- package/src/clean.js +3 -3
- package/src/scaffold.js +6 -6
- package/bundled/skills/prizmkit-plan/assets/spec-template.md +0 -56
- package/bundled/skills/prizmkit-plan/references/clarify-guide.md +0 -67
- package/src/config.js +0 -504
- package/src/prompts.js +0 -210
- /package/bundled/skills/{dev-pipeline-launcher → feature-pipeline-launcher}/scripts/preflight-check.py +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
2
|
+
**MODE: Code Challenge**
|
|
3
|
+
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — Implementation Log section shows what Dev changed.
|
|
4
|
+
2. Read `.prizm-docs/root.prizm` and relevant module docs for RULES/PATTERNS.
|
|
5
|
+
3. Read the actual source files changed (from Implementation Log).
|
|
6
|
+
4. Read comparable existing source files in the same module for style comparison.
|
|
7
|
+
5. Read test files created/modified (from Implementation Log) — evaluate test quality:
|
|
8
|
+
- Coverage adequacy: Do tests cover all code paths modified? Target: {{COVERAGE_TARGET}}%
|
|
9
|
+
- Test brittleness: Do tests pass consistently (not flaky)? Check Implementation Log for test re-runs
|
|
10
|
+
- Edge case handling: Are boundary conditions tested? Are error paths tested?
|
|
11
|
+
6. Challenge code integration quality: style fit, robustness, existing code cohesion, hidden impact.
|
|
12
|
+
7. Challenge test quality: coverage, brittleness, edge case handling.
|
|
13
|
+
Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report.md` (overwrite) with findings (or 'No significant challenges')."
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
2
|
+
**MODE: Plan Challenge**
|
|
3
|
+
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has project context, Section 4 has file manifest.
|
|
4
|
+
2. Read `.prizm-docs/root.prizm` and relevant L1/L2 docs for affected modules.
|
|
5
|
+
3. Read existing source files in the modules this plan touches.
|
|
6
|
+
4. Challenge plan.md against the project's existing architecture, patterns, and style.
|
|
7
|
+
Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report.md` with findings (or 'No significant challenges')."
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"Read {{DEV_SUBAGENT_PATH}}. Fix NEEDS_FIXES issues for feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
|
|
2
|
+
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — '## Review Notes' section contains structured Fix Instructions with exact steps.
|
|
3
|
+
2. Follow Fix Instructions in order (respect Depends On / Blocks dependencies). Each FIX-N has: Root Cause, Fix Strategy, Code Guidance, and Verification criteria.
|
|
4
|
+
3. After each fix, run the Verification command listed in that FIX-N to confirm it works.
|
|
5
|
+
4. Run `{{TEST_CMD}}` to verify no regressions.
|
|
6
|
+
5. Append fix summary to '## Implementation Log' in context-snapshot.md.
|
|
7
|
+
6. Do NOT execute any git commands."
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"Read {{DEV_SUBAGENT_PATH}}. Implement feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
|
|
2
|
+
**IMPORTANT**: Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has Prizm Context (TRAPS/RULES), Section 4 has File Manifest with paths and interfaces.
|
|
3
|
+
⚠️ DO NOT re-read source files already listed in Section 4 File Manifest unless you need implementation detail beyond the interface summary.
|
|
4
|
+
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full context.
|
|
5
|
+
2. Run `/prizmkit-implement` to execute the tasks in plan.md. Run tests with: `{{TEST_CMD}}`. Known baseline failures (pre-existing, not your fault): `{{BASELINE_FAILURES}}`.
|
|
6
|
+
3. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
|
|
7
|
+
|
|
8
|
+
## Acceptance Criteria Verification
|
|
9
|
+
|
|
10
|
+
Update the AC Verification Checklist in context-snapshot.md by marking each item [x] as you verify it:
|
|
11
|
+
- As you complete each task, verify the corresponding acceptance criteria
|
|
12
|
+
- Check the AC Checklist at the end of implementation
|
|
13
|
+
- All [ ] must become [x] — if any AC remains unverified, the feature is incomplete
|
|
14
|
+
- Document any AC that cannot be verified due to test failures
|
|
15
|
+
|
|
16
|
+
## Test Failure Recovery (Max 2 Fix Rounds)
|
|
17
|
+
|
|
18
|
+
If tests fail during implementation:
|
|
19
|
+
- **Round 1**: Analyze failure (code bug vs. brittle test vs. environment), apply fix, re-run tests
|
|
20
|
+
- **Round 2 (if still failing)**: Try alternate fix approach, re-run tests
|
|
21
|
+
- **After Round 2**: Document failure in Implementation Log with root cause, category, and fix attempted
|
|
22
|
+
- **Do NOT block completion** if unable to resolve — only NEW REGRESSIONS (not in baseline) require fixing
|
|
23
|
+
- **If any AC cannot be verified** due to test failure: the feature is incomplete, add to failure notes
|
|
24
|
+
|
|
25
|
+
4. Do NOT execute any git commands (no git add/commit/reset/push).
|
|
26
|
+
Do NOT exit until all tasks are [x], the '## Implementation Log' section is written, and AC Verification Checklist is 100% complete in context-snapshot.md."
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"Read {{DEV_SUBAGENT_PATH}}. You are resuming implementation of feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
|
|
2
|
+
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — Section 4 has File Manifest, 'Implementation Log' (if present) shows what was already done.
|
|
3
|
+
2. Run `git diff HEAD` to see actual code changes already made.
|
|
4
|
+
3. Run `/prizmkit-implement` to complete the remaining `[ ]` tasks. Run tests with: `{{TEST_CMD}}`.
|
|
5
|
+
4. Do NOT execute any git commands."
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
2
|
+
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has project context, Section 4 has file manifest.
|
|
3
|
+
2. Run prizmkit-analyze: cross-check `spec.md` and `plan.md` (including Tasks section) for consistency.
|
|
4
|
+
3. Before flagging CRITICAL or HIGH issues, read the relevant source files listed in the File Manifest to verify.
|
|
5
|
+
Report: CRITICAL, HIGH, MEDIUM issues found (or 'No issues found')."
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
2
|
+
**IMPORTANT**: Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST.
|
|
3
|
+
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`:
|
|
4
|
+
- Section 3: Prizm Context (RULES, PATTERNS to check against)
|
|
5
|
+
- Section 4: File Manifest (original file structure)
|
|
6
|
+
- '## Implementation Log': what Dev changed, key decisions, discoveries
|
|
7
|
+
- '## Acceptance Criteria Verification Checklist': verify all items are [x]
|
|
8
|
+
2. **AC Verification Gate**: Check that AC Verification Checklist shows ALL criteria marked [x]. If any [ ] remains, return verdict NEEDS_FIXES with message "AC Verification incomplete: [list unmet criteria]"
|
|
9
|
+
3. Run prizmkit-code-review (both phases): Phase 1 diagnostic review (spec compliance, code quality, correctness), then Phase 2 fix strategy formulation for any findings. Read ONLY files listed in Implementation Log for diagnosis; MAY read additional files for impact analysis.
|
|
10
|
+
4. Run the full test suite using `{{TEST_CMD}}` — **ONLY if the Implementation Log does not already confirm all tests passing**. If Implementation Log states tests passed, trust it and skip the re-run. When running tests: `{{TEST_CMD}} 2>&1 | tee /tmp/review-test-out.txt | tail -20`, then grep `/tmp/review-test-out.txt` for details — do NOT re-run the suite multiple times. Write and execute integration tests covering all user stories from spec.md.
|
|
11
|
+
5. Write structured '## Review Notes' to context-snapshot.md with Fix Instructions (Root Cause, Impact, Fix Strategy, Code Guidance, Verification for each finding) and Re-Review Expectations.
|
|
12
|
+
Report verdict: PASS, PASS_WITH_WARNINGS, or NEEDS_FIXES."
|
|
@@ -25,7 +25,7 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
|
|
|
25
25
|
|
|
26
26
|
### Project Brief
|
|
27
27
|
|
|
28
|
-
>
|
|
28
|
+
> Product ideas checklist from planning. Lines marked [x] are already implemented. When your feature touches any [ ] item, ensure alignment. After implementation, mark relevant items [x] and append the key file/directory paths.
|
|
29
29
|
|
|
30
30
|
{{PROJECT_BRIEF}}
|
|
31
31
|
|
|
@@ -160,6 +160,32 @@ $TEST_CMD 2>&1 | tee /tmp/test-baseline.txt | tail -20
|
|
|
160
160
|
|
|
161
161
|
**CP-2**: All acceptance criteria met, all tests pass.
|
|
162
162
|
|
|
163
|
+
### Test Failure Recovery Protocol
|
|
164
|
+
|
|
165
|
+
When tests fail during Phase 3:
|
|
166
|
+
|
|
167
|
+
1. **Analyze failure output**:
|
|
168
|
+
- Identify root cause (code bug vs. test brittleness vs. environment issue)
|
|
169
|
+
- Check if baseline already recorded this failure
|
|
170
|
+
|
|
171
|
+
2. **Categorize and fix** (max 2 rounds):
|
|
172
|
+
- **Pre-existing baseline failure**: Expected, record as acceptable
|
|
173
|
+
- **New regression**: Fix the code and re-run tests
|
|
174
|
+
- **Brittle test**: Fix the test or environment
|
|
175
|
+
- **Environment issue**: Fix setup and re-run
|
|
176
|
+
|
|
177
|
+
3. **Recovery limit**:
|
|
178
|
+
- Max 2 fix attempts per failing test
|
|
179
|
+
- After 2 rounds, if still failing: document in Implementation Log with root cause
|
|
180
|
+
- **Do NOT block commit** if unable to resolve
|
|
181
|
+
|
|
182
|
+
4. **Failure documentation**:
|
|
183
|
+
- Test name, root cause, category, fix attempted, final status
|
|
184
|
+
- If any AC cannot be verified due to test failure: feature is incomplete
|
|
185
|
+
|
|
186
|
+
**Context-Aware Optimization**: If Implementation Log already confirms "all tests passing," skip full suite re-run.
|
|
187
|
+
|
|
188
|
+
|
|
163
189
|
{{IF_BROWSER_INTERACTION}}
|
|
164
190
|
### Phase 3.5: Browser Verification (playwright-cli) — MANDATORY
|
|
165
191
|
|
|
@@ -172,8 +198,9 @@ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without
|
|
|
172
198
|
4. If the page requires authentication, use playwright-cli to register a test user and log in first
|
|
173
199
|
|
|
174
200
|
**Verification**:
|
|
175
|
-
5. Use `playwright-cli`
|
|
201
|
+
5. Use `playwright-cli snapshot` on `{{BROWSER_URL}}` to discover actual element refs, then verify these goals:
|
|
176
202
|
{{BROWSER_VERIFY_STEPS}}
|
|
203
|
+
Decide the concrete playwright-cli actions (click, fill, assert, etc.) yourself based on the snapshot output and your knowledge of the implemented code. The goals above describe WHAT to verify — you determine HOW.
|
|
177
204
|
6. Take a final screenshot for evidence
|
|
178
205
|
|
|
179
206
|
**Cleanup (REQUIRED — you started it, you stop it)**:
|
|
@@ -25,7 +25,7 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
|
|
|
25
25
|
|
|
26
26
|
### Project Brief
|
|
27
27
|
|
|
28
|
-
>
|
|
28
|
+
> Product ideas checklist from planning. Lines marked [x] are already implemented. When your feature touches any [ ] item, ensure alignment. After implementation, mark relevant items [x] and append the key file/directory paths.
|
|
29
29
|
|
|
30
30
|
{{PROJECT_BRIEF}}
|
|
31
31
|
|
|
@@ -162,7 +162,7 @@ Before proceeding past CP-1, verify:
|
|
|
162
162
|
|
|
163
163
|
### Phase 3: Analyze — Reviewer Subagent
|
|
164
164
|
|
|
165
|
-
Spawn Reviewer agent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false).
|
|
165
|
+
Spawn Reviewer agent (Agent tool, subagent_type="prizm-dev-team-reviewer", mode="plan", run_in_background=false).
|
|
166
166
|
|
|
167
167
|
Prompt:
|
|
168
168
|
> "Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
@@ -185,7 +185,7 @@ ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "CRITIC:M
|
|
|
185
185
|
```
|
|
186
186
|
If CRITIC:MISSING — skip Phase 3.5 entirely and proceed to Phase 4. Log: "Critic agent not installed — skipping Plan Challenge."
|
|
187
187
|
|
|
188
|
-
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", run_in_background=false).
|
|
188
|
+
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", mode="plan", run_in_background=false).
|
|
189
189
|
|
|
190
190
|
Prompt:
|
|
191
191
|
> "Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
@@ -214,7 +214,7 @@ Prompt:
|
|
|
214
214
|
> **IMPORTANT**: Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has Prizm Context (TRAPS/RULES), Section 4 has File Manifest with paths and interfaces.
|
|
215
215
|
> ⚠️ DO NOT re-read source files already listed in Section 4 File Manifest unless you need implementation detail beyond the interface summary.
|
|
216
216
|
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full context.
|
|
217
|
-
> 2. Run `/prizmkit-implement` to execute the tasks in plan.md.
|
|
217
|
+
> 2. Run `/prizmkit-implement` to execute the tasks in plan.md. Run tests with: `{{TEST_CMD}}`. Known baseline failures (pre-existing, not your fault): `{{BASELINE_FAILURES}}`.
|
|
218
218
|
> 3. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
|
|
219
219
|
> 4. Do NOT execute any git commands (no git add/commit/reset/push).
|
|
220
220
|
> Do NOT exit until all tasks are [x] and the '## Implementation Log' section is written in context-snapshot.md."
|
|
@@ -237,7 +237,7 @@ ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "CRITIC:M
|
|
|
237
237
|
```
|
|
238
238
|
If CRITIC:MISSING — skip Phase 4.5 entirely and proceed to Phase 5. Log: "Critic agent not installed — skipping Code Challenge."
|
|
239
239
|
|
|
240
|
-
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", run_in_background=false).
|
|
240
|
+
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", mode="plan", run_in_background=false).
|
|
241
241
|
|
|
242
242
|
Prompt:
|
|
243
243
|
> "Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
@@ -267,7 +267,7 @@ Prompt:
|
|
|
267
267
|
> - Section 4: File Manifest (original file structure)
|
|
268
268
|
> - '## Implementation Log': what Dev changed, key decisions, discoveries
|
|
269
269
|
> 2. Run prizmkit-code-review (both phases): Phase 1 diagnostic review (spec compliance, code quality, correctness), then Phase 2 fix strategy formulation for any findings. Read ONLY files listed in Implementation Log for diagnosis; MAY read additional files for impact analysis.
|
|
270
|
-
> 3. Run the full test suite — **ONLY if the Implementation Log does not already confirm all tests passing**. If the log states tests passed, trust it and skip the re-run. When running:
|
|
270
|
+
> 3. Run the full test suite using `{{TEST_CMD}}` — **ONLY if the Implementation Log does not already confirm all tests passing**. If the log states tests passed, trust it and skip the re-run. When running: `{{TEST_CMD}} 2>&1 | tee /tmp/review-test-out.txt | tail -20`, then grep the file for details — do NOT re-run the suite multiple times. Write and execute integration tests covering all user stories.
|
|
271
271
|
> 4. Write structured '## Review Notes' to context-snapshot.md with Fix Instructions (Root Cause, Impact, Fix Strategy, Code Guidance, Verification for each finding) and Re-Review Expectations.
|
|
272
272
|
> Report verdict: PASS, PASS_WITH_WARNINGS, or NEEDS_FIXES."
|
|
273
273
|
|
|
@@ -296,8 +296,9 @@ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without
|
|
|
296
296
|
4. If the page requires authentication, use playwright-cli to register a test user and log in first
|
|
297
297
|
|
|
298
298
|
**Verification**:
|
|
299
|
-
5. Use `playwright-cli`
|
|
299
|
+
5. Use `playwright-cli snapshot` on `{{BROWSER_URL}}` to discover actual element refs, then verify these goals:
|
|
300
300
|
{{BROWSER_VERIFY_STEPS}}
|
|
301
|
+
Decide the concrete playwright-cli actions (click, fill, assert, etc.) yourself based on the snapshot output and your knowledge of the implemented code. The goals above describe WHAT to verify — you determine HOW.
|
|
301
302
|
6. Take a final screenshot for evidence
|
|
302
303
|
|
|
303
304
|
**Cleanup (REQUIRED — you started it, you stop it)**:
|
|
@@ -25,7 +25,7 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
|
|
|
25
25
|
|
|
26
26
|
### Project Brief
|
|
27
27
|
|
|
28
|
-
>
|
|
28
|
+
> Product ideas checklist from planning. Lines marked [x] are already implemented. When your feature touches any [ ] item, ensure alignment. After implementation, mark relevant items [x] and append the key file/directory paths.
|
|
29
29
|
|
|
30
30
|
{{PROJECT_BRIEF}}
|
|
31
31
|
|
|
@@ -199,7 +199,7 @@ Before proceeding past CP-1, verify:
|
|
|
199
199
|
|
|
200
200
|
### Phase 3: Analyze — Reviewer Agent
|
|
201
201
|
|
|
202
|
-
Spawn Reviewer agent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false).
|
|
202
|
+
Spawn Reviewer agent (Agent tool, subagent_type="prizm-dev-team-reviewer", mode="plan", run_in_background=false).
|
|
203
203
|
|
|
204
204
|
Prompt:
|
|
205
205
|
> "Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
@@ -226,7 +226,7 @@ If CRITIC:MISSING — skip Phase 3.5 entirely and proceed to Phase 4. Log: "Crit
|
|
|
226
226
|
|
|
227
227
|
**If {{CRITIC_COUNT}} = 1 → Single Critic** (skip to CP-2.5 after this):
|
|
228
228
|
|
|
229
|
-
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", run_in_background=false).
|
|
229
|
+
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", mode="plan", run_in_background=false).
|
|
230
230
|
|
|
231
231
|
Prompt:
|
|
232
232
|
> "Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
@@ -239,7 +239,7 @@ Prompt:
|
|
|
239
239
|
|
|
240
240
|
**If {{CRITIC_COUNT}} = 3 → Multi-Critic Voting** (skip Single Critic above):
|
|
241
241
|
|
|
242
|
-
Spawn 3 Critic agents sequentially (each with run_in_background=false), each with a different focus lens:
|
|
242
|
+
Spawn 3 Critic agents sequentially (each with mode="plan", run_in_background=false), each with a different focus lens:
|
|
243
243
|
|
|
244
244
|
Critic-A prompt (append to base prompt above):
|
|
245
245
|
> "**Focus Lens: Architecture & Scalability.** Prioritize: architectural pattern fit, scalability implications, over-engineering risks, component boundary design.
|
|
@@ -279,7 +279,7 @@ Prompt:
|
|
|
279
279
|
> **IMPORTANT**: Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has Prizm Context (TRAPS/RULES), Section 4 has File Manifest with paths and interfaces.
|
|
280
280
|
> ⚠️ DO NOT re-read source files already listed in Section 4 File Manifest unless you need implementation detail beyond the interface summary.
|
|
281
281
|
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full context.
|
|
282
|
-
> 2. Run `/prizmkit-implement` to execute the tasks in plan.md.
|
|
282
|
+
> 2. Run `/prizmkit-implement` to execute the tasks in plan.md. Run tests with: `{{TEST_CMD}}`. Known baseline failures (pre-existing, not your fault): `{{BASELINE_FAILURES}}`.
|
|
283
283
|
> 3. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
|
|
284
284
|
> 4. Do NOT execute any git commands (no git add/commit/reset/push).
|
|
285
285
|
> Do NOT exit until all tasks are [x] and the '## Implementation Log' section is written in context-snapshot.md."
|
|
@@ -297,7 +297,7 @@ Wait for Dev to return. **If Dev times out before all tasks are `[x]`**:
|
|
|
297
297
|
> "Read {{DEV_SUBAGENT_PATH}}. You are resuming implementation of feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
|
|
298
298
|
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — Section 4 has File Manifest, 'Implementation Log' (if present) shows what was already done.
|
|
299
299
|
> 2. Run `git diff HEAD` to see actual code changes already made.
|
|
300
|
-
> 3. Run `/prizmkit-implement` to complete the remaining `[ ]` tasks.
|
|
300
|
+
> 3. Run `/prizmkit-implement` to complete the remaining `[ ]` tasks. Run tests with: `{{TEST_CMD}}`.
|
|
301
301
|
> 4. Do NOT execute any git commands."
|
|
302
302
|
3. Max 2 recovery retries. After 2 failures, orchestrator implements remaining tasks directly.
|
|
303
303
|
|
|
@@ -312,7 +312,7 @@ ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "CRITIC:M
|
|
|
312
312
|
```
|
|
313
313
|
If CRITIC:MISSING — skip Phase 4.5 entirely and proceed to Phase 5. Log: "Critic agent not installed — skipping Code Challenge."
|
|
314
314
|
|
|
315
|
-
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", run_in_background=false).
|
|
315
|
+
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", mode="plan", run_in_background=false).
|
|
316
316
|
|
|
317
317
|
Prompt:
|
|
318
318
|
> "Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
@@ -342,7 +342,7 @@ Prompt:
|
|
|
342
342
|
> - Section 4: File Manifest (original file structure)
|
|
343
343
|
> - '## Implementation Log': what Dev changed, key decisions, discoveries
|
|
344
344
|
> 2. Run prizmkit-code-review (both phases): Phase 1 diagnostic review (spec compliance, code quality, correctness), then Phase 2 fix strategy formulation for any findings. Read ONLY files listed in Implementation Log for diagnosis; MAY read additional files for impact analysis.
|
|
345
|
-
> 3. Run the full test suite using `TEST_CMD
|
|
345
|
+
> 3. Run the full test suite using `{{TEST_CMD}}` — **ONLY if the Implementation Log does not already confirm all tests passing**. If Implementation Log states tests passed, trust it and skip the re-run. When running tests: `{{TEST_CMD}} 2>&1 | tee /tmp/review-test-out.txt | tail -20`, then grep `/tmp/review-test-out.txt` for details — do NOT re-run the suite multiple times. Write and execute integration tests covering all user stories from spec.md.
|
|
346
346
|
> 4. Write structured '## Review Notes' to context-snapshot.md with Fix Instructions (Root Cause, Impact, Fix Strategy, Code Guidance, Verification for each finding) and Re-Review Expectations.
|
|
347
347
|
> Report verdict: PASS, PASS_WITH_WARNINGS, or NEEDS_FIXES."
|
|
348
348
|
|
|
@@ -360,7 +360,7 @@ If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write the '#
|
|
|
360
360
|
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — '## Review Notes' section contains structured Fix Instructions with exact steps.
|
|
361
361
|
> 2. Follow Fix Instructions in order (respect Depends On / Blocks dependencies). Each FIX-N has: Root Cause, Fix Strategy, Code Guidance, and Verification criteria.
|
|
362
362
|
> 3. After each fix, run the Verification command listed in that FIX-N to confirm it works.
|
|
363
|
-
> 4.
|
|
363
|
+
> 4. Run `{{TEST_CMD}}` to verify no regressions.
|
|
364
364
|
> 5. Append fix summary to '## Implementation Log' in context-snapshot.md.
|
|
365
365
|
> 6. Do NOT execute any git commands."
|
|
366
366
|
Then re-run Review (max 3 rounds).
|
|
@@ -379,8 +379,9 @@ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without
|
|
|
379
379
|
4. If the page requires authentication, use playwright-cli to register a test user and log in first
|
|
380
380
|
|
|
381
381
|
**Verification**:
|
|
382
|
-
5. Use `playwright-cli`
|
|
382
|
+
5. Use `playwright-cli snapshot` on `{{BROWSER_URL}}` to discover actual element refs, then verify these goals:
|
|
383
383
|
{{BROWSER_VERIFY_STEPS}}
|
|
384
|
+
Decide the concrete playwright-cli actions (click, fill, assert, etc.) yourself based on the snapshot output and your knowledge of the implemented code. The goals above describe WHAT to verify — you determine HOW.
|
|
384
385
|
6. Take a final screenshot for evidence
|
|
385
386
|
|
|
386
387
|
**Cleanup (REQUIRED — you started it, you stop it)**:
|
|
@@ -92,7 +92,7 @@ Reference `{{TEAM_CONFIG_PATH}}` for agent definitions:
|
|
|
92
92
|
|
|
93
93
|
- Spawn Dev agent (Agent tool, subagent_type="prizm-dev-team-dev", run_in_background=false)
|
|
94
94
|
Prompt: "Read {{DEV_SUBAGENT_PATH}}. For bug {{BUG_ID}} ('{{BUG_TITLE}}'):
|
|
95
|
-
1.
|
|
95
|
+
1. Triage the bug: classify error type (Runtime/Network/Auth/Data/Logic/Config/External), check `.prizm-docs/` TRAPS for known patterns, trace call chain to identify root cause
|
|
96
96
|
2. Check `.prizm-docs/` TRAPS sections for matching known issues
|
|
97
97
|
3. Classify: category, subcategory, root cause (confirmed or suspected), affected files
|
|
98
98
|
4. Assess impact: which modules are affected, what is the blast radius
|
|
@@ -130,8 +130,7 @@ Reference `{{TEAM_CONFIG_PATH}}` for agent definitions:
|
|
|
130
130
|
- Spawn Dev agent (Agent tool, subagent_type="prizm-dev-team-dev", run_in_background=false)
|
|
131
131
|
Prompt: "Read {{DEV_SUBAGENT_PATH}}. For bug {{BUG_ID}}:
|
|
132
132
|
1. Read the fix plan from `.prizmkit/bugfix/{{BUG_ID}}/fix-plan.md`
|
|
133
|
-
2.
|
|
134
|
-
3. Generate a minimal reproduction test that FAILS with current code
|
|
133
|
+
2. Generate a minimal reproduction test (API: curl sequence; UI: step-by-step; Logic: unit test; Data: seed+query) that FAILS with current code
|
|
135
134
|
4. Execute the reproduction test to confirm it fails
|
|
136
135
|
5. If reproduction fails, refine and retry (max 2 rounds)
|
|
137
136
|
6. Report: reproduction test path, red/green status, investigation pointers
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
},
|
|
127
127
|
"verify_steps": {
|
|
128
128
|
"type": "array",
|
|
129
|
-
"description": "
|
|
129
|
+
"description": "Verification goals describing WHAT to verify (not HOW). Pipeline AI decides concrete playwright-cli actions at runtime based on actual code and snapshot.",
|
|
130
130
|
"items": {
|
|
131
131
|
"type": "string"
|
|
132
132
|
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Dev-Pipeline Refactor List",
|
|
4
|
+
"description": "Schema for refactor-list.json — standardized input for the Refactor Pipeline",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["$schema", "project_name", "refactors"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"const": "dev-pipeline-refactor-list-v1"
|
|
11
|
+
},
|
|
12
|
+
"project_name": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1
|
|
15
|
+
},
|
|
16
|
+
"project_description": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"created_at": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "date-time"
|
|
22
|
+
},
|
|
23
|
+
"created_by": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"refactors": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"minItems": 1,
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"required": [
|
|
32
|
+
"id", "title", "description", "scope", "type",
|
|
33
|
+
"priority", "complexity", "behavior_preservation",
|
|
34
|
+
"acceptance_criteria", "dependencies", "status"
|
|
35
|
+
],
|
|
36
|
+
"properties": {
|
|
37
|
+
"id": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"pattern": "^R-\\d{3}$",
|
|
40
|
+
"description": "Refactor ID, format R-001, R-002..."
|
|
41
|
+
},
|
|
42
|
+
"title": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1,
|
|
45
|
+
"description": "Refactor title — brief description of the change"
|
|
46
|
+
},
|
|
47
|
+
"description": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1,
|
|
50
|
+
"description": "Detailed description: what is being refactored and why"
|
|
51
|
+
},
|
|
52
|
+
"scope": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"description": "Files and modules affected by this refactor",
|
|
55
|
+
"properties": {
|
|
56
|
+
"files": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": { "type": "string" },
|
|
59
|
+
"description": "File paths affected by this refactor"
|
|
60
|
+
},
|
|
61
|
+
"modules": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": { "type": "string" },
|
|
64
|
+
"description": "Module names affected by this refactor"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"type": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": ["extract", "rename", "restructure", "simplify", "decouple", "migrate"],
|
|
71
|
+
"description": "extract=extract-function/module; rename=rename-symbols; restructure=move/reorganize; simplify=reduce-complexity; decouple=remove-dependencies; migrate=tech-migration"
|
|
72
|
+
},
|
|
73
|
+
"priority": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"enum": ["critical", "high", "medium", "low"],
|
|
76
|
+
"description": "Refactor priority. Pipeline processes critical before high before medium before low; within same level, array order determines sequence."
|
|
77
|
+
},
|
|
78
|
+
"complexity": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": ["low", "medium", "high"],
|
|
81
|
+
"description": "Estimated complexity of the refactor"
|
|
82
|
+
},
|
|
83
|
+
"behavior_preservation": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"required": ["strategy"],
|
|
86
|
+
"description": "Strategy for ensuring no behavior changes",
|
|
87
|
+
"properties": {
|
|
88
|
+
"strategy": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"enum": ["test-gate", "snapshot", "manual"],
|
|
91
|
+
"description": "test-gate=existing-tests-must-pass; snapshot=before/after-snapshot-comparison; manual=human-verification"
|
|
92
|
+
},
|
|
93
|
+
"existing_tests": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"description": "Whether existing tests cover the refactored code"
|
|
96
|
+
},
|
|
97
|
+
"new_tests_needed": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": { "type": "string" },
|
|
100
|
+
"description": "New tests that should be written before refactoring"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"acceptance_criteria": {
|
|
105
|
+
"type": "array",
|
|
106
|
+
"minItems": 1,
|
|
107
|
+
"items": { "type": "string" },
|
|
108
|
+
"description": "Conditions that must be met for the refactor to be considered complete"
|
|
109
|
+
},
|
|
110
|
+
"dependencies": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"pattern": "^R-\\d{3}$"
|
|
115
|
+
},
|
|
116
|
+
"description": "IDs of refactors that must be completed before this one"
|
|
117
|
+
},
|
|
118
|
+
"status": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"enum": [
|
|
121
|
+
"pending",
|
|
122
|
+
"in_progress",
|
|
123
|
+
"completed",
|
|
124
|
+
"failed",
|
|
125
|
+
"skipped"
|
|
126
|
+
],
|
|
127
|
+
"description": "Refactor status"
|
|
128
|
+
},
|
|
129
|
+
"model": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"description": "AI model ID for this refactor. Overrides $MODEL env var."
|
|
132
|
+
},
|
|
133
|
+
"estimated_lines": {
|
|
134
|
+
"type": "integer",
|
|
135
|
+
"description": "Estimated number of lines affected by this refactor"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"global_context": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"description": "Global context for all refactors in this batch",
|
|
143
|
+
"properties": {
|
|
144
|
+
"tech_stack": { "type": "string" },
|
|
145
|
+
"language": { "type": "string" },
|
|
146
|
+
"runtime": { "type": "string" },
|
|
147
|
+
"frontend_framework": { "type": "string" },
|
|
148
|
+
"frontend_styling": { "type": "string" },
|
|
149
|
+
"backend_framework": { "type": "string" },
|
|
150
|
+
"database": { "type": "string" },
|
|
151
|
+
"orm": { "type": "string" },
|
|
152
|
+
"testing_strategy": { "type": "string" },
|
|
153
|
+
"bundler": { "type": "string" },
|
|
154
|
+
"project_type": { "type": "string" },
|
|
155
|
+
"ci_pipeline": { "type": "string" }
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## Acceptance Criteria Verification Checklist
|
|
2
|
+
|
|
3
|
+
This checklist is auto-generated from feature.acceptance_criteria. The Dev agent must verify each criterion and mark as complete:
|
|
4
|
+
|
|
5
|
+
{{AC_CHECKLIST}}
|
|
6
|
+
|
|
7
|
+
**Verification Gates**:
|
|
8
|
+
1. All [x] items confirmed by Dev agent during implementation
|
|
9
|
+
2. Reviewer agent verifies checklist is 100% complete before clearing PASS verdict
|
|
10
|
+
3. Any unmet AC ([ ] remaining) marks feature as incomplete
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
### Project Brief
|
|
11
11
|
|
|
12
|
-
>
|
|
12
|
+
> Product ideas checklist from planning. Lines marked [x] are already implemented. When your feature touches any [ ] item, ensure alignment. After implementation, mark relevant items [x] and append the key file/directory paths.
|
|
13
13
|
|
|
14
14
|
{{PROJECT_BRIEF}}
|
|
15
15
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
### Analyze — Reviewer Subagent
|
|
2
2
|
|
|
3
|
-
Spawn
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
**Spawn Agent**:
|
|
4
|
+
| Parameter | Value |
|
|
5
|
+
|-----------|-------|
|
|
6
|
+
| subagent_type | prizm-dev-team-reviewer |
|
|
7
|
+
| mode | plan |
|
|
8
|
+
| run_in_background | false |
|
|
9
|
+
|
|
10
|
+
**Prompt**:
|
|
11
|
+
> {{AGENT_PROMPT_REVIEWER_ANALYZE}}
|
|
11
12
|
|
|
12
13
|
Wait for Reviewer to return.
|
|
13
14
|
- 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).
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
### Analyze — Reviewer Agent
|
|
2
2
|
|
|
3
|
-
Spawn
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
**Spawn Agent**:
|
|
4
|
+
| Parameter | Value |
|
|
5
|
+
|-----------|-------|
|
|
6
|
+
| subagent_type | prizm-dev-team-reviewer |
|
|
7
|
+
| mode | plan |
|
|
8
|
+
| run_in_background | false |
|
|
9
|
+
|
|
10
|
+
**Prompt**:
|
|
11
|
+
> {{AGENT_PROMPT_REVIEWER_ANALYZE}}
|
|
11
12
|
|
|
12
13
|
Wait for Reviewer to return.
|
|
13
14
|
- 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).
|
|
@@ -9,8 +9,9 @@ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without
|
|
|
9
9
|
4. If the page requires authentication, use playwright-cli to register a test user and log in first
|
|
10
10
|
|
|
11
11
|
**Verification**:
|
|
12
|
-
5. Use `playwright-cli`
|
|
12
|
+
5. Use `playwright-cli snapshot` on `{{BROWSER_URL}}` to discover actual element refs, then verify these goals:
|
|
13
13
|
{{BROWSER_VERIFY_STEPS}}
|
|
14
|
+
Decide the concrete playwright-cli actions (click, fill, assert, etc.) yourself based on the snapshot output and your knowledge of the implemented code. The goals above describe WHAT to verify — you determine HOW.
|
|
14
15
|
6. Take a final screenshot for evidence
|
|
15
16
|
|
|
16
17
|
**Cleanup (REQUIRED — you started it, you stop it)**:
|
|
@@ -6,17 +6,15 @@ ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "CRITIC:M
|
|
|
6
6
|
```
|
|
7
7
|
If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent not installed — skipping Code Challenge."
|
|
8
8
|
|
|
9
|
-
Spawn
|
|
9
|
+
**Spawn Agent**:
|
|
10
|
+
| Parameter | Value |
|
|
11
|
+
|-----------|-------|
|
|
12
|
+
| subagent_type | prizm-dev-team-critic |
|
|
13
|
+
| mode | plan |
|
|
14
|
+
| run_in_background | false |
|
|
10
15
|
|
|
11
|
-
Prompt
|
|
12
|
-
>
|
|
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')."
|
|
16
|
+
**Prompt**:
|
|
17
|
+
> {{AGENT_PROMPT_CRITIC_CODE_CHALLENGE}}
|
|
20
18
|
|
|
21
19
|
Wait for Critic to return.
|
|
22
20
|
- Read challenge-report.md. For items marked CRITICAL/HIGH: spawn Dev to fix, then proceed to Review.
|