ontogate
Declare your domain once — get both the docs and the enforcement for AI agents.
Status: pre-release. This package currently ships a version stub while v0 is under
active development. The API described below is the design target, not a published surface.
What ontogate will be
The domain rules you've been hand-writing into markdown — product statuses, order
invariants, "never issue a coupon for a sold-out item" — declared once in TypeScript
(zod-native), compiled into two rails:
- Prompt rail — generated domain docs for
AGENTS.md, so agents are guided to
behave well.
- Runtime rail — a typed MCP server with staged write-actions, human-in-the-loop
approval, and a tamper-evident audit log, so agents are physically stopped when
they don't.
const issueCoupon = defineAction({
name: 'issueCoupon',
target: Product,
input: z.object({ productId: z.string(), amount: z.number() }),
policy: {
approval: 'required',
audit: true,
where: { field: 'status', op: 'neq', value: 'soldout' },
},
execute: async ({ productId, amount }) => {
},
});
v0 scope (in development)
ontogate init — deterministic scanner (Prisma / OpenAPI) that extracts your
ontology instead of asking you to type it. No LLM calls, no API keys — ever.
ontogate mcp — typed MCP server over your declared objects, links, and actions.
ontogate approvals — CLI approval queue for staged actions.
ontogate audit verify — hash-chain verification of the audit log.
ontogate studio — a live, read-only map of your domain graph.
License
MIT