Smithy Agent

MULTI-AGENT ORCHESTRATION

Forge code with a six-agent crew.

Plans before it builds. Reviews its plans. Verifies its own work. A dual-harness extension for the pi and prime coding agents.

# Plan
Status: done

## Steps
- [x] 1. Add assertFiniteNumber() helper in src/validate.js
- [x] 2. Gate add()/div() args in src/calc.js
- [x] 3. Gate fmt() in src/format.js
- [x] 4. Add "test" script to package.json
- [x] 5. Add test/index.test.js covering happy + error paths

## Adversarial Reviews
### APPROVE (2026-06-24T15:58:51Z)
Verified prospector's findings against disk. Plan below. …
VERDICT: approve

## Verification
### APPROVE (2026-06-24T15:59:02Z)
All steps done, tests pass, no type errors.
VERDICT: APPROVE
This is .smithy/plan.mdcat it any time.

THE WORKFLOW

The forge line

Every /smithy run is a workflow, not a free-for-all. Scroll — the spark walks the line.

01 · PROSPECTOR

Finds the relevant files and lines.

17 tools · 7 search · tome trio

02 · DRAFTSMAN

Produces the plan.

16 tools · 6 search · tome trio

03 · INSPECTOR

Fresh-instance adversarial review of draftsman's plan.

16 tools · 6 search · tome trio

04 · SMITH

Builds.

24 tools · edit · write · bash

05 · JUDGE

Verifies smith's work against the plan (runs tests/type-checks).

22 tools · 7 search · bash · tome trio

Meet the agents →

WHAT SETS IT APART

Why it's different

Most agent harnesses hand a single model a single toolset and say "go." smithy-agent runs a disciplined workflow and keeps the receipts.

A plan you can actually see

Every plan, adversarial critique, and judge verdict persists to .smithy/plan.md — a human-readable ledger that survives restarts. Read it mid-run, diff it, grep it.

Plans get stress-tested first

Non-trivial plans are auto-reviewed by inspector — a fresh-instance critic — before anything builds.

Learn the mechanics →

Work gets verified, not just produced

judge runs your test suite and type-checker and won't APPROVE until they pass.

Learn the mechanics →

It won't spiral

A thrash detector disengages on stalls and repeats; an echo-loop guard stops the model replying to its own subagent's stream. Autonomous runs stay sane.

Hard budgets

Every run accepts a { tokens?, usd? } ceiling. Hit it and the loop stops cleanly with [DONE:budget] — no surprise invoices, no half-finished plans.

Learn the mechanics →

Optional code-graph memory

Register smithy-mcp-bridge and every agent gets tome — a code-graph server behind three tools (tome_search / tome_describe / tome_call). Agents query the graph when the bridge is up and fall back to grep when it isn't.