bigpowers 2.82.3 → 2.83.0

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 (355) hide show
  1. package/.agents/skills/align-grid/SKILL.md +110 -0
  2. package/.agents/skills/assess-impact/SKILL.md +91 -0
  3. package/.agents/skills/audit-code/SKILL.md +187 -0
  4. package/.agents/skills/audit-plan/SKILL.md +89 -0
  5. package/.agents/skills/build-epic/SKILL.md +105 -0
  6. package/.agents/skills/change-request/SKILL.md +121 -0
  7. package/.agents/skills/commit-message/SKILL.md +140 -0
  8. package/.agents/skills/compose-workflow/SKILL.md +82 -0
  9. package/.agents/skills/context7-mcp/SKILL.md +55 -0
  10. package/.agents/skills/craft-skill/SKILL.md +179 -0
  11. package/.agents/skills/deepen-architecture/SKILL.md +260 -0
  12. package/.agents/skills/define-language/SKILL.md +80 -0
  13. package/.agents/skills/define-success/SKILL.md +65 -0
  14. package/.agents/skills/delegate-task/SKILL.md +91 -0
  15. package/.agents/skills/deploy/SKILL.md +198 -0
  16. package/.agents/skills/design-interface/SKILL.md +97 -0
  17. package/.agents/skills/develop-tdd/SKILL.md +406 -0
  18. package/.agents/skills/diagnose-root/SKILL.md +24 -0
  19. package/.agents/skills/diagnose-stall/SKILL.md +54 -0
  20. package/.agents/skills/dispatch-agents/SKILL.md +118 -0
  21. package/.agents/skills/edit-document/SKILL.md +23 -0
  22. package/.agents/skills/elaborate-spec/SKILL.md +101 -0
  23. package/.agents/skills/enforce-first/SKILL.md +32 -0
  24. package/.agents/skills/evolve-skill/SKILL.md +55 -0
  25. package/.agents/skills/execute-plan/SKILL.md +61 -0
  26. package/.agents/skills/extract-design/SKILL.md +132 -0
  27. package/.agents/skills/find-way/SKILL.md +191 -0
  28. package/.agents/skills/fix-bug/SKILL.md +67 -0
  29. package/.agents/skills/gate-trace/SKILL.md +88 -0
  30. package/.agents/skills/generate-allure-report/SKILL.md +285 -0
  31. package/.agents/skills/grill-me/SKILL.md +96 -0
  32. package/.agents/skills/grill-with-docs/SKILL.md +41 -0
  33. package/.agents/skills/guard-git/SKILL.md +231 -0
  34. package/.agents/skills/harden-vps/SKILL.md +288 -0
  35. package/.agents/skills/hook-commits/SKILL.md +94 -0
  36. package/.agents/skills/inspect-quality/SKILL.md +106 -0
  37. package/.agents/skills/investigate-bug/SKILL.md +127 -0
  38. package/.agents/skills/kickoff-branch/SKILL.md +143 -0
  39. package/.agents/skills/maintain-wiki/SKILL.md +64 -0
  40. package/.agents/skills/map-codebase/SKILL.md +71 -0
  41. package/.agents/skills/migrate-spec/SKILL.md +862 -0
  42. package/.agents/skills/model-domain/SKILL.md +232 -0
  43. package/.agents/skills/orchestrate-project/SKILL.md +174 -0
  44. package/.agents/skills/organize-workspace/SKILL.md +164 -0
  45. package/.agents/skills/plan-refactor/SKILL.md +87 -0
  46. package/.agents/skills/plan-release/SKILL.md +145 -0
  47. package/.agents/skills/plan-tests/SKILL.md +75 -0
  48. package/.agents/skills/plan-work/SKILL.md +260 -0
  49. package/.agents/skills/publish-package/SKILL.md +328 -0
  50. package/.agents/skills/quick-fix/SKILL.md +114 -0
  51. package/.agents/skills/release-branch/SKILL.md +298 -0
  52. package/.agents/skills/request-review/SKILL.md +112 -0
  53. package/.agents/skills/research-first/SKILL.md +87 -0
  54. package/.agents/skills/reset-baseline/SKILL.md +21 -0
  55. package/.agents/skills/respond-review/SKILL.md +71 -0
  56. package/.agents/skills/run-benchmark/SKILL.md +85 -0
  57. package/.agents/skills/run-evals/SKILL.md +80 -0
  58. package/.agents/skills/run-planning/SKILL.md +101 -0
  59. package/.agents/skills/scope-work/SKILL.md +63 -0
  60. package/.agents/skills/search-skills/SKILL.md +73 -0
  61. package/.agents/skills/security-review/SKILL.md +384 -0
  62. package/.agents/skills/seed-conventions/SKILL.md +285 -0
  63. package/.agents/skills/session-state/SKILL.md +146 -0
  64. package/.agents/skills/setup-environment/SKILL.md +39 -0
  65. package/.agents/skills/simulate-agents/SKILL.md +26 -0
  66. package/.agents/skills/slice-tasks/SKILL.md +68 -0
  67. package/.agents/skills/smoke-test/SKILL.md +242 -0
  68. package/.agents/skills/spike-prototype/SKILL.md +95 -0
  69. package/.agents/skills/stocktake-skills/SKILL.md +72 -0
  70. package/.agents/skills/survey-context/SKILL.md +135 -0
  71. package/.agents/skills/terse-mode/SKILL.md +42 -0
  72. package/.agents/skills/trace-requirement/SKILL.md +69 -0
  73. package/.agents/skills/using-bigpowers/SKILL.md +111 -0
  74. package/.agents/skills/validate-contracts/SKILL.md +309 -0
  75. package/.agents/skills/validate-fix/SKILL.md +106 -0
  76. package/.agents/skills/verify-work/SKILL.md +191 -0
  77. package/.agents/skills/visual-dashboard/SKILL.md +50 -0
  78. package/.agents/skills/wire-ci/SKILL.md +375 -0
  79. package/.agents/skills/wire-observability/SKILL.md +97 -0
  80. package/.agents/skills/write-document/SKILL.md +255 -0
  81. package/.hermes/skills/align-grid/SKILL.md +110 -0
  82. package/.hermes/skills/assess-impact/SKILL.md +91 -0
  83. package/.hermes/skills/audit-code/SKILL.md +187 -0
  84. package/.hermes/skills/audit-plan/SKILL.md +89 -0
  85. package/.hermes/skills/build-epic/SKILL.md +105 -0
  86. package/.hermes/skills/change-request/SKILL.md +121 -0
  87. package/.hermes/skills/commit-message/SKILL.md +140 -0
  88. package/.hermes/skills/compose-workflow/SKILL.md +82 -0
  89. package/.hermes/skills/context7-mcp/SKILL.md +55 -0
  90. package/.hermes/skills/craft-skill/SKILL.md +179 -0
  91. package/.hermes/skills/deepen-architecture/SKILL.md +260 -0
  92. package/.hermes/skills/define-language/SKILL.md +80 -0
  93. package/.hermes/skills/define-success/SKILL.md +65 -0
  94. package/.hermes/skills/delegate-task/SKILL.md +91 -0
  95. package/.hermes/skills/deploy/SKILL.md +198 -0
  96. package/.hermes/skills/design-interface/SKILL.md +97 -0
  97. package/.hermes/skills/develop-tdd/SKILL.md +406 -0
  98. package/.hermes/skills/diagnose-root/SKILL.md +24 -0
  99. package/.hermes/skills/diagnose-stall/SKILL.md +54 -0
  100. package/.hermes/skills/dispatch-agents/SKILL.md +118 -0
  101. package/.hermes/skills/edit-document/SKILL.md +23 -0
  102. package/.hermes/skills/elaborate-spec/SKILL.md +101 -0
  103. package/.hermes/skills/enforce-first/SKILL.md +32 -0
  104. package/.hermes/skills/evolve-skill/SKILL.md +55 -0
  105. package/.hermes/skills/execute-plan/SKILL.md +61 -0
  106. package/.hermes/skills/extract-design/SKILL.md +132 -0
  107. package/.hermes/skills/find-way/SKILL.md +191 -0
  108. package/.hermes/skills/fix-bug/SKILL.md +67 -0
  109. package/.hermes/skills/gate-trace/SKILL.md +88 -0
  110. package/.hermes/skills/generate-allure-report/SKILL.md +285 -0
  111. package/.hermes/skills/grill-me/SKILL.md +96 -0
  112. package/.hermes/skills/grill-with-docs/SKILL.md +41 -0
  113. package/.hermes/skills/guard-git/SKILL.md +231 -0
  114. package/.hermes/skills/harden-vps/SKILL.md +288 -0
  115. package/.hermes/skills/hook-commits/SKILL.md +94 -0
  116. package/.hermes/skills/inspect-quality/SKILL.md +106 -0
  117. package/.hermes/skills/investigate-bug/SKILL.md +127 -0
  118. package/.hermes/skills/kickoff-branch/SKILL.md +143 -0
  119. package/.hermes/skills/maintain-wiki/SKILL.md +64 -0
  120. package/.hermes/skills/map-codebase/SKILL.md +71 -0
  121. package/.hermes/skills/migrate-spec/SKILL.md +862 -0
  122. package/.hermes/skills/model-domain/SKILL.md +232 -0
  123. package/.hermes/skills/orchestrate-project/SKILL.md +174 -0
  124. package/.hermes/skills/organize-workspace/SKILL.md +164 -0
  125. package/.hermes/skills/plan-refactor/SKILL.md +87 -0
  126. package/.hermes/skills/plan-release/SKILL.md +145 -0
  127. package/.hermes/skills/plan-tests/SKILL.md +75 -0
  128. package/.hermes/skills/plan-work/SKILL.md +260 -0
  129. package/.hermes/skills/publish-package/SKILL.md +328 -0
  130. package/.hermes/skills/quick-fix/SKILL.md +114 -0
  131. package/.hermes/skills/release-branch/SKILL.md +298 -0
  132. package/.hermes/skills/request-review/SKILL.md +112 -0
  133. package/.hermes/skills/research-first/SKILL.md +87 -0
  134. package/.hermes/skills/reset-baseline/SKILL.md +21 -0
  135. package/.hermes/skills/respond-review/SKILL.md +71 -0
  136. package/.hermes/skills/run-benchmark/SKILL.md +85 -0
  137. package/.hermes/skills/run-evals/SKILL.md +80 -0
  138. package/.hermes/skills/run-planning/SKILL.md +101 -0
  139. package/.hermes/skills/scope-work/SKILL.md +63 -0
  140. package/.hermes/skills/search-skills/SKILL.md +73 -0
  141. package/.hermes/skills/security-review/SKILL.md +384 -0
  142. package/.hermes/skills/seed-conventions/SKILL.md +285 -0
  143. package/.hermes/skills/session-state/SKILL.md +146 -0
  144. package/.hermes/skills/setup-environment/SKILL.md +39 -0
  145. package/.hermes/skills/simulate-agents/SKILL.md +26 -0
  146. package/.hermes/skills/slice-tasks/SKILL.md +68 -0
  147. package/.hermes/skills/smoke-test/SKILL.md +242 -0
  148. package/.hermes/skills/spike-prototype/SKILL.md +95 -0
  149. package/.hermes/skills/stocktake-skills/SKILL.md +72 -0
  150. package/.hermes/skills/survey-context/SKILL.md +135 -0
  151. package/.hermes/skills/terse-mode/SKILL.md +42 -0
  152. package/.hermes/skills/trace-requirement/SKILL.md +69 -0
  153. package/.hermes/skills/using-bigpowers/SKILL.md +111 -0
  154. package/.hermes/skills/validate-contracts/SKILL.md +309 -0
  155. package/.hermes/skills/validate-fix/SKILL.md +106 -0
  156. package/.hermes/skills/verify-work/SKILL.md +191 -0
  157. package/.hermes/skills/visual-dashboard/SKILL.md +50 -0
  158. package/.hermes/skills/wire-ci/SKILL.md +375 -0
  159. package/.hermes/skills/wire-observability/SKILL.md +97 -0
  160. package/.hermes/skills/write-document/SKILL.md +255 -0
  161. package/.mimocode/skills/align-grid/SKILL.md +110 -0
  162. package/.mimocode/skills/assess-impact/SKILL.md +91 -0
  163. package/.mimocode/skills/audit-code/SKILL.md +187 -0
  164. package/.mimocode/skills/audit-plan/SKILL.md +89 -0
  165. package/.mimocode/skills/build-epic/SKILL.md +105 -0
  166. package/.mimocode/skills/change-request/SKILL.md +121 -0
  167. package/.mimocode/skills/commit-message/SKILL.md +140 -0
  168. package/.mimocode/skills/compose-workflow/SKILL.md +82 -0
  169. package/.mimocode/skills/context7-mcp/SKILL.md +55 -0
  170. package/.mimocode/skills/craft-skill/SKILL.md +179 -0
  171. package/.mimocode/skills/deepen-architecture/SKILL.md +260 -0
  172. package/.mimocode/skills/define-language/SKILL.md +80 -0
  173. package/.mimocode/skills/define-success/SKILL.md +65 -0
  174. package/.mimocode/skills/delegate-task/SKILL.md +91 -0
  175. package/.mimocode/skills/deploy/SKILL.md +198 -0
  176. package/.mimocode/skills/design-interface/SKILL.md +97 -0
  177. package/.mimocode/skills/develop-tdd/SKILL.md +406 -0
  178. package/.mimocode/skills/diagnose-root/SKILL.md +24 -0
  179. package/.mimocode/skills/diagnose-stall/SKILL.md +54 -0
  180. package/.mimocode/skills/dispatch-agents/SKILL.md +118 -0
  181. package/.mimocode/skills/edit-document/SKILL.md +23 -0
  182. package/.mimocode/skills/elaborate-spec/SKILL.md +101 -0
  183. package/.mimocode/skills/enforce-first/SKILL.md +32 -0
  184. package/.mimocode/skills/evolve-skill/SKILL.md +55 -0
  185. package/.mimocode/skills/execute-plan/SKILL.md +61 -0
  186. package/.mimocode/skills/extract-design/SKILL.md +132 -0
  187. package/.mimocode/skills/find-way/SKILL.md +191 -0
  188. package/.mimocode/skills/fix-bug/SKILL.md +67 -0
  189. package/.mimocode/skills/gate-trace/SKILL.md +88 -0
  190. package/.mimocode/skills/generate-allure-report/SKILL.md +285 -0
  191. package/.mimocode/skills/grill-me/SKILL.md +96 -0
  192. package/.mimocode/skills/grill-with-docs/SKILL.md +41 -0
  193. package/.mimocode/skills/guard-git/SKILL.md +231 -0
  194. package/.mimocode/skills/harden-vps/SKILL.md +288 -0
  195. package/.mimocode/skills/hook-commits/SKILL.md +94 -0
  196. package/.mimocode/skills/inspect-quality/SKILL.md +106 -0
  197. package/.mimocode/skills/investigate-bug/SKILL.md +127 -0
  198. package/.mimocode/skills/kickoff-branch/SKILL.md +143 -0
  199. package/.mimocode/skills/maintain-wiki/SKILL.md +64 -0
  200. package/.mimocode/skills/map-codebase/SKILL.md +71 -0
  201. package/.mimocode/skills/migrate-spec/SKILL.md +862 -0
  202. package/.mimocode/skills/model-domain/SKILL.md +232 -0
  203. package/.mimocode/skills/orchestrate-project/SKILL.md +174 -0
  204. package/.mimocode/skills/organize-workspace/SKILL.md +164 -0
  205. package/.mimocode/skills/plan-refactor/SKILL.md +87 -0
  206. package/.mimocode/skills/plan-release/SKILL.md +145 -0
  207. package/.mimocode/skills/plan-tests/SKILL.md +75 -0
  208. package/.mimocode/skills/plan-work/SKILL.md +260 -0
  209. package/.mimocode/skills/publish-package/SKILL.md +328 -0
  210. package/.mimocode/skills/quick-fix/SKILL.md +114 -0
  211. package/.mimocode/skills/release-branch/SKILL.md +298 -0
  212. package/.mimocode/skills/request-review/SKILL.md +112 -0
  213. package/.mimocode/skills/research-first/SKILL.md +87 -0
  214. package/.mimocode/skills/reset-baseline/SKILL.md +21 -0
  215. package/.mimocode/skills/respond-review/SKILL.md +71 -0
  216. package/.mimocode/skills/run-benchmark/SKILL.md +85 -0
  217. package/.mimocode/skills/run-evals/SKILL.md +80 -0
  218. package/.mimocode/skills/run-planning/SKILL.md +101 -0
  219. package/.mimocode/skills/scope-work/SKILL.md +63 -0
  220. package/.mimocode/skills/search-skills/SKILL.md +73 -0
  221. package/.mimocode/skills/security-review/SKILL.md +384 -0
  222. package/.mimocode/skills/seed-conventions/SKILL.md +285 -0
  223. package/.mimocode/skills/session-state/SKILL.md +146 -0
  224. package/.mimocode/skills/setup-environment/SKILL.md +39 -0
  225. package/.mimocode/skills/simulate-agents/SKILL.md +26 -0
  226. package/.mimocode/skills/slice-tasks/SKILL.md +68 -0
  227. package/.mimocode/skills/smoke-test/SKILL.md +242 -0
  228. package/.mimocode/skills/spike-prototype/SKILL.md +95 -0
  229. package/.mimocode/skills/stocktake-skills/SKILL.md +72 -0
  230. package/.mimocode/skills/survey-context/SKILL.md +135 -0
  231. package/.mimocode/skills/terse-mode/SKILL.md +42 -0
  232. package/.mimocode/skills/trace-requirement/SKILL.md +69 -0
  233. package/.mimocode/skills/using-bigpowers/SKILL.md +111 -0
  234. package/.mimocode/skills/validate-contracts/SKILL.md +309 -0
  235. package/.mimocode/skills/validate-fix/SKILL.md +106 -0
  236. package/.mimocode/skills/verify-work/SKILL.md +191 -0
  237. package/.mimocode/skills/visual-dashboard/SKILL.md +50 -0
  238. package/.mimocode/skills/wire-ci/SKILL.md +375 -0
  239. package/.mimocode/skills/wire-observability/SKILL.md +97 -0
  240. package/.mimocode/skills/write-document/SKILL.md +255 -0
  241. package/.pi/package.json +1 -1
  242. package/.zcode/skills/align-grid/SKILL.md +110 -0
  243. package/.zcode/skills/assess-impact/SKILL.md +91 -0
  244. package/.zcode/skills/audit-code/SKILL.md +187 -0
  245. package/.zcode/skills/audit-plan/SKILL.md +89 -0
  246. package/.zcode/skills/build-epic/SKILL.md +105 -0
  247. package/.zcode/skills/change-request/SKILL.md +121 -0
  248. package/.zcode/skills/commit-message/SKILL.md +140 -0
  249. package/.zcode/skills/compose-workflow/SKILL.md +82 -0
  250. package/.zcode/skills/context7-mcp/SKILL.md +55 -0
  251. package/.zcode/skills/craft-skill/SKILL.md +179 -0
  252. package/.zcode/skills/deepen-architecture/SKILL.md +260 -0
  253. package/.zcode/skills/define-language/SKILL.md +80 -0
  254. package/.zcode/skills/define-success/SKILL.md +65 -0
  255. package/.zcode/skills/delegate-task/SKILL.md +91 -0
  256. package/.zcode/skills/deploy/SKILL.md +198 -0
  257. package/.zcode/skills/design-interface/SKILL.md +97 -0
  258. package/.zcode/skills/develop-tdd/SKILL.md +406 -0
  259. package/.zcode/skills/diagnose-root/SKILL.md +24 -0
  260. package/.zcode/skills/diagnose-stall/SKILL.md +54 -0
  261. package/.zcode/skills/dispatch-agents/SKILL.md +118 -0
  262. package/.zcode/skills/edit-document/SKILL.md +23 -0
  263. package/.zcode/skills/elaborate-spec/SKILL.md +101 -0
  264. package/.zcode/skills/enforce-first/SKILL.md +32 -0
  265. package/.zcode/skills/evolve-skill/SKILL.md +55 -0
  266. package/.zcode/skills/execute-plan/SKILL.md +61 -0
  267. package/.zcode/skills/extract-design/SKILL.md +132 -0
  268. package/.zcode/skills/find-way/SKILL.md +191 -0
  269. package/.zcode/skills/fix-bug/SKILL.md +67 -0
  270. package/.zcode/skills/gate-trace/SKILL.md +88 -0
  271. package/.zcode/skills/generate-allure-report/SKILL.md +285 -0
  272. package/.zcode/skills/grill-me/SKILL.md +96 -0
  273. package/.zcode/skills/grill-with-docs/SKILL.md +41 -0
  274. package/.zcode/skills/guard-git/SKILL.md +231 -0
  275. package/.zcode/skills/harden-vps/SKILL.md +288 -0
  276. package/.zcode/skills/hook-commits/SKILL.md +94 -0
  277. package/.zcode/skills/inspect-quality/SKILL.md +106 -0
  278. package/.zcode/skills/investigate-bug/SKILL.md +127 -0
  279. package/.zcode/skills/kickoff-branch/SKILL.md +143 -0
  280. package/.zcode/skills/maintain-wiki/SKILL.md +64 -0
  281. package/.zcode/skills/map-codebase/SKILL.md +71 -0
  282. package/.zcode/skills/migrate-spec/SKILL.md +862 -0
  283. package/.zcode/skills/model-domain/SKILL.md +232 -0
  284. package/.zcode/skills/orchestrate-project/SKILL.md +174 -0
  285. package/.zcode/skills/organize-workspace/SKILL.md +164 -0
  286. package/.zcode/skills/plan-refactor/SKILL.md +87 -0
  287. package/.zcode/skills/plan-release/SKILL.md +145 -0
  288. package/.zcode/skills/plan-tests/SKILL.md +75 -0
  289. package/.zcode/skills/plan-work/SKILL.md +260 -0
  290. package/.zcode/skills/publish-package/SKILL.md +328 -0
  291. package/.zcode/skills/quick-fix/SKILL.md +114 -0
  292. package/.zcode/skills/release-branch/SKILL.md +298 -0
  293. package/.zcode/skills/request-review/SKILL.md +112 -0
  294. package/.zcode/skills/research-first/SKILL.md +87 -0
  295. package/.zcode/skills/reset-baseline/SKILL.md +21 -0
  296. package/.zcode/skills/respond-review/SKILL.md +71 -0
  297. package/.zcode/skills/run-benchmark/SKILL.md +85 -0
  298. package/.zcode/skills/run-evals/SKILL.md +80 -0
  299. package/.zcode/skills/run-planning/SKILL.md +101 -0
  300. package/.zcode/skills/scope-work/SKILL.md +63 -0
  301. package/.zcode/skills/search-skills/SKILL.md +73 -0
  302. package/.zcode/skills/security-review/SKILL.md +384 -0
  303. package/.zcode/skills/seed-conventions/SKILL.md +285 -0
  304. package/.zcode/skills/session-state/SKILL.md +146 -0
  305. package/.zcode/skills/setup-environment/SKILL.md +39 -0
  306. package/.zcode/skills/simulate-agents/SKILL.md +26 -0
  307. package/.zcode/skills/slice-tasks/SKILL.md +68 -0
  308. package/.zcode/skills/smoke-test/SKILL.md +242 -0
  309. package/.zcode/skills/spike-prototype/SKILL.md +95 -0
  310. package/.zcode/skills/stocktake-skills/SKILL.md +72 -0
  311. package/.zcode/skills/survey-context/SKILL.md +135 -0
  312. package/.zcode/skills/terse-mode/SKILL.md +42 -0
  313. package/.zcode/skills/trace-requirement/SKILL.md +69 -0
  314. package/.zcode/skills/using-bigpowers/SKILL.md +111 -0
  315. package/.zcode/skills/validate-contracts/SKILL.md +309 -0
  316. package/.zcode/skills/validate-fix/SKILL.md +106 -0
  317. package/.zcode/skills/verify-work/SKILL.md +191 -0
  318. package/.zcode/skills/visual-dashboard/SKILL.md +50 -0
  319. package/.zcode/skills/wire-ci/SKILL.md +375 -0
  320. package/.zcode/skills/wire-observability/SKILL.md +97 -0
  321. package/.zcode/skills/write-document/SKILL.md +255 -0
  322. package/CHANGELOG.md +27 -0
  323. package/bin/setup.js +13 -4
  324. package/package.json +1 -1
  325. package/scripts/adapters/agy.sh +44 -1
  326. package/scripts/adapters/gemini.sh +83 -0
  327. package/scripts/adapters/hermes.sh +53 -1
  328. package/scripts/adapters/mimo.sh +41 -0
  329. package/scripts/adapters/zcode.sh +37 -0
  330. package/scripts/hooks/hermes/gateway/session-log/HOOK.yaml +5 -0
  331. package/scripts/hooks/hermes/gateway/session-log/handler.py +7 -0
  332. package/scripts/hooks/hermes/plugin/guard-git-plugin.py +14 -0
  333. package/scripts/hooks/hermes/shell/block-dangerous-terminal.sh +23 -0
  334. package/scripts/hooks/hermes/shell/hooks-config.example.yaml +7 -0
  335. package/scripts/install-cursor-skills-local.sh +8 -6
  336. package/scripts/install-cursor-skills.sh +15 -25
  337. package/scripts/install.sh +211 -13
  338. package/scripts/lib/__pycache__/link_utils.cpython-312.pyc +0 -0
  339. package/scripts/lib/golden-suite-gates.sh +2 -1
  340. package/scripts/lib/install-helpers.js +199 -4
  341. package/scripts/lib/sync-render.sh +43 -0
  342. package/scripts/lib/target-contracts.sh +22 -0
  343. package/scripts/lib/trace-matrix.py +1 -1
  344. package/scripts/lib/trace-stories.py +1 -1
  345. package/scripts/targets.yaml +31 -1
  346. package/scripts/test-agy-hub.sh +59 -0
  347. package/scripts/test-gemini-adapter.sh +70 -0
  348. package/scripts/test-gemini-hub.sh +55 -0
  349. package/scripts/test-hermes-adapter.sh +85 -0
  350. package/scripts/test-hermes-hub.sh +51 -0
  351. package/scripts/test-install-helpers.js +103 -0
  352. package/scripts/test-install-helpers.sh +7 -0
  353. package/scripts/test-mimo-hub.sh +51 -0
  354. package/scripts/test-zcode-hub.sh +51 -0
  355. package/scripts/verify-install.sh +31 -0
@@ -0,0 +1,96 @@
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
+ ---
6
+
7
+ # Grill Me
8
+
9
+ > **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.
10
+
11
+ 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.
12
+
13
+ > **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.
14
+
15
+ ## Design mode (default)
16
+
17
+ 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.
18
+
19
+ If a question can be answered by exploring the codebase, explore it instead.
20
+
21
+ ## Docs mode
22
+
23
+ Ground every challenge in real documentation — no assumption about a library's behavior goes unchecked. See [REFERENCE.md](REFERENCE.md) for the full process.
24
+
25
+ Short form:
26
+ 1. List every external library, third-party API, and framework behavior relied upon.
27
+ 2. Fetch the actual docs for each (`WebFetch` the official API reference).
28
+ 3. Challenge each plan assumption against the real docs: correct method signature? right version? deprecated?
29
+ 4. Report confirmed ✓, corrected ✗ (with the real behavior), and uncertain → `spike-prototype`.
30
+ 5. Update the plan for each confirmed discrepancy.
31
+
32
+ ---
33
+
34
+ # Docs Mode — Full Process
35
+
36
+ Triggered by "grill me with docs" or when a plan depends on a specific library or external API.
37
+
38
+ **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.
39
+
40
+ ## Step 1 — Identify the dependencies
41
+
42
+ From the plan or conversation, list:
43
+ - Every external library being used
44
+ - Every third-party API being called
45
+ - Every framework behavior being relied upon
46
+
47
+ Ask: "Which of these are you most confident about? Which are you less sure of?"
48
+
49
+ ## Step 2 — Fetch the relevant docs
50
+
51
+ For each dependency, fetch the actual documentation:
52
+
53
+ ```
54
+ WebFetch the official docs for [library/API]
55
+ ```
56
+
57
+ Prioritize:
58
+ - The API reference for the specific method being used
59
+ - The changelog for the version in use (breaking changes)
60
+ - Migration guides if upgrading from a previous version
61
+ - Known gotchas / FAQ sections
62
+
63
+ ## Step 3 — Challenge each assumption
64
+
65
+ For every assumption in the plan, find the corresponding doc section and ask:
66
+
67
+ - "Does the real API actually work this way? Show me the doc."
68
+ - "Is this method available in the version you're using?"
69
+ - "Does this argument order match the actual signature?"
70
+ - "Are there rate limits, quotas, or timeout behaviors that affect this design?"
71
+ - "Is this marked as deprecated in the current version?"
72
+
73
+ Ask one question at a time. For each challenge, cite the specific URL and section.
74
+
75
+ ## Step 4 — Surface hallucinations
76
+
77
+ When an assumption doesn't match the docs:
78
+
79
+ > "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."
80
+
81
+ Document each discrepancy clearly.
82
+
83
+ ## Step 5 — Update the plan
84
+
85
+ For each confirmed discrepancy, recommend a concrete fix:
86
+ - Correct method signature
87
+ - Correct argument order
88
+ - Alternative approach that matches what the library actually supports
89
+ - Whether a spike (`spike-prototype`) is needed to validate a remaining uncertainty
90
+
91
+ ## Step 6 — Sign off
92
+
93
+ When all major assumptions have been validated against docs, report:
94
+ - Which assumptions were confirmed ✓
95
+ - Which were corrected ✗ + what the correct approach is
96
+ - Which remain uncertain → recommend `spike-prototype`
@@ -0,0 +1,41 @@
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
+ ---
6
+
7
+ # Grill With Docs
8
+
9
+ > **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.
10
+
11
+ > **HARD GATE** — Every challenge must cite a real documentation URL. No hallucinated APIs.
12
+
13
+ ## Process
14
+
15
+ 1. Read the plan or design under test (`specs/release-plan.yaml + epic shards`, INTERFACE-OPTIONS.md, etc.).
16
+ 2. List assumptions that depend on external libraries or APIs.
17
+ 3. For each assumption: fetch or quote official docs; challenge with "docs say X, plan says Y."
18
+ 4. Resolve or update the plan inline; unresolved items block `plan-work`.
19
+
20
+ ## Docs mode rules
21
+
22
+ - Cite URL + quoted snippet (method name, parameter, version).
23
+ - If docs contradict the plan, plan loses until updated.
24
+ - Prefer official docs over blog posts.
25
+
26
+ ## Verify
27
+
28
+ → verify: `grep -c 'https\?://' skills/grill-with-docs/SKILL.md | awk '{if($1>=2) print "OK"; else print "NEEDS DOCS"}'`
29
+
30
+ See [REFERENCE.md](REFERENCE.md) for question templates.
31
+
32
+
33
+ <!-- story: e03s01 -->
34
+
35
+ ---
36
+
37
+ # Grill With Docs — Question templates
38
+
39
+ - "Docs at [URL] show signature `foo(bar?: Baz)`. Your plan calls `foo(bar, baz)` — which is correct?"
40
+ - "The changelog at [URL] deprecates X in v3. Your plan still uses X — migrate or pin version?"
41
+ - "Error handling in [URL] throws `NetworkError`. Your plan catches `Error` only — is that sufficient?"
@@ -0,0 +1,231 @@
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
+ ---
6
+
7
+ # Guard Git
8
+ > **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.
9
+
10
+
11
+ Installs a shared hook that blocks destructive git operations and enforces workflow discipline. **Requires `jq` on the agent's PATH** when the hook runs.
12
+
13
+ ## What gets blocked/enforced
14
+
15
+ - **Safety**: `git push --force`, `git reset --hard`, `git clean -f`, `git branch -D`, `git checkout .`, `git restore .`.
16
+ - **Discipline**: Blocks direct commits or pushes to protected branches (`main`, `master`) unless `GIT_BIGPOWERS_LAND=1` (set only by `scripts/land-branch.sh`).
17
+ - **Allows**: `git push origin <feature-branch>` for backup/CI; solo land push to `main` only inside `land-branch.sh`.
18
+ - **Standardization**: Enforces [Conventional Commits](https://www.conventionalcommits.org/) for all `git commit` commands.
19
+ - **Secrets**: Blocks commits containing common secret patterns (`sk-`, `ghp_`, `AKIA`, `xoxb-`, `-----BEGIN` private keys) — see [REFERENCE.md](REFERENCE.md).
20
+
21
+ ## Quick start
22
+
23
+ 1. **Scope**: ask project-only vs global (paths differ per product).
24
+ 2. **Write the hook bundle** from [REFERENCE.md](REFERENCE.md) into the client's hooks directory.
25
+ 3. **Run `chmod +x`** on `pre-tool-use.sh`.
26
+ 4. **Merge** the hook snippet from [REFERENCE.md](REFERENCE.md) into the right settings file — do not wipe unrelated keys.
27
+ 5. **Verify** with the tests in [REFERENCE.md](REFERENCE.md).
28
+
29
+ | Client | Mechanism | Config |
30
+ |--------|-----------|--------|
31
+ | Claude Code | `PreToolUse` (Bash) | `.claude/settings.json` or `~/.claude/settings.json` |
32
+ | Cursor / Cursor CLI | `beforeShellExecution` | `.cursor/hooks.json` or `~/.cursor/hooks.json` |
33
+ | Gemini CLI | `BeforeTool` + `run_shell_command` | `.gemini/settings.json` or `~/.gemini/settings.json` |
34
+ | Google Antigravity | Built-in Terminal **Deny list** | Settings UI (no shell hook) |
35
+
36
+ **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.
37
+
38
+ ## Customization
39
+
40
+ To add or remove patterns or protected branches, edit `pre-tool-use.sh`.
41
+
42
+ ## Advanced
43
+
44
+ Full JSON examples, merge rules, Antigravity deny-list entries, and test commands: [REFERENCE.md](REFERENCE.md).
45
+
46
+
47
+
48
+ <!-- story: e01s03 -->
49
+
50
+ ---
51
+
52
+ # Git guardrails — reference
53
+
54
+ ## Navigation
55
+
56
+ | Lines | Section |
57
+ |-------|---------|
58
+ | 1 | Title |
59
+ | 3–14 | Navigation |
60
+ | 16–24 | Secret patterns |
61
+ | 26–44 | Copy layout |
62
+ | 46–72 | Claude Code |
63
+ | 74–92 | Cursor and Cursor CLI |
64
+ | 94–120 | Gemini CLI |
65
+ | 122–135 | Google Antigravity |
66
+ | 137–178 | Verify (local tests) |
67
+
68
+ ## Secret patterns (audit + pre-commit)
69
+
70
+ Agents must not commit files containing:
71
+
72
+ - `sk-` (OpenAI API keys)
73
+ - `ghp_` / `gho_` (GitHub tokens)
74
+ - `AKIA` (AWS access key id)
75
+ - `xoxb-` (Slack bot tokens)
76
+ - `-----BEGIN` private keys
77
+
78
+ Use `audit-code` supply-chain checklist before commit. Consider `git-secrets` or custom pre-commit hook in target projects.
79
+
80
+ ## Copy layout
81
+
82
+ The main script is `pre-tool-use.sh`.
83
+
84
+ ```text
85
+ <hooks-dir>/pre-tool-use.sh
86
+ ```
87
+
88
+ Example project locations:
89
+
90
+ - Claude: `.claude/hooks/`
91
+ - Cursor: `.cursor/hooks/`
92
+ - Gemini: `.gemini/hooks/`
93
+
94
+ Use the same layout for user-level hooks (`~/.claude/hooks`, `~/.cursor/hooks`, `~/.gemini/hooks`).
95
+
96
+ ---
97
+
98
+ ## Claude Code
99
+
100
+ Hook command does **not** need `GIT_GUARDRAILS_MODE` (defaults to `claude`).
101
+
102
+ **Project** (`.claude/settings.json`):
103
+
104
+ ```json
105
+ {
106
+ "hooks": {
107
+ "PreToolUse": [
108
+ {
109
+ "matcher": "Bash",
110
+ "hooks": [
111
+ {
112
+ "type": "command",
113
+ "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/pre-tool-use.sh"
114
+ }
115
+ ]
116
+ }
117
+ ]
118
+ }
119
+ }
120
+ ```
121
+
122
+ ---
123
+
124
+ ## Cursor and Cursor CLI
125
+
126
+ Use `beforeShellExecution`. Set `GIT_GUARDRAILS_MODE=cursor`.
127
+
128
+ **Project** (`.cursor/hooks.json`):
129
+
130
+ ```json
131
+ {
132
+ "version": 1,
133
+ "hooks": {
134
+ "beforeShellExecution": [
135
+ {
136
+ "command": "GIT_GUARDRAILS_MODE=cursor .cursor/hooks/pre-tool-use.sh",
137
+ "matcher": "git"
138
+ }
139
+ ]
140
+ }
141
+ }
142
+ ```
143
+
144
+ ---
145
+
146
+ ## Gemini CLI
147
+
148
+ Use `BeforeTool` with matcher `run_shell_command`. Set **`GIT_GUARDRAILS_MODE=gemini`**.
149
+
150
+ **Project** (`.gemini/settings.json`):
151
+
152
+ ```json
153
+ {
154
+ "hooks": {
155
+ "BeforeTool": [
156
+ {
157
+ "matcher": "run_shell_command",
158
+ "hooks": [
159
+ {
160
+ "name": "git-guardrails",
161
+ "type": "command",
162
+ "command": "GIT_GUARDRAILS_MODE=gemini \"$GEMINI_PROJECT_DIR\"/.gemini/hooks/pre-tool-use.sh",
163
+ "timeout": 5000
164
+ }
165
+ ]
166
+ }
167
+ ]
168
+ }
169
+ }
170
+ ```
171
+
172
+ ---
173
+
174
+ ## Google Antigravity
175
+
176
+ Add **Deny list** entries in **Antigravity → Settings → Terminal**:
177
+
178
+ - `git push --force`
179
+ - `git push origin main`
180
+ - `git push origin master`
181
+ - `git reset --hard`
182
+ - `git clean`
183
+ - `git branch -D`
184
+ - `git checkout .`
185
+ - `git restore .`
186
+
187
+ ---
188
+
189
+ ## Verify (local tests)
190
+
191
+ **1. Block push to main without land mode (Claude mode):**
192
+ ```bash
193
+ echo '{"tool_input":{"command":"git push origin main"}}' | ./pre-tool-use.sh
194
+ # Expected: exit 2, protected branch message
195
+ ```
196
+
197
+ **2. Allow push to main with GIT_BIGPOWERS_LAND=1:**
198
+ ```bash
199
+ GIT_BIGPOWERS_LAND=1 echo '{"tool_input":{"command":"git push origin main"}}' | ./pre-tool-use.sh
200
+ # Expected: exit 0 (when on main)
201
+ ```
202
+
203
+ **3. Allow push to feature branch:**
204
+ ```bash
205
+ echo '{"tool_input":{"command":"git push -u origin feat/my-task"}}' | ./pre-tool-use.sh
206
+ # Expected: exit 0
207
+ ```
208
+
209
+ **4. Conventional Commits (Gemini mode):**
210
+ ```bash
211
+ echo '{"tool_input":{"command":"git commit -m \"bad message\""}}' | GIT_GUARDRAILS_MODE=gemini ./pre-tool-use.sh
212
+ # Expected: exit 0, {"decision":"deny", "reason":"..."}
213
+ ```
214
+
215
+ **5. Protected Branch commit (Cursor mode):**
216
+ ```bash
217
+ # Run on 'main' branch
218
+ echo '{"command":"git commit -m \"feat: valid message\""}' | GIT_GUARDRAILS_MODE=cursor ./pre-tool-use.sh
219
+ # Expected: exit 2, "Direct commits to protected branch 'main' are forbidden"
220
+ ```
221
+
222
+ **6. Land script exists:**
223
+ ```bash
224
+ test -x scripts/land-branch.sh && echo OK
225
+ ```
226
+
227
+ **7. Allow (Gemini mode):**
228
+ ```bash
229
+ echo '{"tool_input":{"command":"git status"}}' | GIT_GUARDRAILS_MODE=gemini ./pre-tool-use.sh
230
+ # Expected: exit 0, {"decision":"allow"}
231
+ ```
@@ -0,0 +1,288 @@
1
+ ---
2
+ name: harden-vps
3
+ model: haiku
4
+ description: "Harden a production Linux VPS for BigBase across three layers — BigBase app (systemd hardening, monitoring alerts, backup automation), Ubuntu OS (UFW firewall, fail2ban SSH, unattended-upgrades, SSH hardening), and Contabo VPS (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
+ ---
6
+
7
+ # Harden VPS
8
+
9
+ Three-layer production hardening for BigBase on Contabo VPS. Each layer independently verifiable. Apply OS first (firewall blocks attacks immediately), then BigBase (alerts + backups), then Contabo (snapshots). See [REFERENCE.md](REFERENCE.md) for full script bodies, systemd unit template, and gotchas.
10
+
11
+ ## Quick start
12
+
13
+ SSH as root into the VPS. Find credentials in the Contabo Customer Control Panel.
14
+
15
+ > **HARD GATE** — Run `ufw status` first. No firewall = layer 1 takes priority over everything.
16
+
17
+ ## Layer 1 — Ubuntu OS
18
+
19
+ ```bash
20
+ # UFW
21
+ ufw default deny incoming && ufw default allow outgoing
22
+ ufw allow 22/tcp && ufw allow 80/tcp && ufw allow 443/tcp && ufw enable
23
+ # → verify: ufw status | grep -q active
24
+
25
+ # fail2ban
26
+ apt install -y fail2ban
27
+ # Configure /etc/fail2ban/jail.local: sshd, maxretry=3, bantime=3600, findtime=600
28
+ systemctl restart fail2ban
29
+ # → verify: fail2ban-client status sshd
30
+
31
+ # unattended-upgrades
32
+ apt install -y unattended-upgrades && dpkg-reconfigure -plow unattended-upgrades
33
+ # → verify: systemctl is-active unattended-upgrades | grep -q active
34
+
35
+ # SSH: PermitRootLogin no, PasswordAuthentication no, PubkeyAuthentication yes
36
+ # → verify: sshd -T | grep -E 'permitrootlogin no|passwordauthentication no'
37
+
38
+ # Deploy healthcheck.sh → /opt/bigbase/scripts/healthcheck.sh
39
+ # Crontab: */5 * * * * /opt/bigbase/scripts/healthcheck.sh
40
+ ```
41
+
42
+ ## Layer 2 — BigBase application
43
+
44
+ ```bash
45
+ # systemd: User=bigbase, NoNewPrivileges=yes, ProtectSystem=full,
46
+ # ProtectKernelTunables=yes, ProtectKernelModules=yes,
47
+ # ProtectControlGroups=yes, RestrictAddressFamilies=AF_INET AF_INET6,
48
+ # RestrictRealtime=yes, PrivateTmp=yes, LimitNOFILE=65536
49
+ # → verify: systemctl show bigbase -p NoNewPrivileges -p ProtectSystem -p User
50
+
51
+ # Alerts (BigBase requires auth; insert via SQLite)
52
+ sqlite3 /opt/bigbase/data/bigbase.db "
53
+ INSERT INTO monitoring_alerts (id,name,metric,threshold,operator,enabled,duration_seconds)
54
+ VALUES ('a1','Disk >80%','disk_used_percent',80,'gt',1,300);
55
+ INSERT INTO monitoring_alerts (id,name,metric,threshold,operator,enabled,duration_seconds)
56
+ VALUES ('a2','CPU >90%','cpu_percent',90,'gt',1,60);
57
+ INSERT INTO monitoring_alerts (id,name,metric,threshold,operator,enabled,duration_seconds)
58
+ VALUES ('a3','RAM >85%','mem_used_percent',85,'gt',1,120);
59
+ "
60
+ systemctl restart bigbase
61
+
62
+ # Backup crontab (root):
63
+ # 0 2 * * * cp /opt/bigbase/data/bigbase.db /backup/bigbase-$(date +\%Y\%m\%d).db
64
+ # 0 3 * * * find /backup/ -name "bigbase-*.db" -mtime +90 -delete
65
+ ```
66
+
67
+ ## Layer 3 — Contabo VPS
68
+
69
+ ```bash
70
+ # cntb CLI
71
+ curl -sL "$(curl -sL https://api.github.com/repos/contabo/cntb/releases/latest \
72
+ | grep browser_download_url.*linux_amd64.tar.gz | head -1 | cut -d'"' -f4)" \
73
+ | tar xz -C /usr/local/bin
74
+
75
+ # Snapshot script → /opt/bigbase/scripts/contabo-snapshot.sh (reads from /opt/bigbase/.env)
76
+ # Credentials as env vars in /opt/bigbase/.env (deployed by GitHub Actions):
77
+ # CONTABO_CLIENT_ID, CONTABO_CLIENT_SECRET, CONTABO_API_USER, CONTABO_API_PASSWORD
78
+ # Crontab: 0 4 1 * * /opt/bigbase/scripts/contabo-snapshot.sh
79
+
80
+ # > HARD GATE — Snapshot cron silently fails until env vars are set in .env.
81
+ # Credentials source: Contabo Customer Panel → API Details.
82
+ # Local dev: add to .envrc. Production: GitHub Secrets → deploy → /opt/bigbase/.env
83
+ ```
84
+
85
+ ## CRITICAL GOTCHAS
86
+
87
+ 1. **Shell escaping in Orca terminals:** `$VAR`, `$(…)`, and `%` get eaten by the local shell. Always use base64: `echo '<base64>' | base64 -d > script.sh`
88
+ 2. **Crontab `%`:** cron interprets `%` as newline. Escape as `\%` in `$(date +\%Y\%m\%d)`
89
+ 3. **fail2ban exit 255:** means a jail references a missing log file. Remove the broken jail, restart.
90
+ 4. **BigBase alerts need auth:** POST to `/api/monitoring/alerts` requires Bearer token. Workaround: insert directly into SQLite, then restart BigBase.
91
+
92
+ ## Verify all 8 gates
93
+
94
+ ```bash
95
+ ufw status|grep -q active||echo FAIL:ufw
96
+ fail2ban-client status sshd>/dev/null 2>&1||echo FAIL:fail2ban
97
+ systemctl is-active unattended-upgrades|grep -q active||echo FAIL:unattended
98
+ sshd -T|grep -q 'permitrootlogin no'||echo FAIL:sshd
99
+ systemctl show bigbase -p NoNewPrivileges|grep -q yes||echo FAIL:systemd
100
+ systemctl is-active bigbase|grep -q active||echo FAIL:bigbase
101
+ sqlite3 /opt/bigbase/data/bigbase.db "SELECT count(*) FROM monitoring_alerts"|grep -q 3||echo FAIL:alerts
102
+ crontab -l|grep -q healthcheck&&crontab -l|grep -q bigbase.db&&crontab -l|grep -q contabo-snapshot||echo FAIL:crontab
103
+ echo ALL 8 GATES PASSED
104
+ ```
105
+
106
+ → verify: run the 8-gate one-liner on the VPS.
107
+
108
+ ---
109
+
110
+ # Harden VPS — Reference
111
+
112
+ ## Health check script
113
+
114
+ Deploy to `/opt/bigbase/scripts/healthcheck.sh`:
115
+
116
+ ```bash
117
+ #!/bin/bash
118
+ LOG=/var/log/bigbase/health.log
119
+ mkdir -p /var/log/bigbase
120
+ DISK=$(df / | awk 'NR==2 {print $5}' | tr -d '%')
121
+ RAM=$(free | awk '/Mem:/ {printf "%.0f", $3/$2*100}')
122
+ NOW=$(date -Iseconds)
123
+ [ "$DISK" -gt 85 ] && echo "$NOW ALERT: Disk ${DISK}%" >> "$LOG"
124
+ [ "$RAM" -gt 90 ] && echo "$NOW ALERT: RAM ${RAM}%" >> "$LOG"
125
+ systemctl is-active --quiet bigbase || { echo "$NOW ALERT: BigBase DOWN" >> "$LOG"; systemctl restart bigbase; }
126
+ [ -f /var/run/reboot-required ] && echo "$NOW WARN: kernel reboot pending" >> "$LOG"
127
+ ```
128
+
129
+ Make executable: `chmod +x /opt/bigbase/scripts/healthcheck.sh`
130
+
131
+ ## BigBase systemd unit
132
+
133
+ Full hardened unit at `/etc/systemd/system/bigbase.service`:
134
+
135
+ ```ini
136
+ [Unit]
137
+ Description=BigBase BaaS Platform
138
+ Documentation=https://github.com/danielvm-git/bigbase
139
+ After=network.target caddy.service
140
+ Wants=caddy.service
141
+
142
+ [Service]
143
+ Type=simple
144
+ User=bigbase
145
+ Group=bigbase
146
+ WorkingDirectory=/opt/bigbase
147
+ ExecStart=/opt/bigbase/bin/bigbase serve \
148
+ --port 8080 \
149
+ --db /opt/bigbase/data/bigbase.db \
150
+ --sites-domain <your-domain.example.com>
151
+ EnvironmentFile=-/opt/bigbase/.env
152
+ Environment=BIGBASE_HOME=/opt/bigbase
153
+ Environment=HOME=/opt/bigbase
154
+ Environment=NPM_CONFIG_CACHE=/opt/bigbase/.npm
155
+ Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
156
+ Restart=always
157
+ RestartSec=5
158
+ StartLimitIntervalSec=60
159
+ StartLimitBurst=3
160
+ TimeoutStopSec=30
161
+ KillSignal=SIGTERM
162
+ NoNewPrivileges=yes
163
+ PrivateTmp=yes
164
+ ProtectSystem=full
165
+ ProtectHome=yes
166
+ ProtectKernelTunables=yes
167
+ ProtectKernelModules=yes
168
+ ProtectControlGroups=yes
169
+ RestrictAddressFamilies=AF_INET AF_INET6
170
+ RestrictRealtime=yes
171
+ ReadWritePaths=/opt/bigbase/data
172
+ ReadWritePaths=/opt/bigbase/backups
173
+ ReadWritePaths=/opt/bigbase/secrets
174
+ ReadWritePaths=/opt/bigbase/.npm
175
+ ReadWritePaths=/opt/bigbase/logs
176
+ LimitNOFILE=65536
177
+
178
+ [Install]
179
+ WantedBy=multi-user.target
180
+ ```
181
+
182
+ ## fail2ban jail.local
183
+
184
+ ```ini
185
+ [sshd]
186
+ enabled = true
187
+ port = ssh
188
+ filter = sshd
189
+ logpath = /var/log/auth.log
190
+ maxretry = 3
191
+ bantime = 3600
192
+ findtime = 600
193
+ ```
194
+
195
+ Note: BigBase auth jail deferred — BigBase logs to journald, not a file. To enable, use `backend = systemd` with a journald filter.
196
+
197
+ ## contabo-snapshot.sh
198
+
199
+ Deploy to `/opt/bigbase/scripts/contabo-snapshot.sh`. Reads credentials from `/opt/bigbase/.env` (same file used by BigBase systemd unit):
200
+
201
+ ```bash
202
+ #!/bin/bash
203
+ set -e
204
+ LOG=/var/log/bigbase/snapshot.log
205
+ ENVFILE=/opt/bigbase/.env
206
+ INSTANCE_ID=<your-contabo-instance-id>
207
+
208
+ [ -f "$ENVFILE" ] || { echo "$(date -Iseconds) ERROR: $ENVFILE missing" >> "$LOG"; exit 1; }
209
+ set -a; source "$ENVFILE"; set +a
210
+
211
+ [ -z "$CONTABO_CLIENT_ID" ] && { echo "$(date -Iseconds) ERROR: CONTABO_CLIENT_ID not set" >> "$LOG"; exit 1; }
212
+
213
+ TOKEN=$(curl -s -d "client_id=$CONTABO_CLIENT_ID" \
214
+ -d "client_secret=$CONTABO_CLIENT_SECRET" \
215
+ --data-urlencode "username=$CONTABO_API_USER" \
216
+ --data-urlencode "password=$CONTABO_API_PASSWORD" \
217
+ -d 'grant_type=password' \
218
+ 'https://auth.contabo.com/auth/realms/contabo/protocol/openid-connect/token' \
219
+ | jq -r '.access_token')
220
+
221
+ [ -z "$TOKEN" ] || [ "$TOKEN" = "null" ] && { echo "$(date -Iseconds) ERROR: auth failed" >> "$LOG"; exit 1; }
222
+
223
+ curl -s -X POST \
224
+ -H "Authorization: Bearer $TOKEN" \
225
+ -H "Content-Type: application/json" \
226
+ -H "x-request-id: $(uuidgen 2>/dev/null || echo $RANDOM)" \
227
+ "https://api.contabo.com/v1/compute/instances/${INSTANCE_ID}/snapshots" \
228
+ | tee -a "$LOG"
229
+
230
+ echo >> "$LOG"
231
+ echo "$(date -Iseconds) Snapshot requested for $INSTANCE_ID" >> "$LOG"
232
+ ```
233
+
234
+ ## Contabo credentials
235
+
236
+ Add to `/opt/bigbase/.env` (same file used by BigBase systemd unit, deployed by GitHub Actions):
237
+
238
+ ```
239
+ CONTABO_CLIENT_ID=
240
+ CONTABO_CLIENT_SECRET=
241
+ CONTABO_API_USER=
242
+ CONTABO_API_PASSWORD=
243
+ ```
244
+
245
+ Source: Contabo Customer Control Panel → API Details. ClientId and ClientSecret are generated there. API User is your email. API Password is set separately in the panel.
246
+
247
+ **Pipeline:** GitHub Secrets → deploy workflow → `/opt/bigbase/.env` on VPS. For local dev (`cntb get instances`), add to `.envrc`.
248
+
249
+ ## Contabo instance info template
250
+
251
+ Fill in your instance details from the Contabo Customer Control Panel:
252
+
253
+ ```
254
+ IP: <your-instance-ip>
255
+ IPv6: <your-instance-ipv6>
256
+ Region: <your-region>
257
+ OS: <your-os-version>
258
+ Disk: <your-disk-size>
259
+ Default user: root
260
+ Customer ID: <your-customer-id>
261
+ ```
262
+
263
+ ## BigBase monitoring alert SQL
264
+
265
+ ```sql
266
+ INSERT INTO monitoring_alerts (id, name, metric, threshold, operator, enabled, duration_seconds)
267
+ VALUES ('alert-001', 'VPS Disk above 80%', 'disk_used_percent', 80, 'gt', 1, 300);
268
+
269
+ INSERT INTO monitoring_alerts (id, name, metric, threshold, operator, enabled, duration_seconds)
270
+ VALUES ('alert-002', 'VPS CPU above 90%', 'cpu_percent', 90, 'gt', 1, 60);
271
+
272
+ INSERT INTO monitoring_alerts (id, name, metric, threshold, operator, enabled, duration_seconds)
273
+ VALUES ('alert-003', 'VPS RAM above 85%', 'mem_used_percent', 85, 'gt', 1, 120);
274
+ ```
275
+
276
+ Alerts are loaded at BigBase startup. Restart with `systemctl restart bigbase` after inserting.
277
+
278
+ ## Base64 encoding workaround
279
+
280
+ When sending scripts through Orca terminal `--text`, the local bash shell interprets `$`, `(`, and `%`. Encode locally and decode remotely:
281
+
282
+ ```bash
283
+ # Local
284
+ cat script.sh | base64
285
+
286
+ # Remote terminal
287
+ echo '<base64-output>' | base64 -d > script.sh
288
+ ```