inside the engine · from ARCHITECTURE.md at v0.6.1
How a raw file moves
inbox/a file arrives
→
processing/<run>/claimed into a run
→
corpus/extracted to Markdown, a dated source
→
proposaldrafted facts, by an agent or a person
→
the gatesrecap · contradictions · diff · apply
→
graph.jsonthe fact lives, cited
→
ingest completethe run is archived
A file is in exactly one place at any moment, and the place says what happened to it.
inbox/ ──claim──► processing/ ──extract ok──► (stays) ──complete──► archive/
│ archive/<run>/ a new version
└──extract fails──► errors/<run>/ + <file>.error.json
Claiming is a rename, so a crash leaves nothing half-moved; re-running the ingest claims the leftovers again, because extraction is idempotent. A lock in processing/ keeps runs serial.
completerefuses while a curate candidate is open or the build predates the run's documents, so archive/ always means "in the graph", and an empty processing/ means nothing is owed.
Each run's manifest records every file's content hash; the same filename arriving with different bytes is announced as a new version, because the facts citing the old one may need supersession.