prizmkit 1.1.1 → 1.1.4
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 +41 -0
- package/bundled/dev-pipeline/{run.sh → run-feature.sh} +64 -31
- package/bundled/dev-pipeline/run-refactor.sh +787 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +398 -10
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +124 -0
- 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 +27 -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 +33 -2
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +13 -9
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +16 -12
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +22 -4
- 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/checkpoint-system.md +36 -0
- package/bundled/dev-pipeline/templates/sections/failure-log-check.md +2 -1
- package/bundled/dev-pipeline/templates/sections/feature-context.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +11 -7
- package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +11 -7
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +5 -1
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +3 -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 +11 -10
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +12 -10
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan.md +11 -9
- package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +10 -10
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +12 -16
- package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-plan-agent.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-plan-lite.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +11 -13
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +12 -20
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase0-init.md +3 -0
- package/bundled/dev-pipeline/templates/sections/phase0-test-baseline.md +3 -0
- package/bundled/dev-pipeline/templates/sections/resume-header.md +4 -1
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery.md +75 -0
- package/bundled/rules/prizm/prizm-commit-workflow.md +1 -0
- package/bundled/rules/prizm/prizm-documentation.md +15 -15
- package/bundled/rules/prizm/prizm-progressive-loading.md +2 -1
- 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/prizm-kit/assets/project-memory-template.md +4 -2
- 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 +32 -8
- package/bundled/skills/prizmkit-deploy/SKILL.md +1 -5
- package/bundled/skills/prizmkit-implement/SKILL.md +5 -51
- package/bundled/skills/prizmkit-init/SKILL.md +7 -78
- package/bundled/skills/prizmkit-plan/SKILL.md +1 -12
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +13 -28
- package/bundled/skills/prizmkit-prizm-docs/assets/PRIZM-SPEC.md +52 -1
- package/bundled/skills/prizmkit-retrospective/SKILL.md +12 -117
- package/bundled/skills/recovery-workflow/SKILL.md +168 -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/bundled/team/prizm-dev-team.json +1 -1
- 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,27 @@
|
|
|
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. If plan.md has more than 5 tasks: run `/compact` after completing every 3 tasks to manage context budget. If `/compact` is unavailable, continue without it.
|
|
7
|
+
4. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
|
|
8
|
+
|
|
9
|
+
## Acceptance Criteria Verification
|
|
10
|
+
|
|
11
|
+
Update the AC Verification Checklist in context-snapshot.md by marking each item [x] as you verify it:
|
|
12
|
+
- As you complete each task, verify the corresponding acceptance criteria
|
|
13
|
+
- Check the AC Checklist at the end of implementation
|
|
14
|
+
- All [ ] must become [x] — if any AC remains unverified, the feature is incomplete
|
|
15
|
+
- Document any AC that cannot be verified due to test failures
|
|
16
|
+
|
|
17
|
+
## Test Failure Recovery (Max 2 Fix Rounds)
|
|
18
|
+
|
|
19
|
+
If tests fail during implementation:
|
|
20
|
+
- **Round 1**: Analyze failure (code bug vs. brittle test vs. environment), apply fix, re-run tests
|
|
21
|
+
- **Round 2 (if still failing)**: Try alternate fix approach, re-run tests
|
|
22
|
+
- **After Round 2**: Document failure in Implementation Log with root cause, category, and fix attempted
|
|
23
|
+
- **Do NOT block completion** if unable to resolve — only NEW REGRESSIONS (not in baseline) require fixing
|
|
24
|
+
- **If any AC cannot be verified** due to test failure: the feature is incomplete, add to failure notes
|
|
25
|
+
|
|
26
|
+
4. Do NOT execute any git commands (no git add/commit/reset/push).
|
|
27
|
+
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
|
|
|
@@ -152,6 +152,8 @@ $TEST_CMD 2>&1 | tee /tmp/test-baseline.txt | tail -20
|
|
|
152
152
|
- Runs tests using `TEST_CMD` after each task
|
|
153
153
|
- Writes '## Implementation Log' to `context-snapshot.md`
|
|
154
154
|
|
|
155
|
+
**3b-compact.** Context management — if plan.md has more than 5 tasks, run `/compact` after completing every 3 tasks during implementation. This prevents context window exhaustion in long sessions. If `/compact` is not available (non-Claude CLI), skip this step.
|
|
156
|
+
|
|
155
157
|
**3c.** After implement completes, verify:
|
|
156
158
|
1. All tasks in plan.md are `[x]`
|
|
157
159
|
2. Run the full test suite to ensure nothing is broken
|
|
@@ -160,6 +162,32 @@ $TEST_CMD 2>&1 | tee /tmp/test-baseline.txt | tail -20
|
|
|
160
162
|
|
|
161
163
|
**CP-2**: All acceptance criteria met, all tests pass.
|
|
162
164
|
|
|
165
|
+
### Test Failure Recovery Protocol
|
|
166
|
+
|
|
167
|
+
When tests fail during Phase 3:
|
|
168
|
+
|
|
169
|
+
1. **Analyze failure output**:
|
|
170
|
+
- Identify root cause (code bug vs. test brittleness vs. environment issue)
|
|
171
|
+
- Check if baseline already recorded this failure
|
|
172
|
+
|
|
173
|
+
2. **Categorize and fix** (max 2 rounds):
|
|
174
|
+
- **Pre-existing baseline failure**: Expected, record as acceptable
|
|
175
|
+
- **New regression**: Fix the code and re-run tests
|
|
176
|
+
- **Brittle test**: Fix the test or environment
|
|
177
|
+
- **Environment issue**: Fix setup and re-run
|
|
178
|
+
|
|
179
|
+
3. **Recovery limit**:
|
|
180
|
+
- Max 2 fix attempts per failing test
|
|
181
|
+
- After 2 rounds, if still failing: document in Implementation Log with root cause
|
|
182
|
+
- **Do NOT block commit** if unable to resolve
|
|
183
|
+
|
|
184
|
+
4. **Failure documentation**:
|
|
185
|
+
- Test name, root cause, category, fix attempted, final status
|
|
186
|
+
- If any AC cannot be verified due to test failure: feature is incomplete
|
|
187
|
+
|
|
188
|
+
**Context-Aware Optimization**: If Implementation Log already confirms "all tests passing," skip full suite re-run.
|
|
189
|
+
|
|
190
|
+
|
|
163
191
|
{{IF_BROWSER_INTERACTION}}
|
|
164
192
|
### Phase 3.5: Browser Verification (playwright-cli) — MANDATORY
|
|
165
193
|
|
|
@@ -172,8 +200,9 @@ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without
|
|
|
172
200
|
4. If the page requires authentication, use playwright-cli to register a test user and log in first
|
|
173
201
|
|
|
174
202
|
**Verification**:
|
|
175
|
-
5. Use `playwright-cli`
|
|
203
|
+
5. Use `playwright-cli snapshot` on `{{BROWSER_URL}}` to discover actual element refs, then verify these goals:
|
|
176
204
|
{{BROWSER_VERIFY_STEPS}}
|
|
205
|
+
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
206
|
6. Take a final screenshot for evidence
|
|
178
207
|
|
|
179
208
|
**Cleanup (REQUIRED — you started it, you stop it)**:
|
|
@@ -258,6 +287,8 @@ git status --short
|
|
|
258
287
|
```
|
|
259
288
|
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.
|
|
260
289
|
|
|
290
|
+
**Exception**: `session-summary.md` in the artifact directory is a local cross-session artifact generated by `/prizmkit-committer` — it is NOT committed to git. Ignore it in the clean-tree check.
|
|
291
|
+
|
|
261
292
|
## Critical Paths
|
|
262
293
|
|
|
263
294
|
| Resource | Path |
|
|
@@ -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,9 +214,10 @@ 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.
|
|
218
|
-
> 3.
|
|
219
|
-
> 4.
|
|
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
|
+
> 3. If plan.md has more than 5 tasks: run `/compact` after completing every 3 tasks to manage context budget. If `/compact` is unavailable, continue without it.
|
|
219
|
+
> 4. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
|
|
220
|
+
> 5. Do NOT execute any git commands (no git add/commit/reset/push).
|
|
220
221
|
> Do NOT exit until all tasks are [x] and the '## Implementation Log' section is written in context-snapshot.md."
|
|
221
222
|
|
|
222
223
|
Wait for Dev to return. All tasks must be `[x]`, tests pass.
|
|
@@ -237,7 +238,7 @@ ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "CRITIC:M
|
|
|
237
238
|
```
|
|
238
239
|
If CRITIC:MISSING — skip Phase 4.5 entirely and proceed to Phase 5. Log: "Critic agent not installed — skipping Code Challenge."
|
|
239
240
|
|
|
240
|
-
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", run_in_background=false).
|
|
241
|
+
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", mode="plan", run_in_background=false).
|
|
241
242
|
|
|
242
243
|
Prompt:
|
|
243
244
|
> "Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
@@ -267,7 +268,7 @@ Prompt:
|
|
|
267
268
|
> - Section 4: File Manifest (original file structure)
|
|
268
269
|
> - '## Implementation Log': what Dev changed, key decisions, discoveries
|
|
269
270
|
> 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:
|
|
271
|
+
> 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
272
|
> 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
273
|
> Report verdict: PASS, PASS_WITH_WARNINGS, or NEEDS_FIXES."
|
|
273
274
|
|
|
@@ -296,8 +297,9 @@ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without
|
|
|
296
297
|
4. If the page requires authentication, use playwright-cli to register a test user and log in first
|
|
297
298
|
|
|
298
299
|
**Verification**:
|
|
299
|
-
5. Use `playwright-cli`
|
|
300
|
+
5. Use `playwright-cli snapshot` on `{{BROWSER_URL}}` to discover actual element refs, then verify these goals:
|
|
300
301
|
{{BROWSER_VERIFY_STEPS}}
|
|
302
|
+
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
303
|
6. Take a final screenshot for evidence
|
|
302
304
|
|
|
303
305
|
**Cleanup (REQUIRED — you started it, you stop it)**:
|
|
@@ -382,6 +384,8 @@ git status --short
|
|
|
382
384
|
```
|
|
383
385
|
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.
|
|
384
386
|
|
|
387
|
+
**Exception**: `session-summary.md` in the artifact directory is a local cross-session artifact generated by `/prizmkit-committer` — it is NOT committed to git. Ignore it in the clean-tree check.
|
|
388
|
+
|
|
385
389
|
## Critical Paths
|
|
386
390
|
|
|
387
391
|
| Resource | Path |
|
|
@@ -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,9 +279,10 @@ 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.
|
|
283
|
-
> 3.
|
|
284
|
-
> 4.
|
|
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
|
+
> 3. If plan.md has more than 5 tasks: run `/compact` after completing every 3 tasks to manage context budget. If `/compact` is unavailable, continue without it.
|
|
284
|
+
> 4. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
|
|
285
|
+
> 5. Do NOT execute any git commands (no git add/commit/reset/push).
|
|
285
286
|
> Do NOT exit until all tasks are [x] and the '## Implementation Log' section is written in context-snapshot.md."
|
|
286
287
|
|
|
287
288
|
**Gate Check — Implementation Log**:
|
|
@@ -297,7 +298,7 @@ Wait for Dev to return. **If Dev times out before all tasks are `[x]`**:
|
|
|
297
298
|
> "Read {{DEV_SUBAGENT_PATH}}. You are resuming implementation of feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
|
|
298
299
|
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — Section 4 has File Manifest, 'Implementation Log' (if present) shows what was already done.
|
|
299
300
|
> 2. Run `git diff HEAD` to see actual code changes already made.
|
|
300
|
-
> 3. Run `/prizmkit-implement` to complete the remaining `[ ]` tasks.
|
|
301
|
+
> 3. Run `/prizmkit-implement` to complete the remaining `[ ]` tasks. Run tests with: `{{TEST_CMD}}`.
|
|
301
302
|
> 4. Do NOT execute any git commands."
|
|
302
303
|
3. Max 2 recovery retries. After 2 failures, orchestrator implements remaining tasks directly.
|
|
303
304
|
|
|
@@ -312,7 +313,7 @@ ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "CRITIC:M
|
|
|
312
313
|
```
|
|
313
314
|
If CRITIC:MISSING — skip Phase 4.5 entirely and proceed to Phase 5. Log: "Critic agent not installed — skipping Code Challenge."
|
|
314
315
|
|
|
315
|
-
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", run_in_background=false).
|
|
316
|
+
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", mode="plan", run_in_background=false).
|
|
316
317
|
|
|
317
318
|
Prompt:
|
|
318
319
|
> "Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
@@ -342,7 +343,7 @@ Prompt:
|
|
|
342
343
|
> - Section 4: File Manifest (original file structure)
|
|
343
344
|
> - '## Implementation Log': what Dev changed, key decisions, discoveries
|
|
344
345
|
> 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
|
|
346
|
+
> 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
347
|
> 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
348
|
> Report verdict: PASS, PASS_WITH_WARNINGS, or NEEDS_FIXES."
|
|
348
349
|
|
|
@@ -360,7 +361,7 @@ If GATE:MISSING — send message to Reviewer (re-spawn if needed): "Write the '#
|
|
|
360
361
|
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — '## Review Notes' section contains structured Fix Instructions with exact steps.
|
|
361
362
|
> 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
363
|
> 3. After each fix, run the Verification command listed in that FIX-N to confirm it works.
|
|
363
|
-
> 4.
|
|
364
|
+
> 4. Run `{{TEST_CMD}}` to verify no regressions.
|
|
364
365
|
> 5. Append fix summary to '## Implementation Log' in context-snapshot.md.
|
|
365
366
|
> 6. Do NOT execute any git commands."
|
|
366
367
|
Then re-run Review (max 3 rounds).
|
|
@@ -379,8 +380,9 @@ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without
|
|
|
379
380
|
4. If the page requires authentication, use playwright-cli to register a test user and log in first
|
|
380
381
|
|
|
381
382
|
**Verification**:
|
|
382
|
-
5. Use `playwright-cli`
|
|
383
|
+
5. Use `playwright-cli snapshot` on `{{BROWSER_URL}}` to discover actual element refs, then verify these goals:
|
|
383
384
|
{{BROWSER_VERIFY_STEPS}}
|
|
385
|
+
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
386
|
6. Take a final screenshot for evidence
|
|
385
387
|
|
|
386
388
|
**Cleanup (REQUIRED — you started it, you stop it)**:
|
|
@@ -475,6 +477,8 @@ git status --short
|
|
|
475
477
|
```
|
|
476
478
|
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.
|
|
477
479
|
|
|
480
|
+
**Exception**: `session-summary.md` in the artifact directory is a local cross-session artifact generated by `/prizmkit-committer` — it is NOT committed to git. Ignore it in the clean-tree check.
|
|
481
|
+
|
|
478
482
|
## Critical Paths
|
|
479
483
|
|
|
480
484
|
| Resource | Path |
|
|
@@ -67,6 +67,19 @@ You are the **bug fix session orchestrator**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}
|
|
|
67
67
|
|
|
68
68
|
**IMPORTANT**: Only 2 artifact files per bug, NEVER more. This is a fixed convention.
|
|
69
69
|
|
|
70
|
+
## Workflow Checkpoint System
|
|
71
|
+
|
|
72
|
+
A checkpoint file tracks your progress through this workflow:
|
|
73
|
+
|
|
74
|
+
**Path**: `{{CHECKPOINT_PATH}}`
|
|
75
|
+
|
|
76
|
+
**Rules**:
|
|
77
|
+
1. **Before each step**: Read `workflow-checkpoint.json`, verify the previous step has `status: "completed"` or `status: "skipped"`. If not, complete it first.
|
|
78
|
+
2. **Starting a step**: Update the current step to `status: "in_progress"`.
|
|
79
|
+
3. **After each step completes**: Update the step to `status: "completed"`. Verify JSON is valid after writing.
|
|
80
|
+
4. **On failure**: Set the step to `status: "failed"` and halt.
|
|
81
|
+
5. **On resume**: Steps already `"completed"` are skipped. Start from the first `"pending"` or `"in_progress"` step.
|
|
82
|
+
|
|
70
83
|
## Execution Instructions
|
|
71
84
|
|
|
72
85
|
**YOU are the orchestrator. Execute each phase by spawning the appropriate team agent with run_in_background=false.**
|
|
@@ -92,7 +105,7 @@ Reference `{{TEAM_CONFIG_PATH}}` for agent definitions:
|
|
|
92
105
|
|
|
93
106
|
- Spawn Dev agent (Agent tool, subagent_type="prizm-dev-team-dev", run_in_background=false)
|
|
94
107
|
Prompt: "Read {{DEV_SUBAGENT_PATH}}. For bug {{BUG_ID}} ('{{BUG_TITLE}}'):
|
|
95
|
-
1.
|
|
108
|
+
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
109
|
2. Check `.prizm-docs/` TRAPS sections for matching known issues
|
|
97
110
|
3. Classify: category, subcategory, root cause (confirmed or suspected), affected files
|
|
98
111
|
4. Assess impact: which modules are affected, what is the blast radius
|
|
@@ -109,6 +122,7 @@ Reference `{{TEAM_CONFIG_PATH}}` for agent definitions:
|
|
|
109
122
|
"
|
|
110
123
|
- **Wait for Dev to return**
|
|
111
124
|
- **CP-BF-1**: `.prizmkit/bugfix/{{BUG_ID}}/fix-plan.md` exists
|
|
125
|
+
- **Checkpoint update**: set step `bug-diagnosis` to `"completed"` in `{{CHECKPOINT_PATH}}`
|
|
112
126
|
|
|
113
127
|
**DECISION GATE — Fast Path Check**:
|
|
114
128
|
- If severity is LOW or MEDIUM, AND root cause is obvious (high confidence), AND fix is < 10 lines:
|
|
@@ -130,8 +144,7 @@ Reference `{{TEAM_CONFIG_PATH}}` for agent definitions:
|
|
|
130
144
|
- Spawn Dev agent (Agent tool, subagent_type="prizm-dev-team-dev", run_in_background=false)
|
|
131
145
|
Prompt: "Read {{DEV_SUBAGENT_PATH}}. For bug {{BUG_ID}}:
|
|
132
146
|
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
|
|
147
|
+
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
148
|
4. Execute the reproduction test to confirm it fails
|
|
136
149
|
5. If reproduction fails, refine and retry (max 2 rounds)
|
|
137
150
|
6. Report: reproduction test path, red/green status, investigation pointers
|
|
@@ -142,6 +155,7 @@ Reference `{{TEAM_CONFIG_PATH}}` for agent definitions:
|
|
|
142
155
|
- Write session-status.json with status="partial", errors=["reproduction_failed"]
|
|
143
156
|
- Set bug status to `needs_info` and STOP
|
|
144
157
|
- **CP-BF-2**: Reproduction test exists and FAILS
|
|
158
|
+
- **Checkpoint update**: set step `bug-reproduce` to `"completed"` in `{{CHECKPOINT_PATH}}`
|
|
145
159
|
|
|
146
160
|
---
|
|
147
161
|
|
|
@@ -159,11 +173,13 @@ Reference `{{TEAM_CONFIG_PATH}}` for agent definitions:
|
|
|
159
173
|
- Do NOT refactor — fix the bug only
|
|
160
174
|
4. Run the reproduction test → MUST PASS
|
|
161
175
|
5. Run the module's test suite → MUST PASS (no regression)
|
|
162
|
-
6. If fix
|
|
176
|
+
6. If the fix involves multiple files or steps: run `/compact` after completing the core fix and before running the full test suite, to free context budget. If `/compact` is unavailable, continue without it.
|
|
177
|
+
7. If fix fails after 3 rounds, report detailed analysis
|
|
163
178
|
"
|
|
164
179
|
- **Wait for Dev to return**
|
|
165
180
|
- If fix fails after 3 rounds: escalate to user, write status="failed"
|
|
166
181
|
- **CP-BF-3**: Reproduction test passes, module tests pass
|
|
182
|
+
- **Checkpoint update**: set step `bug-fix` to `"completed"` in `{{CHECKPOINT_PATH}}`
|
|
167
183
|
|
|
168
184
|
---
|
|
169
185
|
|
|
@@ -186,6 +202,7 @@ Reference `{{TEAM_CONFIG_PATH}}` for agent definitions:
|
|
|
186
202
|
- **Wait for Reviewer to return**
|
|
187
203
|
- If NEEDS_FIXES: return to Phase 3 for refinement following Fix Instructions (max 2 review rounds)
|
|
188
204
|
- **CP-BF-4**: Code review passes, all tests green
|
|
205
|
+
- **Checkpoint update**: set step `prizmkit-code-review` to `"completed"` in `{{CHECKPOINT_PATH}}`
|
|
189
206
|
|
|
190
207
|
{{IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
191
208
|
**MANUAL VERIFICATION GATE**:
|
|
@@ -223,6 +240,7 @@ Reference `{{TEAM_CONFIG_PATH}}` for agent definitions:
|
|
|
223
240
|
- Acceptance Criteria Verification (checklist with pass/fail for each criterion)
|
|
224
241
|
|
|
225
242
|
- **CP-BF-5**: Commit recorded, fix-report.md written, TRAPS updated (if applicable)
|
|
243
|
+
- **Checkpoint update**: set steps `prizmkit-committer` and `bug-report` to `"completed"` in `{{CHECKPOINT_PATH}}`
|
|
226
244
|
|
|
227
245
|
### Step 3: Report Session Status
|
|
228
246
|
|
|
@@ -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
|
+
|