prizmkit 1.1.100 → 1.1.102

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 (317) 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 +355 -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 +153 -0
  26. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +425 -0
  27. package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +560 -0
  28. package/bundled/dev-pipeline/prizmkit_runtime/status.py +71 -0
  29. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +51 -36
  30. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +20 -5
  31. package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +2 -2
  32. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +39 -0
  33. package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +8 -2
  34. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +1 -1
  35. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +6 -2
  36. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +14 -6
  37. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +14 -4
  38. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +14 -4
  39. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +2 -0
  40. package/bundled/dev-pipeline/templates/sections/log-size-awareness.md +9 -30
  41. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +15 -7
  42. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +42 -29
  43. package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +41 -39
  44. package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +8 -17
  45. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +2 -2
  46. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +1 -3
  47. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +1 -3
  48. package/bundled/dev-pipeline/templates/sections/phase0-test-baseline.md +3 -8
  49. package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +6 -2
  50. package/bundled/dev-pipeline/templates/sections/test-failure-recovery-lite.md +5 -1
  51. package/bundled/dev-pipeline/tests/test_auto_skip.py +436 -14
  52. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +115 -7
  53. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +40 -0
  54. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +1226 -0
  55. package/bundled/dev-pipeline/tests/test_unified_cli.py +1045 -0
  56. package/bundled/skills/_metadata.json +1 -1
  57. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +29 -34
  58. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +6 -5
  59. package/bundled/skills/feature-pipeline-launcher/SKILL.md +29 -35
  60. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +7 -6
  61. package/bundled/skills/feature-workflow/SKILL.md +3 -6
  62. package/bundled/skills/recovery-workflow/SKILL.md +23 -32
  63. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +29 -35
  64. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +7 -6
  65. package/bundled/skills/refactor-workflow/SKILL.md +3 -6
  66. package/bundled/templates/hooks/commit-intent.json +2 -2
  67. package/bundled/templates/hooks/diff-prizm-docs.py +226 -0
  68. package/bundled/templates/hooks/prizm-pre-commit.py +45 -0
  69. package/bundled/templates/hooks/validate-prizm-docs.py +240 -0
  70. package/package.json +1 -1
  71. package/src/config.js +42 -19
  72. package/src/external-skills.js +14 -14
  73. package/src/index.js +3 -6
  74. package/src/manifest.js +11 -5
  75. package/src/metadata.js +7 -18
  76. package/src/platforms.js +25 -0
  77. package/src/prompts.js +0 -12
  78. package/src/runtimes.js +18 -11
  79. package/src/scaffold.js +144 -122
  80. package/src/upgrade.js +12 -3
  81. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +0 -500
  82. package/bundled/dev-pipeline/launch-feature-daemon.sh +0 -657
  83. package/bundled/dev-pipeline/launch-refactor-daemon.sh +0 -502
  84. package/bundled/dev-pipeline/lib/branch.sh +0 -326
  85. package/bundled/dev-pipeline/lib/common.sh +0 -1476
  86. package/bundled/dev-pipeline/lib/heartbeat.sh +0 -469
  87. package/bundled/dev-pipeline/reset-bug.sh +0 -425
  88. package/bundled/dev-pipeline/reset-feature.sh +0 -436
  89. package/bundled/dev-pipeline/reset-refactor.sh +0 -423
  90. package/bundled/dev-pipeline/run-bugfix.sh +0 -1430
  91. package/bundled/dev-pipeline/run-feature.sh +0 -1718
  92. package/bundled/dev-pipeline/run-recovery.sh +0 -648
  93. package/bundled/dev-pipeline/run-refactor.sh +0 -1463
  94. package/bundled/dev-pipeline/tests/test-path-resolution.sh +0 -100
  95. package/bundled/dev-pipeline-windows/.env.example +0 -36
  96. package/bundled/dev-pipeline-windows/README.md +0 -30
  97. package/bundled/dev-pipeline-windows/SCHEMA_ANALYSIS.md +0 -533
  98. package/bundled/dev-pipeline-windows/assets/feature-list-example.json +0 -146
  99. package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +0 -137
  100. package/bundled/dev-pipeline-windows/launch-bugfix-daemon.ps1 +0 -9
  101. package/bundled/dev-pipeline-windows/launch-feature-daemon.ps1 +0 -9
  102. package/bundled/dev-pipeline-windows/launch-refactor-daemon.ps1 +0 -9
  103. package/bundled/dev-pipeline-windows/lib/branch.ps1 +0 -235
  104. package/bundled/dev-pipeline-windows/lib/common.ps1 +0 -991
  105. package/bundled/dev-pipeline-windows/lib/daemon.ps1 +0 -140
  106. package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +0 -1051
  107. package/bundled/dev-pipeline-windows/lib/reset.ps1 +0 -121
  108. package/bundled/dev-pipeline-windows/reset-bug.ps1 +0 -10
  109. package/bundled/dev-pipeline-windows/reset-feature.ps1 +0 -10
  110. package/bundled/dev-pipeline-windows/reset-refactor.ps1 +0 -10
  111. package/bundled/dev-pipeline-windows/run-bugfix.ps1 +0 -9
  112. package/bundled/dev-pipeline-windows/run-feature.ps1 +0 -9
  113. package/bundled/dev-pipeline-windows/run-recovery.ps1 +0 -179
  114. package/bundled/dev-pipeline-windows/run-refactor.ps1 +0 -9
  115. package/bundled/dev-pipeline-windows/scripts/check-session-status.py +0 -301
  116. package/bundled/dev-pipeline-windows/scripts/continuation.py +0 -374
  117. package/bundled/dev-pipeline-windows/scripts/detect-stuck.py +0 -530
  118. package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +0 -2279
  119. package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +0 -763
  120. package/bundled/dev-pipeline-windows/scripts/generate-recovery-prompt.py +0 -805
  121. package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +0 -841
  122. package/bundled/dev-pipeline-windows/scripts/init-bugfix-pipeline.py +0 -316
  123. package/bundled/dev-pipeline-windows/scripts/init-dev-team.py +0 -134
  124. package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +0 -382
  125. package/bundled/dev-pipeline-windows/scripts/init-refactor-pipeline.py +0 -399
  126. package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +0 -1362
  127. package/bundled/dev-pipeline-windows/scripts/patch-completion-notes.py +0 -191
  128. package/bundled/dev-pipeline-windows/scripts/prizmkit-test-gate.py +0 -446
  129. package/bundled/dev-pipeline-windows/scripts/update-bug-status.py +0 -1121
  130. package/bundled/dev-pipeline-windows/scripts/update-checkpoint.py +0 -173
  131. package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +0 -1789
  132. package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +0 -1327
  133. package/bundled/dev-pipeline-windows/scripts/utils.py +0 -542
  134. package/bundled/dev-pipeline-windows/templates/agent-prompts/critic-plan-challenge.md +0 -7
  135. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-fix.md +0 -7
  136. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +0 -65
  137. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-resume.md +0 -5
  138. package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +0 -7
  139. package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +0 -73
  140. package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +0 -589
  141. package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +0 -710
  142. package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +0 -791
  143. package/bundled/dev-pipeline-windows/templates/bug-fix-list-schema.json +0 -263
  144. package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +0 -326
  145. package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +0 -237
  146. package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +0 -340
  147. package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +0 -270
  148. package/bundled/dev-pipeline-windows/templates/sections/ac-verification-checklist.md +0 -7
  149. package/bundled/dev-pipeline-windows/templates/sections/checkpoint-system.md +0 -91
  150. package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +0 -34
  151. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-agent.md +0 -10
  152. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-full.md +0 -12
  153. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-lite.md +0 -7
  154. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-agent.md +0 -8
  155. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-full.md +0 -9
  156. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-lite.md +0 -6
  157. package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +0 -21
  158. package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +0 -21
  159. package/bundled/dev-pipeline-windows/templates/sections/log-size-awareness.md +0 -41
  160. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +0 -283
  161. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +0 -112
  162. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +0 -168
  163. package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +0 -82
  164. package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +0 -75
  165. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +0 -23
  166. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +0 -14
  167. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +0 -19
  168. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +0 -63
  169. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +0 -42
  170. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +0 -44
  171. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +0 -59
  172. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +0 -39
  173. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +0 -27
  174. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +0 -27
  175. package/bundled/dev-pipeline-windows/templates/sections/phase-prizmkit-test.md +0 -39
  176. package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +0 -35
  177. package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +0 -35
  178. package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +0 -73
  179. package/bundled/dev-pipeline-windows/templates/sections/phase0-init.md +0 -13
  180. package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +0 -21
  181. package/bundled/dev-pipeline-windows/templates/sections/session-context.md +0 -5
  182. package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +0 -6
  183. package/bundled/dev-pipeline-windows/templates/sections/task-contract.md +0 -34
  184. package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-agent.md +0 -48
  185. package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-lite.md +0 -48
  186. package/bundled/dev-pipeline-windows/templates/session-status-schema.json +0 -83
  187. package/bundled/skills-windows/app-planner/SKILL.md +0 -296
  188. package/bundled/skills-windows/app-planner/assets/app-design-guide.md +0 -101
  189. package/bundled/skills-windows/app-planner/references/architecture-decisions.md +0 -52
  190. package/bundled/skills-windows/app-planner/references/brainstorm-guide.md +0 -101
  191. package/bundled/skills-windows/app-planner/references/frontend-design-guide.md +0 -71
  192. package/bundled/skills-windows/app-planner/references/infrastructure-convention-discovery.md +0 -108
  193. package/bundled/skills-windows/app-planner/references/project-brief-guide.md +0 -82
  194. package/bundled/skills-windows/app-planner/references/project-conventions-discovery.md +0 -59
  195. package/bundled/skills-windows/app-planner/references/project-state-detection.md +0 -90
  196. package/bundled/skills-windows/app-planner/references/red-team-checklist.md +0 -40
  197. package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +0 -619
  198. package/bundled/skills-windows/app-planner/references/rules/backend/fixed-rules.md +0 -285
  199. package/bundled/skills-windows/app-planner/references/rules/backend/question-bank.md +0 -249
  200. package/bundled/skills-windows/app-planner/references/rules/backend/question-manifest.json +0 -46
  201. package/bundled/skills-windows/app-planner/references/rules/backend/template.md +0 -173
  202. package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +0 -382
  203. package/bundled/skills-windows/app-planner/references/rules/database/fixed-rules.md +0 -211
  204. package/bundled/skills-windows/app-planner/references/rules/database/question-bank.md +0 -184
  205. package/bundled/skills-windows/app-planner/references/rules/database/question-manifest.json +0 -39
  206. package/bundled/skills-windows/app-planner/references/rules/database/template.md +0 -158
  207. package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +0 -820
  208. package/bundled/skills-windows/app-planner/references/rules/frontend/fixed-rules.md +0 -188
  209. package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +0 -319
  210. package/bundled/skills-windows/app-planner/references/rules/frontend/question-manifest.json +0 -51
  211. package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +0 -339
  212. package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +0 -649
  213. package/bundled/skills-windows/app-planner/references/rules/mobile/fixed-rules.md +0 -290
  214. package/bundled/skills-windows/app-planner/references/rules/mobile/question-bank.md +0 -232
  215. package/bundled/skills-windows/app-planner/references/rules/mobile/question-manifest.json +0 -47
  216. package/bundled/skills-windows/app-planner/references/rules/mobile/template.md +0 -175
  217. package/bundled/skills-windows/app-planner/references/rules-configuration.md +0 -46
  218. package/bundled/skills-windows/bug-fix-workflow/SKILL.md +0 -379
  219. package/bundled/skills-windows/bug-fix-workflow/references/bug-diagnosis.md +0 -41
  220. package/bundled/skills-windows/bug-planner/SKILL.md +0 -402
  221. package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +0 -43
  222. package/bundled/skills-windows/bug-planner/references/critic-and-verification.md +0 -44
  223. package/bundled/skills-windows/bug-planner/references/error-recovery.md +0 -73
  224. package/bundled/skills-windows/bug-planner/references/input-formats.md +0 -53
  225. package/bundled/skills-windows/bug-planner/references/schema-validation.md +0 -25
  226. package/bundled/skills-windows/bug-planner/references/severity-rules.md +0 -16
  227. package/bundled/skills-windows/bug-planner/scripts/validate-bug-list.py +0 -322
  228. package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +0 -304
  229. package/bundled/skills-windows/bugfix-pipeline-launcher/references/configuration.md +0 -84
  230. package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +0 -381
  231. package/bundled/skills-windows/feature-pipeline-launcher/references/configuration.md +0 -67
  232. package/bundled/skills-windows/feature-pipeline-launcher/scripts/preflight-check.py +0 -462
  233. package/bundled/skills-windows/feature-planner/SKILL.md +0 -397
  234. package/bundled/skills-windows/feature-planner/assets/evaluation-guide.md +0 -64
  235. package/bundled/skills-windows/feature-planner/assets/planning-guide.md +0 -214
  236. package/bundled/skills-windows/feature-planner/references/browser-interaction.md +0 -59
  237. package/bundled/skills-windows/feature-planner/references/completeness-review.md +0 -57
  238. package/bundled/skills-windows/feature-planner/references/decomposition-patterns.md +0 -75
  239. package/bundled/skills-windows/feature-planner/references/error-recovery.md +0 -90
  240. package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +0 -112
  241. package/bundled/skills-windows/feature-planner/references/new-project-planning.md +0 -85
  242. package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +0 -1020
  243. package/bundled/skills-windows/feature-workflow/SKILL.md +0 -374
  244. package/bundled/skills-windows/feature-workflow/references/brainstorm-guide.md +0 -137
  245. package/bundled/skills-windows/prizm-kit/SKILL.md +0 -93
  246. package/bundled/skills-windows/prizmkit-code-review/SKILL.md +0 -161
  247. package/bundled/skills-windows/prizmkit-code-review/references/dev-agent-prompt.md +0 -30
  248. package/bundled/skills-windows/prizmkit-code-review/references/review-report-template.md +0 -31
  249. package/bundled/skills-windows/prizmkit-code-review/references/reviewer-agent-prompt.md +0 -66
  250. package/bundled/skills-windows/prizmkit-code-review/scripts/check_loop.py +0 -186
  251. package/bundled/skills-windows/prizmkit-committer/SKILL.md +0 -89
  252. package/bundled/skills-windows/prizmkit-deploy/SKILL.md +0 -444
  253. package/bundled/skills-windows/prizmkit-deploy/references/ci-cd-workflows.md +0 -115
  254. package/bundled/skills-windows/prizmkit-deploy/references/cloud-platform-deploy.md +0 -93
  255. package/bundled/skills-windows/prizmkit-deploy/references/data-safety-examples.md +0 -120
  256. package/bundled/skills-windows/prizmkit-deploy/references/database-setup.md +0 -46
  257. package/bundled/skills-windows/prizmkit-deploy/references/deploy-config-schema.md +0 -148
  258. package/bundled/skills-windows/prizmkit-deploy/references/deploy-history-schema.md +0 -62
  259. package/bundled/skills-windows/prizmkit-deploy/references/deployment-modes.md +0 -50
  260. package/bundled/skills-windows/prizmkit-deploy/references/direct-upload.md +0 -26
  261. package/bundled/skills-windows/prizmkit-deploy/references/dns-setup.md +0 -42
  262. package/bundled/skills-windows/prizmkit-deploy/references/docker-deploy.md +0 -31
  263. package/bundled/skills-windows/prizmkit-deploy/references/firewall-setup.md +0 -37
  264. package/bundled/skills-windows/prizmkit-deploy/references/live-validation-notes.md +0 -21
  265. package/bundled/skills-windows/prizmkit-deploy/references/nginx-blue-green.md +0 -59
  266. package/bundled/skills-windows/prizmkit-deploy/references/ssh-bootstrap-flow.md +0 -49
  267. package/bundled/skills-windows/prizmkit-deploy/references/ssh-execution-flow.md +0 -41
  268. package/bundled/skills-windows/prizmkit-deploy/references/ssh-takeover.md +0 -20
  269. package/bundled/skills-windows/prizmkit-deploy/references/ssl-setup.md +0 -56
  270. package/bundled/skills-windows/prizmkit-implement/SKILL.md +0 -71
  271. package/bundled/skills-windows/prizmkit-init/SKILL.md +0 -356
  272. package/bundled/skills-windows/prizmkit-init/assets/project-brief-template.md +0 -82
  273. package/bundled/skills-windows/prizmkit-init/references/config-schema.md +0 -70
  274. package/bundled/skills-windows/prizmkit-init/references/rules/layer-detection.md +0 -41
  275. package/bundled/skills-windows/prizmkit-init/references/tech-stack-catalog.md +0 -13
  276. package/bundled/skills-windows/prizmkit-init/references/update-supplement.md +0 -9
  277. package/bundled/skills-windows/prizmkit-plan/SKILL.md +0 -102
  278. package/bundled/skills-windows/prizmkit-plan/assets/plan-template.md +0 -115
  279. package/bundled/skills-windows/prizmkit-plan/assets/spec-template.md +0 -73
  280. package/bundled/skills-windows/prizmkit-plan/references/clarify-guide.md +0 -67
  281. package/bundled/skills-windows/prizmkit-plan/references/examples.md +0 -85
  282. package/bundled/skills-windows/prizmkit-plan/references/verification-checklist.md +0 -60
  283. package/bundled/skills-windows/prizmkit-prizm-docs/SKILL.md +0 -129
  284. package/bundled/skills-windows/prizmkit-prizm-docs/assets/prizm-docs-format.md +0 -613
  285. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-init.md +0 -45
  286. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-rebuild.md +0 -15
  287. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-status.md +0 -14
  288. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-update.md +0 -19
  289. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-validate.md +0 -17
  290. package/bundled/skills-windows/prizmkit-retrospective/SKILL.md +0 -87
  291. package/bundled/skills-windows/prizmkit-retrospective/references/knowledge-injection-steps.md +0 -50
  292. package/bundled/skills-windows/prizmkit-retrospective/references/structural-sync-steps.md +0 -43
  293. package/bundled/skills-windows/prizmkit-test/SKILL.md +0 -227
  294. package/bundled/skills-windows/prizmkit-test/references/boundary-coverage-protocol.md +0 -220
  295. package/bundled/skills-windows/prizmkit-test/references/examples.md +0 -143
  296. package/bundled/skills-windows/prizmkit-test/references/service-boundary-test-catalog.md +0 -225
  297. package/bundled/skills-windows/prizmkit-test/references/test-generation-steps.md +0 -109
  298. package/bundled/skills-windows/prizmkit-test/references/test-report-template.md +0 -111
  299. package/bundled/skills-windows/prizmkit-test/scripts/validate_boundary_report.py +0 -347
  300. package/bundled/skills-windows/recovery-workflow/SKILL.md +0 -355
  301. package/bundled/skills-windows/recovery-workflow/evals/evals.json +0 -46
  302. package/bundled/skills-windows/recovery-workflow/references/detection.md +0 -58
  303. package/bundled/skills-windows/recovery-workflow/scripts/detect-recovery-state.py +0 -544
  304. package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +0 -346
  305. package/bundled/skills-windows/refactor-pipeline-launcher/references/configuration.md +0 -72
  306. package/bundled/skills-windows/refactor-planner/SKILL.md +0 -398
  307. package/bundled/skills-windows/refactor-planner/assets/planning-guide.md +0 -292
  308. package/bundled/skills-windows/refactor-planner/references/behavior-preservation.md +0 -301
  309. package/bundled/skills-windows/refactor-planner/references/fast-path.md +0 -59
  310. package/bundled/skills-windows/refactor-planner/references/planning-phases.md +0 -135
  311. package/bundled/skills-windows/refactor-planner/references/refactor-scoping-guide.md +0 -221
  312. package/bundled/skills-windows/refactor-planner/scripts/validate-and-generate-refactor.py +0 -858
  313. package/bundled/skills-windows/refactor-workflow/SKILL.md +0 -343
  314. package/bundled/skills-windows/refactor-workflow/references/brainstorm-guide.md +0 -116
  315. package/bundled/templates/hooks/diff-prizm-docs.sh +0 -158
  316. package/bundled/templates/hooks/prizm-pre-commit.sh +0 -108
  317. package/bundled/templates/hooks/validate-prizm-docs.sh +0 -139
@@ -1,544 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- detect-recovery-state.py — Universal workflow recovery detector.
4
-
5
- Auto-detects which interactive workflow (feature-workflow, bug-fix-workflow,
6
- refactor-workflow) was interrupted and what phase it reached, by inspecting
7
- the workspace: git branch names, characteristic artifacts, and pipeline state.
8
-
9
- Does NOT run tests — that's left to the skill so the user sees output in real time.
10
-
11
- Usage:
12
- python3 detect-recovery-state.py [--project-root .]
13
- """
14
-
15
- import argparse
16
- import json
17
- import os
18
- import re
19
- import subprocess
20
- import sys
21
-
22
-
23
- # ---------------------------------------------------------------------------
24
- # Git helper
25
- # ---------------------------------------------------------------------------
26
-
27
- def run_git(args, cwd=None):
28
- """Run a git command and return stdout, or empty string on failure."""
29
- try:
30
- result = subprocess.run(
31
- ["git"] + args,
32
- capture_output=True,
33
- text=True,
34
- cwd=cwd,
35
- timeout=10,
36
- )
37
- return result.stdout.strip()
38
- except (subprocess.SubprocessError, FileNotFoundError):
39
- return ""
40
-
41
-
42
- def detect_main_branch(project_root):
43
- """Detect the default branch name (main or master)."""
44
- for candidate in ["main", "master"]:
45
- check = run_git(["rev-parse", "--verify", candidate], cwd=project_root)
46
- if check:
47
- return candidate
48
- return "main"
49
-
50
-
51
- # ---------------------------------------------------------------------------
52
- # Workflow signature detection (priority-ordered)
53
- # ---------------------------------------------------------------------------
54
-
55
- def extract_bug_id_from_branch(branch):
56
- """Extract bug ID from branch name like fix/B-001-login-crash → B-001."""
57
- match = re.match(r"fix/(B-\d+)", branch)
58
- return match.group(1) if match else None
59
-
60
-
61
- def detect_workflow_type(project_root):
62
- """Priority-ordered signature matching.
63
-
64
- Returns (workflow_type, context_dict) or (None, None).
65
- """
66
- branch = run_git(["branch", "--show-current"], cwd=project_root)
67
-
68
- # Priority 1: fix/* branch → bug-fix-workflow
69
- if branch.startswith("fix/"):
70
- bug_id = extract_bug_id_from_branch(branch)
71
- return ("bug-fix-workflow", {"bug_id": bug_id, "branch": branch})
72
-
73
- # Priority 2: .prizmkit/bugfix/ has content → bug-fix-workflow
74
- bugfix_dir = os.path.join(project_root, ".prizmkit", "bugfix")
75
- if os.path.isdir(bugfix_dir):
76
- bug_ids = sorted(
77
- d for d in os.listdir(bugfix_dir)
78
- if os.path.isdir(os.path.join(bugfix_dir, d))
79
- )
80
- if bug_ids:
81
- return ("bug-fix-workflow", {"bug_id": bug_ids[-1], "branch": branch})
82
-
83
- # Priority 3: refactor/* branch → refactor-workflow
84
- if branch.startswith("refactor/"):
85
- return ("refactor-workflow", {"branch": branch})
86
-
87
- # Priority 4: refactor-list.json exists → refactor-workflow
88
- # Check both new and old paths for backward compatibility
89
- new_refactor = os.path.join(project_root, ".prizmkit", "plans", "refactor-list.json")
90
- old_refactor = os.path.join(project_root, "refactor-list.json")
91
- if os.path.isfile(new_refactor):
92
- return ("refactor-workflow", {"branch": branch})
93
- elif os.path.isfile(old_refactor):
94
- print(f"⚠️ Migration notice: refactor-list.json found in root. "
95
- f"Please move to .prizmkit/plans/refactor-list.json", file=sys.stderr)
96
- return ("refactor-workflow", {"branch": branch})
97
-
98
- # Priority 5: feat/* branch → feature-workflow
99
- if branch.startswith("feat/"):
100
- return ("feature-workflow", {"branch": branch})
101
-
102
- # Priority 6: feature-list.json exists → feature-workflow
103
- # Check both new and old paths for backward compatibility
104
- new_feature = os.path.join(project_root, ".prizmkit", "plans", "feature-list.json")
105
- old_feature = os.path.join(project_root, "feature-list.json")
106
- if os.path.isfile(new_feature):
107
- return ("feature-workflow", {"branch": branch})
108
- elif os.path.isfile(old_feature):
109
- print(f"⚠️ Migration notice: feature-list.json found in root. "
110
- f"Please move to .prizmkit/plans/feature-list.json", file=sys.stderr)
111
- return ("feature-workflow", {"branch": branch})
112
-
113
- # No match
114
- return (None, None)
115
-
116
-
117
- def detect_other_workflows(project_root, primary_type):
118
- """Scan for other interrupted workflow signals beyond the primary match.
119
-
120
- Returns a list of workflow type strings that also have signals present,
121
- excluding the primary_type already detected.
122
- """
123
- others = []
124
- branch = run_git(["branch", "--show-current"], cwd=project_root)
125
-
126
- # Bug-fix signals
127
- if primary_type != "bug-fix-workflow":
128
- if branch.startswith("fix/"):
129
- others.append("bug-fix-workflow")
130
- else:
131
- bugfix_dir = os.path.join(project_root, ".prizmkit", "bugfix")
132
- if os.path.isdir(bugfix_dir):
133
- bug_ids = [
134
- d for d in os.listdir(bugfix_dir)
135
- if os.path.isdir(os.path.join(bugfix_dir, d))
136
- ]
137
- if bug_ids:
138
- others.append("bug-fix-workflow")
139
-
140
- # Refactor signals
141
- if primary_type != "refactor-workflow":
142
- if branch.startswith("refactor/"):
143
- others.append("refactor-workflow")
144
- else:
145
- for path in [
146
- os.path.join(project_root, ".prizmkit", "plans", "refactor-list.json"),
147
- os.path.join(project_root, "refactor-list.json"),
148
- ]:
149
- if os.path.isfile(path):
150
- others.append("refactor-workflow")
151
- break
152
-
153
- # Feature signals
154
- if primary_type != "feature-workflow":
155
- if branch.startswith("feat/"):
156
- others.append("feature-workflow")
157
- else:
158
- for path in [
159
- os.path.join(project_root, ".prizmkit", "plans", "feature-list.json"),
160
- os.path.join(project_root, "feature-list.json"),
161
- ]:
162
- if os.path.isfile(path):
163
- others.append("feature-workflow")
164
- break
165
-
166
- return others
167
-
168
-
169
- # ---------------------------------------------------------------------------
170
- # Phase inference — one function per workflow
171
- # ---------------------------------------------------------------------------
172
-
173
- def infer_bugfix_phase(project_root, bug_id, code_changes, commits_ahead):
174
- """Infer bug-fix-workflow phase from artifacts and git state.
175
-
176
- Detection table (from bug-fix-workflow SKILL.md):
177
- (nothing) → Phase 1: Deep Bug Diagnosis
178
- fix-plan.md only → Phase 4: Fix
179
- fix-plan.md + code changes → Phase 5: Review
180
- all docs + review passed → Phase 6: User Verification
181
- all docs + committed → Phase 7: Merge Decision
182
- """
183
- bugfix_dir = os.path.join(project_root, ".prizmkit", "bugfix", bug_id) if bug_id else ""
184
- has_fix_plan = bugfix_dir and os.path.isfile(os.path.join(bugfix_dir, "fix-plan.md"))
185
- has_fix_report = bugfix_dir and os.path.isfile(os.path.join(bugfix_dir, "fix-report.md"))
186
-
187
- artifacts = {
188
- "fix_plan_exists": has_fix_plan,
189
- "fix_report_exists": has_fix_report,
190
- }
191
- if has_fix_plan:
192
- artifacts["fix_plan_path"] = os.path.relpath(
193
- os.path.join(bugfix_dir, "fix-plan.md"), project_root
194
- )
195
- if has_fix_report:
196
- artifacts["fix_report_path"] = os.path.relpath(
197
- os.path.join(bugfix_dir, "fix-report.md"), project_root
198
- )
199
-
200
- if commits_ahead > 0:
201
- return 7, "Merge Decision", artifacts, \
202
- f"{commits_ahead} commit(s) ahead — fix likely committed", \
203
- "merge decision only"
204
-
205
- if has_fix_report:
206
- return 6, "User Verification", artifacts, \
207
- "fix-report.md exists — review completed", \
208
- "user verification → commit & merge"
209
-
210
- if has_fix_plan and code_changes["has_changes"]:
211
- return 5, "Review", artifacts, \
212
- "fix-plan.md exists + code changes present", \
213
- "code review → user verification → commit & merge"
214
-
215
- if has_fix_plan:
216
- return 4, "Fix", artifacts, \
217
- "fix-plan.md exists, no code changes yet", \
218
- "implement fix → review → user verification → commit & merge"
219
-
220
- # On fix branch but no artifacts
221
- return 1, "Deep Bug Diagnosis", artifacts, \
222
- "on fix branch but no artifacts found", \
223
- "diagnosis → triage → reproduce → fix → review → commit & merge"
224
-
225
-
226
- def _infer_pipeline_workflow_phase(project_root, list_filename, state_subdir, workflow_label):
227
- """Infer phase for pipeline-driven workflows (feature-workflow, refactor-workflow).
228
-
229
- Both follow the same structure:
230
- No list file → Phase 1: Brainstorm
231
- List file, no pipeline state → Phase 3: Launch
232
- List file + pipeline state → Phase 4: Monitor
233
-
234
- Checks new path (.prizmkit/plans/<list_filename>) first, then falls back
235
- to old root-level path with a migration warning.
236
- """
237
- # Check new path first, then old path with fallback warning
238
- new_list_path = os.path.join(project_root, ".prizmkit", "plans", list_filename)
239
- old_list_path = os.path.join(project_root, list_filename)
240
- has_list = os.path.isfile(new_list_path)
241
- if not has_list and os.path.isfile(old_list_path):
242
- has_list = True
243
- print(f"⚠️ Migration notice: {list_filename} found in root. "
244
- f"Please move to .prizmkit/plans/{list_filename}", file=sys.stderr)
245
-
246
- # Check new state path first, then old path with fallback warning
247
- new_state_dir = os.path.join(project_root, ".prizmkit", "state", state_subdir)
248
- old_state_dir = os.path.join(project_root, "dev-pipeline", "state", state_subdir)
249
- has_pipeline_state = os.path.isdir(new_state_dir) and bool(os.listdir(new_state_dir))
250
- if not has_pipeline_state and os.path.isdir(old_state_dir) and bool(os.listdir(old_state_dir)):
251
- has_pipeline_state = True
252
- print(f"⚠️ Migration notice: pipeline state found at dev-pipeline/state/{state_subdir}. "
253
- f"Please move to .prizmkit/state/{state_subdir}", file=sys.stderr)
254
-
255
- artifacts = {
256
- f"{workflow_label}_list_exists": has_list,
257
- "pipeline_state_exists": has_pipeline_state,
258
- }
259
-
260
- if has_list and has_pipeline_state:
261
- return 4, "Monitor", artifacts, \
262
- f".prizmkit/plans/{list_filename} + pipeline state exist", \
263
- "check pipeline status and report results"
264
-
265
- if has_list:
266
- return 3, "Launch", artifacts, \
267
- f".prizmkit/plans/{list_filename} exists, no pipeline state", \
268
- "launch pipeline → monitor progress"
269
-
270
- return 1, "Brainstorm", artifacts, \
271
- f"no .prizmkit/plans/{list_filename} found", \
272
- f"{workflow_label} goal clarification → plan → launch → monitor"
273
-
274
-
275
- def infer_feature_phase(project_root):
276
- """Infer feature-workflow phase from artifacts and pipeline state."""
277
- return _infer_pipeline_workflow_phase(
278
- project_root, "feature-list.json", "features", "feature"
279
- )
280
-
281
-
282
- def infer_refactor_phase(project_root):
283
- """Infer refactor-workflow phase from artifacts and pipeline state."""
284
- return _infer_pipeline_workflow_phase(
285
- project_root, "refactor-list.json", "refactor", "refactor"
286
- )
287
-
288
-
289
- # ---------------------------------------------------------------------------
290
- # Git state helpers
291
- # ---------------------------------------------------------------------------
292
-
293
- def detect_commits_ahead(project_root, main_branch="main"):
294
- """Count commits ahead of main branch."""
295
- log_output = run_git(
296
- ["log", f"{main_branch}..HEAD", "--oneline"], cwd=project_root
297
- )
298
- if log_output:
299
- return len(log_output.strip().split("\n"))
300
- return 0
301
-
302
-
303
- def detect_git_state(project_root, main_branch="main", cached_branch=None):
304
- """Detect git branch and change state."""
305
- current = cached_branch or run_git(["branch", "--show-current"], cwd=project_root)
306
-
307
- # Uncommitted changes (working tree)
308
- uncommitted = 0
309
- diff_stat = run_git(["diff", "--stat"], cwd=project_root)
310
- if diff_stat:
311
- lines = diff_stat.strip().split("\n")
312
- uncommitted = max(0, len(lines) - 1)
313
-
314
- # Staged changes
315
- staged = 0
316
- staged_stat = run_git(["diff", "--cached", "--stat"], cwd=project_root)
317
- if staged_stat:
318
- lines = staged_stat.strip().split("\n")
319
- staged = max(0, len(lines) - 1)
320
-
321
- commits_ahead = detect_commits_ahead(project_root, main_branch)
322
-
323
- return {
324
- "current_branch": current,
325
- "uncommitted_files": uncommitted,
326
- "staged_files": staged,
327
- "commits_ahead_of_main": commits_ahead,
328
- }
329
-
330
-
331
- # ---------------------------------------------------------------------------
332
- # Code change detection (reused from original, workflow-agnostic)
333
- # ---------------------------------------------------------------------------
334
-
335
- def detect_code_changes(project_root, main_branch="main"):
336
- """Analyze code changes relative to main branch.
337
-
338
- Filters out pipeline/config files that aren't source code — only counts
339
- files that represent actual implementation work.
340
-
341
- Uses a file_statuses dict keyed by filepath to avoid double-counting
342
- files that appear in both committed diff and uncommitted changes.
343
- """
344
- IGNORED_FILES = {
345
- # Basename-matched list files (root-level legacy paths)
346
- "feature-list.json",
347
- "bug-fix-list.json",
348
- "refactor-list.json",
349
- # Lock files
350
- "package-lock.json",
351
- "yarn.lock",
352
- "pnpm-lock.yaml",
353
- }
354
- # Note: .prizmkit/plans/*.json paths are caught by IGNORED_PREFIXES below
355
- IGNORED_PREFIXES = (
356
- ".prizmkit/",
357
- ".agents/",
358
- ".codex/",
359
- ".claude/",
360
- ".codebuddy/",
361
- )
362
-
363
- def is_source_file(filepath):
364
- """Return True if this file represents implementation code."""
365
- basename = os.path.basename(filepath)
366
- if basename in IGNORED_FILES:
367
- return False
368
- for prefix in IGNORED_PREFIXES:
369
- if filepath.startswith(prefix):
370
- return False
371
- return True
372
-
373
- # Track unique file → status to avoid double-counting.
374
- # Later sources (uncommitted, untracked) update the status if the file
375
- # was already seen in a committed diff.
376
- file_statuses = {} # filepath → "M" | "A" | "D"
377
-
378
- # Diff relative to main (committed changes on branch)
379
- diff_output = run_git(
380
- ["diff", main_branch, "--name-status"], cwd=project_root
381
- )
382
-
383
- if diff_output:
384
- for line in diff_output.strip().split("\n"):
385
- if not line.strip():
386
- continue
387
- parts = line.split("\t", 1)
388
- if len(parts) < 2:
389
- continue
390
- status, filepath = parts[0][0], parts[1] # first char of status
391
- if not is_source_file(filepath):
392
- continue
393
- file_statuses[filepath] = status
394
-
395
- # Uncommitted working tree changes — update status for already-seen files
396
- uncommitted = run_git(["diff", "--name-status"], cwd=project_root)
397
- if uncommitted:
398
- for line in uncommitted.strip().split("\n"):
399
- if not line.strip():
400
- continue
401
- parts = line.split("\t", 1)
402
- if len(parts) < 2:
403
- continue
404
- status, filepath = parts[0][0], parts[1]
405
- if not is_source_file(filepath):
406
- continue
407
- if filepath not in file_statuses:
408
- file_statuses[filepath] = "M" # uncommitted change = modified
409
- # If already tracked from branch diff, keep the branch-level status
410
-
411
- # Untracked files
412
- untracked = run_git(
413
- ["ls-files", "--others", "--exclude-standard"], cwd=project_root
414
- )
415
- if untracked:
416
- for filepath in untracked.strip().split("\n"):
417
- filepath = filepath.strip()
418
- if filepath and is_source_file(filepath):
419
- if filepath not in file_statuses:
420
- file_statuses[filepath] = "A" # untracked = added
421
-
422
- # Count by status
423
- result = {
424
- "files_modified": 0,
425
- "files_added": 0,
426
- "files_deleted": 0,
427
- "test_files_touched": 0,
428
- "directories_touched": [],
429
- "has_changes": False,
430
- }
431
-
432
- test_patterns = re.compile(
433
- r"(test|spec|__tests__|\.test\.|\.spec\.)", re.IGNORECASE
434
- )
435
- dirs = set()
436
-
437
- for filepath, status in file_statuses.items():
438
- if status == "M":
439
- result["files_modified"] += 1
440
- elif status == "A":
441
- result["files_added"] += 1
442
- elif status == "D":
443
- result["files_deleted"] += 1
444
-
445
- if test_patterns.search(filepath):
446
- result["test_files_touched"] += 1
447
- parent = os.path.dirname(filepath)
448
- if parent:
449
- parts = parent.split(os.sep)
450
- dirs.add(os.sep.join(parts[:2]) + "/")
451
-
452
- result["directories_touched"] = sorted(dirs)
453
- result["has_changes"] = len(file_statuses) > 0
454
-
455
- return result
456
-
457
-
458
- # ---------------------------------------------------------------------------
459
- # Main
460
- # ---------------------------------------------------------------------------
461
-
462
- def main():
463
- parser = argparse.ArgumentParser(
464
- description="Auto-detect interrupted workflow state for recovery"
465
- )
466
- parser.add_argument(
467
- "--project-root",
468
- default=None,
469
- help="Project root directory (default: auto-detect from git)",
470
- )
471
-
472
- args = parser.parse_args()
473
-
474
- # Resolve project root
475
- if args.project_root:
476
- project_root = os.path.abspath(args.project_root)
477
- else:
478
- git_root = run_git(["rev-parse", "--show-toplevel"])
479
- project_root = git_root if git_root else os.getcwd()
480
-
481
- main_branch = detect_main_branch(project_root)
482
-
483
- # Step 1: Detect workflow type (also caches branch name)
484
- workflow_type, context = detect_workflow_type(project_root)
485
-
486
- if workflow_type is None:
487
- report = {
488
- "detected": False,
489
- "message": (
490
- "No interrupted workflow detected. "
491
- "Use /feature-workflow, /bug-fix-workflow, or /refactor-workflow to start."
492
- ),
493
- }
494
- print(json.dumps(report, indent=2))
495
- sys.exit(0)
496
-
497
- # Check for other interrupted workflows (informational)
498
- other_workflows = detect_other_workflows(project_root, workflow_type)
499
-
500
- # Step 2: Collect git state and code changes once (shared across phase inference + report)
501
- cached_branch = context.get("branch")
502
- git_state = detect_git_state(project_root, main_branch, cached_branch=cached_branch)
503
- code_changes = detect_code_changes(project_root, main_branch)
504
-
505
- # Step 3: Infer phase within the detected workflow
506
- if workflow_type == "bug-fix-workflow":
507
- phase, phase_name, artifacts, reason, remaining = \
508
- infer_bugfix_phase(project_root, context.get("bug_id"),
509
- code_changes, git_state["commits_ahead_of_main"])
510
- elif workflow_type == "feature-workflow":
511
- phase, phase_name, artifacts, reason, remaining = \
512
- infer_feature_phase(project_root)
513
- elif workflow_type == "refactor-workflow":
514
- phase, phase_name, artifacts, reason, remaining = \
515
- infer_refactor_phase(project_root)
516
- else:
517
- # Should never reach here
518
- print(json.dumps({"detected": False, "message": "Unknown workflow type"}), file=sys.stderr)
519
- sys.exit(1)
520
-
521
- # Step 4: Build report
522
- report = {
523
- "detected": True,
524
- "workflow_type": workflow_type,
525
- "phase": phase,
526
- "phase_name": phase_name,
527
- "context": context,
528
- "artifacts": artifacts,
529
- "git": git_state,
530
- "code": code_changes,
531
- "recovery": {
532
- "reason": reason,
533
- "remaining_work": remaining,
534
- },
535
- }
536
-
537
- if other_workflows:
538
- report["other_interrupted_workflows"] = other_workflows
539
-
540
- print(json.dumps(report, indent=2))
541
-
542
-
543
- if __name__ == "__main__":
544
- main()