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.
- package/LICENSE +21 -21
- package/README.md +126 -99
- package/dist/completions-cmd.js +94 -94
- package/dist/index.js +74 -74
- package/dist/meta-proxy.d.ts +21 -1
- package/dist/meta-proxy.d.ts.map +1 -1
- package/dist/meta-proxy.js +139 -5
- package/dist/meta-proxy.js.map +1 -1
- package/dist/with-wasm.js +43 -43
- package/genomes/README.md +23 -23
- package/genomes/genome-promoted-cand6-edit-by-midpoint.json +26 -26
- package/package.json +126 -126
- package/templates/catalog.def.mjs +542 -542
- package/templates/catalog.json +1274 -1274
- package/templates/minimal/.claude/settings.json.tmpl +18 -18
- package/templates/minimal/.claude-plugin/plugin.json.tmpl +13 -13
- package/templates/minimal/CLAUDE.md.tmpl +26 -26
- package/templates/minimal/README.md.tmpl +20 -20
- package/templates/minimal/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/minimal/bin/cli.js.tmpl +100 -100
- package/templates/minimal/manifest.json +20 -20
- package/templates/minimal/package.json.tmpl +31 -31
- package/templates/minimal/src/init.ts.tmpl +21 -21
- package/templates/minimal/tsconfig.json.tmpl +19 -19
- package/templates/minimal/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_advertising/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_advertising/.claude/settings.json.tmpl +33 -33
- package/templates/vertical_advertising/.claude/skills/media-plan/SKILL.md.tmpl +13 -13
- package/templates/vertical_advertising/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_advertising/CLAUDE.md.tmpl +30 -30
- package/templates/vertical_advertising/README.md.tmpl +29 -29
- package/templates/vertical_advertising/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_advertising/bin/cli.js.tmpl +100 -100
- package/templates/vertical_advertising/manifest.json +101 -101
- package/templates/vertical_advertising/package.json.tmpl +30 -30
- package/templates/vertical_advertising/src/agents/copywriter.ts.tmpl +7 -7
- package/templates/vertical_advertising/src/agents/media-planner.ts.tmpl +7 -7
- package/templates/vertical_advertising/src/agents/performance-analyst.ts.tmpl +7 -7
- package/templates/vertical_advertising/src/init.ts.tmpl +21 -21
- package/templates/vertical_advertising/tsconfig.json.tmpl +19 -19
- package/templates/vertical_advertising/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_agentics/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_agentics/.claude/settings.json.tmpl +33 -33
- package/templates/vertical_agentics/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
- package/templates/vertical_agentics/.claude/skills/run-swarm/SKILL.md.tmpl +14 -14
- package/templates/vertical_agentics/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_agentics/CLAUDE.md.tmpl +32 -32
- package/templates/vertical_agentics/README.md.tmpl +30 -30
- package/templates/vertical_agentics/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_agentics/bin/cli.js.tmpl +100 -100
- package/templates/vertical_agentics/manifest.json +111 -111
- package/templates/vertical_agentics/package.json.tmpl +30 -30
- package/templates/vertical_agentics/src/agents/critic.ts.tmpl +7 -7
- package/templates/vertical_agentics/src/agents/orchestrator.ts.tmpl +7 -7
- package/templates/vertical_agentics/src/agents/planner.ts.tmpl +7 -7
- package/templates/vertical_agentics/src/agents/worker.ts.tmpl +7 -7
- package/templates/vertical_agentics/src/init.ts.tmpl +21 -21
- package/templates/vertical_agentics/tsconfig.json.tmpl +19 -19
- package/templates/vertical_agentics/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_ai/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_ai/.claude/settings.json.tmpl +35 -35
- package/templates/vertical_ai/.claude/skills/eval-report/SKILL.md.tmpl +13 -13
- package/templates/vertical_ai/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_ai/CLAUDE.md.tmpl +31 -31
- package/templates/vertical_ai/README.md.tmpl +30 -30
- package/templates/vertical_ai/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_ai/bin/cli.js.tmpl +100 -100
- package/templates/vertical_ai/manifest.json +106 -106
- package/templates/vertical_ai/package.json.tmpl +30 -30
- package/templates/vertical_ai/src/agents/data-curator.ts.tmpl +7 -7
- package/templates/vertical_ai/src/agents/deployer.ts.tmpl +7 -7
- package/templates/vertical_ai/src/agents/evaluator.ts.tmpl +7 -7
- package/templates/vertical_ai/src/agents/trainer.ts.tmpl +7 -7
- package/templates/vertical_ai/src/init.ts.tmpl +21 -21
- package/templates/vertical_ai/tsconfig.json.tmpl +19 -19
- package/templates/vertical_ai/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_business/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_business/.claude/settings.json.tmpl +33 -33
- package/templates/vertical_business/.claude/skills/quarterly-plan/SKILL.md.tmpl +13 -13
- package/templates/vertical_business/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_business/CLAUDE.md.tmpl +30 -30
- package/templates/vertical_business/README.md.tmpl +29 -29
- package/templates/vertical_business/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_business/bin/cli.js.tmpl +100 -100
- package/templates/vertical_business/manifest.json +101 -101
- package/templates/vertical_business/package.json.tmpl +30 -30
- package/templates/vertical_business/src/agents/analyst.ts.tmpl +7 -7
- package/templates/vertical_business/src/agents/ops-coordinator.ts.tmpl +7 -7
- package/templates/vertical_business/src/agents/strategist.ts.tmpl +7 -7
- package/templates/vertical_business/src/init.ts.tmpl +21 -21
- package/templates/vertical_business/tsconfig.json.tmpl +19 -19
- package/templates/vertical_business/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_coding/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_coding/.claude/commands/review-diff.md.tmpl +10 -10
- package/templates/vertical_coding/.claude/settings.json.tmpl +40 -40
- package/templates/vertical_coding/.claude/skills/plan-change/SKILL.md.tmpl +15 -15
- package/templates/vertical_coding/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_coding/CLAUDE.md.tmpl +32 -32
- package/templates/vertical_coding/README.md.tmpl +30 -30
- package/templates/vertical_coding/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_coding/bin/cli.js.tmpl +100 -100
- package/templates/vertical_coding/manifest.json +111 -111
- package/templates/vertical_coding/package.json.tmpl +30 -30
- package/templates/vertical_coding/src/agents/architect.ts.tmpl +7 -7
- package/templates/vertical_coding/src/agents/implementer.ts.tmpl +7 -7
- package/templates/vertical_coding/src/agents/reviewer.ts.tmpl +7 -7
- package/templates/vertical_coding/src/agents/test-writer.ts.tmpl +7 -7
- package/templates/vertical_coding/src/init.ts.tmpl +21 -21
- package/templates/vertical_coding/tsconfig.json.tmpl +19 -19
- package/templates/vertical_coding/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_crm/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_crm/.claude/settings.json.tmpl +33 -33
- package/templates/vertical_crm/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
- package/templates/vertical_crm/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_crm/CLAUDE.md.tmpl +30 -30
- package/templates/vertical_crm/README.md.tmpl +29 -29
- package/templates/vertical_crm/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_crm/bin/cli.js.tmpl +100 -100
- package/templates/vertical_crm/manifest.json +101 -101
- package/templates/vertical_crm/package.json.tmpl +30 -30
- package/templates/vertical_crm/src/agents/account-manager.ts.tmpl +7 -7
- package/templates/vertical_crm/src/agents/churn-watcher.ts.tmpl +7 -7
- package/templates/vertical_crm/src/agents/lead-qualifier.ts.tmpl +7 -7
- package/templates/vertical_crm/src/init.ts.tmpl +21 -21
- package/templates/vertical_crm/tsconfig.json.tmpl +19 -19
- package/templates/vertical_crm/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_devops/.claude/settings.json.tmpl +36 -36
- package/templates/vertical_devops/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_devops/CLAUDE.md.tmpl +34 -34
- package/templates/vertical_devops/README.md.tmpl +27 -27
- package/templates/vertical_devops/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_devops/bin/cli.js.tmpl +100 -100
- package/templates/vertical_devops/manifest.json +100 -100
- package/templates/vertical_devops/package.json.tmpl +27 -27
- package/templates/vertical_devops/runbooks/README.md.tmpl +32 -32
- package/templates/vertical_devops/src/agents/escalator.ts.tmpl +19 -19
- package/templates/vertical_devops/src/agents/postmortem.ts.tmpl +23 -23
- package/templates/vertical_devops/src/agents/responder.ts.tmpl +14 -14
- package/templates/vertical_devops/src/agents/runbook-runner.ts.tmpl +17 -17
- package/templates/vertical_devops/src/init.ts.tmpl +23 -23
- package/templates/vertical_devops/tsconfig.json.tmpl +19 -19
- package/templates/vertical_devops/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_education/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_education/.claude/commands/mastery-report.md.tmpl +12 -12
- package/templates/vertical_education/.claude/settings.json.tmpl +45 -45
- package/templates/vertical_education/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
- package/templates/vertical_education/.claude/skills/teach-next/SKILL.md.tmpl +16 -16
- package/templates/vertical_education/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_education/CLAUDE.md.tmpl +33 -33
- package/templates/vertical_education/README.md.tmpl +30 -30
- package/templates/vertical_education/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_education/bin/cli.js.tmpl +100 -100
- package/templates/vertical_education/manifest.json +116 -116
- package/templates/vertical_education/package.json.tmpl +30 -30
- package/templates/vertical_education/src/agents/explainer.ts.tmpl +7 -7
- package/templates/vertical_education/src/agents/grader.ts.tmpl +7 -7
- package/templates/vertical_education/src/agents/quiz-master.ts.tmpl +7 -7
- package/templates/vertical_education/src/agents/tutor.ts.tmpl +7 -7
- package/templates/vertical_education/src/init.ts.tmpl +21 -21
- package/templates/vertical_education/tsconfig.json.tmpl +19 -19
- package/templates/vertical_education/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_exotic/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_exotic/.claude/settings.json.tmpl +44 -44
- package/templates/vertical_exotic/.claude/skills/evolve/SKILL.md.tmpl +14 -14
- package/templates/vertical_exotic/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
- package/templates/vertical_exotic/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_exotic/CLAUDE.md.tmpl +31 -31
- package/templates/vertical_exotic/README.md.tmpl +29 -29
- package/templates/vertical_exotic/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_exotic/bin/cli.js.tmpl +100 -100
- package/templates/vertical_exotic/manifest.json +106 -106
- package/templates/vertical_exotic/package.json.tmpl +30 -30
- package/templates/vertical_exotic/src/agents/experimenter.ts.tmpl +7 -7
- package/templates/vertical_exotic/src/agents/federator.ts.tmpl +7 -7
- package/templates/vertical_exotic/src/agents/hypothesizer.ts.tmpl +7 -7
- package/templates/vertical_exotic/src/init.ts.tmpl +21 -21
- package/templates/vertical_exotic/tsconfig.json.tmpl +19 -19
- package/templates/vertical_exotic/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_gaming/.claude/commands/design-doc-diff.md.tmpl +13 -13
- package/templates/vertical_gaming/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_gaming/.claude/settings.json.tmpl +45 -45
- package/templates/vertical_gaming/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
- package/templates/vertical_gaming/.claude/skills/playtest-recap/SKILL.md.tmpl +16 -16
- package/templates/vertical_gaming/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_gaming/CLAUDE.md.tmpl +33 -33
- package/templates/vertical_gaming/README.md.tmpl +30 -30
- package/templates/vertical_gaming/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_gaming/bin/cli.js.tmpl +100 -100
- package/templates/vertical_gaming/manifest.json +116 -116
- package/templates/vertical_gaming/package.json.tmpl +30 -30
- package/templates/vertical_gaming/src/agents/balance-critic.ts.tmpl +7 -7
- package/templates/vertical_gaming/src/agents/economy-modeler.ts.tmpl +7 -7
- package/templates/vertical_gaming/src/agents/narrative-keeper.ts.tmpl +7 -7
- package/templates/vertical_gaming/src/agents/playtest-reader.ts.tmpl +7 -7
- package/templates/vertical_gaming/src/init.ts.tmpl +21 -21
- package/templates/vertical_gaming/tsconfig.json.tmpl +19 -19
- package/templates/vertical_gaming/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_health/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_health/.claude/settings.json.tmpl +33 -33
- package/templates/vertical_health/.claude/skills/wellness-intake/SKILL.md.tmpl +15 -15
- package/templates/vertical_health/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_health/CLAUDE.md.tmpl +30 -30
- package/templates/vertical_health/README.md.tmpl +29 -29
- package/templates/vertical_health/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_health/bin/cli.js.tmpl +100 -100
- package/templates/vertical_health/manifest.json +101 -101
- package/templates/vertical_health/package.json.tmpl +30 -30
- package/templates/vertical_health/src/agents/care-coordinator.ts.tmpl +7 -7
- package/templates/vertical_health/src/agents/intake.ts.tmpl +7 -7
- package/templates/vertical_health/src/agents/triage.ts.tmpl +7 -7
- package/templates/vertical_health/src/init.ts.tmpl +21 -21
- package/templates/vertical_health/tsconfig.json.tmpl +19 -19
- package/templates/vertical_health/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_legal/.claude/settings.json.tmpl +10 -10
- package/templates/vertical_legal/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_legal/CLAUDE.md.tmpl +24 -24
- package/templates/vertical_legal/README.md.tmpl +21 -21
- package/templates/vertical_legal/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_legal/bin/cli.js.tmpl +100 -100
- package/templates/vertical_legal/manifest.json +90 -90
- package/templates/vertical_legal/package.json.tmpl +14 -14
- package/templates/vertical_legal/src/agents/citation-checker.ts.tmpl +7 -7
- package/templates/vertical_legal/src/agents/redline.ts.tmpl +7 -7
- package/templates/vertical_legal/src/agents/risk-rater.ts.tmpl +8 -8
- package/templates/vertical_legal/src/init.ts.tmpl +13 -13
- package/templates/vertical_legal/tsconfig.json.tmpl +19 -19
- package/templates/vertical_legal/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_marketing/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_marketing/.claude/settings.json.tmpl +33 -33
- package/templates/vertical_marketing/.claude/skills/campaign-brief/SKILL.md.tmpl +13 -13
- package/templates/vertical_marketing/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_marketing/CLAUDE.md.tmpl +30 -30
- package/templates/vertical_marketing/README.md.tmpl +29 -29
- package/templates/vertical_marketing/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_marketing/bin/cli.js.tmpl +100 -100
- package/templates/vertical_marketing/manifest.json +101 -101
- package/templates/vertical_marketing/package.json.tmpl +30 -30
- package/templates/vertical_marketing/src/agents/content-creator.ts.tmpl +7 -7
- package/templates/vertical_marketing/src/agents/seo-analyst.ts.tmpl +7 -7
- package/templates/vertical_marketing/src/agents/strategist.ts.tmpl +7 -7
- package/templates/vertical_marketing/src/init.ts.tmpl +21 -21
- package/templates/vertical_marketing/tsconfig.json.tmpl +19 -19
- package/templates/vertical_marketing/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_repo-maintainer/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_repo-maintainer/.claude/commands/release-check.md.tmpl +13 -13
- package/templates/vertical_repo-maintainer/.claude/commands/repo-triage.md.tmpl +16 -16
- package/templates/vertical_repo-maintainer/.claude/settings.json.tmpl +44 -44
- package/templates/vertical_repo-maintainer/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
- package/templates/vertical_repo-maintainer/.claude/skills/plan-change/SKILL.md.tmpl +15 -15
- package/templates/vertical_repo-maintainer/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_repo-maintainer/CLAUDE.md.tmpl +34 -34
- package/templates/vertical_repo-maintainer/README.md.tmpl +30 -30
- package/templates/vertical_repo-maintainer/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_repo-maintainer/bin/cli.js.tmpl +100 -100
- package/templates/vertical_repo-maintainer/manifest.json +121 -121
- package/templates/vertical_repo-maintainer/package.json.tmpl +30 -30
- package/templates/vertical_repo-maintainer/src/agents/benchmarker.ts.tmpl +7 -7
- package/templates/vertical_repo-maintainer/src/agents/maintainer.ts.tmpl +7 -7
- package/templates/vertical_repo-maintainer/src/agents/release.ts.tmpl +7 -7
- package/templates/vertical_repo-maintainer/src/agents/security.ts.tmpl +7 -7
- package/templates/vertical_repo-maintainer/src/init.ts.tmpl +21 -21
- package/templates/vertical_repo-maintainer/tsconfig.json.tmpl +19 -19
- package/templates/vertical_repo-maintainer/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_research/.claude/settings.json.tmpl +9 -9
- package/templates/vertical_research/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_research/CLAUDE.md.tmpl +33 -33
- package/templates/vertical_research/README.md.tmpl +17 -17
- package/templates/vertical_research/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_research/bin/cli.js.tmpl +100 -100
- package/templates/vertical_research/manifest.json +105 -105
- package/templates/vertical_research/package.json.tmpl +14 -14
- package/templates/vertical_research/src/agents/citer.ts.tmpl +8 -8
- package/templates/vertical_research/src/agents/fact-checker.ts.tmpl +8 -8
- package/templates/vertical_research/src/agents/scout.ts.tmpl +7 -7
- package/templates/vertical_research/src/agents/source-grader.ts.tmpl +10 -10
- package/templates/vertical_research/src/agents/synthesizer.ts.tmpl +8 -8
- package/templates/vertical_research/src/agents/web-searcher.ts.tmpl +6 -6
- package/templates/vertical_research/src/init.ts.tmpl +13 -13
- package/templates/vertical_research/tsconfig.json.tmpl +19 -19
- package/templates/vertical_research/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_ruview/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_ruview/.claude/settings.json.tmpl +33 -33
- package/templates/vertical_ruview/.claude/skills/index-and-ask/SKILL.md.tmpl +15 -15
- package/templates/vertical_ruview/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
- package/templates/vertical_ruview/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_ruview/CLAUDE.md.tmpl +31 -31
- package/templates/vertical_ruview/README.md.tmpl +29 -29
- package/templates/vertical_ruview/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_ruview/bin/cli.js.tmpl +100 -100
- package/templates/vertical_ruview/manifest.json +106 -106
- package/templates/vertical_ruview/package.json.tmpl +30 -30
- package/templates/vertical_ruview/src/agents/indexer.ts.tmpl +7 -7
- package/templates/vertical_ruview/src/agents/retriever.ts.tmpl +7 -7
- package/templates/vertical_ruview/src/agents/reviewer.ts.tmpl +7 -7
- package/templates/vertical_ruview/src/init.ts.tmpl +21 -21
- package/templates/vertical_ruview/tsconfig.json.tmpl +19 -19
- package/templates/vertical_ruview/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_sales/.claude/commands/doctor.md.tmpl +12 -12
- package/templates/vertical_sales/.claude/commands/pipeline-report.md.tmpl +13 -13
- package/templates/vertical_sales/.claude/settings.json.tmpl +45 -45
- package/templates/vertical_sales/.claude/skills/memory-inspect/SKILL.md.tmpl +14 -14
- package/templates/vertical_sales/.claude/skills/qualify-lead/SKILL.md.tmpl +15 -15
- package/templates/vertical_sales/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_sales/CLAUDE.md.tmpl +33 -33
- package/templates/vertical_sales/README.md.tmpl +30 -30
- package/templates/vertical_sales/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_sales/bin/cli.js.tmpl +100 -100
- package/templates/vertical_sales/manifest.json +116 -116
- package/templates/vertical_sales/package.json.tmpl +30 -30
- package/templates/vertical_sales/src/agents/closer.ts.tmpl +7 -7
- package/templates/vertical_sales/src/agents/demo-coach.ts.tmpl +7 -7
- package/templates/vertical_sales/src/agents/prospector.ts.tmpl +7 -7
- package/templates/vertical_sales/src/agents/qualifier.ts.tmpl +7 -7
- package/templates/vertical_sales/src/init.ts.tmpl +21 -21
- package/templates/vertical_sales/tsconfig.json.tmpl +19 -19
- package/templates/vertical_sales/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_support/.claude/settings.json.tmpl +25 -25
- package/templates/vertical_support/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_support/CLAUDE.md.tmpl +34 -34
- package/templates/vertical_support/README.md.tmpl +16 -16
- package/templates/vertical_support/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_support/bin/cli.js.tmpl +100 -100
- package/templates/vertical_support/kb/README.md.tmpl +23 -23
- package/templates/vertical_support/manifest.json +100 -100
- package/templates/vertical_support/package.json.tmpl +25 -25
- package/templates/vertical_support/src/agents/escalator.ts.tmpl +6 -6
- package/templates/vertical_support/src/agents/kb-searcher.ts.tmpl +6 -6
- package/templates/vertical_support/src/agents/responder.ts.tmpl +7 -7
- package/templates/vertical_support/src/agents/triager.ts.tmpl +6 -6
- package/templates/vertical_support/src/init.ts.tmpl +16 -16
- package/templates/vertical_support/tsconfig.json.tmpl +19 -19
- package/templates/vertical_support/vitest.config.ts.tmpl +23 -23
- package/templates/vertical_trading/.claude/settings.json.tmpl +20 -20
- package/templates/vertical_trading/.claude-plugin/plugin.json.tmpl +23 -23
- package/templates/vertical_trading/CLAUDE.md.tmpl +24 -24
- package/templates/vertical_trading/README.md.tmpl +17 -17
- package/templates/vertical_trading/__tests__/smoke.test.ts.tmpl +37 -37
- package/templates/vertical_trading/bin/cli.js.tmpl +100 -100
- package/templates/vertical_trading/manifest.json +100 -100
- package/templates/vertical_trading/package.json.tmpl +14 -14
- package/templates/vertical_trading/src/agents/executor.ts.tmpl +8 -8
- package/templates/vertical_trading/src/agents/market-watcher.ts.tmpl +7 -7
- package/templates/vertical_trading/src/agents/postmortem.ts.tmpl +8 -8
- package/templates/vertical_trading/src/agents/risk-checker.ts.tmpl +11 -11
- package/templates/vertical_trading/src/agents/signal-gen.ts.tmpl +8 -8
- package/templates/vertical_trading/src/init.ts.tmpl +20 -20
- package/templates/vertical_trading/tsconfig.json.tmpl +19 -19
- 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.
|
|
88
|
-
npx metaharness proxy
|
|
89
|
-
npx metaharness proxy
|
|
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
|
package/dist/completions-cmd.js
CHANGED
|
@@ -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) {
|