3 min read

Behold the miraculous self-improving codebase! ane v0.2 is out.

Since one of the core goals of ane is to allow code agents to explore, read, and edit source code with one-shot commands using chords and a simple CLI, this week I experimented with a self-improving codebase to work on ane from a code agent's point of view. I created an amux workflow which had the agent build ane from source, use it to do all of its file exploration, reading, and writing while it implemented a work item, and any time it encountered something unexpected (a bug, a chord that behaved differently from expectations, etc.) it would record its findings in a file. Then, before moving on to the next step of the workflow, a self-fix stage would run to review the issues the previous agent encountered, reproduce the issue, create a work item to address the issue, allow me to approve it, implement the fixes, and move on.

Over the course of 4 work items, this loop not only implemented several new ane features, but also found and fixed bugs that the agent itself encountered while using ane to do said work. This was quite satisfying to watch, and worked far better than expected. This loop even self-improved the skill that ane initializes for the code agent using it (optionally, if you run ane init <agent>). It added examples, and some best practices synthesized from its own usage of ane working on real-world code exploration and editing tasks. Pretty damn cool if you ask me. My code agents are now using ane for 90% of source code related tasks!

On to the release itself; when I shipped ane 0.1, the chord system could target functions, variables, and structs — but you had to already know what was in the file. If you didn't, you'd fall back to reading the whole thing. That defeated the point of structured editing. Agents were still burning tokens on yebs / YankEntireBufferSelf just to figure out what existed before they could do anything useful.

The biggest addition in 0.2 is the l (List) action. lefd lists every function definition in a file — signatures with line numbers, no bodies. lefn lists just the names. levd lists variables. In exec mode, the output goes to stdout so an agent can parse it and decide what to target next. In the TUI, it opens a scrollable overlay — arrow keys to browse, Enter to jump.


Install or update:

curl -s https://prettysmart.dev/install/ane.sh | sh

The List action pairs well with the new Definition component (d). lefd / ListEntireFunctionDefinitions gives you all of a file's function signatures like pub fn process(input: &str) -> Result<Output> , which is exactly what you need to understand a file's API surface.

The new Word component (w) fills another gap, where celw / ChangeEntireLineWord changes the word at the cursor, jnlw / JumpNextLineWord jumps to the next word, and jflw/jllw reach the first or last word in a line. These are text-based, no LSP required.

Speaking of j, another new useful action is Jump, which allows the user in the TUI to jump the cursor efficiently. For example, j3ls / Jump3LineSelfjumps the cursor 3 lines. jnfd / JumpNextFunctionDefinition jumps to the next function in the file. You get the picture! Since the CLI does not have a cursor, ane exec rejects jump-action chords at parse time. ane has a frontend-aware chord engine, which is coming in handy as more features get added.

As you saw above, the positional slot now accepts digits19 for count-based operations. j5lw / Jump5LineWord jumps forward 5 words. l3fd / List3FunctionDefinitions lists the next 3 function definitions. This is mostly for us humans working in the TUI, and it makes navigating around a large file much easier.

The TUI also got meaningful quality-of-life work in this release. The file tree now watches the project directory and updates live, so if you create, move, or delete a file in another process, it appears in the tree without any refresh. If a file you have open changes on disk (say, your agent wrote to it), ane detects it and shows a reload hint. Ctrl-O reloads. You can also manage files directly from the tree now: Ctrl-Rto rename, Ctrl-D to delete (with a confirmation dialog), Ctrl-N to create a new file.

The top bar in the editor pane now shows cursor position, LOC, total lines, and an approximate token count for the open file. Token counts are useful for estimating how much of an LLM's context window would be used to read the current file, and even if it's not strictly useful day-to-day, it helped me get a better intuitive sense of how much "space" files take up when I'm working on them with LLMs.

If you want your code agent to learn the chord grammar automatically, ane init claude (or codex, gemini, etc.) drops an optional skill file into the agent's config. It's not required, but it helps them pick the right chords without trial and error.

Please give ane a look and let me know your feedback!


Source, issues, and releases at github.com/prettysmartdev/ane. More at prettysmart.dev. Feedback and contributions are welcome.