Fills a gap pointed out post-v0.3: docs had file-mtime + history/ archival
only, no real version control. Now every Agent that completes work triggers
LoopController to git commit; project ship/sign-off/abandon tag the repo.
Design:
- One git repo per project at data/companies/{cid}/projects/{pid}/.git
- LoopController-centralized commits (Agents stay sandboxed, no git access)
- Commit cadence: each Agent success → commit; Tester red → no commit;
shipped/sign-off/abandon → tag
- New GitVault service (C-18): spawn-git wrapper, ~150 lines,
init/commit/tag/log/diff/status/archive/revert/resetWorkingTree
- New process P-10 (Process.GitCommit): commitAfterAgent hook in
callAgentWithPersistence; recoverOnBoot extended to detect dirty trees
- .gitignore excludes agent-state/ (high-write) + history/ (git is history)
+ stream.log + runs stdout (too large)
- New SSE events: git.committed · git.tagged · recovery_dirty_tree
- Defer git push-to-remote to v2 (no network deps in v1)
Pages changed:
- arch-git-versioning.html (NEW, comprehensive design, 16 sections)
- sdd-control.html (+C-18 GitVault spec)
- sdd-process.html (+P-10 commitAfterAgent + recoverOnBoot dirty-check)
- data-layout.html (.git/ + .gitignore in project tree)
- plan-migration.html (P0 +3 days for GitVault, total 10 weeks)
- assets/shell.js (sidebar adds arch-git-versioning)
- assets/search-index.json (rebuilt, 189.5KB, 50 pages)
- build-manifest.json (52 → 54 defs, 100% extraction)
Key benefit: Coder 3-retry chain can be `git diff`-ed; L2 fail allows clean
revert; project export becomes `git archive HEAD` (tracked files only,
not the ~30MB project dir).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>