Agents know how read/write structured JSON, also x07 provides tools for it.
AST editing (targeted structural edits):
x07 ast edit insert-stmts --in <path> --defn <name> --stmt-file <path> [--stmt-file <path>...] [--validate]
Inserts statement expression(s) into a single function body by name (decl kind=defn|defasync).
x07 ast edit insert-stmts --in <path> --ptr <json_pointer> --stmt-file <path> [--stmt-file <path>...] [--validate]
Uses a JSON Pointer target directly.
If the target is a ["begin", ...] body, inserts statements before the tail expression.
Otherwise rewrites the body to ["begin", <stmts...>, <original_expr>].
x07 ast edit apply-quickfix --in <path> --ptr <json_pointer> [--code <diag_code>] [--validate]
Applies exactly one lint quickfix (JSON Patch) selected by pointer (and optional diagnostic code).
All edit commands write canonical one-line JSON. With global --out <path>, they write to that path; otherwise they edit in place.
Looks promising! Let see how coding agents can really work with it.
Agents know how read/write structured JSON, also x07 provides tools for it.
AST editing (targeted structural edits):
All edit commands write canonical one-line JSON. With global --out <path>, they write to that path; otherwise they edit in place.[dead]