This is a shared context file used by both the Retrospective and SyncDocs workflows. It defines the thorough documentation audit and update procedure.
After this procedure completes, a developer or AI agent can understand the entire project from /docs alone. Documentation must describe current reality, not aspirational state.
- Scan the codebase — Use Glob and Grep to identify current structure, entry points, key modules, and patterns
- Inventory existing docs — List all files in
/docs(or project doc location) with their apparent purpose - Cross-reference — Compare documented state vs. actual implementation
For each documentation file, assess:
| Status | Action |
|---|---|
| Accurate | Keep as-is |
| Partially outdated | Update with current reality |
| Completely obsolete | Archive to /docs/archive/ or delete |
| Missing coverage | Create new documentation |
| Contradictory | Resolve conflicts, update to single truth |
Apply changes following this priority order:
- Architecture & Overview — Project purpose, high-level structure, key decisions
- Setup & Development — Environment, dependencies, build, test, deploy
- API & Integration — Endpoints, interfaces, external dependencies
- Patterns & Conventions — Code style, naming, common patterns in this codebase
- Troubleshooting — Known issues, debugging tips, gotchas
- Archive obsolete docs to
/docs/archive/with a note explaining why - Delete files that are fully superseded and have no historical value
- Consolidate fragmented docs covering the same topic
- Ensure no dead links or references to non-existent files
- Prefer updating over creating new files
- Keep documentation concise — link to code rather than duplicating it
- Use relative paths for internal references
- Archive rather than delete when historical context has value
- If no
/docsdirectory exists and there's nothing meaningful to document, report "no documentation changes needed" and move on
Return a summary for inclusion in the parent workflow's report:
### Documentation Changes
| File | Action | Reason |
|------|--------|--------|
| /docs/X.md | Updated | [Brief reason] |
| /docs/Y.md | Archived | [Brief reason] |
| /docs/Z.md | Created | [Brief reason] |
### Documentation Health
- **Before:** [X files, Y% accurate]
- **After:** [X files, comprehensive coverage]