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
@@ -1,161 +0,0 @@
1
- ---
2
- name: "prizmkit-code-review"
3
- description: "Iterative review-fix loop against spec and plan. Spawns a read-only Reviewer agent, filters findings, then a Dev agent applies fixes. Loops until PASS (max 3 rounds). Use after /prizmkit-implement as quality gate. Trigger on: 'review', 'check code', 'code review', 'is it ready to commit'. (project)"
4
- ---
5
-
6
- # PrizmKit Code Review
7
-
8
- An iterative review-fix loop that reviews code changes against the spec and plan, then automatically fixes issues. Uses three separated roles:
9
-
10
- - **Reviewer Agent** (read-only): analyzes git diff against spec goals and plan decisions, produces structured findings
11
- - **Main Agent** (orchestrator): filters Reviewer findings for reasonableness, coordinates the loop
12
- - **Dev Agent** (read-write): applies fixes for accepted findings
13
-
14
- The loop repeats until the Reviewer finds no issues or the max round limit is reached.
15
-
16
- ### When to Use
17
- - After `/prizmkit-implement` to verify code quality before commit
18
- - User says "review", "check code", "review my implementation"
19
- - As a quality gate before `/prizmkit-committer`
20
-
21
- ### When NOT to Use
22
- - Trivial changes (typo, single-line config) → commit directly
23
- - No spec.md or plan.md exists → nothing to review against
24
-
25
- ## Input
26
-
27
- | Parameter | Required | Description |
28
- |-----------|----------|-------------|
29
- | `artifact_dir` | No | Directory containing spec.md + plan.md. If omitted, scan `.prizmkit/` subdirectories for the most recently modified directory with a `plan.md` whose tasks are all completed. When invoked as a handoff step, reuse the caller's `artifact_dir` rather than re-detecting. |
30
-
31
- ## Phase 0: Context Loading
32
-
33
- 1. **Read spec.md** from the artifact directory — extract goals and acceptance criteria.
34
- 2. **Read plan.md** from the artifact directory — extract architecture decisions and completed tasks.
35
- 3. **Read scoped test report when present**:
36
- - If `{artifact_dir}/test-report-path.txt` exists, read the path, then read that `/prizmkit-test` report.
37
- - Extract `Scope`, `Generated / Updated Tests`, `In-Scope Failures`, `Baseline Failures`, `Out of Scope Gaps`, `Boundary Matrix` / `Boundary Completion Gate` when present, and `Verdict`.
38
- - If `context-snapshot.md` contains `## PrizmKit Test Gate`, read that summary too.
39
- - If this is a feature artifact under `.prizmkit/specs/` and no test report pointer or summary exists, pass `No scoped /prizmkit-test report found` into the Reviewer context so the reviewer can flag the missing gate.
40
- 4. **Read dev rules** (if configured): If `.prizmkit/prizm-docs/root.prizm` exists, read it and check for a `RULES:` line. If present, read all referenced `.prizmkit/rules/<layer>-rules.md` files. If `root.prizm` or a referenced rules file does not exist, continue with "No custom dev rules configured — use general best practices."
41
- 5. **Capture workspace diff**: run `git diff` (unstaged) + `git diff --cached` (staged) + `git status` to understand the full scope of changes. For new files in git status, note their paths for the Reviewer to read.
42
- - If no changes are detected, skip Phase 1 and proceed to Phase 2 with verdict PASS, rounds 0, and an empty findings list. Always write `review-report.md`; downstream pipeline steps use it as the review gate.
43
-
44
- ## Phase 1: Review-Fix Loop
45
-
46
- ### Gate Mode Detection
47
-
48
- The loop exit conditions are enforced by a gatekeeper. Check Python availability first:
49
-
50
- ```bash
51
- python3 --version 2>/dev/null && echo "SCRIPT_MODE" || echo "TEXT_MODE"
52
- ```
53
-
54
- - **Script mode** (Python available): Use `${SKILL_DIR}/scripts/check_loop.py` to enforce exit conditions with round tracking, max-rounds enforcement, and divergence detection. The script prevents accidentally exceeding the 3-round limit.
55
- - **Text mode** (no Python): Follow §Text Fallback Constraints — identical behavior enforced manually.
56
-
57
- ### Step 0: Initialize Loop State
58
-
59
- The script is stateless — no `--reset` or runtime files. Initialize these values before starting:
60
-
61
- **Script mode** — `findings_history = []`, `max_rounds = 3`, `round = 1`.
62
- **Text mode** — track manually: `round = 1`, `findings_history = []`.
63
-
64
- ### Loop Flow
65
-
66
- ```
67
- 1. Spawn Reviewer Agent (read-only) → findings or PASS
68
- 2. Parse result:
69
- - PASS → Call Loop Exit Gate → Phase 2
70
- - NEEDS_FIXES → count findings → Step 3 (do not call gate yet)
71
- 3. Main Agent filters findings → Call Loop Exit Gate → if endLoop: Phase 2
72
- 4. Spawn Dev Agent (read-write) → apply fixes
73
- 5. Increment round and return to Step 1
74
- ```
75
-
76
- ### Loop Exit Gate
77
-
78
- Call the gate only in these cases:
79
-
80
- 1. Reviewer returned `PASS`.
81
- 2. Main Agent has finished filtering `NEEDS_FIXES` findings.
82
-
83
- Do not call the gate for `NEEDS_FIXES` before filtering, because `accepted_count` is not known yet. Only exit the loop when `endLoop` is `true` — the gate is the sole authority on exit decisions.
84
-
85
- **Script mode invocation:**
86
- ```bash
87
- echo '{"reviewer_result":"NEEDS_FIXES","accepted_count":2,"findings_count":3,"round":1,"findings_history":[],"max_rounds":3,"filtering_done":true}' | python3 ${SKILL_DIR}/scripts/check_loop.py
88
- ```
89
-
90
- | Input field | Type | Description |
91
- |-------------|------|-------------|
92
- | `reviewer_result` | `"PASS"` or `"NEEDS_FIXES"` | Reviewer's verdict |
93
- | `accepted_count` | int | Findings accepted by Main Agent. Use `0` for Reviewer PASS or when all findings were rejected after filtering. |
94
- | `findings_count` | int | Total findings returned by Reviewer this round |
95
- | `round` | int | Current round number (1-based, model-supplied — the script does not auto-increment) |
96
- | `findings_history` | `[int, ...]` | Findings count per round, used for divergence detection. Initialize as `[]`. Pass back the value from the previous gate call's output. |
97
- | `max_rounds` | int | Maximum review rounds before forced exit. Default `3`. |
98
- | `filtering_done` | bool | `true` only after Main Agent has filtered `NEEDS_FIXES` findings. For Reviewer PASS, this may be omitted. |
99
-
100
- Output: `{"endLoop": bool, "reason": str, "verdict": "PASS"|"NEEDS_FIXES"|null, "round": int, "maxRounds": int, "divergenceWarning": bool, "findings_history": [int, ...]}`
101
-
102
- The script enforces three exit conditions in order: (1) Reviewer PASS → exit with verdict PASS, (2) filtered `NEEDS_FIXES` with zero accepted findings → exit with verdict PASS, (3) max rounds reached after filtering → exit with verdict NEEDS_FIXES. It records `findings_count` once per round by round index, so repeated gate calls cannot duplicate history entries. If `divergenceWarning` is true, warn the user the loop may not be converging.
103
-
104
- **Text mode** — enforce §Text Fallback Constraints manually with identical logic.
105
-
106
- ### Text Fallback Constraints
107
-
108
- When Python is unavailable, apply these rules exactly — they match the script's logic:
109
-
110
- 1. **PASS exit**: Reviewer returns `PASS` → exit loop, verdict PASS.
111
- 2. **Pre-filter NEEDS_FIXES**: Count findings and continue to filtering. Do not apply all-rejected or max-round exits before filtering.
112
- 3. **All-rejected exit**: After filtering, if all findings were rejected → exit loop, verdict PASS.
113
- 4. **Max rounds**: After filtering, if `round >= 3` and accepted findings remain → exit loop, verdict NEEDS_FIXES. Write `review-report.md` with unresolved findings.
114
- 5. **Divergence**: If findings count strictly increases for 3 consecutive recorded rounds, warn user the loop may not converge.
115
- 6. **Counter**: Increment `round` after each complete cycle (Steps 1-4). Track `findings_history` by round index to detect divergence — record `findings_count` once per round.
116
-
117
- ### Step 1: Spawn Reviewer Agent
118
-
119
- Include the dev rules read in Phase 0 step 3 in the `## Dev Rules` section of the prompt. Spawn a platform-supported **read-only** reviewer agent; use `subagent_type: Explore` only on platforms that support it. If no read-only agent is available, perform the review in the Main Agent without editing files. Read `${SKILL_DIR}/references/reviewer-agent-prompt.md` for the full prompt template — fill `{goals}`, `{plan decisions}`, `{dev rules}`, `{round N}`, and `{round_context}` before spawning.
120
-
121
- Round context varies by round:
122
- - Round 1: "This is the first review. Examine all changes comprehensively."
123
- - Round 2+: "Previous round found issues that were fixed. Focus on: (1) whether previous fixes are correct, (2) whether fixes introduced new problems, (3) any remaining issues. Do not re-report issues that have already been fixed."
124
-
125
- ### Step 2: Check Result + Gate
126
-
127
- Parse the Reviewer Agent's output:
128
- - If `Result: PASS` → call the **Loop Exit Gate** with `{"reviewer_result": "PASS", "accepted_count": 0, "findings_count": 0, "round": <current_round>, "findings_history": <current_history>, "max_rounds": 3}`. If `endLoop=true`, proceed to Phase 2.
129
- - If `Result: NEEDS_FIXES` → count findings, do not call the gate yet, then continue to Step 3.
130
-
131
- ### Step 3: Main Agent Filters Findings + Gate
132
-
133
- Review each finding and decide whether it's reasonable. This prevents unnecessary or harmful changes.
134
-
135
- **For each finding, evaluate:**
136
- - Is this relevant to the current changes? (Reject findings about unmodified, unrelated code.)
137
- - Is this a real problem or a subjective style preference? (Reject pure style preferences unless they violate clear project conventions.)
138
- - Would fixing this improve the code without introducing risk? (Reject fixes that require large refactors outside scope.)
139
-
140
- **Output per finding:**
141
- - **Accepted**: The finding is reasonable — include it in the Dev Agent's task.
142
- - **Rejected** (with reason): Brief explanation (e.g., "Out of scope", "Style preference, not a defect").
143
-
144
- After filtering: call the **Loop Exit Gate** with `{"reviewer_result": "NEEDS_FIXES", "accepted_count": <N>, "findings_count": <total findings this round>, "round": <current_round>, "findings_history": <current_history>, "max_rounds": 3, "filtering_done": true}`. If `endLoop=true`, proceed to Phase 2.
145
-
146
- ### Step 4: Spawn Dev Agent
147
-
148
- Spawn a platform-supported **read-write** developer agent. If no write-capable agent is available, the Main Agent applies accepted fixes directly. Read `${SKILL_DIR}/references/dev-agent-prompt.md` for the full prompt template — fill `{spec context}` and `{accepted findings}` before spawning.
149
-
150
- After the Dev Agent returns, record results and return to Step 1 for the next round.
151
-
152
- ## Phase 2: Output
153
-
154
- Always write `review-report.md` to the artifact directory, including no-change PASS results. Read `${SKILL_DIR}/references/review-report-template.md` for the full output format.
155
-
156
- - `PASS`: Reviewer returned no findings (or all remaining findings were rejected as unreasonable)
157
- - `NEEDS_FIXES`: 3 rounds completed but unresolved findings remain
158
-
159
- Also output a completion summary to conversation.
160
-
161
- **HANDOFF:** `/prizmkit-retrospective` (if PASS) or inform the caller of remaining issues (if NEEDS_FIXES after max rounds)
@@ -1,30 +0,0 @@
1
- # Dev Agent Prompt Template
2
-
3
- Used in Phase 1 Step 4 of `/prizmkit-code-review`. The orchestrator fills `{spec context}` and `{accepted findings}` before spawning the Dev Agent.
4
-
5
- ```
6
- You are a developer fixing code review findings. Apply each fix carefully without breaking existing functionality.
7
-
8
- ## Spec Context
9
- {goals from spec.md for reference}
10
-
11
- ## Findings to Fix
12
- {accepted findings list — each with Severity, Location, Problem, Suggestion, Verification}
13
-
14
- ## Instructions
15
- 1. Read each finding carefully.
16
- 2. For each finding:
17
- a. Read the relevant code and understand the context.
18
- b. Implement the fix based on the suggestion.
19
- c. If a suggestion is not feasible (would break other functionality, technically impossible), explain why.
20
- 3. After all fixes, report what you did.
21
-
22
- ## Output Format
23
- For each finding, report:
24
- - **Finding N**: [fixed | unable-to-fix]
25
- - **What was done**: Brief description
26
- - **Files modified**: List of changed files
27
- (If unable-to-fix, explain why)
28
- ```
29
-
30
- After the Dev Agent returns, record results and return to Step 1 for the next round.
@@ -1,31 +0,0 @@
1
- # Review Report Output Template
2
-
3
- Used in Phase 2 of `/prizmkit-code-review`. Always write `review-report.md` to the artifact directory using this format.
4
-
5
- ```markdown
6
- # Review Report
7
-
8
- ## Verdict: <PASS|NEEDS_FIXES>
9
- ## Rounds: <number of review rounds completed; use 0 for no-change PASS>
10
- ## Total findings: <total> → Fixed: <fixed>, Rejected: <rejected>, Unresolved: <unresolved>
11
-
12
- ## Round <N>
13
- Findings: <count> | Accepted: <count>, Rejected: <count>
14
-
15
- ### Finding <N>: <short title>
16
- - Severity: <high|medium|low>
17
- - Dimension: <goal-alignment|defect|completeness|consistency|security|rules-compliance>
18
- - Location: <filepath:line or project-level>
19
- - Problem: <what was wrong and why it mattered>
20
- - Status: <fixed (round N)|rejected — reason|unresolved — reason>
21
-
22
- ## Final Summary
23
- <One to three sentences summarizing the review outcome, including no-change PASS when applicable.>
24
- ```
25
-
26
- For `PASS` with no findings, write `Total findings: 0 → Fixed: 0, Rejected: 0, Unresolved: 0` and `## Round 0: PASS — no workspace changes to review` or `## Round N: PASS — no issues found`.
27
-
28
- ## Verdict Rules
29
-
30
- - `PASS`: Reviewer returned no findings, no workspace changes existed, or all remaining findings were rejected as unreasonable.
31
- - `NEEDS_FIXES`: Max rounds completed but accepted findings remain unresolved.
@@ -1,66 +0,0 @@
1
- # Reviewer Agent Prompt Template
2
-
3
- Used in Phase 1 Step 1 of `/prizmkit-code-review`. The orchestrator fills `{goals}`, `{plan decisions}`, `{dev rules}`, `{round N}`, and `{round_context}` before spawning the Reviewer Agent.
4
-
5
- ```
6
- You are a code reviewer. Review workspace changes against the spec goals, plan decisions, and per-layer dev rules.
7
-
8
- ## Spec Goals
9
- {goals and acceptance criteria from spec.md}
10
-
11
- ## Plan Decisions
12
- {architecture decisions and task list from plan.md}
13
-
14
- ## Scoped Test Report
15
- {summary from artifact_dir/test-report-path.txt and test-report.md, including Scope, Generated / Updated Tests, In-Scope Failures, Baseline Failures, Out of Scope Gaps, Boundary Matrix / Boundary Completion Gate if present, and Verdict. If no scoped report exists for a feature artifact, write "No scoped /prizmkit-test report found."}
16
-
17
- ## Dev Rules (per-layer conventions)
18
- {rules from .prizmkit/rules/<layer>-rules.md, or "No custom dev rules configured — use general best practices."}
19
-
20
- ## Review Round
21
- Round {N}. {round_context}
22
-
23
- ## What to Review
24
- Run these commands to see the current workspace changes:
25
- - `git diff` (unstaged changes)
26
- - `git diff --cached` (staged changes)
27
- - `git status` (new/deleted files)
28
-
29
- For new files shown in git status, read their full content.
30
- For modified files, read enough surrounding context to understand the change.
31
-
32
- ## Review Dimensions
33
- Evaluate the changes across these dimensions (focus on what's relevant):
34
-
35
- 1. **Goal alignment**: Do the changes accomplish all goals from spec.md? Anything missing or off-target?
36
- 2. **Defects**: Logic bugs, missing error handling, boundary condition issues, incorrect behavior.
37
- 3. **Completeness**: Files that should have been changed but weren't? Missing tests, types, imports, exports?
38
- 4. **Consistency**: Do changes follow the project's existing patterns, naming conventions, and code style?
39
- 5. **Security**: Hardcoded secrets, injection vulnerabilities, unsafe operations.
40
- 6. **Test quality**: If a scoped `/prizmkit-test` report is present, verify the report scope is `this-change`, the artifact dir matches the feature, generated/updated tests assert real behavior rather than mock success or empty assertions, in-scope failures are not mislabeled as baseline failures, baseline failures are genuinely unrelated or pre-existing, out-of-scope gaps were not turned into unrelated test changes, and the report verdict is compatible with proceeding.
41
- 7. **Rules compliance**: (Skip this dimension if no dev rules were provided.) Do changes follow the per-layer dev rules? Flag violations of framework conventions, naming patterns, state management, or other rules defined for that layer.
42
-
43
- ## Output Format
44
- Respond with EXACTLY this format:
45
-
46
- ### Result: PASS | NEEDS_FIXES
47
-
48
- ### Findings
49
- (If PASS, write "No issues found.")
50
-
51
- #### Finding N
52
- - **Severity**: high | medium | low
53
- - **Dimension**: goal-alignment | defect | completeness | consistency | security | test-quality | rules-compliance
54
- - **Location**: filepath:line (or "project-level")
55
- - **Problem**: What is wrong and why it matters
56
- - **Suggestion**: Recommended fix approach
57
- - **Verification**: How to confirm the fix is correct
58
-
59
- ### Summary
60
- One to two sentences about the overall state of the changes.
61
- ```
62
-
63
- ## Round Context
64
-
65
- - Round 1: "This is the first review. Examine all changes comprehensively."
66
- - Round 2+: "Previous round found issues that were fixed. Focus on: (1) whether previous fixes are correct, (2) whether fixes introduced new problems, (3) any remaining issues. Do not re-report issues that have already been fixed."
@@ -1,186 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Loop Exit Gatekeeper for prizmkit-code-review skill.
4
-
5
- Stateless design: all loop state is passed via stdin and returned via stdout.
6
- The caller (AI model) tracks `findings_history` and `max_rounds` between calls.
7
- No runtime files are created — the script is a pure function over JSON.
8
-
9
- The model supplies the current round in each call — the script does not auto-increment
10
- rounds, because the gate is called twice per loop iteration (after Reviewer returns
11
- and after Main Agent filters), and only the model knows when a full cycle completes.
12
-
13
- Usage:
14
- echo '{"reviewer_result":"NEEDS_FIXES","accepted_count":2,"findings_count":5,"round":1,"findings_history":[],"max_rounds":3,"filtering_done":true}' | python3 check_loop.py
15
-
16
- Input JSON schema:
17
- {
18
- "reviewer_result": "PASS" | "NEEDS_FIXES",
19
- "accepted_count": int,
20
- "findings_count": int,
21
- "round": int,
22
- "findings_history": [int, ...],
23
- "max_rounds": int,
24
- "filtering_done": bool
25
- }
26
-
27
- Output JSON schema:
28
- {
29
- "endLoop": bool,
30
- "reason": str,
31
- "verdict": "PASS" | "NEEDS_FIXES" | null,
32
- "round": int,
33
- "maxRounds": int,
34
- "divergenceWarning": bool,
35
- "findings_history": [int, ...]
36
- }
37
-
38
- Exit conditions (checked in order):
39
- 1. Reviewer returned PASS → endLoop=true, verdict=PASS
40
- 2. NEEDS_FIXES before filtering → endLoop=false, wait for filtering
41
- 3. Filtered findings all rejected → endLoop=true, verdict=PASS
42
- 4. Max rounds reached after filtering → endLoop=true, verdict=NEEDS_FIXES
43
- 5. Otherwise → endLoop=false
44
-
45
- Divergence detection:
46
- If findings_count strictly increases for 3 consecutive rounds, set divergenceWarning=true.
47
- This is a warning only — it does not force loop exit.
48
- """
49
-
50
- import json
51
- import sys
52
-
53
- DEFAULT_MAX_ROUNDS = 3
54
-
55
-
56
- def check_divergence(findings_history):
57
- """Return True if the last 3 entries in findings_history are strictly increasing."""
58
- if len(findings_history) < 3:
59
- return False
60
- last_three = findings_history[-3:]
61
- return last_three[0] < last_three[1] < last_three[2]
62
-
63
-
64
- def record_findings_count(findings_history, current_round, findings_count):
65
- """Record findings_count once per round index, updating duplicate calls for the same round."""
66
- if current_round <= 0:
67
- return findings_history
68
-
69
- target_index = current_round - 1
70
- while len(findings_history) < target_index:
71
- findings_history.append(0)
72
-
73
- if len(findings_history) == target_index:
74
- findings_history.append(findings_count)
75
- else:
76
- findings_history[target_index] = findings_count
77
-
78
- return findings_history
79
-
80
-
81
- def check_exit_condition(data):
82
- """Determine whether the loop should exit. Pure function — no side effects.
83
-
84
- Round is model-supplied — the script does not auto-increment it because
85
- the gate is called twice per loop iteration (after Step 2 and Step 3).
86
- """
87
- reviewer_result = data.get("reviewer_result")
88
- accepted_count = data.get("accepted_count", 0)
89
- findings_count = data.get("findings_count", 0)
90
- current_round = data.get("round", 0)
91
- findings_history = list(data.get("findings_history", []))
92
- max_rounds = data.get("max_rounds", DEFAULT_MAX_ROUNDS)
93
- filtering_done = data.get("filtering_done", reviewer_result == "PASS")
94
-
95
- findings_history = record_findings_count(
96
- findings_history, current_round, findings_count
97
- )
98
- divergence_warning = check_divergence(findings_history)
99
-
100
- # Condition 1: Reviewer returned PASS
101
- if reviewer_result == "PASS":
102
- return {
103
- "endLoop": True,
104
- "reason": f"Round {current_round}: Reviewer returned PASS",
105
- "verdict": "PASS",
106
- "round": current_round,
107
- "maxRounds": max_rounds,
108
- "divergenceWarning": False,
109
- "findings_history": findings_history,
110
- }
111
-
112
- # Condition 2: Reviewer returned findings, but filtering has not happened yet
113
- if reviewer_result == "NEEDS_FIXES" and not filtering_done:
114
- return {
115
- "endLoop": False,
116
- "reason": f"Round {current_round}: reviewer returned findings; filter before applying exit conditions",
117
- "verdict": None,
118
- "round": current_round,
119
- "maxRounds": max_rounds,
120
- "divergenceWarning": divergence_warning,
121
- "findings_history": findings_history,
122
- }
123
-
124
- # Condition 3: All findings rejected after filtering
125
- if reviewer_result == "NEEDS_FIXES" and accepted_count == 0:
126
- return {
127
- "endLoop": True,
128
- "reason": f"Round {current_round}: all findings rejected by main agent",
129
- "verdict": "PASS",
130
- "round": current_round,
131
- "maxRounds": max_rounds,
132
- "divergenceWarning": False,
133
- "findings_history": findings_history,
134
- }
135
-
136
- # Condition 4: Max rounds reached
137
- if current_round >= max_rounds:
138
- return {
139
- "endLoop": True,
140
- "reason": f"Hard limit: max {max_rounds} rounds reached",
141
- "verdict": "NEEDS_FIXES",
142
- "round": current_round,
143
- "maxRounds": max_rounds,
144
- "divergenceWarning": divergence_warning,
145
- "findings_history": findings_history,
146
- }
147
-
148
- # Condition 5: Continue loop
149
- next_round = current_round + 1
150
- return {
151
- "endLoop": False,
152
- "reason": f"Round {current_round}: {accepted_count} findings accepted, continuing to round {next_round}",
153
- "verdict": None,
154
- "round": current_round,
155
- "maxRounds": max_rounds,
156
- "divergenceWarning": divergence_warning,
157
- "findings_history": findings_history,
158
- }
159
-
160
-
161
- def main():
162
- # Read input from stdin
163
- try:
164
- data = json.load(sys.stdin)
165
- except json.JSONDecodeError as e:
166
- print(
167
- json.dumps(
168
- {
169
- "endLoop": False,
170
- "reason": f"Invalid JSON input: {e}",
171
- "verdict": None,
172
- "round": 0,
173
- "maxRounds": DEFAULT_MAX_ROUNDS,
174
- "divergenceWarning": False,
175
- "findings_history": [],
176
- }
177
- )
178
- )
179
- sys.exit(1)
180
-
181
- result = check_exit_condition(data)
182
- print(json.dumps(result))
183
-
184
-
185
- if __name__ == "__main__":
186
- main()
@@ -1,89 +0,0 @@
1
- ---
2
- name: "prizmkit-committer"
3
- description: "Pure git commit workflow with safety checks. Stages files, generates Conventional Commits message, and commits. Does NOT modify .prizmkit/prizm-docs/ — run /prizmkit-retrospective first. Trigger on: 'commit', 'submit', 'finish', 'done', 'ship it'. (project)"
4
- ---
5
-
6
- # PrizmKit Committer
7
-
8
- ### When to Use
9
- - User says "commit", "submit", "finish", "done with this task", "ship it"
10
- - After `/prizmkit-retrospective` has finished architecture sync
11
- - The UserPromptSubmit hook will remind to use this skill when commit intent is detected
12
-
13
- ### When NOT to Use
14
- - No uncommitted changes exist — nothing to commit
15
- - .prizmkit/prizm-docs/ not synced — run /prizmkit-retrospective first (full lifecycle only; the `plan → implement → committer` fast path skips this by design)
16
- - Code review not passed in pipeline mode — run /prizmkit-code-review first
17
- - Mid-merge conflict resolution — handle manually with git
18
-
19
- **PRECONDITION:**
20
-
21
- | Required State | Check | If Missing |
22
- |---|---|---|
23
- | Uncommitted changes exist | `git status` shows modified/added/untracked files | Inform user "nothing to commit" and stop |
24
- | `.prizmkit/prizm-docs/` synced (feature/refactor) | `/prizmkit-retrospective` has run | Run `/prizmkit-retrospective` first |
25
- | Code review passed (pipeline mode) | `review-report.md` in artifact directory has `## Verdict: PASS` | Run `/prizmkit-code-review` first |
26
-
27
- > **Fast-path exemption**: the prizm-docs-synced and review-passed rows above gate the **full lifecycle**. Small, well-scoped changes using the `plan → implement → committer` fast path may commit without them — there is no retrospective or review-report artifact to check, so treat those rows as "satisfied when not applicable."
28
-
29
- ### Workflow
30
-
31
- Follow these steps in order — skipping or reordering can stage sensitive files or commit without proper verification:
32
-
33
- #### Step 1: Status Check
34
- ```powershell
35
- git status
36
- ```
37
- - If "nothing to commit, working tree clean": inform user and stop
38
- - If there are changes: proceed
39
-
40
- #### Step 2: Generate Commit Message
41
- Analyze the staged diff and context (spec title, plan summary) to generate a concise Conventional Commits message. The message should capture the *what* and *why* of the change.
42
-
43
- #### Step 3: Update CHANGELOG.md
44
- If CHANGELOG.md exists in the project root, append an entry following Keep a Changelog format under the `[Unreleased]` section. Match the existing style in the file.
45
-
46
- #### Step 4: Git Commit
47
-
48
- Stage changes using a safe strategy — **never use `git add .` or `git add -A`** as they may stage sensitive files (.env, credentials, secrets) or unintended changes:
49
-
50
- 1. Review untracked files with `git status`. Warn the user if any files match sensitive patterns (`.env*`, `*credential*`, `*secret*`, `*.pem`, `*.key`).
51
- 2. Stage tracked modified files: `git add -u`
52
- 3. For new files: stage explicitly by name after confirming they should be included.
53
- 4. Verify staged content with `git diff --cached --stat` before committing.
54
-
55
- ```powershell
56
- git commit -m "<type>(<scope>): <description>"
57
- ```
58
- Follow Conventional Commits format.
59
-
60
- #### Step 5: Verification
61
- ```powershell
62
- git log -1 --stat
63
- ```
64
- Confirm the commit was recorded.
65
-
66
- Then verify working tree is clean:
67
- ```powershell
68
- git status
69
- ```
70
- - If "nothing to commit, working tree clean": commit verified successfully, proceed
71
-
72
- #### Step 6: Optional Push
73
- Ask user: "Push to remote?"
74
- - Yes: `git push`
75
- - No: Stop
76
-
77
- **Headless mode**: If the skill was invoked with `--headless` in the args (e.g., `/prizmkit-committer --headless feat(F-001): ...`), **SKIP this step entirely**. Do NOT ask the question. Do NOT push. Stop after Step 5 verification. Headless mode is used by autonomous pipeline sessions where there is no human to answer interactive prompts.
78
-
79
- ## Example
80
-
81
- **Feature commit:**
82
- ```
83
- git commit -m "feat(avatar): add user avatar upload with S3 storage"
84
- ```
85
-
86
- **Bug fix commit:**
87
- ```
88
- git commit -m "fix(auth): handle null token in refresh flow"
89
- ```