prizmkit 1.1.99 → 1.1.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/bin/create-prizmkit.js +4 -4
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/dev-pipeline/.env.example +3 -3
  4. package/bundled/dev-pipeline/README.md +110 -90
  5. package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +1 -1
  6. package/bundled/dev-pipeline/cli.py +27 -0
  7. package/bundled/dev-pipeline/prizmkit_runtime/__init__.py +13 -0
  8. package/bundled/dev-pipeline/prizmkit_runtime/__main__.py +9 -0
  9. package/bundled/dev-pipeline/prizmkit_runtime/cli.py +193 -0
  10. package/bundled/dev-pipeline/prizmkit_runtime/commands.py +313 -0
  11. package/bundled/dev-pipeline/prizmkit_runtime/compat.py +32 -0
  12. package/bundled/dev-pipeline/prizmkit_runtime/config.py +410 -0
  13. package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +478 -0
  14. package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +734 -0
  15. package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +256 -0
  16. package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +109 -0
  17. package/bundled/dev-pipeline/prizmkit_runtime/paths.py +110 -0
  18. package/bundled/dev-pipeline/prizmkit_runtime/processes.py +373 -0
  19. package/bundled/dev-pipeline/prizmkit_runtime/reset.py +389 -0
  20. package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +51 -0
  21. package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +179 -0
  22. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +345 -0
  23. package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +118 -0
  24. package/bundled/dev-pipeline/prizmkit_runtime/runner_recovery.py +187 -0
  25. package/bundled/dev-pipeline/prizmkit_runtime/runner_status.py +147 -0
  26. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +422 -0
  27. package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +552 -0
  28. package/bundled/dev-pipeline/prizmkit_runtime/status.py +71 -0
  29. package/bundled/dev-pipeline/scripts/check-session-status.py +74 -1
  30. package/bundled/dev-pipeline/scripts/continuation.py +374 -0
  31. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +64 -52
  32. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +35 -25
  33. package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +2 -2
  34. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +15 -20
  35. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +185 -16
  36. package/bundled/dev-pipeline/scripts/update-bug-status.py +214 -6
  37. package/bundled/dev-pipeline/scripts/update-feature-status.py +237 -6
  38. package/bundled/dev-pipeline/scripts/update-refactor-status.py +214 -6
  39. package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +8 -2
  40. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +4 -0
  41. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +14 -5
  42. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +16 -6
  43. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +16 -6
  44. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +1 -1
  45. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +3 -3
  46. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +2 -0
  47. package/bundled/dev-pipeline/templates/sections/log-size-awareness.md +13 -69
  48. package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +15 -7
  49. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +42 -29
  50. package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +41 -39
  51. package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +4 -0
  52. package/bundled/dev-pipeline/templates/sections/test-failure-recovery-lite.md +4 -0
  53. package/bundled/dev-pipeline/templates/session-status-schema.json +1 -1
  54. package/bundled/dev-pipeline/tests/conftest.py +1 -0
  55. package/bundled/dev-pipeline/tests/test_auto_skip.py +932 -0
  56. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +207 -0
  57. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +100 -0
  58. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +43 -0
  59. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +1138 -0
  60. package/bundled/dev-pipeline/tests/test_unified_cli.py +1045 -0
  61. package/bundled/skills/_metadata.json +1 -1
  62. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +29 -34
  63. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +6 -5
  64. package/bundled/skills/feature-pipeline-launcher/SKILL.md +29 -35
  65. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +7 -6
  66. package/bundled/skills/feature-workflow/SKILL.md +3 -6
  67. package/bundled/skills/recovery-workflow/SKILL.md +23 -32
  68. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +29 -35
  69. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +7 -6
  70. package/bundled/skills/refactor-workflow/SKILL.md +3 -6
  71. package/bundled/templates/hooks/commit-intent.json +2 -2
  72. package/bundled/templates/hooks/diff-prizm-docs.py +226 -0
  73. package/bundled/templates/hooks/prizm-pre-commit.py +45 -0
  74. package/bundled/templates/hooks/validate-prizm-docs.py +240 -0
  75. package/package.json +1 -1
  76. package/src/config.js +33 -12
  77. package/src/index.js +3 -6
  78. package/src/manifest.js +3 -2
  79. package/src/metadata.js +7 -18
  80. package/src/prompts.js +0 -12
  81. package/src/runtimes.js +18 -11
  82. package/src/scaffold.js +133 -116
  83. package/src/upgrade.js +1 -1
  84. package/bundled/dev-pipeline/launch-bugfix-daemon.sh +0 -500
  85. package/bundled/dev-pipeline/launch-feature-daemon.sh +0 -657
  86. package/bundled/dev-pipeline/launch-refactor-daemon.sh +0 -502
  87. package/bundled/dev-pipeline/lib/branch.sh +0 -326
  88. package/bundled/dev-pipeline/lib/common.sh +0 -1257
  89. package/bundled/dev-pipeline/lib/heartbeat.sh +0 -469
  90. package/bundled/dev-pipeline/reset-bug.sh +0 -395
  91. package/bundled/dev-pipeline/reset-feature.sh +0 -406
  92. package/bundled/dev-pipeline/reset-refactor.sh +0 -393
  93. package/bundled/dev-pipeline/run-bugfix.sh +0 -1315
  94. package/bundled/dev-pipeline/run-feature.sh +0 -1602
  95. package/bundled/dev-pipeline/run-recovery.sh +0 -648
  96. package/bundled/dev-pipeline/run-refactor.sh +0 -1348
  97. package/bundled/dev-pipeline/scripts/monitor-log.sh +0 -104
  98. package/bundled/dev-pipeline/tests/test-path-resolution.sh +0 -100
  99. package/bundled/dev-pipeline-windows/.env.example +0 -36
  100. package/bundled/dev-pipeline-windows/README.md +0 -30
  101. package/bundled/dev-pipeline-windows/SCHEMA_ANALYSIS.md +0 -533
  102. package/bundled/dev-pipeline-windows/assets/feature-list-example.json +0 -146
  103. package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +0 -137
  104. package/bundled/dev-pipeline-windows/launch-bugfix-daemon.ps1 +0 -9
  105. package/bundled/dev-pipeline-windows/launch-feature-daemon.ps1 +0 -9
  106. package/bundled/dev-pipeline-windows/launch-refactor-daemon.ps1 +0 -9
  107. package/bundled/dev-pipeline-windows/lib/branch.ps1 +0 -235
  108. package/bundled/dev-pipeline-windows/lib/common.ps1 +0 -829
  109. package/bundled/dev-pipeline-windows/lib/daemon.ps1 +0 -140
  110. package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +0 -967
  111. package/bundled/dev-pipeline-windows/lib/reset.ps1 +0 -87
  112. package/bundled/dev-pipeline-windows/reset-bug.ps1 +0 -9
  113. package/bundled/dev-pipeline-windows/reset-feature.ps1 +0 -9
  114. package/bundled/dev-pipeline-windows/reset-refactor.ps1 +0 -9
  115. package/bundled/dev-pipeline-windows/run-bugfix.ps1 +0 -9
  116. package/bundled/dev-pipeline-windows/run-feature.ps1 +0 -9
  117. package/bundled/dev-pipeline-windows/run-recovery.ps1 +0 -179
  118. package/bundled/dev-pipeline-windows/run-refactor.ps1 +0 -9
  119. package/bundled/dev-pipeline-windows/scripts/check-session-status.py +0 -228
  120. package/bundled/dev-pipeline-windows/scripts/detect-stuck.py +0 -530
  121. package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +0 -2282
  122. package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +0 -767
  123. package/bundled/dev-pipeline-windows/scripts/generate-recovery-prompt.py +0 -805
  124. package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +0 -845
  125. package/bundled/dev-pipeline-windows/scripts/init-bugfix-pipeline.py +0 -316
  126. package/bundled/dev-pipeline-windows/scripts/init-dev-team.py +0 -134
  127. package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +0 -382
  128. package/bundled/dev-pipeline-windows/scripts/init-refactor-pipeline.py +0 -399
  129. package/bundled/dev-pipeline-windows/scripts/monitor-log.ps1 +0 -102
  130. package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +0 -1232
  131. package/bundled/dev-pipeline-windows/scripts/patch-completion-notes.py +0 -191
  132. package/bundled/dev-pipeline-windows/scripts/prizmkit-test-gate.py +0 -446
  133. package/bundled/dev-pipeline-windows/scripts/update-bug-status.py +0 -913
  134. package/bundled/dev-pipeline-windows/scripts/update-checkpoint.py +0 -173
  135. package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +0 -1558
  136. package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +0 -1119
  137. package/bundled/dev-pipeline-windows/scripts/utils.py +0 -542
  138. package/bundled/dev-pipeline-windows/templates/agent-prompts/critic-plan-challenge.md +0 -7
  139. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-fix.md +0 -7
  140. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +0 -65
  141. package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-resume.md +0 -5
  142. package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +0 -7
  143. package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +0 -73
  144. package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +0 -589
  145. package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +0 -710
  146. package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +0 -791
  147. package/bundled/dev-pipeline-windows/templates/bug-fix-list-schema.json +0 -263
  148. package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +0 -326
  149. package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +0 -237
  150. package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +0 -340
  151. package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +0 -270
  152. package/bundled/dev-pipeline-windows/templates/sections/ac-verification-checklist.md +0 -7
  153. package/bundled/dev-pipeline-windows/templates/sections/checkpoint-system.md +0 -91
  154. package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +0 -34
  155. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-agent.md +0 -10
  156. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-full.md +0 -12
  157. package/bundled/dev-pipeline-windows/templates/sections/critical-paths-lite.md +0 -7
  158. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-agent.md +0 -8
  159. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-full.md +0 -9
  160. package/bundled/dev-pipeline-windows/templates/sections/directory-convention-lite.md +0 -6
  161. package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +0 -21
  162. package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +0 -21
  163. package/bundled/dev-pipeline-windows/templates/sections/log-size-awareness.md +0 -78
  164. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +0 -283
  165. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +0 -112
  166. package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +0 -168
  167. package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +0 -82
  168. package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +0 -75
  169. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +0 -23
  170. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +0 -14
  171. package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +0 -19
  172. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +0 -63
  173. package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +0 -42
  174. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +0 -44
  175. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +0 -59
  176. package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +0 -39
  177. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +0 -27
  178. package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +0 -27
  179. package/bundled/dev-pipeline-windows/templates/sections/phase-prizmkit-test.md +0 -39
  180. package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +0 -35
  181. package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +0 -35
  182. package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +0 -73
  183. package/bundled/dev-pipeline-windows/templates/sections/phase0-init.md +0 -13
  184. package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +0 -21
  185. package/bundled/dev-pipeline-windows/templates/sections/session-context.md +0 -5
  186. package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +0 -6
  187. package/bundled/dev-pipeline-windows/templates/sections/task-contract.md +0 -34
  188. package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-agent.md +0 -48
  189. package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-lite.md +0 -48
  190. package/bundled/dev-pipeline-windows/templates/session-status-schema.json +0 -83
  191. package/bundled/skills-windows/app-planner/SKILL.md +0 -296
  192. package/bundled/skills-windows/app-planner/assets/app-design-guide.md +0 -101
  193. package/bundled/skills-windows/app-planner/references/architecture-decisions.md +0 -52
  194. package/bundled/skills-windows/app-planner/references/brainstorm-guide.md +0 -101
  195. package/bundled/skills-windows/app-planner/references/frontend-design-guide.md +0 -71
  196. package/bundled/skills-windows/app-planner/references/infrastructure-convention-discovery.md +0 -108
  197. package/bundled/skills-windows/app-planner/references/project-brief-guide.md +0 -82
  198. package/bundled/skills-windows/app-planner/references/project-conventions-discovery.md +0 -59
  199. package/bundled/skills-windows/app-planner/references/project-state-detection.md +0 -90
  200. package/bundled/skills-windows/app-planner/references/red-team-checklist.md +0 -40
  201. package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +0 -619
  202. package/bundled/skills-windows/app-planner/references/rules/backend/fixed-rules.md +0 -285
  203. package/bundled/skills-windows/app-planner/references/rules/backend/question-bank.md +0 -249
  204. package/bundled/skills-windows/app-planner/references/rules/backend/question-manifest.json +0 -46
  205. package/bundled/skills-windows/app-planner/references/rules/backend/template.md +0 -173
  206. package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +0 -382
  207. package/bundled/skills-windows/app-planner/references/rules/database/fixed-rules.md +0 -211
  208. package/bundled/skills-windows/app-planner/references/rules/database/question-bank.md +0 -184
  209. package/bundled/skills-windows/app-planner/references/rules/database/question-manifest.json +0 -39
  210. package/bundled/skills-windows/app-planner/references/rules/database/template.md +0 -158
  211. package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +0 -820
  212. package/bundled/skills-windows/app-planner/references/rules/frontend/fixed-rules.md +0 -188
  213. package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +0 -319
  214. package/bundled/skills-windows/app-planner/references/rules/frontend/question-manifest.json +0 -51
  215. package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +0 -339
  216. package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +0 -649
  217. package/bundled/skills-windows/app-planner/references/rules/mobile/fixed-rules.md +0 -290
  218. package/bundled/skills-windows/app-planner/references/rules/mobile/question-bank.md +0 -232
  219. package/bundled/skills-windows/app-planner/references/rules/mobile/question-manifest.json +0 -47
  220. package/bundled/skills-windows/app-planner/references/rules/mobile/template.md +0 -175
  221. package/bundled/skills-windows/app-planner/references/rules-configuration.md +0 -46
  222. package/bundled/skills-windows/bug-fix-workflow/SKILL.md +0 -379
  223. package/bundled/skills-windows/bug-fix-workflow/references/bug-diagnosis.md +0 -41
  224. package/bundled/skills-windows/bug-planner/SKILL.md +0 -402
  225. package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +0 -43
  226. package/bundled/skills-windows/bug-planner/references/critic-and-verification.md +0 -44
  227. package/bundled/skills-windows/bug-planner/references/error-recovery.md +0 -73
  228. package/bundled/skills-windows/bug-planner/references/input-formats.md +0 -53
  229. package/bundled/skills-windows/bug-planner/references/schema-validation.md +0 -25
  230. package/bundled/skills-windows/bug-planner/references/severity-rules.md +0 -16
  231. package/bundled/skills-windows/bug-planner/scripts/validate-bug-list.py +0 -322
  232. package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +0 -304
  233. package/bundled/skills-windows/bugfix-pipeline-launcher/references/configuration.md +0 -84
  234. package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +0 -381
  235. package/bundled/skills-windows/feature-pipeline-launcher/references/configuration.md +0 -67
  236. package/bundled/skills-windows/feature-pipeline-launcher/scripts/preflight-check.py +0 -462
  237. package/bundled/skills-windows/feature-planner/SKILL.md +0 -397
  238. package/bundled/skills-windows/feature-planner/assets/evaluation-guide.md +0 -64
  239. package/bundled/skills-windows/feature-planner/assets/planning-guide.md +0 -214
  240. package/bundled/skills-windows/feature-planner/references/browser-interaction.md +0 -59
  241. package/bundled/skills-windows/feature-planner/references/completeness-review.md +0 -57
  242. package/bundled/skills-windows/feature-planner/references/decomposition-patterns.md +0 -75
  243. package/bundled/skills-windows/feature-planner/references/error-recovery.md +0 -90
  244. package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +0 -112
  245. package/bundled/skills-windows/feature-planner/references/new-project-planning.md +0 -85
  246. package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +0 -1020
  247. package/bundled/skills-windows/feature-workflow/SKILL.md +0 -374
  248. package/bundled/skills-windows/feature-workflow/references/brainstorm-guide.md +0 -137
  249. package/bundled/skills-windows/prizm-kit/SKILL.md +0 -93
  250. package/bundled/skills-windows/prizmkit-code-review/SKILL.md +0 -161
  251. package/bundled/skills-windows/prizmkit-code-review/references/dev-agent-prompt.md +0 -30
  252. package/bundled/skills-windows/prizmkit-code-review/references/review-report-template.md +0 -31
  253. package/bundled/skills-windows/prizmkit-code-review/references/reviewer-agent-prompt.md +0 -66
  254. package/bundled/skills-windows/prizmkit-code-review/scripts/check_loop.py +0 -186
  255. package/bundled/skills-windows/prizmkit-committer/SKILL.md +0 -89
  256. package/bundled/skills-windows/prizmkit-deploy/SKILL.md +0 -444
  257. package/bundled/skills-windows/prizmkit-deploy/references/ci-cd-workflows.md +0 -115
  258. package/bundled/skills-windows/prizmkit-deploy/references/cloud-platform-deploy.md +0 -93
  259. package/bundled/skills-windows/prizmkit-deploy/references/data-safety-examples.md +0 -120
  260. package/bundled/skills-windows/prizmkit-deploy/references/database-setup.md +0 -46
  261. package/bundled/skills-windows/prizmkit-deploy/references/deploy-config-schema.md +0 -148
  262. package/bundled/skills-windows/prizmkit-deploy/references/deploy-history-schema.md +0 -62
  263. package/bundled/skills-windows/prizmkit-deploy/references/deployment-modes.md +0 -50
  264. package/bundled/skills-windows/prizmkit-deploy/references/direct-upload.md +0 -26
  265. package/bundled/skills-windows/prizmkit-deploy/references/dns-setup.md +0 -42
  266. package/bundled/skills-windows/prizmkit-deploy/references/docker-deploy.md +0 -31
  267. package/bundled/skills-windows/prizmkit-deploy/references/firewall-setup.md +0 -37
  268. package/bundled/skills-windows/prizmkit-deploy/references/live-validation-notes.md +0 -21
  269. package/bundled/skills-windows/prizmkit-deploy/references/nginx-blue-green.md +0 -59
  270. package/bundled/skills-windows/prizmkit-deploy/references/ssh-bootstrap-flow.md +0 -49
  271. package/bundled/skills-windows/prizmkit-deploy/references/ssh-execution-flow.md +0 -41
  272. package/bundled/skills-windows/prizmkit-deploy/references/ssh-takeover.md +0 -20
  273. package/bundled/skills-windows/prizmkit-deploy/references/ssl-setup.md +0 -56
  274. package/bundled/skills-windows/prizmkit-implement/SKILL.md +0 -71
  275. package/bundled/skills-windows/prizmkit-init/SKILL.md +0 -356
  276. package/bundled/skills-windows/prizmkit-init/assets/project-brief-template.md +0 -82
  277. package/bundled/skills-windows/prizmkit-init/references/config-schema.md +0 -70
  278. package/bundled/skills-windows/prizmkit-init/references/rules/layer-detection.md +0 -41
  279. package/bundled/skills-windows/prizmkit-init/references/tech-stack-catalog.md +0 -13
  280. package/bundled/skills-windows/prizmkit-init/references/update-supplement.md +0 -9
  281. package/bundled/skills-windows/prizmkit-plan/SKILL.md +0 -102
  282. package/bundled/skills-windows/prizmkit-plan/assets/plan-template.md +0 -115
  283. package/bundled/skills-windows/prizmkit-plan/assets/spec-template.md +0 -73
  284. package/bundled/skills-windows/prizmkit-plan/references/clarify-guide.md +0 -67
  285. package/bundled/skills-windows/prizmkit-plan/references/examples.md +0 -85
  286. package/bundled/skills-windows/prizmkit-plan/references/verification-checklist.md +0 -60
  287. package/bundled/skills-windows/prizmkit-prizm-docs/SKILL.md +0 -129
  288. package/bundled/skills-windows/prizmkit-prizm-docs/assets/prizm-docs-format.md +0 -613
  289. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-init.md +0 -45
  290. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-rebuild.md +0 -15
  291. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-status.md +0 -14
  292. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-update.md +0 -19
  293. package/bundled/skills-windows/prizmkit-prizm-docs/references/op-validate.md +0 -17
  294. package/bundled/skills-windows/prizmkit-retrospective/SKILL.md +0 -87
  295. package/bundled/skills-windows/prizmkit-retrospective/references/knowledge-injection-steps.md +0 -50
  296. package/bundled/skills-windows/prizmkit-retrospective/references/structural-sync-steps.md +0 -43
  297. package/bundled/skills-windows/prizmkit-test/SKILL.md +0 -227
  298. package/bundled/skills-windows/prizmkit-test/references/boundary-coverage-protocol.md +0 -220
  299. package/bundled/skills-windows/prizmkit-test/references/examples.md +0 -143
  300. package/bundled/skills-windows/prizmkit-test/references/service-boundary-test-catalog.md +0 -225
  301. package/bundled/skills-windows/prizmkit-test/references/test-generation-steps.md +0 -109
  302. package/bundled/skills-windows/prizmkit-test/references/test-report-template.md +0 -111
  303. package/bundled/skills-windows/prizmkit-test/scripts/validate_boundary_report.py +0 -347
  304. package/bundled/skills-windows/recovery-workflow/SKILL.md +0 -355
  305. package/bundled/skills-windows/recovery-workflow/evals/evals.json +0 -46
  306. package/bundled/skills-windows/recovery-workflow/references/detection.md +0 -58
  307. package/bundled/skills-windows/recovery-workflow/scripts/detect-recovery-state.py +0 -544
  308. package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +0 -346
  309. package/bundled/skills-windows/refactor-pipeline-launcher/references/configuration.md +0 -72
  310. package/bundled/skills-windows/refactor-planner/SKILL.md +0 -398
  311. package/bundled/skills-windows/refactor-planner/assets/planning-guide.md +0 -292
  312. package/bundled/skills-windows/refactor-planner/references/behavior-preservation.md +0 -301
  313. package/bundled/skills-windows/refactor-planner/references/fast-path.md +0 -59
  314. package/bundled/skills-windows/refactor-planner/references/planning-phases.md +0 -135
  315. package/bundled/skills-windows/refactor-planner/references/refactor-scoping-guide.md +0 -221
  316. package/bundled/skills-windows/refactor-planner/scripts/validate-and-generate-refactor.py +0 -858
  317. package/bundled/skills-windows/refactor-workflow/SKILL.md +0 -343
  318. package/bundled/skills-windows/refactor-workflow/references/brainstorm-guide.md +0 -116
  319. package/bundled/templates/hooks/diff-prizm-docs.sh +0 -158
  320. package/bundled/templates/hooks/prizm-pre-commit.sh +0 -108
  321. package/bundled/templates/hooks/validate-prizm-docs.sh +0 -139
@@ -1,120 +0,0 @@
1
- # Data Safety Examples
2
-
3
- Few-shot examples for the Data Safety Gate in `/prizmkit-deploy`. Read this file when a dangerous command pattern is detected — it shows the correct confirmation flow and illustrates what happens when the gate is skipped.
4
-
5
- ## Example 1: Prisma Force Reset (the incident)
6
-
7
- **Context:** User runs `/prizmkit-deploy` to deploy a Next.js + Prisma project. During database setup, the model needs to sync the Prisma schema with the database.
8
-
9
- **Wrong — skipping the gate:**
10
- ```
11
- Model: I'll sync your database schema now.
12
- $ prisma db push --force-reset --accept-schema
13
- → All tables dropped. All production data lost. No backup. No confirmation.
14
- ```
15
- This happened in production. `--force-reset` drops and recreates every table. `--accept-schema` bypasses Prisma's own confirmation prompt. The model ran both flags without asking the user whether existing data should be preserved.
16
-
17
- **Correct — with the safety gate:**
18
- ```
19
- Model: I detected that your database needs a schema sync. However, before I do anything:
20
-
21
- WARNING: The Prisma schema has changes that could affect existing data.
22
- - New tables to create: 0
23
- - Tables that may be modified: 2 (users, orders)
24
- - If I run `prisma db push --force-reset`, ALL existing data will be DESTROYED.
25
-
26
- Options:
27
- 1. prisma db push (safe — only adds missing tables/columns, no data loss)
28
- 2. prisma db push --force-reset (DANGEROUS — drops and recreates all tables, all data lost)
29
- 3. prisma migrate dev (creates a migration file you can review first)
30
-
31
- Which approach do you want? (1/2/3)
32
- ```
33
-
34
- The `--accept-schema` flag should never be used — it suppresses Prisma's own built-in safety prompts that protect the user.
35
-
36
- ## Example 2: Prisma Migrate Reset
37
-
38
- **Context:** User wants to reset their dev database to a clean state for testing.
39
-
40
- **Correct detection and confirmation:**
41
- ```
42
- Model: `prisma migrate reset` will:
43
- - Drop the entire database
44
- - Recreate it from scratch
45
- - Run all migrations
46
-
47
- This is a DESTRUCTIVE operation. All data in the database will be permanently lost.
48
-
49
- Are you sure this is a dev/test database with no important data? (yes/no)
50
- ```
51
-
52
- In production or any environment with real data: refuse immediately. This command should only run in dev with explicit user confirmation.
53
-
54
- ## Example 3: Raw SQL Data Modification
55
-
56
- **Context:** During deployment, the model considers running a SQL command to fix a data issue.
57
-
58
- **Correct detection and confirmation:**
59
- ```
60
- Model: To fix the duplicate user records, I would run:
61
- ```sql
62
- DELETE FROM users WHERE email IS NULL AND created_at < '2025-01-01';
63
- ```
64
-
65
- This would delete approximately 340 user records. BEFORE I run this:
66
-
67
- 1. Would you like me to run a SELECT first to show you exactly which rows would be deleted?
68
- 2. Do you want to back up the users table before deletion?
69
- 3. Confirm: Delete these 340 records? (yes/no)
70
-
71
- I will not proceed without your explicit confirmation.
72
- ```
73
-
74
- ## Example 4: Overwriting Production Configuration
75
-
76
- **Context:** During bootstrap, the model needs to write an Nginx config, but one already exists at the target path.
77
-
78
- **Correct detection and confirmation:**
79
- ```
80
- Model: Found existing Nginx config at /etc/nginx/sites-enabled/myapp.
81
-
82
- This file is NOT managed by PrizmKit (no `# PrizmKit Managed:` marker).
83
- Overwriting it could break existing site configuration.
84
-
85
- Options:
86
- 1. Back up the existing config to /etc/nginx/sites-enabled/myapp.bak, then write new config
87
- 2. Create new config alongside existing one with a different name
88
- 3. Skip — keep the existing config as-is
89
-
90
- Which approach? (1/2/3)
91
- ```
92
-
93
- ## Example 5: Confirmation Dialogue Template
94
-
95
- When the gate triggers, use this dialogue structure:
96
-
97
- ```
98
- ============================================================
99
- DATA SAFETY GATE — DESTRUCTIVE OPERATION DETECTED
100
- ============================================================
101
-
102
- Command: <the dangerous command>
103
- Risk level: HIGH / CRITICAL
104
- What will be lost: <plain-language description of affected data>
105
-
106
- Current state:
107
- - Database: <name>, <size>, <table count>
108
- - Affected tables: <list>
109
- - Last backup: <date if known, or "unknown — backup recommended">
110
-
111
- Recommended safe approach:
112
- <alternative if one exists>
113
-
114
- Do you want to proceed with this destructive operation?
115
- Type "yes, I understand the data will be lost" to confirm.
116
- Any other response will abort.
117
- ============================================================
118
- ```
119
-
120
- This format forces the user to read and acknowledge the risk before proceeding.
@@ -1,46 +0,0 @@
1
- # Database Setup
2
-
3
- Read this file when Discovery detected a database driver and the user wants AI-assisted database installation on the server.
4
-
5
- ## Entry condition
6
-
7
- During Discovery Step 1 (Project Detection), database drivers were already scanned. If a driver was detected, ask after bootstrap tools are installed:
8
-
9
- > "Detected the project uses <PostgreSQL/MySQL/Redis>. Want me to install and configure it on the server?"
10
- > - **Yes** → proceed with database installation
11
- > - **No** → skip, record in deploy.md with note "database must be configured by user"
12
-
13
- ## PostgreSQL setup
14
-
15
- ```
16
- apt-get install -y postgresql postgresql-contrib
17
- sudo -u postgres psql -c "CREATE DATABASE <project>;"
18
- sudo -u postgres psql -c "CREATE USER <project> WITH PASSWORD '<random-password>';"
19
- sudo -u postgres psql -c "GRANT ALL ON DATABASE <project> TO <project>;"
20
- ```
21
-
22
- - Generate a secure random password (32 chars, alphanumeric + symbols).
23
- - Write the connection string to `.prizmkit/deploy/secrets.local.json`: `DATABASE_URL=postgresql://<project>:<password>@localhost:5432/<project>`.
24
- - In deploy.md, write: "PostgreSQL installed, connection info recorded in `.prizmkit/deploy/secrets.local.json` (not committed to git)".
25
-
26
- ## MySQL setup (future)
27
-
28
- Similar flow. Not implemented in first version — if project uses MySQL, direct user to documentation fallback.
29
-
30
- ## Redis setup
31
-
32
- ```
33
- apt-get install -y redis-server
34
- redis-cli CONFIG SET requirepass "<random-password>"
35
- redis-cli CONFIG REWRITE
36
- ```
37
-
38
- - Bind to localhost only (modify `/etc/redis/redis.conf` if needed).
39
- - Write `REDIS_URL=redis://:<password>@localhost:6379` to `.prizmkit/deploy/secrets.local.json`.
40
-
41
- ## Security notes
42
-
43
- - Never write database passwords to deploy.md, because deploy.md may be committed to git and passwords would leak.
44
- - Passwords stored in `.prizmkit/deploy/secrets.local.json` (gitignored).
45
- - Default: database binds to localhost, no external access, because most indie projects only need local connections.
46
- - Record a `"database-setup"` event in deploy history (presence metadata only, no passwords).
@@ -1,148 +0,0 @@
1
- # deploy.config.json Schema
2
-
3
- This file is the machine-readable deployment configuration. Always read it before executing any deploy operation.
4
-
5
- ## Top-Level Structure
6
-
7
- ```json
8
- {
9
- "version": 1,
10
- "project": "project-name",
11
- "deploymentMode": "ssh",
12
- "deployStrategy": "direct-upload|ci-cd-push|ci-cd-pull",
13
- "defaults": { ... },
14
- "environments": { ... },
15
- "servers": [ ... ],
16
- "repository": { ... },
17
- "apps": [ ... ],
18
- "nginx": { ... },
19
- "env": { ... }
20
- }
21
- ```
22
-
23
- ## defaults
24
-
25
- ```json
26
- {
27
- "releaseRetention": 5,
28
- "credentialMode": "ai-assisted|user-managed",
29
- "secretStorage": "ask-every-time|encrypted-local|plaintext-local|user-managed-on-server-only",
30
- "rollbackOnFailure": true,
31
- "headlessDefaultEnvironment": "test"
32
- }
33
- ```
34
-
35
- ## environments
36
-
37
- Keyed by environment name. Each entry:
38
- ```json
39
- {
40
- "dev": {
41
- "server": "server-id",
42
- "allowHeadless": true,
43
- "confirmBeforeDeploy": false
44
- }
45
- }
46
- ```
47
-
48
- ## servers
49
-
50
- Array of server objects:
51
- ```json
52
- {
53
- "id": "prod-1",
54
- "host": "IP or hostname",
55
- "port": 22,
56
- "bootstrapUser": "root",
57
- "runtimeUser": "deploy",
58
- "roles": ["web"],
59
- "validated": {
60
- "ssh": true|false,
61
- "bootstrap": true|false,
62
- "runtimeUser": true|false,
63
- "tools": {
64
- "node": "version",
65
- "npm": "version",
66
- "pm2": "version",
67
- "nginx": "version",
68
- "git": "version"
69
- },
70
- "directories": true|false,
71
- "deployKey": true|false
72
- }
73
- }
74
- ```
75
-
76
- ## repository
77
-
78
- ```json
79
- {
80
- "url": "git@github.com:owner/repo.git",
81
- "branch": "master",
82
- "auth": "deploy-key|ssh-agent|token",
83
- "validated": {
84
- "clone": true|false
85
- }
86
- }
87
- ```
88
-
89
- ## apps
90
-
91
- Array of app objects:
92
- ```json
93
- {
94
- "id": "web",
95
- "path": ".",
96
- "runtime": "pm2",
97
- "packageManager": "npm",
98
- "installCommand": "npm ci",
99
- "buildCommand": "npm run build",
100
- "startCommand": "npm run start",
101
- "ports": {
102
- "blue": 3101,
103
- "green": 3102
104
- },
105
- "healthChecks": [
106
- { "name": "home", "url": "/", "expectedStatus": [200] },
107
- { "name": "login", "url": "/login", "expectedStatus": [200, 302] }
108
- ],
109
- "activeColor": "blue",
110
- "pm2Process": "prizm-ideas-blue"
111
- }
112
- ```
113
-
114
- ## nginx
115
-
116
- ```json
117
- {
118
- "enabled": true,
119
- "managed": true,
120
- "firstChangeRequiresConfirmation": true,
121
- "domain": null,
122
- "ipFallback": true,
123
- "currentUpstream": "127.0.0.1:3101"
124
- }
125
- ```
126
-
127
- ## env
128
-
129
- ```json
130
- {
131
- "strategy": "ai-assisted|user-managed",
132
- "required": ["VAR_NAME"],
133
- "secrets": ["SECRET_NAME"],
134
- "validated": {
135
- "allRequiredPresent": true|false
136
- }
137
- }
138
- ```
139
-
140
- ## Validation Rules
141
-
142
- - `version` must be present (always 1 for first version)
143
- - `servers` must have at least one entry with host and bootstrapUser
144
- - `repository.url` must be present
145
- - `apps` must have at least one entry
146
- - `apps[*].ports.blue` and `apps[*].ports.green` must differ
147
- - `apps[*].healthChecks` should have at least one entry
148
- - Environment referenced in `environments` must have a matching server in `servers`
@@ -1,62 +0,0 @@
1
- # Deploy History Record Schema
2
-
3
- Each event in `.prizmkit/deploy/deploy-history/<id>.json` follows this schema:
4
-
5
- ```json
6
- {
7
- "eventId": "<releaseId or event id>",
8
- "eventType": "deploy|rollback|status|validation|failed-deploy|user-aborted|takeover|adapter-gap",
9
- "timestamp": "<ISO 8601>",
10
- "serverId": "<server id from deploy.config.json>",
11
- "appIds": ["<app ids involved>"],
12
- "branch": "<git branch>",
13
- "commitSha": "<full or short commit SHA>",
14
- "releasePath": "<full server path, e.g. /var/www/prizm-ideas/releases/20260430-22783a3>",
15
- "previousReleasePath": "<previous release path or null for first deploy>",
16
- "targetPort": 3101,
17
- "targetColor": "blue|green",
18
- "previousPort": 3102,
19
- "phases": {
20
- "preflight": "success|failed|skipped",
21
- "prepareRelease": "success|failed|skipped",
22
- "fetchCode": "success|failed|skipped",
23
- "installDependencies": "success|failed|skipped",
24
- "build": "success|failed|skipped",
25
- "stageRuntime": "success|failed|skipped",
26
- "healthCheck": "success|failed|skipped",
27
- "switchTraffic": "success|failed|skipped",
28
- "verifyLive": "success|failed|skipped",
29
- "cleanupOldReleases": "success|failed|skipped",
30
- "recordHistory": "success|failed|skipped"
31
- },
32
- "healthCheckResults": [
33
- {
34
- "name": "home",
35
- "url": "/",
36
- "expected": [200],
37
- "actual": 200,
38
- "pass": true
39
- }
40
- ],
41
- "rollbackResult": null,
42
- "logPath": "<server log path>",
43
- "operatorMode": "ai-assisted|user-managed",
44
- "notes": "<human-readable summary of what happened>"
45
- }
46
- ```
47
-
48
- ## Field Notes
49
-
50
- - `eventId`: Use `<releaseId>` for deploy events, `<releaseId>-rollback` for rollbacks.
51
- - `eventType`: Use `failed-deploy` when deploy fails before traffic switch, `deploy` when it succeeds. Use `adapter-gap` when no adapter exists for the detected project type or target — include `detectedProjectType`, `missingAdapter`, and `fallbackOutput` in the record.
52
- - `phases`: Only include phases that were attempted. Skip phases that were never reached.
53
- - `healthCheckResults`: Include all configured health checks. `pass` = actual status matches one of the expected status codes.
54
- - `rollbackResult`: `null` for non-rollback events, `"success"` or `"failed"` for rollbacks.
55
- - `notes`: Keep concise but include any anomalies or manual interventions.
56
-
57
- ## What NOT to record
58
-
59
- - Raw secret values or API keys — never.
60
- - Unsalted hashes of secret values — inferable with rainbow tables.
61
- - Passphrases or decryption keys — even if hashed.
62
- - Full environment variable values — presence metadata only (e.g., `{"SUPABASE_KEY": {"present": true}}`).
@@ -1,50 +0,0 @@
1
- # Deployment Mode Details
2
-
3
- Read this file when the user needs a detailed comparison of deployment modes during mode selection. SKILL.md contains the routing logic; this file has the full descriptions.
4
-
5
- ## Mode A — Direct Upload
6
-
7
- 1. Local build on the user's machine.
8
- 2. SCP built output + `node_modules` + `.env.production` to server.
9
- 3. PM2 start → health check → Nginx switch.
10
- 4. After success: offer to upgrade to CI/CD.
11
- 5. Bypasses: deploy key, git clone on server, server-side build.
12
-
13
- Best for: first-time deployment, getting something live fast, low-spec servers.
14
-
15
- ## Mode B1 — CI/CD Push
16
-
17
- 1. Generate `.github/workflows/deploy.yml`: checkout → install → build → SCP tarball → SSH restart.
18
- 2. Add GitHub Secrets: `SSH_HOST`, `SSH_USER`, `SSH_KEY`, `SSH_PORT`.
19
- 3. First deploy triggered by push to configured branch.
20
- 4. Server only needs Node.js runtime + PM2 — no git, no build tools needed.
21
- 5. GitHub Actions runner handles the heavy lifting.
22
-
23
- Best for: low-spec servers, heavy build processes, projects with large dependencies.
24
-
25
- ## Mode B2 — CI/CD Pull
26
-
27
- 1. Configure deploy key on server → add to GitHub.
28
- 2. Generate `.github/workflows/deploy.yml`: triggers SSH command on server.
29
- 3. Server-side deploy script: `git pull` → install → build → PM2 restart → health check.
30
- 4. Server needs full build toolchain (Node.js, npm, git).
31
- 5. Simpler workflow file, heavier server load.
32
-
33
- Best for: simple setup, servers with sufficient CPU/RAM, projects where build is fast.
34
-
35
- ## Comparison
36
-
37
- | Aspect | Push mode | Pull mode |
38
- |------|----------|----------|
39
- | Build location | GitHub Actions runner | Server (local) |
40
- | Server load | Low (runs app only) | High (build + run) |
41
- | Config complexity | Medium (needs SCP transfer) | Low (SSH-triggered script only) |
42
- | Best for | Low-spec servers, heavy builds | Simple setup, capable servers |
43
- | Deploy Key required | No | Yes |
44
- | Artifact transfer | SCP tarball | git pull (incremental) |
45
-
46
- ## Common ground between all modes
47
-
48
- - Same PM2 + Nginx blue/green strategy.
49
- - Same health check and traffic switch procedure.
50
- - Same ops commands (status/logs/restart/rollback).
@@ -1,26 +0,0 @@
1
- # Direct Upload Deployment
2
-
3
- Read this file when `deployStrategy` is `"direct-upload"`. The AI handles the build locally and transfers built artifacts to the server. No Git operations on the server.
4
-
5
- ## Build phase (local)
6
-
7
- 1. Run `<buildCommand>` locally (e.g., `npm run build`) in the project root.
8
- 2. Identify the build output directory: `.next/` for Next.js, `dist/` for Vite, `build/` for CRA.
9
- 3. Prepare a deployment tarball containing: build output + `node_modules/` + `package.json` + `package-lock.json` + any runtime config files.
10
-
11
- ## Transfer phase (SCP)
12
-
13
- ```
14
- scp -P <port> deploy-<releaseId>.tar.gz <runtimeUser>@<host>:/var/www/<project>/releases/
15
- ssh <runtimeUser>@<host> "cd /var/www/<project>/releases && mkdir <releaseId> && tar xzf deploy-<releaseId>.tar.gz -C <releaseId>"
16
- ```
17
-
18
- ## Server-side setup
19
-
20
- 1. Copy `.env.production` from `shared/` into the release directory (or SCP it alongside the tarball if first deploy).
21
- 2. No `npm install` needed — `node_modules` was transferred directly.
22
- 3. Start PM2 on the inactive port. Health checks and traffic switch follow the standard flow (Groups 3-5 in SKILL.md).
23
-
24
- ## Why transfer node_modules
25
-
26
- Direct upload is optimized for "fast first deploy." Re-running `npm ci` on a low-spec server can be slow. Transferring pre-built artifacts means the server only needs to run the app.
@@ -1,42 +0,0 @@
1
- # DNS Setup Guidance
2
-
3
- Read this file when the user has a domain for their project but DNS is not yet pointing to the server.
4
-
5
- ## Step 1 — Check DNS resolution
6
-
7
- ```powershell
8
- Resolve-DnsName <domain> -Type A | Where-Object { $_.QueryType -eq 'A' } | Select-Object -ExpandProperty IPAddress
9
- ```
10
-
11
- If it resolves to the server IP: DNS is already configured, proceed to SSL (`references/ssl-setup.md`).
12
- If not: continue below.
13
-
14
- ## Step 2 — DNS setup guidance
15
-
16
- ```
17
- Domain <example.com> is not yet pointing to server <server-IP>.
18
-
19
- Add the following record at your DNS provider (e.g., Alibaba Cloud, Cloudflare, Namecheap):
20
-
21
- Type: A
22
- Name: @
23
- Value: <server-IP>
24
- TTL: 600
25
-
26
- To also support the www subdomain:
27
- Type: A
28
- Name: www
29
- Value: <server-IP>
30
-
31
- Reply "done" when configured, and I'll verify and set up the SSL certificate.
32
- ```
33
-
34
- ## Step 3 — Verify after user confirmation
35
-
36
- - Re-run `Resolve-DnsName <domain> -Type A` to confirm resolution.
37
- - If still not resolved: warn about DNS propagation delay (can take up to 48 hours, usually 5-30 minutes). Offer to wait or continue without SSL for now.
38
- - Once confirmed: proceed to SSL (`references/ssl-setup.md`).
39
-
40
- ## Edge case — IP-only deployment
41
-
42
- If user has no domain: skip DNS + SSL sections. Generate a note in deploy.md: "Project accessed via IP, no domain or HTTPS configured. Recommend purchasing a domain and running `/prizmkit-deploy setup-ssl`."
@@ -1,31 +0,0 @@
1
- # Docker Deployment Path
2
-
3
- Guided deployment when a `Dockerfile` or `docker-compose.yml` is detected, or the user requests Docker deployment.
4
-
5
- ## Detect and Configure
6
-
7
- 1. Read `Dockerfile` — extract base image, exposed ports, build steps.
8
- 2. Read `docker-compose.yml` if present — extract services, volumes, environment, ports.
9
- 3. Identify image name: from compose project name or repo directory name.
10
- 4. Identify port mappings: from `EXPOSE`, `ports:` in compose, or ask the user.
11
-
12
- ## Build and Deploy
13
-
14
- 1. Build: `docker build -t <project>:<releaseId> .` or `docker compose build`.
15
- 2. Check for running containers with the same name: `docker ps -a --filter name=<project>`.
16
- 3. If a previous container exists:
17
- - For blue/green on a server with Nginx: start new container on different port, health check, switch upstream.
18
- - For single-container setup: stop old, start new — warn about brief downtime.
19
- 4. Start: `docker run -d --name <project>-<releaseId> -p <port>:<port> <project>:<releaseId>` or `docker compose up -d`.
20
- 5. Health check the new container.
21
- 6. Write deploy-history event.
22
-
23
- ## Operations
24
-
25
- | Command | Docker CLI |
26
- |---------|-----------|
27
- | status | `docker ps --filter name=<project>` |
28
- | logs | `docker logs <container-name> --tail 100` |
29
- | restart | `docker restart <container-name>` |
30
- | rollback | `docker stop <new-container> && docker start <old-container>` |
31
- | cleanup | `docker image prune -a --filter "label=project=<project>"` |
@@ -1,37 +0,0 @@
1
- # Firewall Setup (UFW)
2
-
3
- Read this file when the user wants AI-assisted firewall configuration during bootstrap.
4
-
5
- ## Flow
6
-
7
- 1. After core tools are installed, ask the user:
8
- > "Want me to configure the firewall (ufw)? Only necessary ports will be opened, improving server security."
9
-
10
- 2. If user declines: skip, record to deploy config.
11
-
12
- 3. If user agrees, ask which additional ports to open (beyond SSH/HTTP/HTTPS):
13
- > "By default only SSH(22), HTTP(80), HTTPS(443) are opened. Should the blue/green preview ports (3101/3102) also be opened? If you need other ports (e.g., for remote database management), list them together."
14
-
15
- 4. Collect ports, then ask:
16
- > "Firewall rules are ready. Should I apply them directly, or will you do it yourself?"
17
- > - **A. You apply them** — AI runs ufw commands
18
- > - **B. I'll do it myself** — output rule list, user executes manually
19
-
20
- ## Planned rules (output before executing)
21
-
22
- ```
23
- ufw default deny incoming
24
- ufw default allow outgoing
25
- ufw allow 22/tcp # SSH
26
- ufw allow 80/tcp # HTTP
27
- ufw allow 443/tcp # HTTPS
28
- ufw allow 3101/tcp # blue preview (user-approved)
29
- ufw allow 3102/tcp # green preview (user-approved)
30
- ufw --force enable
31
- ```
32
-
33
- ## Rules for automatic execution
34
-
35
- - Check `ufw status` first — if rules already exist, append only missing rules, don't overwrite.
36
- - Never `ufw reset` unless explicitly asked, because it wipes custom rules the user may have configured manually.
37
- - Record a `"security-baseline"` event in deploy history with the rule list, so future sessions can detect existing configuration.
@@ -1,21 +0,0 @@
1
- # Implementation Notes from Live Validation
2
-
3
- These findings from the first PrizmKit deployment (PrizmIdeas) guide edge-case handling. Read when troubleshooting bootstrap or deploy issues.
4
-
5
- 1. **Detect port conflicts before installing Nginx.** Check what's on port 80/443 and ask before stopping anything, because overwriting an existing web server without confirmation can break unrelated services.
6
-
7
- 2. **Verify npm separately from node.** Minimal Node installs may not bundle npm. Run `which npm` after installing Node, because `node --version` succeeding doesn't guarantee npm is available.
8
-
9
- 3. **Fix locale on bare Ubuntu.** Run `locale-gen en_US.UTF-8` early to avoid perl warnings in apt. This is safe to run unconditionally even if locale is already configured.
10
-
11
- 4. **Deploy key workflow is inherently interactive.** Generate key → wait for user to add to GitHub → verify. Headless mode cannot complete this because it requires the user to paste the key into GitHub's UI.
12
-
13
- 5. **`pm2 startup` needs explicit PATH.** Always use `env PATH=$PATH:/usr/bin pm2 startup ...`, because the pm2 binary may not be on root's default PATH.
14
-
15
- 6. **Persist deploy metadata on server.** Write `activeColor`, `activePort`, `lastReleaseId`, `lastDeployTimestamp` to `shared/deploy-metadata.json`, because subsequent deploys and rollbacks depend on knowing the current active slot.
16
-
17
- 7. **Detect first deployment.** If no `current` symlink and no PM2 process for the app, skip rollback safety checks and use blue (3101) as initial color.
18
-
19
- 8. **Build-time env vars.** Copy `.env.production` before `npm run build`, not after. `NEXT_PUBLIC_*` vars are baked at build time and won't be picked up if the .env is added later.
20
-
21
- 9. **Node.js version flexibility.** Default to v22 LTS if v25 is unavailable. Most frameworks tolerate a minor version diff, and v22 has broader package compatibility.
@@ -1,59 +0,0 @@
1
- # Nginx Blue/Green Configuration Template
2
-
3
- ## Server Block Template
4
-
5
- ```nginx
6
- # PrizmKit Managed: <project> — DO NOT EDIT MANUALLY
7
- upstream <project>_backend {
8
- server 127.0.0.1:<activePort>;
9
- }
10
-
11
- server {
12
- listen 80 default_server;
13
- server_name _;
14
-
15
- # PrizmKit managed marker: <project>
16
- location / {
17
- proxy_pass http://<project>_backend;
18
- proxy_http_version 1.1;
19
- proxy_set_header Host $host;
20
- proxy_set_header X-Real-IP $remote_addr;
21
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
22
- proxy_set_header X-Forwarded-Proto $scheme;
23
- }
24
- }
25
- ```
26
-
27
- ## Traffic Switch Procedure
28
-
29
- When switching from one color to another:
30
-
31
- 1. Update the `upstream` block: change `server 127.0.0.1:<oldPort>` to `server 127.0.0.1:<newPort>`
32
- 2. Run `nginx -t` to validate syntax
33
- 3. If syntax check passes: `systemctl reload nginx`
34
- 4. If syntax check fails: DO NOT reload. Abort the switch. Report the error.
35
-
36
- ## Managed Marker
37
-
38
- All PrizmKit-generated Nginx config must contain:
39
- ```
40
- # PrizmKit Managed: <project> — DO NOT EDIT MANUALLY
41
- ```
42
-
43
- Before modifying any server block that lacks this marker, ask for user confirmation.
44
-
45
- ## First-Time Setup
46
-
47
- - Disable default nginx site: `rm -f /etc/nginx/sites-enabled/default`
48
- - Create new config: `/etc/nginx/sites-available/<project>`
49
- - Symlink: `ln -sf /etc/nginx/sites-available/<project> /etc/nginx/sites-enabled/<project>`
50
- - Test: `nginx -t`
51
- - Reload: `systemctl reload nginx`
52
-
53
- ## Rediscovery of Active Port
54
-
55
- If `deploy-metadata.json` is missing, rediscover the active upstream port from Nginx config:
56
- ```
57
- grep "server 127.0.0.1:" /etc/nginx/sites-available/<project>
58
- ```
59
- Then match the port against configured blue/green ports to determine active color.