prizmkit 1.1.190 → 1.1.192

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 (189) hide show
  1. package/bin/create-prizmkit.js +4 -4
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/adapters/antigravity/assets/prizmkit-hook.cjs +150 -0
  4. package/bundled/adapters/antigravity/hooks-adapter.js +195 -0
  5. package/bundled/adapters/antigravity/paths.js +14 -0
  6. package/bundled/adapters/antigravity/rules-adapter.js +54 -0
  7. package/bundled/adapters/antigravity/skill-adapter.js +38 -0
  8. package/bundled/adapters/codex/skill-adapter.js +28 -8
  9. package/bundled/adapters/cursor/skill-adapter.js +13 -4
  10. package/bundled/adapters/pi/skill-adapter.js +28 -7
  11. package/bundled/dev-pipeline/.env.example +4 -12
  12. package/bundled/dev-pipeline/README.md +21 -15
  13. package/bundled/dev-pipeline/assets/skill-subagent-integration.md +3 -6
  14. package/bundled/dev-pipeline/prizmkit_runtime/atomic_io.py +48 -0
  15. package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +66 -23
  16. package/bundled/dev-pipeline/prizmkit_runtime/cli.py +10 -7
  17. package/bundled/dev-pipeline/prizmkit_runtime/commands.py +2 -21
  18. package/bundled/dev-pipeline/prizmkit_runtime/config.py +29 -70
  19. package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +125 -67
  20. package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +89 -442
  21. package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +93 -49
  22. package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -3
  23. package/bundled/dev-pipeline/prizmkit_runtime/paths.py +0 -6
  24. package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +49 -18
  25. package/bundled/dev-pipeline/prizmkit_runtime/processes.py +206 -151
  26. package/bundled/dev-pipeline/prizmkit_runtime/reset.py +2 -23
  27. package/bundled/dev-pipeline/prizmkit_runtime/reset_preserve.py +15 -134
  28. package/bundled/dev-pipeline/prizmkit_runtime/results.py +25 -0
  29. package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +68 -83
  30. package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +15 -5
  31. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +1 -29
  32. package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +0 -2
  33. package/bundled/dev-pipeline/prizmkit_runtime/runner_status.py +7 -2
  34. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +282 -217
  35. package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +124 -122
  36. package/bundled/dev-pipeline/prizmkit_runtime/runtime_helper.py +90 -9
  37. package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +369 -154
  38. package/bundled/dev-pipeline/prizmkit_runtime/status.py +3 -3
  39. package/bundled/dev-pipeline/prizmkit_runtime/stream_progress.py +2780 -0
  40. package/bundled/dev-pipeline/prizmkit_runtime/task_checkout.py +27 -101
  41. package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +58 -4
  42. package/bundled/dev-pipeline/scripts/check-session-status.py +43 -19
  43. package/bundled/dev-pipeline/scripts/continuation.py +6 -4
  44. package/bundled/dev-pipeline/scripts/detect-stuck.py +28 -28
  45. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +7 -2
  46. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +7 -2
  47. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +10 -7
  48. package/bundled/dev-pipeline/scripts/init-change-artifact.py +8 -2
  49. package/bundled/dev-pipeline/scripts/init-pipeline.py +14 -69
  50. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +31 -2328
  51. package/bundled/dev-pipeline/scripts/patch-completion-notes.py +4 -24
  52. package/bundled/dev-pipeline/scripts/prompt_framework.py +56 -9
  53. package/bundled/dev-pipeline/scripts/status_common.py +591 -0
  54. package/bundled/dev-pipeline/scripts/update-bug-status.py +85 -463
  55. package/bundled/dev-pipeline/scripts/update-checkpoint.py +227 -65
  56. package/bundled/dev-pipeline/scripts/update-feature-status.py +76 -509
  57. package/bundled/dev-pipeline/scripts/utils.py +10 -15
  58. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +4 -4
  59. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +7 -0
  60. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +1 -1
  61. package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +1 -1
  62. package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +1 -1
  63. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
  64. package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +2 -1
  65. package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +1 -1
  66. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +1 -1
  67. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-opencli.md +2 -2
  68. package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +2 -2
  69. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +2 -1
  70. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +1 -1
  71. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -6
  72. package/bundled/dev-pipeline/templates/session-status-schema.json +2 -5
  73. package/bundled/dev-pipeline/tests/_helpers.py +418 -0
  74. package/bundled/dev-pipeline/tests/conftest.py +45 -1
  75. package/bundled/dev-pipeline/tests/live_ai_cli_log_smoke.py +1 -0
  76. package/bundled/dev-pipeline/tests/test_auto_skip.py +4 -69
  77. package/bundled/dev-pipeline/tests/test_checkpoint_state.py +126 -1
  78. package/bundled/dev-pipeline/tests/test_daemon_and_scripts.py +257 -0
  79. package/bundled/dev-pipeline/tests/test_e2e_pipeline_run.py +500 -0
  80. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +59 -117
  81. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +12 -10
  82. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +561 -3094
  83. package/bundled/dev-pipeline/tests/test_recovery_workflow.py +7 -8
  84. package/bundled/dev-pipeline/tests/test_repository_bootstrap.py +0 -1
  85. package/bundled/dev-pipeline/tests/test_reset_modes.py +15 -27
  86. package/bundled/dev-pipeline/tests/test_reset_preserve.py +54 -139
  87. package/bundled/dev-pipeline/tests/test_runner_bookkeeping.py +766 -0
  88. package/bundled/dev-pipeline/tests/test_runner_lifecycle.py +1257 -0
  89. package/bundled/dev-pipeline/tests/test_runtime_helper.py +97 -20
  90. package/bundled/dev-pipeline/tests/test_session_launch.py +1101 -0
  91. package/bundled/dev-pipeline/tests/test_stream_progress.py +585 -0
  92. package/bundled/dev-pipeline/tests/test_unified_cli.py +490 -2006
  93. package/bundled/dev-pipeline/tests/test_utils.py +3 -3
  94. package/bundled/rules/USAGE.md +1 -0
  95. package/bundled/skills/_metadata.json +9 -63
  96. package/bundled/skills/app-planner/SKILL.md +32 -303
  97. package/bundled/skills/app-planner/references/app-design-guide.md +0 -4
  98. package/bundled/skills/app-planner/references/generated-plan-review.md +2 -1
  99. package/bundled/skills/app-planner/references/project-brief-guide.md +14 -0
  100. package/bundled/skills/app-planner/references/project-conventions-discovery.md +4 -6
  101. package/bundled/skills/app-planner/references/project-state-detection.md +2 -3
  102. package/bundled/skills/bug-fix-workflow/SKILL.md +1 -2
  103. package/bundled/skills/bug-fix-workflow/references/bug-diagnosis.md +4 -7
  104. package/bundled/skills/bug-planner/SKILL.md +54 -435
  105. package/bundled/skills/bug-planner/references/generated-plan-review.md +3 -2
  106. package/bundled/skills/bug-planner/references/input-formats.md +32 -0
  107. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +4 -6
  108. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +4 -28
  109. package/bundled/skills/feature-pipeline-launcher/SKILL.md +4 -6
  110. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +4 -28
  111. package/bundled/skills/feature-planner/SKILL.md +60 -439
  112. package/bundled/skills/feature-planner/assets/planning-guide.md +1 -1
  113. package/bundled/skills/feature-planner/references/completeness-review.md +34 -0
  114. package/bundled/skills/feature-planner/references/decomposition-patterns.md +2 -2
  115. package/bundled/skills/feature-planner/references/error-recovery.md +1 -1
  116. package/bundled/skills/feature-planner/references/generated-plan-review.md +3 -2
  117. package/bundled/skills/feature-planner/references/incremental-feature-planning.md +3 -1
  118. package/bundled/skills/feature-workflow/SKILL.md +1 -2
  119. package/bundled/skills/prizmkit/SKILL.md +7 -1
  120. package/bundled/skills/prizmkit-code-review/SKILL.md +14 -6
  121. package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +7 -4
  122. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +16 -0
  123. package/bundled/skills/prizmkit-code-review/scripts/render_review_report.py +58 -20
  124. package/bundled/skills/prizmkit-implement/SKILL.md +1 -1
  125. package/bundled/skills/prizmkit-init/SKILL.md +25 -128
  126. package/bundled/skills/prizmkit-init/assets/project-brief-template.md +3 -3
  127. package/bundled/skills/prizmkit-init/references/config-schema.md +2 -2
  128. package/bundled/skills/prizmkit-plan/SKILL.md +6 -8
  129. package/bundled/skills/prizmkit-plan/references/clarify-guide.md +1 -1
  130. package/bundled/skills/prizmkit-plan/references/independent-plan-review.md +5 -2
  131. package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +6 -5
  132. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +1 -13
  133. package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +1 -1
  134. package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +1 -1
  135. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +1 -1
  136. package/bundled/skills/prizmkit-retrospective/SKILL.md +6 -4
  137. package/bundled/skills/prizmkit-test/SKILL.md +25 -133
  138. package/bundled/skills/prizmkit-test/references/independent-test-review.md +5 -2
  139. package/bundled/skills/prizmkit-test/references/test-coverage-model.md +6 -0
  140. package/bundled/skills/prizmkit-workflow/SKILL.md +2 -3
  141. package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +4 -3
  142. package/bundled/skills/recovery-workflow/SKILL.md +7 -7
  143. package/bundled/skills/recovery-workflow/evals/evals.json +1 -1
  144. package/bundled/skills/recovery-workflow/references/detection.md +1 -3
  145. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +0 -6
  146. package/bundled/templates/project-memory-template.md +1 -2
  147. package/package.json +1 -1
  148. package/src/ai-cli-launch.js +1 -1
  149. package/src/clean.js +40 -4
  150. package/src/config.js +64 -4
  151. package/src/detect-platform.js +10 -6
  152. package/src/external-skills.js +2 -2
  153. package/src/index.js +1 -0
  154. package/src/manifest.js +1 -1
  155. package/src/platforms.js +6 -2
  156. package/src/prompts.js +11 -3
  157. package/src/scaffold.js +87 -11
  158. package/src/upgrade.js +9 -3
  159. package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +0 -53
  160. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +0 -649
  161. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +0 -463
  162. package/bundled/dev-pipeline/scripts/update-refactor-status.py +0 -1512
  163. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +0 -240
  164. package/bundled/dev-pipeline/templates/refactor-list-schema.json +0 -266
  165. package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +0 -15
  166. package/bundled/dev-pipeline/templates/sections/refactor-mission.md +0 -9
  167. package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +0 -24
  168. package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +0 -16
  169. package/bundled/dev-pipeline/templates/sections/refactor-phase-init.md +0 -9
  170. package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +0 -22
  171. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +0 -19
  172. package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +0 -24
  173. package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +0 -12
  174. package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +0 -6
  175. package/bundled/dev-pipeline/templates/sections/refactor-task-contract.md +0 -52
  176. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +0 -478
  177. package/bundled/skills/feature-planner/assets/evaluation-guide.md +0 -44
  178. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +0 -219
  179. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +0 -78
  180. package/bundled/skills/refactor-planner/SKILL.md +0 -467
  181. package/bundled/skills/refactor-planner/assets/planning-guide.md +0 -291
  182. package/bundled/skills/refactor-planner/references/behavior-preservation.md +0 -187
  183. package/bundled/skills/refactor-planner/references/error-recovery.md +0 -45
  184. package/bundled/skills/refactor-planner/references/fast-path.md +0 -59
  185. package/bundled/skills/refactor-planner/references/generated-plan-review.md +0 -107
  186. package/bundled/skills/refactor-planner/references/planning-phases.md +0 -172
  187. package/bundled/skills/refactor-planner/references/refactor-scoping-guide.md +0 -230
  188. package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +0 -1120
  189. package/bundled/skills/refactor-workflow/SKILL.md +0 -205
@@ -16,6 +16,7 @@ _PIPELINE_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
16
16
  if _PIPELINE_ROOT not in sys.path:
17
17
  sys.path.insert(0, _PIPELINE_ROOT)
18
18
 
19
+ from prizmkit_runtime.atomic_io import write_json_atomic # noqa: E402
19
20
  from prizmkit_runtime.checkpoint_state import ( # noqa: E402
20
21
  read_checkpoint_cursor as shared_read_checkpoint_cursor,
21
22
  )
@@ -77,22 +78,14 @@ def load_json_file(path):
77
78
 
78
79
 
79
80
  def write_json_file(path, data):
80
- """Write data as JSON to a file. Creates parent directories if needed.
81
+ """Write data as JSON atomically. Creates parent directories if needed.
81
82
 
82
83
  Returns an error string on failure, None on success.
83
84
  """
84
85
  abs_path = os.path.abspath(path)
85
- parent = os.path.dirname(abs_path)
86
- if parent and not os.path.isdir(parent):
87
- try:
88
- os.makedirs(parent, exist_ok=True)
89
- except OSError as e:
90
- return "Cannot create directory: {}".format(str(e))
91
86
  try:
92
- with open(abs_path, "w", encoding="utf-8") as f:
93
- json.dump(data, f, indent=2, ensure_ascii=False)
94
- f.write("\n")
95
- except IOError as e:
87
+ write_json_atomic(abs_path, data)
88
+ except (OSError, TypeError, ValueError) as e:
96
89
  return "Cannot write file: {}".format(str(e))
97
90
  return None
98
91
 
@@ -435,7 +428,7 @@ def error_out(message, code=1):
435
428
 
436
429
 
437
430
  def read_checkpoint_system_section(script_dir):
438
- """Read the shared checkpoint prompt section for feature/bugfix/refactor prompts."""
431
+ """Read the shared checkpoint prompt section for feature/bugfix prompts."""
439
432
  path = os.path.join(
440
433
  os.path.abspath(script_dir), "..", "templates", "sections", "checkpoint-system.md"
441
434
  )
@@ -914,8 +907,8 @@ def resolve_prompt_platform(project_root):
914
907
  if resolution.platform:
915
908
  return resolution.platform
916
909
  raise RuntimeError(
917
- "PrizmKit platform skills not found. None of .claude/commands/, .agents/skills/, .codebuddy/skills/, .pi/skills/, or .cursor/skills/ exists. "
918
- "Run `npx prizmkit install` first, set .prizmkit/config.json ai_cli/platform, or set PRIZMKIT_PLATFORM=claude|codex|codebuddy|pi|cursor explicitly."
910
+ "PrizmKit platform skills not found. None of .claude/commands/, .agents/skills/, .codebuddy/skills/, .pi/skills/, .cursor/skills/, or .agents/plugins/prizmkit/skills/ exists. "
911
+ "Run `npx prizmkit install` first, set .prizmkit/config.json ai_cli/platform, or set PRIZMKIT_PLATFORM=claude|codex|codebuddy|pi|cursor|antigravity explicitly."
919
912
  )
920
913
 
921
914
  def read_platform_conventions(project_root):
@@ -934,6 +927,8 @@ def read_platform_conventions(project_root):
934
927
  candidates = ["CODEBUDDY.md", "CLAUDE.md", "AGENTS.md"]
935
928
  elif platform in {"codex", "cursor"}:
936
929
  candidates = ["AGENTS.md", "CLAUDE.md", "CODEBUDDY.md"]
930
+ elif platform == "antigravity":
931
+ candidates = ["GEMINI.md", "AGENTS.md", "CLAUDE.md", "CODEBUDDY.md"]
937
932
  else:
938
933
  candidates = ["CLAUDE.md", "CODEBUDDY.md", "AGENTS.md"]
939
934
 
@@ -942,7 +937,7 @@ def read_platform_conventions(project_root):
942
937
  if os.path.isfile(filepath):
943
938
  return "`{}`".format(filename)
944
939
 
945
- return "(No project conventions file found — AGENTS.md, CLAUDE.md, or CODEBUDDY.md)"
940
+ return "(No project conventions file found — AGENTS.md, GEMINI.md, CLAUDE.md, or CODEBUDDY.md)"
946
941
 
947
942
 
948
943
  def read_checkpoint_cursor(checkpoint_path):
@@ -238,7 +238,7 @@ Invoke `/prizmkit-code-review` with the exact artifact root, spec, plan, and com
238
238
  {{RUNTIME_HELPER_CMD}} text final-verdict .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md
239
239
  ```
240
240
 
241
- Only `REVIEW_PASS` can proceed to configured verification and the structured Feature test gate. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` writes `failure-log.md` and stops.
241
+ Only `REVIEW_PASS` can proceed to configured verification and the structured Feature test gate. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` marks checkpoint step `prizmkit-code-review` `failed` with `--terminal-status WORKFLOW_BLOCKED` (omitting `--stage-result`), writes `failure-log.md`, and stops.
242
242
 
243
243
  {{IF_BROWSER_INTERACTION}}
244
244
  ### Phase 5.5: Browser Verification — MANDATORY
@@ -254,7 +254,7 @@ You MUST execute this phase. Do NOT skip it.
254
254
  - You MUST use `playwright-cli` (the CLI tool) for ALL browser interactions in this phase
255
255
  - **NEVER** use Playwright MCP server, Playwright MCP tools, or any MCP-based browser automation
256
256
  - If you have Playwright MCP configured, IGNORE it entirely — use the CLI command `playwright-cli` exclusively
257
- - All browser actions go through `playwright-cli <command>` in the Bash tool, not through any MCP tool call
257
+ - All browser actions go through `playwright-cli <command>` via the shell/terminal command tool, not through any MCP tool call
258
258
 
259
259
  **Step 0 — Playwright CLI Readiness Check (BLOCKING — must pass before any browser action)**:
260
260
 
@@ -317,7 +317,7 @@ Construct your verification workflow based on: (1) the playwright-cli skill docu
317
317
 
318
318
  **CRITICAL CONSTRAINT — opencli browser ONLY**:
319
319
  - You MUST use `opencli browser` for ALL browser interactions in this phase
320
- - All browser actions go through `opencli browser <command>` in the Bash tool
320
+ - All browser actions go through `opencli browser <command>` via the shell/terminal command tool
321
321
 
322
322
  **Step 0 — OpenCLI Readiness Check (BLOCKING)**:
323
323
 
@@ -392,7 +392,7 @@ Append results to `context-snapshot.md`:
392
392
  Browser blocking policy: `{{BROWSER_BLOCKING}}`.
393
393
 
394
394
  If verification fails:
395
- - If `{{BROWSER_BLOCKING}}` is `true`: mark checkpoint step `browser-verification` as `failed`, write `failure-log.md` with browser evidence, clean up the dev server/browser, and stop before commit.
395
+ - If `{{BROWSER_BLOCKING}}` is `true`: update checkpoint step `browser-verification` to failed with terminal `WORKFLOW_BLOCKED` (`{{CHECKPOINT_PYTHON_CMD}} --checkpoint-path {{CHECKPOINT_PATH}} --step browser-verification --status failed --terminal-status WORKFLOW_BLOCKED --blocked-reason browser_verification_failed`), write `failure-log.md` with browser evidence, clean up the dev server/browser, and stop before commit.
396
396
  - If `{{BROWSER_BLOCKING}}` is `false`: log the failure details, mark checkpoint step `browser-verification` according to the evidence, clean up the dev server/browser, and continue.
397
397
 
398
398
  You MUST attempt verification and MUST clean up the dev server in both cases.
@@ -161,6 +161,13 @@
161
161
  ],
162
162
  "description": "automated=unit/integration-test; manual=human-UAT; hybrid=both"
163
163
  },
164
+ "completion_notes": {
165
+ "type": "array",
166
+ "items": {
167
+ "type": "string"
168
+ },
169
+ "description": "AI-generated summary of key changes from this bugfix session. Used to provide dependency context to downstream tasks."
170
+ },
164
171
  "acceptance_criteria": {
165
172
  "type": "array",
166
173
  "minItems": 1,
@@ -186,7 +186,7 @@ Invoke `/prizmkit-code-review` with the exact artifact root, spec, plan, and com
186
186
  ```bash
187
187
  {{RUNTIME_HELPER_CMD}} text final-verdict .prizmkit/bugfix/{{BUG_ID}}/review-report.md
188
188
  ```
189
- This injected session maps Skill `PASS`/`NEEDS_FIXES` to `REVIEW_PASS`/`REVIEW_NEEDS_FIXES`. For `NEEDS_FIXES`, classify concrete findings into an allowed `repair_scope`; safe in-budget repair re-enters Implement through the helper, while unknown/unsafe scope blocks. `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.
189
+ This injected session maps Skill `PASS`/`NEEDS_FIXES` to `REVIEW_PASS`/`REVIEW_NEEDS_FIXES`. For `NEEDS_FIXES`, classify concrete findings into an allowed `repair_scope`; safe in-budget repair re-enters Implement through the helper, while unknown/unsafe scope blocks. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` means review did not complete: inspect progress once, mark checkpoint step `prizmkit-code-review` `failed` with `--terminal-status WORKFLOW_BLOCKED`, write `failure-log.md`, and stop. Do not accept stale verdict text or replace required independent review with Main-Agent self-review.
190
190
 
191
191
  {{IF_BROWSER_INTERACTION}}
192
192
 
@@ -36,4 +36,4 @@ Runtime-state boundary:
36
36
  - Never hand-edit family task state, session status, heartbeat, progress, retry, checkout, daemon, PID, or log files under `.prizmkit/state/`.
37
37
  - `session-status.json` is runtime-owned and is not part of this artifact manifest.
38
38
 
39
- Do not create duplicate lifecycle artifacts in another Feature, Bugfix, or Refactor directory.
39
+ Do not create duplicate lifecycle artifacts in another Feature or Bugfix directory.
@@ -7,4 +7,4 @@ The pipeline session is always headless and must complete manual/hybrid verifica
7
7
  1. Select the available non-interactive verification path: browser tooling, CLI/API checks, fixtures, project test commands, or another deterministic local check.
8
8
  2. Cover the reported behavior and acceptance criteria; for browser-visible behavior, capture both the original reproduction and post-fix result when the configured tooling is available.
9
9
  3. Record the selected verification method, commands/tool, inputs, outputs, limitations, and evidence paths in `.prizmkit/bugfix/{{BUG_ID}}/fix-report.md` and the session/checkpoint metadata.
10
- 4. Continue through the authoritative `prizmkit-test` gate, `/prizmkit-retrospective`, and `/prizmkit-committer` when all gates pass. Missing or blocked verification evidence is `TEST_BLOCKED`, not a request for user input.
10
+ 4. Continue through the authoritative `prizmkit-test` gate, `/prizmkit-retrospective`, and `/prizmkit-committer` when all gates pass. If required verification evidence is missing or blocked, run `{{CHECKPOINT_PYTHON_CMD}} --checkpoint-path {{CHECKPOINT_PATH}} --step manual-verification --status failed --terminal-status WORKFLOW_BLOCKED --blocked-reason manual_verification_blocked`, write `failure-log.md`, and stop rather than requesting user input or fabricating a pass.
@@ -14,6 +14,6 @@ Missing required evidence, an unsafe repair, a failed verification, or failure t
14
14
 
15
15
  - Skill `PASS` with a valid report → map to `REVIEW_PASS` and proceed to configured verification.
16
16
  - Skill `NEEDS_FIXES` with a valid report → map to `REVIEW_NEEDS_FIXES`, classify the concrete findings into an allowed `repair_scope`, record both values, and route through the bounded repair path. If no safe scope exists, block instead of guessing; do not commit.
17
- - `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.
17
+ - `REVIEW_INCOMPLETE` or `REVIEW_INVALID` → inspect progress once, run `{{CHECKPOINT_PYTHON_CMD}} --checkpoint-path {{CHECKPOINT_PATH}} --step prizmkit-code-review --status failed --terminal-status WORKFLOW_BLOCKED --blocked-reason review_incomplete_or_invalid` (without `--stage-result`), write `failure-log.md`, and stop. Do not accept old or incidental verdict text and do not synthesize a passing result outside the skill.
18
18
 
19
19
  **Checkpoint update**: Set step `prizmkit-code-review` to `completed` with `stage_result=REVIEW_PASS` only for an accepted valid Final Result. Set it to `failed` with `stage_result=REVIEW_NEEDS_FIXES` when the review returns known unresolved findings.
@@ -15,7 +15,8 @@ They must agree on the testing result and unresolved items. Do not require an ev
15
15
 
16
16
  Gate outcomes:
17
17
 
18
- - `TEST_PASS`: mark the test checkpoint step completed and continue to retrospective.
18
+ - `TEST_PASS` with consistent `production_changed=false`: mark the test checkpoint step completed and continue to retrospective.
19
+ - `TEST_PASS` with consistent `production_changed=true`: do NOT mark the test step completed; within the shared 3-round outer repair budget (`repair_round < 3`), re-enter `prizmkit-code-review` (`--status in_progress --repair-scope production`), run `/prizmkit-code-review` in delta mode (`review_scope=delta`), and re-run `/prizmkit-test` before continuing (if `repair_round >= 3`, record `WORKFLOW_BLOCKED` with `repair_round_limit`).
19
20
  - `TEST_NEEDS_FIXES`: this injected session classifies the exact unresolved correction into an allowed `repair_scope` and records both on the failed test step. If scope and outer budget permit, start `prizmkit-implement` with that explicit repair input; the helper rewinds stale downstream steps, then fresh review, configured verification, and test results are mandatory. If scope is unsafe/unknown or budget is exhausted, record terminal `WORKFLOW_BLOCKED`. Never recreate the testing-local repair loop.
20
21
  - `TEST_BLOCKED`: preserve the report/result and blocker, then record terminal `WORKFLOW_BLOCKED`. Do not reinterpret the result as a runtime crash or make speculative production edits.
21
22
 
@@ -22,7 +22,7 @@ Use this helper to update checkpoint status. Do not hand-edit `workflow-checkpoi
22
22
  - Complete the checkpoint's planning step (`context-snapshot-and-plan`, `bug-diagnosis-and-plan`, or `prizmkit-plan`) with `--status completed --stage-result PLAN_READY`.
23
23
  - Complete `prizmkit-implement` with `--status completed --stage-result IMPLEMENTED`.
24
24
  - Complete `prizmkit-code-review` only with `--status completed --stage-result REVIEW_PASS`.
25
- - Complete `prizmkit-test` only after validating the sibling report/result pair, with `--status completed --stage-result TEST_PASS`.
25
+ - Complete `prizmkit-test` with `--status completed --stage-result TEST_PASS` only when the sibling `test-report.md` / `test-result.json` pair is valid, agrees on `production_changed`, and reports `production_changed=false`. If consistent `TEST_PASS` reports `production_changed=true`, keep `prizmkit-test` incomplete and re-enter `prizmkit-code-review` in delta mode (`--status in_progress --repair-scope production`) within the 3-round outer repair budget (or record `WORKFLOW_BLOCKED` with `--blocked-reason repair_round_limit`).
26
26
  - Complete `prizmkit-retrospective` with `--status completed --stage-result RETRO_COMPLETE`.
27
27
  - After this injected session validates required gates and `/prizmkit-committer` returns `COMMIT_REQUEST_READY` with `runtime-commit-request.json`, stop normal work without another checkpoint-helper call for the committer. The Python Runtime alone validates the request, publishes commit readiness, executes the local commit, and advances the step to `completed/COMMITTED`.
28
28
  - For `REVIEW_NEEDS_FIXES` or `TEST_NEEDS_FIXES`, classify the concrete correction into one allowed `--repair-scope`, record the failed step and result, and let the helper select the bounded implementation route. If the scope cannot be established safely, record `WORKFLOW_BLOCKED` rather than guessing.
@@ -120,7 +120,7 @@ Append results to `context-snapshot.md`:
120
120
  Browser blocking policy: `{{BROWSER_BLOCKING}}`.
121
121
 
122
122
  If verification fails:
123
- - If `{{BROWSER_BLOCKING}}` is `true`: mark checkpoint step `browser-verification` as `failed`, write `failure-log.md` with browser evidence, clean up the dev server/browser, and stop before commit.
123
+ - If `{{BROWSER_BLOCKING}}` is `true`: update checkpoint step `browser-verification` to failed with terminal `WORKFLOW_BLOCKED` (`{{CHECKPOINT_PYTHON_CMD}} --checkpoint-path {{CHECKPOINT_PATH}} --step browser-verification --status failed --terminal-status WORKFLOW_BLOCKED --blocked-reason browser_verification_failed`), write `failure-log.md` with browser evidence, clean up the dev server/browser, and stop before commit.
124
124
  - If `{{BROWSER_BLOCKING}}` is `false`: log the failure details, mark checkpoint step `browser-verification` according to the evidence, clean up the dev server/browser, and continue.
125
125
 
126
126
  You MUST attempt verification and MUST clean up the dev server in both cases.
@@ -5,7 +5,7 @@ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without
5
5
  **CRITICAL CONSTRAINT — opencli browser ONLY, NO Playwright**:
6
6
  - You MUST use `opencli browser` (the CLI tool) for ALL browser interactions in this phase
7
7
  - **NEVER** use playwright-cli, Playwright MCP server, or any MCP-based browser automation
8
- - All browser actions go through `opencli browser <command>` in the Bash tool, not through any MCP tool call
8
+ - All browser actions go through `opencli browser <command>` via the shell/terminal command tool, not through any MCP tool call
9
9
  - OpenCLI reuses Chrome's logged-in sessions — your existing authentication is available automatically
10
10
 
11
11
  **Step 0 — OpenCLI Readiness Check (BLOCKING — must pass before any browser action)**:
@@ -117,7 +117,7 @@ Append results to `context-snapshot.md`:
117
117
  Browser blocking policy: `{{BROWSER_BLOCKING}}`.
118
118
 
119
119
  If verification fails:
120
- - If `{{BROWSER_BLOCKING}}` is `true`: mark checkpoint step `browser-verification` as `failed`, write `failure-log.md` with browser evidence, clean up the dev server/browser, and stop before commit.
120
+ - If `{{BROWSER_BLOCKING}}` is `true`: update checkpoint step `browser-verification` to failed with terminal `WORKFLOW_BLOCKED` (`{{CHECKPOINT_PYTHON_CMD}} --checkpoint-path {{CHECKPOINT_PATH}} --step browser-verification --status failed --terminal-status WORKFLOW_BLOCKED --blocked-reason browser_verification_failed`), write `failure-log.md` with browser evidence, clean up the dev server/browser, and stop before commit.
121
121
  - If `{{BROWSER_BLOCKING}}` is `false`: log the failure details, mark checkpoint step `browser-verification` according to the evidence, clean up the dev server/browser, and continue.
122
122
 
123
123
  You MUST attempt verification and MUST clean up the dev server in both cases.
@@ -6,7 +6,7 @@ You MUST execute this phase. Do NOT skip it. Do NOT mark it as completed without
6
6
  - You MUST use `playwright-cli` (the CLI tool) for ALL browser interactions in this phase
7
7
  - **NEVER** use Playwright MCP server, Playwright MCP tools, or any MCP-based browser automation
8
8
  - If you have Playwright MCP configured, IGNORE it entirely — use the CLI command `playwright-cli` exclusively
9
- - All browser actions go through `playwright-cli <command>` in the Bash tool, not through any MCP tool call
9
+ - All browser actions go through `playwright-cli <command>` via the shell/terminal command tool, not through any MCP tool call
10
10
 
11
11
  **Step 0 — Playwright CLI Readiness Check (BLOCKING — must pass before any browser action)**:
12
12
 
@@ -104,7 +104,7 @@ Browser cleanup: confirmed
104
104
  Browser blocking policy: `{{BROWSER_BLOCKING}}`.
105
105
 
106
106
  If verification fails:
107
- - If `{{BROWSER_BLOCKING}}` is `true`: mark checkpoint step `browser-verification` as `failed`, write `failure-log.md` with browser evidence, clean up the dev server/browser, and stop before commit.
107
+ - If `{{BROWSER_BLOCKING}}` is `true`: update checkpoint step `browser-verification` to failed with terminal `WORKFLOW_BLOCKED` (`{{CHECKPOINT_PYTHON_CMD}} --checkpoint-path {{CHECKPOINT_PATH}} --step browser-verification --status failed --terminal-status WORKFLOW_BLOCKED --blocked-reason browser_verification_failed`), write `failure-log.md` with browser evidence, clean up the dev server/browser, and stop before commit.
108
108
  - If `{{BROWSER_BLOCKING}}` is `false`: log the failure details, mark checkpoint step `browser-verification` according to the evidence, clean up the dev server/browser, and continue.
109
109
 
110
110
  You MUST attempt verification and MUST clean up the dev server in both cases.
@@ -21,7 +21,8 @@ The JSON is the minimal terminal result projection and the report contains seman
21
21
 
22
22
  The caller checkpoint records only the returned testing result and caller-owned routing state. It must not ask the skill to manage sessions or checkpoints.
23
23
 
24
- - `TEST_PASS` → mark `prizmkit-test` completed and continue to retrospective.
24
+ - `TEST_PASS` with consistent `production_changed=false` across `test-report.md` and `test-result.json` → mark `prizmkit-test` completed and continue to retrospective.
25
+ - `TEST_PASS` with consistent `production_changed=true` across `test-report.md` and `test-result.json` → do NOT complete `prizmkit-test`; check the shared outer repair budget (`repair_round < 3`). If budget permits, re-enter `prizmkit-code-review` (`--status in_progress --repair-scope production`), run `/prizmkit-code-review` in delta mode (`review_scope=delta`), re-run configured post-review verification (if present), and run `/prizmkit-test` again until `TEST_PASS` has `production_changed=false`. If `repair_round >= 3`, record `WORKFLOW_BLOCKED` (`blocked_reason=repair_round_limit`) and stop.
25
26
  - `TEST_NEEDS_FIXES` → this injected session classifies the exact unresolved correction into an allowed `repair_scope` and records both on the failed test step. If scope and outer budget permit, start `prizmkit-implement` with that explicit repair input; the checkpoint helper rewinds stale downstream steps, after which fresh `prizmkit-code-review`, configured verification, and `prizmkit-test` results are mandatory. If scope is unsafe/unknown or budget is exhausted, record terminal `WORKFLOW_BLOCKED`. Never recreate the testing-local repair loop.
26
27
  - `TEST_BLOCKED` → preserve the report, result, and blocker; record terminal `WORKFLOW_BLOCKED`. Do not reinterpret it as an AI CLI crash or perform speculative production edits.
27
28
 
@@ -20,7 +20,7 @@ Handle the marker:
20
20
 
21
21
  - `REVIEW_PASS` → proceed through configured Browser/Manual verification, then the structured test gate.
22
22
  - `REVIEW_NEEDS_FIXES` → follow the repair route above; do not externally restart the review loop.
23
- - `REVIEW_INCOMPLETE` or `REVIEW_INVALID` → inspect append-only progress once, write `failure-log.md`, and stop. Do not accept old/incidental verdict text or synthesize a pass.
23
+ - `REVIEW_INCOMPLETE` or `REVIEW_INVALID` → inspect append-only progress once, run `{{CHECKPOINT_PYTHON_CMD}} --checkpoint-path {{CHECKPOINT_PATH}} --step prizmkit-code-review --status failed --terminal-status WORKFLOW_BLOCKED --blocked-reason review_incomplete_or_invalid` (without `--stage-result`), write `failure-log.md`, and stop. Do not accept old/incidental verdict text or synthesize a pass.
24
24
 
25
25
  **CP-3**: Review has a valid Final Result and `review-report.md` preserves this execution's progress.
26
26
 
@@ -9,12 +9,9 @@ Check existing artifacts first:
9
9
  - `context-snapshot.md` exists → use it directly and skip snapshot rebuilding
10
10
  - Some planning artifacts are missing → let the planning Skill generate only the missing files
11
11
 
12
- Before planning, check whether feature code already exists in the project (use the helper to search source directories identified from `root.prizm` or the project tree scan):
13
- ```bash
14
- {{RUNTIME_HELPER_CMD}} text search . --pattern "{{FEATURE_SLUG}}" --json
15
- ```
12
+ Before planning, inspect the relevant source modules already identified in Step A (use targeted `{{RUNTIME_HELPER_CMD}} text search <source-dir> --pattern "<domain-symbol>" --json` only for concrete domain identifiers; do not run a blind repo-wide search for `{{FEATURE_SLUG}}`).
16
13
 
17
- Record result as `EXISTING_CODE` (helper `match` entries for source files, or empty; ignore `.prizmkit/` artifact matches).
14
+ Record result as `EXISTING_CODE` (helper `match` entries or loaded source hits, or empty; ignore `.prizmkit/` artifact matches).
18
15
 
19
16
  If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing implementation — document what exists, identify gaps, and do NOT re-implement what is already done.
20
17
 
@@ -55,7 +52,7 @@ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing
55
52
  {{RUNTIME_HELPER_CMD}} artifact exists .prizmkit/specs/{{FEATURE_SLUG}}/plan.md
56
53
  ```
57
54
 
58
- Invoke `/prizmkit-plan` once with the exact `artifact_dir`, requirement description, and loaded project context. The Skill creates or validates both artifacts and returns only `PLAN_READY` or `PLAN_BLOCKED`. This injected session records `PLAN_READY` on checkpoint step `context-snapshot-and-plan`; `PLAN_BLOCKED` records the failed planning result and stops.
55
+ Invoke `/prizmkit-plan` once with the exact `artifact_dir`, requirement description, and the project context already loaded in Step A (reuse Step A's context and `context-snapshot.md` directly instead of re-scanning the repository). The Skill creates or validates both artifacts and returns only `PLAN_READY` or `PLAN_BLOCKED`. This injected session records `PLAN_READY` on checkpoint step `context-snapshot-and-plan`; `PLAN_BLOCKED` records the failed planning result and stops.
59
56
 
60
57
  > All files go under `.prizmkit/specs/{{FEATURE_SLUG}}/`. Confirm each with `ls` after writing.
61
58
 
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "task_id": {
20
20
  "type": "string",
21
- "pattern": "^[FBR]-\\d{3}(?:-[A-Z])?$"
21
+ "pattern": "^[FB]-\\d{3}(?:-[A-Z])?$"
22
22
  },
23
23
  "task_type": {
24
24
  "type": "string",
25
- "enum": ["feature", "bugfix", "refactor"]
25
+ "enum": ["feature", "bugfix"]
26
26
  },
27
27
  "status": {
28
28
  "type": "string",
@@ -49,9 +49,6 @@
49
49
  "type": "string",
50
50
  "minLength": 1
51
51
  },
52
- "worktree_path": {
53
- "type": "string"
54
- },
55
52
  "reason": {
56
53
  "type": "string"
57
54
  },