cerebral work // product · cicatrix
Regression memory, ledgered.
cicatrix is the regression-memory and convention-drift framework for the cerebral-work estate. It treats test regressions and code-convention drift as first-class knowledge — facts reasoned over with a Datalog core and bridged back into reverie as observations a future session can retrieve.
What it does
- Regression memory. Records every test regression — failing tests, their failing commit, the fix commit, the root-cause note — as durable facts. When the same shape of failure recurs, the agent retrieves the prior incident instead of re-debugging from scratch.
- Convention drift. Diffs running code against the estate’s declared conventions (the AGENTS.md canon, the skill canon, the house style) and emits drift findings the moment a file diverges — before review, not in it.
- Datalog reasoning. The knowledge base is pure
relational algebra, drawn from
wbrown/janus-datalog(the Datomic-inspired embeddable Datalog engine). Rules compose; queries are declarative; derivations are repeatable, not probabilistic. - reverie bridge. Every regression and every drift finding is forwarded to reverie as a typed observation, so the memory daemon’s consolidation, contradiction, and retrieval surfaces own them end to end.
- Canon-anchored. Conventions are not inferred from average behaviour — they are the declared canon. Drift is measured against the source of truth, not against what the codebase happens to have drifted into.
Architecture
| Component | Role |
|---|---|
| datalog core | Relational fact store + rule evaluation; the janus-datalog approach, Rust-portable. Holds regression and drift facts and answers declarative queries. |
| regression collector | Ingests CI/test failures, correlates each to a commit and (eventually) a fix, and emits a regression fact tuple with full provenance. |
| drift detector | Walks the working tree against the declared convention canon (AGENTS.md, skills, style guides) and emits drift findings keyed by rule. |
| reverie bridge | Forwards each fact and finding to reverie as a regression or convention-drift observation; the daemon handles dedup, consolidation, and recall. |
| rule canon | The versioned set of Datalog rules that define what counts as a regression recurrence and what counts as a convention violation. The canon is code-reviewed, not learned. |
Status
Repo: github.com/cerebral-work/cicatrix · Language: Rust · License: Proprietary.
The Datalog core and the reverie bridge are the load-bearing pieces; the regression collector and drift detector are filling out against the estate’s convention canon as it stabilizes. cicatrix ships as a component of the reverie stack, not a standalone product — its value is the closed loop with the memory daemon.