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,175 +0,0 @@
1
- # Mobile Rules — {{ project_name }}
2
-
3
- > This document was generated by the `mobile-rules` skill on {{ generated_at }}
4
- > Audience: All mobile developers + all AI coding assistants on this project
5
- >
6
- > **Usage**:
7
- > 1. All AI coding assistants must read this file before generating or modifying any mobile code
8
- > 2. This document takes precedence over "general best practices" in AI training data
9
- > 3. Code conflicting with this document must not be committed
10
-
11
- ---
12
-
13
- ## 0. TL;DR — Key Decisions at a Glance
14
-
15
- | Dimension | Decision |
16
- |-----------|----------|
17
- | Platform | {{ platform }} |
18
- | Min OS Version | {{ min_os_version }} |
19
- | Architecture Pattern | {{ architecture }} |
20
- | UI Framework | {{ ui_framework }} |
21
- | Navigation | {{ navigation }} |
22
- | State Management | {{ state_management }} |
23
- | Networking | {{ networking }} |
24
- | Local Persistence | {{ persistence }} |
25
- | Push Notifications | {{ push_notifications }} |
26
- | Background Tasks | {{ background_tasks }} |
27
- | Permissions Strategy | {{ permissions_strategy }} |
28
- | Test Coverage | {{ test_coverage }} |
29
- | Unit Test Framework | {{ unit_test_framework }} |
30
- | E2E Test Framework | {{ e2e_framework }} |
31
- | Distribution | {{ distribution }} |
32
- | Performance Target | {{ performance_target }} |
33
- | Accessibility Target | {{ a11y_target }} |
34
-
35
- ---
36
-
37
- ## 1. Project Structure
38
-
39
- {{ FIXED_RULES_STRUCTURE }}
40
-
41
- {{ tech_stack_rules }}
42
-
43
- ---
44
-
45
- ## 2. UI Development
46
-
47
- {{ FIXED_RULES_UI }}
48
-
49
- {{ ui_rules }}
50
-
51
- ---
52
-
53
- ## 3. Navigation & Deep Linking
54
-
55
- {{ FIXED_RULES_NAVIGATION }}
56
-
57
- {{ navigation_rules }}
58
-
59
- ---
60
-
61
- ## 4. State Management
62
-
63
- {{ FIXED_RULES_STATE }}
64
-
65
- {{ state_rules }}
66
-
67
- ---
68
-
69
- ## 5. Networking
70
-
71
- {{ FIXED_RULES_NETWORKING }}
72
-
73
- {{ networking_rules }}
74
-
75
- ---
76
-
77
- ## 6. Data Persistence
78
-
79
- {{ FIXED_RULES_PERSISTENCE }}
80
-
81
- {{ persistence_rules }}
82
-
83
- ---
84
-
85
- ## 7. Platform Features
86
-
87
- {{ FIXED_RULES_PLATFORM_FEATURES }}
88
-
89
- {{ platform_features_rules }}
90
-
91
- ---
92
-
93
- ## 8. Performance
94
-
95
- {{ FIXED_RULES_PERFORMANCE }}
96
-
97
- {{ performance_rules }}
98
-
99
- ---
100
-
101
- ## 9. Accessibility
102
-
103
- {{ FIXED_RULES_A11Y }}
104
-
105
- {{ a11y_rules }}
106
-
107
- ---
108
-
109
- ## 10. Security
110
-
111
- {{ FIXED_RULES_SECURITY }}
112
-
113
- ---
114
-
115
- ## 11. Testing
116
-
117
- {{ FIXED_RULES_TEST }}
118
-
119
- {{ test_rules }}
120
-
121
- ---
122
-
123
- ## 12. App Distribution
124
-
125
- {{ FIXED_RULES_DISTRIBUTION }}
126
-
127
- {{ distribution_rules }}
128
-
129
- ---
130
-
131
- ## 13. AI Vibecoding Behavior Constraints
132
-
133
- ### 13.1 Baseline Constraints (project-agnostic, always active)
134
-
135
- {{ FIXED_RULES_AI_BASE }}
136
-
137
- ### 13.2 Project-Specific Hard Constraints
138
-
139
- - **Adding dependencies**: {{ ai_dependency_rule }}
140
- - **Modifying shared code**: {{ ai_breaking_change_rule }}
141
- - **Platform-specific code**: {{ ai_platform_rule }}
142
-
143
- ### 13.3 Mandatory Pre-Actions (before every code generation)
144
-
145
- AI must complete the following in order before generating or modifying any mobile code:
146
-
147
- 1. Read this file (`mobile-rules.md`)
148
- 2. Read existing files in the target feature's directory to confirm whether similar functionality already exists
149
- 3. If modifying shared widgets/components/services, search all callers and assess platform impact
150
- 4. If modifying navigation routes or deep link schemes, assess all entry points
151
-
152
- ---
153
-
154
- ## 14. Architecture
155
-
156
- {{ arch_rules }}
157
-
158
- ---
159
-
160
- ## Appendix A: Deny List (Quick Reference)
161
-
162
- > This appendix is auto-generated by AI in Phase 4 by extracting all forbidden entries from each section.
163
-
164
- {{ deny_list_summary }}
165
-
166
- ## Appendix B: Recommended Libraries & Tools
167
-
168
- > This appendix is auto-generated by AI in Phase 4 to recommend the supporting ecosystem based on platform and framework choices.
169
-
170
- {{ recommended_libs }}
171
-
172
- ---
173
-
174
- **Version**: v1.0 — Generated on {{ generated_at }}
175
- **Next review recommended**: before tech stack changes or platform migration
@@ -1,46 +0,0 @@
1
- # Rules Configuration — Detailed Q&A Procedures
2
-
3
- Procedural details for configuring per-layer development rules during app planning. SKILL.md retains Steps 1-3 and 5 (flow control); this file contains Step 4's full Q&A workflow.
4
-
5
- ## Step 4: Configure Each Selected Layer — Full Q&A Workflow
6
-
7
- For each selected layer, run the 4-phase rule generation pattern:
8
-
9
- ### Phase A — Load Layer Resources
10
-
11
- - Read `${SKILL_DIR}/references/rules/<layer>/fixed-rules.md` — industry-consensus rules injected without asking
12
- - Read `${SKILL_DIR}/references/rules/<layer>/question-bank.md` — interactive questions organized in groups (G1->G10): authoritative source for question text, options, "Recommended" markers, and Notes
13
- - Read `${SKILL_DIR}/references/rules/<layer>/question-manifest.json` — machine-readable structure for this layer. **This is your asking checklist.** It lists, per question: `group`, `required`, `maps_to` (which template placeholders the answer fills), and conditional fields (`required_if`, `auto_derived_when`, `options_vary_by`). Its `groups[]` carries each group's `quick_mode` flag, and `template_placeholders` is the expected-set for the Phase D self-check. Use the manifest to track coverage; use question-bank.md for the actual wording you present to the user. If a question id in one file is absent from the other, trust question-bank.md for content and note the drift.
14
-
15
- ### Phase B — Interactive Q&A
16
-
17
- - Ask questions one group at a time (max 3 questions per message), as defined in question-bank.md
18
- - Each question shows a "Recommended" option to reduce decision cost
19
- - **Quick mode**: ask only the groups whose `quick_mode` is `true` in `question-manifest.json`. All other groups adopt recommended defaults silently. (The manifest is the single source of truth for quick-mode membership — do not hardcode group lists here.)
20
- - **Full mode**: ask all groups in manifest order (`groups[]`).
21
- - **Conditional questions** (driven by the manifest's per-question fields):
22
- - `required_if: "<expr>"` — ask this question only when the expression over prior answers holds (e.g. Q14 `required_if: Q13 != D`). If the condition is false, the question is legitimately skipped — not a coverage gap.
23
- - `auto_derived_when: "<expr>"` — when this holds, fill the mapped placeholder(s) from the prior answer without asking (e.g. backend Q6 `auto_derived_when: Q5 in [GraphQL, gRPC]`). Count as satisfied, not skipped.
24
- - `options_vary_by: "<Qid>"` — the question is still asked; only its option list depends on that prior answer (e.g. framework/ORM options vary by language). Never affects whether the question is required.
25
- - Shortcut commands work at any point:
26
- - `recommended` / `default` -> adopt all recommended for current group
27
- - `all recommended` -> adopt all recommended for all remaining groups
28
- - `skip` -> mark current group as "Not required at this stage"
29
- - Record answers in memory after each group. Track which manifest questions are answered, auto-derived, or conditionally skipped so Phase D can verify coverage.
30
-
31
- ### Phase C — Auto-derivation
32
-
33
- - Read `${SKILL_DIR}/references/rules/<layer>/derivation-rules.md`
34
- - Match user answers against the trigger map using keyword matching
35
- - Derive platform-specific rules without asking the user (e.g., choosing Flutter -> auto-inject Flutter widget/persistence/navigation rules)
36
-
37
- ### Phase D — Render and Write
38
-
39
- - Read `${SKILL_DIR}/references/rules/<layer>/template.md`
40
- - Fill all template placeholders with accumulated content from Phases A+B+C
41
- - **Post-render self-check** (driven by `question-manifest.json` -> `template_placeholders`):
42
- 1. **Coverage pass** — for every placeholder in `from_questions`, confirm it traces to an answered question OR an `auto_derived_when` path OR a conditionally-skipped question (`required_if` false). If a `from_questions` placeholder has no source, you skipped a required question — go back and ask it before writing.
43
- 2. **Residual pass** — scan the rendered document for any residual `{{ ` or ` }}`; count must be 0. Placeholders in `from_fixed_rules` / `auto_generated` / `metadata` are filled from fixed-rules.md, Phase D generation, and project metadata respectively — they are NOT expected to come from Q&A, but they MUST still be rendered (no residual braces).
44
- - Generate Appendix A (Deny List) and Appendix B (Recommended Tools) per template instructions — these fill the `auto_generated` placeholders
45
- - Create `.prizmkit/rules/` directory if it doesn't exist
46
- - Write `.prizmkit/rules/<layer>-rules.md`
@@ -1,379 +0,0 @@
1
- ---
2
- name: "bug-fix-workflow"
3
- description: "Interactive single-bug fix in current session. Guides through deep diagnosis Q&A → triage → reproduce → fix → review → commit without the background pipeline. Use this skill when the user wants to fix one specific bug right now, interactively. Trigger on: 'fix this bug', 'debug this', 'fix B-001', 'help me fix', 'let me fix this bug myself', 'interactive fix', 'manually fix bug'."
4
- ---
5
-
6
- # Bug Fix Workflow
7
-
8
- Fix a single bug interactively within the current AI CLI session. This is the in-session counterpart to `bugfix-pipeline-launcher` (which runs multiple bugs in the background).
9
-
10
- ## When to Use
11
-
12
- - User wants to fix **one specific bug** right now, with full visibility
13
- - User has a stack trace or error and wants interactive debugging
14
- - User prefers hands-on fixing over background pipeline
15
-
16
- **Do NOT use when:**
17
- - User has multiple bugs to fix in batch → `bug-planner` + `bugfix-pipeline-launcher`
18
- - User wants to plan/collect bugs without fixing → `bug-planner`
19
- - User wants background autonomous fixing → `bugfix-pipeline-launcher`
20
- - User wants to build features → `feature-workflow`
21
-
22
- ## Input
23
-
24
- **PRECONDITION:**
25
-
26
- | Input Source | Detection | Example |
27
- |---|---|---|
28
- | Bug-fix-list.json entry | User says "fix B-001" → read entry from `.prizmkit/plans/bug-fix-list.json` | `fix B-001` |
29
- | Stack trace / error message | User pastes error directly | `TypeError: Cannot read property...` |
30
- | Natural language description | User describes the problem | "login page crashes on submit" |
31
- | Failed test | User references a failing test file | `src/auth/__tests__/login.test.ts` |
32
-
33
- At least one input source must be provided. If none is clear, ask the user to describe the bug.
34
-
35
- ## Fast Path
36
-
37
- For trivial bugs with clear root cause and minimal scope:
38
-
39
- ### Eligibility Criteria (ALL must be true)
40
- - Root cause is immediately obvious (typo, missing null check, wrong variable name, off-by-one)
41
- - Fix is ≤10 lines of code in a single file
42
- - No cross-module impact
43
- - Existing tests cover the affected path (or bug is in untested utility)
44
- - No data model or API changes
45
-
46
- ### Fast Path Workflow
47
- 1. Branch Setup → `fix/<BUG_ID>-<short-desc>`
48
- 2. Write reproduction test → confirm failing
49
- 3. Apply fix → confirm test passes + full suite green
50
- 4. Run `/prizmkit-code-review` for quality check
51
- 5. Ask user: "Quick fix applied. Verify before commit? (Y/skip)"
52
- 6. Commit with `fix(<scope>):` prefix
53
- 7. Ask merge preference
54
-
55
- **Fast Path still requires**: fix branch, reproduction test, full test suite pass, code review, user merge decision.
56
-
57
- ---
58
-
59
- ## Execution
60
-
61
- ### Phase 0: Branch Setup
62
-
63
- **Goal**: Create an isolated working branch to keep main clean.
64
-
65
- 1. **Check current branch**:
66
- ```powershell
67
- git branch --show-current
68
- ```
69
- 2. **If on `main` or a shared branch**: Create and switch to fix branch:
70
- ```powershell
71
- git checkout -b fix/<BUG_ID>-<short-description>
72
- ```
73
- Example: `git checkout -b fix/B-001-login-null-crash`
74
- 3. **If already on a fix branch**: Confirm with user: "Continue on current branch `<branch-name>`, or create a new one?"
75
- 4. **Record the original branch name** for later merge.
76
-
77
- **CHECKPOINT CP-BFW-0**: On a dedicated fix branch, not main/shared branch.
78
-
79
- ---
80
-
81
- ### Phase 1: Deep Bug Diagnosis — Interactive Q&A
82
-
83
- **Goal**: Fully understand the bug before touching any code. Vague bug reports lead to incorrect fixes that mask the real issue or introduce new bugs.
84
-
85
- **Fast Path Decision Point**: After initial information gathering (Step 1.1), evaluate the Fast Path Eligibility Criteria in Step 1.4. If ALL simple bug criteria are met, use `AskUserQuestion` to let the user choose the execution approach. Only proceed with fast path implementation if the user explicitly selects "Fix now". Never guess the user's intent from text — always present the interactive selection.
86
-
87
- **CRITICAL RULE**: Ask as many questions as needed until the bug is fully understood. Do NOT rush into code. A misdiagnosed bug leads to a wrong fix, which is worse than no fix.
88
-
89
- #### Step 1.1: Initial Bug Information Gathering
90
-
91
- - If bug ID given (e.g. B-001): read entry from `.prizmkit/plans/bug-fix-list.json` — but DO NOT assume the description is complete
92
- - If raw error/stack trace: extract error message, affected files, line numbers
93
- - If natural language description: start the deep-dive Q&A below
94
-
95
- #### Step 1.2: Systematic Bug Clarification
96
-
97
- Read `${SKILL_DIR}/references/bug-diagnosis.md` for the full question framework — reproduction conditions, expected vs actual behavior, scope/impact, data/state, and error details. Adapt to what the user has already provided; skip answered questions.
98
-
99
- #### Step 1.3: Confirmation Before Triage
100
-
101
- Summarize the bug understanding:
102
-
103
- ```
104
- Bug Summary:
105
- - Symptom: [what happens]
106
- - Reproduction: [exact steps]
107
- - Environment: [where it occurs]
108
- - Expected: [correct behavior]
109
- - Impact: [who/what is affected]
110
- - Data trigger: [what data/state causes it]
111
- ```
112
-
113
- Ask the user: "Is this summary accurate? Any details to add?"
114
-
115
- **CHECKPOINT CP-BFW-1**: Bug fully understood and confirmed by user.
116
-
117
- ---
118
-
119
- #### Step 1.4: Complexity Assessment
120
-
121
- After confirming bug understanding, assess whether this bug needs structured planning:
122
-
123
- **Simple bug → Fast Path candidate**: meets ALL of the Fast Path §Eligibility Criteria (obvious root cause, ≤10 lines, single file, no cross-module impact, no data/API changes).
124
-
125
- **User choice required (mandatory)** — Use `AskUserQuestion` to present interactive selectable options:
126
-
127
- ```
128
- AskUserQuestion:
129
- question: "This bug appears straightforward. How would you like to proceed?"
130
- header: "Approach"
131
- options:
132
- - label: "Fix now (fast path)"
133
- description: "Implement the fix directly in this session — branch → test → fix → review → commit"
134
- - label: "Add to bug-fix-list.json (pipeline)"
135
- description: "Add this bug to .prizmkit/plans/bug-fix-list.json via bug-planner, then use bugfix-pipeline-launcher to launch autonomous pipeline execution"
136
- - label: "Full diagnosis"
137
- description: "Continue with in-depth analysis before deciding"
138
- ```
139
-
140
- - **Fix now** → Proceed with Fast Path Workflow (Phase 0 branch already set up)
141
- - **Add to bug-fix-list.json** → Invoke `bug-planner` to add this bug to `.prizmkit/plans/bug-fix-list.json`, then suggest user run `bugfix-pipeline-launcher` to start the pipeline. End this workflow.
142
- - **Full diagnosis** → Continue with full diagnosis (Phase 2 Triage)
143
-
144
- **Complex bug → Planning Path** (ANY is true):
145
- - Cross-module impact (>2 files affected)
146
- - Data model or API changes required
147
- - Root cause is uncertain or multi-layered
148
- - Fix requires structural changes
149
- - Multiple interrelated symptoms
150
-
151
- **User choice required (mandatory)** — Use `AskUserQuestion` to present interactive selectable options:
152
-
153
- ```
154
- AskUserQuestion:
155
- question: "This bug appears complex and will need structured planning. How would you like to proceed?"
156
- header: "Approach"
157
- options:
158
- - label: "Plan and fix now"
159
- description: "Create a plan and fix it in this session using /prizmkit-plan + /prizmkit-implement"
160
- - label: "Add to bug-fix-list.json (pipeline)"
161
- description: "Add this bug to .prizmkit/plans/bug-fix-list.json via bug-planner, then use bugfix-pipeline-launcher to launch autonomous pipeline execution"
162
- ```
163
-
164
- - **Plan and fix now** → Invoke `/prizmkit-plan` with `artifact_dir=.prizmkit/bugfix/<BUG_ID>/`:
165
- 1. `/prizmkit-plan` generates `spec.md` (bug description + acceptance criteria) + `plan.md` (fix strategy + test specifications) under `.prizmkit/bugfix/<BUG_ID>/`
166
- 2. Invoke `/prizmkit-implement` to execute the plan (TDD: write failing reproduction test → implement fix → tests pass)
167
- 3. Run `/prizmkit-code-review` for quality check
168
- 4. Commit via `/prizmkit-committer` with `fix(<scope>):` prefix
169
- 5. **End workflow** — skip Phase 2-7. No `/prizmkit-retrospective` (bug fixes are incomplete features, not new architecture)
170
- - **Add to bug-fix-list.json** → Invoke `bug-planner` to add this bug to `.prizmkit/plans/bug-fix-list.json`, then suggest user run `bugfix-pipeline-launcher` to start the pipeline. End this workflow.
171
-
172
- **NEVER proceed with direct code changes without explicit user confirmation via `AskUserQuestion`. Do NOT render options as plain text — the user must be able to click/select.**
173
-
174
- ---
175
-
176
- ### Phase 2: Triage
177
-
178
- **Goal**: Locate affected code, identify root cause, classify severity.
179
-
180
- > **Triage**: Classify error into: Runtime / Network / Auth / Data / Resource / Logic / Config / External. Check `.prizmkit/prizm-docs/` TRAPS for known patterns first. If a TRAPS match is found, use documented solution and reference the specific `.prizmkit/prizm-docs/` entry. If no match, trace the call chain from the stack frame to identify root cause from first principles.
181
-
182
- 1. **Read project context**: `.prizmkit/prizm-docs/root.prizm` → relevant L1/L2 docs for affected modules
183
- 2. **Locate affected code**: read the files mentioned in the error/stack trace or identified during diagnosis
184
- 3. **Check known issues**: search `.prizmkit/prizm-docs/` TRAPS sections for matching patterns
185
- 4. **If database-related**: read existing schema/model files to understand the data layer
186
- ```powershell
187
- Get-ChildItem -Path . -File -Recurse -Depth 4 -Include *.prisma,*.sql,schema.*,*.entity.* -ErrorAction SilentlyContinue |
188
- Where-Object { $_.FullName -match '\\(migrations|models)\\|schema\.|\.prisma$|\.sql$|\.entity\.' } |
189
- Where-Object { $_.FullName -notmatch '\\(node_modules|\.git)(\\|$)' } |
190
- Select-Object -First 20 -ExpandProperty FullName
191
- ```
192
- 5. **Classify**: root cause (confirmed/suspected), blast radius, fix complexity
193
- 6. **Present diagnosis to user**:
194
- ```
195
- Bug: Login page crash on submit
196
- Root Cause: AuthService.handleLogin() receives null token when API returns 401
197
- Affected Files: src/services/auth.ts (L42), src/pages/login.tsx (L28)
198
- Fix Complexity: Low (null check + error handling)
199
- ```
200
- Ask: "Does this diagnosis look right? Should I proceed with the fix?"
201
-
202
- **CHECKPOINT CP-BFW-2**: Root cause identified and diagnosis confirmed by user.
203
-
204
- ### Phase 3: Reproduce
205
-
206
- **Goal**: Create a failing test that proves the bug exists.
207
-
208
- > **Reproduce**: For API bugs: generate curl/HTTP request sequence with assertions. For UI bugs: generate step-by-step interaction guide. For logic bugs: generate unit test (arrange/act/assert). For data bugs: generate seed data + query sequence. The reproduction must FAIL with current behavior and be designed to PASS after the fix is applied — making it a regression guard.
209
-
210
- 1. **Write a reproduction test** that demonstrates the bug:
211
- - Name: `<module>.test.ts` → add a test case named `should handle <bug scenario>`
212
- - The test captures the exact failure condition
213
- 2. **Run the test** → confirm it **fails** (red)
214
- 3. **Show result to user**: "Reproduction test written and confirmed failing."
215
-
216
- If the bug is hard to reproduce automatically (e.g. environment-specific):
217
- - Ask the user for reproduction steps
218
- - Write a manual reproduction checklist instead
219
- - Proceed to Phase 4 with the manual checklist
220
-
221
- **CHECKPOINT CP-BFW-3**: Bug reproduction test written and confirmed failing.
222
-
223
- ### Phase 4: Fix
224
-
225
- **Goal**: Implement the minimal fix. Red test → green.
226
-
227
- 1. **Implement the fix**:
228
- - Change the minimum amount of code to fix the root cause
229
- - Do NOT refactor or add unrelated improvements — fix the bug only
230
- - Follow existing code conventions (read from `.prizmkit/prizm-docs/` RULES/PATTERNS)
231
- - If the fix involves database changes: read existing schema first, follow existing naming/constraint conventions
232
- 2. **Run the reproduction test** → must **pass** (green)
233
- 3. **Run the full module test suite** → must pass (no regressions)
234
- 4. **Show the fix to user**:
235
- - Summary of changes made
236
- - Test results (reproduction + regression)
237
- - Ask: "Fix looks good? Any concerns?"
238
-
239
- **CHECKPOINT CP-BFW-4**: Fix implemented and all tests passing (reproduction + regression).
240
-
241
- If the fix causes test regressions:
242
- - Show which tests broke and why
243
- - Revise the fix (max 3 attempts)
244
- - If still failing after 3 attempts, escalate to user with analysis
245
-
246
- ### Phase 5: Review
247
-
248
- **Goal**: Verify fix quality before committing.
249
-
250
- 1. **Run `/prizmkit-code-review`** to review the fix:
251
- - Reviews git diff against the bug context (root cause, fix approach, affected areas)
252
- - Iterative Reviewer Agent + Dev Agent loop (max 3 rounds)
253
- - Checks: root cause addressed (not just symptom), edge cases covered, reproduction test thoroughness, project conventions
254
- 2. **If PASS**: Proceed to Phase 6
255
- 3. **If NEEDS_FIXES after max rounds**: Present unresolved findings to user, ask whether to proceed or revise
256
-
257
- **CHECKPOINT CP-BFW-5**: Code review completed and quality verified.
258
-
259
- ### Phase 6: User Verification
260
-
261
- **Goal**: Let the user verify the fix works as expected before committing.
262
-
263
- 1. **Ask user**: "Fix passes all tests. Would you like to verify before committing?"
264
- - **(a) Run the app** — Start the dev server so you can manually test the fix scenario
265
- - **(b) Run a specific command** — Specify a test or script to run
266
- - **(c) Skip verification** — Proceed directly to commit (automated tests already pass)
267
- 2. **If (a)**: Detect and suggest dev server command (e.g. `npm run dev`, `python manage.py runserver`), start it, wait for user confirmation: "Fix verified? (yes/no)"
268
- 3. **If (b)**: Run the specified command, show results, ask confirmation
269
- 4. **If (c)**: Proceed to Phase 7
270
-
271
- If user reports the fix is NOT working:
272
- - Return to Phase 4 (max 2 more attempts)
273
- - If still failing: escalate with analysis
274
-
275
- **CHECKPOINT CP-BFW-6**: Fix manually verified by user and working as expected.
276
-
277
- ---
278
-
279
- ### Phase 7: Commit & Merge
280
-
281
- **Goal**: Commit the fix and offer to merge back to the original branch.
282
-
283
- 1. **Run `/prizmkit-committer`**:
284
- - Commit message: `fix(<scope>): <description>`
285
- - Include both fix code and reproduction test
286
- - Do NOT push (user decides when to push)
287
- - `/prizmkit-committer` is a pure commit tool — it does NOT modify `.prizmkit/prizm-docs/` or any project files
288
- - No `/prizmkit-retrospective` — bug fixes are incomplete features, not new architecture worth documenting
289
- 2. **Ask merge preference**:
290
- ```
291
- Fix committed on branch `fix/<BUG_ID>-<short-desc>`.
292
- What would you like to do?
293
- (a) Merge to <original-branch> and delete fix branch
294
- (b) Keep fix branch (for PR review workflow)
295
- (c) Decide later
296
- ```
297
- 3. **If (a)**:
298
- ```powershell
299
- git checkout <original-branch>
300
- git merge fix/<BUG_ID>-<short-description>
301
- git branch -d fix/<BUG_ID>-<short-description>
302
- ```
303
- 4. **If (b)**: Inform user: "Branch `fix/<BUG_ID>-<short-desc>` retained. Create a PR when ready."
304
- 5. **If bug came from .prizmkit/plans/bug-fix-list.json**: inform user to update bug status
305
- ```
306
- Bug B-001 fixed and committed.
307
- To update the bug list: manually set B-001 status to "fixed" in .prizmkit/plans/bug-fix-list.json
308
- Or retry the pipeline to pick up remaining bugs.
309
- ```
310
-
311
- **CHECKPOINT CP-BFW-7**: Fix committed and merge decision made.
312
-
313
- ## Resume — Interruption Recovery
314
-
315
- The workflow supports resuming from the last completed phase by detecting existing artifacts.
316
-
317
- **Detection logic**: Resume from git branch state plus, for the complex "Plan and fix now" path, the planning docs under `.prizmkit/bugfix/<BUG_ID>/`:
318
-
319
- | State Found | Resume From |
320
- |---------------|------------|
321
- | Not on a `fix/<BUG_ID>-*` branch | Phase 0: Branch Setup |
322
- | On `fix/<BUG_ID>-*` branch, no diagnosis done | Phase 1: Deep Bug Diagnosis |
323
- | `spec.md` + `plan.md` exist, no code changes | Phase 4: Fix (complex path) |
324
- | Reproduction test written, fix not yet green | Phase 4: Fix |
325
- | Fix code + passing tests, not yet reviewed | Phase 5: Review |
326
- | Review passed, not committed | Phase 6: User Verification |
327
- | Committed on fix branch | Phase 7: Merge decision |
328
-
329
- **Resume**: If a `fix/<BUG_ID>-*` branch already exists (and, for the complex path, a matching `.prizmkit/bugfix/<BUG_ID>/` directory), resume from the detected state instead of starting fresh.
330
-
331
- ---
332
-
333
- ## Artifacts
334
-
335
- This workflow favors code + tests over documents — a bug fix is an incomplete feature, not new architecture worth heavy documentation. What gets produced depends on the path taken:
336
-
337
- - **Fast path / interactive path** (Phase 2–7): no markdown artifacts. Output is the fix code, a reproduction test, and a git commit on the fix branch. Diagnosis and triage are presented inline to the user, not written to disk.
338
- - **Complex "Plan and fix now" path**: `/prizmkit-plan` writes `spec.md` (bug description + acceptance criteria) and `plan.md` (fix strategy + test specs) under `.prizmkit/bugfix/<BUG_ID>/`. These are the only persisted documents, and they double as resume anchors.
339
-
340
- ## Comparison with Pipeline Bug Fix
341
-
342
- | Dimension | bug-fix-workflow (this skill) | bugfix-pipeline-launcher |
343
- |-----------|-------------------------------|-----------------------------|
344
- | Scope | One bug at a time | All bugs in batch |
345
- | Execution | Interactive, in-session | Foreground or background daemon |
346
- | Diagnosis | Deep interactive Q&A with user | Automated from bug description |
347
- | Branch | Creates `fix/<BUG_ID>-*` branch | Pipeline manages branches |
348
- | Visibility | Full user interaction at each phase | Async, check status periodically |
349
- | User verification | Yes (Phase 6) | No (automated) |
350
- | Best for | Complex bugs needing user input | Batch of well-defined bugs |
351
- | Artifacts | Code + test (+ spec/plan on complex path) | Pipeline-managed |
352
- | Commit prefix | `fix(<scope>):` | `fix(<scope>):` |
353
-
354
- ## Error Handling
355
-
356
- | Scenario | Action |
357
- |----------|--------|
358
- | Bug ID not found in .prizmkit/plans/bug-fix-list.json | Ask user to provide bug details directly |
359
- | User's bug description is too vague | Ask systematic clarification questions (Phase 1) |
360
- | Cannot reproduce the bug | Ask for more context, try alternative reproduction |
361
- | Fix causes regressions | Revert, analyze, retry (max 3 rounds) |
362
- | Root cause unclear after investigation | Present findings, ask user for guidance |
363
- | Affected files are in unfamiliar module | Read `.prizmkit/prizm-docs/` L1/L2 for that module first |
364
- | Branch conflict during merge | Show conflict, ask user to resolve or keep branch |
365
-
366
- ## HANDOFF
367
-
368
- | From | To | Condition |
369
- |------|----|-----------|
370
- | `bug-planner` | **this skill** | User picks one bug to fix interactively |
371
- | `bugfix-pipeline-launcher` | **this skill** | User wants to fix a stuck/complex bug manually |
372
- | **this skill** | `bugfix-pipeline-launcher` | After fixing, user wants to continue with remaining bugs |
373
- | **this skill** | `prizmkit-committer` | Built into Phase 7 (pure commit, no doc sync) |
374
-
375
- ## Output
376
-
377
- - Fixed code with reproduction test
378
- - On the complex path only: `.prizmkit/bugfix/<BUG_ID>/spec.md` + `plan.md`
379
- - Git commit with `fix(<scope>):` prefix on dedicated fix branch
@@ -1,41 +0,0 @@
1
- # Bug Diagnosis — Question Framework
2
-
3
- Procedural details for systematic bug clarification in bug-fix-workflow Phase 1.
4
-
5
- ## Step 1.2: Systematic Bug Clarification
6
-
7
- Ask questions across these dimensions until every aspect is clear. **Adapt to what the user has already provided** — skip questions that are already answered.
8
-
9
- ### Reproduction Conditions
10
- - What exact steps trigger the bug? (step-by-step)
11
- - Which environment/browser/OS/version?
12
- - Is it reproducible every time, or intermittent?
13
- - When did it first appear? (after a specific change/deploy?)
14
- - Does it happen for all users or only specific accounts/roles/data?
15
-
16
- ### Expected vs Actual Behavior
17
- - What should happen? (the correct behavior)
18
- - What actually happens? (the buggy behavior)
19
- - Is there partial functionality (e.g., works for some inputs but not others)?
20
-
21
- ### Scope and Impact
22
- - Which features/pages/modules are affected?
23
- - Are there workarounds users are currently using?
24
- - Is this blocking other work?
25
- - Are there related symptoms elsewhere?
26
-
27
- ### Data and State
28
- - What data/state triggers the issue? (specific input values, DB state, user session state)
29
- - Does the bug involve data corruption or just incorrect display/behavior?
30
- - If database-related: which tables/records are affected?
31
-
32
- ### Error Details (if not already provided)
33
- - Full error message and stack trace?
34
- - Browser console errors?
35
- - Server-side logs?
36
- - Network request/response details?
37
-
38
- > Complexity assessment (simple vs complex routing) and the comparison with the
39
- > background pipeline live in the skill body (§Step 1.4 and §Comparison with
40
- > Pipeline Bug Fix) — they are flow-control decisions, kept here only by pointer
41
- > to avoid drift.