prizmkit 1.1.137 → 1.1.139
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/prizmkit_runtime/runner_models.py +0 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +0 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +3 -5
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +24 -39
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +3 -5
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +4 -5
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +3 -5
- package/bundled/dev-pipeline/scripts/prompt_framework.py +9 -10
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +51 -0
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +3 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +24 -26
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +5 -4
- package/bundled/dev-pipeline/templates/feature-list-schema.json +1 -1
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +3 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-mission.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +2 -10
- package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +2 -1
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +5 -5
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +5 -5
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +2 -1
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +2 -12
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +2 -10
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/refactor-mission.md +1 -1
- package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +2 -10
- package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +2 -1
- package/bundled/dev-pipeline/templates/sections/subagent-timeout-recovery.md +5 -4
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +47 -0
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +10 -16
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +3 -1
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +1 -6
- package/bundled/dev-pipeline/tests/test_unified_cli.py +3 -5
- package/bundled/skills/_metadata.json +2 -2
- package/bundled/skills/prizmkit-test/SKILL.md +22 -24
- package/bundled/skills/prizmkit-test/assets/authoritative-records.schema.json +5 -73
- package/bundled/skills/prizmkit-test/assets/evidence-package-template.json +1 -2
- package/bundled/skills/prizmkit-test/references/boundary-coverage-protocol.md +2 -2
- package/bundled/skills/prizmkit-test/references/evidence-protocol.md +14 -11
- package/bundled/skills/prizmkit-test/references/evidence-request-protocol.md +12 -17
- package/bundled/skills/prizmkit-test/references/examples.md +3 -5
- package/bundled/skills/prizmkit-test/references/test-generation-steps.md +6 -8
- package/bundled/skills/prizmkit-test/references/test-report-template.md +4 -7
- package/bundled/skills/prizmkit-test/references/trusted-evidence-execution.md +5 -7
- package/bundled/skills/prizmkit-test/scripts/build_test_evidence.py +251 -204
- package/bundled/skills/prizmkit-test/scripts/validate_test_evidence.py +292 -181
- package/package.json +1 -1
|
@@ -6,4 +6,4 @@ You are the **bug fix session orchestrator**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}
|
|
|
6
6
|
|
|
7
7
|
**NON-INTERACTIVE MODE**: There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input. Make decisions autonomously from the bug report, existing code, tests, and conservative project patterns.
|
|
8
8
|
|
|
9
|
-
**Execution model**:
|
|
9
|
+
**Execution model**: Follow the active skills and runtime contracts for planning, implementation, review, recovery, and commit. Those contracts determine the execution topology, permissions, and delegation boundaries.
|
|
@@ -2,17 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Code review is mandatory for every committable Bugfix, including small or obvious fixes. Do not create a FAST_PATH that skips this gate.
|
|
4
4
|
|
|
5
|
-
Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}
|
|
5
|
+
Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/` and follow the skill's complete review contract for review execution, repairs, verification, evidence, and handoff. Do not invoke another review skill or add a second review path outside that contract.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- Do not delegate the mandatory Main-Agent review or invoke another review skill or workflow.
|
|
10
|
-
- Do not add review execution outside the single optional Reviewer owned and gated by `prizmkit-code-review`.
|
|
11
|
-
- The optional Reviewer must be structurally read-only, unable to execute arbitrary commands or downstream execution, and natively resumable as the same unit; otherwise strict downgrade applies.
|
|
12
|
-
- Direct reading, searching, editing, and testing by the current Main Agent remain allowed.
|
|
13
|
-
- `review-report.md` is the only persisted review artifact; do not append separate Review Notes to another artifact.
|
|
14
|
-
|
|
15
|
-
Missing required evidence, an unsafe repair, a failed verification, or failure to converge by round ten produces `NEEDS_FIXES`.
|
|
7
|
+
Missing required evidence, an unsafe repair, a failed verification, or failure to converge under the review contract produces `NEEDS_FIXES`.
|
|
16
8
|
|
|
17
9
|
**Gate Check — Final Review Result**:
|
|
18
10
|
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
- The first plan task must prove the bug with a reproduction test when feasible.
|
|
6
6
|
- Commit with `fix(<scope>):`, not `feat:`.
|
|
7
7
|
- Do not write TRAP dates into `.prizmkit/prizm-docs/`.
|
|
8
|
-
-
|
|
8
|
+
- Follow the active skills and runtime contracts; they determine execution topology, review ownership, and delegation boundaries.
|
|
9
|
+
- On execution-unit timeout, preserve the active checkout and artifacts and follow the owning contract's recovery or downgrade path.
|
|
9
10
|
- Checkpoint state is the recovery truth; skipped steps must be marked `skipped`.
|
|
10
11
|
- Browser verification is a mandatory attempt by default; it blocks only when explicitly required.
|
|
11
12
|
- If `DEV_PORT` is unknown, discover it from project config; do not guess port 3000.
|
|
@@ -4,9 +4,9 @@ You are running in **headless non-interactive mode** with a FINITE context windo
|
|
|
4
4
|
|
|
5
5
|
0. **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.
|
|
6
6
|
|
|
7
|
-
1. **context-snapshot.md is your single source of truth** — After it is available, use it instead of re-reading individual source files. If you just created or updated it in this session, continue from the in-context content; read it only when resuming/continuing, after context compaction/loss, or when handing work to
|
|
7
|
+
1. **context-snapshot.md is your single source of truth** — After it is available, use it instead of re-reading individual source files. If you just created or updated it in this session, continue from the in-context content; read it only when resuming/continuing, after context compaction/loss, or when handing work to an execution unit.
|
|
8
8
|
2. **Never re-read your own writes** — After you create/modify a file, do NOT read it back to verify. Trust your write was correct.
|
|
9
|
-
3. **Never re-read unmodified files** — Once you have read a file into context, do NOT read it again unless it was modified by an Edit/Write operation after your last read. Use platform file/search tools for targeted lookup; when shell-free helper lookup is needed, run `{{RUNTIME_HELPER_CMD}} text search <file> --pattern "<pattern>" --json`, then read only the smallest bounded range with the platform file-reading tool instead of full-file Read. Before issuing a Read, ask yourself: "Have I read this file before, and has it changed since?" If the answer is "no, it hasn't changed" — do NOT read it. This applies to all files summarized in context-snapshot.md Section 4.
|
|
9
|
+
3. **Never re-read unmodified files** — Once you have read a file into context, do NOT read it again unless it was modified by an Edit/Write operation after your last read. Use platform file/search tools for targeted lookup; when shell-free helper lookup is needed, run `{{RUNTIME_HELPER_CMD}} text search <file> --pattern "<pattern>" --json`, then read only the smallest bounded range with the platform file-reading tool instead of full-file Read. Before issuing a Read, ask yourself: "Have I read this file before, and has it changed since?" If the answer is "no, it hasn't changed" — do NOT read it. This applies to all files summarized in context-snapshot.md Section 4. Follow the active skill and runtime contracts when an execution unit is created; do not infer its permissions, continuation, or retry behavior from this prompt.
|
|
10
10
|
4. **Stay focused** — Do NOT explore code unrelated to this feature. No curiosity-driven reads.
|
|
11
11
|
5. **One task at a time** — Complete and test one task before starting the next.
|
|
12
12
|
6. **Minimize tool output** — Never load full command output into context. First capture command output to a temp file using the command/tool output option or the host-appropriate redirection, then inspect only the final relevant lines and use targeted search helpers to extract the information needed for the current task. Only read the filtered result — never the raw full output.
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
### Implement —
|
|
1
|
+
### Implement — Plan Execution
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Execute the reviewed plan through the active implementation skill. The skill and runtime determine the execution topology; preserve the shared artifact directory, active checkout, and task checkpoints.
|
|
4
4
|
|
|
5
5
|
Before starting, check plan.md Tasks:
|
|
6
6
|
```bash
|
|
7
7
|
{{RUNTIME_HELPER_CMD}} text count .prizmkit/specs/{{FEATURE_SLUG}}/plan.md --pattern "- [ ]"
|
|
8
8
|
```
|
|
9
9
|
- If result is `0` (all tasks already `[x]`) → **SKIP to Review**.
|
|
10
|
-
- If non-zero →
|
|
10
|
+
- If non-zero → execute the remaining tasks below.
|
|
11
11
|
|
|
12
12
|
**Build artifacts rule**: After any build/compile command, ensure output is in `.gitignore`. Never commit binaries/build output.
|
|
13
13
|
|
|
14
14
|
**3a.** Run `/prizmkit-implement` directly:
|
|
15
15
|
- Continue from the `spec.md` / `plan.md` / `context-snapshot.md` content you created in Phase 1-2; do not re-read self-authored artifacts just because implementation starts
|
|
16
16
|
- Re-read `plan.md` or `context-snapshot.md` only when resuming/continuing, when current context was compacted or lost, or when task checkbox state may have changed outside this session
|
|
17
|
-
-
|
|
17
|
+
- Follow the implementation skill's current execution and delegation contract
|
|
18
18
|
- Use context-snapshot.md Section 4 File Manifest for targeted source reads; avoid re-reading source files already summarized there unless they changed after the snapshot
|
|
19
19
|
- Implements task-by-task, marking each `[x]` immediately
|
|
20
|
-
-
|
|
20
|
+
- Remember to update checkpoints after finishing a series of tasks
|
|
21
21
|
|
|
22
22
|
**3b. Focused checks only (no test gate here)**:
|
|
23
23
|
- During implementation, do not run mandatory periodic or full-suite tests.
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
### Implement —
|
|
1
|
+
### Implement — Plan Execution
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Execute the reviewed plan through the active implementation skill. The skill and runtime determine the execution topology; preserve the shared artifact directory, active checkout, and task checkpoints.
|
|
4
4
|
|
|
5
5
|
Before starting, check plan.md Tasks:
|
|
6
6
|
```bash
|
|
7
7
|
{{RUNTIME_HELPER_CMD}} text count .prizmkit/specs/{{FEATURE_SLUG}}/plan.md --pattern "- [ ]"
|
|
8
8
|
```
|
|
9
9
|
- If result is `0` (all tasks already `[x]`) → **SKIP to Review**.
|
|
10
|
-
- If non-zero →
|
|
10
|
+
- If non-zero → execute the remaining tasks below.
|
|
11
11
|
|
|
12
12
|
**Build artifacts rule**: After any build/compile command, ensure output is in `.gitignore`. Never commit binaries/build output.
|
|
13
13
|
|
|
14
14
|
**3a.** Run `/prizmkit-implement` directly:
|
|
15
15
|
- Continue from the `spec.md` / `plan.md` / `context-snapshot.md` content you created in Phase 1-2; do not re-read self-authored artifacts just because implementation starts
|
|
16
16
|
- Re-read `plan.md` or `context-snapshot.md` only when resuming/continuing, when current context was compacted or lost, or when task checkbox state may have changed outside this session
|
|
17
|
-
-
|
|
17
|
+
- Follow the implementation skill's current execution and delegation contract
|
|
18
18
|
- Use context-snapshot.md Section 4 File Manifest for targeted source reads; avoid re-reading source files already summarized there unless they changed after the snapshot
|
|
19
19
|
- Implements task-by-task, marking each `[x]` immediately
|
|
20
|
-
-
|
|
20
|
+
- Remember to update checkpoints after finishing a series of tasks
|
|
21
21
|
|
|
22
22
|
**3b. Focused checks only (no test gate here)**:
|
|
23
23
|
- During implementation, do not run mandatory periodic or full-suite tests.
|
|
@@ -33,7 +33,8 @@ Preserve the same artifact directory and update the L1 workflow state plus this
|
|
|
33
33
|
- `TEST_FAIL` with `repair_scope=test-infrastructure` → `prizmkit-implement` → `prizmkit-test`; do not make speculative production edits.
|
|
34
34
|
- `TEST_FAIL` with `repair_scope=production|runtime|schema|dependency|public-interface` → `prizmkit-implement` → `prizmkit-code-review` → `prizmkit-test`.
|
|
35
35
|
- `TEST_FAIL` with unknown or unsafe scope → do not guess a production edit; record `WORKFLOW_BLOCKED` and a safe resume entry.
|
|
36
|
-
- `TEST_BLOCKED` → preserve all evidence and artifacts, perform only bounded environment recovery, then finish terminal `WORKFLOW_BLOCKED` with `blocked_reason=test_blocked`; never edit production speculatively.
|
|
36
|
+
- `TEST_BLOCKED` → preserve all evidence and artifacts, perform only bounded environment recovery, then finish terminal `WORKFLOW_BLOCKED` with `blocked_reason=test_blocked`; never edit production speculatively. When a finalized blocked package exists, pass its validated `manifest`, `verdict`, and `validation` paths to the checkpoint; do not leave these paths null.
|
|
37
|
+
- The builder's evidence-protocol recovery budget is separate from the outer `repair_round`: after bounded preflight/package attempts, stop creating evidence versions and return `TEST_BLOCKED`.
|
|
37
38
|
- The outer `repair_round` is shared across review/test failures and may not exceed three. The Code Review internal loop limit remains separate and is at most ten completed rounds.
|
|
38
39
|
|
|
39
40
|
A missing, stale, incomplete, mismatched, tampered, or wrong-scope package is not `TEST_PASS`: preserve the evidence, write `failure-log.md`, and leave the checkpoint resumable or blocked according to headless policy.
|
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
### Review — Code Review
|
|
2
2
|
|
|
3
|
-
Review the completed implementation before the scoped feature test gate runs. Use `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/` so `/prizmkit-code-review` can read the spec, plan, context snapshot, implementation log, and current diff. Do not
|
|
3
|
+
Review the completed implementation before the scoped feature test gate runs. Use `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/` so `/prizmkit-code-review` can read the spec, plan, context snapshot, implementation log, and current diff. Follow the skill's current review contract for review execution, repairs, verification, evidence, and handoff. Do not invoke another review skill or add a second review path outside that contract.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
The Code Review execution boundary is closed for this phase:
|
|
8
|
-
|
|
9
|
-
- Do not delegate the mandatory Main-Agent review or invoke another review skill or workflow.
|
|
10
|
-
- Do not add review execution outside the single optional Reviewer owned and gated by `prizmkit-code-review`.
|
|
11
|
-
- The optional Reviewer must be structurally read-only, unable to execute arbitrary commands or downstream execution, and natively resumable as the same unit; otherwise strict downgrade applies.
|
|
12
|
-
- Direct reading, searching, editing, and testing by the current Main Agent remain allowed.
|
|
13
|
-
- `review-report.md` is the only persisted review artifact; do not append separate Review Notes to `context-snapshot.md`.
|
|
14
|
-
|
|
15
|
-
Missing required evidence, an unsafe repair, a failed verification, or failure to converge by round ten produces `NEEDS_FIXES`.
|
|
5
|
+
Missing required evidence, an unsafe repair, a failed verification, or failure to converge by the contract's review limit produces `NEEDS_FIXES`.
|
|
16
6
|
|
|
17
7
|
**Gate Check — Final Review Result**:
|
|
18
8
|
|
|
@@ -2,21 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Review the completed implementation before the full Feature test gate runs. A review result is a required predecessor; never accept or route around testing as if a review had passed.
|
|
4
4
|
|
|
5
|
-
Use `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/` so `/prizmkit-code-review` can read the spec, plan, context snapshot, implementation log, and current diff.
|
|
5
|
+
Use `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/` so `/prizmkit-code-review` can read the spec, plan, context snapshot, implementation log, and current diff. Follow the skill's current review contract for review execution, repairs, verification, evidence, and handoff. Do not invoke another review skill or add a second review path outside that contract.
|
|
6
6
|
|
|
7
7
|
- `REVIEW_PASS` → update checkpoint metadata with `stage=code-review`, `status=REVIEW_PASS`, `stage_result=REVIEW_PASS`, `next_stage=prizmkit-test`, and `resume_from=prizmkit-test`; then run the full test gate.
|
|
8
8
|
- `REVIEW_NEEDS_FIXES` → preserve findings, increment the shared outer `repair_round`, route `prizmkit-implement` → `prizmkit-code-review` → `prizmkit-test`, and do not accept any test result from before the repaired review.
|
|
9
9
|
- If the outer repair round is already three, record `WORKFLOW_BLOCKED`; do not start another repair route.
|
|
10
10
|
|
|
11
|
-
Missing required evidence, unsafe repair, failed verification, or failure to converge
|
|
12
|
-
|
|
13
|
-
The Code Review execution boundary is closed:
|
|
14
|
-
|
|
15
|
-
- Do not delegate the mandatory Main-Agent review or invoke another review skill or workflow.
|
|
16
|
-
- Do not add review execution outside the single optional Reviewer owned and gated by `prizmkit-code-review`.
|
|
17
|
-
- The optional Reviewer must be structurally read-only, unable to execute arbitrary commands or downstream execution, and natively resumable as the same unit; otherwise strict downgrade applies.
|
|
18
|
-
- Direct reading, searching, editing, and testing by the current Main Agent remain allowed.
|
|
19
|
-
- `review-report.md` is the only persisted review artifact; do not append separate Review Notes to `context-snapshot.md`.
|
|
11
|
+
Missing required evidence, unsafe repair, failed verification, or failure to converge under the review contract produces `REVIEW_NEEDS_FIXES`.
|
|
20
12
|
|
|
21
13
|
**Gate Check — Final Review Result**:
|
|
22
14
|
|
|
@@ -71,7 +71,7 @@ Before proceeding past CP-1, verify:
|
|
|
71
71
|
|
|
72
72
|
### Plan Self-Check — Orchestrator Direct
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
The active planning skill and runtime determine whether any additional planning execution is appropriate. Do not treat this bounded self-check as a substitute for the planning skill's own review contract.
|
|
75
75
|
|
|
76
76
|
1. Re-read only `context-snapshot.md`, `spec.md`, and `plan.md`.
|
|
77
77
|
2. Cross-check spec.md and plan.md Tasks against the feature description and Verification Gates in the Task Contract.
|
|
@@ -4,6 +4,6 @@ You are the **refactor session orchestrator**. Execute Refactor {{REFACTOR_ID}}:
|
|
|
4
4
|
|
|
5
5
|
**CRITICAL**: Preserve observable behavior. Do not change product behavior unless the refactor contract explicitly requires it.
|
|
6
6
|
|
|
7
|
-
**Execution model**:
|
|
7
|
+
**Execution model**: Follow the active skills and runtime contracts for planning, implementation, review, recovery, and commit. Those contracts determine the execution topology, permissions, and delegation boundaries.
|
|
8
8
|
|
|
9
9
|
**NON-INTERACTIVE MODE**: There is NO human on the other end. Resolve uncertainty from existing code and conservative project patterns.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
### Phase 2: Implement —
|
|
1
|
+
### Phase 2: Implement — Plan Execution
|
|
2
2
|
|
|
3
3
|
**Goal**: execute the refactor plan while preserving behavior.
|
|
4
4
|
|
|
5
5
|
Run `/prizmkit-implement` directly with `artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/`.
|
|
6
6
|
|
|
7
7
|
Rules:
|
|
8
|
-
-
|
|
8
|
+
- Follow the implementation skill's current execution and delegation contract.
|
|
9
9
|
- Establish a baseline test result before structural changes when feasible.
|
|
10
10
|
- Execute plan tasks in order and mark each `[x]` immediately.
|
|
11
11
|
- After each behavior-sensitive task, run the smallest relevant behavior-preservation check.
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
### Phase 3: Review — Code Review & Behavior Verification
|
|
2
2
|
|
|
3
|
-
Run `/prizmkit-code-review` directly with `artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}
|
|
3
|
+
Run `/prizmkit-code-review` directly with `artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/` and follow the skill's complete review contract for review execution, repairs, verification, evidence, and handoff. Do not invoke another review skill or add a second review path outside that contract.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Do not delegate the mandatory Main-Agent review or invoke another review skill or workflow.
|
|
8
|
-
- Do not add review execution outside the single optional Reviewer owned and gated by `prizmkit-code-review`.
|
|
9
|
-
- The optional Reviewer must be structurally read-only, unable to execute arbitrary commands or downstream execution, and natively resumable as the same unit; otherwise strict downgrade applies.
|
|
10
|
-
- Direct reading, searching, editing, and testing by the current Main Agent remain allowed.
|
|
11
|
-
- `review-report.md` is the only persisted review artifact; do not append separate Review Notes to another artifact.
|
|
12
|
-
|
|
13
|
-
Missing required evidence, an unsafe repair, a failed verification, or failure to converge by round ten produces `NEEDS_FIXES`.
|
|
5
|
+
Missing required evidence, an unsafe repair, a failed verification, or failure to converge under the review contract produces `NEEDS_FIXES`.
|
|
14
6
|
|
|
15
7
|
**Gate Check — Final Review Result**:
|
|
16
8
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
- Use L1 skills: `/prizmkit-plan`, `/prizmkit-implement`, `/prizmkit-code-review`, `/prizmkit-retrospective`, `/prizmkit-committer`.
|
|
4
4
|
- All refactor skills use `artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/`.
|
|
5
5
|
- Behavior preservation is the first priority.
|
|
6
|
-
-
|
|
6
|
+
- Follow the active skills and runtime contracts; they determine execution topology, review ownership, and delegation boundaries
|
|
7
|
+
- On execution-unit timeout, preserve the active checkout and artifacts and follow the owning contract's recovery or downgrade path
|
|
7
8
|
- Main orchestrator runs `/prizmkit-code-review` directly.
|
|
8
9
|
- Commit with `refactor(<scope>):`, not `feat:` or `fix:`.
|
|
9
10
|
- Checkpoint state is the recovery truth; skipped steps must be marked `skipped`.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
##
|
|
1
|
+
## Execution-Unit Timeout Recovery
|
|
2
2
|
|
|
3
|
-
This recovery path applies
|
|
3
|
+
This recovery path applies to any delegated execution unit created by the active skill or runtime. The unit's own skill contract determines whether it may be resumed, replaced, or handled by the Main Agent; do not infer those rules from this prompt.
|
|
4
4
|
|
|
5
|
-
If
|
|
5
|
+
If an execution unit times out:
|
|
6
6
|
1. `{{RUNTIME_HELPER_CMD}} artifact list .prizmkit/specs/{{FEATURE_SLUG}}` — check what exists
|
|
7
7
|
2. If `context-snapshot.md` exists: open a recovery prompt with `"Read .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md for project context and the Implementation Log. Run git diff HEAD to see actual code changes already made. Do NOT re-read individual source files unless the File Manifest directs you to."` + only remaining steps + `model: "lite"`
|
|
8
|
-
3.
|
|
8
|
+
3. Apply the active skill's retry and continuation contract. Do not create a replacement execution unit when that contract requires native continuation or strict downgrade.
|
|
9
|
+
4. After the allowed recovery attempts are exhausted, the Main Agent continues directly when safe or records `failure-log.md` with the timeout and last observable state.
|
|
@@ -440,6 +440,53 @@ def test_declared_final_artifact_must_exist_for_semantic_completion(tmp_path, mo
|
|
|
440
440
|
|
|
441
441
|
|
|
442
442
|
|
|
443
|
+
def test_blocked_test_handoff_discovers_finalized_evidence_paths(tmp_path):
|
|
444
|
+
artifact = tmp_path / ".prizmkit" / "specs" / "feature"
|
|
445
|
+
artifact.mkdir(parents=True)
|
|
446
|
+
evidence = tmp_path / ".prizmkit" / "test" / "evidence" / "evidence-1"
|
|
447
|
+
evidence.mkdir(parents=True)
|
|
448
|
+
for name in ("manifest.json", "verdict.json", "validation.json"):
|
|
449
|
+
(evidence / name).write_text("{}", encoding="utf-8")
|
|
450
|
+
report = evidence / "test-report.md"
|
|
451
|
+
report.write_text("blocked", encoding="utf-8")
|
|
452
|
+
(artifact / "test-report-path.txt").write_text(str(report), encoding="utf-8")
|
|
453
|
+
|
|
454
|
+
payload = _family_checkpoint(
|
|
455
|
+
"feature-pipeline",
|
|
456
|
+
[
|
|
457
|
+
"prizmkit-implement", "prizmkit-code-review", "prizmkit-test",
|
|
458
|
+
"prizmkit-retrospective", "prizmkit-committer", "completion-summary",
|
|
459
|
+
],
|
|
460
|
+
semantic={"artifact_dir": ".prizmkit/specs/feature"},
|
|
461
|
+
)
|
|
462
|
+
payload["feature_state"]["artifact_dir"] = ".prizmkit/specs/feature"
|
|
463
|
+
payload["steps"][1]["stage_result"] = "REVIEW_PASS"
|
|
464
|
+
payload["steps"][2]["status"] = "in_progress"
|
|
465
|
+
payload["steps"][2].pop("stage_result")
|
|
466
|
+
for step in payload["steps"][3:]:
|
|
467
|
+
step["status"] = "pending"
|
|
468
|
+
step.pop("stage_result", None)
|
|
469
|
+
checkpoint = _write(tmp_path / ".prizmkit" / "specs" / "feature" / "workflow-checkpoint.json", payload)
|
|
470
|
+
|
|
471
|
+
result = update_checkpoint(
|
|
472
|
+
str(checkpoint),
|
|
473
|
+
"prizmkit-test",
|
|
474
|
+
"failed",
|
|
475
|
+
semantic_update={
|
|
476
|
+
"stage_result": "TEST_BLOCKED",
|
|
477
|
+
"blocked_reason": "test_blocked",
|
|
478
|
+
"terminal_status": "WORKFLOW_BLOCKED",
|
|
479
|
+
},
|
|
480
|
+
)
|
|
481
|
+
|
|
482
|
+
assert result["ok"] is True
|
|
483
|
+
paths = json.loads(checkpoint.read_text(encoding="utf-8"))["steps"][2]["authoritative_evidence_paths"]
|
|
484
|
+
assert paths["manifest"] == ".prizmkit/test/evidence/evidence-1/manifest.json"
|
|
485
|
+
assert paths["verdict"] == ".prizmkit/test/evidence/evidence-1/verdict.json"
|
|
486
|
+
assert paths["validation"] == ".prizmkit/test/evidence/evidence-1/validation.json"
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
443
490
|
def test_update_checkpoint_rejects_test_pass_when_validator_replay_fails(tmp_path, monkeypatch):
|
|
444
491
|
paths = _write_test_evidence(tmp_path)
|
|
445
492
|
payload = _family_checkpoint(
|
|
@@ -51,10 +51,8 @@ FORBIDDEN_THREE_STRIKE = "3-" + "strike"
|
|
|
51
51
|
FORBIDDEN_TWENTY_STEP = "20-" + "step window"
|
|
52
52
|
|
|
53
53
|
REVIEW_PROMPT_REQUIRED = (
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"skill-owned independent Reviewer",
|
|
57
|
-
"`review-report.md` is the only persisted review artifact",
|
|
54
|
+
"review-report.md",
|
|
55
|
+
"Final Result",
|
|
58
56
|
)
|
|
59
57
|
|
|
60
58
|
REVIEW_PROMPT_FORBIDDEN = (
|
|
@@ -1235,10 +1233,8 @@ class TestDirectOrchestratorImplementationPrompts:
|
|
|
1235
1233
|
assert FORBIDDEN_TEST_CMD_PLACEHOLDER not in rendered
|
|
1236
1234
|
assert FORBIDDEN_THREE_STRIKE not in rendered
|
|
1237
1235
|
assert FORBIDDEN_TWENTY_STEP not in rendered
|
|
1238
|
-
assert "
|
|
1239
|
-
assert "
|
|
1240
|
-
assert "strict structural capability gate" in rendered
|
|
1241
|
-
assert "skill-owned independent Reviewer" in rendered
|
|
1236
|
+
assert "review-report.md" in rendered
|
|
1237
|
+
assert "Final Result" in rendered
|
|
1242
1238
|
assert "low=0" not in rendered
|
|
1243
1239
|
assert "Reviewer 3" not in rendered
|
|
1244
1240
|
|
|
@@ -1273,7 +1269,7 @@ class TestDirectOrchestratorImplementationPrompts:
|
|
|
1273
1269
|
rendered = Path("dev-pipeline/templates/bootstrap-tier3.md").read_text(encoding="utf-8")
|
|
1274
1270
|
|
|
1275
1271
|
assert "/prizmkit-implement" in rendered
|
|
1276
|
-
assert "Implement —
|
|
1272
|
+
assert "Implement — Plan Execution" in rendered
|
|
1277
1273
|
assert "Spawn Dev subagent" not in rendered
|
|
1278
1274
|
assert "Spawn Dev agent" not in rendered
|
|
1279
1275
|
assert "Spawn Reviewer agent" not in rendered
|
|
@@ -1663,7 +1659,7 @@ class TestFeaturePromptUnifiedFullGuidance:
|
|
|
1663
1659
|
prompt = _render_feature_prompt(tmp_path / "fallback-tier3", mode="lite", complexity="low")
|
|
1664
1660
|
|
|
1665
1661
|
assert requested.index("bootstrap-tier3.md") < requested.index("bootstrap-prompt.md") if "bootstrap-prompt.md" in requested else True
|
|
1666
|
-
assert "# Dev-Pipeline Session Bootstrap —
|
|
1662
|
+
assert "# Dev-Pipeline Session Bootstrap — Full Guidance" in prompt
|
|
1667
1663
|
assert "bootstrap-tier1.md" not in requested
|
|
1668
1664
|
assert "bootstrap-tier2.md" not in requested
|
|
1669
1665
|
|
|
@@ -1931,9 +1927,8 @@ class TestHeadlessPromptCleanupF033:
|
|
|
1931
1927
|
refactor_prompt = _render_refactor_prompt(tmp_path / "refactor-mixed", platform="claude")
|
|
1932
1928
|
|
|
1933
1929
|
assert "{{" + "REVIEWER_" + "SUBAGENT_PATH" + "}}" not in replacements
|
|
1934
|
-
assert "
|
|
1935
|
-
assert "
|
|
1936
|
-
assert "skill-owned independent Reviewer" in refactor_prompt
|
|
1930
|
+
assert "review-report.md" in refactor_prompt
|
|
1931
|
+
assert "Final Result" in refactor_prompt
|
|
1937
1932
|
assert "Reviewer 3" not in refactor_prompt
|
|
1938
1933
|
|
|
1939
1934
|
def test_bugfix_refactor_explicit_codex_override(self, tmp_path, monkeypatch):
|
|
@@ -1955,9 +1950,8 @@ class TestHeadlessPromptCleanupF033:
|
|
|
1955
1950
|
refactor_prompt = _render_refactor_prompt(tmp_path / "refactor-codex", platform="claude", explicit_platform="codex")
|
|
1956
1951
|
|
|
1957
1952
|
assert "{{" + "REVIEWER_" + "SUBAGENT_PATH" + "}}" not in replacements
|
|
1958
|
-
assert "
|
|
1959
|
-
assert "
|
|
1960
|
-
assert "skill-owned independent Reviewer" in refactor_prompt
|
|
1953
|
+
assert "review-report.md" in refactor_prompt
|
|
1954
|
+
assert "Final Result" in refactor_prompt
|
|
1961
1955
|
assert "Reviewer 3" not in refactor_prompt
|
|
1962
1956
|
|
|
1963
1957
|
|
|
@@ -251,7 +251,9 @@ class TestHeadlessRecoveryReframing:
|
|
|
251
251
|
def test_bugfix_template_does_not_spawn_monitor_or_require_compact(self):
|
|
252
252
|
content = Path("dev-pipeline/templates/bugfix-bootstrap-prompt.md").read_text(encoding="utf-8")
|
|
253
253
|
|
|
254
|
-
assert "
|
|
254
|
+
assert "On execution-unit timeout, preserve the active checkout and artifacts" in content
|
|
255
|
+
assert "follow the owning contract's recovery or downgrade path" in content
|
|
256
|
+
assert "Do not spawn persistent background subagents for headless recovery" not in content
|
|
255
257
|
assert REMOVED_MAX_LOG_ENV not in content
|
|
256
258
|
assert REMOVED_MAX_LOG_HUMAN not in content
|
|
257
259
|
assert ("209" + "7152") not in content
|
|
@@ -1007,7 +1007,6 @@ def test_prompt_generation_result_preserves_per_item_model(monkeypatch, tmp_path
|
|
|
1007
1007
|
"checkpoint_path": str(paths.project_root / ".prizmkit" / "bugfix" / "B-001" / "workflow-checkpoint.json"),
|
|
1008
1008
|
"model": "per-item-model",
|
|
1009
1009
|
"pipeline_mode": "standard",
|
|
1010
|
-
"agent_count": 3,
|
|
1011
1010
|
}
|
|
1012
1011
|
),
|
|
1013
1012
|
stderr="",
|
|
@@ -1056,7 +1055,6 @@ def test_prompt_generation_passes_explicit_execution_root_to_generator(monkeypat
|
|
|
1056
1055
|
"checkpoint_path": str(execution_root / ".prizmkit" / "specs" / "001-low" / "workflow-checkpoint.json"),
|
|
1057
1056
|
"model": "",
|
|
1058
1057
|
"pipeline_mode": "full",
|
|
1059
|
-
"agent_count": 3,
|
|
1060
1058
|
}
|
|
1061
1059
|
),
|
|
1062
1060
|
stderr="",
|
|
@@ -1121,7 +1119,6 @@ def _install_runner_session_fakes(monkeypatch, runners, *, statuses=("success",)
|
|
|
1121
1119
|
output_path=session_paths.prompt_path,
|
|
1122
1120
|
model="per-item-model",
|
|
1123
1121
|
pipeline_mode="full",
|
|
1124
|
-
agent_count=3,
|
|
1125
1122
|
checkpoint_path=execution_root / ".prizmkit" / "specs" / "001-low" / "workflow-checkpoint.json",
|
|
1126
1123
|
artifact_path=execution_root / ".prizmkit" / "specs" / "001-low",
|
|
1127
1124
|
raw={},
|
|
@@ -1445,7 +1442,6 @@ def test_explicit_worktree_materializes_ignored_support_assets_before_prompt_and
|
|
|
1445
1442
|
output_path=session_paths.prompt_path,
|
|
1446
1443
|
model="",
|
|
1447
1444
|
pipeline_mode="full",
|
|
1448
|
-
agent_count=3,
|
|
1449
1445
|
checkpoint_path=execution_root / ".prizmkit" / "specs" / "001-support" / "workflow-checkpoint.json",
|
|
1450
1446
|
artifact_path=execution_root / ".prizmkit" / "specs" / "001-support",
|
|
1451
1447
|
raw={},
|
|
@@ -1910,8 +1906,7 @@ def test_foreground_runner_emits_structured_feature_progress(monkeypatch, tmp_pa
|
|
|
1910
1906
|
assert "Feature: F-001 — Readable output" in captured.err
|
|
1911
1907
|
assert "Code retry: 1 / 3" in captured.err
|
|
1912
1908
|
assert "Preflight: no user-visible changes to preserve before feature task F-001" in captured.err
|
|
1913
|
-
assert "Pipeline mode: full (
|
|
1914
|
-
assert "Agents: 3" in captured.err
|
|
1909
|
+
assert "Pipeline mode: full (Full Guidance)" in captured.err
|
|
1915
1910
|
assert "Spawning AI CLI session: F-001-session-1" in captured.err
|
|
1916
1911
|
assert "Session result: success" in captured.err
|
|
1917
1912
|
|
|
@@ -812,7 +812,7 @@ def test_session_preamble_writes_redacted_start_command_for_all_launch_profiles(
|
|
|
812
812
|
assert str(prompt) not in "\n".join(lines[:6])
|
|
813
813
|
|
|
814
814
|
|
|
815
|
-
def
|
|
815
|
+
def test_headless_review_guidance_defers_to_skill_review_contract():
|
|
816
816
|
headless_guidance_files = [
|
|
817
817
|
REPO_ROOT / "dev-pipeline" / "templates" / "sections" / "phase-review-full.md",
|
|
818
818
|
REPO_ROOT / "dev-pipeline" / "templates" / "bootstrap-tier3.md",
|
|
@@ -828,11 +828,9 @@ def test_headless_review_guidance_uses_main_agent_review_loop():
|
|
|
828
828
|
|
|
829
829
|
for path in headless_guidance_files:
|
|
830
830
|
text = path.read_text(encoding="utf-8")
|
|
831
|
-
assert "
|
|
832
|
-
assert "
|
|
831
|
+
assert "current review contract" in text, path
|
|
832
|
+
assert "second review path outside that contract" in text, path
|
|
833
833
|
assert "text final-verdict" in text, path
|
|
834
|
-
assert "strict structural capability gate" in text, path
|
|
835
|
-
assert "skill-owned independent Reviewer" in text, path
|
|
836
834
|
assert "low=0" not in text and "Reviewer 3" not in text, path
|
|
837
835
|
assert "forced-worktree changed-content fallback" not in text, path
|
|
838
836
|
assert "isolation:" not in text, path
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.1.
|
|
2
|
+
"version": "1.1.139",
|
|
3
3
|
"skills": {
|
|
4
4
|
"prizmkit": {
|
|
5
5
|
"description": "Framework introduction and navigation for the formal single-requirement lifecycle, project initialization, Prizm docs, and independent deployment.",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"hasScripts": false
|
|
73
73
|
},
|
|
74
74
|
"prizmkit-test": {
|
|
75
|
-
"description": "Mandatory post-review auditable test evidence with TEST_PASS/TEST_FAIL/TEST_BLOCKED verdicts, repair-scope routing,
|
|
75
|
+
"description": "Mandatory post-review auditable test evidence with TEST_PASS/TEST_FAIL/TEST_BLOCKED verdicts, repair-scope routing, current-workspace execution evidence, replay, and deterministic validation.",
|
|
76
76
|
"tier": "1",
|
|
77
77
|
"category": "prizmkit-skill",
|
|
78
78
|
"hasAssets": true,
|