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.

