ARCHITECTURE · FEATURE-SELECTED GRAPH THROUGH V24

A program model that agents can query without reconstructing meaning from text.

Stable identity first. Source edits second.

The Semaprax semantic program graph records typed declarations, effects, contracts, ownership facts, call relationships, and lowering identities under a content-derived revision.

semaprax://architecturev0.2
entity     Semaprax
status     pre-alpha research
snapshot   c16348f
authority  github.com/wavect/semaprax
// STATUS

Repository status at the audited snapshot

Repository snapshotc16348f · 2026-08-29. Documentation passed, but the overall workflow failed, so this head is not labelled verified.
Full product status49 Partial · 0 Implemented · 0 Missing
Graph and project contractGraph ≤ v24 · Project v1 baseline · Project v8, v9, v10 developer preview
Promotion baselineNo exact passing promotion commit or workflow run is asserted for this snapshot.
Authored developer previewOwned-data, record, and UTF-8 project profiles, package analysis, borrowing additions, Project Agent Transport, and Revision Store are present in source but unpublished or unpromoted.

How does Semaprax work?

Semaprax parses human-readable source into validated HIR and a feature-selected semantic graph, preserving older graph bytes when newer schemas are not required. Graph v22 adds bounded owned-record and variant facts, v23 adds Shared Loan Plan facts, and v24 adds projected owned-byte-field borrowing. Project v1 remains the promoted baseline; Project v8-v10 package routes are authored developer previews, not supported public APIs.

// 01

Stable identity first. Source edits second.

Stable semantic identity

Authored @id values and compiler-owned identities persist across source projections, HIR, graph serialization, diagnostics, and generated symbols. Identity is validated as NUL-free before it reaches machine output.

Bounded agent context

Agent Context v1 and v2 return dependency-bounded graph slices with explicit node, byte, depth, and traversal limits. The default remains v1; v2 adds directional call traversal and separate frontiers.

Revision-bound semantic patches

Patch operations target semantic identities and an exact graph revision. Stale revisions fail closed. Current patch families are deliberately bounded, including renames and selected persistent member, case, and generic-call changes.

Cleanup and loan proof plans

CleanupPlan and Shared Loan Plan separate ownership and borrowing facts from lowering so cleanup and loan behavior can be replayed independently. Graph v23 records shared loans; Graph v24 adds projected owned-byte-field borrowing. These remain bounded slices, not a complete Rust-compatible borrow checker.

Layered workspace changes and publication

Workspace Operations v1 remains a narrow rename protocol for declarations and import aliases. It now sits beside Semantic Workspace Change v1, replacements-only evidence, a structural-change derivation layer, managed immutable generations, and authenticated publication. None grants arbitrary source-tree or Git-wide mutation authority.

Project and package previews

Project v8 adds an owned-data API for Bytes, Option<Bytes>, and Result<Bytes, i64> across generated npm/Core-Wasm and unpublished safe Rust routes. Project v9 adds flat owned records and Project v10 adds owned UTF-8. All three remain unpublished and unpromoted developer previews.

Transport, revisions, and compatibility

Project Agent Transport v5 and Project Revision Store v1 extend project-level exchange and authenticated revision storage. Semantic Package Report v2, Offline Package Lock v1/v2, and Package Compatibility Evidence v1 add deterministic analysis without turning package existence into public support.

Evidence before publication

Source implementation, exact-head execution, publication, and promotion are separate states. The audited commit passed its documentation workflow but failed its overall workflow, so the moving main branch is not labelled verified.

// 02

The source projection stays readable

module examples.meaning;

@id("math.add")
fn add(left: i64, right: i64) -> i64
    requires left >= 0
    ensures result == left + right
{
    left + right
}

GitHub specifications are the normative source. This page is a dated research summary. GitHub repository.

// FAQ

Questions, answered without the hype

Is the semantic graph a knowledge graph or RAG system?

No. It is the compiler's typed, versioned program representation. It records declarations, identities, effects, contracts, relationships, and lowering facts rather than generic documents or embeddings.

Can an agent edit any program through semantic patches?

Not yet. Single-file patch schemas remain bounded. Workspace Operations v1 adds only evidence-gated declaration and import-alias renames across existing managed paths, and does not provide general source-tree or Git atomicity.

Research project by Wavect: Wavect GmbH. Created by Wavect as an open-source systems research project.