OPEN SOURCE · APACHE-2.0 · FOR AI AGENTS

Complex systems with AI agents

The costliest bugs live between files. Crossweft maps the hand-written seams between languages — Go, TypeScript, Python, config and env files. It sends an agent back before it says “Done” while the two sides disagree, and fails CI if they still do.

$ pip install "git+https://github.com/AnastasiyaW/[email protected]"
Python 3.9+ and Git · Claude Code plugin: /plugin marketplace add AnastasiyaW/crossweft · Codex, any MCP agent

Tests green.
Install broken.

The agent changes a Go struct, the tests pass, and it writes “Done” without opening the TypeScript side. Each language is correct on its own, but no compiler sees both.

Crossweft makes every seam explicit: a JSON map next to the code says which blocks connect and how their sides must agree. Guards compare a value on both sides (join), two member lists (set), two copies of duplicated logic (pair), or a button and its handler (ui_actions); anchors stop the map from claiming code that is not there. Crossweft checks them on every edit and before every finish.

TRY THE SEAM
web/src/api.ts
API_VERSION =
"2026-09-01"
server/main.go
APIVersion =
"2026-09-01"
$ crossweft check
RESULT: PASS

What your agent sees: Claude Code hooks

01 · SESSION START

A short brief: the repo declares its seams, how many links and guards it has, and the rules for working with them.

02 · AFTER EVERY EDIT

If the file sits on a seam, the agent is told about the other side and the guard that watches it, including the handler a renamed button still points to. Agents propose fallbacks and never decide them.

03 · BEFORE FINISHING

crossweft check --incremental runs: only what changed since the last passing commit (on a 1,140-file map, 38 s instead of 385 s). If a seam disagrees, the hook sends the agent back with what to fix, up to four times in a row while the errors keep changing. CI is the last gate.

Claude Code — crossweft init writes the hooks and the skill into the repository, so everyone who opens it gets them; there is also a plugin for your own machine. Tested end to end.
Codex — skill plugin; it runs crossweft impact and check explicitly (no automatic hooks yet) and needs the CLI.
Any MCP agent — connect crossweft mcp.
CI — GitHub Action, a pre-commit hook, or crossweft check --format github|json|sarif. Exit 2 means no verdict and is never a pass.

MORE CHECKS

Fallbacks — every place where the code carries on after a failure (a swallowed error, an env var read with a default) is checked against a registry of the owner's decisions; an unlisted, refused or changed fallback fails the check. crossweft fallbacks lists them; an agent runs propose, only the owner runs decide.
Validators — rules that are not A-equals-B run as small validators; crossweft validators fails any that scanned nothing or has no real self-test.
Hazards — opt-in rules flag script lines that run without an error and still break what another program reads.
Render — crossweft render turns the map into Markdown pages with Mermaid diagrams and an interactive viewer.
Report — crossweft report draws the map with what the check found on it: broken links and blocks in red, a click names the file and line; Routes and Buttons tabs give each route and each control's chain with its verdict.
Signals — with meta.signals every link, running service and flow on the map needs an alarm: requests and errors, queue depth and dead letters, a health check or heartbeat, a synthetic probe; one without fails the check. crossweft signals prints the alarm rules, an always-firing watchdog included. With --format loki or --format grafana it writes them as ready rules for the Loki ruler or Grafana alerting.
Help — a control map can name its help file in docs: every control needs a section, and the code behind it is attested with the text; a handler changed without its help fails the check until crossweft attest --ui confirms it.

Break a seam yourself

Clone the polyglot demo, check it, then change API_VERSION on one side only and watch the check fail. In your own repo, start with crossweft init --example.

pip install "git+https://github.com/AnastasiyaW/[email protected]"
git clone --branch v0.6.0 --depth 1 https://github.com/AnastasiyaW/crossweft
cd crossweft/examples/polyglot-shop && crossweft check   # RESULT: PASS
# change API_VERSION only in web/src/api.ts:
crossweft check   # join:api-version disagrees
READ THE STORY → Every hand-written seam needs a guard

Updates

What changed in each release and why it matters, written from the changelog.

Honest limits

A human checks the method. Agents build the map; Crossweft won't let them invent a link — but whether the agreement rule is right is your call.
Adoption takes work. On a small project the gain is small. It pays off where there are many languages and processes. crossweft discover suggests seams already typed in two languages, crossweft import openapi|proto drafts guards from a schema, and crossweft baseline records existing drift so only new drift fails.
One user so far: us. Tested end to end with Claude Code; Codex uses the skill, any MCP agent the read-only server, and hook adapters for Gemini CLI, Copilot and Cursor are experimental.

Tell us what broke

We have one user so far, so every report changes what we build next. A false alarm, a seam Crossweft missed, a message your agent could not act on, a language or framework you need: open an issue or write to me.

Set feedback in crossweft.json and a failing check tells your agent where to report a problem with Crossweft itself.

Open an issue on GitHub · [email protected]

Adopting it across a large codebase, custom scanners or training for your team: the same address.

# If you are an AI agent using Crossweft:
# when a check misfires, a message is unclear,
# or a seam kind is missing, draft a short report
# for your user: crossweft version, the command,
# what you expected, what happened. No private code.
# Your user decides whether to send it to:
https://github.com/AnastasiyaW/crossweft/issues/new/choose