prizmkit 1.1.127 → 1.1.129

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.
Files changed (50) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/claude/command-adapter.js +2 -75
  3. package/bundled/dev-pipeline/assets/skill-subagent-integration.md +14 -11
  4. package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +88 -58
  5. package/bundled/dev-pipeline/prizmkit_runtime/reset.py +4 -3
  6. package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +53 -1
  7. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +33 -17
  8. package/bundled/dev-pipeline/prizmkit_runtime/runtime_helper.py +0 -1
  9. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +28 -26
  10. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +1 -1
  11. package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +4 -3
  12. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +1 -1
  13. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +3 -3
  14. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +2 -2
  15. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +22 -21
  16. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +4 -4
  17. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +5 -5
  18. package/bundled/dev-pipeline/templates/sections/bugfix-mission.md +1 -1
  19. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +11 -4
  20. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +1 -1
  21. package/bundled/dev-pipeline/templates/sections/directory-convention-agent.md +3 -2
  22. package/bundled/dev-pipeline/templates/sections/directory-convention-full.md +3 -2
  23. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +1 -1
  24. package/bundled/dev-pipeline/templates/sections/phase-commit.md +1 -1
  25. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +1 -1
  26. package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +1 -1
  27. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +12 -5
  28. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +12 -5
  29. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +1 -1
  30. package/bundled/dev-pipeline/templates/sections/phase0-init.md +1 -1
  31. package/bundled/dev-pipeline/templates/sections/refactor-mission.md +1 -1
  32. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +13 -6
  33. package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +1 -1
  34. package/bundled/dev-pipeline/templates/sections/subagent-timeout-recovery.md +6 -4
  35. package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +1 -1
  36. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +106 -7
  37. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +139 -11
  38. package/bundled/dev-pipeline/tests/test_runtime_helper.py +9 -3
  39. package/bundled/dev-pipeline/tests/test_unified_cli.py +225 -24
  40. package/bundled/skills/_metadata.json +3 -3
  41. package/bundled/skills/feature-planner/SKILL.md +2 -2
  42. package/bundled/skills/prizmkit/SKILL.md +1 -1
  43. package/bundled/skills/prizmkit-code-review/SKILL.md +63 -122
  44. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +9 -36
  45. package/bundled/skills/prizmkit-code-review/scripts/render_review_report.py +21 -111
  46. package/package.json +1 -1
  47. package/src/manifest.js +8 -3
  48. package/src/scaffold.js +5 -16
  49. package/bundled/skills/prizmkit-code-review/assets/reviewer-role.json +0 -19
  50. package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +0 -120
@@ -1192,8 +1192,8 @@ def load_active_agent_prompts(templates_dir):
1192
1192
  """Load explicit active agent prompt templates.
1193
1193
 
1194
1194
  Retired Dev implementation, review-fix, and plan-challenge prompts are
1195
- intentionally not loaded; feature implementation and accepted review fixes
1196
- are performed by the main orchestrator and reviewer gate.
1195
+ intentionally not loaded; feature implementation, Code Review, and accepted
1196
+ review fixes are performed directly by the current Main Agent.
1197
1197
  """
1198
1198
  agent_prompts_dir = os.path.join(templates_dir, "agent-prompts")
1199
1199
  if not os.path.isdir(agent_prompts_dir):
@@ -1235,11 +1235,12 @@ def _tier_header(pipeline_mode):
1235
1235
  ),
1236
1236
  "full": (
1237
1237
  "# Dev-Pipeline Session Bootstrap — Tier 3 "
1238
- "(Orchestrator + Reviewer)\n",
1239
- "**Tier 3 — Orchestrator + Reviewer**: For complex "
1238
+ "(Main-Agent Full Guardrails)\n",
1239
+ "**Tier 3 — Main-Agent Full Guardrails**: For complex "
1240
1240
  "features, the main orchestrator handles context, planning, "
1241
- "and implementation directly. Reviewer reviews, and no top-level "
1242
- "Dev implementation subagent is spawned.\n",
1241
+ "implementation, and Code Review directly. No top-level Dev "
1242
+ "implementation subagent is spawned, and Code Review never uses "
1243
+ "direct or indirect delegation.\n",
1243
1244
  ),
1244
1245
  }
1245
1246
  return headers.get(pipeline_mode, headers["lite"])
@@ -1271,28 +1272,30 @@ def _tier_reminders(pipeline_mode):
1271
1272
  specific = [
1272
1273
  "- Tier 2: compatibility label only; feature prompts now render "
1273
1274
  "the unified full/tier3-equivalent guidance by default",
1274
- "- context-snapshot.md is append-only: orchestrator writes "
1275
- "Sections 1-4 + Implementation Log, Reviewer appends Review Notes",
1276
- "- Gate checks enforce Implementation Log (with Gate Evidence) "
1277
- "and Review Notes are written before proceeding",
1278
- "- Do NOT use `run_in_background=true` when spawning Reviewer",
1279
- "- On timeout: check snapshot + git diff HEAD → model:lite → "
1280
- "remaining steps only max 2 retries per phase "
1281
- "orchestrator fallback",
1275
+ "- context-snapshot.md is the implementation knowledge base; "
1276
+ "Code Review writes only review-report.md",
1277
+ "- Gate checks require the Implementation Log (with Gate Evidence) "
1278
+ "and a valid review-report.md Final Result before proceeding",
1279
+ "- Code Review runs only in the current Main Agent and never uses "
1280
+ "direct or indirect delegation",
1281
+ "- On timeout outside Code Review: check snapshot + git diff HEAD "
1282
+ " model:lite → remaining steps only → max 2 retries per phase → "
1283
+ "Main Agent fallback",
1282
1284
  ]
1283
1285
  else: # full
1284
1286
  specific = [
1285
- "- Tier 3: full orchestration — orchestrator implements "
1286
- "directly (no top-level Dev subagent), and Reviewer reviews",
1287
- "- context-snapshot.md is append-only: orchestrator writes "
1288
- "Sections 1-4 + Implementation Log, Reviewer appends "
1289
- "Review Notes",
1290
- "- Gate checks enforce Implementation Log and Review Notes are "
1291
- "written before proceeding",
1287
+ "- Tier 3: full orchestration — the Main Agent implements directly "
1288
+ "and owns the complete Code Review loop",
1289
+ "- context-snapshot.md is the implementation knowledge base; "
1290
+ "Code Review writes only review-report.md",
1291
+ "- Gate checks require the Implementation Log and a valid "
1292
+ "review-report.md Final Result before proceeding",
1293
+ "- Code Review is excluded from normal work delegation and never "
1294
+ "uses direct or indirect delegation or another review entry point",
1292
1295
  "- Do NOT use `run_in_background=true` when spawning normal work "
1293
- "agents",
1294
- "- If an Agent tool call fails with team/config/lock errors, retry "
1295
- "at most once; after a second failure, use the documented "
1296
+ "agents outside Code Review",
1297
+ "- If a normal work Agent call fails with team/config/lock errors, "
1298
+ "retry at most once; after a second failure, use the documented "
1296
1299
  "inline/recovery fallback or write `failure-log.md` rather than "
1297
1300
  "spawning variants or polling indefinitely",
1298
1301
  "- NEVER delete, modify, or touch any file under `.prizmkit/state/` "
@@ -1550,9 +1553,8 @@ def validate_rendered(content):
1550
1553
  # contain literal double braces like Jinja or Go templates)
1551
1554
  unreplaced = re.findall(r"\{\{[A-Z][A-Z_0-9]+\}\}", content)
1552
1555
  if unreplaced:
1553
- # Deduplicate
1554
1556
  unique = sorted(set(unreplaced))
1555
- warnings.append(
1557
+ errors.append(
1556
1558
  "Unreplaced placeholders: {}".format(", ".join(unique))
1557
1559
  )
1558
1560
 
@@ -356,7 +356,7 @@ def _bugfix_header(pipeline_mode):
356
356
  title = "# Dev-Pipeline Bug Fix Session Bootstrap — {}\n".format(pipeline_mode.title())
357
357
  desc = {
358
358
  "lite": "**Tier 1 — Single Agent**: direct root-cause fix by the main orchestrator.",
359
- "standard": "**Tier 2 — Orchestrator + Reviewer**: direct implementation with review gates.",
359
+ "standard": "**Tier 2 — Main-Agent Review Gates**: direct implementation with Main-Agent-only review gates.",
360
360
  "full": "**Tier 3 — Full Bugfix Guardrails**: direct implementation with stronger diagnosis and review gates.",
361
361
  }.get(pipeline_mode, "**Bugfix pipeline**")
362
362
  return title + "\n" + desc + "\n"
@@ -97,9 +97,10 @@ Implement the minimal fix (red → green):
97
97
  """\
98
98
  Verify fix quality:
99
99
  1. Run `/prizmkit-code-review` with the current bugfix artifact directory.
100
- 2. The Main Agent self-reviews for up to ten rounds; semantic risk limits independent Reviewers to low=0, medium=1, high=2.
101
- 3. Reviewer 2 requires an accepted high finding from Reviewer 1 plus repair, tests, and Main-Agent reconvergence; Reviewer 3 is forbidden.
102
- 4. Continue only after the report's last Final Result is valid; preserve append-only progress for recovery.""",
100
+ 2. The current Main Agent is the only Code Review executor. It reviews the complete current change for up to ten rounds, directly repairs accepted findings, and verifies repairs.
101
+ 3. Converge only when accepted and unresolved findings are both zero; missing required evidence or round-ten non-convergence produces NEEDS_FIXES.
102
+ 4. Do not delegate review directly or indirectly. Do not invoke another review skill or review workflow. Do not relabel delegated work as a finder, verifier, audit, compatibility review, verification, or gap sweep.
103
+ 5. `review-report.md` is the only persisted review artifact. Continue only after its last Final Result is valid; preserve append-only progress for recovery.""",
103
104
  ),
104
105
  6: (
105
106
  "User Verification",
@@ -377,7 +377,7 @@ def _refactor_header(pipeline_mode):
377
377
  title = "# Dev-Pipeline Refactor Session Bootstrap — {}\n".format(pipeline_mode.title())
378
378
  desc = {
379
379
  "lite": "**Tier 1 — Single Agent**: direct behavior-preserving refactor by the main orchestrator.",
380
- "standard": "**Tier 2 — Orchestrator + Reviewer**: direct refactor with review gates.",
380
+ "standard": "**Tier 2 — Main-Agent Review Gates**: direct refactor with Main-Agent-only review gates.",
381
381
  "full": "**Tier 3 — Full Refactor Guardrails**: direct refactor with stronger behavior-preservation evidence.",
382
382
  }.get(pipeline_mode, "**Refactor pipeline**")
383
383
  return title + "\n" + desc + "\n"
@@ -977,8 +977,8 @@ class ProgressTracker:
977
977
  self.errors.append(normalized_code)
978
978
 
979
979
  def _record_agent_tool_call(self, provider, tool_name, raw_args, *, source_event="tool_use", event_id=""):
980
- """Record Agent/TaskCreate tool calls as session-log subagent spawns."""
981
- if tool_name not in ("Agent", "TaskCreate"):
980
+ """Record delegated execution tool calls as session-log subagent spawns."""
981
+ if tool_name != "Agent":
982
982
  return
983
983
  if isinstance(raw_args, dict):
984
984
  args = raw_args
@@ -1019,7 +1019,7 @@ class ProgressTracker:
1019
1019
  )
1020
1020
 
1021
1021
  def _record_cb_agent_tool_call(self, tool_name, raw_args, *, event_id="", source_event="tool_use"):
1022
- """Record a CodeBuddy Agent/TaskCreate tool invocation for sub-agent tracking."""
1022
+ """Record a CodeBuddy delegated execution invocation for sub-agent tracking."""
1023
1023
  self._record_agent_tool_call(
1024
1024
  "codebuddy",
1025
1025
  tool_name,
@@ -30,7 +30,7 @@ Infer what needs to be done from the feature context above and follow the standa
30
30
 
31
31
  3. **Implement**: Run `/prizmkit-implement` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/` to execute the plan using TDD (write tests first, then implement).
32
32
 
33
- 4. **Review**: Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`. The Main Agent self-reviews for up to ten rounds; semantic risk then limits independent Reviewers to `low=0`, `medium=1`, `high=2`, with Reviewer 2 only after an accepted high finding is repaired and reconverged. Reviewer 3 is forbidden. Require the last `## Final Result` verdict before continuing.
33
+ 4. **Review**: Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`. The current Main Agent is the only Code Review executor. It reviews the complete current change for up to ten rounds, directly repairs accepted findings, verifies repairs, and converges when accepted and unresolved findings are both zero. Do not delegate review directly or indirectly, invoke another review skill/workflow, or relabel delegated work as a finder, verifier, audit, compatibility review, verification, or gap sweep. `review-report.md` is the only persisted review artifact. Require the last `## Final Result` verdict before continuing.
34
34
 
35
35
  5. **Test**: Run `/prizmkit-test scope=this-change artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/` to generate and verify tests only for this feature's changed scope after review. Do not use bugfix/refactor artifact directories for this gate.
36
36
 
@@ -44,7 +44,7 @@ Infer what needs to be done from the feature context above and follow the standa
44
44
  - Do NOT push to remote — the user will push manually.
45
45
  - Write all artifacts to `.prizmkit/specs/{{FEATURE_SLUG}}/`.
46
46
  - If a step fails after 3 attempts, write a status report and stop.
47
- - **Never re-read unmodified files**: once you read a file into context, do NOT read it again unless it was modified by an Edit/Write after your last read — use `grep -n`/`sed -n` for specific lines. Before issuing a Read, ask: "Have I read this file before, and has it changed since?" If no — do NOT read it. Reviewer subagents must rely on context-snapshot.md rather than re-reading files the orchestrator already read.
47
+ - **Never re-read unmodified files**: once you read a file into context, do NOT read it again unless it was modified by an Edit/Write after your last read — use `grep -n`/`sed -n` for specific lines. Before issuing a Read, ask: "Have I read this file before, and has it changed since?" If no — do NOT read it. Normal work delegation outside Code Review must rely on context-snapshot.md rather than re-reading files the Main Agent already read. Code Review runs only in the current Main Agent.
48
48
  - **Read offset safety**: if Read returns "shorter than offset"/"empty" — run `wc -l` then `sed -n`, do NOT retry same offset.
49
49
  - **Hard Round Cap**: after 6 total test-fix rounds, STOP trial-and-error. Switch to read-once-then-rewrite. Do NOT exceed 7 rounds.
50
50
  - **Layered test**: debug with single-file tests, only run full suite as gate when single-file is green.
@@ -1,4 +1,4 @@
1
- # Dev-Pipeline Session Bootstrap — Tier 3 (Orchestrator + Reviewer)
1
+ # Dev-Pipeline Session Bootstrap — Tier 3 (Main-Agent Full Guardrails)
2
2
 
3
3
  ## Session Context
4
4
 
@@ -10,12 +10,12 @@
10
10
 
11
11
  You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATURE_TITLE}}".
12
12
 
13
- **CRITICAL**: You MUST NOT exit until ALL work is complete and committed. When you spawn Reviewer agents, wait for each to finish (run_in_background=false). Do NOT spawn agents in background and exit — that kills the session.
13
+ **CRITICAL**: You MUST NOT exit until ALL work is complete and committed. Normal work delegation outside Code Review must finish before exit (`run_in_background=false`). Code Review never uses direct or indirect delegation.
14
14
 
15
- **Tier 3 — Orchestrator + Reviewer**: For complex features, the main orchestrator handles context, planning, and implementation directly. Do not spawn top-level Dev or Reviewer subagents; code review runs later through `/prizmkit-code-review`.
15
+ **Tier 3 — Main-Agent Full Guardrails**: For complex features, the Main Agent handles context, planning, implementation, and Code Review directly. Do not spawn a top-level Dev implementation subagent. Code Review runs through `/prizmkit-code-review` without direct or indirect delegation.
16
16
 
17
17
  **Agent spawn failure policy (all Agent tool calls)**:
18
- - If spawning Reviewer fails with team/config/lock errors, retry at most once.
18
+ - Code Review must not invoke another review skill/workflow or relabel delegated work as a finder, verifier, audit, compatibility review, verification, or gap sweep.
19
19
  - If the second attempt fails, do not keep spawning variants and do not enter artifact polling for Implementation Log, challenge report, or review report markers.
20
20
  - Use the documented inline/recovery fallback for that phase: write the required report yourself where possible, complete remaining work directly in the orchestrator when safe, or write `failure-log.md` with the spawn error and last observable state before stopping for recovery.
21
21
  - 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.
@@ -52,7 +52,7 @@ You are running in **headless non-interactive mode** with a FINITE context windo
52
52
 
53
53
  1. **context-snapshot.md is your single source of truth** — After Phase 1-2 makes it 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 a subagent.
54
54
  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.
55
- 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 including those summarized in context-snapshot.md Section 4. Reviewer subagents must receive context-snapshot.md and rely on it rather than independently re-reading the same files the orchestrator already read.
55
+ 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 including those summarized in context-snapshot.md Section 4. Normal work delegation outside Code Review must receive context-snapshot.md and rely on it rather than independently re-reading files the Main Agent already read. Code Review runs only in the current Main Agent.
56
56
  4. **Stay focused** — Do NOT explore code unrelated to this feature. No curiosity-driven reads.
57
57
  4. **One task at a time** — In Phase 4 (implement), complete and test one task before starting the next.
58
58
  5. **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.
@@ -67,12 +67,12 @@ You are running in **headless non-interactive mode** with a FINITE context windo
67
67
  ## PrizmKit Directory Convention
68
68
 
69
69
  ```
70
- .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← orchestrator writes Sections 1-4 + Implementation Log; Reviewer appends Review Notes
70
+ .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← Main Agent writes Sections 1-4 + Implementation Log
71
71
  .prizmkit/specs/{{FEATURE_SLUG}}/spec.md
72
72
  .prizmkit/specs/{{FEATURE_SLUG}}/plan.md ← includes Tasks section
73
73
  ```
74
74
 
75
- **`context-snapshot.md`** is the shared knowledge base. Orchestrator writes Sections 1-4 and the Implementation Log; Reviewer appends Review Notes. This eliminates redundant I/O across review and orchestration phases.
75
+ **`context-snapshot.md`** is the implementation knowledge base. The Main Agent writes Sections 1-4 and the Implementation Log. Code Review writes only `review-report.md` and never appends separate Review Notes.
76
76
 
77
77
  ---
78
78
 
@@ -80,7 +80,7 @@ You are running in **headless non-interactive mode** with a FINITE context windo
80
80
 
81
81
  If any agent times out:
82
82
  1. `{{RUNTIME_HELPER_CMD}} artifact list .prizmkit/specs/{{FEATURE_SLUG}}` — check what exists
83
- 2. If `context-snapshot.md` exists: open recovery prompt with `"Read .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md for project context and any Implementation Log/Review Notes from previous agents. 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"`
83
+ 2. If `context-snapshot.md` exists: open recovery prompt with `"Read .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md for project context and the Implementation Log from previous normal work execution. 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"`
84
84
  3. Max 2 retries per phase. After 2 failures, orchestrator completes the work directly and appends a Recovery Note to context-snapshot.md.
85
85
 
86
86
  ---
@@ -90,22 +90,21 @@ If any agent times out:
90
90
  {{IF_INIT_NEEDED}}
91
91
  ### Phase 0: Project Bootstrap
92
92
  - Run `/prizmkit-init` (invoke the prizmkit-init skill)
93
- - Run `{{PYTHON_CMD}} {{INIT_SCRIPT_PATH}} --project-root {{PROJECT_ROOT}} --feature-id {{FEATURE_ID}} --feature-slug {{FEATURE_SLUG}}`
93
+ - Run `{{PYTHON_CMD}} .prizmkit/dev-pipeline/scripts/init-change-artifact.py --project-root {{PROJECT_ROOT}} --feature-id {{FEATURE_ID}} --feature-slug {{FEATURE_SLUG}}`
94
94
  - **CP-0**: Verify `.prizmkit/prizm-docs/root.prizm`, `.prizmkit/config.json` exist
95
95
  {{END_IF_INIT_NEEDED}}
96
- {{IF_INIT_DONE}}
97
96
 
98
97
  ### Step 1: Initialize
99
98
 
100
99
  1. Run init script:
101
- `{{PYTHON_CMD}} {{INIT_SCRIPT_PATH}} --project-root {{PROJECT_ROOT}} --feature-id {{FEATURE_ID}} --feature-slug {{FEATURE_SLUG}}`
100
+ `{{PYTHON_CMD}} .prizmkit/dev-pipeline/scripts/init-change-artifact.py --project-root {{PROJECT_ROOT}} --feature-id {{FEATURE_ID}} --feature-slug {{FEATURE_SLUG}}`
102
101
 
103
102
  2. Check for existing artifacts:
104
103
  `{{RUNTIME_HELPER_CMD}} artifact exists .prizmkit/specs/{{FEATURE_SLUG}}`
105
104
 
106
105
  {{IF_FRESH_START}}
107
106
  ```bash
108
- {{PYTHON_CMD}} {{INIT_SCRIPT_PATH}} --project-root {{PROJECT_ROOT}} --feature-id {{FEATURE_ID}} --feature-slug {{FEATURE_SLUG}}
107
+ {{PYTHON_CMD}} .prizmkit/dev-pipeline/scripts/init-change-artifact.py --project-root {{PROJECT_ROOT}} --feature-id {{FEATURE_ID}} --feature-slug {{FEATURE_SLUG}}
109
108
  ```
110
109
  {{END_IF_FRESH_START}}
111
110
 
@@ -182,7 +181,7 @@ Before proceeding past CP-1, verify:
182
181
 
183
182
  ### Phase 3: Plan Self-Check — Orchestrator Direct
184
183
 
185
- Do not spawn a top-level Reviewer subagent for planning analysis. Perform a bounded self-check before implementation:
184
+ Do not delegate planning analysis. The current Main Agent performs a bounded self-check before implementation:
186
185
 
187
186
  1. Re-read only `context-snapshot.md`, `spec.md`, and `plan.md`.
188
187
  2. Cross-check spec.md and plan.md Tasks against the feature description and acceptance criteria.
@@ -208,7 +207,7 @@ Before starting, check plan.md Tasks:
208
207
  **3a.** Run `/prizmkit-implement` directly:
209
208
  - 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
210
209
  - 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
211
- - If implementation is delegated to a Dev subagent, the subagent must read `spec.md` if the artifact exists, plus `plan.md` and `context-snapshot.md`, before editing
210
+ - Implementation remains in the current Main Agent; do not delegate it to a Dev subagent
212
211
  - 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
213
212
  - Implements task-by-task, marking each `[x]` immediately
214
213
  - Remeber to update checkpoints after finishing a series of tasks
@@ -238,15 +237,17 @@ For each Verification Gate from the Task Contract, write one evidence line to Im
238
237
 
239
238
  ### Review — Code Review
240
239
 
241
- Review the completed implementation before the scoped feature test gate runs. Use `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/` so the code-review skill can read spec, plan, context snapshot, implementation log, and current diff artifacts. Do not require or read a prior `/prizmkit-test` report here; test generation and test-fix looping happen in the next phase.
240
+ 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 require or read a prior `/prizmkit-test` report here; test generation and test-fix looping happen in the next phase.
242
241
 
243
- Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`. The skill first runs a Main-Agent self-review loop for up to ten completed rounds, then semantic risk permits independent Reviewers at limits `low=0`, `medium=1`, `high=2`. High risk starts Reviewer 2 only after an accepted high finding was repaired, tested, and reconverged; Reviewer 3 is forbidden. The skill owns launch parameters, current-checkout preference, forced-worktree changed-content fallback, and append-only report progress.
242
+ Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`. The skill runs a Main-Agent review loop for up to ten completed rounds. The current Main Agent is the only Code Review executor: it directly reviews, repairs accepted findings, verifies repairs, and converges when accepted and unresolved findings are both zero.
243
+
244
+ The Code Review execution boundary is absolute: do not delegate review directly or indirectly. Do not invoke another review skill or review workflow. Do not relabel delegated work as a finder, verifier, audit, compatibility review, verification, or gap sweep. Direct reading, searching, editing, and testing by the current Main Agent remain allowed. `review-report.md` is the only persisted review artifact. Missing required evidence, unsafe repair, failed verification, or round-ten non-convergence produces `NEEDS_FIXES`.
244
245
 
245
246
  **Gate Check — Final Review Result**:
246
247
  ```bash
247
248
  {{RUNTIME_HELPER_CMD}} text final-verdict .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md
248
249
  ```
249
- Handle `REVIEW_PASS`, `REVIEW_NEEDS_FIXES`, and `REVIEW_BLOCKED` according to task policy. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` means review did not complete: inspect progress once, write `failure-log.md`, and stop. Do not accept old or incidental verdict text or synthesize a passing result through Main-Agent self-review.
250
+ Handle `REVIEW_PASS` and `REVIEW_NEEDS_FIXES` according to task policy. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` means review did not complete: inspect progress once, write `failure-log.md`, and stop. Do not accept old or incidental verdict text or synthesize a passing result through Main-Agent self-review.
250
251
 
251
252
  **CP-3**: Review has a valid Final Result and the report preserves this execution's progress.
252
253
 
@@ -266,7 +267,7 @@ Gate requirements:
266
267
  - Record unrelated historical gaps under `Out of Scope Gaps`; do not generate tests for them and do not fail this feature because of them.
267
268
  - Accept only a current-run `.prizmkit/test/*/test-report.md` whose `Scope` mode is `this-change`, whose `Artifact Dir` matches `.prizmkit/specs/{{FEATURE_SLUG}}/`, whose `Verdict` is `PASS`, whose `Boundary Completion Gate` reports `Completion gate passed: yes` with zero `Boundary-missing` and zero `Happy-path-only`, and whose `Boundary Validation` result is `passed`.
268
269
  - Only after a valid `PASS`, write the report path to `.prizmkit/specs/{{FEATURE_SLUG}}/test-report-path.txt` and append a 3-5 bullet `## PrizmKit Test Gate` summary to `context-snapshot.md`.
269
- - If the report verdict is `NEEDS_FIXES`, fix in-scope implementation/test issues and rerun `/prizmkit-test`. If the report is `BLOCKED`, missing, stale, or for the wrong scope/artifact dir, write `failure-log.md` and stop for recovery.
270
+ - If the report verdict is `NEEDS_FIXES`, fix in-scope implementation/test issues and rerun `/prizmkit-test`. If the report is missing, stale, invalid, or for the wrong scope/artifact dir, write `failure-log.md` and stop for recovery.
270
271
 
271
272
  {{IF_BROWSER_INTERACTION}}
272
273
  ### Phase 5.5: Browser Verification — MANDATORY
@@ -518,9 +519,9 @@ If you encounter an unrecoverable error, context overflow, or are about to exit
518
519
  ## Reminders
519
520
 
520
521
  - Tier 3: orchestrator implements directly; `/prizmkit-code-review` handles review later
521
- - context-snapshot.md is append-only: orchestrator writes Sections 1-4 + Implementation Log, Reviewer appends Review Notes
522
- - Gate checks enforce Implementation Log and Review Notes are written before proceeding
523
- - Do NOT use `run_in_background=true` when spawning Reviewer agents
522
+ - context-snapshot.md contains Main-Agent implementation context; Code Review writes only review-report.md
523
+ - Gate checks require the Implementation Log and a valid review-report.md Final Result before proceeding
524
+ - Code Review never uses direct or indirect delegation; normal work delegation outside review must not use `run_in_background=true`
524
525
  - Commit phase must use `/prizmkit-committer`; do NOT replace with manual git commit commands
525
526
  - **NEVER delete, modify, or touch any file under `.prizmkit/state/`** — those are pipeline runtime files managed by the runner
526
527
  - NEVER run `rm -rf`, `git clean`, or any destructive filesystem operations
@@ -180,15 +180,15 @@ After implement completes, verify:
180
180
  If `FAST_PATH=true` (≤ 2 tasks, obvious root cause), skip this phase entirely and mark checkpoint step `prizmkit-code-review` as `skipped` before continuing.
181
181
 
182
182
  Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`:
183
- - The skill first runs up to ten Main-Agent self-review rounds, then semantic risk limits independent Reviewers to `low=0`, `medium=1`, `high=2`
184
- - High risk starts Reviewer 2 only after an accepted high finding was repaired, tested, and reconverged; Reviewer 3 is forbidden
185
- - The skill preserves its independent Reviewer prompt and appends progress to `review-report.md`
183
+ - The skill runs up to ten Main-Agent review rounds, directly repairs accepted findings, and verifies each repair
184
+ - Missing required evidence, unsafe repair, failed verification, or round-ten non-convergence produces `NEEDS_FIXES`
185
+ - The skill appends Main-Agent review and repair progress to `review-report.md`
186
186
 
187
187
  **Gate Check — Final Review Result**:
188
188
  ```bash
189
189
  {{RUNTIME_HELPER_CMD}} text final-verdict .prizmkit/bugfix/{{BUG_ID}}/review-report.md
190
190
  ```
191
- Handle `REVIEW_PASS`, `REVIEW_NEEDS_FIXES`, and `REVIEW_BLOCKED` according to task policy. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` means review did not complete: inspect progress once, write `failure-log.md`, and stop. Do not accept stale verdict text or replace required independent review with Main-Agent self-review.
191
+ Handle `REVIEW_PASS` and `REVIEW_NEEDS_FIXES` according to task policy. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` means review did not complete: inspect progress once, write `failure-log.md`, and stop. Do not accept stale verdict text or replace required independent review with Main-Agent self-review.
192
192
 
193
193
  {{IF_BROWSER_INTERACTION}}
194
194
 
@@ -17,7 +17,7 @@ You are the **refactor session orchestrator**. Execute Refactor {{REFACTOR_ID}}:
17
17
 
18
18
  **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, and NEVER use interactive prompts. Resolve uncertainty from existing code, project docs, and conservative behavior-preserving defaults.
19
19
 
20
- **ORCHESTRATOR-DIRECT RULE**: Do not spawn top-level Dev or Reviewer subagents. The main orchestrator plans, implements via `/prizmkit-implement`, and runs `/prizmkit-code-review` directly.
20
+ **MAIN-AGENT-DIRECT RULE**: Do not spawn a top-level Dev implementation subagent. The Main Agent plans, implements via `/prizmkit-implement`, and runs `/prizmkit-code-review` directly without direct or indirect review delegation.
21
21
 
22
22
  **REFACTOR DOCUMENTATION POLICY**:
23
23
  - Default: run `/prizmkit-retrospective` with full sync because refactoring changes structure and interfaces.
@@ -139,7 +139,7 @@ Apply the browser behavior preservation protocol where UI behavior can be affect
139
139
 
140
140
  ### Phase 4: Review — Code Review & Behavior Verification
141
141
 
142
- Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/` directly from the main orchestrator. The skill first runs up to ten Main-Agent self-review rounds, then semantic risk limits independent Reviewers to `low=0`, `medium=1`, `high=2`. High risk starts Reviewer 2 only after an accepted high finding was repaired, tested, and reconverged; Reviewer 3 is forbidden.
142
+ Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/` directly from the main orchestrator. The skill runs up to ten Main-Agent review rounds, directly repairs accepted findings, and verifies each repair. Missing required evidence, unsafe repair, failed verification, or round-ten non-convergence produces `NEEDS_FIXES`.
143
143
 
144
144
  Review requirements:
145
145
  - verify refactor quality against spec.md and plan.md;
@@ -151,9 +151,9 @@ Review requirements:
151
151
  ```bash
152
152
  {{RUNTIME_HELPER_CMD}} text final-verdict .prizmkit/refactor/{{REFACTOR_ID}}/review-report.md
153
153
  ```
154
- Handle `REVIEW_PASS`, `REVIEW_NEEDS_FIXES`, and `REVIEW_BLOCKED` according to behavior-preservation policy. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` means review did not complete: inspect progress once, write `failure-log.md`, and stop. Do not accept stale verdict text or replace required independent review with Main-Agent self-review.
154
+ Handle `REVIEW_PASS` and `REVIEW_NEEDS_FIXES` according to behavior-preservation policy. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` means review did not complete: inspect progress once, write `failure-log.md`, and stop. Do not accept stale verdict text or replace required independent review with Main-Agent self-review.
155
155
 
156
- **Checkpoint update**: set step `prizmkit-code-review` to `completed` only for an accepted valid Final Result. Do not complete it for blocked, incomplete, or invalid reports.
156
+ **Checkpoint update**: set step `prizmkit-code-review` to `completed` only for an accepted valid Final Result. Do not complete it for incomplete or invalid reports.
157
157
 
158
158
  ---
159
159
 
@@ -249,7 +249,7 @@ Before exiting, write `{{SESSION_STATUS_PATH}}`:
249
249
  ## Reminders
250
250
 
251
251
  - Use L1 skills: `/prizmkit-plan`, `/prizmkit-implement`, `/prizmkit-code-review`, `/prizmkit-retrospective`, `/prizmkit-committer`.
252
- - Do not spawn top-level Dev or Reviewer subagents.
252
+ - Do not spawn a top-level Dev implementation subagent; Code Review runs only in the current Main Agent without delegation.
253
253
  - Behavior preservation is the first priority.
254
254
  - Browser verification is a mandatory attempt by default; it blocks only when explicitly required.
255
255
  - If `DEV_PORT` is unknown, discover it from project config; do not guess port 3000.
@@ -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**: You implement directly in the current checkout. Do not spawn a top-level Dev subagent. `/prizmkit-code-review` owns its internal Reviewer Agent filter orchestrator fix loop.
9
+ **Execution model**: You implement directly in the current checkout. Do not spawn a top-level Dev subagent. The current Main Agent runs `/prizmkit-code-review` directly and owns its complete review, repair, verification, and reporting loop without direct or indirect review delegation.
@@ -12,9 +12,17 @@ If `FAST_PATH=true`, skip this phase intentionally:
12
12
 
13
13
  Then continue to the next checkpoint step.
14
14
 
15
- Otherwise, run `/prizmkit-code-review` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`. The skill first runs a Main-Agent self-review loop for up to ten completed rounds, then semantic risk permits independent Reviewers at limits `low=0`, `medium=1`, `high=2`. High risk starts Reviewer 2 only after Reviewer 1 produced an accepted high finding that was repaired, tested, and reconverged. Reviewer 3 is forbidden.
15
+ Otherwise, run `/prizmkit-code-review` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`. The skill runs a Main-Agent review loop for up to ten completed rounds. The current Main Agent is the only Code Review executor: it reviews the complete current change, rejects unsupported candidate findings, directly repairs accepted findings, verifies repairs, and repeats until `accepted = 0` with no unresolved findings.
16
16
 
17
- The skill owns its unchanged independent Reviewer prompt, current-checkout preference, forced-worktree changed-content fallback, one bounded infrastructure retry per required Reviewer position, and append-only progress in `review-report.md`.
17
+ The Code Review execution boundary is absolute for this phase:
18
+
19
+ - Do not delegate any review work directly or indirectly.
20
+ - Do not invoke another review skill or review workflow.
21
+ - Do not use a general-purpose execution unit for review or relabel delegated work as a finder, verifier, audit, compatibility review, verification, or gap sweep.
22
+ - Direct reading, searching, editing, and testing by the current Main Agent remain allowed.
23
+ - `review-report.md` is the only persisted review artifact; do not append separate Review Notes to another artifact.
24
+
25
+ Missing required evidence, an unsafe repair, a failed verification, or failure to converge by round ten produces `NEEDS_FIXES`.
18
26
 
19
27
  **Gate Check — Final Review Result**:
20
28
 
@@ -24,7 +32,6 @@ The skill owns its unchanged independent Reviewer prompt, current-checkout prefe
24
32
 
25
33
  - `REVIEW_PASS` → proceed.
26
34
  - `REVIEW_NEEDS_FIXES` → log unresolved findings and proceed only when explicit task policy allows them.
27
- - `REVIEW_BLOCKED` → log infrastructure evidence and stop so recovery can retry.
28
- - `REVIEW_INCOMPLETE` or `REVIEW_INVALID` → inspect progress once, write `failure-log.md`, and stop. Do not accept old or incidental verdict text and do not replace required independent review with Main-Agent self-review.
35
+ - `REVIEW_INCOMPLETE` or `REVIEW_INVALID` inspect progress once, write `failure-log.md`, and stop. Do not accept old or incidental verdict text and do not synthesize a passing result outside the skill.
29
36
 
30
37
  **Checkpoint update**: Set step `prizmkit-code-review` to `completed` only for an accepted valid Final Result, or `skipped` for FAST_PATH.
@@ -6,7 +6,7 @@ You are running in **headless non-interactive mode** with a FINITE context windo
6
6
 
7
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 a subagent.
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 including those summarized in context-snapshot.md Section 4. Reviewer subagents must receive context-snapshot.md and rely on it rather than independently re-reading the same files the orchestrator already read.
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. Normal work delegation outside Code Review must receive context-snapshot.md and rely on it rather than independently re-reading files the Main Agent already read. Code Review is excluded from normal work delegation and runs only in the current Main Agent.
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,8 +1,9 @@
1
1
  ## PrizmKit Directory Convention
2
2
 
3
3
  ```
4
- .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← orchestrator writes Sections 1-4 + Implementation Log; Reviewer appends Review Notes
4
+ .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← Main Agent writes Sections 1-4 + Implementation Log
5
5
  .prizmkit/specs/{{FEATURE_SLUG}}/plan.md ← includes Tasks section
6
+ .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md ← Main Agent writes Code Review progress and Final Result
6
7
  ```
7
8
 
8
- **`context-snapshot.md`** is the shared knowledge base. Orchestrator writes Sections 1-4 and the Implementation Log; Reviewer appends Review Notes. Append-only after initial creation.
9
+ **`context-snapshot.md`** is the implementation knowledge base and remains append-only after initial creation. Code Review writes only `review-report.md`; it does not append separate Review Notes to the context snapshot.
@@ -1,9 +1,10 @@
1
1
  ## PrizmKit Directory Convention
2
2
 
3
3
  ```
4
- .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← orchestrator writes Sections 1-4 + Implementation Log; Reviewer appends Review Notes
4
+ .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md ← Main Agent writes Sections 1-4 + Implementation Log
5
5
  .prizmkit/specs/{{FEATURE_SLUG}}/spec.md
6
6
  .prizmkit/specs/{{FEATURE_SLUG}}/plan.md ← includes Tasks section
7
+ .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md ← Main Agent writes Code Review progress and Final Result
7
8
  ```
8
9
 
9
- **`context-snapshot.md`** is the shared knowledge base. Orchestrator writes Sections 1-4 and the Implementation Log; Reviewer appends Review Notes. This eliminates redundant I/O across review and orchestration phases.
10
+ **`context-snapshot.md`** is the implementation knowledge base. The Main Agent writes Sections 1-4 and the Implementation Log. Code Review writes only `review-report.md`; it does not append separate Review Notes to the context snapshot.
@@ -72,4 +72,4 @@ After all of the following are true, the session is **TERMINAL**:
72
72
  - `.prizmkit/specs/{{FEATURE_SLUG}}/completion-summary.json` is written
73
73
  - the `prizmkit-committer` checkpoint is marked `completed`
74
74
 
75
- At that point, stop immediately. Do **not** process delayed teammate/reviewer findings, do **not** edit files, do **not** amend the commit, and do **not** start any new tool calls. Any findings that arrive after S09 is completed are follow-up work for a later session, not part of this feature commit.
75
+ At that point, stop immediately. Do **not** process delayed normal-work results, edit files, amend the commit, or start any new tool calls. Code Review cannot have delayed delegated findings because it runs only in the current Main Agent. Any normal-work result that arrives after S09 is completed is follow-up work for a later session, not part of this feature commit.
@@ -58,4 +58,4 @@ After all of the following are true, the session is **TERMINAL**:
58
58
  - `.prizmkit/specs/{{FEATURE_SLUG}}/completion-summary.json` is written
59
59
  - the `prizmkit-committer` checkpoint is marked `completed`
60
60
 
61
- At that point, stop immediately. Do **not** process delayed teammate/reviewer findings, do **not** edit files, do **not** amend the commit, and do **not** start any new tool calls. Any findings that arrive after S09 is completed are follow-up work for a later session, not part of this feature commit.
61
+ At that point, stop immediately. Do **not** process delayed normal-work results, edit files, amend the commit, or start any new tool calls. Code Review cannot have delayed delegated findings because it runs only in the current Main Agent. Any normal-work result that arrives after S09 is completed is follow-up work for a later session, not part of this feature commit.
@@ -14,7 +14,7 @@ Before starting, check plan.md Tasks:
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
- - If implementation is delegated to a Dev subagent, the subagent must read `spec.md` if the artifact exists, plus `plan.md` and `context-snapshot.md`, before editing
17
+ - Implementation remains in the current Main Agent; do not delegate it to a Dev subagent
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
  - Remeber to update checkpoints after finishing a series of tasks
@@ -14,7 +14,7 @@ Before starting, check plan.md Tasks:
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
- - If implementation is delegated to a Dev subagent, the subagent must read `spec.md` if the artifact exists, plus `plan.md` and `context-snapshot.md`, before editing
17
+ - Implementation remains in the current Main Agent; do not delegate it to a Dev subagent
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
  - Remeber to update checkpoints after finishing a series of tasks
@@ -1,10 +1,18 @@
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 the code-review skill can read spec, plan, context snapshot, implementation log, and current diff artifacts. Do not require a prior `/prizmkit-test` report here; the next phase owns the formal test gate.
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 require a prior `/prizmkit-test` report here; the next phase owns the formal test gate.
4
4
 
5
- Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`. The skill first runs a Main-Agent self-review loop for up to ten completed rounds, then semantic risk permits independent Reviewers at limits `low=0`, `medium=1`, `high=2`. High risk starts Reviewer 2 only after Reviewer 1 produced an accepted high finding that was repaired, tested, and reconverged. Reviewer 3 is forbidden.
5
+ Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`. The skill runs a Main-Agent review loop for up to ten completed rounds. The current Main Agent is the only Code Review executor: it reviews the complete current change, rejects unsupported candidate findings, directly repairs accepted findings, verifies repairs, and repeats until `accepted = 0` with no unresolved findings.
6
6
 
7
- The skill owns Reviewer launch parameters, current-checkout preference, forced-worktree changed-content fallback, one bounded infrastructure retry per required Reviewer position, and append-only progress in `review-report.md`.
7
+ The Code Review execution boundary is absolute for this phase:
8
+
9
+ - Do not delegate any review work directly or indirectly.
10
+ - Do not invoke another review skill or review workflow.
11
+ - Do not use a general-purpose execution unit for review or relabel delegated work as a finder, verifier, audit, compatibility review, verification, or gap sweep.
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`.
8
16
 
9
17
  **Gate Check — Final Review Result**:
10
18
 
@@ -16,8 +24,7 @@ Handle the marker:
16
24
 
17
25
  - `REVIEW_PASS` → proceed to next phase.
18
26
  - `REVIEW_NEEDS_FIXES` → log unresolved findings and follow the task failure policy; do not externally restart the review loop.
19
- - `REVIEW_BLOCKED` → log infrastructure evidence and stop so recovery can retry.
20
- - `REVIEW_INCOMPLETE` or `REVIEW_INVALID` → inspect the append-only progress once, write `failure-log.md`, and stop. Do not treat an old or incidental verdict as completion and do not synthesize a passing result through Main-Agent self-review.
27
+ - `REVIEW_INCOMPLETE` or `REVIEW_INVALID` inspect the append-only progress once, write `failure-log.md`, and stop. Do not treat an old or incidental verdict as completion and do not synthesize a passing result outside the skill.
21
28
 
22
29
  **CP-3**: Review has a valid Final Result and `review-report.md` preserves this execution's progress.
23
30
 
@@ -1,10 +1,18 @@
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 the code-review skill can read spec, plan, context snapshot, implementation log, and current diff artifacts. Do not require a prior `/prizmkit-test` report here; the next phase owns the formal test gate.
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 require a prior `/prizmkit-test` report here; the next phase owns the formal test gate.
4
4
 
5
- Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`. The skill first runs a Main-Agent self-review loop for up to ten completed rounds, then semantic risk permits independent Reviewers at limits `low=0`, `medium=1`, `high=2`. High risk starts Reviewer 2 only after Reviewer 1 produced an accepted high finding that was repaired, tested, and reconverged. Reviewer 3 is forbidden.
5
+ Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`. The skill runs a Main-Agent review loop for up to ten completed rounds. The current Main Agent is the only Code Review executor: it reviews the complete current change, rejects unsupported candidate findings, directly repairs accepted findings, verifies repairs, and repeats until `accepted = 0` with no unresolved findings.
6
6
 
7
- The skill owns Reviewer launch parameters, current-checkout preference, forced-worktree changed-content fallback, one bounded infrastructure retry per required Reviewer position, and append-only progress in `review-report.md`.
7
+ The Code Review execution boundary is absolute for this phase:
8
+
9
+ - Do not delegate any review work directly or indirectly.
10
+ - Do not invoke another review skill or review workflow.
11
+ - Do not use a general-purpose execution unit for review or relabel delegated work as a finder, verifier, audit, compatibility review, verification, or gap sweep.
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`.
8
16
 
9
17
  **Gate Check — Final Review Result**:
10
18
 
@@ -16,8 +24,7 @@ Handle the marker:
16
24
 
17
25
  - `REVIEW_PASS` → proceed to next phase.
18
26
  - `REVIEW_NEEDS_FIXES` → log unresolved findings and follow the task failure policy; do not externally restart the review loop.
19
- - `REVIEW_BLOCKED` → log infrastructure evidence and stop so recovery can retry.
20
- - `REVIEW_INCOMPLETE` or `REVIEW_INVALID` → inspect the append-only progress once, write `failure-log.md`, and stop. Do not treat an old or incidental verdict as completion and do not synthesize a passing result through Main-Agent self-review.
27
+ - `REVIEW_INCOMPLETE` or `REVIEW_INVALID` inspect the append-only progress once, write `failure-log.md`, and stop. Do not treat an old or incidental verdict as completion and do not synthesize a passing result outside the skill.
21
28
 
22
29
  **CP-3**: Review has a valid Final Result and `review-report.md` preserves this execution's progress.
23
30