docs / the tree · folders with files
Sources
A source is a folder with files: a repository or a folder on disk, placed in the tree beside the documents it belongs with. The site's code sits next to the pages it serves. Source code stays in git, where it merges per commit and a build can run against it. Mod knows where each checkout is and which session works in it, and shows you what changed.
Mod decides
- Code is never put on the log as documents. A codebase merges per commit, not per character.
- Disk is a projection, never a peer. Nothing syncs between documents and files in the background.
- Every crossing between the realms, a checkout, a pull, a save to disk, is a command with one direction.
- A save is refused if the file changed since you opened it, and you see the difference first.
- A reference names a realm and a path, never a host. Moving a checkout does not break a link.
- A source folder holds only its files. A device without that checkout shows the folder as unavailable.
You decide
- Which repositories and folders a project uses. several per project soon
- Branches, and which device or VM holds each worktree.
- Your git host, CI and review rules. Mod does not replace them.
<span class="c">// one address for both realms. It never names a host.</span>
type Realm = 'doc' | 'code'
interface ModRef { realm: Realm; path: string; at?: string }
Why it is fixed. Treating a document and a file as two copies that reconcile is how work gets lost without anyone noticing. Mod lost work that way twice before making this rule.