semantic-contract

semantic-contract is an agent for coding agents from get-tmonier/argot. It costs 0 tokens per session (1,545 once invoked), scanned A, original, MIT.

A developer contract for Argot’s semantic analysis layer, which uses a built-in table of code-token data to compare code meaning and structure.

In plain words
What is it for?
Use it when changing Argot’s semantic analysis, embedding model, inference code, or related calibration behavior.
Why use it?
It records rules that preserve repeatable results, including offline operation and identical results from cached or newly calculated values.

Agent

Part of the argot plugin — 7 skills, 5 agents, 1 hook, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/get-tmonier/argot/semantic-contract
Clone the repo
git clone --depth 1 https://github.com/get-tmonier/argot

Or install argot, the plugin that ships this one along with the rest of its 7 skills, 5 agents, 1 hook, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for semantic-contract

README.md
[![agentmods](https://agentmods.dev/badge/agents/get-tmonier/argot/semantic-contract.svg)](https://agentmods.dev/agents/get-tmonier/argot/semantic-contract)
Your own site
<a href="https://agentmods.dev/agents/get-tmonier/argot/semantic-contract"><img src="https://agentmods.dev/badge/agents/get-tmonier/argot/semantic-contract.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,545 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01545
Opus 5 $0.00000 $0.00772
Sonnet 5 $0.00000 $0.00309
Haiku 4.5 $0.00000 $0.00154

Measured 3d ago against content hash ed80f990f9ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

semantic-contract scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/semantic-contract.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

The semantic layer's self-calibration contract

Companion to calibration-contract.md, which governs the base statistical scorer. The semantic layer (feature semantic, crate crates/argot-rules-semantic/) calibrates itself separately at fit time; this file records the invariants a contributor must not break.

The embedder

A static token-embedding table compiled into the binary — 15.6 MB of int8 weights under crates/argot-rules-semantic/model/, distilled from jina-embeddings-v2-base-code with the model2vec technique, read by argot's own forty lines of inference in static_embedder.rs. Embedding is a table lookup, a sum in token order, an L2 normalise, and an f16 canonicalisation.

Three consequences a contributor should hold onto:

  • There is no download, no cache to warm, no accelerator. A fit works air-gapped on the first run. Any code path that reintroduces a network dependency on the analysis side breaks this.
  • Pooling order is part of the determinism contract. The sum runs in token order over a fixed row layout and the result is canonicalised through f16, so a cached vector and a freshly computed one are bit-identical. That identity is what lets ~/.cache/argot/embeddings/ be a pure accelerator.
  • It cannot represent order or structure. A bag of token vectors is a weaker sense than the transformer it replaced. The layer is viable because the structural confirmation below carries the precision — not because the embedding is strong. Weakening that confirmation to "let the embedder decide" is the change most likely to quietly wreck this layer.

ARGOT_STATIC_MODEL=<dir> points the embedder at another model directory (model.safetensors + tokenizer.json). It exists so a candidate model can be swept before it is shipped; it is not a user knob and is not documented as one.

The shape

One artifact, .argot/semantic-index.json (SemanticArtifact), built at fit: per language, every corpus function's embedding (int8 codes with one shared dequantisation scale, base64) plus two structural fingerprints per function — its callees and its IDF-weighted identifier subtokens — and two self-calibrated config blocks:

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 119 lines · 0 tokens per session scan A ed80f990f9ab

Subscribe to this mod's changes

semantic-contract is an agent published in the GitHub repository get-tmonier/argot (48 stars, last pushed 21d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,545 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

harness-doctor

Check a claudeconf-generated harness against its RECORDED constitution profile — advisory, evidence-driven, read-only. Use when the user asks to check, diagnose, or "doctor" their harness, verify pins/wiring/drift, see whether branch protection matches the enforcement checklist, or whether a profile upgrade is…

nikolaypaskov/claudeconf-plugin · 98 tokens

github-action-reviewer

Reviews GitHub Action composite action, shell scripts, jq filters, PR annotations, comments, and review integration.

fallow-rs/fallow · 26 tokens

ring:qa

Senior QA Analyst for financial systems. Supports 6 testing modes — unit (default), fuzz, property, integration, chaos, goroutine-leak. Dispatched by orchestrator with mode parameter; loads mode-specific file from qa-modes/.

LerianStudio/ring · 52 tokens

implementer

Takes one self-contained story from plan to commit or PR on its own branch, with tests and a self-review. Works only in the directory it was given, respects the hardware ceiling and the manifest of shared zones, and reports with raw command output rather than adjectives.

jjanczur/tyran · 57 tokens

lead

Workflow orchestrator. Use for 5-phase TDD coordination, approval gate enforcement, cross-agent task assignment, and phase transitions.

nguyenthienthanh/aura-frog · 28 tokens

replanner

Triggered by failure-classifier on F2-F4 escalations. Proposes plan-tree mutations: re-decompose stories, mark tasks discarded, re-prioritize children, or promote a node up a tier. Read-only on code; mutations applied via master-planner.

nguyenthienthanh/aura-frog · 57 tokens