Many agents, two shapes, no spaghetti.
Intelligence supports exactly two topologies. The restraint is the design, not a limitation.
Deliberation: parallel members, moderator, convergence rounds, Chair, verification pass, producing a decision. Pipeline: ordered stages with fan-out, and a reviewer gate that returns work to an earlier stage once, producing an artifact.
Deliberately not more.
Two shapes, one server seam.
- API route handlers
- ~83
- All data access through one server seam.
- Page routes
- ~25
- Multi-tenant, row-level security throughout.
- Workflow topologies
- 2
- Deliberately not more. Options become complexity.
- Enforced invariants
- 5
- Each with a mechanical verify script.
Invariants are enforced, not conventional.
Each has a script that fails the build if a call site skips it.
safeFetch
Guards: Server-side request forgery
Every outbound URL passes through one guard. An agent that can be told to fetch a URL can be told to fetch your metadata endpoint.
Skipped call site · fails the build
safeRegExp
Guards: Catastrophic backtracking
Model-supplied regex is compiled through a guard. A pattern an LLM wrote is untrusted input.
Skipped call site · fails the build
assertWithinBudget
Guards: Runaway inference spend
A hard spend cap on LLM calls. Multi-agent systems fail expensive before they fail loud.
Skipped call site · fails the build
decryptSecretStrict
Guards: Silent data loss
Vault writes fail closed rather than storing something that cannot be read back.
Skipped call site · fails the build
Fail-closed middleware
Guards: Unauthenticated access
No session means 401 for APIs and a redirect for pages. Auth is a gate, not a check each route remembers to run.
Skipped call site · fails the build
What is actually running.
- Next.js 16 / React 19
- Supabase + row-level security
- pgvector embeddings
- provider-agnostic LLM seam
- AES-256-GCM vault
- Strangler Fig migration
Where to go next
Next proof: Voice
It holds under real-time constraints.