singularity-forge/docs/design-docs
Mikael Hugo eb56173fe5 ADR-021: versioned documents + automatic upgrade via records-keeper
Generalizes the preferences-template-upgrade pattern to all scaffold-managed
documents with three states (pending/editing/completed), HTML-comment markers
on Markdown files, frontmatter on PREFERENCES.md, and a content-hash archive
for migrating legacy projects.

Operation is automatic-first, not command-driven:
- Synchronous on every SF startup (cheap path: missing + upgradable + legacy)
- Asynchronous after milestone completion: scaffold-keeper subagent runs the
  existing records-keeper skill, treating code as the source of truth and
  re-deriving doc content from source when drift is detected
- Surfaces results via the structured-notification model (kind:approval_request)
  only when human review is warranted; silent runs produce no notification
- Manual /sf scaffold sync exists as an escape hatch for dry-run + forced
  refresh, not as the primary interface

Five implementation phases (A-E), each independently shippable. Phase A
unlocks the architectural property; Phase D is what makes records-keeper
autonomous for code-derived docs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 00:18:16 +02:00
..
ADR-TEMPLATE.md feat: harness scaffold, runtime pattern sync, and ARCHITECTURE injection 2026-05-01 22:46:28 +02:00
core-beliefs.md feat: introduce repo-vcs skill and add JSDoc annotations across core modules 2026-05-01 21:36:32 +02:00
index.md ADR-021: versioned documents + automatic upgrade via records-keeper 2026-05-02 00:18:16 +02:00
notification-event-model.md feat: introduce repo-vcs skill and add JSDoc annotations across core modules 2026-05-01 21:36:32 +02:00