@metaharness/legal
v0.1.0
Published
MetaHarness example — contract redline, citation check, and risk rating drafts for Claude Code (npx @metaharness/legal my-bot)
Maintainers
Readme
MetaHarness: legal vertical
A ready-made Claude Code harness for drafting contract redlines, sanity-checking citations, and producing first-pass risk ratings. Scaffolds a multi-agent setup wired for legal review workflows: an intake agent that reads the document, a redline drafter, a citation/authority checker, and a risk rater that classifies clauses by severity. Aimed at legal-ops teams, in-house counsel, and lawtech builders who want a working starting point instead of a blank repo. This is a drafting aid — it does not give legal advice, does not replace attorney review, and every output is meant to be checked by a qualified human before it leaves your office.
Quickstart
npx @metaharness/legal@latest my-bot
cd my-bot && npm install && harness doctorharness doctor verifies your Claude Code install, MCP server wiring, and agent tier routing. Once it reports green, point Claude Code at the folder and start dropping contracts into inputs/.
What you get
agents/intake.md— document parser and clause extractor (haiku tier)agents/redliner.md— produces tracked-change style edits with rationale (sonnet tier)agents/citation-checker.md— verifies cited statutes, cases, and cross-references (sonnet tier)agents/risk-rater.md— classifies clauses as low / medium / high / blocker with reasoning (opus tier)agents/reviewer.md— synthesizes the three streams into a single review packet (opus tier).claude/settings.jsonpreconfigured with tier routing, redaction hooks, and aninputs/+outputs/workspace- MCP servers wired for filesystem access to the contract folder and a memory store scoped to the matter
CLAUDE.mdwith the drafting-only guardrails, citation-format rules, and the "always flag, never decide" review protocol
Advanced
Run the built-in health check:
$ harness doctor
[ok] claude-code >= 1.0
[ok] agents/ (5 files)
[ok] MCP: filesystem (inputs/, outputs/)
[ok] MCP: memory (matter-scoped)
[ok] tier routing: haiku=1 sonnet=2 opus=2Validate the agent and settings files before committing changes:
$ harness validate
[ok] .claude/settings.json schema
[ok] 5 agents parsed
[ok] CLAUDE.md guardrails presentRun headlessly against a single contract for batch review:
claude -p --plugin-dir my-bot \
"Review inputs/msa-acme.pdf. Produce redline + risk packet in outputs/."You can also pin the model floor per agent by editing the model field in each agents/*.md frontmatter — useful if you want the redliner on opus for a high-stakes deal.
FAQ
Is this legal advice? No. It produces drafts. Every output must be reviewed by a qualified attorney before it is acted on or sent to a counterparty. The CLAUDE.md guardrails enforce this framing in every agent prompt.
Where does my contract text go?
Drop files into the local inputs/ folder. The filesystem MCP server is scoped to that folder and outputs/ — nothing leaves your machine except the model calls themselves. Use a redaction pass first if your matter requires it.
Can I swap models or add an agent?
Yes. Each agent is a standalone markdown file in agents/. Edit the model: frontmatter to change tier, or copy an existing file to add a new role (e.g. a precedent-finder agent). Re-run harness validate after.
License
MIT. Built on metaharness (https://www.npmjs.com/package/metaharness).
Deep-dive
Full explainer gist: https://gist.github.com/ruvnet/72e46e135dbf10df91d819072802578d
