Diagnostics & repair (LLM-oriented)
X07 treats tooling output as a first-class API.
Goals
- Diagnostics are machine-readable
- Error codes are stable across releases
- Suggested fixes are JSON Patch (apply-able deterministically)
Diagnostic model (x07diag)
Diagnostics include:
code(stable ID)severitymessage(human)loc(where in x07AST or text)- optional
quickfix(JSON Patch)
Agents should never scrape text; they should parse the structured payload.
Repair loop
A good agent loop:
- Run
x07c lint --input <program.x07.json> --world solve-pure - Parse diagnostics
- Apply quickfixes (if present), or apply a patch with
x07c apply-patch - Re-run
x07c lint - Then run
x07 test
This is how you turn LLM output into reliable engineering.