DRAXL

Agent-native source.
Semantic program control.

Draxl is an agent-native source language for deterministic, high-volume concurrent code editing. It makes syntax identity explicit, so tools can patch, replay, and merge code by targeting stable nodes instead of text.

Why Draxl

Draxl gives code stable identities. Tools can act on exact syntax instead of guessing from lines and spans.

Stable Node IDs

Syntax nodes get stable identities. Tools target @ids directly instead of guessing by line and column.

Ranked Slots

Ordered inserts use explicit ranks inside params, statements, and match arms. No positional guesswork.

Deterministic Anchors

Docs and comments attach via explicit anchors. No proximity heuristics. Always deterministic.

Lowers to Rust

Draxl lowers deterministically to ordinary Rust, so it works with the existing Rust toolchain.

Semantic Ops Over Stable IDs

Draxl makes syntax identity explicit in the source, so tools can patch, replay, and merge code by targeting stable nodes instead of text spans.

demo.rs.dx
@m1 mod demo {
@d1 /// Add one to x.
@f1[a] fn add_one(
@p1[a] x: @t1 i64
) -> @t2 i64 {
@c1 // Cache value.
@s1[a] let @p2 y = @e1 (@e2 x + @l1 1);
@s2[b] @e3 y
}
}
demo.rs (lowered)
mod demo {
/// Add one to x.
fn add_one(x: i64) -> i64 {
// Cache value.
let y = (x + 1);
y
}
}
patch_op.txtsemantic patch
replace @e2: (@e9 x * @l2 2)
insert @f1.body[ah]: @s3 let @p3 z = @e4 (@e5 y + @l3 1);

Text diffs vs Draxl

Traditional code modification is text-oriented. Draxl uses semantic patch operators over stable IDs.

Concern
Text diffs
Draxl
Edit target
byte ranges, lines, spans
stable node ids
Ordered insert
textual position
ranked slot under parent
Comment attachment
proximity heuristics
explicit anchors
Merge conflicts
overlapping text
overlapping semantic regions