Documentation, kept apart from the code, becomes a lie the moment the code changes.

Hand-maintained documentation loses to drift. The separate docs site, the wiki page, the README aging in private: all share one failure mode, sitting in a different file from the thing they describe, touched by a different person at a different time, until they stop being true. The compromise most teams settle for is sparse, lowest-common-denominator docstrings that survive only because there is almost nothing to them.

ae-xtr removes the second file. Documentation is written as structured comments inside the source, marked with the @ae::dx family of tags, in the file the author is already editing. One command rebuilds the markdown tree from whatever the syntax tree currently holds. There is no second copy to keep in sync, only a read of the source repeated on demand.

The same small tag set, read from a Rust doc comment, a JSDoc block, a Python docstring, a Svelte comment.

The same syntax works across ten languages, each with a dedicated parser adapter that surfaces the comment nodes its grammar emits. Svelte gets special handling: one file embeds markup, script, and style, and the adapter reads all three.

The @ae::dx block ae-xtr
01 @ae::inputs
parameters, each name, type, and description
02 @ae::yields
return values
03 @ae::throws
error conditions · @ae::panics in Rust
04 @ae::effects
state mutations, side effects
05 @ae::requires
preconditions
06 @ae::example
usage
07 @ae::complexity
performance bounds
08 @ae::safety
mandatory on unsafe blocks

Scan, parse, extract, generate. Validation forks off the same read.

One ae-xtr generate runs four stages left to right. The check subcommand runs the same read without the write, so the gate and the build share one path.

generate / check ae-xtr
Project tree git-aware walk · .gitignore + exclude globs
Read · generate
01 Parse
source compiled to an AST per file · comment nodes kept in context
02 Extract
a state machine keeps the @ae::dx blocks with their location
03 Generate
render markdown · mirror source layout under docs/
Same read · check / strict
01 Validate
coverage floor · required tags present
02 Strict
warnings become errors · exit 1, writes nothing
docs/ tree, or a verdict generate writes · check only judges

Four commands over one read of the source.

The same pipeline drives a small command surface: generate writes the tree, check gates it, stats reports on it, and watch keeps it live.

What it gives you ae-xtr
01 / Generate
Parse every file, write the markdown mirror.
02 / Check
A CI gate: hold the coverage floor.
03 / Stats
Names every undocumented item.
04 / Watch
Regenerates on save, a live preview.
Git-aware
Walks the project the way Git does.
Languages
10 One protocol, Rust to Svelte.
Configured
One config file: scan, languages, output.

Hand-written docs can be wrong. A projection can only be stale or absent.

A documentation tree maintained by hand is an artefact living beside the code, free to disagree with it. The tree ae-xtr writes is a read of the AST as it stands, so it never says something the code does not. When it falls behind it falls behind visibly: missing coverage stats can name file and line, and one rerun closes the gap.

The asymmetry ae-xtr
Without it
Documentation in a second file is free to disagree with the code, and usually does.
With ae-xtr
A tree projected from the AST is only ever current, stale, or absent. Never wrong.
work