Agent workflow (how to build software with 100% autonomous coding agents)
X07 is designed around a simple reality:
An agent that writes code also needs to run checks, read diagnostics, apply patches, and prove invariants—without human intervention.
So the workflow is built into the ecosystem:
- strict output contracts (JSON everywhere),
- deterministic tools,
- stable error codes,
- canonical file layouts.
The “architecture contract” file
Every serious X07 project should include:
AGENTS.md
This is a short, structured contract that tells the agent:
- what the system is,
- what constraints it must respect,
- what must never change,
- how to run tests and interpret failures.
Use the template in: Agentic design patterns.
The minimal agent loop
An autonomous agent should follow a loop like:
- Read task/spec +
AGENTS.md - Modify code only through structured patches (JSON Patch)
- Run deterministic checks:
x07c lintx07 test- optional: benchmark suites (for performance budgets)
- If it fails:
- parse
x07diagoutput - apply a suggested quickfix (JSON Patch), or produce a new patch
- parse
- Repeat until green
If you want a good mental model for “AI-native engineering”, see OpenAI’s Codex guide on building AI-native engineering teams.
Golden rule: keep boundaries explicit
Agent-written code is far more reliable if your system architecture makes boundaries explicit:
- pure logic separated from I/O,
- deterministic tests separated from OS worlds,
- adapters kept thin and declarative.
The “ports and adapters” (hexagonal) model is a good default because it keeps I/O at the edges and preserves a stable functional core. See Alistair Cockburn’s write-up for background.