Skip to content

Instantly share code, notes, and snippets.

@ruvnet
Created June 13, 2026 18:35
Show Gist options
  • Select an option

  • Save ruvnet/a5ab06c9d331ac6a7272510dd8777ce0 to your computer and use it in GitHub Desktop.

Select an option

Save ruvnet/a5ab06c9d331ac6a7272510dd8777ce0 to your computer and use it in GitHub Desktop.
agent-harness-generator — plain-English explainer for the new sister project to ruflo (Claude Code + Codex + pi.dev + Hermes, WASM kernel, marketplace plugin)

agent-harness-generator — what it is, in plain English

A tool that lets anyone build their own focused AI agent assistant — like ruflo, but uniquely theirs. With their own brand, their own agents, their own CLI command, running on Claude Code, Codex, pi.dev, or Hermes.

Live on GitHub: https://github.com/ruvnet/agent-harness-generator

The problem in one paragraph

If you want to build "an AI assistant for legal review" or "an AI assistant for trading" or "an AI assistant for incident response," you have two bad choices today. Option A: fork ruflo and rip out the 60+ agents you don't need. You inherit a tangled product and you lose every future update. Option B: build everything from scratch. You re-derive the MCP server, the memory database, the routing layer, the hooks system. Months gone before you write your first domain-specific prompt.

There's no middle path. The generator is the middle path.

What the generator does

You run one command:

npx create-agent-harness my-legal-bot

A wizard asks a few questions — what's it for, who's the host, what agents do you want, what skills, what memory backend. Then it scaffolds a complete, ready-to-publish npm package with:

  • Your own command (npx my-legal-bot init)
  • Your own brand (no "ruflo" anywhere unless you opt in)
  • Your own MCP server
  • Your own memory namespace
  • Your own marketplace identity
  • Your own selection of agents, skills, plugins, prompts

And under the hood, it shares the same battle-tested kernel as ruflo: the same MCP server, the same memory bridge, the same routing layer, the same intelligence pipeline. When the kernel gets a security fix, your harness gets it too via npm.

Why a Rust+WASM kernel

The kernel — the part that's the same in every generated harness — is Rust source code compiled to WebAssembly, with an optional native fallback through NAPI-RS for hot Node paths.

This sounds technical but the consequences are practical:

  1. Same code runs everywhere. Node, the browser, Cloudflare Workers, Deno, Bun, edge runtimes — all run the same kernel bytes. A harness you ship doesn't care where it runs.
  2. Deterministic. Two CI runners produce byte-identical kernel output. That's what makes the cryptographic witness manifest (Ed25519-signed file describing exactly what shipped) actually verifiable.
  3. Memory-safe. Rust's borrow checker eliminates a whole class of kernel bugs that JavaScript can't.
  4. Already works. @ruvector/emergent-time@0.1.0 ships through exactly this pipeline today. 55 KB. Loads in Node, browser, bundler. The agent-harness-generator kernel reuses the same machinery.

Four hosts, one harness

A harness you generate can target any of:

Host What it is
Claude Code Anthropic's CLI. Richest hook system. The original ruflo target.
OpenAI Codex OpenAI's CLI. MCP via TOML config. No first-class hooks.
pi.dev badlogic/Pi coding agent. Token-conscious — deliberately ships without MCP. The adapter uses Pi's registerTool() API instead.
Hermes Agent Nous Research's runtime. MCP-supported. Adapter scrubs <think> and stray <tool_call> text from Hermes-4 models.

You can target one, or all four. The kernel and the content stay the same. Only the thin adapter layer changes per host.

Quality gates the design commits to

This isn't just "scaffold and forget." The design commits to:

  • CI guards — every release must pass a matrix build (wasm + 5 native targets), a wasm-tools validate pass, a size budget, and a cross-platform parity test. Anything else and npm publish is blocked.
  • Drift detection — uses Copier's regenerate-diff-merge model. The generator remembers what choices you made (.harness/manifest.json), and when the template updates, it can re-apply the new template against your current customizations safely.
  • Anti-slop — derived trust tiers from measured signals (smoke test results, npm provenance, maintenance cadence, real usage) instead of editorial review. Cites SOTA from Socket.dev typosquatting detection, HF Model Cards, SLSA v1.0, VS Code Marketplace clean-room VMs, Chrome Web Store review.
  • TDD — every primitive, every renamer, every template has a test contract specified before any code lands. London-school for the kernel, integration for the generator, contract tests for each host adapter.
  • Provenance — Ed25519-signed witness manifest per generated harness, byte-deterministic across CI runners (which the WASM kernel enables). Mirrors ruflo's existing ADR-103.

From practical to exotic

The generator works at both ends:

  • Practical: 3-agent customer-support harness, 5 minutes from npx to your own published CLI
  • Vertical: trading harness with market-data plugins + risk agents + backtesting skills, drawn from a curated vertical pack
  • Multi-host: same harness ships unchanged to Claude Code, Codex, AND Hermes
  • Federated: multiple instances coordinate via a federation transport — your team's harness talks to your customer's harness with zero-trust security
  • Self-evolving: harness uses its own learning loop to optimize its own routing rules over time. Uses LearnedWeights from @ruvector/emergent-time.
  • Plugin-author: harness publishes its own plugins back to the marketplace under its own scope

Status today

Design phase complete. 17 ADRs (Architecture Decision Records) landed today, each plain-language, SOTA-cited, and ending with a concrete test contract. No code yet — engineers will implement against the documents.

Read the design:

Five-minute reading path

If you have 5 minutes:

  1. Read ADR-001 Goals & non-goals — what this is and isn't.
  2. Skim ADR-002 Kernel boundary — the single load-bearing decision.
  3. Skim ADR-003 Generator architecture — how the CLI actually works.

Everything else is reachable from the INDEX.

Want to help?

Phase 0 (kernel extraction) and Phase 1 (generator MVP) need engineers. The design is on file — review it, push back on the bad parts, then build against it.

Track issues: https://github.com/ruvnet/ruflo/issues?q=is%3Aissue+label%3Aharness-generator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment