I built diff-journal, a small Node.js library for append-only, diff-based journaling of file changes with deterministic replay and rollback.
The core idea is simple:
every file change is recorded as an immutable journal entry (unified diff)
the journal is the single source of truth
files on disk are derived artifacts that can always be rebuilt
This is especially useful for automated or AI-generated file changes, where you want:
strict auditability
deterministic replay (no heuristics, no “best effort” undo)
the ability to materialize any past state by sequence number
It’s intentionally not a VCS and doesn’t try to replace Git.
Repo: https://github.com/svenschaefer/diff-journal
npm: https://www.npmjs.com/package/diff-journal
Feedback very welcome.