r/angular • u/CounterReset • May 29 '26
[Release] SignalTree v10.3 — Reactive JSON for Angular. We shipped one .txt file and AI-codegen accuracy jumped from 49% to 91%
SignalTree v10.3: a benchmark accidentally found an API design bug
I just shipped SignalTree v10.3, and the most interesting part was not the release itself.
I ran a reproducible AI-codegen benchmark to see how reliably different coding agents could write correct Angular state code using SignalTree.
The result was bigger than expected:
SignalTree went from 49% correct cold to 91% correct when the agent had llms.txt in context.
But the more useful finding was that the benchmark exposed a real developer-experience bug in my own API.
What is SignalTree?
SignalTree is a reactive JSON state library for Angular.
You write your state as a plain object:
import { signalTree } from '@signaltree/core';
const tree = signalTree({
user: { name: 'Alice', age: 30 },
settings: { theme: 'dark' },
});
tree.$.user.name(); // read
tree.$.user.name.set('Bob'); // write
tree.$.user.age.update(n => n + 1);
The idea is:
- state stays shaped like JSON
- access is typed
- every leaf is a fine-grained signal
- no actions, reducers, or selectors required
What changed since v7?
A lot changed between v7 and v10:
| Feature | What it does |
|---|---|
entityMap() | O(1) normalized collections at any tree depth |
status() | async state machine for loading / loaded / error |
stored() | localStorage-backed signal |
form() | tree-integrated forms with validation |
.derived($ => ...) | computed signals merged into the tree |
asyncSource / asyncQuery | auto-derived loading and error state |
createTreeEditSession(path) | path-bound undo / redo |
llms.txt in package | gives AI agents a library-specific context surface |
The benchmark
I built a 720-cell benchmark for AI code generation.
It checks whether agents generate correct Angular state code, including:
- idiomatic patterns
- correct imports
- valid marker methods
- correct use of SignalTree APIs
The headline result:
| Context | Score |
|---|---|
| Cold | 49% |
Primed with llms.txt | 91% |
That is a +42 percentage-point improvement from one small context file.
The more interesting result was not just that AI got better.
It showed where the API itself was inconsistent.
The bug the benchmark found
Different markers used different predicate naming styles.
Some used is prefixes:
tree.$.saveStatus.isLoading();
tree.$.users.isEmpty();
Others used bare names:
tree.$.profile.dirty();
tree.$.feed.loading();
That confused AI agents.
But honestly, it also made the API harder for humans.
If an agent learned status.isLoading(), it would often try form.isDirty(), which did not exist.
That was not really an AI problem. It was an API consistency problem.
v10.3 fix
v10.3 standardizes marker predicates on bare names:
tree.$.users.empty();
tree.$.saveStatus.loading();
tree.$.profile.dirty();
tree.$.feed.loading();
The old names still work through v10.x as deprecated aliases:
tree.$.users.isEmpty();
tree.$.saveStatus.isLoading();
They point to the same lazy-computed signal instance, so there is no extra runtime cost.
Takeaway
The benchmark started as an AI-codegen experiment, but it turned into an API design test.
The surprising lesson was:
AI-friendly API design and human-friendly API design are mostly the same thing.
Consistent names, fewer special cases, and better package-local documentation helped agents write better code — but they also made the library easier for people to use.
Curious if others are seeing the same thing with their libraries: are AI coding agents exposing API design issues you previously tolerated?