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,109 @@
1
+ ---
2
+ name: grill-me
3
+ model: sonnet
4
+ description: "Interactive assumption-surfacing Q&A that stress-tests a plan through relentless questioning until every decision is resolved. Use when user wants to challenge a plan, validate decisions from conversation/context, or mentions \"grill me\". For doc-grounded variant, use grill-with-docs."
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Grill Me
9
+
10
+ > **Use this vs grill-with-docs:** `grill-me` surfaces assumptions from the conversation and context alone — no documentation fetching. Use `grill-with-docs` (the doc-grounded variant) when the plan relies on a specific library or external API and every challenge must cite a real doc URL.
11
+
12
+ Two modes. Default is **Design**. Switch to **Docs** by saying "grill me with docs" or when the plan relies on a specific library or external API.
13
+
14
+ > **HARD GATE** — Do NOT accept a design until every hard decision has been stress-tested. "Seems right" is not a decision. Grilling must identify and resolve tensions before build begins.
15
+
16
+ ## Design mode (default)
17
+
18
+ Interview relentlessly about every aspect of this plan until reaching shared understanding. Walk each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer. Ask one question at a time.
19
+
20
+ If a question can be answered by exploring the codebase, explore it instead.
21
+
22
+ ### Facts vs. Decisions Boundary
23
+
24
+ Distinguish between **facts** and **decisions**:
25
+ - **Facts** — things discoverable by exploring the codebase, reading docs, or checking APIs. Do not ask the user to confirm facts; find them yourself.
26
+ - **Decisions** — choices that require user input (trade-offs, preferences, priorities). Always present options and ask the user to choose.
27
+
28
+ Never "grill yourself" — if the answer is in the code, go find it. Only ask questions where the user's judgment is needed.
29
+
30
+ ## Docs mode
31
+
32
+ Ground every challenge in real documentation — no assumption about a library's behavior goes unchecked. See [REFERENCE.md](REFERENCE.md) for the full process.
33
+
34
+ Short form:
35
+ 1. List every external library, third-party API, and framework behavior relied upon.
36
+ 2. Fetch the actual docs for each (`WebFetch` the official API reference).
37
+ 3. Challenge each plan assumption against the real docs: correct method signature? right version? deprecated?
38
+ 4. Report confirmed ✓, corrected ✗ (with the real behavior), and uncertain → `spike-prototype`.
39
+ 5. Update the plan for each confirmed discrepancy.
40
+
41
+ ## Confirmation Gate
42
+
43
+ > **HARD GATE** — Do NOT enact the plan or generate specifications until the user explicitly confirms shared understanding. Wait for explicit approval (e.g., "looks good", "confirmed", "proceed") before transitioning to any implementation, spec-writing, or task-slicing step.
44
+
45
+ ---
46
+
47
+ # Docs Mode — Full Process
48
+
49
+ Triggered by "grill me with docs" or when a plan depends on a specific library or external API.
50
+
51
+ **Why this matters:** AI agents hallucinate API methods, argument orders, and behaviors. Every assumption about an external dependency must be validated against the actual docs before code is written.
52
+
53
+ ## Step 1 — Identify the dependencies
54
+
55
+ From the plan or conversation, list:
56
+ - Every external library being used
57
+ - Every third-party API being called
58
+ - Every framework behavior being relied upon
59
+
60
+ Ask: "Which of these are you most confident about? Which are you less sure of?"
61
+
62
+ ## Step 2 — Fetch the relevant docs
63
+
64
+ For each dependency, fetch the actual documentation:
65
+
66
+ ```
67
+ WebFetch the official docs for [library/API]
68
+ ```
69
+
70
+ Prioritize:
71
+ - The API reference for the specific method being used
72
+ - The changelog for the version in use (breaking changes)
73
+ - Migration guides if upgrading from a previous version
74
+ - Known gotchas / FAQ sections
75
+
76
+ ## Step 3 — Challenge each assumption
77
+
78
+ For every assumption in the plan, find the corresponding doc section and ask:
79
+
80
+ - "Does the real API actually work this way? Show me the doc."
81
+ - "Is this method available in the version you're using?"
82
+ - "Does this argument order match the actual signature?"
83
+ - "Are there rate limits, quotas, or timeout behaviors that affect this design?"
84
+ - "Is this marked as deprecated in the current version?"
85
+
86
+ Ask one question at a time. For each challenge, cite the specific URL and section.
87
+
88
+ ## Step 4 — Surface hallucinations
89
+
90
+ When an assumption doesn't match the docs:
91
+
92
+ > "Your plan uses `library.doThing(a, b)` but the [docs](https://example.com/api-reference) show the signature is `doThing(config: {a, b})` with a config object. This will fail at runtime."
93
+
94
+ Document each discrepancy clearly.
95
+
96
+ ## Step 5 — Update the plan
97
+
98
+ For each confirmed discrepancy, recommend a concrete fix:
99
+ - Correct method signature
100
+ - Correct argument order
101
+ - Alternative approach that matches what the library actually supports
102
+ - Whether a spike (`spike-prototype`) is needed to validate a remaining uncertainty
103
+
104
+ ## Step 6 — Sign off
105
+
106
+ When all major assumptions have been validated against docs, report:
107
+ - Which assumptions were confirmed ✓
108
+ - Which were corrected ✗ + what the correct approach is
109
+ - Which remain uncertain → recommend `spike-prototype`
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: grill-with-docs
3
+ model: opus
4
+ description: "Doc-grounded variant of grill-me — stress-tests plan assumptions by fetching and citing real library or API documentation. Every challenge must cite a real URL. Use when the plan depends on a specific library or external API."
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Grill With Docs
9
+
10
+ > **Use this vs grill-me:** `grill-with-docs` is the doc-grounded variant of `grill-me`. Use it when the plan relies on external libraries or APIs and every challenge must be grounded in and cite a real documentation URL. Use `grill-me` for context-only assumption surfacing without fetching docs.
11
+
12
+ > **HARD GATE** — Every challenge must cite a real documentation URL. No hallucinated APIs.
13
+
14
+ ## Process
15
+
16
+ 1. Read the plan or design under test (`specs/release-plan.yaml + epic shards`, INTERFACE-OPTIONS.md, etc.).
17
+ 2. List assumptions that depend on external libraries or APIs.
18
+ 3. For each assumption: fetch or quote official docs; challenge with "docs say X, plan says Y."
19
+ 4. Resolve or update the plan inline; unresolved items block `plan-work`.
20
+
21
+ ## Docs mode rules
22
+
23
+ - Cite URL + quoted snippet (method name, parameter, version).
24
+ - If docs contradict the plan, plan loses until updated.
25
+ - Prefer official docs over blog posts.
26
+
27
+ ## Facts vs. Decisions Boundary
28
+
29
+ Distinguish between **facts** and **decisions**:
30
+ - **Facts** — things discoverable by reading docs, checking APIs, or exploring the codebase. Do not ask the user to confirm facts; find them yourself.
31
+ - **Decisions** — choices that require user input (trade-offs, preferences, priorities). Always present options and ask the user to choose.
32
+
33
+ Never "grill yourself" — if the answer is in the docs, go fetch it. Only ask questions where the user's judgment is needed.
34
+
35
+ ## Confirmation Gate
36
+
37
+ > **HARD GATE** — Do NOT enact the plan or generate specifications until the user explicitly confirms shared understanding. Wait for explicit approval (e.g., "looks good", "confirmed", "proceed") before transitioning to any implementation, spec-writing, or task-slicing step.
38
+
39
+ ## Verify
40
+
41
+ → verify: `test -f skills/grill-with-docs/SKILL.md && test -f skills/grill-with-docs/REFERENCE.md`
42
+
43
+ See [REFERENCE.md](REFERENCE.md) for question templates.
44
+
45
+
46
+ <!-- story: e03s01 -->
47
+
48
+ ---
49
+
50
+ # Grill With Docs — Question templates
51
+
52
+ - "Docs at [URL] show signature `foo(bar?: Baz)`. Your plan calls `foo(bar, baz)` — which is correct?"
53
+ - "The changelog at [URL] deprecates X in v3. Your plan still uses X — migrate or pin version?"
54
+ - "Error handling in [URL] throws `NetworkError`. Your plan catches `Error` only — is that sufficient?"
@@ -0,0 +1,232 @@
1
+ ---
2
+ name: guard-git
3
+ model: haiku
4
+ description: "Block dangerous git commands (push, force push, reset --hard, clean, branch -D, checkout/restore .) and enforce Conventional Commits & Branch Protection before an AI agent runs them. Installs hook scripts for Claude Code, Cursor, Cursor CLI, and Gemini CLI; documents Google Antigravity Terminal deny lists. Use when the user wants git safety hooks, to block git push or destructive git in agents, or to mirror the same policy across AI coding tools."
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Guard Git
9
+ > **HARD GATE** — **HARD GATE** — Before committing, verify: branch is not main/master, author is correct, git user is configured. Bad commits are hard to fix.
10
+
11
+
12
+ Installs a shared hook that blocks destructive git operations and enforces workflow discipline. **Requires `jq` on the agent's PATH** when the hook runs.
13
+
14
+ ## What gets blocked/enforced
15
+
16
+ - **Safety**: `git push --force`, `git reset --hard`, `git clean -f`, `git branch -D`, `git checkout .`, `git restore .`.
17
+ - **Discipline**: Blocks direct commits or pushes to protected branches (`main`, `master`) unless `GIT_BIGPOWERS_LAND=1` (set only by `scripts/land-branch.sh`).
18
+ - **Allows**: `git push origin <feature-branch>` for backup/CI; solo land push to `main` only inside `land-branch.sh`.
19
+ - **Standardization**: Enforces [Conventional Commits](https://www.conventionalcommits.org/) for all `git commit` commands.
20
+ - **Secrets**: Blocks commits containing common secret patterns (`sk-`, `ghp_`, `AKIA`, `xoxb-`, `-----BEGIN` private keys) — see [REFERENCE.md](REFERENCE.md).
21
+
22
+ ## Quick start
23
+
24
+ 1. **Scope**: ask project-only vs global (paths differ per product).
25
+ 2. **Write the hook bundle** from [REFERENCE.md](REFERENCE.md) into the client's hooks directory.
26
+ 3. **Run `chmod +x`** on `pre-tool-use.sh`.
27
+ 4. **Merge** the hook snippet from [REFERENCE.md](REFERENCE.md) into the right settings file — do not wipe unrelated keys.
28
+ 5. **Verify** with the tests in [REFERENCE.md](REFERENCE.md).
29
+
30
+ | Client | Mechanism | Config |
31
+ |--------|-----------|--------|
32
+ | Claude Code | `PreToolUse` (Bash) | `.claude/settings.json` or `~/.claude/settings.json` |
33
+ | Cursor / Cursor CLI | `beforeShellExecution` | `.cursor/hooks.json` or `~/.cursor/hooks.json` |
34
+ | Gemini CLI | `BeforeTool` + `run_shell_command` | `.gemini/settings.json` or `~/.gemini/settings.json` |
35
+ | Google Antigravity | Built-in Terminal **Deny list** | Settings UI (no shell hook) |
36
+
37
+ **Modes (env on the hook command):** `GIT_GUARDRAILS_MODE` is `claude` (default) or `cursor` → stderr + exit `2` on block. Set `gemini` for Gemini CLI → JSON `decision` on stdout.
38
+
39
+ ## Customization
40
+
41
+ To add or remove patterns or protected branches, edit `pre-tool-use.sh`.
42
+
43
+ ## Advanced
44
+
45
+ Full JSON examples, merge rules, Antigravity deny-list entries, and test commands: [REFERENCE.md](REFERENCE.md).
46
+
47
+
48
+
49
+ <!-- story: e01s03 -->
50
+
51
+ ---
52
+
53
+ # Git guardrails — reference
54
+
55
+ ## Navigation
56
+
57
+ | Lines | Section |
58
+ |-------|---------|
59
+ | 1 | Title |
60
+ | 3–16 | Navigation |
61
+ | 17–28 | Secret patterns (audit + pre-commit) |
62
+ | 29–46 | Copy layout |
63
+ | 47–72 | Claude Code |
64
+ | 73–94 | Cursor and Cursor CLI |
65
+ | 95–122 | Gemini CLI |
66
+ | 123–137 | Google Antigravity |
67
+ | 138–180 | Verify (local tests) |
68
+
69
+ ## Secret patterns (audit + pre-commit)
70
+
71
+ Agents must not commit files containing:
72
+
73
+ - `sk-` (OpenAI API keys)
74
+ - `ghp_` / `gho_` (GitHub tokens)
75
+ - `AKIA` (AWS access key id)
76
+ - `xoxb-` (Slack bot tokens)
77
+ - `-----BEGIN` private keys
78
+
79
+ Use `audit-code` supply-chain checklist before commit. Consider `git-secrets` or custom pre-commit hook in target projects.
80
+
81
+ ## Copy layout
82
+
83
+ The main script is `pre-tool-use.sh`.
84
+
85
+ ```text
86
+ <hooks-dir>/pre-tool-use.sh
87
+ ```
88
+
89
+ Example project locations:
90
+
91
+ - Claude: `.claude/hooks/`
92
+ - Cursor: `.cursor/hooks/`
93
+ - Gemini: `.gemini/hooks/`
94
+
95
+ Use the same layout for user-level hooks (`~/.claude/hooks`, `~/.cursor/hooks`, `~/.gemini/hooks`).
96
+
97
+ ---
98
+
99
+ ## Claude Code
100
+
101
+ Hook command does **not** need `GIT_GUARDRAILS_MODE` (defaults to `claude`).
102
+
103
+ **Project** (`.claude/settings.json`):
104
+
105
+ ```json
106
+ {
107
+ "hooks": {
108
+ "PreToolUse": [
109
+ {
110
+ "matcher": "Bash",
111
+ "hooks": [
112
+ {
113
+ "type": "command",
114
+ "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/pre-tool-use.sh"
115
+ }
116
+ ]
117
+ }
118
+ ]
119
+ }
120
+ }
121
+ ```
122
+
123
+ ---
124
+
125
+ ## Cursor and Cursor CLI
126
+
127
+ Use `beforeShellExecution`. Set `GIT_GUARDRAILS_MODE=cursor`.
128
+
129
+ **Project** (`.cursor/hooks.json`):
130
+
131
+ ```json
132
+ {
133
+ "version": 1,
134
+ "hooks": {
135
+ "beforeShellExecution": [
136
+ {
137
+ "command": "GIT_GUARDRAILS_MODE=cursor .cursor/hooks/pre-tool-use.sh",
138
+ "matcher": "git"
139
+ }
140
+ ]
141
+ }
142
+ }
143
+ ```
144
+
145
+ ---
146
+
147
+ ## Gemini CLI
148
+
149
+ Use `BeforeTool` with matcher `run_shell_command`. Set **`GIT_GUARDRAILS_MODE=gemini`**.
150
+
151
+ **Project** (`.gemini/settings.json`):
152
+
153
+ ```json
154
+ {
155
+ "hooks": {
156
+ "BeforeTool": [
157
+ {
158
+ "matcher": "run_shell_command",
159
+ "hooks": [
160
+ {
161
+ "name": "git-guardrails",
162
+ "type": "command",
163
+ "command": "GIT_GUARDRAILS_MODE=gemini \"$GEMINI_PROJECT_DIR\"/.gemini/hooks/pre-tool-use.sh",
164
+ "timeout": 5000
165
+ }
166
+ ]
167
+ }
168
+ ]
169
+ }
170
+ }
171
+ ```
172
+
173
+ ---
174
+
175
+ ## Google Antigravity
176
+
177
+ Add **Deny list** entries in **Antigravity → Settings → Terminal**:
178
+
179
+ - `git push --force`
180
+ - `git push origin main`
181
+ - `git push origin master`
182
+ - `git reset --hard`
183
+ - `git clean`
184
+ - `git branch -D`
185
+ - `git checkout .`
186
+ - `git restore .`
187
+
188
+ ---
189
+
190
+ ## Verify (local tests)
191
+
192
+ **1. Block push to main without land mode (Claude mode):**
193
+ ```bash
194
+ echo '{"tool_input":{"command":"git push origin main"}}' | ./pre-tool-use.sh
195
+ # Expected: exit 2, protected branch message
196
+ ```
197
+
198
+ **2. Allow push to main with GIT_BIGPOWERS_LAND=1:**
199
+ ```bash
200
+ GIT_BIGPOWERS_LAND=1 echo '{"tool_input":{"command":"git push origin main"}}' | ./pre-tool-use.sh
201
+ # Expected: exit 0 (when on main)
202
+ ```
203
+
204
+ **3. Allow push to feature branch:**
205
+ ```bash
206
+ echo '{"tool_input":{"command":"git push -u origin feat/my-task"}}' | ./pre-tool-use.sh
207
+ # Expected: exit 0
208
+ ```
209
+
210
+ **4. Conventional Commits (Gemini mode):**
211
+ ```bash
212
+ echo '{"tool_input":{"command":"git commit -m \"bad message\""}}' | GIT_GUARDRAILS_MODE=gemini ./pre-tool-use.sh
213
+ # Expected: exit 0, {"decision":"deny", "reason":"..."}
214
+ ```
215
+
216
+ **5. Protected Branch commit (Cursor mode):**
217
+ ```bash
218
+ # Run on 'main' branch
219
+ echo '{"command":"git commit -m \"feat: valid message\""}' | GIT_GUARDRAILS_MODE=cursor ./pre-tool-use.sh
220
+ # Expected: exit 2, "Direct commits to protected branch 'main' are forbidden"
221
+ ```
222
+
223
+ **6. Land script exists:**
224
+ ```bash
225
+ test -x scripts/land-branch.sh && echo OK
226
+ ```
227
+
228
+ **7. Allow (Gemini mode):**
229
+ ```bash
230
+ echo '{"tool_input":{"command":"git status"}}' | GIT_GUARDRAILS_MODE=gemini ./pre-tool-use.sh
231
+ # Expected: exit 0, {"decision":"allow"}
232
+ ```
@@ -0,0 +1,292 @@
1
+ ---
2
+ name: harden-vps
3
+ model: haiku
4
+ description: "Harden a production Linux VPS for your application across three layers — application (systemd hardening, monitoring alerts, backup automation), Ubuntu OS (UFW firewall, fail2ban SSH, unattended-upgrades, SSH hardening), and VPS provider (health checks, daily backups, monthly snapshots). Use when the user wants to secure a production server, harden a VPS, audit server security, or mentions production hardening, VPS security, or harden the server."
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Harden VPS
9
+
10
+ Three-layer production hardening for a self-hosted app on any VPS. Each layer independently verifiable. Apply OS first (firewall blocks attacks immediately), then your application (alerts + backups), then your VPS provider (snapshots). See [REFERENCE.md](REFERENCE.md) for full script bodies, systemd unit template, and gotchas.
11
+
12
+ ## Quick start
13
+
14
+ SSH as root into the VPS. Find credentials in the your VPS provider Customer Control Panel.
15
+
16
+ > **HARD GATE** — Run `ufw status` first. No firewall = layer 1 takes priority over everything.
17
+
18
+ ## Layer 1 — Ubuntu OS
19
+
20
+ ```bash
21
+ # UFW
22
+ ufw default deny incoming && ufw default allow outgoing
23
+ ufw allow 22/tcp && ufw allow 80/tcp && ufw allow 443/tcp && ufw enable
24
+ # → verify: ufw status | grep -q active
25
+
26
+ # fail2ban
27
+ apt install -y fail2ban
28
+ # Configure /etc/fail2ban/jail.local: sshd, maxretry=3, bantime=3600, findtime=600
29
+ systemctl restart fail2ban
30
+ # → verify: fail2ban-client status sshd
31
+
32
+ # unattended-upgrades
33
+ apt install -y unattended-upgrades && dpkg-reconfigure -plow unattended-upgrades
34
+ # → verify: systemctl is-active unattended-upgrades | grep -q active
35
+
36
+ # SSH: PermitRootLogin no, PasswordAuthentication no, PubkeyAuthentication yes
37
+ # → verify: sshd -T | grep -E 'permitrootlogin no|passwordauthentication no'
38
+
39
+ # Deploy healthcheck.sh → /opt/your-app/scripts/healthcheck.sh
40
+ # Crontab: */5 * * * * /opt/your-app/scripts/healthcheck.sh
41
+ ```
42
+
43
+ ## Layer 2 — applicationlication
44
+
45
+ ```bash
46
+ # systemd: User=your-app, NoNewPrivileges=yes, ProtectSystem=full,
47
+ # ProtectKernelTunables=yes, ProtectKernelModules=yes,
48
+ # ProtectControlGroups=yes, RestrictAddressFamilies=AF_INET AF_INET6,
49
+ # RestrictRealtime=yes, PrivateTmp=yes, LimitNOFILE=65536
50
+ # → verify: systemctl show your-app -p NoNewPrivileges -p ProtectSystem -p User
51
+
52
+ # Alerts (your application requires auth; insert via SQLite)
53
+ sqlite3 /opt/your-app/data/your-app.db "
54
+ INSERT INTO monitoring_alerts (id,name,metric,threshold,operator,enabled,duration_seconds)
55
+ VALUES ('a1','Disk >80%','disk_used_percent',80,'gt',1,300);
56
+ INSERT INTO monitoring_alerts (id,name,metric,threshold,operator,enabled,duration_seconds)
57
+ VALUES ('a2','CPU >90%','cpu_percent',90,'gt',1,60);
58
+ INSERT INTO monitoring_alerts (id,name,metric,threshold,operator,enabled,duration_seconds)
59
+ VALUES ('a3','RAM >85%','mem_used_percent',85,'gt',1,120);
60
+ "
61
+ systemctl restart your-app
62
+
63
+ # Backup crontab (root):
64
+ # 0 2 * * * cp /opt/your-app/data/your-app.db /backup/your-app-$(date +\%Y\%m\%d).db
65
+ # 0 3 * * * find /backup/ -name "your-app-*.db" -mtime +90 -delete
66
+ ```
67
+
68
+ ## Layer 3 — VPS provider
69
+
70
+ ```bash
71
+ # cntb CLI
72
+ curl -sL "$(curl -sL https://api.github.com/repos/contabo/cntb/releases/latest \
73
+ | grep browser_download_url.*linux_amd64.tar.gz | head -1 | cut -d'"' -f4)" \
74
+ | tar xz -C /usr/local/bin
75
+
76
+ # Snapshot script → /opt/your-app/scripts/contabo-snapshot.sh (reads from /opt/your-app/.env)
77
+ # Credentials as env vars in /opt/your-app/.env (deployed by GitHub Actions):
78
+ # CONTABO_CLIENT_ID, CONTABO_CLIENT_SECRET, CONTABO_API_USER, CONTABO_API_PASSWORD
79
+ # Crontab: 0 4 1 * * /opt/your-app/scripts/contabo-snapshot.sh
80
+
81
+ # > HARD GATE — Snapshot cron silently fails until env vars are set in .env.
82
+ # Credentials source: your VPS provider Customer Panel → API Details.
83
+ # Local dev: add to .envrc. Production: GitHub Secrets → deploy → /opt/your-app/.env
84
+ ```
85
+
86
+ ## CRITICAL GOTCHAS
87
+
88
+ 1. **Shell escaping in Orca terminals:** `$VAR`, `$(…)`, and `%` get eaten by the local shell. Always use base64: `echo '<base64>' | base64 -d > script.sh`
89
+ 2. **Crontab `%`:** cron interprets `%` as newline. Escape as `\%` in `$(date +\%Y\%m\%d)`
90
+ 3. **fail2ban exit 255:** means a jail references a missing log file. Remove the broken jail, restart.
91
+ 4. **your application alerts need auth:** POST to `/api/monitoring/alerts` requires Bearer token. Workaround: insert directly into SQLite, then restart your application.
92
+
93
+ ## Verify all 8 gates
94
+
95
+ ```bash
96
+ ufw status|grep -q active||echo FAIL:ufw
97
+ fail2ban-client status sshd>/dev/null 2>&1||echo FAIL:fail2ban
98
+ systemctl is-active unattended-upgrades|grep -q active||echo FAIL:unattended
99
+ sshd -T|grep -q 'permitrootlogin no'||echo FAIL:sshd
100
+ systemctl show your-app -p NoNewPrivileges|grep -q yes||echo FAIL:systemd
101
+ systemctl is-active your-app|grep -q active||echo FAIL:your-app
102
+ sqlite3 /opt/your-app/data/your-app.db "SELECT count(*) FROM monitoring_alerts"|grep -q 3||echo FAIL:alerts
103
+ crontab -l|grep -q healthcheck&&crontab -l|grep -q your-app.db&&crontab -l|grep -q contabo-snapshot||echo FAIL:crontab
104
+ echo ALL 8 GATES PASSED
105
+ ```
106
+
107
+ → verify: # requires VPS SSH — run the 8-gate one-liner on the VPS manually
108
+
109
+ ---
110
+
111
+ # Harden VPS — Reference
112
+
113
+ ## Health check script
114
+
115
+ Deploy to `/opt/your-app/scripts/healthcheck.sh`:
116
+
117
+ ```bash
118
+ #!/bin/bash
119
+ LOG=/var/log/your-app/health.log
120
+ mkdir -p /var/log/your-app
121
+ DISK=$(df / | awk 'NR==2 {print $5}' | tr -d '%')
122
+ RAM=$(free | awk '/Mem:/ {printf "%.0f", $3/$2*100}')
123
+ NOW=$(date -Iseconds)
124
+ [ "$DISK" -gt 85 ] && echo "$NOW ALERT: Disk ${DISK}%" >> "$LOG"
125
+ [ "$RAM" -gt 90 ] && echo "$NOW ALERT: RAM ${RAM}%" >> "$LOG"
126
+ systemctl is-active --quiet your-app || { echo "$NOW ALERT: your application DOWN" >> "$LOG"; systemctl restart your-app; }
127
+ [ -f /var/run/reboot-required ] && echo "$NOW WARN: kernel reboot pending" >> "$LOG"
128
+ ```
129
+
130
+ Make executable: `chmod +x /opt/your-app/scripts/healthcheck.sh`
131
+
132
+ ## your application systemd unit
133
+
134
+ Full hardened unit at `/etc/systemd/system/your-app.service`:
135
+
136
+ ```ini
137
+ [Unit]
138
+ Description=your application BaaS Platform
139
+ Documentation=https://github.com/example-org/example-app
140
+ After=network.target caddy.service
141
+ Wants=caddy.service
142
+
143
+ [Service]
144
+ Type=simple
145
+ User=your-app
146
+ Group=your-app
147
+ WorkingDirectory=/opt/your-app
148
+ ExecStart=/opt/your-app/bin/your-app serve \
149
+ --port 8080 \
150
+ --db /opt/your-app/data/your-app.db \
151
+ --sites-domain <your-domain.example.com>
152
+ EnvironmentFile=-/opt/your-app/.env
153
+ Environment=APP_HOME=/opt/your-app
154
+ Environment=HOME=/opt/your-app
155
+ Environment=NPM_CONFIG_CACHE=/opt/your-app/.npm
156
+ Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
157
+ Restart=always
158
+ RestartSec=5
159
+ StartLimitIntervalSec=60
160
+ StartLimitBurst=3
161
+ TimeoutStopSec=30
162
+ KillSignal=SIGTERM
163
+ NoNewPrivileges=yes
164
+ PrivateTmp=yes
165
+ ProtectSystem=full
166
+ ProtectHome=yes
167
+ ProtectKernelTunables=yes
168
+ ProtectKernelModules=yes
169
+ ProtectControlGroups=yes
170
+ RestrictAddressFamilies=AF_INET AF_INET6
171
+ RestrictRealtime=yes
172
+ ReadWritePaths=/opt/your-app/data
173
+ ReadWritePaths=/opt/your-app/backups
174
+ ReadWritePaths=/opt/your-app/secrets
175
+ ReadWritePaths=/opt/your-app/.npm
176
+ ReadWritePaths=/opt/your-app/logs
177
+ LimitNOFILE=65536
178
+
179
+ [Install]
180
+ WantedBy=multi-user.target
181
+ ```
182
+
183
+ ## fail2ban jail.local
184
+
185
+ ```ini
186
+ [sshd]
187
+ enabled = true
188
+ port = ssh
189
+ filter = sshd
190
+ logpath = /var/log/auth.log
191
+ maxretry = 3
192
+ bantime = 3600
193
+ findtime = 600
194
+ ```
195
+
196
+ Note: your application auth jail deferred — your application logs to journald, not a file. To enable, use `backend = systemd` with a journald filter.
197
+
198
+ ## provider-snapshot.sh — worked example (Contabo API)
199
+
200
+ > Snapshot APIs are provider-specific. This is one worked example, not a
201
+ > bigpowers default; swap the auth and endpoint calls for your own provider.
202
+
203
+ Deploy to `/opt/your-app/scripts/contabo-snapshot.sh`. Reads credentials from `/opt/your-app/.env` (same file used by your application systemd unit):
204
+
205
+ ```bash
206
+ #!/bin/bash
207
+ set -e
208
+ LOG=/var/log/your-app/snapshot.log
209
+ ENVFILE=/opt/your-app/.env
210
+ INSTANCE_ID=<your-contabo-instance-id>
211
+
212
+ [ -f "$ENVFILE" ] || { echo "$(date -Iseconds) ERROR: $ENVFILE missing" >> "$LOG"; exit 1; }
213
+ set -a; source "$ENVFILE"; set +a
214
+
215
+ [ -z "$CONTABO_CLIENT_ID" ] && { echo "$(date -Iseconds) ERROR: CONTABO_CLIENT_ID not set" >> "$LOG"; exit 1; }
216
+
217
+ TOKEN=$(curl -s -d "client_id=$CONTABO_CLIENT_ID" \
218
+ -d "client_secret=$CONTABO_CLIENT_SECRET" \
219
+ --data-urlencode "username=$CONTABO_API_USER" \
220
+ --data-urlencode "password=$CONTABO_API_PASSWORD" \
221
+ -d 'grant_type=password' \
222
+ 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' \
223
+ | jq -r '.access_token')
224
+
225
+ [ -z "$TOKEN" ] || [ "$TOKEN" = "null" ] && { echo "$(date -Iseconds) ERROR: auth failed" >> "$LOG"; exit 1; }
226
+
227
+ curl -s -X POST \
228
+ -H "Authorization: Bearer $TOKEN" \
229
+ -H "Content-Type: application/json" \
230
+ -H "x-request-id: $(uuidgen 2>/dev/null || echo $RANDOM)" \
231
+ "https://api.contabo.com/v1/compute/instances/${INSTANCE_ID}/snapshots" \
232
+ | tee -a "$LOG"
233
+
234
+ echo >> "$LOG"
235
+ echo "$(date -Iseconds) Snapshot requested for $INSTANCE_ID" >> "$LOG"
236
+ ```
237
+
238
+ ## your VPS provider credentials
239
+
240
+ Add to `/opt/your-app/.env` (same file used by your application systemd unit, deployed by GitHub Actions):
241
+
242
+ ```
243
+ CONTABO_CLIENT_ID=
244
+ CONTABO_CLIENT_SECRET=
245
+ CONTABO_API_USER=
246
+ CONTABO_API_PASSWORD=
247
+ ```
248
+
249
+ Source: your VPS provider Customer Control Panel → API Details. ClientId and ClientSecret are generated there. API User is your email. API Password is set separately in the panel.
250
+
251
+ **Pipeline:** GitHub Secrets → deploy workflow → `/opt/your-app/.env` on VPS. For local dev (`cntb get instances`), add to `.envrc`.
252
+
253
+ ## your VPS provider instance info template
254
+
255
+ Fill in your instance details from the your VPS provider Customer Control Panel:
256
+
257
+ ```
258
+ IP: <your-instance-ip>
259
+ IPv6: <your-instance-ipv6>
260
+ Region: <your-region>
261
+ OS: <your-os-version>
262
+ Disk: <your-disk-size>
263
+ Default user: root
264
+ Customer ID: <your-customer-id>
265
+ ```
266
+
267
+ ## your application monitoring alert SQL
268
+
269
+ ```sql
270
+ INSERT INTO monitoring_alerts (id, name, metric, threshold, operator, enabled, duration_seconds)
271
+ VALUES ('alert-001', 'VPS Disk above 80%', 'disk_used_percent', 80, 'gt', 1, 300);
272
+
273
+ INSERT INTO monitoring_alerts (id, name, metric, threshold, operator, enabled, duration_seconds)
274
+ VALUES ('alert-002', 'VPS CPU above 90%', 'cpu_percent', 90, 'gt', 1, 60);
275
+
276
+ INSERT INTO monitoring_alerts (id, name, metric, threshold, operator, enabled, duration_seconds)
277
+ VALUES ('alert-003', 'VPS RAM above 85%', 'mem_used_percent', 85, 'gt', 1, 120);
278
+ ```
279
+
280
+ Alerts are loaded at your application startup. Restart with `systemctl restart your-app` after inserting.
281
+
282
+ ## Base64 encoding workaround
283
+
284
+ When sending scripts through Orca terminal `--text`, the local bash shell interprets `$`, `(`, and `%`. Encode locally and decode remotely:
285
+
286
+ ```bash
287
+ # Local
288
+ cat script.sh | base64
289
+
290
+ # Remote terminal
291
+ echo '<base64-output>' | base64 -d > script.sh
292
+ ```