The Program Database
Zerolang exists because humans increasingly ask agents to write programs.
Most programming languages still make text the primary program database. That works for humans, but it is a poor interface for agents. An agent has to infer semantic structure from text, make a text edit, run tools to learn whether the edit was valid, format the result, and then inspect failures after the fact.
In Zero, the graph is the program database. The graph stores declarations,
types, calls, blocks, imports, capabilities, and source-map facts directly.
Agents edit those facts with checked graph patches. Humans read .0
projections when they want a source-like review view.
The Editing Loop
A traditional agent loop writes text, then runs check, format, and build to find out what the text meant. Zero's loop queries the graph, submits one checked patch, and only runs the validation a task actually needs:
The difference is not just syntax. A graph patch can target “the literal argument to this write call” or “the body of this block” instead of asking an agent to locate and rewrite a span of text.
Invalid Edits Fail Earlier
The graph store has shape rules. Required edges, ordered child groups, node kinds, type facts, and repository metadata are validated when patches are applied. If an edit would leave a sparse argument list, a missing expression, a stale graph hash, or an invalid repository store, the patch fails before the package becomes the new compiler input.
That is the agent-facing contract: write checked semantic edits, not hopeful text diffs.
Human Review Stays Textual
Humans should not have to inspect graph dumps to trust a change. .0
projections exist so people can read, review, and occasionally manually edit a
program.
The important distinction is ownership:
- agents normally author through
zero queryandzero patch - humans review through projections
- humans may edit projections as an escape hatch
zero importreconstructs the graph from reviewed projection textzero verify-projectioncatches drift instead of hiding it
Zero is a graph-native language with human-editable text projections.
The Payoff
The graph-first model is meant to reduce guessing and reduce tool calls. A checked patch combines edit intent, stale-state protection, shape validation, and formatting-normalized projection output into one compiler-mediated step.
That gives agents a smaller, more precise work surface. It gives humans a reviewable source-like view. It gives the compiler a direct path to semantic program facts without reparsing text on the normal package compile path.