Infrastructure primitives that compose, and the agent-native method that builds them. A rules AST with three execution targets. A production framework on top of it — 95,000 lines of TypeScript, almost none of it typed by hand. And the governance work all of it is for: coordination as an engineering problem.
A rules AST with three execution targets, relationship-based authorization built on it, and a production SaaS framework that consumes both.
The tooling and conventions that let coding agents produce a large system that stays coherent — and a benchmark that measures whether they do.
Designs for cooperation at scale: how groups set rules, hold each other accountable, and invest together without a central referee.
These aren't unrelated side projects. A single serializable predicate language sits at the bottom; four libraries build on it; a production framework consumes the result. The leverage is in the composition, not in any one package.
Solid edges are package dependencies. Dashed edges are injection and shared tooling —
prisma-map is injected into permissions at runtime so the engine stays
ORM-agnostic, and config supplies CI workflows and build presets to the libraries.
A production SaaS foundation where the security-critical parts are already built, tested, and wired together. Authorization, multi-tenancy, field-level encryption, auditing, background jobs, webhooks and a generated type-safe client are working systems here, not TODOs.
makeController() exposes only the responders a route declares, and schema-checks payloads at runtime.makeError() yields a standard body with per-status guidance and request correlation, used across 53 files.@atlas annotations generate a codebase map that cannot drift on structural facts.
Ordered by what depends on what. json-rules sits underneath most of the
stack, and template consumes four of these directly.
One AST, three execution targets. The same serializable condition evaluates in memory, compiles to a Prisma query, or compiles to a PostgreSQL WHERE clause. 38 operators. Write a rule once; enforce it at whichever layer it has to run.
RBAC, ABAC and ReBAC in one engine. Relationship-walking checks with per-row grants. The app-specific part — which model a relation points at — is injected, so the core stays generic.
Lifecycles as predicates. A stateless primitive that guards a proposed state change and computes which transitions are currently available — so workflow rules and permission rules speak one language.
Schema reflection at runtime. Extracts models, fields, relations, foreign-key direction and enums from a generated Prisma client, so authority can be expressed over the real data graph without coupling to Prisma internals. Supports v6 and v7.
A codebase map that cannot lie. Reads @atlas annotations, validates them against a repo-owned concept registry, and only ever asserts what is mechanically true — never maturity or correctness.
The authoring front-end. A headless React hook that composes conditions against a lens surface, offering exactly the operators and fields the engine can actually run. Bring your own components. Live demo →
One blessed toolchain. Shared TypeScript, Biome and tsup presets plus a version manifest, with a CLI that gates CI, heals drift across every checkout, and cascades a release through the dependency graph.
Decluttering as infrastructure. Keeps source files comment-free and moves explanation into a mirrored sidecar tree — src/foo.ts becomes .gloss/src/foo.ts.md. You read the code; you read the margin only if you're confused.
The stack above was built with coding agents, and it holds together because the conventions came before the code. That is the actual work: persistent sessions instead of one-shot invocations, orchestration with context layers and capability gating, a codebase map that only asserts what is mechanically true so it cannot drift, and a benchmark that scores whether an agent left the repository better or barely working. atlas and gloss belong to this story too — they ship as packages in the stack above, but they exist so an agent can navigate a codebase it did not write.
Agent orchestration: context layers, capability gating, multi-thread pipelines and a real-time operator dashboard. Marketing site →
Drive coding-agent CLIs as persistent, streaming, event-captured sessions. Most ways to script an agent are one-shot and throw the process away; this keeps one long-lived process and captures every event. Claude Code and Codex today.
An AI coding benchmark. Agents rebuild the ecosystem's hardest primitives from a product brief and are scored against the real implementation — not just on passing tests, but on whether they leave the codebase better or barely working. Leaderboard →
Corpus optimization. Mines merged PRs into evaluation fixtures, scores a codebase against them, and opens PRs with measurable improvements — turning git history into a feedback loop.
Multi-agent coordination over MCP: a shared event log with role-scoped channels, so fleets of agents collaborate without stepping on each other. Likely to be revived.
Dynamic forms whose show/hide and validation logic is the same predicate language the backend uses. Pairs with json-rules. May be revived.
Every reform movement of the last 250 years has tried to fix governance by changing who holds power. The founders worked one level deeper. These proposals continue that lineage — treating governance as infrastructure and the cost of coordination as the thing to engineer down.
Sixteen chapters covering subsidiarity, voting mechanisms, proposal lifecycles, attack surfaces, epistemics, compensation and exit — plus a platform proposal for the infrastructure underneath.
Civilization is — and is built on — technology we invented to cooperate at scale. Let's keep building.
Staff and principal engineering, founding roles, agent-infrastructure work, and advisory engagements.