Developer Spends $9,000 on AI Agents to Build Crossweft Tool for Enforcing Multi-Language Component Agreements

A software developer creating a Photoshop plugin with local neural networks spent over $9,000 on AI coding agents including Claude Code and Codex while building ten layers of security across C++ and Go components. The project required managing 54 inter-component seams with 188 value comparisons and 105 set comparisons that compilers could not verify across languages. After repeated failures where agents updated one side of an interface without touching the other, the developer created Crossweft, an open-source tool that maps seams in JSON and enforces them with join, set, and pair guards. The system uses anchors to code literals, meta-runners that reject silent-zero validators, and hooks that force agents to reconcile both sides before committing. Crossweft now provides MCP integration and plugins for major coding agents, turning manual memory-based contracts into automatically checked deterministic sensors.

HabrTranslated from Russian

Read at source

A developer building a retouching application and Photoshop plugin with a local neural network spent more than $9,000 on AI agent subscriptions while constructing ten security layers across multiple processes and languages. The layers included a protected channel between plugin and system service, device registration, timestamped artifact signing, build attestation, update channel, model encryption, and watermarking. These components, written in C++ and Go, required 54 inter-component seams that compilers could not check because the sides used different languages and lived in separate processes.

The developer identified these seams as points where two or more sides must exactly match: service names, protocol versions, DTO fields, environment variables, and duplicated business logic such as price rounding. After three concrete failures—an identifier defined in three nearly identical functions, a dependency resolved from two different directories, and a security validator that scanned zero files for weeks—the need for automated enforcement became clear. AI agents proved especially prone to leaving one side of a seam unchanged because they performed only local edits and defined “done” as passing the checks visible in their current context.

Crossweft solves the problem by requiring every seam to declare its enforcement method in a JSON map placed next to the code. Each connection is anchored to literal strings so that code movement immediately invalidates stale descriptions. Enforcement types include shared-code, generated, schema-tests, duplicated, and convention. Duplicated and convention seams receive dedicated guards that read both sides of the seam; a guard that reads only one side is rejected.

Three simple guard types cover most cases: join verifies identical values, set verifies identical sets of fields or constants, and pair verifies duplicated logic blocks marked with crossweft:begin and crossweft:end tags. Larger architectural rules check that every server route appears in the map, that every client call is explained by a documented link, and that data-flow invariants hold. Thirteen custom plugins extend the system, including one that reconciles 916 Go SQL calls against 161 tables and 276 triggers.

Agent integration uses three hooks: a session-start summary of the seam map, an after-edit reminder naming the opposite file and required guard, and a pre-finish crossweft check that blocks completion until all seams agree. When an agent changes only one side, the attest command refuses to accept the change unless the developer explicitly confirms the other side remains unchanged. Findings that cannot be fixed immediately are recorded with owners and next steps; once resolved they automatically invalidate the record.

After the seam map and guards were added in late September, the installer that had previously failed on clean virtual machines succeeded for the first time. The number of active validators rose from four to fifty, each required to output SCANNED counts and pass self-tests. The open-source release includes the crossweft command, plugins for Claude Code and Codex, and an MCP server so any compatible agent can treat seam verification as a read-only tool.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in AI Security

Logical Argument Claims Full Alignment of Superintelligent AGI Is Fundamentally Impossible
Claude Account Bans Linked to IP Reputation, Device Environment and Payment Channels, But No Confirmed Formula
Local LLMs in AppSec: What Open Tools and Models Can Handle in Application Security