prizmkit 1.1.69 → 1.1.70
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/dev-pipeline/scripts/generate-bootstrap-prompt.py +11 -12
- package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +36 -22
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +1 -1
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +24 -21
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +13 -26
- package/bundled/dev-pipeline/templates/sections/ac-verification-checklist.md +4 -10
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +1 -0
- package/bundled/dev-pipeline/templates/sections/feature-context.md +16 -11
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +17 -26
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-opencli.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +2 -9
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +2 -9
- package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +8 -17
- package/bundled/dev-pipeline/templates/sections/phase-plan-lite.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/task-contract.md +34 -0
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +27 -46
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-lite.md +27 -37
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +13 -0
- package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +11 -12
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +36 -22
- package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +1 -1
- package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +24 -21
- package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +13 -26
- package/bundled/dev-pipeline-windows/templates/sections/ac-verification-checklist.md +4 -10
- package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +1 -0
- package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +16 -11
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +22 -10
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +2 -9
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +2 -9
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +8 -19
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/task-contract.md +34 -0
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-agent.md +27 -46
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-lite.md +27 -37
- package/bundled/skills/_metadata.json +1 -1
- package/package.json +1 -1
package/bundled/VERSION.json
CHANGED
|
@@ -248,7 +248,7 @@ def extract_baseline_failures(test_cmd, project_root):
|
|
|
248
248
|
def format_ac_checklist(acceptance_criteria):
|
|
249
249
|
"""Format acceptance criteria as a markdown checkbox list."""
|
|
250
250
|
if not acceptance_criteria:
|
|
251
|
-
return "-
|
|
251
|
+
return "- (no Verification Gates specified)"
|
|
252
252
|
lines = []
|
|
253
253
|
for item in acceptance_criteria:
|
|
254
254
|
lines.append("- [ ] {}".format(item))
|
|
@@ -285,10 +285,10 @@ def format_user_context(user_context):
|
|
|
285
285
|
if not items:
|
|
286
286
|
return ""
|
|
287
287
|
lines = [
|
|
288
|
-
"
|
|
289
|
-
""
|
|
290
|
-
"
|
|
291
|
-
"
|
|
288
|
+
"> These materials were provided by the user and are authoritative "
|
|
289
|
+
"when they clarify or constrain this feature. They do not expand "
|
|
290
|
+
"the current scope by themselves; use the Task Contract to decide "
|
|
291
|
+
"what belongs to this session.",
|
|
292
292
|
"",
|
|
293
293
|
]
|
|
294
294
|
for item in items:
|
|
@@ -932,6 +932,10 @@ def assemble_sections(pipeline_mode, sections_dir, init_done, is_resume,
|
|
|
932
932
|
mission += "\n\n" + tier_desc
|
|
933
933
|
sections.append(("mission", mission))
|
|
934
934
|
|
|
935
|
+
# --- Task Contract: single source of current scope and gates ---
|
|
936
|
+
sections.append(("task-contract",
|
|
937
|
+
load_section(sections_dir, "task-contract.md")))
|
|
938
|
+
|
|
935
939
|
# --- Feature Context (XML-wrapped, optimization 3) ---
|
|
936
940
|
sections.append(("feature-context",
|
|
937
941
|
load_section(sections_dir, "feature-context.md")))
|
|
@@ -1041,13 +1045,8 @@ def assemble_sections(pipeline_mode, sections_dir, init_done, is_resume,
|
|
|
1041
1045
|
load_section(sections_dir,
|
|
1042
1046
|
"test-failure-recovery-agent.md")))
|
|
1043
1047
|
|
|
1044
|
-
#
|
|
1045
|
-
|
|
1046
|
-
if os.path.isfile(ac_checklist_path):
|
|
1047
|
-
sections.append(("ac-verification-checklist",
|
|
1048
|
-
load_section(sections_dir,
|
|
1049
|
-
"ac-verification-checklist.md")))
|
|
1050
|
-
|
|
1048
|
+
# Verification Gates are included in Task Contract. Keep AC in one place so
|
|
1049
|
+
# background context and implementation prompts cannot redefine scope.
|
|
1051
1050
|
# --- Review (only for agent tiers) ---
|
|
1052
1051
|
if pipeline_mode == "full":
|
|
1053
1052
|
sections.append(("phase-review",
|
|
@@ -1,30 +1,44 @@
|
|
|
1
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
2
|
|
|
9
|
-
##
|
|
3
|
+
## Required Inputs
|
|
10
4
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
- Document any AC that cannot be verified due to test failures
|
|
5
|
+
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` first.
|
|
6
|
+
2. Use Section 4 File Manifest for targeted reads.
|
|
7
|
+
3. Do not expand scope beyond the Task Contract and Verification Gates.
|
|
8
|
+
4. Do not re-read source files already listed in Section 4 unless implementation details are missing from the manifest.
|
|
16
9
|
|
|
17
|
-
##
|
|
10
|
+
## Work
|
|
18
11
|
|
|
19
|
-
|
|
12
|
+
Run `/prizmkit-implement` to execute `plan.md`.
|
|
20
13
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
3. **Fix and iterate**: analyze, apply fix, re-run `($TEST_CMD)`, go back to step 1
|
|
14
|
+
Test command:
|
|
15
|
+
`{{TEST_CMD}}`
|
|
24
16
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
**If any AC cannot be verified** due to test failure: the feature is incomplete, add to failure notes.
|
|
17
|
+
Known baseline failures:
|
|
18
|
+
`{{BASELINE_FAILURES}}`
|
|
28
19
|
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
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.
|
|
21
|
+
|
|
22
|
+
## Required Outputs
|
|
23
|
+
|
|
24
|
+
Before returning, append `## Implementation Log` to `context-snapshot.md` with:
|
|
25
|
+
- files changed/created
|
|
26
|
+
- key decisions
|
|
27
|
+
- deviations from plan
|
|
28
|
+
- test results
|
|
29
|
+
- Verification Gate status
|
|
30
|
+
- unresolved blockers, if any
|
|
31
|
+
|
|
32
|
+
## Protocol References
|
|
33
|
+
|
|
34
|
+
- Follow the global Context Budget Rules.
|
|
35
|
+
- Carry forward the Dev-isolated subset: skip scaffold/generated files listed in `context-snapshot.md`; verify dependency versions before install/build commands that resolve dependencies; after build/compile commands, ensure outputs are ignored and never commit generated artifacts.
|
|
36
|
+
- If tests fail, follow this Test Failure Recovery subset: classify failures as baseline, new regression, brittle test, or environment/tooling; fix new regressions and brittle tests while progress is being made; document baseline failures; write `failure-log.md` for blockers.
|
|
37
|
+
- Do not run git commands; staging and commit are handled by the orchestrator.
|
|
38
|
+
|
|
39
|
+
Do not return success unless:
|
|
40
|
+
1. implementation tasks are complete;
|
|
41
|
+
2. `## Implementation Log` exists;
|
|
42
|
+
3. every Verification Gate is verified.
|
|
43
|
+
|
|
44
|
+
If any Verification Gate is blocked, write `failure-log.md` and return a blocked/incomplete result instead of success."
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
2
|
-
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/spec.md` (if it exists) for goals and
|
|
2
|
+
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/spec.md` (if it exists) for goals and Verification Gates; if spec.md does not exist, read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` Section 1 Task Contract instead
|
|
3
3
|
2. Read `.prizmkit/specs/{{FEATURE_SLUG}}/plan.md` for architecture decisions and completed tasks
|
|
4
4
|
3. Run /prizmkit-code-review with artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/. The skill will run its internal review-fix loop (Reviewer → filter → Dev fix, max 3 rounds) and write review-report.md.
|
|
5
5
|
4. Run the full test suite using `{{TEST_CMD}}`. 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.
|
|
@@ -84,12 +84,12 @@ mkdir -p .prizmkit/bugfix/{{BUG_ID}}
|
|
|
84
84
|
|
|
85
85
|
{{IF_BROWSER_INTERACTION}}
|
|
86
86
|
|
|
87
|
-
#### Browser Verification
|
|
87
|
+
#### Browser Verification Protocol
|
|
88
88
|
|
|
89
|
-
The bug may be reproducible via the UI
|
|
89
|
+
The bug may be reproducible via the UI. Use this single browser protocol for planning, implementation, review, and final reporting:
|
|
90
90
|
|
|
91
91
|
{{IF_BROWSER_TOOL_AUTO}}
|
|
92
|
-
- **Browser Tool**:
|
|
92
|
+
- **Browser Tool**: Auto-select at runtime based on error type and dev server configuration
|
|
93
93
|
{{END_IF_BROWSER_TOOL_AUTO}}
|
|
94
94
|
|
|
95
95
|
{{IF_BROWSER_TOOL_PLAYWRIGHT}}
|
|
@@ -103,10 +103,7 @@ The bug may be reproducible via the UI using browser tools:
|
|
|
103
103
|
**Browser Verification Goals**:
|
|
104
104
|
{{BROWSER_VERIFY_STEPS}}
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
1. Reproduce the bug in a running dev server
|
|
108
|
-
2. Verify the fix after implementation
|
|
109
|
-
3. Smoke-test related UI flows for regression
|
|
106
|
+
Use this protocol only when the bug is UI/frontend-reproducible. Evidence must cover: original bug reproduction, post-fix behavior, related UI regression smoke tests, tool used, and any manual verification steps.
|
|
110
107
|
|
|
111
108
|
{{END_IF_BROWSER_INTERACTION}}
|
|
112
109
|
|
|
@@ -141,7 +138,7 @@ Run `/prizmkit-plan` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`:
|
|
|
141
138
|
- Resolve any `[NEEDS CLARIFICATION]` markers autonomously — do NOT pause
|
|
142
139
|
|
|
143
140
|
{{IF_BROWSER_INTERACTION}}
|
|
144
|
-
- **Browser Verification**: If the bug is UI-reproducible, plan.md should
|
|
141
|
+
- **Browser Verification**: If the bug is UI-reproducible, plan.md should reference the Browser Verification Protocol above instead of redefining browser steps.
|
|
145
142
|
{{END_IF_BROWSER_INTERACTION}}
|
|
146
143
|
|
|
147
144
|
**DECISION GATE — Fast Path Check**:
|
|
@@ -171,11 +168,7 @@ Run `/prizmkit-implement` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`:
|
|
|
171
168
|
|
|
172
169
|
{{IF_BROWSER_INTERACTION}}
|
|
173
170
|
|
|
174
|
-
**Browser Verification During Implementation**:
|
|
175
|
-
- After each code fix, you may optionally use browser tools to verify the behavior
|
|
176
|
-
- Reproduce the original bug steps and confirm they no longer occur
|
|
177
|
-
- Test related UI flows to ensure no regression
|
|
178
|
-
- Document any manual verification steps in the implementation notes
|
|
171
|
+
**Browser Verification During Implementation**: If the bug is UI-reproducible, apply the Browser Verification Protocol above and document evidence in the implementation notes.
|
|
179
172
|
|
|
180
173
|
{{END_IF_BROWSER_INTERACTION}}
|
|
181
174
|
|
|
@@ -196,20 +189,30 @@ After implement completes, verify:
|
|
|
196
189
|
If `FAST_PATH=true` (≤ 2 tasks, obvious root cause), skip this phase entirely.
|
|
197
190
|
|
|
198
191
|
Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`:
|
|
199
|
-
- The skill runs an internal review-fix loop (Reviewer → filter → Dev fix, max 3 rounds) and writes review-report.md
|
|
200
|
-
-
|
|
201
|
-
|
|
192
|
+
- The skill runs an internal review-fix loop (Reviewer → filter → Dev fix, max 3 rounds) and writes `review-report.md`
|
|
193
|
+
- `review-report.md` must contain `## Verdict`
|
|
194
|
+
|
|
195
|
+
**Gate Check — Review Report**:
|
|
196
|
+
After `/prizmkit-code-review` returns, verify the review report:
|
|
197
|
+
```bash
|
|
198
|
+
grep -q "## Verdict" .prizmkit/bugfix/{{BUG_ID}}/review-report.md && echo "GATE:PASS" || echo "GATE:MISSING"
|
|
199
|
+
```
|
|
200
|
+
If GATE:MISSING:
|
|
201
|
+
- Do not re-run `/prizmkit-code-review` in an unbounded report-repair loop.
|
|
202
|
+
- Perform one bounded status check; retry `/prizmkit-code-review` at most once only if the missing report appears caused by a transient team/config/lock error.
|
|
203
|
+
- If the report is still missing after that single check/retry, write `failure-log.md` with the spawn/skill error and last observable state, then either perform a safe inline fallback review (spec/plan/diff/tests → write `review-report.md` with `## Verdict`) or stop with a clear recovery failure.
|
|
204
|
+
|
|
205
|
+
Read `review-report.md` and check the Verdict:
|
|
206
|
+
- `PASS` → proceed
|
|
207
|
+
- `NEEDS_FIXES` → the skill exhausted its max rounds; log remaining findings and proceed
|
|
202
208
|
|
|
203
209
|
{{IF_BROWSER_INTERACTION}}
|
|
204
210
|
|
|
205
|
-
**Code Review — Browser Verification Check**:
|
|
206
|
-
- Verify that browser-based reproduction steps (if applicable) are clearly documented
|
|
207
|
-
- Confirm that the fix maintains the expected UI behavior for all affected flows
|
|
208
|
-
- Validate that any manual verification steps have been completed successfully
|
|
211
|
+
**Code Review — Browser Verification Check**: Confirm that UI-reproducible bug evidence follows the Browser Verification Protocol above.
|
|
209
212
|
|
|
210
213
|
{{END_IF_BROWSER_INTERACTION}}
|
|
211
214
|
|
|
212
|
-
**CP-3**: Code review complete, all tests green.
|
|
215
|
+
**CP-3**: Code review complete, `review-report.md` written, and all tests green.
|
|
213
216
|
|
|
214
217
|
**Checkpoint update**: Set step `prizmkit-code-review` to `"completed"`.
|
|
215
218
|
|
|
@@ -16,7 +16,7 @@ You are the **refactor session orchestrator**. Execute Refactor {{REFACTOR_ID}}:
|
|
|
16
16
|
|
|
17
17
|
**NON-INTERACTIVE MODE**: You are running in headless non-interactive mode. There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input, NEVER use interactive prompts (e.g. "Would you like me to…"). If a skill has an interactive step (e.g. offer remediation, ask for approval), skip it and proceed autonomously. Make decisions based on the data available and move forward.
|
|
18
18
|
|
|
19
|
-
**
|
|
19
|
+
**NORMAL-PATH TEAM REQUIREMENT**: Use the `prizm-dev-team` agents (Dev + Reviewer) for implementation and review. You are the orchestrator — handle coordination, planning, and commit phases directly. If a required agent cannot be spawned after the bounded retry policy below, follow the documented recovery exception instead of looping forever.
|
|
20
20
|
|
|
21
21
|
**REFACTOR DOCUMENTATION POLICY**:
|
|
22
22
|
- **DEFAULT**: Run `/prizmkit-retrospective` with full sync (Job 1 + Job 2), because refactoring changes code structure and interfaces.
|
|
@@ -83,7 +83,8 @@ You are the **refactor session orchestrator**. Execute Refactor {{REFACTOR_ID}}:
|
|
|
83
83
|
**Agent spawn failure policy (all Agent tool calls)**:
|
|
84
84
|
- If spawning Dev or Reviewer fails with team/config/lock errors, retry at most once.
|
|
85
85
|
- If the second attempt fails, do not keep spawning variants and do not enter artifact polling for Implementation Log, review-report, or refactor-report markers.
|
|
86
|
-
-
|
|
86
|
+
- Recovery exception: complete remaining refactor work directly in the orchestrator only when the action is safe and bounded; otherwise write `failure-log.md` with the spawn error and last observable state before stopping for recovery.
|
|
87
|
+
- Any recovery exception must be recorded in the required report or session status so downstream runs know the normal team path was unavailable.
|
|
87
88
|
- Apply the same cap to any re-spawn for report repair or resume prompts; do not burn multiple minutes on identical team/config/lock failures.
|
|
88
89
|
|
|
89
90
|
## Workflow Checkpoint System
|
|
@@ -131,32 +132,26 @@ Resolve any `[NEEDS CLARIFICATION]` markers using the refactor description — d
|
|
|
131
132
|
|
|
132
133
|
{{IF_BROWSER_INTERACTION}}
|
|
133
134
|
|
|
134
|
-
#### Browser
|
|
135
|
+
#### Browser Behavior Preservation Protocol
|
|
135
136
|
|
|
136
|
-
The refactor may affect UI behavior.
|
|
137
|
-
- **UI Render**: UI components render identically after refactoring
|
|
138
|
-
- **User Interactions**: Navigation, form submissions, and workflows function as before
|
|
139
|
-
- **Feature Coverage**: Refactored features work end-to-end in real browser environment
|
|
137
|
+
The refactor may affect UI behavior. Use this single browser protocol for planning, implementation, review, and final reporting:
|
|
140
138
|
|
|
141
139
|
{{IF_BROWSER_TOOL_AUTO}}
|
|
142
|
-
Browser
|
|
140
|
+
- **Browser Tool**: Auto-select at runtime based on dev server and feature complexity.
|
|
143
141
|
{{END_IF_BROWSER_TOOL_AUTO}}
|
|
144
142
|
|
|
145
143
|
{{IF_BROWSER_TOOL_PLAYWRIGHT}}
|
|
146
|
-
**Tool
|
|
144
|
+
- **Browser Tool**: playwright-cli — local isolated browser instance for dev server verification.
|
|
147
145
|
{{END_IF_BROWSER_TOOL_PLAYWRIGHT}}
|
|
148
146
|
|
|
149
147
|
{{IF_BROWSER_TOOL_OPENCLI}}
|
|
150
|
-
**Tool
|
|
148
|
+
- **Browser Tool**: opencli — Chrome session with existing login for OAuth/third-party integrations.
|
|
151
149
|
{{END_IF_BROWSER_TOOL_OPENCLI}}
|
|
152
150
|
|
|
153
151
|
**Verification Goals**:
|
|
154
152
|
{{BROWSER_VERIFY_STEPS}}
|
|
155
153
|
|
|
156
|
-
|
|
157
|
-
- Which UI flows should be smoke-tested after refactoring?
|
|
158
|
-
- Any specific user journeys affected by the structural changes?
|
|
159
|
-
- Should verification be part of review phase or implementation phase?
|
|
154
|
+
Evidence must cover affected UI render, primary user interactions, behavior-sensitive workflows, tool used, and whether verification belongs in implementation, review, or both.
|
|
160
155
|
|
|
161
156
|
{{END_IF_BROWSER_INTERACTION}}
|
|
162
157
|
|
|
@@ -170,7 +165,7 @@ Include browser verification approach in plan.md:
|
|
|
170
165
|
**Goal**: Execute all tasks from plan.md while preserving existing behavior.
|
|
171
166
|
|
|
172
167
|
- Spawn Dev agent (Agent tool, subagent_type="prizm-dev-team-dev", run_in_background=false)
|
|
173
|
-
|
|
168
|
+
Apply the all-agent spawn failure policy above for this Dev spawn: for team/config/lock errors, retry at most once; if the second attempt fails, do not poll for `## Implementation Log`; use the bounded recovery exception.
|
|
174
169
|
Prompt: "Read {{DEV_SUBAGENT_PATH}}. For refactor {{REFACTOR_ID}} ('{{REFACTOR_TITLE}}'):
|
|
175
170
|
1. Read `.prizmkit/refactor/{{REFACTOR_ID}}/spec.md` and `.prizmkit/refactor/{{REFACTOR_ID}}/plan.md`
|
|
176
171
|
2. Read `.prizmkit/prizm-docs/` for affected modules (TRAPS, RULES, PATTERNS)
|
|
@@ -185,11 +180,7 @@ Include browser verification approach in plan.md:
|
|
|
185
180
|
|
|
186
181
|
{{IF_BROWSER_INTERACTION}}
|
|
187
182
|
|
|
188
|
-
6.
|
|
189
|
-
- Use browser tools to verify UI still renders correctly
|
|
190
|
-
- Test the primary user flows affected by the refactoring
|
|
191
|
-
- Confirm no visual or interactive regressions
|
|
192
|
-
- Document any manual browser verification steps in implementation notes
|
|
183
|
+
6. Apply the Browser Behavior Preservation Protocol above after major refactor tasks and document evidence in implementation notes.
|
|
193
184
|
|
|
194
185
|
{{END_IF_BROWSER_INTERACTION}}
|
|
195
186
|
|
|
@@ -208,7 +199,7 @@ Include browser verification approach in plan.md:
|
|
|
208
199
|
**Goal**: Verify refactoring quality and behavior preservation.
|
|
209
200
|
|
|
210
201
|
- Spawn Reviewer agent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false)
|
|
211
|
-
|
|
202
|
+
Apply the all-agent spawn failure policy above for this Reviewer spawn.
|
|
212
203
|
Prompt: "Read {{REVIEWER_SUBAGENT_PATH}}. For refactor {{REFACTOR_ID}}:
|
|
213
204
|
1. Read `.prizmkit/refactor/{{REFACTOR_ID}}/spec.md` for goals and behavior preservation contracts
|
|
214
205
|
2. Read `.prizmkit/refactor/{{REFACTOR_ID}}/plan.md` for architecture decisions and completed tasks
|
|
@@ -217,11 +208,7 @@ Include browser verification approach in plan.md:
|
|
|
217
208
|
|
|
218
209
|
{{IF_BROWSER_INTERACTION}}
|
|
219
210
|
|
|
220
|
-
5.
|
|
221
|
-
- Verify that critical user workflows still function end-to-end in browser
|
|
222
|
-
- Confirm UI renders consistently after structural changes
|
|
223
|
-
- Validate any behavior-sensitive components behave identically
|
|
224
|
-
- Document browser verification findings in review-report.md
|
|
211
|
+
5. Verify the Browser Behavior Preservation Protocol evidence and document findings in `review-report.md`.
|
|
225
212
|
|
|
226
213
|
{{END_IF_BROWSER_INTERACTION}}
|
|
227
214
|
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
##
|
|
1
|
+
## Verification Gates Compatibility Note
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This section file is retained for compatibility with older bootstrap templates.
|
|
4
4
|
|
|
5
|
-
|
|
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
|
-
---
|
|
5
|
+
Current section assembly renders Verification Gates only inside `task-contract.md` so the feature scope and acceptance requirements have a single source of truth.
|
|
13
6
|
|
|
7
|
+
Do not add this section separately unless you intentionally want to duplicate the gates outside the Task Contract.
|
|
@@ -31,3 +31,4 @@ You are running in **headless non-interactive mode** with a FINITE context windo
|
|
|
31
31
|
(c) Use no version constraint (e.g., `"express": "*"`)
|
|
32
32
|
- **This is a BLOCKING gate**: do NOT run `npm install` / `pip install` / `cargo build` / `go mod tidy` until ALL versions in the manifest have been verified or use open constraints
|
|
33
33
|
- Batch version lookups: query multiple packages in parallel to save time (e.g., run multiple `npm view` commands concurrently)
|
|
34
|
+
10. **Build artifact hygiene** — After any build/compile command (`go build`, `npm run build`, `tsc`, etc.), ensure the output binary, build directory, generated bundle, or cache directory is ignored by git before the commit phase. Never commit compiled binaries, build output, or generated artifacts.
|
|
@@ -1,25 +1,30 @@
|
|
|
1
1
|
<feature-context>
|
|
2
|
-
|
|
2
|
+
## Source Semantics
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Use this material according to the following priority:
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
1. **Task Contract** — defines current scope and Verification Gates.
|
|
7
|
+
2. **User Raw Context** — authoritative constraints, but not automatic scope expansion.
|
|
8
|
+
3. **Completed Dependencies** — existing behavior and interfaces; do not re-implement them.
|
|
9
|
+
4. **Project Brief** — product background and architecture alignment.
|
|
10
|
+
5. **App Global Context** — stack, runtime, and testing conventions.
|
|
11
|
+
6. **Project Conventions** — repository-specific rules.
|
|
7
12
|
|
|
8
|
-
###
|
|
13
|
+
### User Raw Context
|
|
9
14
|
|
|
10
|
-
{{
|
|
15
|
+
{{USER_CONTEXT}}
|
|
11
16
|
|
|
12
|
-
###
|
|
17
|
+
### Completed Dependencies
|
|
13
18
|
|
|
14
|
-
>
|
|
19
|
+
> Use this section to understand available interfaces and avoid duplicating completed work.
|
|
15
20
|
|
|
16
|
-
{{
|
|
21
|
+
{{COMPLETED_DEPENDENCIES}}
|
|
17
22
|
|
|
18
|
-
###
|
|
23
|
+
### Project Brief
|
|
19
24
|
|
|
20
|
-
>
|
|
25
|
+
> Use this section for alignment only. Do not treat unrelated backlog items as current feature scope.
|
|
21
26
|
|
|
22
|
-
{{
|
|
27
|
+
{{PROJECT_BRIEF}}
|
|
23
28
|
|
|
24
29
|
### App Global Context
|
|
25
30
|
|
|
@@ -1,46 +1,37 @@
|
|
|
1
1
|
### Browser Verification — MANDATORY
|
|
2
2
|
|
|
3
|
-
You MUST
|
|
3
|
+
You MUST attempt this phase. Mark it as skipped only when no usable browser tool can be found, installed, or started.
|
|
4
4
|
|
|
5
5
|
**Step 0 — Tool Selection (BLOCKING — decide before any browser action)**:
|
|
6
6
|
|
|
7
7
|
0a. Check which browser tools are available:
|
|
8
8
|
```bash
|
|
9
9
|
echo "=== playwright-cli ==="
|
|
10
|
-
which playwright-cli 2>/dev/null && playwright-cli --version 2>/dev/null || echo "NOT_INSTALLED"
|
|
10
|
+
which playwright-cli 2>/dev/null && playwright-cli --version 2>/dev/null || echo "PLAYWRIGHT_CLI:NOT_INSTALLED"
|
|
11
11
|
echo "=== opencli ==="
|
|
12
|
-
which opencli 2>/dev/null && opencli --version 2>/dev/null || echo "NOT_INSTALLED"
|
|
12
|
+
which opencli 2>/dev/null && opencli --version 2>/dev/null || echo "OPENCLI:NOT_INSTALLED"
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
0b.
|
|
16
|
-
|
|
17
|
-
opencli doctor
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
| Only playwright-cli installed | `playwright-cli` |
|
|
25
|
-
| Only opencli installed (and doctor passes) | `opencli` |
|
|
26
|
-
| Both installed — verifying local dev server, forms, components | `playwright-cli` (isolated, deterministic) |
|
|
27
|
-
| Both installed — feature needs real login state (OAuth/SSO) | `opencli` (reuses Chrome sessions) |
|
|
28
|
-
| Both installed — verifying third-party integration pages | `opencli` (has logged-in cookies) |
|
|
29
|
-
| Both installed — headless CI environment | `playwright-cli` (no Chrome dependency) |
|
|
30
|
-
| Neither installed | Skip — log `## Browser Verification: SKIPPED — no browser tool available` |
|
|
15
|
+
0b. Use this single decision tree:
|
|
16
|
+
1. If `playwright-cli` is available, use it by default for local dev-server verification.
|
|
17
|
+
2. Else if `opencli` is available, run `opencli doctor`; use `opencli` only if doctor passes.
|
|
18
|
+
3. Else install `playwright-cli` as the default:
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @playwright/cli@latest
|
|
21
|
+
playwright-cli --version
|
|
22
|
+
```
|
|
23
|
+
4. If no browser tool is usable after these steps, append `## Browser Verification: SKIPPED — no usable browser tool` to `context-snapshot.md`, then continue to reporting/checkpoint.
|
|
31
24
|
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npm install -g @playwright/cli@latest
|
|
35
|
-
playwright-cli --version
|
|
36
|
-
```
|
|
25
|
+
Use `opencli` instead of `playwright-cli` only when the scenario requires an existing Chrome login/session or third-party integration cookies.
|
|
37
26
|
|
|
38
27
|
Record your choice:
|
|
39
28
|
```bash
|
|
40
|
-
BROWSER_TOOL="playwright-cli" # or "opencli"
|
|
29
|
+
BROWSER_TOOL="playwright-cli" # or "opencli" or "skipped"
|
|
41
30
|
echo "Selected browser tool: $BROWSER_TOOL"
|
|
42
31
|
```
|
|
43
32
|
|
|
33
|
+
If `BROWSER_TOOL="skipped"`, do NOT start a dev server and do NOT run browser commands. Go directly to Step 4 Reporting and the checkpoint update.
|
|
34
|
+
|
|
44
35
|
---
|
|
45
36
|
|
|
46
37
|
**If you chose `playwright-cli`**, follow this workflow:
|
|
@@ -74,7 +65,7 @@ If `SKILL_MISSING`: run `playwright-cli install --skills`. If current platform i
|
|
|
74
65
|
Use `playwright-cli snapshot` to discover element refs, then verify these goals:
|
|
75
66
|
{{BROWSER_VERIFY_STEPS}}
|
|
76
67
|
|
|
77
|
-
Construct your verification workflow based on: (1) the playwright-cli skill documentation, (2) the `--help` output, (3) the current task's
|
|
68
|
+
Construct your verification workflow based on: (1) the playwright-cli skill documentation, (2) the `--help` output, (3) the current task's Verification Gates. Take a final screenshot: `playwright-cli screenshot`.
|
|
78
69
|
|
|
79
70
|
**Step 3 — Cleanup (playwright-cli)**:
|
|
80
71
|
1. `playwright-cli close`
|
|
@@ -94,7 +94,7 @@ opencli browser click 12 && opencli browser wait time 1 && opencli browser state
|
|
|
94
94
|
|
|
95
95
|
**IMPORTANT**: Always run `opencli browser state` after page-changing actions (open, click on links, scroll) to get fresh element indices. Never guess indices.
|
|
96
96
|
|
|
97
|
-
Construct your verification workflow based on: (1) the `opencli browser --help` output, (2) the current task's
|
|
97
|
+
Construct your verification workflow based on: (1) the `opencli browser --help` output, (2) the current task's Verification Gates. Decide the concrete actions yourself. Take a final screenshot if needed: `opencli browser screenshot`.
|
|
98
98
|
|
|
99
99
|
**Step 3 — Cleanup (REQUIRED — you started it, you stop it)**:
|
|
100
100
|
|
|
@@ -113,7 +113,7 @@ Use `playwright-cli snapshot` on the running app to discover actual element refs
|
|
|
113
113
|
Construct your verification workflow based on:
|
|
114
114
|
1. The playwright-cli skill documentation (read in Step 0d)
|
|
115
115
|
2. The `playwright-cli --help` output (captured in Step 0b)
|
|
116
|
-
3. The current task's
|
|
116
|
+
3. The current task's Verification Gates and implemented features
|
|
117
117
|
|
|
118
118
|
Decide the concrete playwright-cli actions (click, fill, snapshot, screenshot, etc.) yourself based on the snapshot output and your knowledge of the implemented code. The goals above describe WHAT to verify — you determine HOW using playwright-cli commands.
|
|
119
119
|
|
|
@@ -13,7 +13,7 @@ If MISSING — build it now:
|
|
|
13
13
|
Identify the top-level source directories from the results.
|
|
14
14
|
3. Scan the detected source directories for files related to this feature; read each one
|
|
15
15
|
4. Write `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`:
|
|
16
|
-
- **Section 1 —
|
|
16
|
+
- **Section 1 — Task Contract**: Objective, scope rule, non-scope rule, and Verification Gates from the Task Contract above
|
|
17
17
|
- **Section 2 — Project Structure**: run the following to get a visual directory tree, then paste output:
|
|
18
18
|
```bash
|
|
19
19
|
find . -maxdepth 2 -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/build/*' -not -path '*/__pycache__/*' -not -path '*/vendor/*' | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
### Implement — Dev Subagent
|
|
2
2
|
|
|
3
|
-
**
|
|
4
|
-
|
|
5
|
-
**Dependency version gate (BLOCKING — pass to Dev agent)**: Before running ANY package install command (`npm install`, `pip install`, `cargo build`, `go mod tidy`, `bundle install`, etc.):
|
|
6
|
-
1. Every version number in the dependency manifest MUST be verified against the real registry (see Context Budget Rules §9)
|
|
7
|
-
2. If a scaffold tool generated a `package.json` / `requirements.txt` / etc., verify the versions it wrote too — scaffold tools can emit outdated versions
|
|
8
|
-
3. Do NOT proceed with install until all versions are confirmed real. Violation = wasted timeout cycles that can crash the session
|
|
9
|
-
|
|
10
|
-
**Scaffold file rule (pass to Dev agent)**: After running any init/scaffold command, record generated files in context-snapshot.md under `### Scaffold Files (do not re-read)`. Never re-read these files — their content is standard boilerplate (see Context Budget Rules §8). When spawning subagents, explicitly list scaffold files so they skip reading them.
|
|
3
|
+
**Protocol handoff to Dev**: The Dev prompt already carries the required subset of Context Budget Rules, the Test Failure Recovery Protocol, and Task Contract / Verification Gate constraints. Do not duplicate those rules here; verify Dev output against the gates below.
|
|
11
4
|
|
|
12
5
|
**Spawn Agent**:
|
|
13
6
|
| Parameter | Value |
|
|
@@ -24,7 +17,7 @@
|
|
|
24
17
|
**Prompt**:
|
|
25
18
|
> {{AGENT_PROMPT_DEV_IMPLEMENT}}
|
|
26
19
|
|
|
27
|
-
Wait for Dev to return.
|
|
20
|
+
Wait for Dev to return. Implementation may proceed only when tasks are complete and the Test Failure Recovery Protocol's Success Rule is satisfied.
|
|
28
21
|
|
|
29
22
|
**No silent artifact polling**:
|
|
30
23
|
- Do NOT run a long no-output loop that only waits for `## Implementation Log` or any other file marker.
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
### Implement — Dev Agent
|
|
2
2
|
|
|
3
|
-
**
|
|
4
|
-
|
|
5
|
-
**Dependency version gate (BLOCKING — pass to Dev agent)**: Before running ANY package install command (`npm install`, `pip install`, `cargo build`, `go mod tidy`, `bundle install`, etc.):
|
|
6
|
-
1. Every version number in the dependency manifest MUST be verified against the real registry (see Context Budget Rules §9)
|
|
7
|
-
2. If a scaffold tool generated a `package.json` / `requirements.txt` / etc., verify the versions it wrote too — scaffold tools can emit outdated versions
|
|
8
|
-
3. Do NOT proceed with install until all versions are confirmed real. Violation = wasted timeout cycles that can crash the session
|
|
9
|
-
|
|
10
|
-
**Scaffold file rule (pass to Dev agent)**: After running any init/scaffold command, record generated files in context-snapshot.md under `### Scaffold Files (do not re-read)`. Never re-read these files — their content is standard boilerplate (see Context Budget Rules §8). When spawning subagents, explicitly list scaffold files so they skip reading them.
|
|
3
|
+
**Protocol handoff to Dev**: The Dev prompt already carries the required subset of Context Budget Rules, the Test Failure Recovery Protocol, and Task Contract / Verification Gate constraints. Do not duplicate those rules here; verify Dev output against the gates below.
|
|
11
4
|
|
|
12
5
|
Before spawning Dev, check plan.md Tasks section:
|
|
13
6
|
```bash
|
|
@@ -50,7 +43,7 @@ Wait for Dev to return. **If Dev times out before all tasks are `[x]`**:
|
|
|
50
43
|
> {{AGENT_PROMPT_DEV_RESUME}}
|
|
51
44
|
3. Max 2 recovery retries. After 2 failures, orchestrator implements remaining tasks directly.
|
|
52
45
|
|
|
53
|
-
|
|
46
|
+
Implementation phase is complete only when all tasks are `[x]` and the Test Failure Recovery Protocol's Success Rule is satisfied.
|
|
54
47
|
|
|
55
48
|
|
|
56
49
|
**Checkpoint update**: Run the update script to set step `prizmkit-implement` to `"completed"`:
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
### Implement + Test
|
|
2
2
|
|
|
3
|
-
**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
Never commit compiled binaries, build output, or generated artifacts.
|
|
9
|
-
|
|
10
|
-
**Dependency version gate (BLOCKING)**: Before running ANY package install command (`npm install`, `pip install`, `cargo build`, `go mod tidy`, `bundle install`, etc.):
|
|
11
|
-
1. Every version number in your dependency manifest MUST be verified against the real registry (see Context Budget Rules §9)
|
|
12
|
-
2. If you used a scaffold tool that generated a `package.json` / `requirements.txt` / etc., verify the versions it wrote too — scaffold tools can emit outdated versions
|
|
13
|
-
3. Do NOT proceed with install until all versions are confirmed real. Violation = wasted timeout cycles
|
|
14
|
-
|
|
15
|
-
**Scaffold file rule**: After running any init/scaffold command, record generated files in context-snapshot.md under `### Scaffold Files (do not re-read)`. Never re-read these files — their content is standard boilerplate (see Context Budget Rules §8).
|
|
3
|
+
**Protocol references**:
|
|
4
|
+
- Follow Context Budget Rules §8 for scaffold/generated files.
|
|
5
|
+
- Follow Context Budget Rules §9 before package install/build commands that resolve dependencies.
|
|
6
|
+
- Follow Context Budget Rules §10 after build/compile commands.
|
|
16
7
|
|
|
17
8
|
**3a.** Detect test commands and record baseline:
|
|
18
9
|
|
|
@@ -32,11 +23,11 @@ You know this project's tech stack. Identify ALL test commands that apply (e.g.,
|
|
|
32
23
|
|
|
33
24
|
**3c.** After implement completes, verify:
|
|
34
25
|
1. All tasks in plan.md are `[x]`
|
|
35
|
-
2. Run the full test suite to ensure
|
|
36
|
-
3. Verify each
|
|
37
|
-
4. If any
|
|
26
|
+
2. Run the full test suite to ensure no new regressions remain
|
|
27
|
+
3. Verify each Verification Gate from the Task Contract — check mentally, do NOT re-read files you already wrote
|
|
28
|
+
4. If any gate is unmet or blocked, follow the Test Failure Recovery Protocol
|
|
38
29
|
|
|
39
|
-
**CP-2**:
|
|
30
|
+
**CP-2**: Implementation may proceed only when all tasks are `[x]` and the Test Failure Recovery Protocol's Success Rule is satisfied. Blocked gates must be documented in `failure-log.md` and are not success.
|
|
40
31
|
|
|
41
32
|
|
|
42
33
|
**Checkpoint update**: Run the update script to set step `prizmkit-implement` to `"completed"`:
|
|
@@ -5,7 +5,7 @@ ls .prizmkit/specs/{{FEATURE_SLUG}}/ 2>/dev/null
|
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
If plan.md missing, run `/prizmkit-plan` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`:
|
|
8
|
-
- Pass the
|
|
8
|
+
- Pass the Objective and Verification Gates from the Task Contract as input
|
|
9
9
|
- The plan.md should include: key components, data flow, files to create/modify, and a Tasks section with `[ ]` checkboxes (each task = one implementable unit). Keep under 80 lines.
|
|
10
10
|
- Resolve any `[NEEDS CLARIFICATION]` markers using the feature description — do NOT pause for interactive input.
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ Read `review-report.md` and check the Verdict:
|
|
|
21
21
|
|
|
22
22
|
Run the full test suite: `({{TEST_CMD}}) 2>&1 | tee /tmp/review-test-out.txt | tail -20`
|
|
23
23
|
|
|
24
|
-
**CP-3**: Review complete,
|
|
24
|
+
**CP-3**: Review complete, report written, and the Test Failure Recovery Protocol's Success Rule is satisfied.
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
**Checkpoint update**: Run the update script to set step `prizmkit-code-review` to `"completed"`:
|