metaharness 0.3.2 → 0.4.1

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 (348) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +126 -99
  3. package/dist/completions-cmd.js +94 -94
  4. package/dist/index.js +74 -74
  5. package/dist/meta-proxy.d.ts +21 -1
  6. package/dist/meta-proxy.d.ts.map +1 -1
  7. package/dist/meta-proxy.js +139 -5
  8. package/dist/meta-proxy.js.map +1 -1
  9. package/dist/with-wasm.js +43 -43
  10. package/genomes/README.md +23 -23
  11. package/genomes/genome-promoted-cand6-edit-by-midpoint.json +26 -26
  12. package/package.json +126 -126
  13. package/templates/catalog.def.mjs +542 -542
  14. package/templates/catalog.json +1274 -1274
  15. package/templates/minimal/.claude/settings.json.tmpl +18 -18
  16. package/templates/minimal/.claude-plugin/plugin.json.tmpl +13 -13
  17. package/templates/minimal/CLAUDE.md.tmpl +26 -26
  18. package/templates/minimal/README.md.tmpl +20 -20
  19. package/templates/minimal/__tests__/smoke.test.ts.tmpl +37 -37
  20. package/templates/minimal/bin/cli.js.tmpl +100 -100
  21. package/templates/minimal/manifest.json +20 -20
  22. package/templates/minimal/package.json.tmpl +31 -31
  23. package/templates/minimal/src/init.ts.tmpl +21 -21
  24. package/templates/minimal/tsconfig.json.tmpl +19 -19
  25. package/templates/minimal/vitest.config.ts.tmpl +23 -23
  26. package/templates/vertical_advertising/.claude/commands/doctor.md.tmpl +12 -12
  27. package/templates/vertical_advertising/.claude/settings.json.tmpl +33 -33
  28. package/templates/vertical_advertising/.claude/skills/media-plan/SKILL.md.tmpl +13 -13
  29. package/templates/vertical_advertising/.claude-plugin/plugin.json.tmpl +23 -23
  30. package/templates/vertical_advertising/CLAUDE.md.tmpl +30 -30
  31. package/templates/vertical_advertising/README.md.tmpl +29 -29
  32. package/templates/vertical_advertising/__tests__/smoke.test.ts.tmpl +37 -37
  33. package/templates/vertical_advertising/bin/cli.js.tmpl +100 -100
  34. package/templates/vertical_advertising/manifest.json +101 -101
  35. package/templates/vertical_advertising/package.json.tmpl +30 -30
  36. package/templates/vertical_advertising/src/agents/copywriter.ts.tmpl +7 -7
  37. package/templates/vertical_advertising/src/agents/media-planner.ts.tmpl +7 -7
  38. package/templates/vertical_advertising/src/agents/performance-analyst.ts.tmpl +7 -7
  39. package/templates/vertical_advertising/src/init.ts.tmpl +21 -21
  40. package/templates/vertical_advertising/tsconfig.json.tmpl +19 -19
  41. package/templates/vertical_advertising/vitest.config.ts.tmpl +23 -23
  42. package/templates/vertical_agentics/.claude/commands/doctor.md.tmpl +12 -12
  43. package/templates/vertical_agentics/.claude/settings.json.tmpl +33 -33
  44. package/templates/vertical_agentics/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
  45. package/templates/vertical_agentics/.claude/skills/run-swarm/SKILL.md.tmpl +14 -14
  46. package/templates/vertical_agentics/.claude-plugin/plugin.json.tmpl +23 -23
  47. package/templates/vertical_agentics/CLAUDE.md.tmpl +32 -32
  48. package/templates/vertical_agentics/README.md.tmpl +30 -30
  49. package/templates/vertical_agentics/__tests__/smoke.test.ts.tmpl +37 -37
  50. package/templates/vertical_agentics/bin/cli.js.tmpl +100 -100
  51. package/templates/vertical_agentics/manifest.json +111 -111
  52. package/templates/vertical_agentics/package.json.tmpl +30 -30
  53. package/templates/vertical_agentics/src/agents/critic.ts.tmpl +7 -7
  54. package/templates/vertical_agentics/src/agents/orchestrator.ts.tmpl +7 -7
  55. package/templates/vertical_agentics/src/agents/planner.ts.tmpl +7 -7
  56. package/templates/vertical_agentics/src/agents/worker.ts.tmpl +7 -7
  57. package/templates/vertical_agentics/src/init.ts.tmpl +21 -21
  58. package/templates/vertical_agentics/tsconfig.json.tmpl +19 -19
  59. package/templates/vertical_agentics/vitest.config.ts.tmpl +23 -23
  60. package/templates/vertical_ai/.claude/commands/doctor.md.tmpl +12 -12
  61. package/templates/vertical_ai/.claude/settings.json.tmpl +35 -35
  62. package/templates/vertical_ai/.claude/skills/eval-report/SKILL.md.tmpl +13 -13
  63. package/templates/vertical_ai/.claude-plugin/plugin.json.tmpl +23 -23
  64. package/templates/vertical_ai/CLAUDE.md.tmpl +31 -31
  65. package/templates/vertical_ai/README.md.tmpl +30 -30
  66. package/templates/vertical_ai/__tests__/smoke.test.ts.tmpl +37 -37
  67. package/templates/vertical_ai/bin/cli.js.tmpl +100 -100
  68. package/templates/vertical_ai/manifest.json +106 -106
  69. package/templates/vertical_ai/package.json.tmpl +30 -30
  70. package/templates/vertical_ai/src/agents/data-curator.ts.tmpl +7 -7
  71. package/templates/vertical_ai/src/agents/deployer.ts.tmpl +7 -7
  72. package/templates/vertical_ai/src/agents/evaluator.ts.tmpl +7 -7
  73. package/templates/vertical_ai/src/agents/trainer.ts.tmpl +7 -7
  74. package/templates/vertical_ai/src/init.ts.tmpl +21 -21
  75. package/templates/vertical_ai/tsconfig.json.tmpl +19 -19
  76. package/templates/vertical_ai/vitest.config.ts.tmpl +23 -23
  77. package/templates/vertical_business/.claude/commands/doctor.md.tmpl +12 -12
  78. package/templates/vertical_business/.claude/settings.json.tmpl +33 -33
  79. package/templates/vertical_business/.claude/skills/quarterly-plan/SKILL.md.tmpl +13 -13
  80. package/templates/vertical_business/.claude-plugin/plugin.json.tmpl +23 -23
  81. package/templates/vertical_business/CLAUDE.md.tmpl +30 -30
  82. package/templates/vertical_business/README.md.tmpl +29 -29
  83. package/templates/vertical_business/__tests__/smoke.test.ts.tmpl +37 -37
  84. package/templates/vertical_business/bin/cli.js.tmpl +100 -100
  85. package/templates/vertical_business/manifest.json +101 -101
  86. package/templates/vertical_business/package.json.tmpl +30 -30
  87. package/templates/vertical_business/src/agents/analyst.ts.tmpl +7 -7
  88. package/templates/vertical_business/src/agents/ops-coordinator.ts.tmpl +7 -7
  89. package/templates/vertical_business/src/agents/strategist.ts.tmpl +7 -7
  90. package/templates/vertical_business/src/init.ts.tmpl +21 -21
  91. package/templates/vertical_business/tsconfig.json.tmpl +19 -19
  92. package/templates/vertical_business/vitest.config.ts.tmpl +23 -23
  93. package/templates/vertical_coding/.claude/commands/doctor.md.tmpl +12 -12
  94. package/templates/vertical_coding/.claude/commands/review-diff.md.tmpl +10 -10
  95. package/templates/vertical_coding/.claude/settings.json.tmpl +40 -40
  96. package/templates/vertical_coding/.claude/skills/plan-change/SKILL.md.tmpl +15 -15
  97. package/templates/vertical_coding/.claude-plugin/plugin.json.tmpl +23 -23
  98. package/templates/vertical_coding/CLAUDE.md.tmpl +32 -32
  99. package/templates/vertical_coding/README.md.tmpl +30 -30
  100. package/templates/vertical_coding/__tests__/smoke.test.ts.tmpl +37 -37
  101. package/templates/vertical_coding/bin/cli.js.tmpl +100 -100
  102. package/templates/vertical_coding/manifest.json +111 -111
  103. package/templates/vertical_coding/package.json.tmpl +30 -30
  104. package/templates/vertical_coding/src/agents/architect.ts.tmpl +7 -7
  105. package/templates/vertical_coding/src/agents/implementer.ts.tmpl +7 -7
  106. package/templates/vertical_coding/src/agents/reviewer.ts.tmpl +7 -7
  107. package/templates/vertical_coding/src/agents/test-writer.ts.tmpl +7 -7
  108. package/templates/vertical_coding/src/init.ts.tmpl +21 -21
  109. package/templates/vertical_coding/tsconfig.json.tmpl +19 -19
  110. package/templates/vertical_coding/vitest.config.ts.tmpl +23 -23
  111. package/templates/vertical_crm/.claude/commands/doctor.md.tmpl +12 -12
  112. package/templates/vertical_crm/.claude/settings.json.tmpl +33 -33
  113. package/templates/vertical_crm/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
  114. package/templates/vertical_crm/.claude-plugin/plugin.json.tmpl +23 -23
  115. package/templates/vertical_crm/CLAUDE.md.tmpl +30 -30
  116. package/templates/vertical_crm/README.md.tmpl +29 -29
  117. package/templates/vertical_crm/__tests__/smoke.test.ts.tmpl +37 -37
  118. package/templates/vertical_crm/bin/cli.js.tmpl +100 -100
  119. package/templates/vertical_crm/manifest.json +101 -101
  120. package/templates/vertical_crm/package.json.tmpl +30 -30
  121. package/templates/vertical_crm/src/agents/account-manager.ts.tmpl +7 -7
  122. package/templates/vertical_crm/src/agents/churn-watcher.ts.tmpl +7 -7
  123. package/templates/vertical_crm/src/agents/lead-qualifier.ts.tmpl +7 -7
  124. package/templates/vertical_crm/src/init.ts.tmpl +21 -21
  125. package/templates/vertical_crm/tsconfig.json.tmpl +19 -19
  126. package/templates/vertical_crm/vitest.config.ts.tmpl +23 -23
  127. package/templates/vertical_devops/.claude/settings.json.tmpl +36 -36
  128. package/templates/vertical_devops/.claude-plugin/plugin.json.tmpl +23 -23
  129. package/templates/vertical_devops/CLAUDE.md.tmpl +34 -34
  130. package/templates/vertical_devops/README.md.tmpl +27 -27
  131. package/templates/vertical_devops/__tests__/smoke.test.ts.tmpl +37 -37
  132. package/templates/vertical_devops/bin/cli.js.tmpl +100 -100
  133. package/templates/vertical_devops/manifest.json +100 -100
  134. package/templates/vertical_devops/package.json.tmpl +27 -27
  135. package/templates/vertical_devops/runbooks/README.md.tmpl +32 -32
  136. package/templates/vertical_devops/src/agents/escalator.ts.tmpl +19 -19
  137. package/templates/vertical_devops/src/agents/postmortem.ts.tmpl +23 -23
  138. package/templates/vertical_devops/src/agents/responder.ts.tmpl +14 -14
  139. package/templates/vertical_devops/src/agents/runbook-runner.ts.tmpl +17 -17
  140. package/templates/vertical_devops/src/init.ts.tmpl +23 -23
  141. package/templates/vertical_devops/tsconfig.json.tmpl +19 -19
  142. package/templates/vertical_devops/vitest.config.ts.tmpl +23 -23
  143. package/templates/vertical_education/.claude/commands/doctor.md.tmpl +12 -12
  144. package/templates/vertical_education/.claude/commands/mastery-report.md.tmpl +12 -12
  145. package/templates/vertical_education/.claude/settings.json.tmpl +45 -45
  146. package/templates/vertical_education/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
  147. package/templates/vertical_education/.claude/skills/teach-next/SKILL.md.tmpl +16 -16
  148. package/templates/vertical_education/.claude-plugin/plugin.json.tmpl +23 -23
  149. package/templates/vertical_education/CLAUDE.md.tmpl +33 -33
  150. package/templates/vertical_education/README.md.tmpl +30 -30
  151. package/templates/vertical_education/__tests__/smoke.test.ts.tmpl +37 -37
  152. package/templates/vertical_education/bin/cli.js.tmpl +100 -100
  153. package/templates/vertical_education/manifest.json +116 -116
  154. package/templates/vertical_education/package.json.tmpl +30 -30
  155. package/templates/vertical_education/src/agents/explainer.ts.tmpl +7 -7
  156. package/templates/vertical_education/src/agents/grader.ts.tmpl +7 -7
  157. package/templates/vertical_education/src/agents/quiz-master.ts.tmpl +7 -7
  158. package/templates/vertical_education/src/agents/tutor.ts.tmpl +7 -7
  159. package/templates/vertical_education/src/init.ts.tmpl +21 -21
  160. package/templates/vertical_education/tsconfig.json.tmpl +19 -19
  161. package/templates/vertical_education/vitest.config.ts.tmpl +23 -23
  162. package/templates/vertical_exotic/.claude/commands/doctor.md.tmpl +12 -12
  163. package/templates/vertical_exotic/.claude/settings.json.tmpl +44 -44
  164. package/templates/vertical_exotic/.claude/skills/evolve/SKILL.md.tmpl +14 -14
  165. package/templates/vertical_exotic/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
  166. package/templates/vertical_exotic/.claude-plugin/plugin.json.tmpl +23 -23
  167. package/templates/vertical_exotic/CLAUDE.md.tmpl +31 -31
  168. package/templates/vertical_exotic/README.md.tmpl +29 -29
  169. package/templates/vertical_exotic/__tests__/smoke.test.ts.tmpl +37 -37
  170. package/templates/vertical_exotic/bin/cli.js.tmpl +100 -100
  171. package/templates/vertical_exotic/manifest.json +106 -106
  172. package/templates/vertical_exotic/package.json.tmpl +30 -30
  173. package/templates/vertical_exotic/src/agents/experimenter.ts.tmpl +7 -7
  174. package/templates/vertical_exotic/src/agents/federator.ts.tmpl +7 -7
  175. package/templates/vertical_exotic/src/agents/hypothesizer.ts.tmpl +7 -7
  176. package/templates/vertical_exotic/src/init.ts.tmpl +21 -21
  177. package/templates/vertical_exotic/tsconfig.json.tmpl +19 -19
  178. package/templates/vertical_exotic/vitest.config.ts.tmpl +23 -23
  179. package/templates/vertical_gaming/.claude/commands/design-doc-diff.md.tmpl +13 -13
  180. package/templates/vertical_gaming/.claude/commands/doctor.md.tmpl +12 -12
  181. package/templates/vertical_gaming/.claude/settings.json.tmpl +45 -45
  182. package/templates/vertical_gaming/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
  183. package/templates/vertical_gaming/.claude/skills/playtest-recap/SKILL.md.tmpl +16 -16
  184. package/templates/vertical_gaming/.claude-plugin/plugin.json.tmpl +23 -23
  185. package/templates/vertical_gaming/CLAUDE.md.tmpl +33 -33
  186. package/templates/vertical_gaming/README.md.tmpl +30 -30
  187. package/templates/vertical_gaming/__tests__/smoke.test.ts.tmpl +37 -37
  188. package/templates/vertical_gaming/bin/cli.js.tmpl +100 -100
  189. package/templates/vertical_gaming/manifest.json +116 -116
  190. package/templates/vertical_gaming/package.json.tmpl +30 -30
  191. package/templates/vertical_gaming/src/agents/balance-critic.ts.tmpl +7 -7
  192. package/templates/vertical_gaming/src/agents/economy-modeler.ts.tmpl +7 -7
  193. package/templates/vertical_gaming/src/agents/narrative-keeper.ts.tmpl +7 -7
  194. package/templates/vertical_gaming/src/agents/playtest-reader.ts.tmpl +7 -7
  195. package/templates/vertical_gaming/src/init.ts.tmpl +21 -21
  196. package/templates/vertical_gaming/tsconfig.json.tmpl +19 -19
  197. package/templates/vertical_gaming/vitest.config.ts.tmpl +23 -23
  198. package/templates/vertical_health/.claude/commands/doctor.md.tmpl +12 -12
  199. package/templates/vertical_health/.claude/settings.json.tmpl +33 -33
  200. package/templates/vertical_health/.claude/skills/wellness-intake/SKILL.md.tmpl +15 -15
  201. package/templates/vertical_health/.claude-plugin/plugin.json.tmpl +23 -23
  202. package/templates/vertical_health/CLAUDE.md.tmpl +30 -30
  203. package/templates/vertical_health/README.md.tmpl +29 -29
  204. package/templates/vertical_health/__tests__/smoke.test.ts.tmpl +37 -37
  205. package/templates/vertical_health/bin/cli.js.tmpl +100 -100
  206. package/templates/vertical_health/manifest.json +101 -101
  207. package/templates/vertical_health/package.json.tmpl +30 -30
  208. package/templates/vertical_health/src/agents/care-coordinator.ts.tmpl +7 -7
  209. package/templates/vertical_health/src/agents/intake.ts.tmpl +7 -7
  210. package/templates/vertical_health/src/agents/triage.ts.tmpl +7 -7
  211. package/templates/vertical_health/src/init.ts.tmpl +21 -21
  212. package/templates/vertical_health/tsconfig.json.tmpl +19 -19
  213. package/templates/vertical_health/vitest.config.ts.tmpl +23 -23
  214. package/templates/vertical_legal/.claude/settings.json.tmpl +10 -10
  215. package/templates/vertical_legal/.claude-plugin/plugin.json.tmpl +23 -23
  216. package/templates/vertical_legal/CLAUDE.md.tmpl +24 -24
  217. package/templates/vertical_legal/README.md.tmpl +21 -21
  218. package/templates/vertical_legal/__tests__/smoke.test.ts.tmpl +37 -37
  219. package/templates/vertical_legal/bin/cli.js.tmpl +100 -100
  220. package/templates/vertical_legal/manifest.json +90 -90
  221. package/templates/vertical_legal/package.json.tmpl +14 -14
  222. package/templates/vertical_legal/src/agents/citation-checker.ts.tmpl +7 -7
  223. package/templates/vertical_legal/src/agents/redline.ts.tmpl +7 -7
  224. package/templates/vertical_legal/src/agents/risk-rater.ts.tmpl +8 -8
  225. package/templates/vertical_legal/src/init.ts.tmpl +13 -13
  226. package/templates/vertical_legal/tsconfig.json.tmpl +19 -19
  227. package/templates/vertical_legal/vitest.config.ts.tmpl +23 -23
  228. package/templates/vertical_marketing/.claude/commands/doctor.md.tmpl +12 -12
  229. package/templates/vertical_marketing/.claude/settings.json.tmpl +33 -33
  230. package/templates/vertical_marketing/.claude/skills/campaign-brief/SKILL.md.tmpl +13 -13
  231. package/templates/vertical_marketing/.claude-plugin/plugin.json.tmpl +23 -23
  232. package/templates/vertical_marketing/CLAUDE.md.tmpl +30 -30
  233. package/templates/vertical_marketing/README.md.tmpl +29 -29
  234. package/templates/vertical_marketing/__tests__/smoke.test.ts.tmpl +37 -37
  235. package/templates/vertical_marketing/bin/cli.js.tmpl +100 -100
  236. package/templates/vertical_marketing/manifest.json +101 -101
  237. package/templates/vertical_marketing/package.json.tmpl +30 -30
  238. package/templates/vertical_marketing/src/agents/content-creator.ts.tmpl +7 -7
  239. package/templates/vertical_marketing/src/agents/seo-analyst.ts.tmpl +7 -7
  240. package/templates/vertical_marketing/src/agents/strategist.ts.tmpl +7 -7
  241. package/templates/vertical_marketing/src/init.ts.tmpl +21 -21
  242. package/templates/vertical_marketing/tsconfig.json.tmpl +19 -19
  243. package/templates/vertical_marketing/vitest.config.ts.tmpl +23 -23
  244. package/templates/vertical_repo-maintainer/.claude/commands/doctor.md.tmpl +12 -12
  245. package/templates/vertical_repo-maintainer/.claude/commands/release-check.md.tmpl +13 -13
  246. package/templates/vertical_repo-maintainer/.claude/commands/repo-triage.md.tmpl +16 -16
  247. package/templates/vertical_repo-maintainer/.claude/settings.json.tmpl +44 -44
  248. package/templates/vertical_repo-maintainer/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
  249. package/templates/vertical_repo-maintainer/.claude/skills/plan-change/SKILL.md.tmpl +15 -15
  250. package/templates/vertical_repo-maintainer/.claude-plugin/plugin.json.tmpl +23 -23
  251. package/templates/vertical_repo-maintainer/CLAUDE.md.tmpl +34 -34
  252. package/templates/vertical_repo-maintainer/README.md.tmpl +30 -30
  253. package/templates/vertical_repo-maintainer/__tests__/smoke.test.ts.tmpl +37 -37
  254. package/templates/vertical_repo-maintainer/bin/cli.js.tmpl +100 -100
  255. package/templates/vertical_repo-maintainer/manifest.json +121 -121
  256. package/templates/vertical_repo-maintainer/package.json.tmpl +30 -30
  257. package/templates/vertical_repo-maintainer/src/agents/benchmarker.ts.tmpl +7 -7
  258. package/templates/vertical_repo-maintainer/src/agents/maintainer.ts.tmpl +7 -7
  259. package/templates/vertical_repo-maintainer/src/agents/release.ts.tmpl +7 -7
  260. package/templates/vertical_repo-maintainer/src/agents/security.ts.tmpl +7 -7
  261. package/templates/vertical_repo-maintainer/src/init.ts.tmpl +21 -21
  262. package/templates/vertical_repo-maintainer/tsconfig.json.tmpl +19 -19
  263. package/templates/vertical_repo-maintainer/vitest.config.ts.tmpl +23 -23
  264. package/templates/vertical_research/.claude/settings.json.tmpl +9 -9
  265. package/templates/vertical_research/.claude-plugin/plugin.json.tmpl +23 -23
  266. package/templates/vertical_research/CLAUDE.md.tmpl +33 -33
  267. package/templates/vertical_research/README.md.tmpl +17 -17
  268. package/templates/vertical_research/__tests__/smoke.test.ts.tmpl +37 -37
  269. package/templates/vertical_research/bin/cli.js.tmpl +100 -100
  270. package/templates/vertical_research/manifest.json +105 -105
  271. package/templates/vertical_research/package.json.tmpl +14 -14
  272. package/templates/vertical_research/src/agents/citer.ts.tmpl +8 -8
  273. package/templates/vertical_research/src/agents/fact-checker.ts.tmpl +8 -8
  274. package/templates/vertical_research/src/agents/scout.ts.tmpl +7 -7
  275. package/templates/vertical_research/src/agents/source-grader.ts.tmpl +10 -10
  276. package/templates/vertical_research/src/agents/synthesizer.ts.tmpl +8 -8
  277. package/templates/vertical_research/src/agents/web-searcher.ts.tmpl +6 -6
  278. package/templates/vertical_research/src/init.ts.tmpl +13 -13
  279. package/templates/vertical_research/tsconfig.json.tmpl +19 -19
  280. package/templates/vertical_research/vitest.config.ts.tmpl +23 -23
  281. package/templates/vertical_ruview/.claude/commands/doctor.md.tmpl +12 -12
  282. package/templates/vertical_ruview/.claude/settings.json.tmpl +33 -33
  283. package/templates/vertical_ruview/.claude/skills/index-and-ask/SKILL.md.tmpl +15 -15
  284. package/templates/vertical_ruview/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
  285. package/templates/vertical_ruview/.claude-plugin/plugin.json.tmpl +23 -23
  286. package/templates/vertical_ruview/CLAUDE.md.tmpl +31 -31
  287. package/templates/vertical_ruview/README.md.tmpl +29 -29
  288. package/templates/vertical_ruview/__tests__/smoke.test.ts.tmpl +37 -37
  289. package/templates/vertical_ruview/bin/cli.js.tmpl +100 -100
  290. package/templates/vertical_ruview/manifest.json +106 -106
  291. package/templates/vertical_ruview/package.json.tmpl +30 -30
  292. package/templates/vertical_ruview/src/agents/indexer.ts.tmpl +7 -7
  293. package/templates/vertical_ruview/src/agents/retriever.ts.tmpl +7 -7
  294. package/templates/vertical_ruview/src/agents/reviewer.ts.tmpl +7 -7
  295. package/templates/vertical_ruview/src/init.ts.tmpl +21 -21
  296. package/templates/vertical_ruview/tsconfig.json.tmpl +19 -19
  297. package/templates/vertical_ruview/vitest.config.ts.tmpl +23 -23
  298. package/templates/vertical_sales/.claude/commands/doctor.md.tmpl +12 -12
  299. package/templates/vertical_sales/.claude/commands/pipeline-report.md.tmpl +13 -13
  300. package/templates/vertical_sales/.claude/settings.json.tmpl +45 -45
  301. package/templates/vertical_sales/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
  302. package/templates/vertical_sales/.claude/skills/qualify-lead/SKILL.md.tmpl +15 -15
  303. package/templates/vertical_sales/.claude-plugin/plugin.json.tmpl +23 -23
  304. package/templates/vertical_sales/CLAUDE.md.tmpl +33 -33
  305. package/templates/vertical_sales/README.md.tmpl +30 -30
  306. package/templates/vertical_sales/__tests__/smoke.test.ts.tmpl +37 -37
  307. package/templates/vertical_sales/bin/cli.js.tmpl +100 -100
  308. package/templates/vertical_sales/manifest.json +116 -116
  309. package/templates/vertical_sales/package.json.tmpl +30 -30
  310. package/templates/vertical_sales/src/agents/closer.ts.tmpl +7 -7
  311. package/templates/vertical_sales/src/agents/demo-coach.ts.tmpl +7 -7
  312. package/templates/vertical_sales/src/agents/prospector.ts.tmpl +7 -7
  313. package/templates/vertical_sales/src/agents/qualifier.ts.tmpl +7 -7
  314. package/templates/vertical_sales/src/init.ts.tmpl +21 -21
  315. package/templates/vertical_sales/tsconfig.json.tmpl +19 -19
  316. package/templates/vertical_sales/vitest.config.ts.tmpl +23 -23
  317. package/templates/vertical_support/.claude/settings.json.tmpl +25 -25
  318. package/templates/vertical_support/.claude-plugin/plugin.json.tmpl +23 -23
  319. package/templates/vertical_support/CLAUDE.md.tmpl +34 -34
  320. package/templates/vertical_support/README.md.tmpl +16 -16
  321. package/templates/vertical_support/__tests__/smoke.test.ts.tmpl +37 -37
  322. package/templates/vertical_support/bin/cli.js.tmpl +100 -100
  323. package/templates/vertical_support/kb/README.md.tmpl +23 -23
  324. package/templates/vertical_support/manifest.json +100 -100
  325. package/templates/vertical_support/package.json.tmpl +25 -25
  326. package/templates/vertical_support/src/agents/escalator.ts.tmpl +6 -6
  327. package/templates/vertical_support/src/agents/kb-searcher.ts.tmpl +6 -6
  328. package/templates/vertical_support/src/agents/responder.ts.tmpl +7 -7
  329. package/templates/vertical_support/src/agents/triager.ts.tmpl +6 -6
  330. package/templates/vertical_support/src/init.ts.tmpl +16 -16
  331. package/templates/vertical_support/tsconfig.json.tmpl +19 -19
  332. package/templates/vertical_support/vitest.config.ts.tmpl +23 -23
  333. package/templates/vertical_trading/.claude/settings.json.tmpl +20 -20
  334. package/templates/vertical_trading/.claude-plugin/plugin.json.tmpl +23 -23
  335. package/templates/vertical_trading/CLAUDE.md.tmpl +24 -24
  336. package/templates/vertical_trading/README.md.tmpl +17 -17
  337. package/templates/vertical_trading/__tests__/smoke.test.ts.tmpl +37 -37
  338. package/templates/vertical_trading/bin/cli.js.tmpl +100 -100
  339. package/templates/vertical_trading/manifest.json +100 -100
  340. package/templates/vertical_trading/package.json.tmpl +14 -14
  341. package/templates/vertical_trading/src/agents/executor.ts.tmpl +8 -8
  342. package/templates/vertical_trading/src/agents/market-watcher.ts.tmpl +7 -7
  343. package/templates/vertical_trading/src/agents/postmortem.ts.tmpl +8 -8
  344. package/templates/vertical_trading/src/agents/risk-checker.ts.tmpl +11 -11
  345. package/templates/vertical_trading/src/agents/signal-gen.ts.tmpl +8 -8
  346. package/templates/vertical_trading/src/init.ts.tmpl +20 -20
  347. package/templates/vertical_trading/tsconfig.json.tmpl +19 -19
  348. package/templates/vertical_trading/vitest.config.ts.tmpl +23 -23
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 RuvNet (https://ruv.io)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 RuvNet (https://ruv.io)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,82 +1,82 @@
1
- # metaharness
2
-
3
- Scaffold your own focused AI agent harness — like [ruflo](https://github.com/ruvnet/ruflo), uniquely yours.
4
-
5
- > **Proven at the cost-Pareto frontier.** Same "evolve the harness" thesis, measured: the Darwin harness resolves
6
- > real **SWE-bench Lite** issues at **34.0%** single-trajectory (~$0.005/inst) and **39.7%** Best-of-3
7
- > (~$0.015/inst) — conformant, official harness. Live
8
- > **[Cost–Performance leaderboard](https://ruvnet.github.io/agent-harness-generator/cost-pareto.html)** ·
9
- > [`@metaharness/darwin`](https://www.npmjs.com/package/@metaharness/darwin).
10
-
11
- > Published as **`metaharness`** (the `metaharness` and `harness` CLIs). Earlier versions were published as `create-agent-harness`.
12
-
13
- ## Quick start
14
-
15
- ```bash
16
- npx metaharness my-bot
17
- ```
18
-
19
- You'll be prompted for template, host, description. Out comes a complete npm package ready to `npm publish`.
20
-
21
- ## Non-interactive
22
-
23
- ```bash
24
- npx metaharness my-legal-bot \
25
- --template vertical:legal \
26
- --host claude-code \
27
- --description "Contract redline + risk rating"
28
- ```
29
-
30
- ## Templates
31
-
32
- | Template | Best for |
33
- |---|---|
34
- | `minimal` | Custom starter — kernel only |
35
- | `vertical:devops` | Incident response, on-call workflows |
36
- | `vertical:support` | Customer support, KB-RAG, escalation |
37
- | `vertical:trading` | Quant trading (paper-default, circuit breakers) |
38
- | `vertical:legal` | Contract review with citation checking |
39
- | `vertical:research` | Multi-source dossier with evidence grading |
40
-
41
- ## Hosts
42
-
43
- `--host` selects which host adapter ships with your harness:
44
-
45
- | Host | What you get |
46
- |---|---|
47
- | `claude-code` | `.claude/settings.json` with MCP + hooks |
48
- | `codex` | `~/.codex/config.toml` with `[mcp_servers.*]` |
49
- | `pi-dev` | Pi extension (TypeScript, no MCP by design) |
50
- | `hermes` | `cli-config.yaml` + `optional-mcps/*.yaml` |
51
- | `openclaw` | `~/.openclaw/openclaw.json` + workspace SKILL.md + install runbook |
52
- | `rvm` | RVM partition manifest + capability table + wasm-guest + install runbook (hardware-isolated) |
53
-
54
- Multi-host: pass `--host` multiple times.
55
-
56
- ## Also ships the `harness` CLI
57
-
58
- ```bash
59
- harness sign # produce/update the witness manifest
60
- harness verify # check signature
61
- harness doctor # smoke-check a scaffolded harness
62
- harness score # runtime-readiness badges for a local repo
63
- harness help
64
- ```
65
-
66
- ### `harness score` vs `metaharness score` — two different scorecards (#15)
67
-
68
- The two CLIs both accept `score` but emit **different, purpose-specific JSON** — so check the schema
69
- discriminator before parsing:
70
-
71
- | Command | Purpose | JSON discriminator |
72
- |---|---|---|
73
- | `harness score <dir> --json` | Runtime-readiness **badges** (score + mcpRisk / releaseReady / testsDetected / sbom / witnessSigned) | `"schema": "harness-quickcheck-v1"` (string) |
74
- | `metaharness score <dir> --json` | 5-dimension harness-fit **scorecard** (harnessFit / compileConfidence / …) | `"schema": 1` (number) |
75
-
76
- They are **not interchangeable**. A consumer wiring one into a pipeline expecting the other should
77
- branch on `schema` (`typeof out.schema === 'string'` ⇒ harness badges; `=== 1` ⇒ metaharness
78
- scorecard) and refuse the wrong shape rather than silently defaulting missing fields to `0`.
79
-
1
+ # metaharness
2
+
3
+ Scaffold your own focused AI agent harness — like [ruflo](https://github.com/ruvnet/ruflo), uniquely yours.
4
+
5
+ > **Proven at the cost-Pareto frontier.** Same "evolve the harness" thesis, measured: the Darwin harness resolves
6
+ > real **SWE-bench Lite** issues at **34.0%** single-trajectory (~$0.005/inst) and **39.7%** Best-of-3
7
+ > (~$0.015/inst) — conformant, official harness. Live
8
+ > **[Cost–Performance leaderboard](https://ruvnet.github.io/agent-harness-generator/cost-pareto.html)** ·
9
+ > [`@metaharness/darwin`](https://www.npmjs.com/package/@metaharness/darwin).
10
+
11
+ > Published as **`metaharness`** (the `metaharness` and `harness` CLIs). Earlier versions were published as `create-agent-harness`.
12
+
13
+ ## Quick start
14
+
15
+ ```bash
16
+ npx metaharness my-bot
17
+ ```
18
+
19
+ You'll be prompted for template, host, description. Out comes a complete npm package ready to `npm publish`.
20
+
21
+ ## Non-interactive
22
+
23
+ ```bash
24
+ npx metaharness my-legal-bot \
25
+ --template vertical:legal \
26
+ --host claude-code \
27
+ --description "Contract redline + risk rating"
28
+ ```
29
+
30
+ ## Templates
31
+
32
+ | Template | Best for |
33
+ |---|---|
34
+ | `minimal` | Custom starter — kernel only |
35
+ | `vertical:devops` | Incident response, on-call workflows |
36
+ | `vertical:support` | Customer support, KB-RAG, escalation |
37
+ | `vertical:trading` | Quant trading (paper-default, circuit breakers) |
38
+ | `vertical:legal` | Contract review with citation checking |
39
+ | `vertical:research` | Multi-source dossier with evidence grading |
40
+
41
+ ## Hosts
42
+
43
+ `--host` selects which host adapter ships with your harness:
44
+
45
+ | Host | What you get |
46
+ |---|---|
47
+ | `claude-code` | `.claude/settings.json` with MCP + hooks |
48
+ | `codex` | `~/.codex/config.toml` with `[mcp_servers.*]` |
49
+ | `pi-dev` | Pi extension (TypeScript, no MCP by design) |
50
+ | `hermes` | `cli-config.yaml` + `optional-mcps/*.yaml` |
51
+ | `openclaw` | `~/.openclaw/openclaw.json` + workspace SKILL.md + install runbook |
52
+ | `rvm` | RVM partition manifest + capability table + wasm-guest + install runbook (hardware-isolated) |
53
+
54
+ Multi-host: pass `--host` multiple times.
55
+
56
+ ## Also ships the `harness` CLI
57
+
58
+ ```bash
59
+ harness sign # produce/update the witness manifest
60
+ harness verify # check signature
61
+ harness doctor # smoke-check a scaffolded harness
62
+ harness score # runtime-readiness badges for a local repo
63
+ harness help
64
+ ```
65
+
66
+ ### `harness score` vs `metaharness score` — two different scorecards (#15)
67
+
68
+ The two CLIs both accept `score` but emit **different, purpose-specific JSON** — so check the schema
69
+ discriminator before parsing:
70
+
71
+ | Command | Purpose | JSON discriminator |
72
+ |---|---|---|
73
+ | `harness score <dir> --json` | Runtime-readiness **badges** (score + mcpRisk / releaseReady / testsDetected / sbom / witnessSigned) | `"schema": "harness-quickcheck-v1"` (string) |
74
+ | `metaharness score <dir> --json` | 5-dimension harness-fit **scorecard** (harnessFit / compileConfidence / …) | `"schema": 1` (number) |
75
+
76
+ They are **not interchangeable**. A consumer wiring one into a pipeline expecting the other should
77
+ branch on `schema` (`typeof out.schema === 'string'` ⇒ harness badges; `=== 1` ⇒ metaharness
78
+ scorecard) and refuse the wrong shape rather than silently defaulting missing fields to `0`.
79
+
80
80
  ## Optional Cognitum Meta-Proxy sidecar
81
81
 
82
82
  Meta-Proxy is an optional local Rust sidecar, not an npm dependency and not part
@@ -84,12 +84,39 @@ of normal harness scaffolding. Install it only when you want a locally bound,
84
84
  Claude-compatible routing endpoint with Meta-Proxy's own Cognitum OAuth flow:
85
85
 
86
86
  ```bash
87
- npx metaharness proxy install --yes # signed v0.3.0 download; checksum + Ed25519 verified
88
- npx metaharness proxy login # browser or headless Cognitum OAuth, owned by Meta-Proxy
89
- npx metaharness proxy start
90
- npx metaharness proxy status
87
+ npx metaharness proxy install --yes # signed v0.4.1 download; checksum + Ed25519 verified
88
+ npx metaharness proxy run -- claude # starts the sidecar and routes this Claude session through it
89
+ npx metaharness proxy run --policy critical -- claude -p "review this migration"
91
90
  ```
92
91
 
92
+ `proxy run` is the activation path: it supplies `ANTHROPIC_BASE_URL` and the
93
+ local proxy bearer token only to the child process. It does not modify global
94
+ Claude settings, project files, or persisted client configuration. With the
95
+ Meta-Proxy automatic-failover release installed, ordinary requests use the
96
+ user's Claude Passthrough identity; trusted rate-limit telemetry can then
97
+ select consented Cloud or Sponsored capacity per request. Cognitum login is
98
+ needed only for Cloud routing, not for installation or normal Passthrough.
99
+
100
+ Use `npx metaharness proxy login` to authorize Cognitum Cloud routing, and
101
+ `npx metaharness proxy status` to inspect the managed sidecar.
102
+
103
+ ### Per-worktree routing policy
104
+
105
+ `proxy run` attaches a short-lived, HMAC-signed local capability to the
106
+ launched process. The policy is scoped to a one-way fingerprint of the current
107
+ worktree; neither its path nor repository metadata leaves the machine.
108
+
109
+ - `critical` — suppress automatic Power Saver and Sponsored failover for this
110
+ worktree. Explicit manual controls still apply.
111
+ - `standard` — the normal automatic policy: Power Saver at 80% utilization,
112
+ Sponsored only after exhaustion and only with consent.
113
+ - `economy` — Power Saver may start at 60% utilization; it retains all consent
114
+ gates and the Sponsored-at-exhaustion limit.
115
+
116
+ The capability is verified by Meta-Proxy, not inferred from `.claude`, a Git
117
+ branch name, or any repository-controlled file. Meta-Proxy v0.4.0 or later is
118
+ required for per-worktree policies; older releases reject the scoped token.
119
+
93
120
  `proxy install` downloads the platform archive from the public
94
121
  [`meta-proxy-dist`](https://github.com/cognitum-one/meta-proxy-dist) release
95
122
  channel only after explicit `--yes` consent. The CLI verifies the signed
@@ -100,19 +127,19 @@ extracts or replaces a binary. The sidecar is installed under
100
127
  Other commands: `proxy stop`, `proxy path`, and `proxy logout`.
101
128
 
102
129
  ## Eject from ruflo
103
-
104
- If you've been using ruflo and want your own focused harness from it:
105
-
106
- ```bash
107
- npx metaharness --from-existing ./
108
- ```
109
-
110
- Lifts agents/skills/commands, rewrites every `ruflo` / `claude-flow` reference, preserves attribution blocks marked with `<!-- ruflo-attribution-block -->`.
111
-
112
- ## Full walkthrough
113
-
114
- See [USAGE.md](https://github.com/ruvnet/agent-harness-generator/blob/main/docs/USAGE.md).
115
-
116
- ## License
117
-
118
- MIT
130
+
131
+ If you've been using ruflo and want your own focused harness from it:
132
+
133
+ ```bash
134
+ npx metaharness --from-existing ./
135
+ ```
136
+
137
+ Lifts agents/skills/commands, rewrites every `ruflo` / `claude-flow` reference, preserves attribution blocks marked with `<!-- ruflo-attribution-block -->`.
138
+
139
+ ## Full walkthrough
140
+
141
+ See [USAGE.md](https://github.com/ruvnet/agent-harness-generator/blob/main/docs/USAGE.md).
142
+
143
+ ## License
144
+
145
+ MIT
@@ -34,107 +34,107 @@ const SECRETS_SUBSUBS = ['check', 'fetch', 'validate-token', 'help'];
34
34
  const MCP_SUBSUBS = ['ls', 'invoke', 'help'];
35
35
  const FEDERATE_SUBSUBS = ['init', 'add', 'remove', 'list', 'status', 'help'];
36
36
  function bashCompletion() {
37
- return `# bash completion for harness
38
- _harness_completion() {
39
- local cur prev cmd
40
- COMPREPLY=()
41
- cur="\${COMP_WORDS[COMP_CWORD]}"
42
- prev="\${COMP_WORDS[COMP_CWORD-1]}"
43
- cmd="\${COMP_WORDS[1]:-}"
44
-
45
- # Top-level subcommands
46
- if [ $COMP_CWORD -eq 1 ]; then
47
- COMPREPLY=( $(compgen -W "${SUBCOMMANDS.join(' ')}" -- "$cur") )
48
- return 0
49
- fi
50
-
51
- case "$cmd" in
52
- secrets)
53
- [ $COMP_CWORD -eq 2 ] && COMPREPLY=( $(compgen -W "${SECRETS_SUBSUBS.join(' ')}" -- "$cur") )
54
- ;;
55
- mcp)
56
- [ $COMP_CWORD -eq 2 ] && COMPREPLY=( $(compgen -W "${MCP_SUBSUBS.join(' ')}" -- "$cur") )
57
- ;;
58
- federate)
59
- [ $COMP_CWORD -eq 2 ] && COMPREPLY=( $(compgen -W "${FEDERATE_SUBSUBS.join(' ')}" -- "$cur") )
60
- ;;
61
- completions)
62
- [ $COMP_CWORD -eq 2 ] && COMPREPLY=( $(compgen -W "bash zsh fish" -- "$cur") )
63
- ;;
64
- esac
65
- return 0
66
- }
67
- complete -F _harness_completion harness
37
+ return `# bash completion for harness
38
+ _harness_completion() {
39
+ local cur prev cmd
40
+ COMPREPLY=()
41
+ cur="\${COMP_WORDS[COMP_CWORD]}"
42
+ prev="\${COMP_WORDS[COMP_CWORD-1]}"
43
+ cmd="\${COMP_WORDS[1]:-}"
44
+
45
+ # Top-level subcommands
46
+ if [ $COMP_CWORD -eq 1 ]; then
47
+ COMPREPLY=( $(compgen -W "${SUBCOMMANDS.join(' ')}" -- "$cur") )
48
+ return 0
49
+ fi
50
+
51
+ case "$cmd" in
52
+ secrets)
53
+ [ $COMP_CWORD -eq 2 ] && COMPREPLY=( $(compgen -W "${SECRETS_SUBSUBS.join(' ')}" -- "$cur") )
54
+ ;;
55
+ mcp)
56
+ [ $COMP_CWORD -eq 2 ] && COMPREPLY=( $(compgen -W "${MCP_SUBSUBS.join(' ')}" -- "$cur") )
57
+ ;;
58
+ federate)
59
+ [ $COMP_CWORD -eq 2 ] && COMPREPLY=( $(compgen -W "${FEDERATE_SUBSUBS.join(' ')}" -- "$cur") )
60
+ ;;
61
+ completions)
62
+ [ $COMP_CWORD -eq 2 ] && COMPREPLY=( $(compgen -W "bash zsh fish" -- "$cur") )
63
+ ;;
64
+ esac
65
+ return 0
66
+ }
67
+ complete -F _harness_completion harness
68
68
  `;
69
69
  }
70
70
  function zshCompletion() {
71
- return `#compdef harness
72
- # zsh completion for harness
73
-
74
- _harness() {
75
- local -a subcommands
76
- subcommands=(
77
- 'sign:produce or update the witness manifest'
78
- 'verify:verify the witness manifest signature'
79
- 'doctor:smoke-check a scaffolded harness'
80
- 'federate:manage federation peers (init/add/remove/list/status)'
81
- 'secrets:GCP Secret Manager: check / fetch / validate-token'
82
- 'validate:umbrella: doctor + verify + path-guard + mcp + secrets'
83
- 'mcp:list MCP servers / dispatch a tool through the claim check'
84
- 'publish:pin the harness manifest to IPFS via Pinata (dry-run default)'
85
- 'upgrade:re-render template + drift plan (--apply to apply)'
86
- 'completions:emit shell completion scripts (bash/zsh/fish)'
87
- 'sbom:emit SPDX-2.3 SBOM for the harness'
88
- 'audit:npm audit per-harness with structured output'
89
- 'mcp-scan:security-scan the harness MCP surface (policy + perms + deps)'
90
- 'analyze-repo:recommend a harness from a local repo'
91
- 'diag:kernel-version skew check (ADR-027 diagnostic)'
92
- 'export-config:emit MCP servers + claims + permissions as a single JSON'
93
- 'compare:diff two harnesses (manifest + per-file fingerprints, ADR-031 --bundle)'
94
- 'genome:7-section readiness scorecard for a local repo (--json/--bundle, iter 110)'
95
- 'score:5-dimension harness scorecard 0–100 with badges (--json/--bundle, iter 111)'
96
- 'threat-model:MCP threat-model artifact for PR/compliance review (--json/--bundle, iter 112)'
97
- 'oia-manifest:emit .harness/oia-manifest.json — OIA v0.1 layer alignment (ADR-034, iter 121)'
98
- 'help:show help'
99
- )
100
-
101
- if (( CURRENT == 2 )); then
102
- _describe -t commands 'harness command' subcommands
103
- return
104
- fi
105
-
106
- case "$words[2]" in
107
- secrets)
108
- (( CURRENT == 3 )) && compadd ${SECRETS_SUBSUBS.join(' ')}
109
- ;;
110
- mcp)
111
- (( CURRENT == 3 )) && compadd ${MCP_SUBSUBS.join(' ')}
112
- ;;
113
- federate)
114
- (( CURRENT == 3 )) && compadd ${FEDERATE_SUBSUBS.join(' ')}
115
- ;;
116
- completions)
117
- (( CURRENT == 3 )) && compadd bash zsh fish
118
- ;;
119
- esac
120
- }
121
-
122
- _harness "$@"
71
+ return `#compdef harness
72
+ # zsh completion for harness
73
+
74
+ _harness() {
75
+ local -a subcommands
76
+ subcommands=(
77
+ 'sign:produce or update the witness manifest'
78
+ 'verify:verify the witness manifest signature'
79
+ 'doctor:smoke-check a scaffolded harness'
80
+ 'federate:manage federation peers (init/add/remove/list/status)'
81
+ 'secrets:GCP Secret Manager: check / fetch / validate-token'
82
+ 'validate:umbrella: doctor + verify + path-guard + mcp + secrets'
83
+ 'mcp:list MCP servers / dispatch a tool through the claim check'
84
+ 'publish:pin the harness manifest to IPFS via Pinata (dry-run default)'
85
+ 'upgrade:re-render template + drift plan (--apply to apply)'
86
+ 'completions:emit shell completion scripts (bash/zsh/fish)'
87
+ 'sbom:emit SPDX-2.3 SBOM for the harness'
88
+ 'audit:npm audit per-harness with structured output'
89
+ 'mcp-scan:security-scan the harness MCP surface (policy + perms + deps)'
90
+ 'analyze-repo:recommend a harness from a local repo'
91
+ 'diag:kernel-version skew check (ADR-027 diagnostic)'
92
+ 'export-config:emit MCP servers + claims + permissions as a single JSON'
93
+ 'compare:diff two harnesses (manifest + per-file fingerprints, ADR-031 --bundle)'
94
+ 'genome:7-section readiness scorecard for a local repo (--json/--bundle, iter 110)'
95
+ 'score:5-dimension harness scorecard 0–100 with badges (--json/--bundle, iter 111)'
96
+ 'threat-model:MCP threat-model artifact for PR/compliance review (--json/--bundle, iter 112)'
97
+ 'oia-manifest:emit .harness/oia-manifest.json — OIA v0.1 layer alignment (ADR-034, iter 121)'
98
+ 'help:show help'
99
+ )
100
+
101
+ if (( CURRENT == 2 )); then
102
+ _describe -t commands 'harness command' subcommands
103
+ return
104
+ fi
105
+
106
+ case "$words[2]" in
107
+ secrets)
108
+ (( CURRENT == 3 )) && compadd ${SECRETS_SUBSUBS.join(' ')}
109
+ ;;
110
+ mcp)
111
+ (( CURRENT == 3 )) && compadd ${MCP_SUBSUBS.join(' ')}
112
+ ;;
113
+ federate)
114
+ (( CURRENT == 3 )) && compadd ${FEDERATE_SUBSUBS.join(' ')}
115
+ ;;
116
+ completions)
117
+ (( CURRENT == 3 )) && compadd bash zsh fish
118
+ ;;
119
+ esac
120
+ }
121
+
122
+ _harness "$@"
123
123
  `;
124
124
  }
125
125
  function fishCompletion() {
126
126
  const subs = SUBCOMMANDS.map(s => `complete -c harness -f -n '__fish_use_subcommand' -a ${s}`).join('\n');
127
- return `# fish completion for harness
128
- ${subs}
129
-
130
- # secrets sub-subs
131
- complete -c harness -f -n '__fish_seen_subcommand_from secrets' -a '${SECRETS_SUBSUBS.join(' ')}'
132
- # mcp sub-subs
133
- complete -c harness -f -n '__fish_seen_subcommand_from mcp' -a '${MCP_SUBSUBS.join(' ')}'
134
- # federate sub-subs
135
- complete -c harness -f -n '__fish_seen_subcommand_from federate' -a '${FEDERATE_SUBSUBS.join(' ')}'
136
- # completions sub-subs
137
- complete -c harness -f -n '__fish_seen_subcommand_from completions' -a 'bash zsh fish'
127
+ return `# fish completion for harness
128
+ ${subs}
129
+
130
+ # secrets sub-subs
131
+ complete -c harness -f -n '__fish_seen_subcommand_from secrets' -a '${SECRETS_SUBSUBS.join(' ')}'
132
+ # mcp sub-subs
133
+ complete -c harness -f -n '__fish_seen_subcommand_from mcp' -a '${MCP_SUBSUBS.join(' ')}'
134
+ # federate sub-subs
135
+ complete -c harness -f -n '__fish_seen_subcommand_from federate' -a '${FEDERATE_SUBSUBS.join(' ')}'
136
+ # completions sub-subs
137
+ complete -c harness -f -n '__fish_seen_subcommand_from completions' -a 'bash zsh fish'
138
138
  `;
139
139
  }
140
140
  export function completionsCmd(args) {
package/dist/index.js CHANGED
@@ -187,59 +187,59 @@ export function templateDir(id) {
187
187
  const DARWIN_VERSION = '^0.2.2';
188
188
  /** ADR-147: the real `evolve` skill emitted into every darwin-integrated harness. */
189
189
  function darwinEvolveSkill(name) {
190
- return `---
191
- name: evolve
192
- description: "Evolve this harness with Darwin Mode — frozen model, evolving harness (real, sandboxed, safety-gated)."
193
- ---
194
-
195
- # evolve — Darwin Mode self-improvement
196
-
197
- \`${name}\` ships with **Darwin Mode** (\`@metaharness/darwin\`, ADR-070…146): the model
198
- is frozen; the *harness* evolves. Each generation mutates ONE of the 7 surface files
199
- (planner, contextBuilder, reviewer, retry/tool/memory/score policy), sandboxes each
200
- child, scores it, and keeps only variants that *measurably* improve — building an
201
- archive of successful descendants.
202
-
203
- ## Run it
204
-
205
- \`\`\`bash
206
- npm run evolve # real substrate: runs your test command per variant (deterministic mutator — no API key, no network)
207
- npm run evolve:dry # mock substrate: fast, fully offline, no test execution
208
- \`\`\`
209
-
210
- Or directly:
211
-
212
- \`\`\`bash
213
- npx metaharness-darwin evolve . --sandbox real --generations 3 --children 4
214
- \`\`\`
215
-
216
- ## Safety (secure by default)
217
-
218
- - **Deterministic mutator** is the default — **no network, no API key, air-gapped**.
219
- - Every mutation passes the \`validateGeneratedCode\` gate: no new imports, network,
220
- filesystem, shell, env access, or dependencies — pure refactor/tuning only.
221
- - Mutations run in a **sandbox**; only variants that pass your tests are archived.
222
- - Nothing is promoted without measured improvement (guard against Goodharting).
223
-
224
- See \`@metaharness/darwin\` for selection strategies (\`--selection\`, \`--crossover\`,
225
- \`--curriculum\`), statistical gates (\`--fdr\`, \`--bench\`), and the real-LLM mutator (library API).
226
-
227
- ## What the benchmarks taught us (measured, full SWE-bench Lite 300)
228
-
229
- Defaults worth carrying into how you evolve and run this harness (full evidence + CIs in
230
- \`@metaharness/darwin\`'s \`LEARNINGS.md\` / \`bench/results/RESULTS.md\`):
231
-
232
- 1. **Closed-loop repair is the #1 lever (~2×).** Feeding test/compiler failure back and retrying took
233
- resolve-rate 7.7% → 15.3% on the *same cheap model*. Iterate against ground truth, don't single-shot.
234
- 2. **Cheap-first + cost-aware routing.** Track **$/resolve**, not just resolve-rate; a cheap model
235
- resolved 31× cheaper per fix than a frontier one. Reserve frontier for *measured* capability gaps.
236
- 3. **Tier the models (Barbarian & Scholar).** Cheap sweep + frontier on *only the residual* = 33.3%
237
- at ~6× lower cost than running frontier everywhere.
238
- 4. **Put the output-format contract in a system message + example**, and size prompts to the model's
239
- real context window — this alone took a weak local model from 0% to ~50% valid output.
240
- 5. **Only trust batch evaluation of the final artifact** — in-loop counters drift 1.5–5×.
241
- 6. **The harness multiplies the model; it can't rescue one below the task's reasoning floor.** Pick
242
- the smallest model *above* the floor, then let evolution do the rest.
190
+ return `---
191
+ name: evolve
192
+ description: "Evolve this harness with Darwin Mode — frozen model, evolving harness (real, sandboxed, safety-gated)."
193
+ ---
194
+
195
+ # evolve — Darwin Mode self-improvement
196
+
197
+ \`${name}\` ships with **Darwin Mode** (\`@metaharness/darwin\`, ADR-070…146): the model
198
+ is frozen; the *harness* evolves. Each generation mutates ONE of the 7 surface files
199
+ (planner, contextBuilder, reviewer, retry/tool/memory/score policy), sandboxes each
200
+ child, scores it, and keeps only variants that *measurably* improve — building an
201
+ archive of successful descendants.
202
+
203
+ ## Run it
204
+
205
+ \`\`\`bash
206
+ npm run evolve # real substrate: runs your test command per variant (deterministic mutator — no API key, no network)
207
+ npm run evolve:dry # mock substrate: fast, fully offline, no test execution
208
+ \`\`\`
209
+
210
+ Or directly:
211
+
212
+ \`\`\`bash
213
+ npx metaharness-darwin evolve . --sandbox real --generations 3 --children 4
214
+ \`\`\`
215
+
216
+ ## Safety (secure by default)
217
+
218
+ - **Deterministic mutator** is the default — **no network, no API key, air-gapped**.
219
+ - Every mutation passes the \`validateGeneratedCode\` gate: no new imports, network,
220
+ filesystem, shell, env access, or dependencies — pure refactor/tuning only.
221
+ - Mutations run in a **sandbox**; only variants that pass your tests are archived.
222
+ - Nothing is promoted without measured improvement (guard against Goodharting).
223
+
224
+ See \`@metaharness/darwin\` for selection strategies (\`--selection\`, \`--crossover\`,
225
+ \`--curriculum\`), statistical gates (\`--fdr\`, \`--bench\`), and the real-LLM mutator (library API).
226
+
227
+ ## What the benchmarks taught us (measured, full SWE-bench Lite 300)
228
+
229
+ Defaults worth carrying into how you evolve and run this harness (full evidence + CIs in
230
+ \`@metaharness/darwin\`'s \`LEARNINGS.md\` / \`bench/results/RESULTS.md\`):
231
+
232
+ 1. **Closed-loop repair is the #1 lever (~2×).** Feeding test/compiler failure back and retrying took
233
+ resolve-rate 7.7% → 15.3% on the *same cheap model*. Iterate against ground truth, don't single-shot.
234
+ 2. **Cheap-first + cost-aware routing.** Track **$/resolve**, not just resolve-rate; a cheap model
235
+ resolved 31× cheaper per fix than a frontier one. Reserve frontier for *measured* capability gaps.
236
+ 3. **Tier the models (Barbarian & Scholar).** Cheap sweep + frontier on *only the residual* = 33.3%
237
+ at ~6× lower cost than running frontier everywhere.
238
+ 4. **Put the output-format contract in a system message + example**, and size prompts to the model's
239
+ real context window — this alone took a weak local model from 0% to ~50% valid output.
240
+ 5. **Only trust batch evaluation of the final artifact** — in-loop counters drift 1.5–5×.
241
+ 6. **The harness multiplies the model; it can't rescue one below the task's reasoning floor.** Pick
242
+ the smallest model *above* the floor, then let evolution do the rest.
243
243
  `;
244
244
  }
245
245
  /**
@@ -256,27 +256,27 @@ Defaults worth carrying into how you evolve and run this harness (full evidence
256
256
  /** Standard MIT license text for a scaffolded harness (GH #23). */
257
257
  function mitLicense(name) {
258
258
  const year = new Date().getFullYear();
259
- return `MIT License
260
-
261
- Copyright (c) ${year} ${name} authors
262
-
263
- Permission is hereby granted, free of charge, to any person obtaining a copy
264
- of this software and associated documentation files (the "Software"), to deal
265
- in the Software without restriction, including without limitation the rights
266
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
267
- copies of the Software, and to permit persons to whom the Software is
268
- furnished to do so, subject to the following conditions:
269
-
270
- The above copyright notice and this permission notice shall be included in all
271
- copies or substantial portions of the Software.
272
-
273
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
274
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
275
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
276
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
277
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
278
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
279
- SOFTWARE.
259
+ return `MIT License
260
+
261
+ Copyright (c) ${year} ${name} authors
262
+
263
+ Permission is hereby granted, free of charge, to any person obtaining a copy
264
+ of this software and associated documentation files (the "Software"), to deal
265
+ in the Software without restriction, including without limitation the rights
266
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
267
+ copies of the Software, and to permit persons to whom the Software is
268
+ furnished to do so, subject to the following conditions:
269
+
270
+ The above copyright notice and this permission notice shall be included in all
271
+ copies or substantial portions of the Software.
272
+
273
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
274
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
275
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
276
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
277
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
278
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
279
+ SOFTWARE.
280
280
  `;
281
281
  }
282
282
  export async function scaffold(opts) {