Story

Show HN: Draxl, agent-native source code with stable AST node IDs

rndhouse Tuesday, March 10, 2026

Hello,

I’m building Draxl, a source format for a world where code is edited by millions of agents.

AI agents will produce far more code than humans do today. Rebased branches, concurrent edits, and long-lived forks will become much more common. Code management needs more precise control at that scale.

Draxl embeds stable AST node IDs directly in the source, so tools can target syntax by identity instead of by line position. Here’s a small example:

Here is a small example:

  @m1 mod demo {
    @d1 /// Add one to x.
    @f1[a] fn add_one(@p1[a] x: @t1 i64) -> @t2 i64 {
      @c1 // Cache the intermediate value.
      @s1[a] let @p2 y = @e1 (@e2 x + @l1 1);
      @s2[b] @e3 y
    }
  }
The syntax is:

  @id[rank]->anchor
* `@id` gives the next node a stable identity

* `[rank]` orders siblings inside ranked slots

* `->anchor` attaches detached docs or comments to an existing sibling id

The same code lowers to ordinary Rust:

  mod demo {
      /// Add one to x.
      fn add_one(x: i64) -> i64 {
          // Cache the intermediate value.
          let y = (x + 1);
          y
      }
  }
In Draxl, functions, statements, expressions, docs, and comments can all carry stable IDs. Ordered siblings carry explicit ranks. Detached docs and comments can carry explicit anchors.

That lets a tool say "replace expression `@e3`" or "insert a statement into `@f1.body[ah]`" instead of "change these lines near here."

That should make semantic replay more reliable under heavy concurrent editing. It should also reduce false merge conflicts and localize real ones more precisely.

It also opens up other uses. You could attach ownership, policy, or review metadata directly to AST nodes.

I’m interested in early feedback: does this source model feels useful, and whether editing code this way seems like a better fit for agent-heavy workflows. Where are the best places on the internet to discuss this sort of thing?

Connect with me: https://x.com/rndhouse

Summary
Draxl is an open-source machine learning library for handling large-scale, multi-modal datasets. It provides efficient data loading, transformation, and model training capabilities, making it suitable for a wide range of machine learning tasks.
4 0
Summary
github.com
Visit article Read on Hacker News