Semanticus
Documentation

Architecture & principles

Semanticus is one process that both doors attach to. Under the hood: a single-writer model dispatcher, one undoable broadcast transaction per edit, and deterministic gates that prove a change before it ships.

One process, two doors

The VS Code extension (TypeScript) talks to the engine over JSON-RPC on a named pipe. Your Claude talks to the same engine over MCP on stdio. Inside, a single-writer model dispatcher owns the TOM (Tabular Object Model): every read and write, from either door, is serialized into one total order, so the human and the agent can never race the model into an inconsistent state.

# the MCP door: your Claude attaches over stdio
<engine> mcp --workspace <project root>

# the RPC door: the VS Code extension attaches over a named pipe

The engine is organised into a few projects:

ProjectResponsibility
CoreEngine plumbing plus the change-tracking, undo and formula-fixup logic.
EngineThe host: the RPC and MCP doors, the session manager, the change-bus, and live query.
AnalysisThe Best Practice and AI-Readiness rule engines.
VSCodeThe TypeScript extension and the React Studio webview.

The TOM comes from a vendored copy of Tabular Editor's TOMWrapper: the valuable headless logic (change-tracking, undo, formula fixup) carried forward, with all new UI built the modern way as a React webview.

Why one process, not a service

A shared in-process session is what makes dual-drive live and lossless: both doors mutate the same object graph on the same undo timeline. Two processes would mean two pictures of the model and a sync problem. There is neither (see The two doors).

The write chokepoint

Every mutation, from either door, funnels through one chokepoint that wraps the work in an undoable, broadcast transaction. That gives three guarantees: one shared undo timeline, live model/didChange deltas tagged with their origin, and last-writer-wins resolution that is visible, never a silent merge.

Writes take one of three routes, and all three land on that same dispatcher, undoable and broadcast:

RouteForCreates a top-level object?
Typed opStructural changes and single, validated property edits.Yes. This is the only create or delete route.
TMDL applyBulk or expressive edits to an existing table or role.No. A new top-level object is rejected.
DAX scriptDAX-centric bulk edits expressed as a script.Not applicable (it edits expressions).

TMDL apply refuses to create a top-level object on purpose: it captures the object's "before" so the edit is fully reversible, and a brand-new object has no "before" to restore. Rather than punch a hole in the undo timeline, it rejects the case and routes you to the typed create op. The one invariant the engine will not break is that every model edit is undoable.

dry_run: plan mode for a single edit

The same chokepoint powers dry_run. Any single mutating op can be rehearsed through its real code path, returning the exact change set it would make plus the op's own result, with a hard guarantee of no mutation, no undo entry, no broadcast and no audit record: the edit is applied, then rolled back. A rehearsal that finds a failure is still a successful dry-run, because it reports the real error you would have hit.

Deterministic gates: evidence, not vibes

Semanticus is the independent referee for what an edit did to your model, and the referee is deterministic. It does not ask the model to grade itself. Instead it runs checks whose answers are facts:

These gates are the spine of Verified Edits and the enforced Workflows (both Pro). A gate that fails does not silently block you: it pauses and states the rule, and a reasoned override is always available and recorded in the audit trail. Accountable, never a hard wall.

The Workflows tab: an enforced playbook with engine-verified gates, captured evidence, and recorded, accountable overrides.

The no-inference principle

The engine runs no AI and holds no AI credentials. It never calls an inference API, and nothing about your model leaves it to a model vendor. "AI" in Semanticus is your own Claude subscription driving the MCP tools, which has two consequences worth stating plainly:

For MCP subscription billing, ANTHROPIC_API_KEY must be unset in that environment, so the tools run against your subscription rather than a metered key. This is the first and firmest design rule: the referee never generates, and the engine never infers.

The honest-result contract

Semanticus treats itself as an agent harness, where the tool result is the real instruction channel to the agent, read at full attention on every call. So every operation is held to a result contract, and the load-bearing rule is honesty about what was and was not verified.

The through-line

Deterministic evidence over vibes, both doors over one live model, and accountability: a failing gate pauses and asks, and it never silently blocks or silently passes. That is the same standard the benchmarks hold the product to.