Documentation Sync Workflow
Use this workflow to keep repository pages current with minimal manual effort.
Core concept
Each repository has a lifecycle mode tracked in docs/ops/repo-doc-sync-state.yaml:
bootstrap: initial documentation creation or strict upgrade to standard.maintenance: incremental updates driven by commit deltas since last sync.
Agent decision flow
- Read repository entry from
repo-doc-sync-state.yaml. - If the human prompt explicitly requests a mode, use that mode for this run.
- Otherwise use the tracked
doc_mode. - Execute:
bootstrap: create/upgrade docs to checklist compliance.maintenance: difflast_synced_sha..HEAD, then update only impacted sections.
- After successful work, update state fields (
status,last_synced_sha,last_synced_at, anddoc_modeif promoted).
Promotion rule (bootstrap -> maintenance)
Promote only when all are true:
- Required checklist sections are present.
- Sidebar and parent links are correct.
- Content is practical/system-oriented.
npm run buildpasses.
Prompt override patterns
Use explicit prompts when needed:
- "Bootstrap
nxt-xyzto standard." - "Run maintenance update for
nxt-xyzfrom last synced SHA."
Prompt override is temporary for that run; state should still be updated afterward.
Minimal required state fields
repostandard(monorepoorsingle-repo)doc_mode(bootstrapormaintenance)status(missing,baseline, orstandard-compliant)last_synced_sha(nullable in bootstrap)last_synced_at