/specweave:sync-docs Command
The /specweave:sync-docs command provides phase-based synchronization between strategic living documentation and implementation.
Note: This is NOT bidirectional sync. It's two separate one-way operations at different phases:
- Review mode = Pull context (docs → you)
- Update mode = Push learnings (you → docs)
What It Does
Key actions:
- Review mode: Pull strategic docs before implementation (pre-work context)
- Update mode: Push learnings after implementation (export findings)
- Sync ADRs (Proposed -> Accepted)
- Update architecture diagrams
- Sync API documentation
- Update feature lists
Usage
# Before implementation (review strategic docs)
/specweave:sync-docs review
# After implementation (update with learnings)
/specweave:sync-docs update
Review Mode
Before starting work, review strategic documentation:
$ /specweave:sync-docs review
📚 Strategic Documentation Review
📋 ADRs to Review:
- ADR-0032: Authentication Strategy (Proposed)
- ADR-0035: Database Selection (Accepted)
🏗️ Architecture:
- Component diagram up to date
- Data flow needs review
📖 API Contracts:
- /api/v1/auth documented
- /api/v1/users needs update
💡 Review these before implementing increment 0007
Update Mode
After completing work, sync learnings:
$ /specweave:sync-docs update
📤 Syncing to Living Documentation...
✅ ADRs Updated:
- ADR-0032: Proposed → Accepted
- ADR-0036: Created (JWT rotation decision)
✅ Architecture Updated:
- Added AuthService component
- Updated sequence diagrams
✅ API Docs Updated:
- /api/v1/auth/login documented
- /api/v1/auth/refresh documented
✅ Features Updated:
- User Authentication: Complete
What Gets Synced
| Category | Review Mode | Update Mode |
|---|---|---|
| ADRs | Pull proposed | Push accepted |
| Architecture | Review planned | Update actual |
| API Docs | Review contracts | Update endpoints |
| Features | Review planned | Mark complete |
Related
- Living Docs - Documentation system
- External Tool Sync - Split-source sync pattern (content vs status)
- ADR - Architecture decisions
- Intelligent Living Docs Sync - Sync feature
- /specweave:done - Close increment