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,444 +0,0 @@
1
- ---
2
- name: "prizmkit-deploy"
3
- description: "Universal deployment gateway for any PrizmKit project. Discovers project type and target (SSH server, Vercel, Docker, etc.), then routes: full automation for SSH Linux with PM2 + Nginx + blue/green switching, guided setup for cloud platforms, or safe documentation fallback for unsupported targets. Also operates existing deployments: status, logs, restart, rollback, health checks, history, validate. Use this skill whenever the user asks about deployment, hosting, going live, or server operations. Triggers on: 'deploy', 'ship it', 'take this live', 'deploy to Vercel', 'deploy to my server', 'check deploy status', 'view logs', 'restart app', 'rollback', 'how do I deploy this', any deployment or hosting question. (project)"
4
- ---
5
-
6
- # PrizmKit Deploy — Universal Deployment Gateway
7
-
8
- `/prizmkit-deploy` is the single entry point for all deployment work. When a user asks to deploy anything — any project type, any target — this skill handles it.
9
-
10
- Three possible outcomes depending on what's supported:
11
- 1. **Full automation** (SSH Linux server): configure, bootstrap, deploy, verify, operate — complete AI takeover.
12
- 2. **Guided setup** (cloud platforms like Vercel, Netlify, Docker): generate config, walk through CLI steps, verify.
13
- 3. **Documented fallback** (unsupported targets): detect what's possible, produce deploy.md, record the adapter gap.
14
-
15
- When invited, behave as a deployment engineer. Ask until you understand what is being deployed, where it runs, how it is built, how it starts, what secrets it needs, how traffic reaches it, and how health is checked.
16
-
17
- ### When to Use
18
- - User says "deploy", "ship it", "take this live", "deploy to Vercel", "deploy to my server"
19
- - User wants to check deploy status, view logs, restart app, rollback
20
- - First-time deployment configuration or repair
21
- - Any deployment, hosting, or server operation question
22
-
23
- ### When NOT to Use
24
- - Project has no code to deploy (empty/scaffold project)
25
- - Local dev environment startup — use the project's dev scripts instead
26
- - Purely CI/CD pipeline debugging unrelated to deployment
27
- - User wants to edit application code — use /prizmkit-plan and /prizmkit-implement
28
-
29
- ## Data Safety Gate
30
-
31
- Before executing any command that could **irreversibly destroy, overwrite, or modify data**, pause and get explicit user confirmation. This is a hard gate — the cost of a false negative (losing real data) is catastrophic, while asking one extra question costs nothing.
32
-
33
- ### Detection
34
-
35
- Before running any shell command, scan it for these patterns:
36
-
37
- | Category | Dangerous patterns | What's at risk |
38
- |----------|-------------------|----------------|
39
- | Database schema | `prisma db push --force-reset`, `prisma db push --accept-data-loss`, `prisma migrate reset`, `prisma migrate dev --create-only` | All existing data dropped, schema reset |
40
- | Database data | `DROP TABLE`, `DROP DATABASE`, `TRUNCATE`, `DELETE FROM` without `WHERE`, `UPDATE` without `WHERE` | Data deletion or corruption |
41
- | File system | `rm -rf`, `> /etc/`, overwriting existing configs without backup | Config loss, system breakage |
42
- | Cloud resources | `terraform destroy`, `kubectl delete`, cloud resource deletion, S3 bucket removal | Infrastructure/service loss |
43
-
44
- ### Confirmation Flow
45
-
46
- When a dangerous pattern is detected:
47
-
48
- 1. **Stop.** Do not execute. Do not ask "should I proceed?" while already running the command.
49
- 2. **Explain** what the command will do and what data will be lost, in plain language.
50
- 3. **Ask** an explicit yes/no question. Accept only a clear "yes" or equivalent — ambiguous responses ("sure, I guess", "ok go ahead") count as "no" when the consequence is data loss.
51
- 4. **Only proceed** on unambiguous consent. If the user says anything other than a clear affirmative, abort.
52
- 5. **Record** the confirmation decision and the command that was run in deploy history.
53
-
54
- ### Headless Mode
55
-
56
- If a destructive data operation is detected in headless mode, **refuse and exit** with `DATA_SAFETY_DENIED`. Data destruction must never happen without human oversight — an unattended pipeline that runs `--force-reset` could wipe a production database with no one watching.
57
-
58
- ### Examples
59
-
60
- Read `${SKILL_DIR}/references/data-safety-examples.md` for concrete few-shot examples of dangerous commands caught by this gate, including the correct and incorrect ways to handle them.
61
-
62
- ## Deployment Discovery
63
-
64
- Before doing anything else, discover what you're deploying and where. This phase routes the request to the right adapter or fallback. It runs regardless of mode (interactive or headless), but interactive mode may ask questions; headless mode reads from existing config and exits with `NEEDS_INPUT` if critical details are missing.
65
-
66
- ### Step 1: Project Detection
67
-
68
- Scan the project root for build/package files and classify:
69
-
70
- | File found | Language/Framework | Build command | Start command |
71
- |------------|-------------------|---------------|---------------|
72
- | `package.json` with `next` dep | Next.js | `next build` | `next start -p <port>` |
73
- | `package.json` with `vite` dep | Vite (React/Vue) | `vite build` | `vite preview` |
74
- | `package.json` (generic) | Node.js | `npm run build` | `npm run start` |
75
- | `go.mod` | Go | `go build` | `./<binary>` |
76
- | `Cargo.toml` | Rust | `cargo build --release` | `./target/release/<binary>` |
77
- | `requirements.txt` / `pyproject.toml` | Python | — | `python -m uvicorn` or similar |
78
- | `Dockerfile` | Containerized | `docker build` | `docker run` |
79
- | `docker-compose.yml` | Docker Compose | `docker compose build` | `docker compose up` |
80
- | `Makefile` only | C/C++/generic | `make` | `make run` or binary |
81
-
82
- Also scan for:
83
- - **Environment variables**: grep for `process.env.`, `os.environ`, `os.Getenv`, `env::var` — catalog every reference
84
- - **Port usage**: grep for port numbers, `listen()`, `PORT` env var
85
- - **Database dependencies**: check package.json/requirements.txt/go.mod for database drivers
86
-
87
- ### Step 2: Deployment Target Detection
88
-
89
- Determine WHERE the user wants to deploy. Check in order:
90
-
91
- **A. User-specified target** (highest priority):
92
- - "deploy to Vercel" / "deploy to my server" / "deploy with Docker" → use what the user says.
93
-
94
- **B. Detect from project files** (if user hasn't specified):
95
- - `vercel.json` → Vercel
96
- - `netlify.toml` → Netlify
97
- - `fly.toml` → Fly.io
98
- - `Dockerfile` or `docker-compose.yml` → Docker
99
- - `.github/workflows/deploy.yml` → check what it targets
100
- - `app.yaml` → GCP App Engine
101
- - `serverless.yml` → Serverless Framework
102
-
103
- **C. Ask the user** (interactive only):
104
- - "Where should this project be deployed?"
105
- - Options to suggest based on detected files + common choices:
106
- - "My own Linux server (SSH access) — full AI automation"
107
- - "Vercel / Netlify — guided CLI setup"
108
- - "Docker — guided container deployment"
109
- - "Other — generate deployment documentation"
110
-
111
- If headless mode and no target can be determined, exit with `NEEDS_INPUT` listing the missing target information.
112
-
113
- **D. Check for existing deployment**:
114
- - Does `.prizmkit/deploy/deploy.config.json` already exist? If yes, read the configured target.
115
- - Does the user mention a server IP or hostname? Check if it's already reachable.
116
-
117
- ### Step 3: Route to Adapter
118
-
119
- Based on detected target, route the rest of the session:
120
-
121
- 1. **SSH Linux server** → §SSH Deployment Path — full automation: bootstrap, configure, deploy, operate. First-version adapter: PM2 + Nginx + blue/green.
122
- 2. **Vercel / Netlify** → §Cloud Platform Deployment Path — guided: detect CLI tools, walk through deploy commands, generate deploy.md. Details in `references/cloud-platform-deploy.md`.
123
- 3. **Docker** → §Docker Deployment Path — guided: detect Dockerfile/Compose, build image, container lifecycle. Details in `references/docker-deploy.md`.
124
- 4. **Unsupported** → §Unsupported Deployment Fallback — generate deploy.md, record adapter gap, provide manual checklist.
125
-
126
- Cloud and Docker paths follow the same discovery and documentation patterns but use platform CLIs instead of SSH + PM2.
127
-
128
- **Compatibility check before routing to SSH**: The SSH adapter (PM2 + Nginx + blue/green) requires a Node.js project — verify `package.json` exists. Non-Node.js projects (Go, Rust, Python) targeting a Linux server route to Unsupported Fallback with a note: "Adapter gap: PM2 adapter requires Node.js."
129
-
130
- ### Step 4: Unsupported Deployment Fallback
131
-
132
- When the deployment target or project type isn't covered by any adapter, don't fail silently. Instead:
133
-
134
- 1. **Detect what you can**: project language, framework, build/start commands, env vars, port usage, database dependencies.
135
- 2. **Generate `.prizmkit/deploy/deploy.md`**: human-readable deployment guide with prerequisites, environment variables table, build/start instructions, health check suggestions.
136
- 3. **Record the adapter gap**: write a note in deploy.md and deploy-history identifying what's missing (e.g., "Adapter needed: Python/FastAPI on systemd").
137
- 4. **Provide a manual checklist**: concrete steps the user can follow to deploy manually.
138
- 5. **Offer to generate CI/CD config**: if `.github/workflows/` exists or the user wants one, generate a basic deploy workflow.
139
-
140
- ## Mode Detection
141
-
142
- Detect invocation mode from the user's initial message. The mode determines what you're allowed to do:
143
-
144
- **Interactive mode** (user typed `/prizmkit-deploy` or asked directly):
145
- - May ask as many questions as needed to fill in missing deployment details.
146
- - May request approvals for privileged, destructive, or traffic-impacting actions.
147
- - May deploy to any environment (dev/test/production).
148
- - Production requires explicit user confirmation before execution.
149
-
150
- **Headless mode** (invoked via `--headless` flag, pipeline, or script):
151
- - Never wait for user input — unattended shells that time out on a prompt block pipelines silently without visible errors, so exit with clear status codes instead.
152
- - May ONLY target `dev` or `test` environments.
153
- - If `--env production` in headless mode: exit immediately with `ENVIRONMENT_DENIED — production deployment requires interactive mode`, because production deploys must never happen without human oversight.
154
- - If required info is missing, exit with `NEEDS_INPUT` and write pending questions to `.prizmkit/deploy/pending-input.json`.
155
- - May only perform actions already authorized by `deploy.config.json`.
156
-
157
- ## Command Routing
158
-
159
- When the user invokes `/prizmkit-deploy`, determine intent from the first word after the command:
160
-
161
- ```
162
- /prizmkit-deploy → deploy (if config exists) or configure (if not)
163
- /prizmkit-deploy configure → first-run or repair configuration wizard
164
- /prizmkit-deploy deploy → full deployment pipeline
165
- /prizmkit-deploy status → show PM2 process status for all apps
166
- /prizmkit-deploy logs --app <id> → tail PM2 logs for the given app
167
- /prizmkit-deploy restart --app <id> → PM2 restart for the given app
168
- /prizmkit-deploy rollback --app <id> [--to <releaseId>] → rollback to previous or specified release
169
- /prizmkit-deploy health --app <id> → run configured health checks
170
- /prizmkit-deploy history → list recent deployment events from deploy-history/
171
- /prizmkit-deploy validate → run validation checks without deploying
172
- ```
173
-
174
- ### No-arg behavior
175
-
176
- - If `.prizmkit/deploy/deploy.config.json` does not exist → start first-run configuration wizard.
177
- - If config exists and validates → show deployment summary (active release, app status, last deploy time) and ask which environment, then proceed to deploy.
178
- - If config exists but required fields are missing or validation is stale → enter repair flow.
179
-
180
- ## File Structure
181
-
182
- All artifacts live under `.prizmkit/deploy/`:
183
-
184
- ```
185
- .prizmkit/deploy/
186
- deploy.md # human-readable documentation
187
- deploy.config.json # machine-readable config & validation state
188
- pending-input.json # pending questions for headless mode resume
189
- deploy-history/
190
- <deployment-id>.json # one per deploy/rollback/event
191
- deploy-scripts/ # future — PrizmKit-managed deploy scripts
192
- secrets.enc.json # optional, encrypted local secrets
193
- secrets.local.json # optional, plaintext secrets (must be gitignored)
194
- ```
195
-
196
- Read `references/deploy-config-schema.md` when writing or validating `deploy.config.json`. Read `references/deploy-history-schema.md` when writing history records.
197
-
198
- ## SSH Deployment Path
199
-
200
- The following sections define the SSH deployment adapter — the only fully-automated path. Route here when Discovery determines the target is a Linux server with SSH access.
201
-
202
- ### SSH: Deployment Mode Selection
203
-
204
- After Discovery routes to SSH, **before** entering the configuration wizard, ask the user how they want to deploy.
205
-
206
- **First question:**
207
- > "How do you want to deploy to the server?"
208
- > - **A. Direct Upload (quick start)** — build locally, transfer to server and start. Good for first deployment.
209
- > - **B. CI/CD Auto-Deploy (recommended)** — configure GitHub Actions, then `git push` auto-deploys.
210
-
211
- **If user chooses CI/CD, second question:**
212
- > "CI/CD has two modes:"
213
- > - **Push mode** — GitHub Actions runner builds, SCP transfers to server. Low server load.
214
- > - **Pull mode** — server pulls code and builds itself. Simpler config but requires a Deploy Key.
215
-
216
- For detailed mode descriptions and the full Push/Pull comparison table, read `references/deployment-modes.md`.
217
-
218
- **Config field:** `deployStrategy` in `deploy.config.json` — `"direct-upload"`, `"ci-cd-push"`, or `"ci-cd-pull"`. Existing configs without this field default to `"ci-cd-pull"` for backward compatibility.
219
-
220
- ### SSH: Server Model
221
-
222
- Servers are generic SSH targets. A server is valid if it:
223
- - Can be reached over SSH.
224
- - Provides a Linux shell.
225
- - Can install or has Node.js, npm, PM2, Nginx, Git.
226
- - Can access the configured Git repository (Pull mode only).
227
-
228
- Server-side directory layout:
229
- ```
230
- /var/www/<project>/
231
- releases/
232
- <release-id>/
233
- shared/
234
- .env.production # mode 600, owner: runtime user
235
- deploy-metadata.json # active color, last release, timestamp
236
- current -> releases/<release-id>
237
- deploy-logs/
238
- ```
239
-
240
- SSH roles: `bootstrapUser` (usually root, for initial setup) and `runtimeUser` (default `deploy`, for app processes). App processes never run as root.
241
-
242
- ### SSH: First-Run Configuration Wizard
243
-
244
- When `.prizmkit/deploy/deploy.config.json` does not exist, enter configuration wizard. Flow: **deployment mode → collect → validate → confirm → persist**.
245
-
246
- **Before any questions:** ask deployment mode (see §SSH: Deployment Mode Selection). This determines required steps:
247
-
248
- | Step | Direct Upload | CI/CD Push | CI/CD Pull |
249
- |------|:---:|:---:|:---:|
250
- | SSH Server Discovery | Required | Required | Required |
251
- | Repository Access | Skipped | Skipped | Required |
252
- | Application Configuration | Required | Required | Required |
253
- | Environment Variables | Required | Required | Required |
254
- | Persist Configuration | Required | Required | Required |
255
-
256
- #### Step 1: SSH Server Discovery
257
-
258
- Ask for and validate:
259
- - **Server host and port** (e.g., `43.161.221.171:22`)
260
- - **Bootstrap user** (usually `root`) — for initial package install and user creation
261
- - **Runtime user** (recommend `deploy`) — app runs as this user, never root
262
- - **Auth method** — SSH key path or agent
263
-
264
- Validate immediately: `ssh <bootstrapUser>@<host> 'echo OK'`. If that fails, nothing else matters — stop and fix connectivity first.
265
-
266
- #### Step 2: Repository Access (CI/CD Pull mode only)
267
-
268
- Only needed when `deployStrategy` is `"ci-cd-pull"` — the server needs to `git pull` code. Skip for `"direct-upload"` (no Git on server) and `"ci-cd-push"` (GitHub Actions handles checkout).
269
-
270
- Ask for: Git URL, branch, auth strategy (prefer read-only Deploy Key).
271
-
272
- If using Deploy Key:
273
- 1. Generate ed25519 key on server: `sudo -u <runtimeUser> ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ""`
274
- 2. Show public key to user: "Add this to GitHub Deploy Keys (read-only)"
275
- 3. Wait for confirmation, then verify: attempt a git clone as runtime user
276
-
277
- #### Step 3: Application Configuration
278
-
279
- For each app, collect: id, path, packageManager, installCommand, buildCommand, startCommand, blue/green port pair (default 3101/3102), healthChecks.
280
-
281
- #### Step 4: Environment Variables
282
-
283
- Scan source code for `process.env.<VAR>` references. Ask user for each required value. Identify secrets vs non-secrets. Ask about secret storage strategy (see §Secrets Management).
284
-
285
- #### Step 5: Persist Configuration
286
-
287
- Write `deploy.config.json` with all collected values and `validated: {}` stubs for each section. Write `deploy.md` as human-readable documentation.
288
-
289
- ### SSH: Bootstrap Flow
290
-
291
- Before first deployment, bootstrap the server. Present a plan showing every privileged action before executing anything.
292
-
293
- Read `${SKILL_DIR}/references/ssh-bootstrap-flow.md` for the full bootstrap procedure (preflight, check-and-install, user/dir setup, PM2 startup, deploy key). When the bootstrap reaches firewall or database steps, it routes to `references/firewall-setup.md` and `references/database-setup.md`. Key rules: bootstrap operations must be idempotent, existing config files must be backed up before modification, and each step's result must be recorded.
294
-
295
- ### SSH: Direct Upload Deployment
296
-
297
- When `deployStrategy` is `"direct-upload"`, the AI builds locally and transfers artifacts to the server. No Git operations on the server. Full procedure in `references/direct-upload.md`.
298
-
299
- ### SSH: CI/CD Pipeline Configuration
300
-
301
- When `deployStrategy` is `"ci-cd-push"` or `"ci-cd-pull"`, generate `.github/workflows/deploy.yml` with the appropriate workflow template. Both modes share the same trigger and secrets. Full YAML templates in `references/ci-cd-workflows.md`.
302
-
303
- After generating the workflow, verify: the first `git push` to the configured branch will trigger the first deployment. Monitor the GitHub Actions run and report results.
304
-
305
- ### SSH: DNS Guidance
306
-
307
- Before SSL, check if the user has a domain pointing to the server.
308
-
309
- 1. Ask: "Do you have a domain to bind to this project?" If no domain → skip DNS + SSL, note in deploy.md.
310
- 2. Check DNS: `dig +short <domain> A`. If resolved → proceed to SSL.
311
- 3. If not resolved: show the user DNS setup instructions. Full procedure in `references/dns-setup.md`.
312
-
313
- ### SSH: SSL/HTTPS Configuration
314
-
315
- Once DNS is confirmed pointing to the server, configure HTTPS via Let's Encrypt.
316
-
317
- 1. Detect cloud vendor via metadata endpoints.
318
- 2. If cloud vendor detected, ask: Let's Encrypt (recommended) or cloud vendor certificate.
319
- 3. Install certbot and request certificate.
320
- 4. Verify auto-renewal with `certbot renew --dry-run`.
321
-
322
- Full procedure in `references/ssl-setup.md`.
323
-
324
- ### SSH: Deployment Execution Flow
325
-
326
- Read `${SKILL_DIR}/references/ssh-execution-flow.md` for the full 5-group pipeline: pre-flight, fetch & build, stage & health check, switch & verify, cleanup & record. Key invariant: if any step before traffic switch fails, STOP — do not touch the live version.
327
-
328
- ### SSH: Blue/Green PM2 + Nginx Strategy
329
-
330
- - Blue: port 3101 (default), Green: port 3102 (default).
331
- - Active color persisted in `/var/www/<project>/shared/deploy-metadata.json`.
332
- - PM2 process naming: `<project>-<app>-<color>` (deterministic, never reuse old release IDs).
333
- - Nginx config must include: `# PrizmKit Managed: <project> — DO NOT EDIT MANUALLY`.
334
- - Before modifying any Nginx config lacking this marker, ask for user confirmation.
335
- - Always `nginx -t` before `systemctl reload nginx`.
336
-
337
- See `references/nginx-blue-green.md` for the full Nginx config template and traffic switch procedure.
338
-
339
- ### SSH: Rollback
340
-
341
- Two triggers: **automatic** (health check failure after traffic switch) and **manual** (`/prizmkit-deploy rollback --app <id> [--to <releaseId>]`).
342
-
343
- Steps: identify target release → verify build exists → start PM2 on its port → update Nginx upstream → `nginx -t` → reload → health checks → write rollback event. Do NOT delete the failed release or its logs — preserve for debugging.
344
-
345
- If no previous release exists, rollback is not possible — state this clearly.
346
-
347
- ### SSH: Operations Commands
348
-
349
- **status:** `pm2 list` as runtime user + active release, active color/port, last deploy timestamp.
350
-
351
- **logs --app \<id\>:** `pm2 logs <process-name> --lines 100` as runtime user.
352
-
353
- **restart --app \<id\>:** identify active PM2 process → `pm2 restart` → wait → health checks.
354
-
355
- **health --app \<id\>:** run all configured health checks, report pass/fail for each.
356
-
357
- **history:** list `.prizmkit/deploy/deploy-history/` events chronologically.
358
-
359
- ### SSH: Post-Deploy CI/CD Upgrade
360
-
361
- After a successful direct-upload deployment, proactively offer CI/CD setup:
362
-
363
- > "Deployment succeeded. Want me to set up CI/CD auto-deploy? After that, `git push` will auto-deploy."
364
-
365
- If user agrees, ask push vs pull, then configure accordingly. If Pull mode: set up deploy key. If Push mode: add GitHub Actions secrets. Generate `deploy.yml` from `references/ci-cd-workflows.md`, update `deployStrategy` in config, write upgrade event to history.
366
-
367
- ## Environment Policy
368
-
369
- | Mode | dev | test | production |
370
- |------|-----|------|------------|
371
- | Interactive | Allowed | Allowed | Allowed (requires confirmation) |
372
- | Headless | Allowed | Allowed | **REJECTED** — exits with ENVIRONMENT_DENIED |
373
-
374
- Headless must reject production because production deploys require human oversight — an unattended pipeline timing out mid-deploy can leave the site in a broken state with no one monitoring.
375
-
376
- ## Secrets Management
377
-
378
- Four storage modes, configured during first-run wizard:
379
-
380
- - **ask-every-time**: Prompt for secrets on each deploy. Safest, most manual.
381
- - **encrypted-local**: Store in `.prizmkit/deploy/secrets.enc.json`. Encrypt with user passphrase using Argon2id/scrypt KDF. Decryption material never stored alongside ciphertext.
382
- - **plaintext-local**: Store in `.prizmkit/deploy/secrets.local.json`. Must be gitignored. Before each deploy, verify the file is not tracked by git. If tracked, stop and ask to resolve.
383
- - **user-managed-on-server-only**: User handles secrets manually. Skill verifies server-side `.env.production` has all required vars before deploying.
384
-
385
- Server runtime secrets live in `/var/www/<project>/shared/.env.production` with mode `600`, owned by runtime user.
386
-
387
- Deploy history records secret presence metadata only (e.g., `{"SUPABASE_SERVICE_ROLE_KEY": {"present": true}}`). Never record raw secret values or unsalted hashes.
388
-
389
- ### SSH: Existing Deployment Takeover
390
-
391
- When deploying to a server that already has deployment assets, read `${SKILL_DIR}/references/ssh-takeover.md` for the detection procedure and takeover decision flow. Record takeover decision and validation results in config and history.
392
-
393
- ### SSH: Nginx Management
394
-
395
- - First Nginx config creation or update of a non-PrizmKit block requires user confirmation.
396
- - Subsequent updates to PrizmKit-managed blocks (`# PrizmKit Managed:` marker) may proceed automatically.
397
- - Always `nginx -t` before reload.
398
-
399
- See `references/nginx-blue-green.md` for the full Nginx config template.
400
-
401
- ### SSH: Bootstrap Safety Rules
402
-
403
- Before executing privileged bootstrap work, generate an action plan listing: packages, users/groups, SSH keys, Nginx config, directories/permissions, services that may be restarted.
404
-
405
- Rules:
406
- - User gives one explicit approval for the entire bootstrap plan.
407
- - If the plan changes during execution, pause and ask again.
408
- - Bootstrap operations must be idempotent.
409
- - Existing config files must be backed up before modification.
410
- - All privileged actions and results recorded in deploy history.
411
- - Failed bootstrap stops before deployment, provides recovery instructions.
412
-
413
- ### SSH: Multi-App Coordination
414
-
415
- An all-app deploy creates one release group. Rules:
416
- - Pre-traffic phases must complete for ALL selected apps before ANY app switches traffic.
417
- - If any app fails before traffic switch, NO app switches traffic. Staged processes stopped, live system unchanged.
418
- - If any app fails after traffic switch, default: group rollback.
419
- - Single-app deploys (`--app <id>`) do not affect unrelated apps.
420
-
421
- ## Validation
422
-
423
- Validation is mandatory before production deploy. Check: SSH connectivity, required tools (node, npm, git, pm2, nginx), repository reachability, port availability, required env vars, Nginx config syntax, health check routes accessible.
424
-
425
- Persist validation in `deploy.config.json` under each section's `validated` field.
426
-
427
- ## Adapter Paths
428
-
429
- After Discovery routes to a deployment target, read the corresponding reference:
430
-
431
- | Target | Reference | Mode |
432
- |--------|-----------|------|
433
- | SSH Linux server | SSH sections in this file | Full automation |
434
- | Vercel, Netlify, Fly.io | `references/cloud-platform-deploy.md` | Guided CLI |
435
- | Docker / Docker Compose | `references/docker-deploy.md` | Guided build + run |
436
- | Unrecognized target | §Deployment Discovery Step 4 | Documented fallback |
437
-
438
- ## Deploy History Record Schema
439
-
440
- Each deployment, rollback, or significant event writes a record to `.prizmkit/deploy/deploy-history/<id>.json`. Full schema in `references/deploy-history-schema.md`. Never record raw secret values in history — presence metadata only.
441
-
442
- ## Implementation Notes
443
-
444
- Live validation findings from the first PrizmKit deployment are in `references/live-validation-notes.md`. Read when troubleshooting bootstrap or deploy issues — these cover port conflict detection, npm verification, locale fixes, deploy key interactivity, PM2 PATH handling, and build-time env var timing.
@@ -1,115 +0,0 @@
1
- # CI/CD Workflow Templates
2
-
3
- Read this file when `deployStrategy` is `ci-cd-push` or `ci-cd-pull`.
4
-
5
- ## Shared Configuration
6
-
7
- **Secrets** (add to GitHub repository Settings → Secrets and variables → Actions):
8
- - `SSH_HOST` — server IP/hostname
9
- - `SSH_USER` — runtime user (e.g., `deploy`)
10
- - `SSH_KEY` — SSH private key
11
- - `SSH_PORT` — SSH port (default 22)
12
-
13
- **Shared trigger:**
14
- ```yaml
15
- on:
16
- push:
17
- branches: [<branch>]
18
- paths-ignore:
19
- - '.prizmkit/**'
20
- - 'docs/**'
21
- ```
22
-
23
- ---
24
-
25
- ## Push Mode Workflow (`ci-cd-push`)
26
-
27
- Build happens on GitHub Actions runner. Only built artifacts are transferred to the server.
28
-
29
- ```yaml
30
- name: Deploy to Production (Push)
31
-
32
- on:
33
- push:
34
- branches: [<branch>]
35
-
36
- jobs:
37
- deploy:
38
- runs-on: ubuntu-latest
39
- steps:
40
- - uses: actions/checkout@v4
41
-
42
- - uses: actions/setup-node@v4
43
- with:
44
- node-version: 20
45
-
46
- - name: Install & Build
47
- run: |
48
- npm ci
49
- npm run build
50
-
51
- - name: Package & Transfer
52
- run: |
53
- RELEASE_ID=$(date +%Y%m%d)-$(git rev-parse --short HEAD)
54
- tar czf deploy-$RELEASE_ID.tar.gz \
55
- <build-output-dir>/ node_modules/ package.json package-lock.json
56
- scp -P ${{ secrets.SSH_PORT }} deploy-$RELEASE_ID.tar.gz \
57
- ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/var/www/<project>/releases/
58
-
59
- - name: Deploy on Server
60
- uses: appleboy/ssh-action@v1
61
- with:
62
- host: ${{ secrets.SSH_HOST }}
63
- username: ${{ secrets.SSH_USER }}
64
- key: ${{ secrets.SSH_KEY }}
65
- port: ${{ secrets.SSH_PORT }}
66
- script: |
67
- cd /var/www/<project>
68
- RELEASE_ID=$(date +%Y%m%d)-$(git rev-parse --short HEAD)
69
- mkdir -p releases/$RELEASE_ID
70
- tar xzf releases/deploy-$RELEASE_ID.tar.gz -C releases/$RELEASE_ID
71
- rm releases/deploy-$RELEASE_ID.tar.gz
72
- # PM2 start, health check, Nginx switch (same as manual flow)
73
- ```
74
-
75
- **Key difference from Pull:** the runner checks out code, installs, builds, and only transmits the result. The server doesn't need Git or build tools — just Node.js runtime and PM2.
76
-
77
- ---
78
-
79
- ## Pull Mode Workflow (`ci-cd-pull`)
80
-
81
- GitHub Actions runner only triggers the server. The server does all the work.
82
-
83
- ```yaml
84
- name: Deploy to Production (Pull)
85
-
86
- on:
87
- push:
88
- branches: [<branch>]
89
-
90
- jobs:
91
- deploy:
92
- runs-on: ubuntu-latest
93
- steps:
94
- - name: Trigger Server Deploy
95
- uses: appleboy/ssh-action@v1
96
- with:
97
- host: ${{ secrets.SSH_HOST }}
98
- username: ${{ secrets.SSH_USER }}
99
- key: ${{ secrets.SSH_KEY }}
100
- port: ${{ secrets.SSH_PORT }}
101
- script: |
102
- cd /var/www/<project>
103
- RELEASE_ID=$(date +%Y%m%d)-$(git rev-parse --short HEAD)
104
- mkdir -p releases/$RELEASE_ID
105
- git clone <repoUrl> --branch <branch> releases/$RELEASE_ID
106
- cd releases/$RELEASE_ID
107
- npm ci
108
- cp ../shared/.env.production .
109
- npm run build
110
- # PM2 start, health check, Nginx switch
111
- ```
112
-
113
- **Key difference from Push:** the workflow is simpler (one step: SSH + run script), but the server needs Git, full build toolchain, and must be able to reach the repo.
114
-
115
- After generating the workflow, verify: the first `git push` to the configured branch will trigger the first deployment. Monitor the GitHub Actions run and report results.
@@ -1,93 +0,0 @@
1
- # Cloud Platform Deployment Path
2
-
3
- Guided deployment for Vercel, Netlify, Fly.io, and similar cloud platforms. Full automation isn't available — these platforms require browser-based authentication — but the skill provides structured CLI assistance.
4
-
5
- ## Detect and Validate
6
-
7
- 1. Check if the platform CLI is installed: `vercel --version`, `netlify --version`, `fly version`.
8
- 2. If missing, guide the user to install: `npm install -g vercel` or link to docs.
9
- 3. Check authentication: `vercel whoami`, `netlify status`. If not logged in, guide the user through `vercel login`.
10
- 4. Read the platform config file (`vercel.json`, `netlify.toml`, `fly.toml`) to understand existing settings.
11
-
12
- ## Generate Configuration
13
-
14
- 1. If no platform config file exists, generate one based on project detection:
15
- - **Next.js on Vercel**: minimal config — Vercel auto-detects Next.js. Generate `vercel.json` only if custom rewrites/redirects are needed.
16
- - **Static site on Netlify**: generate `netlify.toml` with build command and publish directory.
17
- - **Any on Fly.io**: generate `fly.toml` with app name, builder, and HTTP service config.
18
- 2. Set environment variables via the platform CLI: `vercel env add`, `netlify env:set`.
19
- 3. Document all env vars needed (from Discovery Step 1 scan).
20
-
21
- ## Deploy and Verify
22
-
23
- 1. Run the platform deploy command: `vercel deploy --prod`, `netlify deploy --prod`, `fly deploy`.
24
- 2. If the command requires interactive input, run it and show output to the user.
25
- 3. After deploy, run health checks against the production URL.
26
- 4. Write a deploy-history event recording: platform, project name, deploy URL, commit SHA, timestamp.
27
-
28
- ## Operations
29
-
30
- | Command | Vercel | Netlify | Fly.io |
31
- |---------|--------|---------|--------|
32
- | status | `vercel list` | `netlify status` | `fly status` |
33
- | logs | `vercel logs` | `netlify logs` | `fly logs` |
34
- | rollback | `vercel rollback` | `netlify rollback` | `fly rollback` |
35
- | env | `vercel env ls` | `netlify env:list` | `fly secrets list` |
36
-
37
- Platform rollback is instant — no release-based rollback needed.
38
-
39
- ## Platform-Specific Patterns
40
-
41
- ### Vercel
42
-
43
- Vercel auto-detects Next.js projects — no config file required for basic deployments. Generate `vercel.json` only for custom rewrites, redirects, or headers.
44
-
45
- Key behaviors:
46
- - Next.js: framework auto-detected, build command and output directory inferred automatically
47
- - Static sites: set build command and output directory via `vercel.json` or CLI
48
- - Env vars: `vercel env add <KEY>` (supports `production`, `preview`, `development` environments)
49
- - Deploy preview: every branch gets a preview URL automatically (if connected via GitHub)
50
-
51
- ### Netlify
52
-
53
- Netlify requires explicit build and publish configuration. Use `netlify.toml`:
54
-
55
- ```toml
56
- [build]
57
- command = "npm run build"
58
- publish = "dist"
59
-
60
- [[redirects]]
61
- from = "/*"
62
- to = "/index.html"
63
- status = 200
64
- ```
65
-
66
- Key behaviors:
67
- - SPA redirects: the catch-all redirect above is essential for client-side routing
68
- - Env vars: `netlify env:set <KEY> <VALUE>` (per-context: `production`, `deploy-preview`, `branch-deploy`)
69
- - Branch deploys: every branch gets a deploy-preview URL automatically (if connected via GitHub)
70
-
71
- ### Fly.io
72
-
73
- Fly.io requires a `fly.toml` with app name, builder, and HTTP service config:
74
-
75
- ```toml
76
- app = "<app-name>"
77
- primary_region = "lhr"
78
-
79
- [build]
80
- builder = "dockerfile"
81
-
82
- [http_service]
83
- internal_port = 3000
84
- force_https = true
85
- ```
86
-
87
- Key behaviors:
88
- - Builder: `dockerfile` (default, uses Dockerfile) or `static` (static site hosting)
89
- - Secrets: `fly secrets set <KEY>=<VALUE>` for runtime environment variables
90
- - Scale: `fly scale count <N>` to adjust VM instances
91
- - Volumes: for persistent data, configure `[mounts]` in fly.toml
92
-
93
- **Note**: These are minimum-viable platform references; browser-based authentication remains a user-action step. Enriched platform coverage is planned for future iterations.