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,301 +0,0 @@
1
- # Behavior Preservation Guide
2
-
3
- This guide covers strategies for ensuring that refactoring changes structure without changing behavior. Every refactor item must declare a behavior preservation strategy.
4
-
5
- ---
6
-
7
- ## 1. Preservation Strategies
8
-
9
- ### Strategy: test-gate
10
-
11
- **Definition**: Run the full test suite after each refactoring change. All previously-passing tests must continue to pass.
12
-
13
- **How it works**:
14
- 1. Run the full test suite before starting the refactor item (establish baseline)
15
- 2. Implement the refactoring change
16
- 3. Run the full test suite again
17
- 4. Compare: all tests that passed before must still pass
18
- 5. If any test fails -> revert the change, investigate, and retry
19
-
20
- **When to use**:
21
- - Target area has good test coverage (>60%)
22
- - Tests are reliable (no flaky tests in the target area)
23
- - Test suite runs in reasonable time (<5 minutes for the relevant subset)
24
- - Tests cover the behavior contracts you need to preserve
25
-
26
- **Strengths**:
27
- - Most reliable automated strategy
28
- - Catches regressions immediately
29
- - Well-understood and widely practiced
30
- - Works with any test framework
31
-
32
- **Limitations**:
33
- - Only as good as test coverage — untested behavior can still break
34
- - Slow test suites may bottleneck iteration speed
35
- - Flaky tests create false negatives
36
-
37
- **Configuration in refactor-list.json**:
38
- ```json
39
- {
40
- "behavior_preservation": "test-gate",
41
- "test_command": "npm test"
42
- }
43
- ```
44
-
45
- ---
46
-
47
- ### Strategy: snapshot
48
-
49
- **Definition**: Capture the observable output/state of the target code before and after refactoring, then compare.
50
-
51
- **How it works**:
52
- 1. Identify observable outputs of the target code (API responses, rendered UI, log output, file output)
53
- 2. Capture a "before" snapshot by exercising the code with representative inputs
54
- 3. Implement the refactoring change
55
- 4. Capture an "after" snapshot with the same inputs
56
- 5. Compare: snapshots must match (or differ only in acceptable ways like formatting)
57
-
58
- **When to use**:
59
- - Test coverage is insufficient but behavior is observable
60
- - The code produces deterministic output for given inputs
61
- - You can identify representative inputs that exercise the key behavior paths
62
- - API endpoints, CLI tools, data processing pipelines
63
-
64
- **Strengths**:
65
- - Works even when formal tests are missing
66
- - Captures real behavior rather than test assertions
67
- - Can detect subtle regressions that tests might miss
68
-
69
- **Limitations**:
70
- - Requires deterministic behavior (non-deterministic outputs need normalization)
71
- - May miss edge cases if representative inputs are incomplete
72
- - Snapshot comparison tools may need configuration for acceptable differences
73
- - More manual setup than test-gate
74
-
75
- **Configuration in refactor-list.json**:
76
- ```json
77
- {
78
- "behavior_preservation": "snapshot",
79
- "snapshot_targets": ["API responses for /api/users/*", "CLI output for --help flag"]
80
- }
81
- ```
82
-
83
- ---
84
-
85
- ### Strategy: manual
86
-
87
- **Definition**: Human verification is required to confirm behavior is preserved. Useful as a last resort.
88
-
89
- **When to use**:
90
- - No test coverage AND no easily observable deterministic output
91
- - UI-heavy changes where visual regression is the primary concern
92
- - Legacy code with unknown behavior contracts
93
- - Code that interacts with external services in non-reproducible ways
94
-
95
- **How it works**:
96
- 1. Document the current behavior (screenshots, recordings, written descriptions)
97
- 2. Implement the refactoring change
98
- 3. Human manually verifies the behavior matches the documentation
99
- 4. Human signs off on the change
100
-
101
- **Strengths**:
102
- - Works for any situation
103
- - Humans can assess subjective quality (UI layout, user experience)
104
- - Can catch issues that automated tools miss
105
-
106
- **Limitations**:
107
- - Slowest strategy — blocks on human availability
108
- - Error-prone — humans miss regressions, especially subtle ones
109
- - Not scalable — each item needs separate human attention
110
- - Not repeatable — different humans may verify differently
111
-
112
- **Configuration in refactor-list.json**:
113
- ```json
114
- {
115
- "behavior_preservation": "manual",
116
- "verification_notes": "Manually verify login flow works: email login, social login, password reset"
117
- }
118
- ```
119
-
120
- ---
121
-
122
- ## 2. Choosing the Right Strategy
123
-
124
- Use this decision tree to select the appropriate strategy for each refactor item:
125
-
126
- ```
127
- Does the target area have test coverage >60%?
128
- ├── YES: Are the tests reliable (no flaky tests)?
129
- │ ├── YES → test-gate
130
- │ └── NO: Fix flaky tests first, then → test-gate
131
- │ (or if fixing is out of scope → snapshot)
132
- └── NO: Does the code produce deterministic, observable output?
133
- ├── YES → snapshot
134
- └── NO → manual (flag as high-risk)
135
- ```
136
-
137
- ### Strategy Selection Table
138
-
139
- | Test Coverage | Output Observable | Recommended Strategy | Risk Level |
140
- |--------------|-------------------|---------------------|------------|
141
- | High (>60%) | Yes | test-gate | Low |
142
- | High (>60%) | No | test-gate | Low |
143
- | Medium (30-60%) | Yes | test-gate + snapshot | Medium |
144
- | Medium (30-60%) | No | test-gate (acknowledge gaps) | Medium |
145
- | Low (<30%) | Yes | snapshot | Medium-High |
146
- | Low (<30%) | No | manual | High |
147
- | None (0%) | Yes | snapshot | High |
148
- | None (0%) | No | manual | Very High |
149
-
150
- ### Mixed Strategies
151
-
152
- For complex items, you can combine strategies:
153
- - **test-gate + snapshot**: Run tests AND compare output snapshots. Provides defense in depth.
154
- - **test-gate + manual**: Run tests AND have a human verify UI/UX aspects.
155
- - Use the primary strategy in the `behavior_preservation` field and note the secondary in `verification_notes`.
156
-
157
- ---
158
-
159
- ## 3. Common Behavior-Breaking Pitfalls
160
-
161
- These are patterns that frequently cause unintended behavior changes during refactoring. Check for each one when planning.
162
-
163
- ### 3.1 Side Effect Ordering
164
-
165
- **Pitfall**: Reordering function calls or module initialization can change side effects.
166
-
167
- **Example**: Moving `initLogger()` after `loadConfig()` when the logger depends on config.
168
-
169
- **Prevention**: Map side effects and their dependencies before restructuring. Document execution order constraints.
170
-
171
- ### 3.2 Error Handling Changes
172
-
173
- **Pitfall**: Extracting code into a new function changes which errors are caught and where.
174
-
175
- **Example**: A try/catch block that previously caught errors from inline code no longer catches them when the code is extracted to a separate function with its own error handling.
176
-
177
- **Prevention**: Trace error propagation paths before and after. Ensure the same errors reach the same handlers.
178
-
179
- ### 3.3 Closure and Scope Changes
180
-
181
- **Pitfall**: Moving code changes what variables are in scope, especially with closures.
182
-
183
- **Example**: Extracting a closure that captures `this` into a standalone function loses the `this` binding.
184
-
185
- **Prevention**: Identify all captured variables. Ensure they are passed as parameters or the binding is preserved.
186
-
187
- ### 3.4 Import Order Side Effects
188
-
189
- **Pitfall**: In some languages/frameworks, import order matters (module initialization, polyfills, monkey-patching).
190
-
191
- **Example**: Moving an import of a polyfill to a different position causes it to load after the code that needs it.
192
-
193
- **Prevention**: Identify imports with side effects. Document order constraints. Test module initialization explicitly.
194
-
195
- ### 3.5 Default Parameter Changes
196
-
197
- **Pitfall**: Extracting a function and adding default parameters changes behavior for callers that relied on the old defaults.
198
-
199
- **Example**: Original: `function process(data, format) { format = format || 'json'; ... }` — Refactored: `function process(data, format = 'json') { ... }` — These behave differently for `process(data, '')` (empty string).
200
-
201
- **Prevention**: Audit all default value logic. Use identical defaulting behavior in the refactored version.
202
-
203
- ### 3.6 Async/Await Conversion Gotchas
204
-
205
- **Pitfall**: Converting callbacks to async/await can change error propagation, timing, and concurrency.
206
-
207
- **Example**: Callback errors that were silently swallowed now throw unhandled promise rejections.
208
-
209
- **Prevention**: Map all error paths in the callback version. Ensure async version handles every path. Test with error scenarios.
210
-
211
- ### 3.7 Type Coercion Changes
212
-
213
- **Pitfall**: Moving code between contexts can change implicit type coercion behavior.
214
-
215
- **Example**: `==` comparisons that relied on type coercion break when types change due to new module boundaries.
216
-
217
- **Prevention**: Prefer strict equality. Audit type assumptions at module boundaries.
218
-
219
- ### 3.8 Timing and Race Conditions
220
-
221
- **Pitfall**: Restructuring async code can change execution timing, revealing or creating race conditions.
222
-
223
- **Example**: Splitting a synchronous operation into two async steps creates a window where state is inconsistent.
224
-
225
- **Prevention**: Identify shared mutable state. Ensure atomicity is preserved. Test concurrent scenarios.
226
-
227
- ---
228
-
229
- ## 4. Test Coverage Assessment
230
-
231
- Before refactoring, assess the test coverage of the target area to select the appropriate preservation strategy.
232
-
233
- ### Quick Coverage Assessment
234
-
235
- If a formal coverage tool is available:
236
- ```powershell
237
- # JavaScript (Istanbul/nyc)
238
- npx nyc --reporter=text -- npm test -- --Select-String "target-module"
239
-
240
- # Python (pytest-cov)
241
- pytest --cov=target_module --cov-report=term-missing
242
-
243
- # Go
244
- go test -coverprofile=coverage.out ./target-package/...
245
- ```
246
-
247
- ### Manual Coverage Assessment
248
-
249
- When coverage tools aren't available, assess manually:
250
-
251
- 1. **List all public functions/methods** in the target area
252
- 2. **Search for test files** that import or reference the target
253
- 3. **Check test assertions** — do they test behavior or just structure?
254
- 4. **Identify untested paths** — error handling, edge cases, default behavior
255
-
256
- ### Coverage-Based Planning Decisions
257
-
258
- | Coverage Level | Planning Decision |
259
- |---------------|-------------------|
260
- | >80% | Proceed with test-gate. High confidence in behavior preservation. |
261
- | 60-80% | Proceed with test-gate. Note gaps in refactor item descriptions for the pipeline to be cautious about. |
262
- | 30-60% | Consider writing additional tests before refactoring (as a prerequisite R-000 item). Or use snapshot strategy for low-coverage areas. |
263
- | <30% | Strongly recommend writing tests first. If user declines, use snapshot or manual strategy and flag as high risk. |
264
- | 0% | WARN user explicitly. Recommend writing tests as a prerequisite. If user insists on proceeding, use manual strategy and document all known behaviors. |
265
-
266
- ### Adding Tests as a Prerequisite Item
267
-
268
- When test coverage is insufficient, add a prerequisite refactor item:
269
-
270
- ```
271
- Refactor Item R-000:
272
- Title: Add test coverage for [target area] before refactoring
273
- Type: restructure
274
- Scope: [test files]
275
- Priority: critical
276
- Complexity: medium
277
- Behavior Preservation: manual (no existing tests to gate against)
278
- Acceptance Criteria:
279
- - Test coverage for [target area] reaches >60%
280
- - Tests cover: [list key behavior contracts]
281
- - All new tests pass
282
- Dependencies: none
283
- ```
284
-
285
- This item runs first, establishing the test baseline that all subsequent items use for their test-gate strategy.
286
-
287
- ---
288
-
289
- ## 5. Behavior Verification Checklist
290
-
291
- Before marking a refactor item as complete, verify:
292
-
293
- - [ ] All previously-passing tests still pass
294
- - [ ] No new warnings or deprecation notices in test output
295
- - [ ] No new lint errors introduced
296
- - [ ] Public API surface is unchanged (same exports, same function signatures)
297
- - [ ] Error messages and error codes are unchanged (consumers may depend on these)
298
- - [ ] Logging output is unchanged (monitoring/alerting may depend on log patterns)
299
- - [ ] Configuration interface is unchanged (env vars, config files, CLI flags)
300
- - [ ] Performance characteristics are within acceptable bounds (no regression >10%)
301
- - [ ] No dead code left behind (unused imports, unreachable functions)
@@ -1,59 +0,0 @@
1
- # Fast Path — Refactor Planner
2
-
3
- For simple refactoring with minimal scope.
4
-
5
- ## Eligibility Criteria (ALL must apply)
6
- - 1-2 refactor items only
7
- - Complexity: `low` or `medium` for all items
8
- - No cross-module impact (all items within same module)
9
- - Well-known refactoring pattern (rename, extract method/class, inline)
10
- - Existing test coverage for target area
11
-
12
- ## Fast Path Workflow
13
- 1. Confirm refactoring scope with user
14
- 2. **User confirmation (mandatory)** — Use `AskUserQuestion` to present interactive selectable options:
15
-
16
- ```
17
- AskUserQuestion:
18
- question: "This qualifies for fast-path (simple refactoring). How would you like to proceed?"
19
- header: "Approach"
20
- options:
21
- - label: "Fast-path"
22
- description: "Skip detailed analysis, draft refactor items directly and add to refactor-list.json"
23
- - label: "Full workflow"
24
- description: "Use the complete planning workflow with detailed code analysis"
25
- - label: "Implement directly"
26
- description: "Skip the task list entirely and implement the refactoring right now using /prizmkit-plan + /prizmkit-implement"
27
- ```
28
-
29
- - **Fast-path** → Continue with fast-path workflow below
30
- - **Full workflow** → Exit fast path, use full workflow from Phase 2
31
- - **Implement directly** → Invoke `/prizmkit-plan` directly to create spec + plan, then `/prizmkit-implement` to execute. Do NOT add to `.prizmkit/plans/refactor-list.json`
32
-
33
- **NEVER proceed without explicit user selection via `AskUserQuestion`. Do NOT render options as plain text — the user must be able to click/select.**
34
- 3. Draft items (title + type + scope + description + acceptance_criteria + behavior_preservation + dependencies)
35
- 4. Write draft to `.prizmkit/plans/refactor-list.draft.json`, then call the generate script:
36
- ```powershell
37
- Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate-refactor.py generate --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json
38
- ```
39
- 5. If valid -> summarize and recommend next step
40
- 6. If invalid -> apply fixes to the draft, re-run generate (max 2 attempts, then escalate to full workflow)
41
-
42
- ## When NOT to Use Fast Path
43
- - More than 2 refactor items
44
- - Any item with `high` complexity
45
- - Cross-module impact
46
- - Architecture migration patterns (Format C goals)
47
- - No existing test coverage for target area
48
-
49
- ## Example Fast Path Session
50
- ```
51
- User: "Rename the auth middleware function from checkAuth to requireAuth everywhere."
52
- AI: [Detects simple rename, single module]
53
- AI: [Qualifies for fast path: 1 item, low complexity, no cross-module impact]
54
- AI: [Uses AskUserQuestion with options: "Fast-path", "Full workflow", "Implement directly"]
55
- User: [Selects "Fast-path"]
56
- AI: "Drafting R-001..."
57
- AI: [Validates immediately]
58
- AI: "Ready to proceed to dev-pipeline."
59
- ```
@@ -1,135 +0,0 @@
1
- # Planning Phases — Refactor Planner
2
-
3
- Detailed procedures for Phases 4-6 of the refactor-planner interactive workflow, plus refactoring-specific assessment rules and browser verification guidance.
4
-
5
- ---
6
-
7
- ## Phase 4: Item Decomposition Procedure
8
-
9
- Read `${SKILL_DIR}/assets/planning-guide.md` for decomposition patterns and dependency ordering rules.
10
-
11
- For each refactoring goal:
12
- 1. Identify atomic refactoring operations
13
- 2. Determine inter-item dependencies (safe renames first, structural changes later)
14
- 3. Assess complexity per item (file count, cross-module scope, test coverage)
15
- 4. Assign behavior preservation strategy per item (read `${SKILL_DIR}/references/behavior-preservation.md`)
16
-
17
- ---
18
-
19
- ## Phase 5: Per-Item Confirmation Loop
20
-
21
- For each item, display:
22
-
23
- ```
24
- Refactor Item R-001:
25
- Title: [title]
26
- Type: [extract/rename/restructure/simplify/decouple/migrate]
27
- Scope: [files list]
28
- Priority: [critical/high/medium/low]
29
- Complexity: [low/medium/high]
30
- Behavior Preservation: [test-gate/snapshot/manual]
31
- Acceptance Criteria:
32
- - [criterion 1]
33
- - [criterion 2]
34
- Dependencies: [none / R-002, R-003]
35
-
36
- Confirm? (Y/modify/skip)
37
- ```
38
-
39
- - **Y**: Accept item as-is
40
- - **modify**: User provides changes, update item, re-display for confirmation
41
- - **skip**: Remove item from the list
42
-
43
- Continue until all items are confirmed or skipped.
44
-
45
- ---
46
-
47
- ## Phase 6: Completeness Review Checklist
48
-
49
- 1. **Dependency ordering check**: Verify items form a valid DAG (no cycles). Items should be ordered: safe renames -> extract/inline -> structural changes -> migrations
50
- 2. **Behavior preservation check**: Every item must have a declared preservation strategy. Flag any item with `manual` strategy and no test coverage.
51
- 3. **Gap detection**: Are there intermediate steps needed between items? Does item A's output match item B's input assumption?
52
- 4. **Cross-module impact**: Do any items affect modules outside the declared scope?
53
- 5. **Headless Execution Readiness**: The refactor pipeline runs each item through an autonomous AI session with NO human interaction. For each item, verify:
54
- - **Scope clarity**: Are all affected files explicitly listed? The AI must know exactly where to look.
55
- - **Refactoring instructions**: Is the description specific enough to execute without ambiguity?
56
- - ❌ "Clean up the utils module" — what exactly should change?
57
- - ✅ "Extract validation functions (validateEmail, validatePhone, validateUrl) from src/utils/helpers.ts into src/utils/validation.ts. Update all 12 import sites. Preserve existing function signatures."
58
- - **Behavior preservation**: Is it clear what tests to run and what behavior must be preserved?
59
- - **Dependency context**: If item depends on earlier refactors, does the description reference what changed?
60
-
61
- ### Review Summary Table Format
62
-
63
- Present review summary:
64
-
65
- ```
66
- Item | Deps Valid | Preservation | Gaps | Status
67
- R-001 | OK | test-gate | - | Ready
68
- R-002 | OK | test-gate | - | Ready
69
- R-003 | OK | manual | No test coverage| Needs attention
70
- R-004 | OK | snapshot | - | Ready
71
- ```
72
-
73
- If issues found, discuss with user and resolve before proceeding.
74
-
75
- ---
76
-
77
- ## Behavior Preservation Check
78
-
79
- Every item MUST declare a behavior preservation strategy. Read `${SKILL_DIR}/references/behavior-preservation.md` for strategy details.
80
-
81
- | Strategy | When to Use |
82
- |----------|-------------|
83
- | `test-gate` | Target area has good test coverage. Run full test suite after each change. |
84
- | `snapshot` | Compare output/state before and after. Used when tests are insufficient but behavior is observable. |
85
- | `manual` | Human verification required. Last resort when neither tests nor snapshots are feasible. |
86
-
87
- Flag items using `manual` strategy prominently — they carry the highest risk of behavior regression.
88
-
89
- ---
90
-
91
- ## Dependency Ordering
92
-
93
- Auto-detect inter-item dependencies and enforce safe ordering:
94
- 1. **Safe renames** first (lowest risk, no structural change)
95
- 2. **Extract/inline** operations (moderate risk, changes module boundaries)
96
- 3. **Structural changes** (higher risk, reorganizes architecture)
97
- 4. **Migrations** last (highest risk, changes patterns/paradigms)
98
-
99
- ---
100
-
101
- ## Complexity Assessment
102
-
103
- Assess each item's complexity based on:
104
- - **File count**: 1-2 files = low, 3-5 files = medium, 6+ files = high
105
- - **Cross-module scope**: same module = low, 2 modules = medium, 3+ modules = high
106
- - **Test coverage**: high coverage = reduces complexity, low coverage = increases complexity
107
- - **Pattern familiarity**: well-known pattern = low, novel restructuring = high
108
-
109
- Take the highest of these individual assessments as the item's complexity.
110
-
111
- ---
112
-
113
- ## Browser Verification
114
-
115
- **Browser verification is a feature-pipeline capability only.** Refactors use `behavior_preservation` strategy instead to ensure no external behavior changes:
116
-
117
- - `strategy: test-gate` — Rely on existing test suite. Pipeline runs tests before and after refactoring.
118
- - `strategy: snapshot` — Compare behavior before/after refactoring using executable snapshots (outputs, API responses, side effects)
119
- - `strategy: manual` — Require human verification that behavior is preserved
120
-
121
- For refactors that modify UI code (e.g., component restructuring), the test-gate or snapshot strategy ensures visual appearance is preserved. You can optionally note browser verification needs in your description or acceptance criteria:
122
-
123
- Example:
124
- ```
125
- Refactor Title: Extract UserProfile component from AccountSettings
126
- Type: extract
127
- Strategy: snapshot
128
- Acceptance Criteria:
129
- 1. UserProfile component renders identically to inline version (compare snapshots)
130
- 2. All props are correctly forwarded (unit tests pass)
131
- 3. No visual regression (screenshot comparison)
132
- 4. Component is reusable in other views
133
- ```
134
-
135
- The refactor pipeline AI will use the snapshot strategy to verify external behavior is preserved during refactoring.