prizmkit 1.1.99 → 1.1.101

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 (321) hide show
  1. package/bin/create-prizmkit.js +4 -4
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/dev-pipeline/.env.example +3 -3
  4. package/bundled/dev-pipeline/README.md +110 -90
  5. package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +1 -1
  6. package/bundled/dev-pipeline/cli.py +27 -0
  7. package/bundled/dev-pipeline/prizmkit_runtime/__init__.py +13 -0
  8. package/bundled/dev-pipeline/prizmkit_runtime/__main__.py +9 -0
  9. package/bundled/dev-pipeline/prizmkit_runtime/cli.py +193 -0
  10. package/bundled/dev-pipeline/prizmkit_runtime/commands.py +313 -0
  11. package/bundled/dev-pipeline/prizmkit_runtime/compat.py +32 -0
  12. package/bundled/dev-pipeline/prizmkit_runtime/config.py +410 -0
  13. package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +478 -0
  14. package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +734 -0
  15. package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +256 -0
  16. package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +109 -0
  17. package/bundled/dev-pipeline/prizmkit_runtime/paths.py +110 -0
  18. package/bundled/dev-pipeline/prizmkit_runtime/processes.py +373 -0
  19. package/bundled/dev-pipeline/prizmkit_runtime/reset.py +389 -0
  20. package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +51 -0
  21. package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +179 -0
  22. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +345 -0
  23. package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +118 -0
  24. package/bundled/dev-pipeline/prizmkit_runtime/runner_recovery.py +187 -0
  25. package/bundled/dev-pipeline/prizmkit_runtime/runner_status.py +147 -0
  26. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +422 -0
  27. package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +552 -0
  28. package/bundled/dev-pipeline/prizmkit_runtime/status.py +71 -0
  29. package/bundled/dev-pipeline/scripts/check-session-status.py +74 -1
  30. package/bundled/dev-pipeline/scripts/continuation.py +374 -0
  31. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +64 -52
  32. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +35 -25
  33. package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +2 -2
  34. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +15 -20
  35. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +185 -16
  36. package/bundled/dev-pipeline/scripts/update-bug-status.py +214 -6
  37. package/bundled/dev-pipeline/scripts/update-feature-status.py +237 -6
  38. package/bundled/dev-pipeline/scripts/update-refactor-status.py +214 -6
  39. package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +8 -2
  40. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +4 -0
  41. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +14 -5
  42. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +16 -6
  43. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +16 -6
  44. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +1 -1
  45. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +3 -3
  46. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +2 -0
  47. package/bundled/dev-pipeline/templates/sections/log-size-awareness.md +13 -69
  48. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +15 -7
  49. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +42 -29
  50. package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +41 -39
  51. package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +4 -0
  52. package/bundled/dev-pipeline/templates/sections/test-failure-recovery-lite.md +4 -0
  53. package/bundled/dev-pipeline/templates/session-status-schema.json +1 -1
  54. package/bundled/dev-pipeline/tests/conftest.py +1 -0
  55. package/bundled/dev-pipeline/tests/test_auto_skip.py +932 -0
  56. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +207 -0
  57. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +100 -0
  58. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +43 -0
  59. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +1138 -0
  60. package/bundled/dev-pipeline/tests/test_unified_cli.py +1045 -0
  61. package/bundled/skills/_metadata.json +1 -1
  62. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +29 -34
  63. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +6 -5
  64. package/bundled/skills/feature-pipeline-launcher/SKILL.md +29 -35
  65. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +7 -6
  66. package/bundled/skills/feature-workflow/SKILL.md +3 -6
  67. package/bundled/skills/recovery-workflow/SKILL.md +23 -32
  68. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +29 -35
  69. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +7 -6
  70. package/bundled/skills/refactor-workflow/SKILL.md +3 -6
  71. package/bundled/templates/hooks/commit-intent.json +2 -2
  72. package/bundled/templates/hooks/diff-prizm-docs.py +226 -0
  73. package/bundled/templates/hooks/prizm-pre-commit.py +45 -0
  74. package/bundled/templates/hooks/validate-prizm-docs.py +240 -0
  75. package/package.json +1 -1
  76. package/src/config.js +33 -12
  77. package/src/index.js +3 -6
  78. package/src/manifest.js +3 -2
  79. package/src/metadata.js +7 -18
  80. package/src/prompts.js +0 -12
  81. package/src/runtimes.js +18 -11
  82. package/src/scaffold.js +133 -116
  83. package/src/upgrade.js +1 -1
  84. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +0 -500
  85. package/bundled/dev-pipeline/launch-feature-daemon.sh +0 -657
  86. package/bundled/dev-pipeline/launch-refactor-daemon.sh +0 -502
  87. package/bundled/dev-pipeline/lib/branch.sh +0 -326
  88. package/bundled/dev-pipeline/lib/common.sh +0 -1257
  89. package/bundled/dev-pipeline/lib/heartbeat.sh +0 -469
  90. package/bundled/dev-pipeline/reset-bug.sh +0 -395
  91. package/bundled/dev-pipeline/reset-feature.sh +0 -406
  92. package/bundled/dev-pipeline/reset-refactor.sh +0 -393
  93. package/bundled/dev-pipeline/run-bugfix.sh +0 -1315
  94. package/bundled/dev-pipeline/run-feature.sh +0 -1602
  95. package/bundled/dev-pipeline/run-recovery.sh +0 -648
  96. package/bundled/dev-pipeline/run-refactor.sh +0 -1348
  97. package/bundled/dev-pipeline/scripts/monitor-log.sh +0 -104
  98. package/bundled/dev-pipeline/tests/test-path-resolution.sh +0 -100
  99. package/bundled/dev-pipeline-windows/.env.example +0 -36
  100. package/bundled/dev-pipeline-windows/README.md +0 -30
  101. package/bundled/dev-pipeline-windows/SCHEMA_ANALYSIS.md +0 -533
  102. package/bundled/dev-pipeline-windows/assets/feature-list-example.json +0 -146
  103. package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +0 -137
  104. package/bundled/dev-pipeline-windows/launch-bugfix-daemon.ps1 +0 -9
  105. package/bundled/dev-pipeline-windows/launch-feature-daemon.ps1 +0 -9
  106. package/bundled/dev-pipeline-windows/launch-refactor-daemon.ps1 +0 -9
  107. package/bundled/dev-pipeline-windows/lib/branch.ps1 +0 -235
  108. package/bundled/dev-pipeline-windows/lib/common.ps1 +0 -829
  109. package/bundled/dev-pipeline-windows/lib/daemon.ps1 +0 -140
  110. package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +0 -967
  111. package/bundled/dev-pipeline-windows/lib/reset.ps1 +0 -87
  112. package/bundled/dev-pipeline-windows/reset-bug.ps1 +0 -9
  113. package/bundled/dev-pipeline-windows/reset-feature.ps1 +0 -9
  114. package/bundled/dev-pipeline-windows/reset-refactor.ps1 +0 -9
  115. package/bundled/dev-pipeline-windows/run-bugfix.ps1 +0 -9
  116. package/bundled/dev-pipeline-windows/run-feature.ps1 +0 -9
  117. package/bundled/dev-pipeline-windows/run-recovery.ps1 +0 -179
  118. package/bundled/dev-pipeline-windows/run-refactor.ps1 +0 -9
  119. package/bundled/dev-pipeline-windows/scripts/check-session-status.py +0 -228
  120. package/bundled/dev-pipeline-windows/scripts/detect-stuck.py +0 -530
  121. package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +0 -2282
  122. package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +0 -767
  123. package/bundled/dev-pipeline-windows/scripts/generate-recovery-prompt.py +0 -805
  124. package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +0 -845
  125. package/bundled/dev-pipeline-windows/scripts/init-bugfix-pipeline.py +0 -316
  126. package/bundled/dev-pipeline-windows/scripts/init-dev-team.py +0 -134
  127. package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +0 -382
  128. package/bundled/dev-pipeline-windows/scripts/init-refactor-pipeline.py +0 -399
  129. package/bundled/dev-pipeline-windows/scripts/monitor-log.ps1 +0 -102
  130. package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +0 -1232
  131. package/bundled/dev-pipeline-windows/scripts/patch-completion-notes.py +0 -191
  132. package/bundled/dev-pipeline-windows/scripts/prizmkit-test-gate.py +0 -446
  133. package/bundled/dev-pipeline-windows/scripts/update-bug-status.py +0 -913
  134. package/bundled/dev-pipeline-windows/scripts/update-checkpoint.py +0 -173
  135. package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +0 -1558
  136. package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +0 -1119
  137. package/bundled/dev-pipeline-windows/scripts/utils.py +0 -542
  138. package/bundled/dev-pipeline-windows/templates/agent-prompts/critic-plan-challenge.md +0 -7
  139. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-fix.md +0 -7
  140. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +0 -65
  141. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-resume.md +0 -5
  142. package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +0 -7
  143. package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +0 -73
  144. package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +0 -589
  145. package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +0 -710
  146. package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +0 -791
  147. package/bundled/dev-pipeline-windows/templates/bug-fix-list-schema.json +0 -263
  148. package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +0 -326
  149. package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +0 -237
  150. package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +0 -340
  151. package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +0 -270
  152. package/bundled/dev-pipeline-windows/templates/sections/ac-verification-checklist.md +0 -7
  153. package/bundled/dev-pipeline-windows/templates/sections/checkpoint-system.md +0 -91
  154. package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +0 -34
  155. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-agent.md +0 -10
  156. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-full.md +0 -12
  157. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-lite.md +0 -7
  158. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-agent.md +0 -8
  159. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-full.md +0 -9
  160. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-lite.md +0 -6
  161. package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +0 -21
  162. package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +0 -21
  163. package/bundled/dev-pipeline-windows/templates/sections/log-size-awareness.md +0 -78
  164. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +0 -283
  165. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +0 -112
  166. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +0 -168
  167. package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +0 -82
  168. package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +0 -75
  169. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +0 -23
  170. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +0 -14
  171. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +0 -19
  172. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +0 -63
  173. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +0 -42
  174. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +0 -44
  175. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +0 -59
  176. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +0 -39
  177. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +0 -27
  178. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +0 -27
  179. package/bundled/dev-pipeline-windows/templates/sections/phase-prizmkit-test.md +0 -39
  180. package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +0 -35
  181. package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +0 -35
  182. package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +0 -73
  183. package/bundled/dev-pipeline-windows/templates/sections/phase0-init.md +0 -13
  184. package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +0 -21
  185. package/bundled/dev-pipeline-windows/templates/sections/session-context.md +0 -5
  186. package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +0 -6
  187. package/bundled/dev-pipeline-windows/templates/sections/task-contract.md +0 -34
  188. package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-agent.md +0 -48
  189. package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-lite.md +0 -48
  190. package/bundled/dev-pipeline-windows/templates/session-status-schema.json +0 -83
  191. package/bundled/skills-windows/app-planner/SKILL.md +0 -296
  192. package/bundled/skills-windows/app-planner/assets/app-design-guide.md +0 -101
  193. package/bundled/skills-windows/app-planner/references/architecture-decisions.md +0 -52
  194. package/bundled/skills-windows/app-planner/references/brainstorm-guide.md +0 -101
  195. package/bundled/skills-windows/app-planner/references/frontend-design-guide.md +0 -71
  196. package/bundled/skills-windows/app-planner/references/infrastructure-convention-discovery.md +0 -108
  197. package/bundled/skills-windows/app-planner/references/project-brief-guide.md +0 -82
  198. package/bundled/skills-windows/app-planner/references/project-conventions-discovery.md +0 -59
  199. package/bundled/skills-windows/app-planner/references/project-state-detection.md +0 -90
  200. package/bundled/skills-windows/app-planner/references/red-team-checklist.md +0 -40
  201. package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +0 -619
  202. package/bundled/skills-windows/app-planner/references/rules/backend/fixed-rules.md +0 -285
  203. package/bundled/skills-windows/app-planner/references/rules/backend/question-bank.md +0 -249
  204. package/bundled/skills-windows/app-planner/references/rules/backend/question-manifest.json +0 -46
  205. package/bundled/skills-windows/app-planner/references/rules/backend/template.md +0 -173
  206. package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +0 -382
  207. package/bundled/skills-windows/app-planner/references/rules/database/fixed-rules.md +0 -211
  208. package/bundled/skills-windows/app-planner/references/rules/database/question-bank.md +0 -184
  209. package/bundled/skills-windows/app-planner/references/rules/database/question-manifest.json +0 -39
  210. package/bundled/skills-windows/app-planner/references/rules/database/template.md +0 -158
  211. package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +0 -820
  212. package/bundled/skills-windows/app-planner/references/rules/frontend/fixed-rules.md +0 -188
  213. package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +0 -319
  214. package/bundled/skills-windows/app-planner/references/rules/frontend/question-manifest.json +0 -51
  215. package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +0 -339
  216. package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +0 -649
  217. package/bundled/skills-windows/app-planner/references/rules/mobile/fixed-rules.md +0 -290
  218. package/bundled/skills-windows/app-planner/references/rules/mobile/question-bank.md +0 -232
  219. package/bundled/skills-windows/app-planner/references/rules/mobile/question-manifest.json +0 -47
  220. package/bundled/skills-windows/app-planner/references/rules/mobile/template.md +0 -175
  221. package/bundled/skills-windows/app-planner/references/rules-configuration.md +0 -46
  222. package/bundled/skills-windows/bug-fix-workflow/SKILL.md +0 -379
  223. package/bundled/skills-windows/bug-fix-workflow/references/bug-diagnosis.md +0 -41
  224. package/bundled/skills-windows/bug-planner/SKILL.md +0 -402
  225. package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +0 -43
  226. package/bundled/skills-windows/bug-planner/references/critic-and-verification.md +0 -44
  227. package/bundled/skills-windows/bug-planner/references/error-recovery.md +0 -73
  228. package/bundled/skills-windows/bug-planner/references/input-formats.md +0 -53
  229. package/bundled/skills-windows/bug-planner/references/schema-validation.md +0 -25
  230. package/bundled/skills-windows/bug-planner/references/severity-rules.md +0 -16
  231. package/bundled/skills-windows/bug-planner/scripts/validate-bug-list.py +0 -322
  232. package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +0 -304
  233. package/bundled/skills-windows/bugfix-pipeline-launcher/references/configuration.md +0 -84
  234. package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +0 -381
  235. package/bundled/skills-windows/feature-pipeline-launcher/references/configuration.md +0 -67
  236. package/bundled/skills-windows/feature-pipeline-launcher/scripts/preflight-check.py +0 -462
  237. package/bundled/skills-windows/feature-planner/SKILL.md +0 -397
  238. package/bundled/skills-windows/feature-planner/assets/evaluation-guide.md +0 -64
  239. package/bundled/skills-windows/feature-planner/assets/planning-guide.md +0 -214
  240. package/bundled/skills-windows/feature-planner/references/browser-interaction.md +0 -59
  241. package/bundled/skills-windows/feature-planner/references/completeness-review.md +0 -57
  242. package/bundled/skills-windows/feature-planner/references/decomposition-patterns.md +0 -75
  243. package/bundled/skills-windows/feature-planner/references/error-recovery.md +0 -90
  244. package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +0 -112
  245. package/bundled/skills-windows/feature-planner/references/new-project-planning.md +0 -85
  246. package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +0 -1020
  247. package/bundled/skills-windows/feature-workflow/SKILL.md +0 -374
  248. package/bundled/skills-windows/feature-workflow/references/brainstorm-guide.md +0 -137
  249. package/bundled/skills-windows/prizm-kit/SKILL.md +0 -93
  250. package/bundled/skills-windows/prizmkit-code-review/SKILL.md +0 -161
  251. package/bundled/skills-windows/prizmkit-code-review/references/dev-agent-prompt.md +0 -30
  252. package/bundled/skills-windows/prizmkit-code-review/references/review-report-template.md +0 -31
  253. package/bundled/skills-windows/prizmkit-code-review/references/reviewer-agent-prompt.md +0 -66
  254. package/bundled/skills-windows/prizmkit-code-review/scripts/check_loop.py +0 -186
  255. package/bundled/skills-windows/prizmkit-committer/SKILL.md +0 -89
  256. package/bundled/skills-windows/prizmkit-deploy/SKILL.md +0 -444
  257. package/bundled/skills-windows/prizmkit-deploy/references/ci-cd-workflows.md +0 -115
  258. package/bundled/skills-windows/prizmkit-deploy/references/cloud-platform-deploy.md +0 -93
  259. package/bundled/skills-windows/prizmkit-deploy/references/data-safety-examples.md +0 -120
  260. package/bundled/skills-windows/prizmkit-deploy/references/database-setup.md +0 -46
  261. package/bundled/skills-windows/prizmkit-deploy/references/deploy-config-schema.md +0 -148
  262. package/bundled/skills-windows/prizmkit-deploy/references/deploy-history-schema.md +0 -62
  263. package/bundled/skills-windows/prizmkit-deploy/references/deployment-modes.md +0 -50
  264. package/bundled/skills-windows/prizmkit-deploy/references/direct-upload.md +0 -26
  265. package/bundled/skills-windows/prizmkit-deploy/references/dns-setup.md +0 -42
  266. package/bundled/skills-windows/prizmkit-deploy/references/docker-deploy.md +0 -31
  267. package/bundled/skills-windows/prizmkit-deploy/references/firewall-setup.md +0 -37
  268. package/bundled/skills-windows/prizmkit-deploy/references/live-validation-notes.md +0 -21
  269. package/bundled/skills-windows/prizmkit-deploy/references/nginx-blue-green.md +0 -59
  270. package/bundled/skills-windows/prizmkit-deploy/references/ssh-bootstrap-flow.md +0 -49
  271. package/bundled/skills-windows/prizmkit-deploy/references/ssh-execution-flow.md +0 -41
  272. package/bundled/skills-windows/prizmkit-deploy/references/ssh-takeover.md +0 -20
  273. package/bundled/skills-windows/prizmkit-deploy/references/ssl-setup.md +0 -56
  274. package/bundled/skills-windows/prizmkit-implement/SKILL.md +0 -71
  275. package/bundled/skills-windows/prizmkit-init/SKILL.md +0 -356
  276. package/bundled/skills-windows/prizmkit-init/assets/project-brief-template.md +0 -82
  277. package/bundled/skills-windows/prizmkit-init/references/config-schema.md +0 -70
  278. package/bundled/skills-windows/prizmkit-init/references/rules/layer-detection.md +0 -41
  279. package/bundled/skills-windows/prizmkit-init/references/tech-stack-catalog.md +0 -13
  280. package/bundled/skills-windows/prizmkit-init/references/update-supplement.md +0 -9
  281. package/bundled/skills-windows/prizmkit-plan/SKILL.md +0 -102
  282. package/bundled/skills-windows/prizmkit-plan/assets/plan-template.md +0 -115
  283. package/bundled/skills-windows/prizmkit-plan/assets/spec-template.md +0 -73
  284. package/bundled/skills-windows/prizmkit-plan/references/clarify-guide.md +0 -67
  285. package/bundled/skills-windows/prizmkit-plan/references/examples.md +0 -85
  286. package/bundled/skills-windows/prizmkit-plan/references/verification-checklist.md +0 -60
  287. package/bundled/skills-windows/prizmkit-prizm-docs/SKILL.md +0 -129
  288. package/bundled/skills-windows/prizmkit-prizm-docs/assets/prizm-docs-format.md +0 -613
  289. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-init.md +0 -45
  290. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-rebuild.md +0 -15
  291. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-status.md +0 -14
  292. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-update.md +0 -19
  293. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-validate.md +0 -17
  294. package/bundled/skills-windows/prizmkit-retrospective/SKILL.md +0 -87
  295. package/bundled/skills-windows/prizmkit-retrospective/references/knowledge-injection-steps.md +0 -50
  296. package/bundled/skills-windows/prizmkit-retrospective/references/structural-sync-steps.md +0 -43
  297. package/bundled/skills-windows/prizmkit-test/SKILL.md +0 -227
  298. package/bundled/skills-windows/prizmkit-test/references/boundary-coverage-protocol.md +0 -220
  299. package/bundled/skills-windows/prizmkit-test/references/examples.md +0 -143
  300. package/bundled/skills-windows/prizmkit-test/references/service-boundary-test-catalog.md +0 -225
  301. package/bundled/skills-windows/prizmkit-test/references/test-generation-steps.md +0 -109
  302. package/bundled/skills-windows/prizmkit-test/references/test-report-template.md +0 -111
  303. package/bundled/skills-windows/prizmkit-test/scripts/validate_boundary_report.py +0 -347
  304. package/bundled/skills-windows/recovery-workflow/SKILL.md +0 -355
  305. package/bundled/skills-windows/recovery-workflow/evals/evals.json +0 -46
  306. package/bundled/skills-windows/recovery-workflow/references/detection.md +0 -58
  307. package/bundled/skills-windows/recovery-workflow/scripts/detect-recovery-state.py +0 -544
  308. package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +0 -346
  309. package/bundled/skills-windows/refactor-pipeline-launcher/references/configuration.md +0 -72
  310. package/bundled/skills-windows/refactor-planner/SKILL.md +0 -398
  311. package/bundled/skills-windows/refactor-planner/assets/planning-guide.md +0 -292
  312. package/bundled/skills-windows/refactor-planner/references/behavior-preservation.md +0 -301
  313. package/bundled/skills-windows/refactor-planner/references/fast-path.md +0 -59
  314. package/bundled/skills-windows/refactor-planner/references/planning-phases.md +0 -135
  315. package/bundled/skills-windows/refactor-planner/references/refactor-scoping-guide.md +0 -221
  316. package/bundled/skills-windows/refactor-planner/scripts/validate-and-generate-refactor.py +0 -858
  317. package/bundled/skills-windows/refactor-workflow/SKILL.md +0 -343
  318. package/bundled/skills-windows/refactor-workflow/references/brainstorm-guide.md +0 -116
  319. package/bundled/templates/hooks/diff-prizm-docs.sh +0 -158
  320. package/bundled/templates/hooks/prizm-pre-commit.sh +0 -108
  321. package/bundled/templates/hooks/validate-prizm-docs.sh +0 -139
@@ -44,3 +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
+ - **Anti re-read**: once you read a file into context, do NOT read it again — use `grep -n`/`sed -n` for specific lines. 3 full Reads of same file → report BLOCKED.
48
+ - **Read offset safety**: if Read returns "shorter than offset"/"empty" — run `wc -l` then `sed -n`, do NOT retry same offset.
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
+ - **Layered test**: debug with single-file tests, only run full suite as gate when single-file is green.
@@ -12,7 +12,7 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
12
12
 
13
13
  **CRITICAL**: You MUST NOT exit until ALL work is complete and committed.
14
14
 
15
- **Tier 1 — Single Agent**: You handle everything directly. No normal work subagents; the log-size monitor is the only allowed persistent background subagent. No TeamCreate.
15
+ **Tier 1 — Single Agent**: You handle everything directly. No normal work subagents. No TeamCreate.
16
16
 
17
17
  ### Feature Description
18
18
 
@@ -51,6 +51,11 @@ You are running in **headless non-interactive mode** with a FINITE context windo
51
51
  5. **Minimize tool output** — Never load full command output into context. First capture to a temp file (`cmd 2>&1 | tee /tmp/out.txt | tail -20`), then scan the head/tail to identify relevant fields, and use targeted filtering (`grep`, `sed`, `awk`) to extract only the information needed for the current task. Only read the filtered result — never the raw full output.
52
52
  6. **No intermediate commits** — Do NOT run `git add`/`git commit` during Phase 1-3. All changes are committed once at the end in Phase 4 via `/prizmkit-committer`.
53
53
  7. **Capture test output once** — When running test suites, always use `($TEST_CMD) 2>&1 | tee /tmp/test-out.txt | tail -20`. Then grep `/tmp/test-out.txt` for details. Never re-run the suite just to apply a different filter.
54
+ 8. **Scaffold / generated file awareness** — Files created by scaffolding tools (`npm init`, `npx create-*`, etc.) are boilerplate. Tag them, record in context-snapshot.md, and NEVER re-read them. If you need to modify one, edit directly without reading first.
55
+ 9. **Package version verification (BLOCKING)** — Before writing ANY dependency version, verify it exists via registry query (`npm view <pkg> dist-tags.latest`, `pip index versions <pkg>`, etc.). NEVER guess version numbers.
56
+ 10. **Build artifact hygiene** — After build/compile, ensure output is in `.gitignore`. Never commit binaries/build output.
57
+ 11. **Anti re-read hard rule (BLOCKING)** — Once you have read a file into context, do NOT read the full file again. Use `grep -n '<pattern>' <file>` or `sed -n '<start>,<end>p' <file>` for specific lines. **20-step window**: full Read forbidden within 20 tool calls of last read. **3-strike**: 3 full Reads of same file → report BLOCKED. Applies to orchestrator AND subagents.
58
+ 12. **Read offset safety (BLOCKING)** — If Read returns "shorter than offset"/"File is empty"/"Wasted call" — do NOT retry same offset. Run `wc -l <file>` to get real line count, then `sed -n` for exact range. 2 consecutive offset errors → STOP Reading that file. Never guess offsets — `grep -n '<anchor>'` first.
54
59
 
55
60
  ---
56
61
 
@@ -145,13 +150,15 @@ You know this project's tech stack. Identify ALL test commands that apply (e.g.,
145
150
  - Runs tests using `TEST_CMD` after each task
146
151
  - Writes '## Implementation Log' to `context-snapshot.md`
147
152
 
148
- **3b-compact.** Context management — if plan.md has more than 5 tasks, run `/compact` after completing every 3 tasks during implementation. This prevents context window exhaustion in long sessions. If `/compact` is not available (non-Claude CLI), skip this step.
153
+ **3b-checkpoint.** Context management — if plan.md has more than 5 tasks, update durable checkpoints/artifacts after every 3 tasks, minimize output, and continue. If context overflow occurs in a headless run, the runner starts a fresh continuation session from those checkpoints and artifacts. In an interactive Claude Code session operated manually outside the headless pipeline, `/compact` may be used as an optional convenience only.
149
154
 
150
155
  **3c.** After implement completes, verify:
151
156
  1. All tasks in plan.md are `[x]`
152
- 2. Run the full test suite to ensure nothing is broken
153
- 3. Verify each acceptance criterion from Section 1 of context-snapshot.md is met check mentally, do NOT re-read files you already wrote
154
- 4. If any criterion is not met, fix it now using the convergence-based recovery loop below
157
+ 2. **Verification Gate Self-Check**: for each acceptance criterion, write one line of evidence (test name / file:line / fixture path). Any gate without evidence is BLOCKED, not success.
158
+ 3. **Layered test strategy**: debug with single-file tests (`npx vitest run <file> -t '<name>'`), only run full suite as gate when single-file is green. Never run full suite while a single-file test is still red.
159
+ 4. Run the full test suite to ensure nothing is broken
160
+ 5. Verify each acceptance criterion from Section 1 of context-snapshot.md is met — check mentally, do NOT re-read files you already wrote
161
+ 6. If any criterion is not met, fix it now using the convergence-based recovery loop below
155
162
 
156
163
  **CP-2**: All acceptance criteria met, all tests pass.
157
164
 
@@ -165,6 +172,8 @@ When tests fail, use convergence recovery — keep fixing while progress is bein
165
172
 
166
173
  **Key rule**: If failures decrease (even by 1), plateau counter resets. Do NOT block commit for unresolved failures — document and defer to next session.
167
174
 
175
+ **Hard Round Cap (BLOCKING)**: After **6 total test-fix rounds**, STOP trial-and-error. Write failure-log listing all hypotheses tried. Switch to: read full relevant source section ONCE (via `grep -n`+`sed -n`, never full Read), understand control flow, rewrite failing block in one shot. Do NOT exceed 7 total rounds.
176
+
168
177
 
169
178
  ### Scoped Feature Test Gate — PrizmKit Test
170
179
 
@@ -10,7 +10,7 @@
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 normal work subagents, wait for each to finish (run_in_background=false). The log-size monitor is the only allowed persistent background subagent.
13
+ **CRITICAL**: You MUST NOT exit until ALL work is complete and committed. When you spawn normal work subagents, wait for each to finish (run_in_background=false).
14
14
 
15
15
  **Tier 2 — Dual Agent**: You handle context + planning directly. Then spawn Dev and Reviewer subagents. Spawn Dev and Reviewer agents via the Agent tool.
16
16
 
@@ -57,6 +57,11 @@ You are running in **headless non-interactive mode** with a FINITE context windo
57
57
  5. **Minimize tool output** — Never load full command output into context. First capture to a temp file (`cmd 2>&1 | tee /tmp/out.txt | tail -20`), then scan the head/tail to identify relevant fields, and use targeted filtering (`grep`, `sed`, `awk`) to extract only the information needed for the current task. Only read the filtered result — never the raw full output.
58
58
  6. **No intermediate commits** — Do NOT run `git add`/`git commit` during Phase 1-5. All changes are committed once at the end in Phase 6 via `/prizmkit-committer`.
59
59
  7. **Capture test output once** — When running test suites, always use `($TEST_CMD) 2>&1 | tee /tmp/test-out.txt | tail -20`. Then grep `/tmp/test-out.txt` for details. Never re-run the suite just to apply a different filter.
60
+ 8. **Scaffold / generated file awareness** — Files created by scaffolding tools are boilerplate. Tag them, record in context-snapshot.md, NEVER re-read. Edit directly without reading first.
61
+ 9. **Package version verification (BLOCKING)** — Verify dependency versions via registry query before writing them. NEVER guess.
62
+ 10. **Build artifact hygiene** — After build/compile, ensure output is in `.gitignore`.
63
+ 11. **Anti re-read hard rule (BLOCKING)** — Once you have read a file into context, do NOT read the full file again. Use `grep -n '<pattern>' <file>` or `sed -n '<start>,<end>p' <file>` for specific lines. **20-step window**: full Read forbidden within 20 tool calls of last read. **3-strike**: 3 full Reads of same file → report BLOCKED. Applies to orchestrator AND subagents — subagents re-reading files in context-snapshot.md Section 4 are wasting context.
64
+ 12. **Read offset safety (BLOCKING)** — If Read returns "shorter than offset"/"File is empty"/"Wasted call" — do NOT retry same offset. Run `wc -l <file>` to get real line count, then `sed -n` for exact range. 2 consecutive offset errors → STOP Reading that file. Never guess offsets — `grep -n '<anchor>'` first.
60
65
 
61
66
  ---
62
67
 
@@ -276,10 +281,15 @@ Prompt:
276
281
  > ⚠️ DO NOT re-read source files already listed in Section 4 File Manifest unless you need implementation detail beyond the interface summary.
277
282
  > 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full context.
278
283
  > 2. Run `/prizmkit-implement` to execute the tasks in plan.md. Run tests with: `{{TEST_CMD}}`. Known baseline failures (pre-existing, not your fault): `{{BASELINE_FAILURES}}`.
279
- > 3. If plan.md has more than 5 tasks: run `/compact` after completing every 3 tasks to manage context budget. If `/compact` is unavailable, continue without it.
280
- > 4. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
281
- > 5. Do NOT execute any git commands (no git add/commit/reset/push).
282
- > Do NOT exit until all tasks are [x] and the '## Implementation Log' section is written in context-snapshot.md."
284
+ > 3. If plan.md has more than 5 tasks: update durable checkpoints/artifacts after every 3 tasks, minimize output, and rely on runner continuation if context overflow occurs. In an interactive Claude Code session operated manually outside the headless pipeline, `/compact` may be used as an optional convenience only.
285
+ > 4. **Verification Gate Self-Check (BLOCKING)**: before returning, write a `### Gate Evidence` section to Implementation Log one evidence line per gate (test name / file:line / fixture path). Any gate without evidence is BLOCKED, not success.
286
+ > 5. **Layered test strategy**: debug with single-file tests (`npx vitest run <file> -t '<name>'`), only run full suite as gate when single-file is green. Never run full suite while a single-file test is still red.
287
+ > 6. **Anti re-read**: 20-step window (full Read forbidden within 20 tool calls of last read), 3-strike (3 full Reads same file → BLOCKED). Use `grep -n`+`sed -n` for specific lines.
288
+ > 7. **Read offset safety**: if Read returns "shorter than offset"/"empty"/"wasted" — run `wc -l` then `sed -n`, do NOT retry same offset. 2 consecutive → STOP Reading that file.
289
+ > 8. **Hard Round Cap**: after 6 total test-fix rounds, STOP trial-and-error. Write failure-log. Switch to read-once-then-rewrite strategy. Do NOT exceed 7 rounds.
290
+ > 9. After implement completes, verify the '## Implementation Log' section (with Gate Evidence) was written to context-snapshot.md.
291
+ > 10. Do NOT execute any git commands (no git add/commit/reset/push).
292
+ > Do NOT exit until all tasks are [x] and the '## Implementation Log' section (with Gate Evidence) is written in context-snapshot.md."
283
293
 
284
294
  Wait for Dev to return. All tasks must be `[x]`, tests pass.
285
295
 
@@ -604,7 +614,7 @@ If you encounter an unrecoverable error, context overflow, or are about to exit
604
614
  - Build context-snapshot.md FIRST; all subagents read it instead of re-reading source files
605
615
  - context-snapshot.md is append-only: orchestrator writes Sections 1-4, Dev appends Implementation Log, Reviewer appends Review Notes
606
616
  - Gate checks enforce Implementation Log and Review Notes are written before proceeding
607
- - Do NOT use `run_in_background=true` when spawning normal work subagents; the log-size monitor is the only allowed persistent background subagent
617
+ - Do NOT use `run_in_background=true` when spawning normal work subagents
608
618
  - **NEVER delete, modify, or touch any file under `.prizmkit/state/`** — those are pipeline runtime files managed by the runner
609
619
  - NEVER run `rm -rf`, `git clean`, or any destructive filesystem operations
610
620
  - `/prizmkit-committer` is mandatory, and must not be replaced with manual git commit commands
@@ -10,7 +10,7 @@
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 normal work subagents, wait for each to finish (run_in_background=false). The log-size monitor is the only allowed persistent background subagent. Do NOT spawn work agents in background and exit — that kills the session.
13
+ **CRITICAL**: You MUST NOT exit until ALL work is complete and committed. When you spawn normal work subagents, wait for each to finish (run_in_background=false). Do NOT spawn work agents in background and exit — that kills the session.
14
14
 
15
15
  **Tier 3 — Full Team**: For complex features, use the full pipeline (Phase 0–6) with Dev + Reviewer agents spawned via the Agent tool.
16
16
 
@@ -57,6 +57,11 @@ You are running in **headless non-interactive mode** with a FINITE context windo
57
57
  5. **Minimize tool output** — Never load full command output into context. First capture to a temp file (`cmd 2>&1 | tee /tmp/out.txt | tail -20`), then scan the head/tail to identify relevant fields, and use targeted filtering (`grep`, `sed`, `awk`) to extract only the information needed for the current task. Only read the filtered result — never the raw full output.
58
58
  6. **No intermediate commits** — Do NOT run `git add`/`git commit` during Phase 1-5. All changes are committed once at the end in Phase 6 via `/prizmkit-committer`.
59
59
  7. **Batch independent operations** — Issue multiple independent `Write`/`Read` calls in a single message turn when they have no dependencies. Combine multiple `mkdir -p` into one command. Never run `npm test` twice just to apply a different grep filter — capture output to `/tmp/test-out.txt` once and grep the file.
60
+ 8. **Scaffold / generated file awareness** — Files created by scaffolding tools are boilerplate. Tag them, record in context-snapshot.md, NEVER re-read. Edit directly without reading first.
61
+ 9. **Package version verification (BLOCKING)** — Verify dependency versions via registry query before writing them. NEVER guess.
62
+ 10. **Build artifact hygiene** — After build/compile, ensure output is in `.gitignore`.
63
+ 11. **Anti re-read hard rule (BLOCKING)** — Once you have read a file into context, do NOT read the full file again. Use `grep -n '<pattern>' <file>` or `sed -n '<start>,<end>p' <file>` for specific lines. **20-step window**: full Read forbidden within 20 tool calls of last read. **3-strike**: 3 full Reads of same file → report BLOCKED. Applies to orchestrator AND subagents.
64
+ 12. **Read offset safety (BLOCKING)** — If Read returns "shorter than offset"/"File is empty"/"Wasted call" — do NOT retry same offset. Run `wc -l <file>` to get real line count, then `sed -n` for exact range. 2 consecutive offset errors → STOP Reading that file. Never guess offsets — `grep -n '<anchor>'` first.
60
65
 
61
66
  ---
62
67
 
@@ -284,10 +289,15 @@ Prompt:
284
289
  > ⚠️ DO NOT re-read source files already listed in Section 4 File Manifest unless you need implementation detail beyond the interface summary.
285
290
  > 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` for full context.
286
291
  > 2. Run `/prizmkit-implement` to execute the tasks in plan.md. Run tests with: `{{TEST_CMD}}`. Known baseline failures (pre-existing, not your fault): `{{BASELINE_FAILURES}}`.
287
- > 3. If plan.md has more than 5 tasks: run `/compact` after completing every 3 tasks to manage context budget. If `/compact` is unavailable, continue without it.
288
- > 4. After implement completes, verify the '## Implementation Log' section was written to context-snapshot.md.
289
- > 5. Do NOT execute any git commands (no git add/commit/reset/push).
290
- > Do NOT exit until all tasks are [x] and the '## Implementation Log' section is written in context-snapshot.md."
292
+ > 3. If plan.md has more than 5 tasks: update durable checkpoints/artifacts after every 3 tasks, minimize output, and rely on runner continuation if context overflow occurs. In an interactive Claude Code session operated manually outside the headless pipeline, `/compact` may be used as an optional convenience only.
293
+ > 4. **Verification Gate Self-Check (BLOCKING)**: before returning, write a `### Gate Evidence` section to Implementation Log one evidence line per gate (test name / file:line / fixture path). Any gate without evidence is BLOCKED, not success.
294
+ > 5. **Layered test strategy**: debug with single-file tests (`npx vitest run <file> -t '<name>'`), only run full suite as gate when single-file is green. Never run full suite while a single-file test is still red.
295
+ > 6. **Anti re-read**: 20-step window (full Read forbidden within 20 tool calls of last read), 3-strike (3 full Reads same file → BLOCKED). Use `grep -n`+`sed -n` for specific lines.
296
+ > 7. **Read offset safety**: if Read returns "shorter than offset"/"empty"/"wasted" — run `wc -l` then `sed -n`, do NOT retry same offset. 2 consecutive → STOP Reading that file.
297
+ > 8. **Hard Round Cap**: after 6 total test-fix rounds, STOP trial-and-error. Write failure-log. Switch to read-once-then-rewrite strategy. Do NOT exceed 7 rounds.
298
+ > 9. After implement completes, verify the '## Implementation Log' section (with Gate Evidence) was written to context-snapshot.md.
299
+ > 10. Do NOT execute any git commands (no git add/commit/reset/push).
300
+ > Do NOT exit until all tasks are [x] and the '## Implementation Log' section (with Gate Evidence) is written in context-snapshot.md."
291
301
 
292
302
  **Gate Check — Implementation Log**:
293
303
  After Dev agent returns, verify the Implementation Log was written:
@@ -638,7 +648,7 @@ If you encounter an unrecoverable error, context overflow, or are about to exit
638
648
  - Tier 3: full team — Dev (implementation) → Reviewer (review) — spawn agents directly via Agent tool
639
649
  - context-snapshot.md is append-only: orchestrator writes Sections 1-4, Dev appends Implementation Log, Reviewer appends Review Notes
640
650
  - Gate checks enforce Implementation Log and Review Notes are written before proceeding
641
- - Do NOT use `run_in_background=true` when spawning normal work agents; the log-size monitor is the only allowed persistent background subagent
651
+ - Do NOT use `run_in_background=true` when spawning normal work agents
642
652
  - Commit phase must use `/prizmkit-committer`; do NOT replace with manual git commit commands
643
653
  - **NEVER delete, modify, or touch any file under `.prizmkit/state/`** — those are pipeline runtime files managed by the runner
644
654
  - NEVER run `rm -rf`, `git clean`, or any destructive filesystem operations
@@ -13,7 +13,7 @@ You are the **bug fix session agent**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}".
13
13
 
14
14
  **CRITICAL**: You MUST NOT exit until ALL work is complete and committed.
15
15
 
16
- **SUBAGENT LIFECYCLE**: The log-size monitor is the only allowed persistent background subagent. Any normal work subagent must be awaited with `run_in_background=false`.
16
+ **SUBAGENT LIFECYCLE**: Any normal work subagent must be awaited with `run_in_background=false`. Do not spawn persistent background subagents for headless recovery.
17
17
 
18
18
  **NON-INTERACTIVE MODE**: There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input. Make decisions autonomously and move forward.
19
19
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  You are the **refactor session orchestrator**. Execute Refactor {{REFACTOR_ID}}: "{{REFACTOR_TITLE}}".
14
14
 
15
- **CRITICAL SESSION LIFECYCLE RULE**: You MUST NOT exit until ALL work is complete and session-status.json is written. When you spawn normal work subagents, you MUST **wait for each to finish** (run_in_background=false) before proceeding. The log-size monitor is the only allowed persistent background subagent. Do NOT spawn a work agent in the background and exit — that kills the session.
15
+ **CRITICAL SESSION LIFECYCLE RULE**: You MUST NOT exit until ALL work is complete and session-status.json is written. When you spawn normal work subagents, you MUST **wait for each to finish** (run_in_background=false) before proceeding. Do NOT spawn a work agent in the background and exit — that kills the session.
16
16
 
17
17
  **NON-INTERACTIVE MODE**: You are running in headless non-interactive mode. There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input, NEVER use interactive prompts (e.g. "Would you like me to…"). If a skill has an interactive step (e.g. offer remediation, ask for approval), skip it and proceed autonomously. Make decisions based on the data available and move forward.
18
18
 
@@ -185,7 +185,7 @@ Evidence must cover affected UI render, primary user interactions, behavior-sens
185
185
 
186
186
  {{END_IF_BROWSER_INTERACTION}}
187
187
 
188
- 7. If the refactor involves multiple files: run `/compact` after completing half the tasks to free context budget. If `/compact` is unavailable, continue without it.
188
+ 7. If the refactor involves multiple files: update durable checkpoints/artifacts at the midpoint, minimize output, and rely on runner continuation if context overflow occurs. In an interactive Claude Code session operated manually outside the headless pipeline, `/compact` may be used as an optional convenience only.
189
189
  8. After all tasks complete, run the full test suite one final time
190
190
  "
191
191
  - **Wait for Dev to return**
@@ -337,4 +337,4 @@ Write to: `{{SESSION_STATUS_PATH}}`
337
337
  - **Commit with** `refactor(<scope>):` prefix, NOT `feat:` or `fix:`
338
338
  - **Run full retrospective** (Job 1 + Job 2) — refactoring changes code structure
339
339
  - ALWAYS write session-status.json before exiting
340
- - Do NOT use `run_in_background=true` when spawning normal work agents; the log-size monitor is the only allowed persistent background subagent
340
+ - Do NOT use `run_in_background=true` when spawning normal work agents
@@ -32,3 +32,5 @@ You are running in **headless non-interactive mode** with a FINITE context windo
32
32
  - **This is a BLOCKING gate**: do NOT run `npm install` / `pip install` / `cargo build` / `go mod tidy` until ALL versions in the manifest have been verified or use open constraints
33
33
  - Batch version lookups: query multiple packages in parallel to save time (e.g., run multiple `npm view` commands concurrently)
34
34
  10. **Build artifact hygiene** — After any build/compile command (`go build`, `npm run build`, `tsc`, etc.), ensure the output binary, build directory, generated bundle, or cache directory is ignored by git before the commit phase. Never commit compiled binaries, build output, or generated artifacts.
35
+ 11. **Anti re-read hard rule (BLOCKING)** — Re-reading the same file is the #1 context burner in long sessions. Once you have read a file into context (directly or via context-snapshot.md Section 4), do NOT read the full file again. Instead use `grep -n '<pattern>' <file>` or `sed -n '<start>,<end>p' <file>` for specific lines. **20-step window**: full Read forbidden within 20 tool calls of last read. **3-strike**: 3 full Reads of same file → report BLOCKED. Never full-file Read a file already summarized in context-snapshot.md Section 4.
36
+ 12. **Read offset safety (BLOCKING)** — If Read returns "shorter than offset"/"File is empty"/"Wasted call" — do NOT retry same offset. Run `wc -l <file>` to get real line count, then `sed -n` for exact range. 2 consecutive offset errors → STOP Reading that file. Never guess offsets — `grep -n '<anchor>'` first.
@@ -1,76 +1,20 @@
1
- ## Session Log Budget Monitoring (PROACTIVE)
1
+ ## Session Log Budget Awareness (CHECKPOINT GUIDANCE)
2
2
 
3
- Your session log grows with every tool call and subagent spawn.
4
- To prevent context exhaustion, **spawn a background monitoring subagent at session start**.
3
+ This section provides passive checkpoint guidance for checkpoint/continuation only. Context-saving rules (anti re-read, output filtering) live in Context Budget Rules above — do not duplicate.
5
4
 
6
- ### How to Set Up the Monitor
5
+ ### Checkpoint Before Large Work Batches
7
6
 
8
- 1. **AS THE VERY FIRST ACTION** (before Phase 0), spawn a monitoring subagent
9
- with `run_in_background: true` and this task:
7
+ - `MAX_LOG_SIZE` controls whether this advisory section is included.
8
+ - Before major phases or large task batches, update durable artifacts: plan/task checkboxes, context snapshots, implementation/review notes, workflow checkpoints, session status, test reports.
9
+ - Checkpoint often so automatic continuation can resume from durable state.
10
10
 
11
- ```
12
- Run this command and keep it running:
13
- bash {{LOG_MONITOR_SCRIPT}} {{SESSION_LOG_PATH}} {{MAX_LOG_SIZE}} {{LOG_MONITOR_POLL_INTERVAL}} {{LOG_MONITOR_STATUS_FILE}} {{LOG_MONITOR_BASELINE_FILE}}
14
- ```
11
+ ### Headless Recovery Source of Truth
15
12
 
16
- The subagent MUST use `run_in_background: true`. It writes a JSON status
17
- file every {{LOG_MONITOR_POLL_INTERVAL}} seconds.
13
+ - Headless recovery must rely on durable checkpoints and artifacts, not interactive slash commands.
14
+ - If context overflow occurs, the runner detects it and starts a fresh continuation session from checkpoint files and durable artifacts.
15
+ - Durable checkpoint files are the source of truth for what was completed, what remains, and which gates were already run.
18
16
 
19
- 2. **BEFORE EACH MAJOR PHASE** (Phase 0, 1, 2, ...), read the status:
17
+ ### Interactive Claude Code Note
20
18
 
21
- ```bash
22
- cat {{LOG_MONITOR_STATUS_FILE}} 2>/dev/null || echo '{"status":"OK"}'
23
- ```
24
-
25
- The status file contains structured diagnostics:
26
-
27
- ```json
28
- {
29
- "status": "OK | COMPACT_NEEDED",
30
- "total_bytes": <current session.log size>,
31
- "baseline_bytes": <size after last /compact>,
32
- "effective_bytes": <total - baseline, incremental growth>,
33
- "threshold_bytes": <{{MAX_LOG_SIZE}}>,
34
- "overage_bytes": <effective - threshold, 0 when OK>,
35
- "usage_pct": <effective / threshold * 100>
36
- }
37
- ```
38
-
39
- Extract fields for decision-making:
40
- ```bash
41
- status=$(jq -r '.status' {{LOG_MONITOR_STATUS_FILE}})
42
- effective=$(jq -r '.effective_bytes' {{LOG_MONITOR_STATUS_FILE}})
43
- overage=$(jq -r '.overage_bytes' {{LOG_MONITOR_STATUS_FILE}})
44
- usage=$(jq -r '.usage_pct' {{LOG_MONITOR_STATUS_FILE}})
45
- ```
46
-
47
- 3. **On COMPACT_NEEDED** (effective_bytes > {{MAX_LOG_SIZE}} bytes, {{MAX_LOG_SIZE_HUMAN}}):
48
- - Check `overage_bytes` to decide urgency:
49
- - **Minor overage** (< 512KB): complete the current sub-step, update durable workflow checkpoint artifacts, write baseline, `/compact`
50
- - **Major overage** (>= 512KB): update durable workflow checkpoint artifacts, write baseline, `/compact` — do NOT start new work
51
- - Write baseline before `/compact`:
52
- ```bash
53
- wc -c < {{SESSION_LOG_PATH}} > {{LOG_MONITOR_BASELINE_FILE}}
54
- ```
55
- - Execute `/compact`
56
- - Continue the workflow after `/compact`; re-read this status file before the next major phase
57
-
58
- ### How the Baseline Prevents Infinite Compaction Loops
59
-
60
- - Before the first `/compact`: baseline = 0, effective = full log size → triggers when log exceeds threshold
61
- - After `/compact`: baseline = current log size, effective ≈ 0 → status resets to OK
62
- - The monitor only triggers again when **new** log growth since the last compact exceeds the threshold
63
- - Each `/compact` resets the baseline, breaking the infinite loop
64
-
65
- ### Log Growth Reduction Tips
66
-
67
- - **Re-read context-snapshot.md instead of source files** — already in context
68
- - **Filter command output** — pipe to `tail -20` or `grep`, never full output
69
- - **Limit subagent prompts** — shorter, focused prompts = shorter transcripts
70
- - **Checkpoint often** — update durable workflow checkpoint artifacts before `/compact`
71
-
72
- ### What Survives
73
-
74
- - All git commits are permanent
75
- - The workflow checkpoint is preserved and auto-resumed
76
- - `/compact` compresses context without losing progress
19
+ - `/compact` may help when a human is manually operating an interactive Claude Code session.
20
+ - `/compact` is optional interactive convenience only — not required for headless recovery.
@@ -1,14 +1,22 @@
1
1
  - **Section 3 — Key TRAPS & RULES**: extract only relevant TRAPS/RULES from prizm-docs. Do NOT copy full L0/L1/L2 content — the orchestrator already loaded them.
2
- - **Section 4 — File Manifest**: For each file relevant to this feature, list: file path, why it's needed (modify/reference/test), key interface signatures (function names + params + return types). Do NOT include full file content agents read files on-demand. Format:
2
+ - **Section 4 — File Manifest**: For each file, list: path, why needed, and a **key-content summary** so you do NOT need to re-read the file. Format depends on file type:
3
+ - **Code files** (JS/TS/Python/Go): function signatures. Example: `config` (Zod object), `loadConfig(path)→Config`.
4
+ - **Shell scripts** (`.sh`): command-line args, key behavior branches, sourced libs, critical line ranges. Example: `args: --feature-id; sources lib/common.sh; lines 120-180 worktree logic`.
5
+ - **Config/manifest** (`package.json`, `tsconfig.json`, `.env`): key scripts/fields/deps/env vars. Example: `scripts:{dev,test}, deps:{vitest}, env:USE_WORKTREE`.
6
+ - **Docs/README**: section headings + 2-3 relevant sections only.
7
+ - **Test files**: test names + what each tests (1 line each).
8
+ Format:
3
9
  ### Files to Modify
4
- | File | Why Needed | Key Interfaces |
5
- |------|-----------|----------------|
6
- | `<source-dir>/config.js` | Add runtime config layer | `config` (Zod object), `configSchema` |
10
+ | File | Why Needed | Key Content Summary |
11
+ |------|-----------|---------------------|
12
+ | `<src>/config.js` | Add config layer | `config`, `configSchema`, `loadConfig(p)→Config` |
13
+ | `dev-pipeline/run-feature.sh` | Remove shell entry | args:--feature-id; lines 120-180 worktree |
7
14
 
8
15
  ### Files for Reference
9
- | File | Why Needed | Key Interfaces |
10
- |------|-----------|----------------|
11
- | `<source-dir>/security/permission-guard.js` | Permission check integration | `checkCommandPermission(userId, cmd)` |
16
+ | File | Why Needed | Key Content Summary |
17
+ |------|-----------|---------------------|
18
+ | `<src>/permission-guard.js` | Perm check | `checkPermission(uid,cmd)→bool` |
19
+ | `package.json` | Test cmd+deps | scripts:{test:vitest}, deps:{vitest} |
12
20
 
13
21
  ### Known TRAPS (from .prizmkit/prizm-docs/)
14
22
  - <trap entries extracted from L1/L2 docs>
@@ -1,40 +1,53 @@
1
- ### Implement — Dev Subagent
1
+ ### Implement — Orchestrator Direct (no Dev subagent)
2
2
 
3
- **Protocol handoff to Dev**: The Dev prompt already carries the required subset of Context Budget Rules, the Test Failure Recovery Protocol, and Task Contract / Verification Gate constraints. Do not duplicate those rules here; verify Dev output against the gates below.
3
+ **Rationale**: Development is deterministic plan execution the orchestrator already built full context in Phase 1. Spawning a Dev subagent forces it to rebuild context (re-reading files the orchestrator already read), wastes context, and risks worktree double-edit. The orchestrator implements directly.
4
4
 
5
- **Spawn Agent**:
6
- | Parameter | Value |
7
- |-----------|-------|
8
- | subagent_type | prizm-dev-team-dev |
9
- | run_in_background | false |
10
- | isolation | Leave empty — Dev works directly in the repo, no worktree |
11
-
12
- **Agent spawn failure policy**:
13
- - If spawning Dev fails with team/config/lock errors, retry at most once.
14
- - If the second attempt fails, do not enter Implementation Log polling or repeated recovery spawn loops.
15
- - Use the documented inline/recovery fallback: write `failure-log.md` with the spawn error and last observable state, then either complete remaining tasks directly in the orchestrator or stop with a clear failure for recovery.
16
- - Apply the same cap to Dev re-spawns for Implementation Log repair or resume prompts; do not burn multiple minutes on identical team/config/lock failures.
17
-
18
- **Prompt**:
19
- > {{AGENT_PROMPT_DEV_IMPLEMENT}}
20
-
21
- Wait for Dev to return. Implementation may proceed only when tasks are complete and the Test Failure Recovery Protocol's Success Rule is satisfied.
5
+ Before starting, check plan.md Tasks:
6
+ ```bash
7
+ grep -c '^\- \[ \]' .prizmkit/specs/{{FEATURE_SLUG}}/plan.md 2>/dev/null || true
8
+ ```
9
+ - If result is `0` (all tasks already `[x]`) → **SKIP to Review**.
10
+ - If non-zero implement directly below.
22
11
 
23
- **No silent artifact polling**:
24
- - Do NOT run a long no-output loop that only waits for `## Implementation Log` or any other file marker.
25
- - If you must wait for Dev after spawning or sending a status request, use short bounded checks (≤120s) that print a heartbeat line each iteration with: elapsed time, remaining unchecked task count, whether `## Implementation Log` exists, and whether `git diff --stat` changed.
26
- - If Dev has no transcript/file/diff progress for one bounded check, send one status request. If there is still no progress on the next bounded check, stop waiting, write `failure-log.md` with the last observable state, and follow Subagent Timeout Recovery.
27
- - Prefer the Agent tool's completion notification or Dev's `COMPLETION_SIGNAL`; file presence alone is not a liveness signal.
12
+ **Build artifacts rule**: After any build/compile command, ensure output is in `.gitignore`. Never commit binaries/build output.
28
13
 
29
- **Gate Check Implementation Log**:
30
- After Dev agent returns, verify the Implementation Log was written:
14
+ **3a.** Detect test commands and record baseline:
31
15
  ```bash
32
- grep -q "## Implementation Log" .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md && echo "GATE:PASS" || echo "GATE:MISSING"
16
+ ($TEST_CMD) 2>&1 | tee /tmp/test-baseline.txt | tail -20
33
17
  ```
34
- If GATE:MISSING — send message to Dev (re-spawn if needed): "Write the '## Implementation Log' section to context-snapshot.md before I can proceed to review. Include: files changed/created, key decisions, deviations from plan, notable discoveries."
35
18
 
19
+ **3b.** Run `/prizmkit-implement` directly — you (the orchestrator) execute the full cycle:
20
+ - Read plan.md Tasks from `.prizmkit/specs/{{FEATURE_SLUG}}/`
21
+ - Use context-snapshot.md Section 4 File Manifest for targeted reads — do NOT re-read files already summarized there
22
+ - Implement task-by-task with TDD, marking each `[x]` immediately
23
+ - Creates/updates L2 `.prizm` docs when creating new modules
24
+ - Runs tests using `TEST_CMD`
25
+ - If plan.md has >5 tasks: update checkpoints after every 3 tasks
26
+
27
+ **3c. Layered test strategy** (replaces "run full suite every 3 Edits"):
28
+ - Debugging a single test: `npx vitest run <test-file> -t '<test name>'` (or per-stack equivalent). Capture to `/tmp/test-out.txt`, grep for failures.
29
+ - Only when single-file is green, run ONE full `{{TEST_CMD}}` as the gate.
30
+ - Never run full suite while a single-file test is still red.
31
+
32
+ **3d. Verification Gate Self-Check (BLOCKING — before declaring implement done)**:
33
+ For each Verification Gate from the Task Contract, write one evidence line to Implementation Log:
34
+ ```
35
+ ### Gate Evidence
36
+ - [x] G1: <gate text> — Evidence: <test name / file:line / fixture path>
37
+ - [ ] G3: <gate text> — BLOCKED: <reason> ← no evidence = BLOCKED, not success
38
+ ```
39
+
40
+ **3e.** Append `## Implementation Log` (with Gate Evidence) to `context-snapshot.md`:
41
+ - files changed/created
42
+ - key decisions
43
+ - deviations from plan
44
+ - test results
45
+ - Gate Evidence section
46
+ - unresolved blockers
47
+
48
+ **CP-2**: All tasks `[x]`, Implementation Log written with Gate Evidence, Test Failure Recovery Protocol's Success Rule satisfied. Blocked gates → `failure-log.md`, not success.
36
49
 
37
- **Checkpoint update**: Run the update script to set step `prizmkit-implement` to `"completed"`:
50
+ **Checkpoint update**:
38
51
  ```bash
39
52
  python3 $PIPELINE_DIR/scripts/update-checkpoint.py \
40
53
  --checkpoint-path {{CHECKPOINT_PATH}} \
@@ -1,52 +1,54 @@
1
- ### Implement — Dev Agent
1
+ ### Implement — Orchestrator Direct (no Dev subagent)
2
2
 
3
- **Protocol handoff to Dev**: The Dev prompt already carries the required subset of Context Budget Rules, the Test Failure Recovery Protocol, and Task Contract / Verification Gate constraints. Do not duplicate those rules here; verify Dev output against the gates below.
3
+ **Rationale**: Development is deterministic plan execution the orchestrator already built full context in Phase 1-2. Spawning a Dev subagent forces it to rebuild context (re-reading files the orchestrator already read), wastes context, and risks worktree double-edit. The orchestrator implements directly.
4
4
 
5
- Before spawning Dev, check plan.md Tasks section:
5
+ Before starting, check plan.md Tasks:
6
6
  ```bash
7
7
  grep -c '^\- \[ \]' .prizmkit/specs/{{FEATURE_SLUG}}/plan.md 2>/dev/null || true
8
8
  ```
9
- - If result is `0` (all tasks already `[x]`) → **SKIP this phase**, go directly to Review. Do NOT spawn Dev.
10
- - If result is non-zero → spawn Dev agent below.
11
-
12
- **Spawn Agent**:
13
- | Parameter | Value |
14
- |-----------|-------|
15
- | subagent_type | prizm-dev-team-dev |
16
- | run_in_background | false |
17
-
18
- **Agent spawn failure policy**:
19
- - If spawning Dev fails with team/config/lock errors, retry at most once.
20
- - If the second attempt fails, do not enter Implementation Log polling or repeated recovery spawn loops.
21
- - Use the documented inline/recovery fallback: write `failure-log.md` with the spawn error and last observable state, then either complete remaining tasks directly in the orchestrator or stop with a clear failure for recovery.
22
- - Apply the same cap to Dev re-spawns for Implementation Log repair or resume prompts; do not burn multiple minutes on identical team/config/lock failures.
23
-
24
- **Prompt**:
25
- > {{AGENT_PROMPT_DEV_IMPLEMENT}}
26
-
27
- **No silent artifact polling**:
28
- - Do NOT run a long no-output loop that only waits for `## Implementation Log` or any other file marker.
29
- - If you must wait for Dev after spawning or sending a status request, use short bounded checks (≤120s) that print a heartbeat line each iteration with: elapsed time, remaining unchecked task count, whether `## Implementation Log` exists, and whether `git diff --stat` changed.
30
- - If Dev has no transcript/file/diff progress for one bounded check, send one status request. If there is still no progress on the next bounded check, stop waiting, write `failure-log.md` with the last observable state, and follow Subagent Timeout Recovery.
31
- - Prefer the Agent tool's completion notification or Dev's `COMPLETION_SIGNAL`; file presence alone is not a liveness signal.
32
-
33
- **Gate Check — Implementation Log**:
34
- After Dev agent returns, verify the Implementation Log was written:
9
+ - If result is `0` (all tasks already `[x]`) → **SKIP to Review**.
10
+ - If non-zero → implement directly below.
11
+
12
+ **Build artifacts rule**: After any build/compile command, ensure output is in `.gitignore`. Never commit binaries/build output.
13
+
14
+ **3a.** Detect test commands and record baseline:
35
15
  ```bash
36
- grep -q "## Implementation Log" .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md && echo "GATE:PASS" || echo "GATE:MISSING"
16
+ ($TEST_CMD) 2>&1 | tee /tmp/test-baseline.txt | tail -20
17
+ ```
18
+ Save pre-existing failing tests as `BASELINE_FAILURES`.
19
+
20
+ **3b.** Run `/prizmkit-implement` directly — you (the orchestrator) execute the full cycle:
21
+ - Read plan.md Tasks from `.prizmkit/specs/{{FEATURE_SLUG}}/`
22
+ - Use context-snapshot.md Section 4 File Manifest for targeted reads — do NOT re-read files already summarized there
23
+ - Implement task-by-task with TDD, marking each `[x]` immediately
24
+ - Creates/updates L2 `.prizm` docs when creating new modules
25
+ - Runs tests using `TEST_CMD`
26
+ - If plan.md has >5 tasks: update checkpoints after every 3 tasks
27
+
28
+ **3c. Layered test strategy** (replaces "run full suite every 3 Edits"):
29
+ - Debugging a single test: `npx vitest run <test-file> -t '<test name>'` (or per-stack equivalent). Capture to `/tmp/test-out.txt`, grep for failures.
30
+ - Only when single-file is green, run ONE full `{{TEST_CMD}}` as the gate.
31
+ - Never run full suite while a single-file test is still red.
32
+
33
+ **3d. Verification Gate Self-Check (BLOCKING — before declaring implement done)**:
34
+ For each Verification Gate from the Task Contract, write one evidence line to Implementation Log:
35
+ ```
36
+ ### Gate Evidence
37
+ - [x] G1: <gate text> — Evidence: <test name / file:line / fixture path>
38
+ - [ ] G3: <gate text> — BLOCKED: <reason> ← no evidence = BLOCKED, not success
37
39
  ```
38
- If GATE:MISSING — send message to Dev (re-spawn if needed): "Write the '## Implementation Log' section to context-snapshot.md before I can proceed to review. Include: files changed/created, key decisions, deviations from plan, notable discoveries."
39
-
40
- Wait for Dev to return. **If Dev times out before all tasks are `[x]`**:
41
- 1. Check progress: `grep -c '^\- \[ \]' .prizmkit/specs/{{FEATURE_SLUG}}/plan.md`
42
- 2. If any tasks remain: re-spawn Dev with this recovery prompt:
43
- > {{AGENT_PROMPT_DEV_RESUME}}
44
- 3. Max 2 recovery retries. After 2 failures, orchestrator implements remaining tasks directly.
45
40
 
46
- Implementation phase is complete only when all tasks are `[x]` and the Test Failure Recovery Protocol's Success Rule is satisfied.
41
+ **3e.** Append `## Implementation Log` (with Gate Evidence) to `context-snapshot.md`:
42
+ - files changed/created
43
+ - key decisions
44
+ - deviations from plan
45
+ - test results
46
+ - Gate Evidence section
47
+ - unresolved blockers
47
48
 
49
+ **CP-2**: All tasks `[x]`, Implementation Log written with Gate Evidence, Test Failure Recovery Protocol's Success Rule satisfied. Blocked gates → `failure-log.md`, not success.
48
50
 
49
- **Checkpoint update**: Run the update script to set step `prizmkit-implement` to `"completed"`:
51
+ **Checkpoint update**:
50
52
  ```bash
51
53
  python3 $PIPELINE_DIR/scripts/update-checkpoint.py \
52
54
  --checkpoint-path {{CHECKPOINT_PATH}} \
@@ -19,6 +19,10 @@ Use this protocol whenever implementation or review tests fail. Its purpose is t
19
19
  4. Stop after a plateau: same failure count and same failing tests for 3 consecutive rounds.
20
20
  5. If failures decrease, reset the plateau counter.
21
21
 
22
+ ### Hard Round Cap (BLOCKING)
23
+
24
+ After **6 total test-fix rounds**, STOP trial-and-error. Write failure-log listing all hypotheses tried. Switch to: read full relevant source section ONCE (via `grep -n`+`sed -n`, never full Read), understand control flow, rewrite failing block in one shot. Do NOT exceed 7 total rounds.
25
+
22
26
  ### Success Rule
23
27
 
24
28
  Proceed to review only when:
@@ -19,6 +19,10 @@ Use this protocol whenever implementation tests fail. Its purpose is to distingu
19
19
  4. Stop after a plateau: same failure count and same failing tests for 3 consecutive rounds.
20
20
  5. If failures decrease, reset the plateau counter.
21
21
 
22
+ ### Hard Round Cap (BLOCKING)
23
+
24
+ After **6 total test-fix rounds**, STOP trial-and-error. Write failure-log listing all hypotheses tried. Switch to: read full relevant source section ONCE (via `grep -n`+`sed -n`, never full Read), understand control flow, rewrite failing block in one shot. Do NOT exceed 7 total rounds.
25
+
22
26
  ### Success Rule
23
27
 
24
28
  Proceed only when:
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "status": {
17
17
  "type": "string",
18
- "enum": ["success", "partial", "failed", "commit_missing", "docs_missing", "merge_conflict"]
18
+ "enum": ["success", "partial", "failed", "commit_missing", "docs_missing", "merge_conflict", "context_overflow"]
19
19
  },
20
20
  "completed_phases": {
21
21
  "type": "array",
@@ -24,5 +24,6 @@ def _load_hyphenated_module(module_name, filename):
24
24
  # Register hyphenated script files so tests can import them with underscores.
25
25
  _load_hyphenated_module("generate_bootstrap_prompt", "generate-bootstrap-prompt.py")
26
26
  _load_hyphenated_module("generate_bugfix_prompt", "generate-bugfix-prompt.py")
27
+ _load_hyphenated_module("generate_refactor_prompt", "generate-refactor-prompt.py")
27
28
  _load_hyphenated_module("prizmkit_test_gate", "prizmkit-test-gate.py")
28
29
  _load_hyphenated_module("update_feature_status", "update-feature-status.py")