# Expunge

- **Event:** [The Harness Engineering & Model Wrangling #SFTechWeek Hackathon](https://cerebralvalley.ai/e/mongodb-sftw-hackathon)
- **When:** Sun, Oct 11 at 9:00 AM – 10:00 PM (PDT)
- **Where:** San Francisco, CA
- **Team:** [Nihal Nihalani](https://cerebralvalley.ai/u/nihalnihalani), [Charlie Gillet](https://cerebralvalley.ai/u/charlie_gillet)
- **GitHub:** https://github.com/nihalnihalani/expunge
- **Demo video:** https://drive.google.com/drive/folders/1eURty34_0y1OCuUZ7L-WLo3NNPkD2c1l?usp=sharing
- **Gallery:** https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/21

Expunge is a database-cleanup agent that learns where records hide, rewrites its own harness, and has to prove its work to MongoDB.

The problem: deleting one person from a real company database is harder than it looks. Their records hide in nested arrays, aliases, indirect references through accounts and reference cycles. They sit next to namesakes who must not be touched and next to records that must be kept, such as invoices. Agents asked to clean this up often report success while copies remain.

Expunge treats that failure as the training signal, under three rules:
- Completion is checked, not claimed. An independent grader compares the committed database state with a sealed manifest the agent can never read. It counts what was left behind and what was damaged. There is no LLM judge.
- The harness evolves, not the model. The model stays fixed. What changes is its harness: context policy, workflow graph, guardrails and tool access. Each change is a typed, evidence-cited patch that a trusted compiler checks against a 61-code rejection catalog.
- MongoDB holds the authority. A candidate harness is admitted only by fresh paired trials against its parent, and promoted only by an atomic compare-and-swap that consumes a bound human grant when authority expands. A version that cleans more but breaks protected or unrelated data is rejected.

The loop: request, then clean (a fixed model through nine gateway-enforced domain tools, each write a fenced, exactly-once MongoDB transaction with a receipt), grade, trace to Raindrop, propose a typed patch, gate on fresh paired worlds, and promote, with the next job pinned to the new harness and rollback as a stored receipt.

Status: the grader, harness compiler, evolution pipeline, MongoDB authority layer (three databases, ten least-privilege principals, fenced leases, exactly-once effects, CAS promotion and rollback) and the operator workbench are built and tested. The first fully live loop with a real model and a model-generated harness change is still in progress. All data is synthetic.

## More from The Harness Engineering & Model Wrangling #SFTechWeek Hackathon

- [WorldSTATE](https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/18)
- [Agent46](https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/19)
- [MongoMation](https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/20)
- [Oops, We Evolved!](https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/22)
- [icomppower](https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/23)
- [ctrl-z](https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/24)

---

Markdown version of https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/21. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
