tabular-cleanup
Tabular Cleanup Loop
A single agent that takes a messy data dump (<artifact>) to the cleanest defensible state,
no human in the loop once running. The objective is a checklist, not a score: the agent
infers a data contract, compiles it into deterministic binary checks (each reports a
violation count, never a weighted float), then each iteration profiles the table, picks the
worst open check, applies one pandas transform to resolve it, and keeps it only if that
check's violations strictly drop with no collateral damage. Every accepted transform appends to
a replayable pipeline.py; every attempt logs to the ledger. The work decomposes into
structure (parse correctly, one tidy table, sane types) → contract synthesis (turn every
observed anomaly into a check) → the fix loop. Contract synthesis is where quality is won or
lost: an issue the profiler notices but never compiles into a check (classically, many spellings
of one category) silently survives — a green checklist over dirty data. Checks read the stored
value, so canonicalization is real work the loop must do, not a check-time trick.