prizmkit 1.1.100 → 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 (309) 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/generate-bootstrap-prompt.py +38 -23
  30. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +20 -5
  31. package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +2 -2
  32. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +39 -0
  33. package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +7 -1
  34. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +4 -0
  35. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +12 -3
  36. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +13 -3
  37. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +13 -3
  38. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +2 -0
  39. package/bundled/dev-pipeline/templates/sections/log-size-awareness.md +9 -30
  40. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +15 -7
  41. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +42 -29
  42. package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +41 -39
  43. package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +4 -0
  44. package/bundled/dev-pipeline/templates/sections/test-failure-recovery-lite.md +4 -0
  45. package/bundled/dev-pipeline/tests/test_auto_skip.py +436 -14
  46. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +104 -0
  47. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +40 -0
  48. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +1138 -0
  49. package/bundled/dev-pipeline/tests/test_unified_cli.py +1045 -0
  50. package/bundled/skills/_metadata.json +1 -1
  51. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +29 -34
  52. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +6 -5
  53. package/bundled/skills/feature-pipeline-launcher/SKILL.md +29 -35
  54. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +7 -6
  55. package/bundled/skills/feature-workflow/SKILL.md +3 -6
  56. package/bundled/skills/recovery-workflow/SKILL.md +23 -32
  57. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +29 -35
  58. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +7 -6
  59. package/bundled/skills/refactor-workflow/SKILL.md +3 -6
  60. package/bundled/templates/hooks/commit-intent.json +2 -2
  61. package/bundled/templates/hooks/diff-prizm-docs.py +226 -0
  62. package/bundled/templates/hooks/prizm-pre-commit.py +45 -0
  63. package/bundled/templates/hooks/validate-prizm-docs.py +240 -0
  64. package/package.json +1 -1
  65. package/src/config.js +33 -12
  66. package/src/index.js +3 -6
  67. package/src/manifest.js +3 -2
  68. package/src/metadata.js +7 -18
  69. package/src/prompts.js +0 -12
  70. package/src/runtimes.js +18 -11
  71. package/src/scaffold.js +133 -116
  72. package/src/upgrade.js +1 -1
  73. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +0 -500
  74. package/bundled/dev-pipeline/launch-feature-daemon.sh +0 -657
  75. package/bundled/dev-pipeline/launch-refactor-daemon.sh +0 -502
  76. package/bundled/dev-pipeline/lib/branch.sh +0 -326
  77. package/bundled/dev-pipeline/lib/common.sh +0 -1476
  78. package/bundled/dev-pipeline/lib/heartbeat.sh +0 -469
  79. package/bundled/dev-pipeline/reset-bug.sh +0 -425
  80. package/bundled/dev-pipeline/reset-feature.sh +0 -436
  81. package/bundled/dev-pipeline/reset-refactor.sh +0 -423
  82. package/bundled/dev-pipeline/run-bugfix.sh +0 -1430
  83. package/bundled/dev-pipeline/run-feature.sh +0 -1718
  84. package/bundled/dev-pipeline/run-recovery.sh +0 -648
  85. package/bundled/dev-pipeline/run-refactor.sh +0 -1463
  86. package/bundled/dev-pipeline/tests/test-path-resolution.sh +0 -100
  87. package/bundled/dev-pipeline-windows/.env.example +0 -36
  88. package/bundled/dev-pipeline-windows/README.md +0 -30
  89. package/bundled/dev-pipeline-windows/SCHEMA_ANALYSIS.md +0 -533
  90. package/bundled/dev-pipeline-windows/assets/feature-list-example.json +0 -146
  91. package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +0 -137
  92. package/bundled/dev-pipeline-windows/launch-bugfix-daemon.ps1 +0 -9
  93. package/bundled/dev-pipeline-windows/launch-feature-daemon.ps1 +0 -9
  94. package/bundled/dev-pipeline-windows/launch-refactor-daemon.ps1 +0 -9
  95. package/bundled/dev-pipeline-windows/lib/branch.ps1 +0 -235
  96. package/bundled/dev-pipeline-windows/lib/common.ps1 +0 -991
  97. package/bundled/dev-pipeline-windows/lib/daemon.ps1 +0 -140
  98. package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +0 -1051
  99. package/bundled/dev-pipeline-windows/lib/reset.ps1 +0 -121
  100. package/bundled/dev-pipeline-windows/reset-bug.ps1 +0 -10
  101. package/bundled/dev-pipeline-windows/reset-feature.ps1 +0 -10
  102. package/bundled/dev-pipeline-windows/reset-refactor.ps1 +0 -10
  103. package/bundled/dev-pipeline-windows/run-bugfix.ps1 +0 -9
  104. package/bundled/dev-pipeline-windows/run-feature.ps1 +0 -9
  105. package/bundled/dev-pipeline-windows/run-recovery.ps1 +0 -179
  106. package/bundled/dev-pipeline-windows/run-refactor.ps1 +0 -9
  107. package/bundled/dev-pipeline-windows/scripts/check-session-status.py +0 -301
  108. package/bundled/dev-pipeline-windows/scripts/continuation.py +0 -374
  109. package/bundled/dev-pipeline-windows/scripts/detect-stuck.py +0 -530
  110. package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +0 -2279
  111. package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +0 -763
  112. package/bundled/dev-pipeline-windows/scripts/generate-recovery-prompt.py +0 -805
  113. package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +0 -841
  114. package/bundled/dev-pipeline-windows/scripts/init-bugfix-pipeline.py +0 -316
  115. package/bundled/dev-pipeline-windows/scripts/init-dev-team.py +0 -134
  116. package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +0 -382
  117. package/bundled/dev-pipeline-windows/scripts/init-refactor-pipeline.py +0 -399
  118. package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +0 -1362
  119. package/bundled/dev-pipeline-windows/scripts/patch-completion-notes.py +0 -191
  120. package/bundled/dev-pipeline-windows/scripts/prizmkit-test-gate.py +0 -446
  121. package/bundled/dev-pipeline-windows/scripts/update-bug-status.py +0 -1121
  122. package/bundled/dev-pipeline-windows/scripts/update-checkpoint.py +0 -173
  123. package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +0 -1789
  124. package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +0 -1327
  125. package/bundled/dev-pipeline-windows/scripts/utils.py +0 -542
  126. package/bundled/dev-pipeline-windows/templates/agent-prompts/critic-plan-challenge.md +0 -7
  127. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-fix.md +0 -7
  128. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +0 -65
  129. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-resume.md +0 -5
  130. package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +0 -7
  131. package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +0 -73
  132. package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +0 -589
  133. package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +0 -710
  134. package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +0 -791
  135. package/bundled/dev-pipeline-windows/templates/bug-fix-list-schema.json +0 -263
  136. package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +0 -326
  137. package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +0 -237
  138. package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +0 -340
  139. package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +0 -270
  140. package/bundled/dev-pipeline-windows/templates/sections/ac-verification-checklist.md +0 -7
  141. package/bundled/dev-pipeline-windows/templates/sections/checkpoint-system.md +0 -91
  142. package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +0 -34
  143. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-agent.md +0 -10
  144. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-full.md +0 -12
  145. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-lite.md +0 -7
  146. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-agent.md +0 -8
  147. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-full.md +0 -9
  148. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-lite.md +0 -6
  149. package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +0 -21
  150. package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +0 -21
  151. package/bundled/dev-pipeline-windows/templates/sections/log-size-awareness.md +0 -41
  152. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +0 -283
  153. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +0 -112
  154. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +0 -168
  155. package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +0 -82
  156. package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +0 -75
  157. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +0 -23
  158. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +0 -14
  159. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +0 -19
  160. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +0 -63
  161. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +0 -42
  162. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +0 -44
  163. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +0 -59
  164. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +0 -39
  165. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +0 -27
  166. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +0 -27
  167. package/bundled/dev-pipeline-windows/templates/sections/phase-prizmkit-test.md +0 -39
  168. package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +0 -35
  169. package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +0 -35
  170. package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +0 -73
  171. package/bundled/dev-pipeline-windows/templates/sections/phase0-init.md +0 -13
  172. package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +0 -21
  173. package/bundled/dev-pipeline-windows/templates/sections/session-context.md +0 -5
  174. package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +0 -6
  175. package/bundled/dev-pipeline-windows/templates/sections/task-contract.md +0 -34
  176. package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-agent.md +0 -48
  177. package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-lite.md +0 -48
  178. package/bundled/dev-pipeline-windows/templates/session-status-schema.json +0 -83
  179. package/bundled/skills-windows/app-planner/SKILL.md +0 -296
  180. package/bundled/skills-windows/app-planner/assets/app-design-guide.md +0 -101
  181. package/bundled/skills-windows/app-planner/references/architecture-decisions.md +0 -52
  182. package/bundled/skills-windows/app-planner/references/brainstorm-guide.md +0 -101
  183. package/bundled/skills-windows/app-planner/references/frontend-design-guide.md +0 -71
  184. package/bundled/skills-windows/app-planner/references/infrastructure-convention-discovery.md +0 -108
  185. package/bundled/skills-windows/app-planner/references/project-brief-guide.md +0 -82
  186. package/bundled/skills-windows/app-planner/references/project-conventions-discovery.md +0 -59
  187. package/bundled/skills-windows/app-planner/references/project-state-detection.md +0 -90
  188. package/bundled/skills-windows/app-planner/references/red-team-checklist.md +0 -40
  189. package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +0 -619
  190. package/bundled/skills-windows/app-planner/references/rules/backend/fixed-rules.md +0 -285
  191. package/bundled/skills-windows/app-planner/references/rules/backend/question-bank.md +0 -249
  192. package/bundled/skills-windows/app-planner/references/rules/backend/question-manifest.json +0 -46
  193. package/bundled/skills-windows/app-planner/references/rules/backend/template.md +0 -173
  194. package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +0 -382
  195. package/bundled/skills-windows/app-planner/references/rules/database/fixed-rules.md +0 -211
  196. package/bundled/skills-windows/app-planner/references/rules/database/question-bank.md +0 -184
  197. package/bundled/skills-windows/app-planner/references/rules/database/question-manifest.json +0 -39
  198. package/bundled/skills-windows/app-planner/references/rules/database/template.md +0 -158
  199. package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +0 -820
  200. package/bundled/skills-windows/app-planner/references/rules/frontend/fixed-rules.md +0 -188
  201. package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +0 -319
  202. package/bundled/skills-windows/app-planner/references/rules/frontend/question-manifest.json +0 -51
  203. package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +0 -339
  204. package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +0 -649
  205. package/bundled/skills-windows/app-planner/references/rules/mobile/fixed-rules.md +0 -290
  206. package/bundled/skills-windows/app-planner/references/rules/mobile/question-bank.md +0 -232
  207. package/bundled/skills-windows/app-planner/references/rules/mobile/question-manifest.json +0 -47
  208. package/bundled/skills-windows/app-planner/references/rules/mobile/template.md +0 -175
  209. package/bundled/skills-windows/app-planner/references/rules-configuration.md +0 -46
  210. package/bundled/skills-windows/bug-fix-workflow/SKILL.md +0 -379
  211. package/bundled/skills-windows/bug-fix-workflow/references/bug-diagnosis.md +0 -41
  212. package/bundled/skills-windows/bug-planner/SKILL.md +0 -402
  213. package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +0 -43
  214. package/bundled/skills-windows/bug-planner/references/critic-and-verification.md +0 -44
  215. package/bundled/skills-windows/bug-planner/references/error-recovery.md +0 -73
  216. package/bundled/skills-windows/bug-planner/references/input-formats.md +0 -53
  217. package/bundled/skills-windows/bug-planner/references/schema-validation.md +0 -25
  218. package/bundled/skills-windows/bug-planner/references/severity-rules.md +0 -16
  219. package/bundled/skills-windows/bug-planner/scripts/validate-bug-list.py +0 -322
  220. package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +0 -304
  221. package/bundled/skills-windows/bugfix-pipeline-launcher/references/configuration.md +0 -84
  222. package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +0 -381
  223. package/bundled/skills-windows/feature-pipeline-launcher/references/configuration.md +0 -67
  224. package/bundled/skills-windows/feature-pipeline-launcher/scripts/preflight-check.py +0 -462
  225. package/bundled/skills-windows/feature-planner/SKILL.md +0 -397
  226. package/bundled/skills-windows/feature-planner/assets/evaluation-guide.md +0 -64
  227. package/bundled/skills-windows/feature-planner/assets/planning-guide.md +0 -214
  228. package/bundled/skills-windows/feature-planner/references/browser-interaction.md +0 -59
  229. package/bundled/skills-windows/feature-planner/references/completeness-review.md +0 -57
  230. package/bundled/skills-windows/feature-planner/references/decomposition-patterns.md +0 -75
  231. package/bundled/skills-windows/feature-planner/references/error-recovery.md +0 -90
  232. package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +0 -112
  233. package/bundled/skills-windows/feature-planner/references/new-project-planning.md +0 -85
  234. package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +0 -1020
  235. package/bundled/skills-windows/feature-workflow/SKILL.md +0 -374
  236. package/bundled/skills-windows/feature-workflow/references/brainstorm-guide.md +0 -137
  237. package/bundled/skills-windows/prizm-kit/SKILL.md +0 -93
  238. package/bundled/skills-windows/prizmkit-code-review/SKILL.md +0 -161
  239. package/bundled/skills-windows/prizmkit-code-review/references/dev-agent-prompt.md +0 -30
  240. package/bundled/skills-windows/prizmkit-code-review/references/review-report-template.md +0 -31
  241. package/bundled/skills-windows/prizmkit-code-review/references/reviewer-agent-prompt.md +0 -66
  242. package/bundled/skills-windows/prizmkit-code-review/scripts/check_loop.py +0 -186
  243. package/bundled/skills-windows/prizmkit-committer/SKILL.md +0 -89
  244. package/bundled/skills-windows/prizmkit-deploy/SKILL.md +0 -444
  245. package/bundled/skills-windows/prizmkit-deploy/references/ci-cd-workflows.md +0 -115
  246. package/bundled/skills-windows/prizmkit-deploy/references/cloud-platform-deploy.md +0 -93
  247. package/bundled/skills-windows/prizmkit-deploy/references/data-safety-examples.md +0 -120
  248. package/bundled/skills-windows/prizmkit-deploy/references/database-setup.md +0 -46
  249. package/bundled/skills-windows/prizmkit-deploy/references/deploy-config-schema.md +0 -148
  250. package/bundled/skills-windows/prizmkit-deploy/references/deploy-history-schema.md +0 -62
  251. package/bundled/skills-windows/prizmkit-deploy/references/deployment-modes.md +0 -50
  252. package/bundled/skills-windows/prizmkit-deploy/references/direct-upload.md +0 -26
  253. package/bundled/skills-windows/prizmkit-deploy/references/dns-setup.md +0 -42
  254. package/bundled/skills-windows/prizmkit-deploy/references/docker-deploy.md +0 -31
  255. package/bundled/skills-windows/prizmkit-deploy/references/firewall-setup.md +0 -37
  256. package/bundled/skills-windows/prizmkit-deploy/references/live-validation-notes.md +0 -21
  257. package/bundled/skills-windows/prizmkit-deploy/references/nginx-blue-green.md +0 -59
  258. package/bundled/skills-windows/prizmkit-deploy/references/ssh-bootstrap-flow.md +0 -49
  259. package/bundled/skills-windows/prizmkit-deploy/references/ssh-execution-flow.md +0 -41
  260. package/bundled/skills-windows/prizmkit-deploy/references/ssh-takeover.md +0 -20
  261. package/bundled/skills-windows/prizmkit-deploy/references/ssl-setup.md +0 -56
  262. package/bundled/skills-windows/prizmkit-implement/SKILL.md +0 -71
  263. package/bundled/skills-windows/prizmkit-init/SKILL.md +0 -356
  264. package/bundled/skills-windows/prizmkit-init/assets/project-brief-template.md +0 -82
  265. package/bundled/skills-windows/prizmkit-init/references/config-schema.md +0 -70
  266. package/bundled/skills-windows/prizmkit-init/references/rules/layer-detection.md +0 -41
  267. package/bundled/skills-windows/prizmkit-init/references/tech-stack-catalog.md +0 -13
  268. package/bundled/skills-windows/prizmkit-init/references/update-supplement.md +0 -9
  269. package/bundled/skills-windows/prizmkit-plan/SKILL.md +0 -102
  270. package/bundled/skills-windows/prizmkit-plan/assets/plan-template.md +0 -115
  271. package/bundled/skills-windows/prizmkit-plan/assets/spec-template.md +0 -73
  272. package/bundled/skills-windows/prizmkit-plan/references/clarify-guide.md +0 -67
  273. package/bundled/skills-windows/prizmkit-plan/references/examples.md +0 -85
  274. package/bundled/skills-windows/prizmkit-plan/references/verification-checklist.md +0 -60
  275. package/bundled/skills-windows/prizmkit-prizm-docs/SKILL.md +0 -129
  276. package/bundled/skills-windows/prizmkit-prizm-docs/assets/prizm-docs-format.md +0 -613
  277. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-init.md +0 -45
  278. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-rebuild.md +0 -15
  279. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-status.md +0 -14
  280. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-update.md +0 -19
  281. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-validate.md +0 -17
  282. package/bundled/skills-windows/prizmkit-retrospective/SKILL.md +0 -87
  283. package/bundled/skills-windows/prizmkit-retrospective/references/knowledge-injection-steps.md +0 -50
  284. package/bundled/skills-windows/prizmkit-retrospective/references/structural-sync-steps.md +0 -43
  285. package/bundled/skills-windows/prizmkit-test/SKILL.md +0 -227
  286. package/bundled/skills-windows/prizmkit-test/references/boundary-coverage-protocol.md +0 -220
  287. package/bundled/skills-windows/prizmkit-test/references/examples.md +0 -143
  288. package/bundled/skills-windows/prizmkit-test/references/service-boundary-test-catalog.md +0 -225
  289. package/bundled/skills-windows/prizmkit-test/references/test-generation-steps.md +0 -109
  290. package/bundled/skills-windows/prizmkit-test/references/test-report-template.md +0 -111
  291. package/bundled/skills-windows/prizmkit-test/scripts/validate_boundary_report.py +0 -347
  292. package/bundled/skills-windows/recovery-workflow/SKILL.md +0 -355
  293. package/bundled/skills-windows/recovery-workflow/evals/evals.json +0 -46
  294. package/bundled/skills-windows/recovery-workflow/references/detection.md +0 -58
  295. package/bundled/skills-windows/recovery-workflow/scripts/detect-recovery-state.py +0 -544
  296. package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +0 -346
  297. package/bundled/skills-windows/refactor-pipeline-launcher/references/configuration.md +0 -72
  298. package/bundled/skills-windows/refactor-planner/SKILL.md +0 -398
  299. package/bundled/skills-windows/refactor-planner/assets/planning-guide.md +0 -292
  300. package/bundled/skills-windows/refactor-planner/references/behavior-preservation.md +0 -301
  301. package/bundled/skills-windows/refactor-planner/references/fast-path.md +0 -59
  302. package/bundled/skills-windows/refactor-planner/references/planning-phases.md +0 -135
  303. package/bundled/skills-windows/refactor-planner/references/refactor-scoping-guide.md +0 -221
  304. package/bundled/skills-windows/refactor-planner/scripts/validate-and-generate-refactor.py +0 -858
  305. package/bundled/skills-windows/refactor-workflow/SKILL.md +0 -343
  306. package/bundled/skills-windows/refactor-workflow/references/brainstorm-guide.md +0 -116
  307. package/bundled/templates/hooks/diff-prizm-docs.sh +0 -158
  308. package/bundled/templates/hooks/prizm-pre-commit.sh +0 -108
  309. package/bundled/templates/hooks/validate-prizm-docs.sh +0 -139
@@ -1,49 +0,0 @@
1
- # SSH Bootstrap Flow
2
-
3
- Bootstraps the server before first deployment. Present a plan showing every privileged action before executing anything.
4
-
5
- ## Always-Run Preflight
6
-
7
- ```
8
- locale-gen en_US.UTF-8 # fix locale warnings on bare Ubuntu
9
- apt-get update -qq # refresh package list
10
- ```
11
-
12
- ## Check-and-Install (idempotent)
13
-
14
- Node.js, npm, PM2, Nginx, Git. Use v22 LTS if v25 not available.
15
-
16
- ## Detect Port Conflicts
17
-
18
- `ss -tlnp | grep :80 || true`. If port 80/443 is occupied, report and ask how to resolve.
19
-
20
- ## User and Directory Setup
21
-
22
- ```
23
- useradd -m -s /bin/bash <runtimeUser> # if not exists
24
- mkdir -p /var/www/<project>/{releases,shared,deploy-logs}
25
- chown -R <runtimeUser>:<runtimeUser> /var/www/<project>
26
- ```
27
-
28
- ## PM2 Startup
29
-
30
- ```
31
- env PATH=$PATH:/usr/bin pm2 startup systemd -u <runtimeUser> --hp /home/<runtimeUser>
32
- ```
33
-
34
- ## Deploy Key (Pull mode only)
35
-
36
- ```
37
- sudo -u <runtimeUser> ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ""
38
- sudo -u <runtimeUser> ssh-keyscan -H github.com >> ~/.ssh/known_hosts
39
- ```
40
-
41
- ## Security Baseline (Firewall)
42
-
43
- After core tools are installed, ask whether to configure ufw. If user agrees, read `references/firewall-setup.md` for the full interactive flow and rule templates.
44
-
45
- ## Database Setup
46
-
47
- If Discovery detected database drivers, ask whether to install the database on the server. If user agrees, read `references/database-setup.md` for platform-specific setup commands and security notes.
48
-
49
- After each bootstrap step, record the result. Bootstrap operations must be idempotent. Back up any existing config files before modifying them.
@@ -1,41 +0,0 @@
1
- # SSH: Deployment Execution Flow
2
-
3
- Pipeline runs in strict order. Each group must complete before the next begins. If any step before traffic switch fails, STOP — do not touch the live version.
4
-
5
- ## Pre-flight — Change Summary
6
-
7
- Show what will be deployed using `git log --oneline <last-deployed-commit>..HEAD`. If first deployment, show last 5 commits. If no new commits, warn "No new code changes. Are you sure you want to redeploy?"
8
-
9
- ## Group 1 — Pre-flight & Prepare
10
-
11
- - Verify SSH, runtime user, tools, deploy key, port availability.
12
- - Generate `releaseId`: `YYYYMMDD-<short-commit-sha>`. Create `releases/<releaseId>`.
13
- - Determine target color: read `activeColor` from `shared/deploy-metadata.json` and use the opposite. If first deploy (no metadata, no `current` symlink), default to blue (port 3101).
14
-
15
- ## Group 2 — Fetch & Build
16
-
17
- - **CI/CD Pull mode** (server-side build): git clone → install → copy `.env.production` before build (NEXT_PUBLIC_* vars are baked at build time) → build. If build fails: STOP.
18
- - **CI/CD Push mode** (runner-side build): extract tarball, skip install/build.
19
- - **Direct-upload mode**: build was already done locally and SCP'd. Skip this group.
20
-
21
- ## Group 3 — Stage & Health Check
22
-
23
- - Start new version on inactive port via PM2: `pm2 start npm --name <project>-<app>-<color> -- run start -- -p <inactivePort>`.
24
- - PM2 process naming: `<project>-<app>-<color>` (e.g., `prizm-ideas-web-green`).
25
- - Wait 3-5 seconds, run health checks against new port. If any fails: STOP, do NOT switch traffic.
26
-
27
- ## Group 4 — Switch & Verify
28
-
29
- - Update Nginx upstream to new port. Run `nginx -t` — abort on failure.
30
- - `systemctl reload nginx`. Update `current` symlink to new release.
31
- - Write `shared/deploy-metadata.json` with new `activeColor`, `activePort`, `lastReleaseId`.
32
- - Run health checks against public endpoint. If any fails: rollback immediately.
33
-
34
- ## Group 5 — Cleanup & Record
35
-
36
- - Stop old PM2 process. Remove oldest releases beyond `releaseRetention` count. `pm2 save`.
37
- - Write deploy-history JSON. Update `deploy.config.json` validation status.
38
-
39
- ## Post-deploy — Completion Summary
40
-
41
- Output a summary (project, URL, version, duration, health status) and append to deploy.md. If `deployStrategy` is `"direct-upload"`, offer CI/CD upgrade (see §SSH: Post-Deploy CI/CD Upgrade).
@@ -1,20 +0,0 @@
1
- # SSH: Existing Deployment Takeover
2
-
3
- When deploying to a server that already has deployment assets.
4
-
5
- ## Detection
6
-
7
- 1. Check for existing `/var/www/<project>` directory
8
- 2. Check for existing PM2 processes with similar names
9
- 3. Check Nginx config referencing the same domain/IP
10
- 4. Check for port conflicts
11
-
12
- ## Decision Flow
13
-
14
- Report findings and ask for takeover decision:
15
-
16
- - **Take over and backup**: Back up existing config, then proceed.
17
- - **Coexist**: Use different directory/ports/process names.
18
- - **Manual resolve**: Stop and let the user handle it.
19
-
20
- Record takeover decision and validation results in config and history.
@@ -1,56 +0,0 @@
1
- # SSL/HTTPS Configuration (Let's Encrypt + Certbot)
2
-
3
- Read this file when DNS is confirmed pointing to the server and SSL needs to be configured.
4
-
5
- ## Step 1 — Detect cloud vendor
6
-
7
- ```
8
- # Try metadata endpoints to detect cloud vendor
9
- curl -s --connect-timeout 2 http://100.100.100.200/latest/meta-data/ && echo "ALIBABA"
10
- curl -s --connect-timeout 2 http://metadata.tencentyun.com/latest/meta-data/ && echo "TENCENT"
11
- curl -s --connect-timeout 2 http://169.254.169.254/latest/meta-data/ && echo "AWS/GCP/AZURE"
12
- ```
13
- Also check `/etc/hostname` for vendor patterns.
14
-
15
- ## Step 2 — Choose SSL strategy
16
-
17
- - **Cloud vendor detected** → ask user:
18
- > "Detected the server is running on <cloud-vendor>. Which SSL approach?"
19
- > - **A. Let's Encrypt free certificate (recommended)** — one command for permanent auto-renewal, hassle-free
20
- > - **B. <cloud-vendor> native certificate** — manual download/config, 1-year validity requires manual renewal
21
- >
22
- > Choose A and I'll set it up for you; choose B and you'll need to download the certificate from the cloud console and tell me the path.
23
- - **No cloud vendor / unknown** → use certbot directly, no choice needed.
24
-
25
- ## Step 3 — Certbot install & certificate request
26
-
27
- ```
28
- # Install certbot (idempotent)
29
- which certbot || apt-get install -y certbot python3-certbot-nginx
30
-
31
- # Request certificate
32
- certbot --nginx -d <domain> -d www.<domain> --non-interactive --agree-tos --email <user-email>
33
- ```
34
-
35
- **Collect from user before running:**
36
- - Email address (Let's Encrypt expiry notifications)
37
- - Confirm domain list (e.g., `example.com, www.example.com`)
38
-
39
- ## Step 4 — Verify auto-renewal
40
-
41
- ```
42
- systemctl status certbot.timer
43
- certbot renew --dry-run
44
- ```
45
- If timer is inactive, enable it: `systemctl enable --now certbot.timer`.
46
-
47
- ## Step 5 — Record
48
-
49
- - Write SSL configuration summary to deploy.md: certificate paths, auto-renewal status, expiry date.
50
- - Record a `"ssl-setup"` event in deploy history.
51
-
52
- ## Edge cases
53
-
54
- - **DNS not yet propagated** → certbot challenge fails. Tell user to wait and retry: `/prizmkit-deploy setup-ssl`.
55
- - **Existing certificate found** → check expiry date (`certbot certificates`). If expiring within 30 days, warn. Otherwise skip.
56
- - **Port 80/443 occupied by non-Nginx process** → report and ask how to resolve before proceeding.
@@ -1,71 +0,0 @@
1
- ---
2
- name: "prizmkit-implement"
3
- description: "Execute plan.md tasks with TDD approach. Respects task ordering and dependencies. Use after /prizmkit-plan. Trigger on: 'implement', 'build', 'code it', 'start coding', 'execute', 'write the code'. (project)"
4
- ---
5
-
6
- # PrizmKit Implement
7
-
8
- ### When to Use
9
- - After `/prizmkit-plan` when ready to write code
10
- - User says "implement", "build", "code it", "start coding", "develop"
11
- - For fast-path: user describes a simple change directly (fast-path skips specify, but still requires a simplified plan.md with Tasks section)
12
-
13
- ### When NOT to Use
14
- - No plan.md exists — run /prizmkit-plan first
15
- - All tasks in plan.md are already checked off — nothing to implement
16
- - Trivial one-line changes (typo, config tweak) — edit directly without the full workflow
17
- - Design/planning phase — use /prizmkit-plan to produce spec and plan first
18
-
19
- **PRECONDITION:**
20
-
21
- | Required Artifact | Check | If Missing |
22
- |---|---|---|
23
- | `plan.md` with Tasks section | File exists + unchecked tasks | Run `/prizmkit-plan` |
24
- | `spec.md` | File exists in same directory as plan.md | Run `/prizmkit-plan` |
25
-
26
- **Artifact directory**: Accept `artifact_dir` from caller. If not provided, scan `.prizmkit/` subdirectories for the most recently modified `plan.md` with unchecked tasks. When invoked as a handoff step in a skill chain, reuse the `artifact_dir` from the previous skill rather than re-detecting — re-detection can resolve to a different feature's directory in a multi-task workspace.
27
-
28
- ## Input
29
-
30
- | Parameter | Required | Description |
31
- |-----------|----------|-------------|
32
- | `artifact_dir` | No | Directory containing spec.md + plan.md. If omitted, auto-detect per precondition above. |
33
-
34
- ## Context Loading
35
-
36
- Before implementation, load context once:
37
-
38
- 1. **Task context**: Read `plan.md` (including Tasks section) and `spec.md` from the artifact directory. If other companion documents exist in the directory (e.g., `refactor-analysis.md`), read them for additional context.
39
- 2. **Architecture context**: Read `.prizmkit/prizm-docs/root.prizm` (L0 — project overview, module index, tech stack, conventions) and relevant L1/L2 docs for affected modules. Pay special attention to TRAPS (known pitfalls) and DECISIONS (architectural choices).
40
- 3. **Dev rules** (if configured): Check `.prizmkit/prizm-docs/root.prizm` for a `RULES:` line — if present, read all referenced `.prizmkit/rules/<layer>-rules.md` files. If a referenced file does not exist, skip it silently and continue. These define per-layer conventions (frameworks, naming, patterns, state management, etc.) that AI must follow when generating code for that layer. Apply these rules during implementation — if a rule conflicts with what plan.md describes, call it out and ask the user.
41
-
42
- > `.prizmkit/prizm-docs/` uses a 3-level hierarchy: L0 (`root.prizm`) is the project-wide index. L1 (e.g., `auth.prizm`) covers a module — its key files, interfaces, dependencies, traps, and decisions. L2 is for sub-modules with their own complexity. Implement reads these docs to avoid repeating known mistakes; `/prizmkit-retrospective` is responsible for updating them after implementation.
43
-
44
- ## Execution
45
-
46
- For each unchecked task in plan.md, in order:
47
-
48
- 1. Read L1/L2 doc for the target file's module — check TRAPS and DECISIONS before modifying files
49
- 2. Apply TDD where applicable: write a failing test first, then implement until it passes. For UI components or configuration changes where unit tests don't apply, skip the test-first step.
50
- - **Internal ID hygiene**: Do not place PrizmKit feature/bug/refactor IDs (`F-001`, `B-001`, `R-001`), task IDs, session IDs, run IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths in `.prizmkit/prizm-docs/`, user-visible UI text, API responses, emails, notifications, or tests that assert visible product copy. Translate internal references into durable product/domain language before writing memory docs, tests, or UI copy.
51
- - **Cover three paths for each function**: happy path (valid inputs producing expected behavior), edge cases (boundary values specific to the parameter type and domain — e.g., zero/min/max for numeric, empty collection, boundary index), and error conditions (inputs that should trigger error handling). Determine edge cases from the function's parameter types and domain logic, not from a fixed checklist. If a function has no edge or error paths, don't force them.
52
- - **No redundant tests**: Check if a test for this behavior already exists before writing. Each test must verify a uniquely different code path — don't write multiple tests that exercise the same logic.
53
- - **Test your own code only**: Don't test framework behavior, third-party library internals, or language built-ins. For library calls, test the integration point (correct parameters passed, return value correctly handled), not the library itself.
54
- 3. Mark task as `[x]` in `plan.md` immediately after completion — not batched at the end. Immediate marking means plan.md always reflects true progress, even if the session is interrupted.
55
- 4. **Parallel tasks**: If task has `[P]` marker, it can run in parallel with other `[P]` tasks in the same group. Sequential tasks stop on failure (later tasks may depend on this one). Parallel `[P]` tasks continue — report all failures at the end.
56
- 5. **Checkpoint tasks** (`CP:` prefix in plan.md): When a checkpoint task is reached, verify build passes and tests pass before continuing. Checkpoints catch integration errors early — skipping them means cascading failures in later phases.
57
- 6. After all tasks complete: run full test suite.
58
-
59
- ## Recovery
60
-
61
- If a session is interrupted mid-implementation:
62
- - Completed tasks are already marked `[x]` in plan.md (because we mark immediately)
63
- - Resume by re-running `/prizmkit-implement` — it picks up from the first unchecked `[ ]` task
64
-
65
- **HANDOFF:** `/prizmkit-code-review`
66
-
67
- ## Output
68
-
69
- - Code files created/modified as specified in plan.md Tasks section
70
- - `plan.md` Tasks section updated with completion markers `[x]`
71
- - Implementation summary output to conversation
@@ -1,356 +0,0 @@
1
- ---
2
- name: "prizmkit-init"
3
- description: "Project takeover and bootstrap. Scans any project, generates Prizm docs and project brief. Use this skill whenever a user opens a new project for the first time, says 'initialize', 'set up PrizmKit', 'take over this project', 'bootstrap', 'scan this codebase', 'init', or when .prizmkit/prizm-docs/ doesn't exist yet. Also use when PrizmKit was just installed via npx but not yet initialized. (project)"
4
- ---
5
-
6
- # PrizmKit Init
7
-
8
- Project takeover and bootstrap skill. Scans any project (brownfield or greenfield), generates Prizm documentation and project brief. Supports Codex, Claude Code, CodeBuddy, and multi-platform installations.
9
-
10
- ### When to Use
11
- - Taking over a new project (brownfield or greenfield)
12
- - User says "initialize PrizmKit", "set up PrizmKit", "take over this project"
13
- - First time using PrizmKit on a project
14
- - After `npx prizmkit install` when project has no `.prizmkit/prizm-docs/`
15
-
16
- ### When NOT to Use
17
- - All artifacts exist and are up to date → use `/prizmkit-prizm-docs` (Update) instead if you only want to resync docs
18
- - User just wants to update stale docs → use `/prizmkit-prizm-docs` (Update or Rebuild) instead (faster, targeted)
19
- - User wants to start a feature on an already-initialized project → skip init, go to `/prizmkit-plan`
20
-
21
- ### Error Handling
22
- - If artifacts already exist: idempotent status check offers regenerate/skip choices (see Phase 3: Idempotent Status Check)
23
- - If no source files found in any directory: fall back to greenfield mode
24
-
25
- ## Execution Steps
26
-
27
- **Phase 1: Platform Detection**
28
- 1. Detect which platform is running (Codex, Claude Code, or CodeBuddy) via AI CLI environment.
29
- 2. Hold detected platform value in memory — written to disk in Phase 6 along with other config fields.
30
-
31
- **Phase 2: Mode Detection**
32
- - If project has source code: brownfield mode
33
- - If project is nearly empty: greenfield mode
34
-
35
- **Phase 3: Idempotent Status Check**
36
-
37
- Scan all init artifacts and display their status:
38
-
39
- | Artifact | Path | Check |
40
- |----------|------|-------|
41
- | Prizm docs | `.prizmkit/prizm-docs/` | Directory exists + `root.prizm` present |
42
- | Runtime config | `.prizmkit/config.json` | File exists |
43
- | Project brief | `.prizmkit/plans/project-brief.md` | File exists |
44
-
45
- Display status table to user:
46
- ```
47
- Init Status Check:
48
- [exists] .prizmkit/prizm-docs/ (N files)
49
- [exists] .prizmkit/config.json
50
- [missing] .prizmkit/plans/project-brief.md
51
- ```
52
-
53
- - **If all missing**: skip interaction, proceed to generate everything.
54
- - **If some exist**: ask user once:
55
- - **[A] Regenerate all** — overwrite all existing artifacts (fresh start)
56
- - **[B] Only generate missing** — skip existing, fill gaps (default)
57
- - **[C] Pick per item** — ask for each existing artifact: regenerate or skip
58
-
59
- Each subsequent phase checks its artifact's action before executing:
60
- - `action == skip` → output "Skipped (exists)" and move on
61
- - `action == generate | regenerate` → run normally
62
- - **Special case for `.prizmkit/prizm-docs/`**:
63
- - `skip` = **Update** mode: preserve existing L1/L2 docs, re-scan tech stack, merge changes, check for missing docs (see `${SKILL_DIR}/references/update-supplement.md`)
64
- - `regenerate` = **Reinitialize**: overwrite everything
65
-
66
- BROWNFIELD WORKFLOW (existing project):
67
-
68
- **Phase 4: Project Scanning**
69
- 1. Detect tech stack from build files (`package.json`, `requirements.txt`, `go.mod`, `pom.xml`, `Cargo.toml`, etc.)
70
- 2. Map directory structure using a TWO-TIER model — flat structures lose the nesting relationships that AI needs to navigate the codebase:
71
- - TOP-LEVEL modules: directories directly under project root that contain source files or sub-directories with source files (e.g. `src/`, `internal/`, `lib/`)
72
- - SUB-MODULES: directories INSIDE a top-level module (e.g. `src/routes/`, `src/models/`)
73
- - A sub-module maps to `.prizmkit/prizm-docs/<M>/<S>.prizm`, never to `.prizmkit/prizm-docs/<S>.prizm` — flattening would create ambiguous paths when two modules have identically-named sub-modules
74
- - Exclude: `.git/`, `node_modules/`, `vendor/`, `build/`, `dist/`, `__pycache__/`, `target/`, `bin/`, `.agents/`, `.codex/`, `.claude/`, `.codebuddy/`, `.prizmkit/`
75
- - **Scan command** — run this to get a 2-level directory tree (excludes noise directories):
76
- ```powershell
77
- Get-ChildItem -Path . -Directory -Recurse -Depth 2 -Force -ErrorAction SilentlyContinue |
78
- Where-Object {
79
- $_.FullName -notmatch '\\(node_modules|\.git|dist|build|__pycache__|vendor|\.agents|\.codex|\.claude|\.codebuddy|\.prizmkit|target)(\\|$)'
80
- } |
81
- ForEach-Object {
82
- $relative = Resolve-Path -Relative $_.FullName
83
- $depth = (($relative -replace '^[.][\\/]', '') -split '[\\/]').Count - 1
84
- (' ' * [Math]::Max(0, $depth)) + ($relative -replace '^[.][\\/]', '')
85
- }
86
- ```
87
- 3. Identify entry points by language convention
88
- 4. Catalog dependencies (external packages)
89
- 5. Count source files per directory
90
- 6. Detect detailed tech stack (adaptive — only include fields that apply):
91
- → Read `${SKILL_DIR}/references/tech-stack-catalog.md` for the full field catalog.
92
-
93
- **IMPORTANT**: Not all projects have all fields. A pure backend API will have no `frontend_framework` or `frontend_styling`. A library may have no database. Only record what is actually detected — never generate empty or placeholder values.
94
-
95
- **Phase 4.5: Layer Detection**
96
-
97
- After tech stack detection, determine which development layers exist in the project — these are code domains that may benefit from custom dev rules (frontend, backend, database, mobile). This is a quick detection step, not an interactive Q&A — rules can be configured later based on detected layers.
98
-
99
- 1. Read `${SKILL_DIR}/references/rules/layer-detection.md` for the detection signal table and AI judgment guidelines.
100
- 2. Scan the project against each signal, and supplement with your own judgment — the signal table is a guide, not exhaustive. If you see clear evidence of a layer not covered by the table, include it. If a signal matches but context is misleading, downgrade or ignore it:
101
- - **frontend**: React/Vue/Angular/etc. in dependencies, or `src/components/` with UI files
102
- - **backend**: Express/FastAPI/Gin/etc. in dependencies, or `routes/`/`controllers/` with server code
103
- - **database**: Prisma/TypeORM/SQLAlchemy/etc. in dependencies, or `migrations/`/`prisma/` directory
104
- - **mobile**: `pubspec.yaml` (Flutter), `react-native` in package.json, or simultaneous `ios/`+`android/` directories
105
- 3. For mobile signals — if ambiguous (e.g., monorepo with web + ios/android dirs), use `AskUserQuestion` to confirm: "Mobile platform signals detected. Is this project a mobile app?" Options: "Yes, this is a mobile app" / "No, these are for another purpose".
106
- 4. Assemble `detected_layers` array (e.g., `["frontend", "backend", "database"]`). If no layers detected (library/CLI project), array is empty.
107
-
108
- **Phase 4.6: Infrastructure Quick Scan**
109
-
110
- Detect database and deployment signals, then ask 1-2 brief questions. This phase is **optional** — users can skip and configure later.
111
-
112
- - **BROWNFIELD**: Auto-detect infrastructure signals from existing files, then ask 1-2 brief questions (pre-filled with detection results)
113
- - **GREENFIELD**: No auto-detection possible — ask the 2 brief questions directly (database need and deployment target)
114
-
115
- 1. **Auto-detect infrastructure signals** (no user interaction):
116
- - **Database signals**: ORM/database client dependencies in `package.json`, `requirements.txt`, `go.mod`, `Cargo.toml`, `pyproject.toml` (look for: prisma, typeorm, sequelize, mongoose, sqlalchemy, django, gorm, diesel, sqlx, pg, mysql2, etc.); directories named `migrations/`, `db/`, `schema/`, `prisma/`; environment variables `DATABASE_URL`, `DB_HOST`, `DB_NAME`, `MONGO_URI` in `.env*` files
117
- - **Deployment signals**: `Dockerfile`, `docker-compose.yml`, `vercel.json`, `fly.toml`, `railway.json`, `netlify.toml`, `cloudflare.json`, `.github/workflows/`, `Procfile`, `app.yaml`, `serverless.yml`, `terraform/`, `pulumi/`
118
-
119
- 2. **Brief inquiry** (using `AskUserQuestion`, max 2 questions):
120
-
121
- **Question 1 — Database**:
122
- - If database signals detected: pre-fill with detected info
123
- - Question: "Does your project use a database?"
124
- - Options:
125
- - "Yes — {detected ORM/DB}" (if detected, mark as Recommended)
126
- - "Yes — different database" (let user specify)
127
- - "No database needed"
128
- - "Skip — decide later"
129
- - If "Yes": follow up to confirm database type (MySQL / PostgreSQL / MongoDB / SQLite / Other) — skip this follow-up if already clear from detection
130
-
131
- **Question 2 — Deployment target**:
132
- - If deployment signals detected: pre-fill with detected info
133
- - Question: "Where will this project be deployed?"
134
- - Options:
135
- - "{Detected platform}" (if detected, e.g., "Vercel" from vercel.json, mark as Recommended)
136
- - "Own server / VPS"
137
- - "SaaS platform" (if no specific platform detected)
138
- - "Container (Docker / K8s)"
139
- - "Skip — decide later"
140
- - If "SaaS platform": follow up with platform selection (Vercel / Railway / Fly.io / Cloudflare / AWS / Other)
141
-
142
- 3. **Write results**:
143
- - Append `### Infrastructure` section to the detected platform instruction file (`AGENTS.md` for Codex, `CLAUDE.md` for Claude Code, `CODEBUDDY.md` for CodeBuddy) with detection results and user answers. Format:
144
- ```markdown
145
- ### Infrastructure
146
-
147
- #### Database
148
- - **Type**: [PostgreSQL / MySQL / MongoDB / SQLite / none]
149
- - **ORM**: [detected ORM or "none detected"]
150
-
151
- #### Deployment
152
- - **Target**: [platform name or "undecided"]
153
- ```
154
- → This is intentionally minimal (Quick Scan). Full conventions and deployment details can be added later.
155
- - If user selects "Skip — decide later" for BOTH topics: write deferred marker instead:
156
- ```markdown
157
- ### Infrastructure
158
- <!-- infrastructure: deferred -->
159
- ```
160
- - If user skips only one topic, write the answered one normally and mark the skipped one:
161
- ```markdown
162
- #### Database
163
- <!-- database: deferred -->
164
- ```
165
-
166
- **Phase 4.7: Rules Quick Entry**
167
-
168
- After Infrastructure Quick Scan completes, check if `detected_layers` is non-empty (from Phase 4.5). If layers were detected, offer a lightweight entry point for rules configuration.
169
-
170
- 1. If `detected_layers` is empty (library/CLI project) → skip this phase entirely, proceed to Phase 5.
171
- 2. If layers detected, use `AskUserQuestion`:
172
-
173
- **Question**: "Detected **{list detected layers}** code. Would you like to set up custom development rules for AI to follow? This helps AI generate code that matches your conventions."
174
- - **Configure later (Recommended)** — Record layers and configure rules later
175
- - **Skip entirely** — no custom rules, AI uses general best practices
176
-
177
- 3. If user picked "Skip entirely" → clear `detected_layers` to empty array, proceed to Phase 5.
178
- 4. If user picked "Configure later" → keep `detected_layers`, proceed to Phase 5. The layers will be written to config.json in Phase 6.
179
-
180
- **Phase 5: Prizm Documentation Generation**
181
- Invoke prizmkit-prizm-docs (Init operation), passing the two-tier module structure from Phase 4:
182
- - Create `.prizmkit/prizm-docs/` directory structure mirroring the source tree (sub-module dirs become subdirectories under `.prizmkit/prizm-docs/<top-level>/`)
183
- - Generate `root.prizm` (L0) with project meta and MODULE_INDEX listing only top-level modules. If module count > 15, use MODULE_GROUPS format instead (group by functional domain).
184
- - For each module entry in MODULE_INDEX/MODULE_GROUPS, include keyword tags extracted from the module's source files — scan for: exported symbols, imported packages, domain terms in file/directory names. Format: `- module-name [tag1, tag2, tag3]: ...`. Tags help AI match user intent to relevant modules.
185
- - Generate L1 docs for top-level modules at `.prizmkit/prizm-docs/<M>.prizm` and for sub-modules at `.prizmkit/prizm-docs/<M>/<S>.prizm`
186
- - Skip L2 (lazy generation) — L2 is generated on first file modification, saving tokens upfront
187
- - Do not create auxiliary `changelog.prizm`, CHANGELOG sections/files, UPDATED/date metadata, feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths; git history is the source of change history
188
-
189
- **Phase 6: Workspace Initialization**
190
- 6a. Create `.prizmkit/` directory structure (if missing):
191
- - `.prizmkit/config.json` (adoption_mode, speckit_hooks_enabled, platform)
192
- - `.prizmkit/specs/` (empty)
193
- - `.prizmkit/plans/` (empty — needed by Phase 7 and future pipeline tasks)
194
-
195
- 6b. Write detected tech stack to `.prizmkit/config.json`:
196
- → Read `${SKILL_DIR}/references/config-schema.md` for merge strategy, field definitions, and examples.
197
-
198
- 6c. Write `detected_layers` to `.prizmkit/config.json` (alongside `tech_stack`):
199
- - Field: `"detected_layers": ["frontend", "backend"]` — the layers from Phase 4.5
200
- - If user chose "Skip entirely" in Phase 4.7, write empty array `[]`
201
- - For greenfield projects (Phase 4.5 skipped): write `[]` — no code layers to configure rules for yet; user can configure rules later when code exists
202
- - This field indicates which development layers exist in the project and can be used to determine available rule configuration options.
203
-
204
- **Phase 7: Project Brief Generation**
205
-
206
- If action for project brief == skip, output "Project brief: skipped (exists)" and proceed to Phase 8 (Report).
207
-
208
- Otherwise, generate a project brief to capture the user's overall product vision. This file is referenced by `root.prizm` so every new AI session understands the project goals.
209
-
210
- → Read `${SKILL_DIR}/assets/project-brief-template.md` for the brief format rules and checklist template.
211
-
212
- **Brownfield** (existing codebase):
213
- 1. Infer project goals from:
214
- - Generated `root.prizm` (tech stack, module structure, module groups)
215
- - `README.md` (if exists)
216
- - Package metadata (`package.json` description, `pyproject.toml`, etc.)
217
- - Quick scan of key entry points identified in L1 docs
218
- 2. Generate a draft in the checklist format defined in the template
219
- 3. Present the draft to the user and ask:
220
- - Is this inference correct?
221
- - Anything to add, remove, or modify?
222
- 4. Apply user edits and write to `.prizmkit/plans/project-brief.md`
223
-
224
- **Greenfield** (new/empty project):
225
- 1. Use **progressive questioning** (defined in template) to fully understand the user's intent:
226
- - Round 1: Problem & Vision → Round 2: Scope & Features → Round 3: Technical Constraints → Round 4: Clarification (adaptive)
227
- - Stop when completion criteria are met: problem, users, core features, boundaries, and technical direction are all clear
228
- - If answers are vague, probe deeper — don't accept shallow responses
229
- 2. Generate brief from answers in checklist format
230
- 3. Present to user for confirmation/editing
231
- 4. Write to `.prizmkit/plans/project-brief.md`
232
-
233
- **After writing the brief**:
234
- - Check if `root.prizm` already contains a `PROJECT_BRIEF:` line
235
- - If exact match `PROJECT_BRIEF: .prizmkit/plans/project-brief.md` exists: skip (already correct)
236
- - If `PROJECT_BRIEF:` exists with a different path: warn user and ask to confirm update or keep old path
237
- - If not present: add `PROJECT_BRIEF: .prizmkit/plans/project-brief.md` at the end of `root.prizm`, after all standard sections
238
- - This ensures every AI session that loads L0 knows to read the project brief
239
-
240
- **Phase 8: Report**
241
- Output summary: platform detected, tech stack detected (with detail), modules discovered, L1 docs generated, project brief status, next recommended steps.
242
-
243
- Tech stack report format (only show detected fields, adapt to project type):
244
- ```
245
- Tech stack detected:
246
- Language: TypeScript
247
- Runtime: Node.js 20
248
- Frontend: React + Tailwind CSS
249
- Backend: Express.js
250
- Database: PostgreSQL (Prisma)
251
- Testing: Vitest
252
- Bundler: Vite
253
- Project type: fullstack
254
- ```
255
-
256
- Adapt fields to match project type — only show detected fields.
257
-
258
- Saved to: `.prizmkit/config.json` → `tech_stack` field
259
-
260
- Next step: "Use `/prizmkit-plan` to start your first feature"
261
-
262
- GREENFIELD WORKFLOW (new project):
263
- - Skip Phase 4 code scanning (no code to scan — Phase 4.5 Layer Detection and Phase 4.7 Rules Quick Entry are skipped; no layers to detect yet):
264
- - Ask the user about their intended tech stack:
265
- - "What language/framework will you use?" (e.g. React + Node.js, Python + FastAPI, etc.)
266
- - Record answers in `config.json` `tech_stack` with `"_auto_detected": false` (user-provided, not auto-detected)
267
- - If user is unsure, skip tech_stack — it can be populated later on re-init after code exists
268
- - Phase 4.6: Run Infrastructure Quick Scan — in greenfield mode, no auto-detection is possible, so only ask the 2 brief questions (database need and deployment target). If user is unsure, skip — these can be configured later.
269
- - Phase 5: Create minimal `.prizmkit/prizm-docs/` with just `root.prizm` skeleton (populate TECH_STACK from user answers if provided)
270
- - Phase 7: Generate project brief (greenfield flow — ask user about project goals, see Phase 7 above)
271
- - Phases 6, 8: Same as brownfield (Phase 8 Report recommends `/prizmkit-plan` for first feature)
272
-
273
- ## Example
274
-
275
- **Brownfield init on a fullstack Node.js project:**
276
- ```
277
- $ /prizmkit-init
278
-
279
- Platform detected: Claude Code
280
- Init Status Check:
281
- [missing] .prizmkit/prizm-docs/
282
- [missing] .prizmkit/config.json
283
- [missing] .prizmkit/plans/project-brief.md
284
- → All missing, generating everything.
285
-
286
- Mode: Brownfield (154 source files found)
287
-
288
- Tech stack detected:
289
- Language: TypeScript
290
- Runtime: Node.js 20
291
- Frontend: React + Tailwind CSS
292
- Backend: Express.js
293
- Database: PostgreSQL (Prisma)
294
- Testing: Vitest
295
- Bundler: Vite
296
- Project type: fullstack
297
-
298
- Layer Detection:
299
- Detected layers: frontend, backend, database (from dependency + directory signals)
300
- → Stored for config.json
301
-
302
- Infrastructure Quick Scan:
303
- Database: PostgreSQL (Prisma) — detected from dependencies
304
- Deployment: Vercel — detected from vercel.json
305
- → Written to the detected platform instruction file `### Infrastructure`
306
-
307
- Rules Quick Entry:
308
- Matched layers: frontend (React), backend (Express.js), database (Prisma) → keeping default rules
309
-
310
- Modules discovered:
311
- src/routes/ → .prizmkit/prizm-docs/routes.prizm (12 files)
312
- src/models/ → .prizmkit/prizm-docs/models.prizm (8 files)
313
- src/services/ → .prizmkit/prizm-docs/services.prizm (15 files)
314
- src/middleware/ → .prizmkit/prizm-docs/middleware.prizm (5 files)
315
-
316
- Project brief: inferred from codebase → confirmed by user
317
- → .prizmkit/plans/project-brief.md
318
-
319
- Generated: root.prizm + 4 L1 docs
320
- Saved: .prizmkit/config.json (tech_stack + detected_layers recorded)
321
-
322
- Next: Use /prizmkit-plan to start your first feature
323
- ```
324
-
325
- UPDATE SUPPLEMENT (runs after tech stack merge in Update mode):
326
- → Read `${SKILL_DIR}/references/update-supplement.md` for the 5-step gap-fill procedure.
327
-
328
- **Re-init after PrizmKit upgrade (existing config preserved):**
329
- ```
330
- $ /prizmkit-init
331
-
332
- Init Status Check:
333
- [exists] .prizmkit/prizm-docs/ (12 files)
334
- [exists] .prizmkit/config.json
335
- [missing] .prizmkit/plans/project-brief.md
336
-
337
- Missing items will be generated.
338
- For existing items: [A] Regenerate all [B] Only generate missing (default) [C] Pick per item
339
- > B (Only generate missing)
340
-
341
- Tech stack changes detected:
342
- + bundler: Vite (newly detected)
343
- ~ testing: Jest → Vitest (updated)
344
- = language: TypeScript (unchanged)
345
- = frontend: React (unchanged)
346
-
347
- Documentation gap-fill:
348
- + app/share/[token].prizm (L2) — created (3 source files, meaningful logic)
349
- = routes.prizm (L1) — up to date
350
- ~ models.prizm (L1) — FILES count updated (8 → 10)
351
-
352
- Project brief: inferred from codebase → confirmed by user
353
- → .prizmkit/plans/project-brief.md (generated)
354
-
355
- Merged into .prizmkit/config.json (2 fields updated, user overrides preserved)
356
- ```