← All work

LOGIC.md

A portable specification for how an agent reasons, shipping three npm packages, a Python SDK, a CLI, MCP tools and a LangGraph adapter, with 325 tests and 95.9 percent branch coverage on the compiler

DeployOpen Source Infrastructure2025 to present2 min read

Context

Agent frameworks describe how an agent should reason in prose, inside prompts, where nothing can check it. That is fine until behaviour drifts, and then there is no artefact to diff against. You cannot review a change to a paragraph the same way you review a change to a contract.

Built

A portable, framework-agnostic YAML and Markdown format specifying how an agent reasons: step DAGs, quality gates, self-verification, retry and fallback policy, and multi-agent coordination.

At v1.4.0 the project ships three npm packages, a Python SDK, a nine-command CLI, sixteen templates, seven MCP tools, a LangGraph adapter, a VS Code extension and a GitHub Action.

Stack

A TypeScript ESM monorepo with Vitest, a Python SDK, MCP, a LangGraph adapter and GitHub Actions.

Outcome

325 tests and 95.9 percent branch coverage on the compiler.

A performance pass took the compiler, expression engine and DAG resolver off quadratic hot paths to roughly 9 to 47 times faster at scale, proven against a golden-master determinism baseline across 13 DAG shapes and a 200,000-DAG differential fuzz. That is the whole point of the exercise: the speedup is not the claim, the determinism baseline is what makes the speedup checkable.

A compile-boundary fidelity audit shipped with external contributor Ant Newman closed silent-failure gaps on both the producer and the consumer side of the compiler.

MIT licensed, with external contributors.

Next case study

Modular9

A visual, AI-native workflow builder for composing and running multi-agent systems, and the proving ground where the LOGIC.md reasoning-contract specification was first validated at scale

Have a similar problem? Let's talk.