DESIGNING HARNESSES

Substrate

Flat peer citation pattern — equal peers explore in parallel and build cumulative knowledge through an append-only SQLite citation store.

Substrate is the open-ended peer citation pattern. Use it when you do not want a central manager or exclusive task locks — instead, equal peers explore in parallel, publish immutable findings, and build on one another by explicitly citing prior entries.

How it is designed

1. Services

One host-owned, append-only SQLite Service exposes three simple primitives:

  • publish: stores an immutable finding (with optional parent citations and attached artifacts) tagged with the authenticated caller.agentId.
  • search: lets any peer query the shared knowledge base for relevant prior results.
  • visit: retrieves a full finding and its lineage so a peer can verify or extend it.

2. Profiles & Permissions

  • All peers share a single equal Profile (peer) with access to publish, search, and visit.
  • There is no privileged lead role; isolation comes from each peer running in its own sandbox container.

3. Orchestration & Events

  • The Harness spawns N peers concurrently inside one Runtime with a shared time or turn budget.
  • Because the citation store is append-only and lock-free, peers never block on each other; the Harness monitors runtime.onEvent() for completion signals, optional domain checkers, or budget expiry before calling runtime.close().

Try or eject it

anyswarm eject substrate --dir ./my-substrate
cd ./my-substrate
npm install
anyswarm --harness substrate --cwd /path/to/project \
  --prompt 'Explore the problem in parallel, publish verified intermediate findings, and cite earlier results.' \
  --output-dir ./runs
anyswarm trace --root ./runs --port 8787

Good starting point for: mathematical/theorem-proving exploration, open-ended research synthesis, hypothesis generation, and lock-free parallel discovery.