Line numbers and byte ranges identify text in one source snapshot, not the declaration an agent intends to change. SEMAPRAX’s described approach gives public declarations persistent semantic IDs, keeps expression IDs tied to a revision, and routes edits through compiler-checked state. That boundary can make targets more precise, but it does not prove a proposed feature is correct or replace human review.
Why are line and byte offsets poor agent edit targets?
An instruction such as “replace bytes 418 to 463” points to a range in a particular version of a file. Add a comment, reformat the code, or receive a concurrent edit, and the same range may now point somewhere else. An agent can then make a syntactically valid change to the wrong construct.
As an Amazon Associate I earn from qualifying purchases.
A name is more readable than an offset, but it is not necessarily a unique identity. Names can repeat across scopes, overloads can share a name, and a rename changes the text used to locate a declaration. A robust target needs to say which program entity is intended and which source state the edit assumes.
Recommended Free Tools
| Targeting approach | What it identifies | Where it can go wrong |
|---|---|---|
| Line or byte range | A location in an inspected source snapshot | Formatting, inserted comments, or concurrent edits can shift the location. |
| Name alone | Text that may refer to a program entity | Scope, overloads, or renames can make the name ambiguous or stale. |
| Semantic identity plus revision | An entity and the source state in which the proposed edit was formed | The identity contract still has limits, and revision checks do not establish that the change is desirable. |
As Kevin Riedl puts it in the Wavect article, “A coding agent should edit a declaration by identity and expected meaning, not by a line number that may already be stale.”
#1 Best Overall
How does SEMAPRAX describe identity across edits?
Persistent identity for public declarations
The article describes persistent @id identities for public declarations. An edit can therefore name a declaration as its target without relying solely on the declaration’s current line or spelling. This is an identity contract for the entities the system designates as public declarations, not a guarantee that every program fragment keeps the same identity through every rewrite.
Revision-scoped identity for expressions
Expression identities remain tied to a revision. That distinction acknowledges that arbitrary changes can alter or replace expression-level structure, making a promise of persistent identity across rewrites inappropriate. An agent that targets an expression must therefore work against the relevant source revision rather than assume the expression has a timeless identifier.
How does Rust encode the identity boundary?
In the historical Rust code excerpted by Wavect, declaration and expression identifiers are separate newtypes. The shortened example is:
Rank #2
pub struct DeclarationId(String);
pub struct ExpressionId(String);
pub struct ResolvedFunction {
pub id: DeclarationId,
// checked signature, body and effects
}
A function that accepts a DeclarationId cannot accidentally receive an ExpressionId as though the two were interchangeable; crossing that boundary would require an explicit conversion. The types make an architectural distinction visible at API boundaries, where it is easier to review and enforce than a convention that both identifiers happen to be strings.
This is evidence about the code snapshot discussed in the article, not a claim that the current release has exactly these definitions. Wavect’s 6 October 2026 update says the article’s examples and pinned links document an earlier snapshot, not v0.8.0.
What does the checked semantic pipeline contribute?
Wavect describes a flow from readable .spx source into resolved HIR, followed by compiler checks for the subset of types, effects, ownership, and contracts admitted by the language. Graph JSON and target artifacts are then projections from that checked representation. The key design choice is ordering: downstream views are derived from compiler-resolved meaning rather than treating a graph or text location as the authority.
Rank #3
In this account, the graph is a compiler projection and Git remains the human-readable surface for reviewing source changes. That division is useful for agents and engineers: semantic structures can support targeting and tooling, while ordinary source diffs remain inspectable. These are Wavect’s descriptions of the architecture, not independently reproduced results.
What makes a semantic graph deterministic?
The historical code uses BTreeMap for declaration indexes and BTreeSet for relation sets. Ordered collections help avoid output drift caused by randomized hash iteration when serializing those structures. They do not, by themselves, make an entire pipeline deterministic.
Determinism also depends on preserving the meaning of ordered execution sequences. Sorting every collection indiscriminately could change semantics where order matters. A graph projection needs stable ordering for unordered relationships while retaining intentional order in sequences whose execution meaning depends on it.
How do revision-bound patches and replayable evidence reduce risk?
The article describes a proposed patch as naming both its semantic target and the source revision on which it was formed. A patch-evidence route replays bounded evidence, checks the source snapshot, and stages or applies the change only after those checks. This is intended to catch stale intent, a wrong target, or confidence claims that have not been replayed against the relevant state.
The guarantee is deliberately narrower than “the change is correct.” Replay can support the claim that a bounded proposal still satisfies the compiler checks to which its evidence is bound. It does not establish that a feature is wise, prove all behavior correct, provide human approval, or grant write authority merely because someone possesses an evidence capsule.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →What is current, and what does the historical walkthrough show?
Wavect’s 6 October 2026 update describes SEMAPRAX as an open-source, agent-native systems programming language in beta and reports v0.8.0 capabilities including typed runtime Agents, a compiler-connected development harness, and bounded Rust, native, and WebAssembly integrations. These are publisher-reported status and capability claims, not independent verification. The article separately warns that its code examples and pinned links are historical engineering evidence, not v0.8.0 implementation proof.
For the exact historical revision used in the article, Wavect gives this walkthrough:
git clone https://github.com/wavect/semaprax.git
cd semaprax
git checkout ca339feffcadf77a679abe2f159376287cf2e22c
cargo run -- graph examples/hello.spx
That command inspects a graph projection at the pinned historical revision; it does not demonstrate v0.8.0. The article advises consulting the repository’s documented quality gates before treating local modifications as evidence.
Quick Recap
What the identity model does—and does not—establish
- It changes the target: public declarations can be addressed by persistent identity rather than a potentially stale text location.
- It makes scope explicit: expressions remain revision-scoped, and a patch is tied to the source revision against which it was proposed.
- It gives tooling checked structure: graph and target projections are described as downstream views of resolved, checked HIR.
- It supports bounded verification: replay can validate specified compiler checks against a source snapshot, not every property of a program or a product decision.
- It is project-specific evidence: Wavect’s account does not show that all coding agents or compiler systems use this design, nor does it report a performance benchmark.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




