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,24 @@
1
+ ---
2
+ name: diagnose-root
3
+ model: sonnet
4
+ description: "Run 4-phase root cause analysis — reproduce, isolate, hypothesize, verify. Use when a bug is confirmed but root cause is unclear, after investigate-bug, or when user mentions root cause analysis."
5
+ ---
6
+
7
+ # Diagnose Root
8
+
9
+ **Boundary**: Canonical, reusable 4-phase RCA engine. Invoked by `investigate-bug` (as step 2 of the end-to-end flow) and by `fix-bug` (when no bug file exists). Does not write the bug file — that is `investigate-bug`'s responsibility.
10
+
11
+ Four phases — do not skip. Update the active `specs/bugs/BUG-*.md` file at each phase.
12
+
13
+ ## Phases
14
+
15
+ 1. **Reproduce** — minimal steps; record environment; capture logs.
16
+ 2. **Isolate** — narrow to module/function; binary-search commits or config.
17
+ 3. **Hypothesize** — list ranked hypotheses with falsification test each.
18
+ 4. **Verify** — run falsification; confirm single root cause; link to fix plan.
19
+
20
+ > **HARD GATE** — Do not propose a fix until phase 4 confirms one root cause with evidence.
21
+
22
+ ## Verify
23
+
24
+ → verify: `BUG_FILE=$(ls -t specs/bugs/BUG-*.md 2>/dev/null | head -1); test -n "$BUG_FILE" && grep -cE "Reproduce|Isolate|Hypothesize|Verify" "$BUG_FILE" | awk '{if($1>=4) print "OK"; else print "INCOMPLETE"}' || echo "MISSING"`
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: diagnose-stall
3
+ model: haiku
4
+ description: "Diagnose why agent orchestration stopped producing progress — silent stalls in /loop, dispatch-agents, or execute-plan. Use when work appears hung, no output for several minutes, or a subagent never returned."
5
+ ---
6
+
7
+ # Diagnose Stall
8
+
9
+ > **HARD GATE** — Do NOT restart work blindly. Run this diagnostic first when orchestration goes quiet without an explicit terminal state.
10
+
11
+ Explicit handler for silent stalls in long-running agent workflows (`/loop`, `dispatch-agents`, `execute-plan`, `build-epic` resume mode).
12
+
13
+ ## Stall signals
14
+
15
+ | Signal | Likely cause |
16
+ |--------|----------------|
17
+ | No stdout for >5 min on a monitored loop tick | Sleep/watcher misconfigured or prompt never re-armed |
18
+ | Subagent dispatched but no completion message | Agent hung, blocked on approval, or scope too large |
19
+ | `dispatch-agents` cycle 3 reached with gaps | Circuit exhausted — needs human escalation |
20
+ | Verify command running >15 min | Missing timeout or waiting on external service |
21
+ | `handoff.next_skill` unchanged across turns | Prior skill never wrote handoff |
22
+
23
+ ## Process
24
+
25
+ 1. **Read state** — `specs/state.yaml`: `handoff.next_skill`, `active_flow`, `metrics.story_start`, open decisions.
26
+ 2. **Check locks** — `bash scripts/check-stale-locks.sh` if present; read `specs/agent-locks.yaml`.
27
+ 3. **Inspect terminals** — list background shells; note PIDs, last output timestamp, exit codes.
28
+ 4. **Classify stall type:**
29
+ - **waiting_approval** — tool blocked on user consent
30
+ - **blocked_dependency** — prior task incomplete or red gate
31
+ - **agent_exhausted** — max iterations/cycles reached
32
+ - **misconfigured_loop** — duplicate sentinel, wrong regex, or sleeper not re-armed
33
+ - **external_io** — network, CI, or deploy wait without timeout
34
+ - **unknown** — escalate with evidence bundle
35
+ 5. **Recommend recovery** — one action only (resume, kill PID, re-dispatch with smaller brief, escalate to user).
36
+ 6. **Write report** — `specs/verifications/STALL-<timestamp>.md` with classification, evidence, and recommended next skill.
37
+
38
+ ## Integration
39
+
40
+ | Caller | When to invoke |
41
+ |--------|----------------|
42
+ | `/loop` (Cursor) | After two consecutive ticks with no observable progress |
43
+ | `dispatch-agents` | When a wave exceeds expected duration with zero returns |
44
+ | `execute-plan` | When a step checkpoint is overdue |
45
+ | User | "Why did this stop?" / "Nothing is happening" |
46
+
47
+ ## Verify
48
+
49
+ → verify: `test -f specs/state.yaml && echo "OK: diagnose-stall can read session state" || echo "WARN: no state.yaml — diagnostic limited"`
50
+
51
+ ## Handoff
52
+
53
+ Gate: READY → next: survey-context (if state unclear) or resume prior skill from `state.yaml`
54
+ Writes: `specs/verifications/STALL-*.md`
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: dispatch-agents
3
+ model: sonnet
4
+ description: "Dispatch multiple subagents in parallel on independent tasks. No waiting between them — all run concurrently. Use when tasks are truly decoupled and speed matters. Distinct from delegate-task (concurrent here, no inter-task review gate)."
5
+ ---
6
+
7
+ # story: e09s04
8
+ # story: e45s38
9
+ <!-- story: e45s11 -->
10
+
11
+
12
+ # story: e45s30
13
+
14
+ # Dispatch Agents
15
+ > **HARD GATE** — **HARD GATE** — Agent work must be parallelizable and have explicit synchronization points. Do NOT dispatch work that has hidden dependencies between agents.
16
+
17
+
18
+ Run multiple subagents in parallel on independent tasks. Use when tasks are genuinely decoupled — no agent needs the output of another to start.
19
+
20
+ **Distinct from `delegate-task`:** This skill maximizes throughput via concurrency. There is no sequential review gate between tasks. Use `delegate-task` instead when a single task needs careful two-stage oversight before proceeding.
21
+
22
+ ## When to use
23
+
24
+ - Tasks that can run simultaneously without shared state
25
+ - Large plans that can be broken into parallel workstreams
26
+ - Exploration: gather information from multiple parts of the codebase at once
27
+
28
+ ## When NOT to use
29
+
30
+ - Task B depends on Task A's output
31
+ - You need to review Task A before Task B can start safely
32
+ - The tasks share a file and concurrent edits would conflict
33
+
34
+ ## Process
35
+
36
+ ### 1. Confirm independence
37
+
38
+ Before dispatching, verify each task pair is truly independent:
39
+ - No shared files being written
40
+ - No shared state (DB migrations, config files)
41
+ - No ordering dependency between outcomes
42
+
43
+ If any two tasks conflict, sequence them with `delegate-task` or `execute-plan` instead.
44
+
45
+ ## Subagent depth tiers (e45s30)
46
+
47
+ Map `effort:` frontmatter and story `risk:` to prompt depth — do not send `minimal_decisive` agents a `full_maturity` brief.
48
+
49
+ | Tier | When | Brief shape | Token budget |
50
+ |------|------|-------------|----------------|
51
+ | `full_maturity` | `effort: heavy`, `risk: P0`, security-sensitive diffs | Full `task_brief` + CONVENTIONS excerpts + threat model if present | Full envelope |
52
+ | `standard` | `effort: standard`, `risk: P1`–`P2` | Standard `task_brief` fields below | Default |
53
+ | `minimal_decisive` | `effort: light`, `risk: P3`, read-only exploration | `goal` + `verify` + `in_scope` only | ≤15 lines |
54
+
55
+ Record `depth: <tier>` in the Agent tool description when dispatching.
56
+
57
+ ### 2. Write typed task briefs (Orca message protocol)
58
+
59
+ Before writing briefs, read `specs/state.yaml` if it exists — each agent gets only the decisions relevant to its task, nothing else.
60
+
61
+ Every inter-agent message uses a **typed envelope** — no freeform prose between waves:
62
+
63
+ | `type` | When | Required fields |
64
+ |--------|------|-----------------|
65
+ | `task_brief` | Dispatch | `task_id`, `goal`, `in_scope`, `out_of_bounds`, `verify`, `prior_decisions` |
66
+ | `checkpoint` | Mid-wave progress | `task_id`, `status` (`running`\|`blocked`), `comment` (one line) |
67
+ | `result` | Agent return | `task_id`, `exit` (`pass`\|`fail`), `summary`, `verify_output` |
68
+ | `circuit_open` | 3 consecutive failures | `task_id`, `failures` (3), `escalate_to` (`user`) |
69
+
70
+ Example `task_brief` (each agent starts cold — brief size directly controls token cost and hallucination risk):
71
+
72
+ ```yaml
73
+ type: task_brief
74
+ task_id: agent-1
75
+ goal: [one sentence — what success looks like]
76
+ in_scope: [explicit file or module list]
77
+ out_of_bounds: [what NOT to touch]
78
+ verify: [runnable command]
79
+ prior_decisions: [relevant entries from specs/state.yaml — omit if none]
80
+ ```
81
+
82
+ Emit **`checkpoint`** comments when an agent is slow or blocked — one line, no stack traces. Parent reads checkpoints before spawning follow-ups.
83
+
84
+ Do not include the full conversation, full file contents, or decisions unrelated to this agent's task.
85
+
86
+ ### 3. Circuit breaker + iterative retrieval (max 3 cycles)
87
+
88
+ Track **consecutive failures per `task_id`**. On the **3rd consecutive `result.exit: fail`** for the same task, emit `type: circuit_open` and **stop dispatching** that task — escalate to user with the three failure summaries. Reset counter on any `pass`.
89
+
90
+ After each wave completes:
91
+ 1. **Dispatch** — run parallel agents with typed `task_brief` envelopes.
92
+ 2. **Evaluate** — read `result` messages; list gaps vs goal; honor open circuits.
93
+ 3. **Refine** — tighten briefs or spawn follow-up agents (max **3 cycles** total).
94
+
95
+ Stop when gaps empty, circuit opens, or cycle 3 reached — escalate to user. If agents go silent without returning, invoke `diagnose-stall` before spawning another wave.
96
+
97
+ ### 4. Dispatch in parallel
98
+
99
+ Spawn all agents in a single message using multiple Agent tool calls. Each agent gets its own complete brief.
100
+
101
+ ```
102
+ Agent 1: brief for task A
103
+ Agent 2: brief for task B
104
+ Agent 3: brief for task C
105
+ ```
106
+
107
+ ### 5. Collect and review results
108
+
109
+ When all agents return: review each result, run verify commands, check diffs for scope violations.
110
+
111
+ ### 6. Integrate
112
+
113
+ Merge accepted results. Resolve conflicts manually; note in summary.
114
+
115
+ Report: which tasks succeeded, which need revision, overall verify status.
116
+
117
+ ## Verify
118
+ → verify: `grep -q 'circuit_open' skills/dispatch-agents/SKILL.md && grep -q 'task_brief' skills/dispatch-agents/SKILL.md && echo OK || echo FAIL`
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: edit-document
3
+ model: sonnet
4
+ description: "Edit and improve documents by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, restructure, or improve any document — including specs/ files, articles, READMEs, or technical writing."
5
+ ---
6
+
7
+ # Edit Document
8
+
9
+ **Distinct from `write-document`:** Use this skill when the document already exists and needs restructuring, clarity, or prose improvements. Use `write-document` to create a document from scratch.
10
+
11
+ > **HARD GATE** — Document edits must preserve intent and accuracy. Do NOT remove or contradict existing content without understanding why it was written. Check git history for context.
12
+
13
+ ## Process
14
+
15
+ 1. First, divide the document into sections based on its headings. Think about the main points made in each section.
16
+
17
+ Consider that information is a directed acyclic graph, and that pieces of information can depend on other pieces of information. Make sure that the order of the sections and their contents respects these dependencies.
18
+
19
+ Confirm the sections with the user.
20
+
21
+ 2. For each section:
22
+
23
+ 2a. Rewrite the section to improve clarity, coherence, and flow. Use maximum 240 characters per paragraph.
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: elaborate-spec
3
+ model: opus
4
+ description: "Refine a rough idea into a clear, detailed specification through dialogue. Does not produce code. Use when user has a vague idea, wants to think through a feature before planning, or needs to turn \"I want X\" into a concrete spec."
5
+ ---
6
+
7
+ # Elaborate Spec
8
+
9
+ Turn a rough idea into a clear specification through focused dialogue. No code is written during this skill — the output is shared understanding and a refined problem statement.
10
+
11
+ > **HARD GATE** — Do NOT proceed with planning or implementation until the problem space is clearly understood. Success criteria, actors, and scope must be explicit before drafting a plan.
12
+
13
+ ## Process
14
+
15
+ ### 1. Listen first
16
+
17
+ Let the user describe their idea in their own words. Do not interrupt or redirect. Take notes on:
18
+ - The core problem they're trying to solve
19
+ - Who is affected (actors)
20
+ - What success looks like to them
21
+ - Any constraints they've already identified
22
+
23
+ ### 2. Ask clarifying questions
24
+
25
+ Ask one question at a time. Work through these areas:
26
+
27
+ **Problem clarity**
28
+ - What is the current behavior (or lack of behavior) that prompted this?
29
+ - Who experiences this problem? How often?
30
+ - What's the cost of not solving it?
31
+
32
+ **Solution boundaries**
33
+ - What is explicitly IN scope?
34
+ - What is explicitly OUT of scope?
35
+ - Are there existing solutions (internal or external) this replaces or integrates with?
36
+
37
+ **Success criteria**
38
+ - How will you know this is done?
39
+ - What does the happy path look like end-to-end?
40
+ - What are the key failure modes to handle?
41
+
42
+ **Constraints**
43
+ - Any performance requirements?
44
+ - Any compatibility constraints (existing APIs, data formats)?
45
+ - Any non-negotiable implementation decisions already made?
46
+
47
+ ### 2.5. Multiple Interpretations (HARD GATE)
48
+
49
+ > **HARD GATE** — If the request admits ≥2 valid interpretations, do NOT guess. You must list them and ask the user to choose before proceeding. Proceeding with unresolved ambiguity is a failure of integrity.
50
+
51
+ Present the options clearly:
52
+ > "I see two ways to read this:
53
+ > 1. [Interpretation A] — my recommendation because [reason]
54
+ > 2. [Interpretation B]
55
+ > Which is closer to what you mean?"
56
+
57
+ ### 3. Surface hidden assumptions
58
+
59
+ Once the user has answered the main questions, probe for assumptions:
60
+ - "You mentioned X — does that mean Y is also true?"
61
+ - "What happens when Z fails?"
62
+ - "Is this for internal users, external users, or both?"
63
+
64
+ ### 4. Synthesize and confirm
65
+
66
+ Summarize your understanding in 3–5 bullet points aligned with [countable-story-format.md](https://github.com/danielvm-git/bigpowers/blob/main/docs/countable-story-format.md):
67
+ - The problem (feeds into §1 Business narrative)
68
+ - The solution and main flow (feeds into §5)
69
+ - The key constraints and alternative flows (feeds into §6)
70
+ - The success criteria (feeds into §17 Gherkin)
71
+ - What's out of scope (feeds into §18)
72
+
73
+ Ask: "Is this an accurate summary? Anything missing or wrong?"
74
+
75
+ ### 5. Write specs/planning-context.yaml
76
+
77
+ After the user confirms the summary in step 4, persist the key decisions:
78
+
79
+ ```yaml
80
+ # specs/planning-context.yaml — written by elaborate-spec; consumed by scope-work and slice-tasks
81
+ feature_name: "<from step 1>"
82
+ problem_statement: "<one paragraph>"
83
+ constraints:
84
+ - "<constraint 1>"
85
+ out_of_scope:
86
+ - "<excluded item 1>"
87
+ key_decisions:
88
+ - decision: "<what was decided>"
89
+ rationale: "<why>"
90
+ ```
91
+
92
+ If `specs/planning-context.yaml` already exists, ask: `"Planning context from a prior session exists. Update it? [Y/n]"`. Overwrite on Y; leave unchanged on N.
93
+
94
+ ### 6. Suggest next skill
95
+
96
+ Once the spec is clear, recommend the next step:
97
+ - If domain model needs work → `model-domain`
98
+ - If ready to plan → `plan-release` (creates epic capsules with `epic.yaml` + story `.md` + `-tasks.yaml`) then `plan-work` per story
99
+ - If a spike is needed first → `spike-prototype`
100
+ - If architecture decisions are needed → `deepen-architecture` or `grill-me`
101
+ - If the plan depends on a specific library or API → `grill-me` in docs mode
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: enforce-first
3
+ model: haiku
4
+ description: "Apply the F.I.R.S.T test quality rubric (per CONVENTIONS.md §Tests) to a test suite or individual tests. Use when develop-tdd is writing tests, when test quality needs to be checked, or when user mentions F.I.R.S.T or \"test quality\"."
5
+ ---
6
+
7
+ # Enforce FIRST
8
+ > **HARD GATE** — **HARD GATE** — Before shipping, ALL enforcement checks must pass: lint, typecheck, tests, coverage gates. Do NOT disable or skip checks to get to green.
9
+
10
+
11
+ Apply the F.I.R.S.T rubric per CONVENTIONS.md §Tests to evaluate and improve tests.
12
+
13
+ This skill is typically invoked internally by `develop-tdd` during the test-writing phase. It can also be run standalone on an existing test suite.
14
+
15
+ ## Modes
16
+
17
+ - Default: full F.I.R.S.T audit (all 5 criteria)
18
+ - --quick: Check Fast, Independent, and Self-Validating criteria only (per CONVENTIONS.md §Tests). Used by build-epic step 6 as a mechanical gate after audit-code. Skips Repeatable and Timely which require contextual judgment.
19
+
20
+ ## The F.I.R.S.T Rubric
21
+
22
+ See CONVENTIONS.md §Tests for the canonical F.I.R.S.T rubric definition, checklists, and fix patterns.
23
+
24
+ ## Applying the rubric
25
+
26
+ For each failing criterion:
27
+ 1. Identify which tests violate it
28
+ 2. Describe the fix
29
+ 3. Apply the fix
30
+ 4. Re-run the suite to confirm it still passes
31
+
32
+ Report: "F.I.R.S.T audit complete. X criteria passed, Y fixed."
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: evolve-skill
3
+ model: opus
4
+ description: "Benchmark-gated skill evolution — consume bigpowers-benchmark report, propose plan-work change, edit skill via craft-skill, re-run benchmark, record ADR. Use when a skill underperforms on benchmark or stocktake finds systemic gap."
5
+ ---
6
+
7
+ # story: e23s03
8
+
9
+ # story: e09s01
10
+ # story: e09s05
11
+
12
+ # Evolve Skill
13
+
14
+ > **HARD GATE** — No skill change ships without benchmark score ≥ pre-change baseline. Learning is measured and versioned — never implicit.
15
+
16
+ ## Loop
17
+
18
+ 1. **Regression gate** — Run `bash scripts/run-verification-gates.sh` to catch mechanical regressions (compliance, sync pipeline, size budget) before spending time on benchmark evals. If golden suite fails, fix regressions first — they are pre-requisites for any capability improvement.
19
+ 2. **Establish baseline** — Run `run-benchmark <skill> --baseline`. If no definition exists at `specs/benchmarks/<skill>.yaml`, create one following `specs/benchmarks/SCHEMA.md` first. Save report path in `state.yaml`. If `specs/benchmarks/reports/BASELINE-<skill>.yaml` already exists, skip this step.
20
+
21
+ 3. **Identify gap** — Read the baseline report (`specs/benchmarks/reports/BASELINE-<skill>.yaml`). Find scenarios with `result: FAIL` or low `pass_at_k`. This is the measurable gap.
22
+
23
+ 4. **`plan-work`** — Write a minimal change proposal targeting the failing scenarios. Include verify commands.
24
+
25
+ 5. **Edit** via `craft-skill` / direct SKILL.md edit; run `bash scripts/sync-skills.sh`.
26
+
27
+ 6. **Re-run benchmark** — `run-benchmark <skill>`. Compare new `pass_at_k` against baseline.
28
+ - **IMPROVED or STABLE** → advance to step 6.
29
+ - **REGRESSION** (`new pass_at_k < baseline`) → revert the change and loop back to step 3.
30
+
31
+ 7. **Record decision** — Write `specs/adr/NNNN-evolve-<skill>.md` with before/after `pass_at_k` scores. Update `session-state`.
32
+
33
+ ## Verify
34
+
35
+ → verify: `grep -c 'run-benchmark\|pass_at_k\|BASELINE-' skills/evolve-skill/SKILL.md | awk '{if($1>=2) print "OK"; else print "FAIL"}'`
36
+
37
+ See [REFERENCE.md](REFERENCE.md) for ADR template.
38
+
39
+
40
+ <!-- story: e31s07 -->
41
+
42
+ ---
43
+
44
+ # Evolve Skill — ADR snippet
45
+
46
+ ```markdown
47
+ ## ADR-XXXX: Evolve &lt;skill-name&gt;
48
+
49
+ **Status:** Accepted
50
+ **Benchmark:** before X% / after Y%
51
+ **Change:** one-sentence summary
52
+ **Evidence:** path/to/benchmark-report.md
53
+ ```
54
+
55
+ Benchmark repo: `bigpowers-benchmark` — resolve the local clone on this machine (e.g. `gh repo clone danielvm-git/bigpowers-benchmark` if absent); never assume a hard-coded absolute path.
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: execute-plan
3
+ model: haiku
4
+ description: "Batch-execute tasks from the active epic capsule sequentially, with a human checkpoint after each step. Use when user has an approved plan and wants step-by-step oversight."
5
+ ---
6
+
7
+ # Execute Plan
8
+
9
+ Execute tasks from the **active epic** (`specs/epics/eNN-slug/epic.yaml` story `tasks[]`) one at a time, showing evidence after each step before proceeding.
10
+
11
+ > **HARD GATE** — Do NOT proceed if on `main` or `master`. Run `kickoff-branch` first.
12
+ >
13
+ > **HARD GATE** — Active epic must exist with runnable `verify` on each task. If missing, run `plan-release` then `plan-work` or `build-epic`.
14
+
15
+ ## Process
16
+
17
+ ### 1. Read the plan
18
+
19
+ Read `specs/state.yaml` (`active_epic`, `active_story`) and the matching `specs/epics/*/epic.yaml`. Parse `depends-on` in task descriptions for execution waves.
20
+
21
+ > **CONTEXT ISOLATION** — Spawn each skill with a **fresh context window**. Pass decisions only through `specs/state.yaml` `handoff` — never rely on prior chat history.
22
+
23
+ Confirm with the user: step count, skip/reorder, stop-after step.
24
+
25
+ ### 2. Execute step by step
26
+
27
+ For each task in the active story:
28
+
29
+ **a. Announce** — task `desc` and `verify` command.
30
+
31
+ **b. Execute** — code or `delegate-task` / `dispatch-agents` for waves.
32
+
33
+ **c. Run verify** — must be green before advancing.
34
+
35
+ **d. Log** — non-obvious decisions in `specs/state.yaml` under `decisions[]` or `handoff` block.
36
+
37
+ **e. Checkpoint** — ask to proceed unless autonomous mode requested.
38
+
39
+ **f. Story UAT** — after last task, run manual verification script from story notes or `verify-work`.
40
+
41
+ On verify failure: fix and re-run; never advance on red.
42
+
43
+ Update `specs/execution-status.yaml` when a story/epic completes (`bash scripts/sync-status-from-epics.sh` or direct edit).
44
+
45
+ ### 3. Blockers
46
+
47
+ Report blocker; ask skip/adapt/stop; update epic capsule if plan changes.
48
+
49
+ ### 4. Final report
50
+
51
+ Suggest: `verify-work` → `run-evals` → `audit-code` → `simulate-agents` → `commit-message` → `release-branch`
52
+
53
+ ## Rules
54
+
55
+ - **Loop until behavioral correctness is verified**: if a verify command passes but the observed behavior is still wrong, return to step 1 and run the execution cycle again.
56
+
57
+
58
+
59
+ <!-- story: e02s03 -->
60
+ <!-- story: e05s02 -->
61
+ <!-- story: e08s01 -->
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: extract-design
3
+ model: sonnet
4
+ description: "Extract a Google DESIGN.md file from an HTML prototype (claude.ai/design or any styled page) using Puppeteer, producing machine-readable tokens and AI-generated prose. Use when the user has an HTML prototype and wants a DESIGN.md to anchor their project's visual identity, or when seed-conventions has just scaffolded a new project."
5
+ ---
6
+
7
+ # Extract DESIGN.md from HTML
8
+
9
+ > **HARD GATE** — Do NOT write DESIGN.md without Puppeteer dual-pass extraction. Tokens from static HTML (Cheerio, regex, string scanning) are invalid — they miss cascade, custom properties, and Tailwind resolution.
10
+ >
11
+ > **HARD GATE** — Do NOT claim certainty where evidence is thin. Low-confidence color roles, component classifications, and prose assertions MUST be flagged with `<!-- AGENT NOTE: uncertain — validate during grill-me. Evidence: [what was observed] -->`.
12
+ >
13
+ > **HARD GATE** — Do NOT ship DESIGN.md without running `npx @google/design.md lint`. Unvalidated output is unverified output. If lint is unavailable (offline), flag prominently in terminal and in DESIGN.md prose.
14
+
15
+ ## Quick Start
16
+
17
+ ```bash
18
+ # First run — extract from HTML prototype
19
+ node extract-design/scripts/extract.js --source ./prototype.html
20
+
21
+ # From a published URL
22
+ node extract-design/scripts/extract.js --source https://my-prototype.example.com
23
+
24
+ # With a custom name
25
+ node extract-design/scripts/extract.js --source ./proto.html --name "My Design System"
26
+
27
+ # Update — re-extract from new HTML, diff against existing
28
+ node extract-design/scripts/extract.js --source ./proto-v2.html
29
+
30
+ # Lint-only — validate existing DESIGN.md without re-extraction
31
+ node extract-design/scripts/extract.js --lint-only
32
+ ```
33
+
34
+ ## Flow
35
+
36
+ 1. **Launch Puppeteer** — dual-pass (light + dark) with retry + timeout. CI flags: `--headless=new --no-sandbox --disable-gpu --disable-dbus --use-gl=angle --use-angle=swiftshader`.
37
+ 2. **Collect styles** — `page.evaluate()` collects computed styles from every element. Returns raw JSON to Node.js. Browser = sensor; Node = brain.
38
+ 3. **Classify tokens** — modular pipeline: colors (Material 3 roles), typography (scale detection), spacing (tolerance GCD), rounded (clustering), components (visual signature + pseudo-state variants).
39
+ 4. **Generate prose** — AI heuristics produce all 8 DESIGN.md sections. Overview and Do's/Don'ts flagged with agent notes.
40
+ 5. **Write + validate** — serialize to `specs/tech-architecture/DESIGN_LATEST.md`, run `npx @google/design.md lint`, report to terminal.
41
+ 6. **Handoff** — writes `handoff.next_skill: grill-me` to `specs/state.yaml` with uncertain decisions context.
42
+
43
+ ## Inputs
44
+
45
+ | Parameter | Required | Description |
46
+ |-----------|----------|-------------|
47
+ | `--source <file\|url>` | First run: yes. Update: optional | HTML prototype path or URL |
48
+ | `--name <string>` | No | Design system name (defaults to `<title>` or directory name) |
49
+ | `--lint-only` | No | Validate existing DESIGN.md without re-extraction |
50
+
51
+ ## Output
52
+
53
+ - `specs/tech-architecture/DESIGN_LATEST.md` — replaces `DESIGN_PLAN_LATEST.md` as the canonical design artifact
54
+ - Terminal summary: token counts, component count, lint result, uncertain decisions
55
+ - Structured JSON log to stderr: extraction events, timing, counts
56
+ - `specs/state.yaml` → `handoff.next_skill: grill-me` with context
57
+
58
+ ## Error Tiers
59
+
60
+ | Tier | Condition | Response |
61
+ |------|-----------|----------|
62
+ | Fatal | No Chrome, page load timeout after retries | Exit non-zero, suggest fixes |
63
+ | Degraded | Zero colors, zero typography, SPA shell | Write DESIGN.md with degradation warning |
64
+ | Warned | Lint errors, uncertain decisions | Write DESIGN.md, flag in terminal, hand off to grill-me |
65
+
66
+ ## Dependencies
67
+
68
+ - **Puppeteer** (Chrome binary) — wrapped behind `BrowserExtractor` interface for testability
69
+ - **`@google/design.md`** (soft, via `npx`) — wrapped behind `DesignValidator` interface. Warns and skips if offline.
70
+
71
+ ## verify
72
+
73
+ ```bash
74
+ node extract-design/tests/test-extraction.js
75
+ ```
76
+
77
+ See [REFERENCE.md](REFERENCE.md) for extraction algorithms and heuristics.
78
+
79
+ ---
80
+
81
+ # Extract Design — Reference
82
+
83
+ ## Extraction Algorithms
84
+
85
+ ### Color Classification
86
+ 1. Collect unique computed `background-color`, `color`, `border-color` from every DOM element.
87
+ 2. Count frequency and context (text vs. bg vs. border vs. button).
88
+ 3. Classify using Material 3 roles: surface = largest-area bg, on-surface = most-used text, tertiary = highest-saturation on CTAs, error = reddish.
89
+ 4. Surface container levels: luminance-ordered. Hard-cap at 3 unless data supports 5.
90
+ 5. Low-confidence → `<!-- AGENT NOTE -->` in Colors prose.
91
+
92
+ ### Typography Classification
93
+ 1. Collect unique (fontFamily, fontSize, fontWeight, lineHeight, letterSpacing) tuples.
94
+ 2. Cluster by fontSize (±2px) → type scale.
95
+ 3. Detect heading hierarchy from HTML tag + computed size.
96
+ 4. Name levels: display-lg, headline-lg/md/sm, title-lg, body-lg/md/sm, label-lg/md/sm.
97
+ 5. Parse `<link>` and `@font-face`; warn if computed font differs from declared.
98
+
99
+ ### Spacing Classification
100
+ 1. Collect unique padding, margin, gap values. Filter: ignore values < 3 occurrences.
101
+ 2. Compute tolerance-based GCD (0.5px tolerance).
102
+ 3. Declare base unit. Detect half-step if gcd/2 values present ≥3 times.
103
+ 4. Map: unit×1 → sm, ×2 → md, ×4 → lg, ×8 → xl.
104
+
105
+ ### Rounded Classification
106
+ 1. Collect unique border-radius values. Cluster (1px tolerance).
107
+ 2. Name: none (0), sm (smallest), md (median), lg (large), xl (largest), full (9999px).
108
+
109
+ ### Component Detection
110
+ - Button: w<300px, h<64px, bg+radius set, short text. cursor:pointer is bonus.
111
+ - Card: bg+radius+padding set, larger area.
112
+ - Input: `<input>` or `<textarea>` tag.
113
+ - Pseudo-state variants: force :hover, :active, :focus for high-confidence components.
114
+
115
+ ### Prose Generation
116
+ Generates all 8 DESIGN.md sections. Overview and Do's/Don'ts flagged with `<!-- AGENT NOTE: Generated from visual analysis. Grill-me should validate. -->`.
117
+
118
+ ## Material 3 Token Conventions
119
+ Colors: primary, on-primary, secondary, tertiary, error, surface, on-surface, surface-container-*, outline, background, on-background.
120
+ Typography: display-lg/md/sm, headline-lg/md/sm, title-lg/md/sm, body-lg/md/sm, label-lg/md/sm.
121
+ Rounded: none, xs, sm, md, lg, xl, full.
122
+
123
+ ## CI Compatibility
124
+ Chrome flags: `--headless=new --no-sandbox --disable-gpu --disable-dbus --use-gl=angle --use-angle=swiftshader`
125
+
126
+ ## Defensive Code
127
+ Retry with backoff (3 attempts, 1s/2s/4s), Timeout (30s page load, 10s pseudo-state), Graceful degradation (Tier 2 on empty extraction).
128
+
129
+ ## Known Risks
130
+ - DESIGN.md spec is alpha. Skill pins to current spec.
131
+ - Puppeteer is heavy (~300MB Chrome). Document requirement clearly.
132
+ - Prose quality depends on AI heuristics. grill-me is the validation gate.