bigpowers 2.87.3 → 2.87.5

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 (259) hide show
  1. package/.cursor/rules/align-grid.mdc +109 -0
  2. package/.cursor/rules/assess-impact.mdc +90 -0
  3. package/.cursor/rules/audit-code.mdc +183 -0
  4. package/.cursor/rules/audit-plan.mdc +88 -0
  5. package/.cursor/rules/build-epic.mdc +104 -0
  6. package/.cursor/rules/change-request.mdc +120 -0
  7. package/.cursor/rules/commit-message.mdc +139 -0
  8. package/.cursor/rules/compose-workflow.mdc +81 -0
  9. package/.cursor/rules/context7-mcp.mdc +54 -0
  10. package/.cursor/rules/craft-skill.mdc +195 -0
  11. package/.cursor/rules/deepen-architecture.mdc +259 -0
  12. package/.cursor/rules/define-language.mdc +79 -0
  13. package/.cursor/rules/define-success.mdc +11 -0
  14. package/.cursor/rules/delegate-task.mdc +90 -0
  15. package/.cursor/rules/deploy.mdc +197 -0
  16. package/.cursor/rules/design-interface.mdc +96 -0
  17. package/.cursor/rules/develop-tdd.mdc +415 -0
  18. package/.cursor/rules/diagnose-root.mdc +23 -0
  19. package/.cursor/rules/diagnose-stall.mdc +53 -0
  20. package/.cursor/rules/dispatch-agents.mdc +117 -0
  21. package/.cursor/rules/edit-document.mdc +22 -0
  22. package/.cursor/rules/elaborate-spec.mdc +100 -0
  23. package/.cursor/rules/enforce-first.mdc +44 -0
  24. package/.cursor/rules/evolve-skill.mdc +54 -0
  25. package/.cursor/rules/execute-plan.mdc +60 -0
  26. package/.cursor/rules/extract-design.mdc +131 -0
  27. package/.cursor/rules/find-way.mdc +190 -0
  28. package/.cursor/rules/fix-bug.mdc +66 -0
  29. package/.cursor/rules/gate-trace.mdc +91 -0
  30. package/.cursor/rules/generate-allure-report.mdc +284 -0
  31. package/.cursor/rules/grill-me.mdc +107 -0
  32. package/.cursor/rules/grill-with-docs.mdc +52 -0
  33. package/.cursor/rules/guard-git.mdc +230 -0
  34. package/.cursor/rules/harden-vps.mdc +290 -0
  35. package/.cursor/rules/hook-commits.mdc +93 -0
  36. package/.cursor/rules/inspect-quality.mdc +105 -0
  37. package/.cursor/rules/investigate-bug.mdc +126 -0
  38. package/.cursor/rules/kickoff-branch.mdc +142 -0
  39. package/.cursor/rules/maintain-wiki.mdc +63 -0
  40. package/.cursor/rules/map-codebase.mdc +70 -0
  41. package/.cursor/rules/migrate-spec.mdc +907 -0
  42. package/.cursor/rules/model-domain.mdc +231 -0
  43. package/.cursor/rules/orchestrate-project.mdc +173 -0
  44. package/.cursor/rules/organize-workspace.mdc +163 -0
  45. package/.cursor/rules/plan-refactor.mdc +86 -0
  46. package/.cursor/rules/plan-release.mdc +144 -0
  47. package/.cursor/rules/plan-tests.mdc +74 -0
  48. package/.cursor/rules/plan-work.mdc +271 -0
  49. package/.cursor/rules/publish-package.mdc +337 -0
  50. package/.cursor/rules/quick-fix.mdc +113 -0
  51. package/.cursor/rules/release-branch.mdc +301 -0
  52. package/.cursor/rules/request-review.mdc +112 -0
  53. package/.cursor/rules/research-first.mdc +86 -0
  54. package/.cursor/rules/reset-baseline.mdc +20 -0
  55. package/.cursor/rules/respond-review.mdc +70 -0
  56. package/.cursor/rules/run-benchmark.mdc +84 -0
  57. package/.cursor/rules/run-evals.mdc +79 -0
  58. package/.cursor/rules/run-planning.mdc +100 -0
  59. package/.cursor/rules/scope-work.mdc +62 -0
  60. package/.cursor/rules/search-skills.mdc +72 -0
  61. package/.cursor/rules/security-review.mdc +383 -0
  62. package/.cursor/rules/seed-conventions.mdc +311 -0
  63. package/.cursor/rules/session-state.mdc +145 -0
  64. package/.cursor/rules/setup-environment.mdc +38 -0
  65. package/.cursor/rules/simple-english.mdc +345 -0
  66. package/.cursor/rules/simulate-agents.mdc +25 -0
  67. package/.cursor/rules/slice-tasks.mdc +67 -0
  68. package/.cursor/rules/smoke-test.mdc +260 -0
  69. package/.cursor/rules/spike-prototype.mdc +94 -0
  70. package/.cursor/rules/stocktake-skills.mdc +73 -0
  71. package/.cursor/rules/survey-context.mdc +134 -0
  72. package/.cursor/rules/terse-mode.mdc +41 -0
  73. package/.cursor/rules/trace-requirement.mdc +68 -0
  74. package/.cursor/rules/using-bigpowers.mdc +110 -0
  75. package/.cursor/rules/validate-contracts.mdc +285 -0
  76. package/.cursor/rules/validate-fix.mdc +146 -0
  77. package/.cursor/rules/verify-work.mdc +190 -0
  78. package/.cursor/rules/visual-dashboard.mdc +49 -0
  79. package/.cursor/rules/wire-ci.mdc +380 -0
  80. package/.cursor/rules/wire-observability.mdc +96 -0
  81. package/.cursor/rules/write-document.mdc +280 -0
  82. package/.gemini/extensions/bigpowers/commands/prompts/align-grid.md +109 -0
  83. package/.gemini/extensions/bigpowers/commands/prompts/assess-impact.md +90 -0
  84. package/.gemini/extensions/bigpowers/commands/prompts/audit-code.md +183 -0
  85. package/.gemini/extensions/bigpowers/commands/prompts/audit-plan.md +88 -0
  86. package/.gemini/extensions/bigpowers/commands/prompts/build-epic.md +104 -0
  87. package/.gemini/extensions/bigpowers/commands/prompts/change-request.md +120 -0
  88. package/.gemini/extensions/bigpowers/commands/prompts/commit-message.md +139 -0
  89. package/.gemini/extensions/bigpowers/commands/prompts/compose-workflow.md +81 -0
  90. package/.gemini/extensions/bigpowers/commands/prompts/context7-mcp.md +54 -0
  91. package/.gemini/extensions/bigpowers/commands/prompts/craft-skill.md +195 -0
  92. package/.gemini/extensions/bigpowers/commands/prompts/deepen-architecture.md +259 -0
  93. package/.gemini/extensions/bigpowers/commands/prompts/define-language.md +79 -0
  94. package/.gemini/extensions/bigpowers/commands/prompts/define-success.md +11 -0
  95. package/.gemini/extensions/bigpowers/commands/prompts/delegate-task.md +90 -0
  96. package/.gemini/extensions/bigpowers/commands/prompts/deploy.md +197 -0
  97. package/.gemini/extensions/bigpowers/commands/prompts/design-interface.md +96 -0
  98. package/.gemini/extensions/bigpowers/commands/prompts/develop-tdd.md +415 -0
  99. package/.gemini/extensions/bigpowers/commands/prompts/diagnose-root.md +23 -0
  100. package/.gemini/extensions/bigpowers/commands/prompts/diagnose-stall.md +53 -0
  101. package/.gemini/extensions/bigpowers/commands/prompts/dispatch-agents.md +117 -0
  102. package/.gemini/extensions/bigpowers/commands/prompts/edit-document.md +22 -0
  103. package/.gemini/extensions/bigpowers/commands/prompts/elaborate-spec.md +100 -0
  104. package/.gemini/extensions/bigpowers/commands/prompts/enforce-first.md +44 -0
  105. package/.gemini/extensions/bigpowers/commands/prompts/evolve-skill.md +54 -0
  106. package/.gemini/extensions/bigpowers/commands/prompts/execute-plan.md +60 -0
  107. package/.gemini/extensions/bigpowers/commands/prompts/extract-design.md +131 -0
  108. package/.gemini/extensions/bigpowers/commands/prompts/find-way.md +190 -0
  109. package/.gemini/extensions/bigpowers/commands/prompts/fix-bug.md +66 -0
  110. package/.gemini/extensions/bigpowers/commands/prompts/gate-trace.md +91 -0
  111. package/.gemini/extensions/bigpowers/commands/prompts/generate-allure-report.md +284 -0
  112. package/.gemini/extensions/bigpowers/commands/prompts/grill-me.md +107 -0
  113. package/.gemini/extensions/bigpowers/commands/prompts/grill-with-docs.md +52 -0
  114. package/.gemini/extensions/bigpowers/commands/prompts/guard-git.md +230 -0
  115. package/.gemini/extensions/bigpowers/commands/prompts/harden-vps.md +290 -0
  116. package/.gemini/extensions/bigpowers/commands/prompts/hook-commits.md +93 -0
  117. package/.gemini/extensions/bigpowers/commands/prompts/inspect-quality.md +105 -0
  118. package/.gemini/extensions/bigpowers/commands/prompts/investigate-bug.md +126 -0
  119. package/.gemini/extensions/bigpowers/commands/prompts/kickoff-branch.md +142 -0
  120. package/.gemini/extensions/bigpowers/commands/prompts/maintain-wiki.md +63 -0
  121. package/.gemini/extensions/bigpowers/commands/prompts/map-codebase.md +70 -0
  122. package/.gemini/extensions/bigpowers/commands/prompts/migrate-spec.md +907 -0
  123. package/.gemini/extensions/bigpowers/commands/prompts/model-domain.md +231 -0
  124. package/.gemini/extensions/bigpowers/commands/prompts/orchestrate-project.md +173 -0
  125. package/.gemini/extensions/bigpowers/commands/prompts/organize-workspace.md +163 -0
  126. package/.gemini/extensions/bigpowers/commands/prompts/plan-refactor.md +86 -0
  127. package/.gemini/extensions/bigpowers/commands/prompts/plan-release.md +144 -0
  128. package/.gemini/extensions/bigpowers/commands/prompts/plan-tests.md +74 -0
  129. package/.gemini/extensions/bigpowers/commands/prompts/plan-work.md +271 -0
  130. package/.gemini/extensions/bigpowers/commands/prompts/publish-package.md +337 -0
  131. package/.gemini/extensions/bigpowers/commands/prompts/quick-fix.md +113 -0
  132. package/.gemini/extensions/bigpowers/commands/prompts/release-branch.md +301 -0
  133. package/.gemini/extensions/bigpowers/commands/prompts/request-review.md +112 -0
  134. package/.gemini/extensions/bigpowers/commands/prompts/research-first.md +86 -0
  135. package/.gemini/extensions/bigpowers/commands/prompts/reset-baseline.md +20 -0
  136. package/.gemini/extensions/bigpowers/commands/prompts/respond-review.md +70 -0
  137. package/.gemini/extensions/bigpowers/commands/prompts/run-benchmark.md +84 -0
  138. package/.gemini/extensions/bigpowers/commands/prompts/run-evals.md +79 -0
  139. package/.gemini/extensions/bigpowers/commands/prompts/run-planning.md +100 -0
  140. package/.gemini/extensions/bigpowers/commands/prompts/scope-work.md +62 -0
  141. package/.gemini/extensions/bigpowers/commands/prompts/search-skills.md +72 -0
  142. package/.gemini/extensions/bigpowers/commands/prompts/security-review.md +383 -0
  143. package/.gemini/extensions/bigpowers/commands/prompts/seed-conventions.md +311 -0
  144. package/.gemini/extensions/bigpowers/commands/prompts/session-state.md +145 -0
  145. package/.gemini/extensions/bigpowers/commands/prompts/setup-environment.md +38 -0
  146. package/.gemini/extensions/bigpowers/commands/prompts/simple-english.md +345 -0
  147. package/.gemini/extensions/bigpowers/commands/prompts/simulate-agents.md +25 -0
  148. package/.gemini/extensions/bigpowers/commands/prompts/slice-tasks.md +67 -0
  149. package/.gemini/extensions/bigpowers/commands/prompts/smoke-test.md +260 -0
  150. package/.gemini/extensions/bigpowers/commands/prompts/spike-prototype.md +94 -0
  151. package/.gemini/extensions/bigpowers/commands/prompts/stocktake-skills.md +73 -0
  152. package/.gemini/extensions/bigpowers/commands/prompts/survey-context.md +134 -0
  153. package/.gemini/extensions/bigpowers/commands/prompts/terse-mode.md +41 -0
  154. package/.gemini/extensions/bigpowers/commands/prompts/trace-requirement.md +68 -0
  155. package/.gemini/extensions/bigpowers/commands/prompts/using-bigpowers.md +110 -0
  156. package/.gemini/extensions/bigpowers/commands/prompts/validate-contracts.md +285 -0
  157. package/.gemini/extensions/bigpowers/commands/prompts/validate-fix.md +146 -0
  158. package/.gemini/extensions/bigpowers/commands/prompts/verify-work.md +190 -0
  159. package/.gemini/extensions/bigpowers/commands/prompts/visual-dashboard.md +49 -0
  160. package/.gemini/extensions/bigpowers/commands/prompts/wire-ci.md +380 -0
  161. package/.gemini/extensions/bigpowers/commands/prompts/wire-observability.md +96 -0
  162. package/.gemini/extensions/bigpowers/commands/prompts/write-document.md +280 -0
  163. package/.gemini/extensions/bigpowers/gemini-extension.json +16 -0
  164. package/.gemini/extensions/bigpowers/hooks/HOOKS.md +43 -0
  165. package/.gemini/extensions/bigpowers/hooks/before-tool-git-guard.sh +26 -0
  166. package/.gemini/extensions/bigpowers/hooks/before-tool-rtk.sh +14 -0
  167. package/.gemini/extensions/bigpowers/hooks/before-tool-token-mgmt.sh +19 -0
  168. package/.gemini/extensions/bigpowers/hooks/hooks-manifest.json +36 -0
  169. package/.gemini/extensions/bigpowers/hooks/run-hook.cmd +29 -0
  170. package/.gemini/extensions/bigpowers/hooks/session-start +48 -0
  171. package/.gemini/extensions/bigpowers/hooks/settings.json.example +41 -0
  172. package/.gemini/extensions/bigpowers/skills/align-grid/SKILL.md +111 -0
  173. package/.gemini/extensions/bigpowers/skills/assess-impact/SKILL.md +92 -0
  174. package/.gemini/extensions/bigpowers/skills/audit-code/SKILL.md +185 -0
  175. package/.gemini/extensions/bigpowers/skills/audit-plan/SKILL.md +90 -0
  176. package/.gemini/extensions/bigpowers/skills/build-epic/SKILL.md +106 -0
  177. package/.gemini/extensions/bigpowers/skills/change-request/SKILL.md +122 -0
  178. package/.gemini/extensions/bigpowers/skills/commit-message/SKILL.md +141 -0
  179. package/.gemini/extensions/bigpowers/skills/compose-workflow/SKILL.md +83 -0
  180. package/.gemini/extensions/bigpowers/skills/context7-mcp/SKILL.md +56 -0
  181. package/.gemini/extensions/bigpowers/skills/craft-skill/SKILL.md +197 -0
  182. package/.gemini/extensions/bigpowers/skills/deepen-architecture/SKILL.md +261 -0
  183. package/.gemini/extensions/bigpowers/skills/define-language/SKILL.md +81 -0
  184. package/.gemini/extensions/bigpowers/skills/define-success/SKILL.md +13 -0
  185. package/.gemini/extensions/bigpowers/skills/delegate-task/SKILL.md +92 -0
  186. package/.gemini/extensions/bigpowers/skills/deploy/SKILL.md +199 -0
  187. package/.gemini/extensions/bigpowers/skills/design-interface/SKILL.md +98 -0
  188. package/.gemini/extensions/bigpowers/skills/develop-tdd/SKILL.md +417 -0
  189. package/.gemini/extensions/bigpowers/skills/diagnose-root/SKILL.md +25 -0
  190. package/.gemini/extensions/bigpowers/skills/diagnose-stall/SKILL.md +55 -0
  191. package/.gemini/extensions/bigpowers/skills/dispatch-agents/SKILL.md +119 -0
  192. package/.gemini/extensions/bigpowers/skills/edit-document/SKILL.md +24 -0
  193. package/.gemini/extensions/bigpowers/skills/elaborate-spec/SKILL.md +102 -0
  194. package/.gemini/extensions/bigpowers/skills/enforce-first/SKILL.md +46 -0
  195. package/.gemini/extensions/bigpowers/skills/evolve-skill/SKILL.md +56 -0
  196. package/.gemini/extensions/bigpowers/skills/execute-plan/SKILL.md +62 -0
  197. package/.gemini/extensions/bigpowers/skills/extract-design/SKILL.md +133 -0
  198. package/.gemini/extensions/bigpowers/skills/find-way/SKILL.md +192 -0
  199. package/.gemini/extensions/bigpowers/skills/fix-bug/SKILL.md +68 -0
  200. package/.gemini/extensions/bigpowers/skills/gate-trace/SKILL.md +93 -0
  201. package/.gemini/extensions/bigpowers/skills/generate-allure-report/SKILL.md +286 -0
  202. package/.gemini/extensions/bigpowers/skills/grill-me/SKILL.md +109 -0
  203. package/.gemini/extensions/bigpowers/skills/grill-with-docs/SKILL.md +54 -0
  204. package/.gemini/extensions/bigpowers/skills/guard-git/SKILL.md +232 -0
  205. package/.gemini/extensions/bigpowers/skills/harden-vps/SKILL.md +292 -0
  206. package/.gemini/extensions/bigpowers/skills/hook-commits/SKILL.md +95 -0
  207. package/.gemini/extensions/bigpowers/skills/inspect-quality/SKILL.md +107 -0
  208. package/.gemini/extensions/bigpowers/skills/investigate-bug/SKILL.md +128 -0
  209. package/.gemini/extensions/bigpowers/skills/kickoff-branch/SKILL.md +144 -0
  210. package/.gemini/extensions/bigpowers/skills/maintain-wiki/SKILL.md +65 -0
  211. package/.gemini/extensions/bigpowers/skills/map-codebase/SKILL.md +72 -0
  212. package/.gemini/extensions/bigpowers/skills/migrate-spec/SKILL.md +909 -0
  213. package/.gemini/extensions/bigpowers/skills/model-domain/SKILL.md +233 -0
  214. package/.gemini/extensions/bigpowers/skills/orchestrate-project/SKILL.md +175 -0
  215. package/.gemini/extensions/bigpowers/skills/organize-workspace/SKILL.md +165 -0
  216. package/.gemini/extensions/bigpowers/skills/plan-refactor/SKILL.md +88 -0
  217. package/.gemini/extensions/bigpowers/skills/plan-release/SKILL.md +146 -0
  218. package/.gemini/extensions/bigpowers/skills/plan-tests/SKILL.md +76 -0
  219. package/.gemini/extensions/bigpowers/skills/plan-work/SKILL.md +273 -0
  220. package/.gemini/extensions/bigpowers/skills/publish-package/SKILL.md +339 -0
  221. package/.gemini/extensions/bigpowers/skills/quick-fix/SKILL.md +115 -0
  222. package/.gemini/extensions/bigpowers/skills/release-branch/SKILL.md +303 -0
  223. package/.gemini/extensions/bigpowers/skills/request-review/SKILL.md +114 -0
  224. package/.gemini/extensions/bigpowers/skills/research-first/SKILL.md +88 -0
  225. package/.gemini/extensions/bigpowers/skills/reset-baseline/SKILL.md +22 -0
  226. package/.gemini/extensions/bigpowers/skills/respond-review/SKILL.md +72 -0
  227. package/.gemini/extensions/bigpowers/skills/run-benchmark/SKILL.md +86 -0
  228. package/.gemini/extensions/bigpowers/skills/run-evals/SKILL.md +81 -0
  229. package/.gemini/extensions/bigpowers/skills/run-planning/SKILL.md +102 -0
  230. package/.gemini/extensions/bigpowers/skills/scope-work/SKILL.md +64 -0
  231. package/.gemini/extensions/bigpowers/skills/search-skills/SKILL.md +74 -0
  232. package/.gemini/extensions/bigpowers/skills/security-review/SKILL.md +385 -0
  233. package/.gemini/extensions/bigpowers/skills/seed-conventions/SKILL.md +313 -0
  234. package/.gemini/extensions/bigpowers/skills/session-state/SKILL.md +147 -0
  235. package/.gemini/extensions/bigpowers/skills/setup-environment/SKILL.md +40 -0
  236. package/.gemini/extensions/bigpowers/skills/simple-english/SKILL.md +347 -0
  237. package/.gemini/extensions/bigpowers/skills/simulate-agents/SKILL.md +27 -0
  238. package/.gemini/extensions/bigpowers/skills/slice-tasks/SKILL.md +69 -0
  239. package/.gemini/extensions/bigpowers/skills/smoke-test/SKILL.md +262 -0
  240. package/.gemini/extensions/bigpowers/skills/spike-prototype/SKILL.md +96 -0
  241. package/.gemini/extensions/bigpowers/skills/stocktake-skills/SKILL.md +75 -0
  242. package/.gemini/extensions/bigpowers/skills/survey-context/SKILL.md +136 -0
  243. package/.gemini/extensions/bigpowers/skills/terse-mode/SKILL.md +43 -0
  244. package/.gemini/extensions/bigpowers/skills/trace-requirement/SKILL.md +70 -0
  245. package/.gemini/extensions/bigpowers/skills/using-bigpowers/SKILL.md +112 -0
  246. package/.gemini/extensions/bigpowers/skills/validate-contracts/SKILL.md +287 -0
  247. package/.gemini/extensions/bigpowers/skills/validate-fix/SKILL.md +148 -0
  248. package/.gemini/extensions/bigpowers/skills/verify-work/SKILL.md +192 -0
  249. package/.gemini/extensions/bigpowers/skills/visual-dashboard/SKILL.md +51 -0
  250. package/.gemini/extensions/bigpowers/skills/wire-ci/SKILL.md +382 -0
  251. package/.gemini/extensions/bigpowers/skills/wire-observability/SKILL.md +98 -0
  252. package/.gemini/extensions/bigpowers/skills/write-document/SKILL.md +282 -0
  253. package/.pi/package.json +1 -1
  254. package/CHANGELOG.md +14 -0
  255. package/package.json +1 -1
  256. package/scripts/lib/__pycache__/link_utils.cpython-312.pyc +0 -0
  257. package/scripts/lib/__pycache__/srp_engine_links.cpython-312.pyc +0 -0
  258. package/scripts/lib/install-helpers.js +147 -20
  259. package/scripts/test-install-helpers.js +141 -0
@@ -0,0 +1,261 @@
1
+ ---
2
+ name: deepen-architecture
3
+ model: sonnet
4
+ description: "Find deepening opportunities in a codebase, informed by the domain language in specs/tech-architecture/tech-stack.md and the decisions in specs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable."
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Deepen Architecture
9
+
10
+ Surface architectural friction and propose **deepening opportunities** — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.
11
+
12
+ **Distinct from `define-language` and `model-domain`:** Use this skill to find module-level refactoring opportunities in the codebase. Use `define-language` to produce a canonical glossary of terms. Use `model-domain` to stress-test a plan through a domain-model interview.
13
+
14
+ > **HARD GATE** — Deep modules must solve a forcing function, not just be "nice abstractions." If you cannot articulate why the abstraction exists, it is premature.
15
+
16
+ ## Glossary
17
+
18
+ Use these terms exactly in every suggestion. Consistent language is the point — don't drift into "component," "service," "API," or "boundary." Full definitions in [LANGUAGE.md](LANGUAGE.md).
19
+
20
+ - **Module** — anything with an interface and an implementation (function, class, package, slice).
21
+ - **Interface** — everything a caller must know to use the module: types, invariants, error modes, ordering, config. Not just the type signature.
22
+ - **Implementation** — the code inside.
23
+ - **Depth** — leverage at the interface: a lot of behaviour behind a small interface. **Deep** = high leverage. **Shallow** = interface nearly as complex as the implementation.
24
+ - **Seam** — where an interface lives; a place behaviour can be altered without editing in place. (Use this, not "boundary.")
25
+ - **Adapter** — a concrete thing satisfying an interface at a seam.
26
+ - **Leverage** — what callers get from depth.
27
+ - **Locality** — what maintainers get from depth: change, bugs, knowledge concentrated in one place.
28
+
29
+ Key principles (see [LANGUAGE.md](LANGUAGE.md) for the full list):
30
+
31
+ - **Deletion test**: imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.
32
+ - **The interface is the test surface.**
33
+ - **One adapter = hypothetical seam. Two adapters = real seam.**
34
+
35
+ This skill is _informed_ by the project's domain model — `specs/tech-architecture/tech-stack.md` and any `specs/adr/`. The domain language gives names to good seams; ADRs record decisions the skill should not re-litigate. See [CONTEXT-FORMAT.md](../model-domain/CONTEXT-FORMAT.md) and [ADR-FORMAT.md](../model-domain/ADR-FORMAT.md).
36
+
37
+ ## Process
38
+
39
+ ### 1. Explore
40
+
41
+ Read existing documentation first:
42
+
43
+ - `specs/tech-architecture/tech-stack.md` (or `specs/tech-architecture/tech-stack.md` + each `specs/tech-architecture/tech-stack.md` in a multi-context repo)
44
+ - Relevant ADRs in `specs/adr/`
45
+
46
+ If any of these files don't exist, proceed silently — don't flag their absence or suggest creating them upfront.
47
+
48
+ **Look-here-first (churn heuristic):** Before organic exploration, rank candidate modules by recent commit frequency. High-churn files are architectural friction magnets — start there.
49
+
50
+ ```bash
51
+ bash scripts/bp-churn-rank.sh --since 90.days --limit 20
52
+ ```
53
+
54
+ Then use the Agent tool with `subagent_type=Explore` to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction:
55
+
56
+ - Where does understanding one concept require bouncing between many small modules?
57
+ - Where are modules **shallow** — interface nearly as complex as the implementation?
58
+ - Where have pure functions been extracted just for testability, but the real bugs hide in how they're called?
59
+ - Where do tightly-coupled modules leak across their seams?
60
+ - Which parts of the codebase are untested, or hard to test through their current interface?
61
+
62
+ Apply the **deletion test** to anything you suspect is shallow.
63
+
64
+ ### 2. Module Depth score
65
+
66
+ For each candidate module, assign a **Module Depth score** (1–5, Ousterhout):
67
+
68
+ | Score | Meaning |
69
+ |-------|---------|
70
+ | 1 | Shallow — interface complexity ≈ implementation |
71
+ | 3 | Balanced |
72
+ | 5 | Deep — small interface, substantial hidden behavior |
73
+
74
+ Include the score in each candidate row. Prioritize score ≤ 2 for deepening.
75
+
76
+ ### 3. Present candidates
77
+
78
+ Present a numbered list of deepening opportunities. For each candidate:
79
+
80
+ - **Files** — which files/modules are involved
81
+ - **Problem** — why the current architecture is causing friction
82
+ - **Solution** — plain English description of what would change
83
+ - **Benefits** — explained in terms of locality and leverage, and how tests would improve
84
+
85
+ **Use `specs/tech-architecture/tech-stack.md` vocabulary for the domain, and [LANGUAGE.md](LANGUAGE.md) vocabulary for the architecture.**
86
+
87
+ **ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly. Don't list every theoretical refactor an ADR forbids.
88
+
89
+ Do NOT propose interfaces yet. Ask the user: "Which of these would you like to explore?"
90
+
91
+ ### 4. Grilling loop
92
+
93
+ Once the user picks a candidate, drop into a grilling conversation. Walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.
94
+
95
+ Side effects happen inline as decisions crystallize:
96
+
97
+ - **Naming a deepened module after a concept not in `specs/tech-architecture/tech-stack.md`?** Add the term to `specs/tech-architecture/tech-stack.md` — same discipline as `model-domain` (see [CONTEXT-FORMAT.md](../model-domain/CONTEXT-FORMAT.md)). Create the file lazily if it doesn't exist.
98
+ - **Sharpening a fuzzy term during the conversation?** Update `specs/tech-architecture/tech-stack.md` right there.
99
+ - **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _"Want me to record this as an ADR so future architecture reviews don't re-suggest it?"_ Only offer when the reason would actually be needed by a future explorer. See [ADR-FORMAT.md](../model-domain/ADR-FORMAT.md).
100
+ - **Want to explore alternative interfaces for the deepened module?** See [INTERFACE-DESIGN.md](INTERFACE-DESIGN.md).
101
+
102
+ ### 5. Import-boundary hygiene (e45s14)
103
+
104
+ When a deepening move **splits or merges modules**, update `specs/import-boundaries.json` (Playwright `DEPS.list` pattern) — declare which `scripts/lib/*.sh` files may `source` which peers. CI enforces via:
105
+
106
+ ```bash
107
+ bash scripts/check-import-boundaries.sh
108
+ ```
109
+
110
+ Run the check before proposing cross-module `source` edges. Convention docs alone do not authorize new imports; the allowlist must list them.
111
+
112
+ ## Verify
113
+
114
+ → verify: `test -f specs/import-boundaries.json && bash scripts/check-import-boundaries.sh`
115
+
116
+
117
+
118
+ <!-- story: e07s02 -->
119
+
120
+ ---
121
+
122
+ # Deepening
123
+
124
+ How to deepen a cluster of shallow modules safely, given its dependencies. Assumes the vocabulary in [LANGUAGE.md](LANGUAGE.md) — **module**, **interface**, **seam**, **adapter**.
125
+
126
+ ## Dependency categories
127
+
128
+ When assessing a candidate for deepening, classify its dependencies. The category determines how the deepened module is tested across its seam.
129
+
130
+ ### 1. In-process
131
+
132
+ Pure computation, in-memory state, no I/O. Always deepenable — merge the modules and test through the new interface directly. No adapter needed.
133
+
134
+ ### 2. Local-substitutable
135
+
136
+ Dependencies that have local test stand-ins (PGLite for Postgres, in-memory filesystem). Deepenable if the stand-in exists. The deepened module is tested with the stand-in running in the test suite. The seam is internal; no port at the module's external interface.
137
+
138
+ ### 3. Remote but owned (Ports & Adapters)
139
+
140
+ Your own services across a network boundary (microservices, internal APIs). Define a **port** (interface) at the seam. The deep module owns the logic; the transport is injected as an **adapter**. Tests use an in-memory adapter. Production uses an HTTP/gRPC/queue adapter.
141
+
142
+ Recommendation shape: *"Define a port at the seam, implement an HTTP adapter for production and an in-memory adapter for testing, so the logic sits in one deep module even though it's deployed across a network."*
143
+
144
+ ### 4. True external (Mock)
145
+
146
+ Third-party services (Stripe, Twilio, etc.) you don't control. The deepened module takes the external dependency as an injected port; tests provide a mock adapter.
147
+
148
+ ## Seam discipline
149
+
150
+ - **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a port unless at least two adapters are justified (typically production + test). A single-adapter seam is just indirection.
151
+ - **Internal seams vs external seams.** A deep module can have internal seams (private to its implementation, used by its own tests) as well as the external seam at its interface. Don't expose internal seams through the interface just because tests use them.
152
+
153
+ ## Testing strategy: replace, don't layer
154
+
155
+ - Old unit tests on shallow modules become waste once tests at the deepened module's interface exist — delete them.
156
+ - Write new tests at the deepened module's interface. The **interface is the test surface**.
157
+ - Tests assert on observable outcomes through the interface, not internal state.
158
+ - Tests should survive internal refactors — they describe behaviour, not implementation. If a test has to change when the implementation changes, it's testing past the interface.
159
+
160
+ ---
161
+
162
+ # Interface Design
163
+
164
+ When the user wants to explore alternative interfaces for a chosen deepening candidate, use this parallel sub-agent pattern. Based on "Design It Twice" (Ousterhout) — your first idea is unlikely to be the best.
165
+
166
+ Uses the vocabulary in [LANGUAGE.md](LANGUAGE.md) — **module**, **interface**, **seam**, **adapter**, **leverage**.
167
+
168
+ ## Process
169
+
170
+ ### 1. Frame the problem space
171
+
172
+ Before spawning sub-agents, write a user-facing explanation of the problem space for the chosen candidate:
173
+
174
+ - The constraints any new interface would need to satisfy
175
+ - The dependencies it would rely on, and which category they fall into (see [DEEPENING.md](DEEPENING.md))
176
+ - A rough illustrative code sketch to ground the constraints — not a proposal, just a way to make the constraints concrete
177
+
178
+ Show this to the user, then immediately proceed to Step 2. The user reads and thinks while the sub-agents work in parallel.
179
+
180
+ ### 2. Spawn sub-agents
181
+
182
+ Spawn 3+ sub-agents in parallel using the Agent tool. Each must produce a **radically different** interface for the deepened module.
183
+
184
+ Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:
185
+
186
+ - Agent 1: "Minimize the interface — aim for 1–3 entry points max. Maximise leverage per entry point."
187
+ - Agent 2: "Maximise flexibility — support many use cases and extension."
188
+ - Agent 3: "Optimise for the most common caller — make the default case trivial."
189
+ - Agent 4 (if applicable): "Design around ports & adapters for cross-seam dependencies."
190
+
191
+ Include both [LANGUAGE.md](LANGUAGE.md) vocabulary and CONTEXT.md vocabulary in the brief so each sub-agent names things consistently with the architecture language and the project's domain language.
192
+
193
+ Each sub-agent outputs:
194
+
195
+ 1. Interface (types, methods, params — plus invariants, ordering, error modes)
196
+ 2. Usage example showing how callers use it
197
+ 3. What the implementation hides behind the seam
198
+ 4. Dependency strategy and adapters (see [DEEPENING.md](DEEPENING.md))
199
+ 5. Trade-offs — where leverage is high, where it's thin
200
+
201
+ ### 3. Present and compare
202
+
203
+ Present designs sequentially so the user can absorb each one, then compare them in prose. Contrast by **depth** (leverage at the interface), **locality** (where change concentrates), and **seam placement**.
204
+
205
+ After comparing, give your own recommendation: which design you think is strongest and why. If elements from different designs would combine well, propose a hybrid. Be opinionated — the user wants a strong read, not a menu.
206
+
207
+ ---
208
+
209
+ # Language
210
+
211
+ Shared vocabulary for every suggestion this skill makes. Use these terms exactly — don't substitute "component," "service," "API," or "boundary." Consistent language is the whole point.
212
+
213
+ ## Terms
214
+
215
+ **Module**
216
+ Anything with an interface and an implementation. Deliberately scale-agnostic — applies equally to a function, class, package, or tier-spanning slice.
217
+ _Avoid_: unit, component, service.
218
+
219
+ **Interface**
220
+ Everything a caller must know to use the module correctly. Includes the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics.
221
+ _Avoid_: API, signature (too narrow — those refer only to the type-level surface).
222
+
223
+ **Implementation**
224
+ What's inside a module — its body of code. Distinct from **Adapter**: a thing can be a small adapter with a large implementation (a Postgres repo) or a large adapter with a small implementation (an in-memory fake). Reach for "adapter" when the seam is the topic; "implementation" otherwise.
225
+
226
+ **Depth**
227
+ Leverage at the interface — the amount of behaviour a caller (or test) can exercise per unit of interface they have to learn. A module is **deep** when a large amount of behaviour sits behind a small interface. A module is **shallow** when the interface is nearly as complex as the implementation.
228
+
229
+ **Seam** _(from Michael Feathers)_
230
+ A place where you can alter behaviour without editing in that place. The *location* at which a module's interface lives. Choosing where to put the seam is its own design decision, distinct from what goes behind it.
231
+ _Avoid_: boundary (overloaded with DDD's bounded context).
232
+
233
+ **Adapter**
234
+ A concrete thing that satisfies an interface at a seam. Describes *role* (what slot it fills), not substance (what's inside).
235
+
236
+ **Leverage**
237
+ What callers get from depth. More capability per unit of interface they have to learn. One implementation pays back across N call sites and M tests.
238
+
239
+ **Locality**
240
+ What maintainers get from depth. Change, bugs, knowledge, and verification concentrate at one place rather than spreading across callers. Fix once, fixed everywhere.
241
+
242
+ ## Principles
243
+
244
+ - **Depth is a property of the interface, not the implementation.** A deep module can be internally composed of small, mockable, swappable parts — they just aren't part of the interface. A module can have **internal seams** (private to its implementation, used by its own tests) as well as the **external seam** at its interface.
245
+ - **The deletion test.** Imagine deleting the module. If complexity vanishes, the module wasn't hiding anything (it was a pass-through). If complexity reappears across N callers, the module was earning its keep.
246
+ - **The interface is the test surface.** Callers and tests cross the same seam. If you want to test *past* the interface, the module is probably the wrong shape.
247
+ - **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a seam unless something actually varies across it.
248
+
249
+ ## Relationships
250
+
251
+ - A **Module** has exactly one **Interface** (the surface it presents to callers and tests).
252
+ - **Depth** is a property of a **Module**, measured against its **Interface**.
253
+ - A **Seam** is where a **Module**'s **Interface** lives.
254
+ - An **Adapter** sits at a **Seam** and satisfies the **Interface**.
255
+ - **Depth** produces **Leverage** for callers and **Locality** for maintainers.
256
+
257
+ ## Rejected framings
258
+
259
+ - **Depth as ratio of implementation-lines to interface-lines** (Ousterhout): rewards padding the implementation. We use depth-as-leverage instead.
260
+ - **"Interface" as the TypeScript `interface` keyword or a class's public methods**: too narrow — interface here includes every fact a caller must know.
261
+ - **"Boundary"**: overloaded with DDD's bounded context. Say **seam** or **interface**.
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: define-language
3
+ model: sonnet
4
+ description: "Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms. Saves to specs/UBIQUITOUS_LANGUAGE_LATEST.md. Use when user wants to define domain terms, build a glossary, harden terminology, create a ubiquitous language, or mentions \"domain model\" or \"DDD\"."
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Define Language
9
+
10
+ Extract and formalize domain terminology from the current conversation into a consistent glossary, saved to `specs/UBIQUITOUS_LANGUAGE_LATEST.md`.
11
+
12
+ **Distinct from `model-domain` and `deepen-architecture`:** Use this skill to produce a canonical glossary of terms (words and definitions). Use `model-domain` to stress-test a plan through an interview that resolves domain model decisions. Use `deepen-architecture` to find module-level refactoring opportunities in the codebase.
13
+
14
+ > **HARD GATE** — Ubiquitous language is NOT optional. Every term in the domain that could be misunderstood must be glossed. Ambiguity = rework.
15
+
16
+ ## Process
17
+
18
+ 1. **Scan the conversation** for domain-relevant nouns, verbs, and concepts
19
+ 2. **Identify problems**:
20
+ - Same word used for different concepts (ambiguity)
21
+ - Different words used for the same concept (synonyms)
22
+ - Vague or overloaded terms
23
+ 3. **Propose a canonical glossary** with opinionated term choices
24
+ 4. **Write to `specs/UBIQUITOUS_LANGUAGE_LATEST.md`** in the working directory using the format below
25
+ 5. **Output a summary** inline in the conversation
26
+
27
+ ## Output Format
28
+
29
+ Write a `specs/UBIQUITOUS_LANGUAGE_LATEST.md` file with this structure:
30
+
31
+ ```md
32
+ # Ubiquitous Language
33
+
34
+ ## Order lifecycle
35
+
36
+ | Term | Definition | Aliases to avoid |
37
+ | ----------- | ------------------------------------------------------- | --------------------- |
38
+ | **Order** | A customer's request to purchase one or more items | Purchase, transaction |
39
+ | **Invoice** | A request for payment sent to a customer after delivery | Bill, payment request |
40
+
41
+ ## People
42
+
43
+ | Term | Definition | Aliases to avoid |
44
+ | ------------ | ------------------------------------------- | ---------------------- |
45
+ | **Customer** | A person or organization that places orders | Client, buyer, account |
46
+ | **User** | An authentication identity in the system | Login, account |
47
+
48
+ ## Relationships
49
+
50
+ - An **Invoice** belongs to exactly one **Customer**
51
+ - An **Order** produces one or more **Invoices**
52
+
53
+ ## Example dialogue
54
+
55
+ > **Dev:** "When a **Customer** places an **Order**, do we create the **Invoice** immediately?"
56
+ > **Domain expert:** "No — an **Invoice** is only generated once a **Fulfillment** is confirmed."
57
+
58
+ ## Flagged ambiguities
59
+
60
+ - "account" was used to mean both **Customer** and **User** — these are distinct concepts.
61
+ ```
62
+
63
+ ## Rules
64
+
65
+ - **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others as aliases to avoid.
66
+ - **Flag conflicts explicitly.** If a term is used ambiguously, call it out in "Flagged ambiguities" with a clear recommendation.
67
+ - **Only include terms relevant for domain experts.** Skip names of modules or classes unless they have domain meaning.
68
+ - **Keep definitions tight.** One sentence max. Define what it IS, not what it does.
69
+ - **Show relationships.** Use bold term names and express cardinality where obvious.
70
+ - **Group terms into multiple tables** when natural clusters emerge. One table is fine if terms are cohesive.
71
+ - **Write an example dialogue.** 3–5 exchanges between a dev and domain expert showing terms used precisely.
72
+
73
+ ## Re-running
74
+
75
+ When invoked again in the same conversation:
76
+
77
+ 1. Read the existing `specs/UBIQUITOUS_LANGUAGE_LATEST.md`
78
+ 2. Incorporate any new terms from subsequent discussion
79
+ 3. Update definitions if understanding has evolved
80
+ 4. Re-flag any new ambiguities
81
+ 5. Rewrite the example dialogue to incorporate new terms
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: define-success
3
+ model: haiku
4
+ description: "TOMBSTONE — renamed/merged to plan-work. This stub resolves for one release then is removed."
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # define-success (tombstoned)
9
+
10
+ This skill has been renamed or merged into `plan-work`. Use `plan-work` instead.
11
+
12
+ This stub exists for one release as a transition aid, then is removed once
13
+ `scripts/validate-tombstones.sh` flags it as expired.
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: delegate-task
3
+ model: sonnet
4
+ description: "Delegate one complex task to a single subagent, review its work in two stages before merging back. Sequential — one agent at a time, with oversight. Use when a task is complex and requires careful review before the result is accepted. Distinct from dispatch-agents (no parallelism here; reviewer sees full diff before proceeding)."
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # story: e45s30
9
+
10
+ # Delegate Task
11
+ > **HARD GATE** — **HARD GATE** — Delegated work must have clear success criteria and verification commands. The delegate must be able to verify completion independently.
12
+
13
+
14
+ Delegate a single complex task to a subagent with a two-stage review gate before accepting the result. Use when oversight of a single task matters more than speed.
15
+
16
+ **Distinct from `dispatch-agents`:** This skill runs one subagent sequentially with a mandatory review. `dispatch-agents` runs multiple subagents in parallel without inter-task review gates.
17
+
18
+ ## Subagent depth tiers (e45s30)
19
+
20
+ Select brief depth from task `risk:` and skill `effort:` before spawning:
21
+
22
+ | Tier | When | Brief includes |
23
+ |------|------|----------------|
24
+ | `full_maturity` | P0 stories, multi-file refactors, security work | Full template + CONVENTIONS excerpts + threat model if present |
25
+ | `standard` | Default implementation tasks | Goal, scope, out-of-bounds, constraints, verify, prior decisions |
26
+ | `minimal_decisive` | Light probes, read-only audits | Goal, verify, explicit file list (≤15 lines total) |
27
+
28
+ State `depth: <tier>` in the Agent tool description field.
29
+
30
+ ## Process
31
+
32
+ ### 1. Define the task
33
+
34
+ Before spawning the agent, read `specs/state.yaml` if it exists. Then write a minimal self-contained brief using this template (brief size directly controls token cost and hallucination risk — do not pad):
35
+
36
+ ```
37
+ Goal: [one sentence — specific, measurable outcome]
38
+ In scope: [explicit file or module list]
39
+ Out of bounds: [what NOT to do]
40
+ Constraints: [relevant CONVENTIONS.md rules, existing patterns, test requirements]
41
+ Verify: [runnable command]
42
+ Prior decisions: [relevant entries from specs/state.yaml — omit section if none apply]
43
+ ```
44
+
45
+ Do not include full file contents, full conversation history, or decisions unrelated to this task.
46
+
47
+ ### 2. Spawn the subagent (iterative retrieval, max 3 cycles)
48
+
49
+ Use the Agent tool with a **fresh context** per spawn. Pass prior decisions only via `specs/state.yaml`.
50
+
51
+ **Cycle:** dispatch → evaluate output vs goal → refine brief → re-spawn if needed (max 3 cycles).
52
+
53
+ Include in each brief:
54
+ - All context the agent needs (it starts cold — no shared state)
55
+ - Reference to CONVENTIONS.md constraints
56
+ - The verify command it must run before reporting done
57
+
58
+ ### 3. Stage 1 review — output inspection
59
+
60
+ When the subagent returns, review its report before looking at the diff:
61
+ - Did it run the verify command? Did it pass?
62
+ - Does it explain what it changed and why?
63
+ - Are there any concerns raised by the agent?
64
+
65
+ If the report raises red flags, ask the subagent for clarification or re-run with adjusted instructions.
66
+
67
+ ### 4. Stage 2 review — diff inspection
68
+
69
+ Inspect the actual diff:
70
+ ```bash
71
+ git diff main...HEAD
72
+ ```
73
+
74
+ Check:
75
+ - [ ] Changes are scoped to what was asked — nothing extra
76
+ - [ ] No `any`, no `@ts-ignore`, no disabled lint rules
77
+ - [ ] Tests added for new behavior
78
+ - [ ] CONVENTIONS.md compliance (naming, structure, no gh issue creation)
79
+ - [ ] Boy Scout Rule: touched areas are cleaner than before
80
+
81
+ ### 5. Decision
82
+
83
+ - **Accept**: merge the result into the main working branch
84
+ - **Revise**: send back to the subagent with specific feedback
85
+ - **Reject**: discard and re-approach differently
86
+
87
+ **After accepting**, append to `specs/state.yaml` under `## Active Decisions`:
88
+ ```
89
+ **[task short name]**: [what approach the agent chose and why — one sentence]
90
+ ```
91
+
92
+ Report the decision and rationale to the user.
@@ -0,0 +1,199 @@
1
+ ---
2
+ name: deploy
3
+ model: sonnet
4
+ description: "Build → verify artifact → deploy → wait → smoke deployment pipeline. Platform-agnostic (MCP or CLI), with configurable timeout, retry with exponential backoff, and integrated health-check. The deploy half of CI/CD: run after build to push to production."
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Deploy
9
+
10
+ > **HARD GATE** — Do not deploy without running tests first. Run `test` or your CI suite before this skill.
11
+ >
12
+ > **HARD GATE** — Use this skill from a CI/CD pipeline or post-merge on `main`/`master`. Never deploy from a feature branch.
13
+ >
14
+ > **HARD GATE** — The deploy skill orchestrates deployment; the `smoke-test` skill validates post-deploy health. Chain them: `deploy → smoke-test`.
15
+
16
+ Orchestrate a full build-to-deployment pipeline: build the artifact, verify it exists and is non-empty, invoke a platform deploy tool (MCP or CLI), poll until the deploy completes or times out, then run a baseline smoke test against the live URL.
17
+
18
+ ## Pipeline Stages
19
+
20
+ ```
21
+ build → verify artifact → deploy → wait/retry → smoke
22
+ ```
23
+
24
+ | Stage | Description | Failure mode |
25
+ |-------|-------------|-------------|
26
+ | Build | Execute the project's build command | Non-zero exit: report build error |
27
+ | Verify | Check artifact exists and is non-empty | Missing/empty: report artifact path |
28
+ | Deploy | Invoke platform deploy tool (MCP, Vercel CLI, rsync, etc.) | Non-zero exit: report deploy error |
29
+ | Wait | Poll deploy status every 30s up to `DEPLOY_TIMEOUT` (default 5 min) | Timeout: report exceeded |
30
+ | Smoke | `curl -sSf $DEPLOY_URL` as baseline health check | Non-200: report failure |
31
+
32
+ ## Process
33
+
34
+ ### 1. Detect build command
35
+
36
+ Read project manifest files in order to determine the build command:
37
+
38
+ | Manifest | Build command |
39
+ |----------|--------------|
40
+ | `package.json` | `npm run build` (or `scripts.build` value) |
41
+ | `Cargo.toml` | `cargo build --release` |
42
+ | `pyproject.toml` / `setup.py` | Depends on build backend (`poetry build`, `pip install -e .`, etc.) |
43
+ | `Makefile` | `make build` or first target named `build` |
44
+ | `AGENTS.md` / `CLAUDE.md` | Look for `build:` in project commands section |
45
+
46
+ If no manifest is found, prompt the user with: "No detected build command. Pass `--build 'npm run build'` or specify the command."
47
+
48
+ ### 2. Build the artifact
49
+
50
+ ```bash
51
+ npm run build
52
+ ```
53
+
54
+ Or the detected command from step 1. If the build fails, exit non-zero and report the build output.
55
+
56
+ ### 3. Verify the artifact
57
+
58
+ ```bash
59
+ ARTIFACT_DIR="${ARTIFACT_DIR:-dist}"
60
+ if [ ! -d "$ARTIFACT_DIR" ] || [ -z "$(ls -A "$ARTIFACT_DIR" 2>/dev/null)" ]; then
61
+ echo "FAIL: build artifact not found at $ARTIFACT_DIR"
62
+ exit 1
63
+ fi
64
+ ```
65
+
66
+ Configurable via `$ARTIFACT_DIR` environment variable (default: `dist/`).
67
+
68
+ ### 4. Deploy to platform
69
+
70
+ Platform-agnostic — supports multiple deployment targets via environment variables:
71
+
72
+ | Platform | Env var | Example |
73
+ |----------|---------|---------|
74
+ | Vercel | `VERCEL_TOKEN`, `VERCEL_PROJECT_ID` | `vercel deploy --prod --token $VERCEL_TOKEN` |
75
+ | Netlify | `NETLIFY_AUTH_TOKEN`, `NETLIFY_SITE_ID` | `netlify deploy --prod --auth $NETLIFY_AUTH_TOKEN --dir $ARTIFACT_DIR` |
76
+ | Platform MCP | MCP tool call | `mcp deploy` via your platform MCP server |
77
+ | rsync/SSH | `DEPLOY_SSH_USER`, `DEPLOY_SSH_HOST`, `DEPLOY_SSH_PATH` | `rsync -avz $ARTIFACT_DIR/ $DEPLOY_SSH_USER@$DEPLOY_SSH_HOST:$DEPLOY_SSH_PATH` |
78
+ | Custom | `DEPLOY_COMMAND` | Run any deploy command string |
79
+
80
+ The deploy tool is selected by which environment variables are set. If none are configured:
81
+
82
+ ```bash
83
+ echo "No deploy target configured. Set one of: VERCEL_TOKEN, NETLIFY_AUTH_TOKEN, DEPLOY_SSH_USER+DEPLOY_SSH_HOST, DEPLOY_COMMAND, or MCP deploy tool."
84
+ exit 1
85
+ ```
86
+
87
+ ### 5. Wait and poll status
88
+
89
+ After invoking the deploy command, poll for completion:
90
+
91
+ See [REFERENCE.md](REFERENCE.md)
92
+
93
+ Use exponential backoff for retries on transient failures:
94
+
95
+ See [REFERENCE.md](REFERENCE.md)
96
+
97
+ ### 6. Baseline smoke test
98
+
99
+ See [REFERENCE.md](REFERENCE.md)
100
+
101
+ For comprehensive health-checking, chain to the `smoke-test` skill:
102
+
103
+ ```bash
104
+ # After deploy success
105
+ bash scripts/run-smoke.sh "$DEPLOY_URL"
106
+ ```
107
+
108
+ ### 7. Three-independent-facts verification (e45s15)
109
+
110
+ Before declaring deploy success, verify **three independent facts** — build artifact, platform accept, live/registry reachability. See [REFERENCE.md](REFERENCE.md#three-independent-facts).
111
+
112
+ ## Verify
113
+
114
+ → verify: `command -v curl >/dev/null 2>&1 && test -f skills/smoke-test/SKILL.md`
115
+
116
+ ---
117
+
118
+ # Deploy — Reference
119
+
120
+ ## Configuration
121
+
122
+ | Variable | Default | Description |
123
+ |----------|---------|-------------|
124
+ | `ARTIFACT_DIR` | `dist` | Build output directory |
125
+ | `DEPLOY_URL` | *(required)* | Live URL for smoke test |
126
+ | `DEPLOY_TIMEOUT` | `300` | Max wait for deploy completion (seconds) |
127
+ | `DEPLOY_POLL_INTERVAL` | `30` | Polling interval (seconds) |
128
+ | `RETRY_MAX` | `3` | Max deploy retry attempts |
129
+ | `BUILD_COMMAND` | *(auto-detect)* | Override build command |
130
+
131
+
132
+ ---
133
+
134
+ ## Verification
135
+
136
+ → verify: `test -f deploy/SKILL.md && grep -q 'name: deploy' deploy/SKILL.md && echo OK`
137
+ → verify: `grep -qi 'build\|artifact\|deploy\|smoke' deploy/SKILL.md && echo OK`
138
+ → verify: `grep -ci 'package.json\|Cargo.toml\|Makefile\|manifest' deploy/SKILL.md | awk '{if($1>=1) print "OK"; else print "FAIL"}'`
139
+ → verify: `grep -ci 'timeout\|poll\|status\|retry\|backoff' deploy/SKILL.md | awk '{if($1>=2) print "OK"; else print "FAIL"}'`
140
+ → verify: `grep -q 'curl.*DEPLOY_URL\|smoke\|health' deploy/SKILL.md && echo OK`
141
+
142
+ ---
143
+
144
+ ## Reference block 1
145
+
146
+ ```bash
147
+ DEPLOY_TIMEOUT="${DEPLOY_TIMEOUT:-300}" # seconds (default 5 minutes)
148
+ DEPLOY_POLL_INTERVAL="${DEPLOY_POLL_INTERVAL:-30}" # seconds
149
+
150
+ start_time=$(date +%s)
151
+ while true; do
152
+ elapsed=$(( $(date +%s) - start_time ))
153
+ if [ "$elapsed" -ge "$DEPLOY_TIMEOUT" ]; then
154
+ echo "FAIL: deploy status polling timed out after ${DEPLOY_TIMEOUT}s"
155
+ exit 1
156
+ fi
157
+
158
+ status=$(get_deploy_status) # platform-specific status check
159
+ if [ "$status" = "ready" ] || [ "$status" = "done" ]; then
160
+ echo "Deploy completed in ${elapsed}s"
161
+ break
162
+ fi
163
+
164
+ sleep "$DEPLOY_POLL_INTERVAL"
165
+ done
166
+ ```
167
+
168
+ ---
169
+
170
+ ## Reference block 2
171
+
172
+ ```bash
173
+ RETRY_MAX="${RETRY_MAX:-3}"
174
+ base_delay=2
175
+ for attempt in $(seq 1 "$RETRY_MAX"); do
176
+ if deploy_command; then
177
+ break
178
+ fi
179
+ if [ "$attempt" -eq "$RETRY_MAX" ]; then
180
+ echo "FAIL: deploy failed after ${RETRY_MAX} attempts"
181
+ exit 1
182
+ fi
183
+ sleep $(( base_delay * 2 ** (attempt - 1) ))
184
+ done
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Reference block 3
190
+
191
+ ```bash
192
+ DEPLOY_URL="${DEPLOY_URL:?DEPLOY_URL must be set}"
193
+ if curl -sSf "$DEPLOY_URL" > /dev/null 2>&1; then
194
+ echo "OK: $DEPLOY_URL responds with HTTP 200"
195
+ else
196
+ echo "FAIL: $DEPLOY_URL is not responding with HTTP 200"
197
+ exit 1
198
+ fi
199
+ ```