# CNF is a semantic working copy for coding agents

**URL:** <https://racket.discourse.group/t/cnf-is-a-semantic-working-copy-for-coding-agents/4221>\
**Category:** Show & Tell\
**Tags:** package\
**Created:** [May 20, 2026, 4:14pm UTC](https://racket.discourse.group/t/cnf-is-a-semantic-working-copy-for-coding-agents/4221 "2026-05-20T16:14:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tompassarelli](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/tompassarelli/32/2647_2.png) [@tompassarelli](https://racket.discourse.group/u/tompassarelli)\
**Post date:** [May 20, 2026, 4:14pm UTC](https://racket.discourse.group/t/cnf-is-a-semantic-working-copy-for-coding-agents/4221/1 "2026-05-20T16:14:30Z")

</div>

I've been building [CNF](https://github.com/tompassarelli/claim-normal-form) a Racket library that gives coding agents a semantic working copy instead of text files. Source code is claims about stable identities, not strings — a call site points at a function's entity, not at matching characters, so renaming is one claim, not find-and-replace.

The novel part isn't "identity not regex" — LSPs and rope already do that. It's the substrate: one claim graph across languages (Racket/Python/Beagle), supersession by default (history + temporal queries free), agents composing each other's persistent Datalog rules, and an MVCC daemon for multiple agents on one live graph. 30-tool MCP server is the control surface.

Early eval: CNF agent 30/30 vs text agent 26/30 on structural edits, with hidden API-contract tests catching the difference. Caveat: that baseline was regex — weak opponent, rerunning against rope next. The real bet is that the bottleneck for agent code editing is the substrate, not the algorithm.

raco pkg install cnf · [GitHub - tompassarelli/claim-normal-form: Racket implementation of Claim Normal Form — in-memory kernel + Datalog query engine · GitHub](http://github.com/tompassarelli/claim-normal-form) · 379 tests

Feedback welcome, especially from the agent-tooling crowd.
