2.4 KiB
2.4 KiB
Update Workflow
Phase 1: Parallel Codebase Scouting
- Scan the codebase and calculate the number of files with LOC in each directory (skip
.claude,.opencode,.git,tests,node_modules,__pycache__,secrets, etc.) - Target directories that actually exist - adapt to project structure
- Activate
ck:scoutskill to explore the code base and return detailed summary reports - Merge scout reports into context summary
Phase 1.5: Parallel Documentation Reading
You (main agent) must spawn readers - subagents cannot spawn subagents.
- Count docs:
ls docs/*.md 2>/dev/null | wc -l - Get LOC:
wc -l docs/*.md 2>/dev/null | sort -rn - Strategy:
- 1-3 files: Skip parallel reading, docs-manager reads directly
- 4-6 files: Spawn 2-3
Exploreagents - 7+ files: Spawn 4-5
Exploreagents (max 5)
- Distribute files by LOC (larger files get dedicated agent)
- Each agent prompt: "Read these docs, extract: purpose, key sections, areas needing update. Files: {list}"
- Merge results into context for docs-manager
Phase 2: Documentation Update (docs-manager Agent)
CRITICAL: You MUST spawn docs-manager agent via Task tool with merged reports and doc readings.
Pass the gathered context to docs-manager agent to update documentation:
README.md: Update README (keep it under 300 lines)docs/project-overview-pdr.md: Update project overview and PDRdocs/codebase-summary.md: Update codebase summarydocs/code-standards.md: Update codebase structure and code standardsdocs/system-architecture.md: Update system architecturedocs/project-roadmap.md: Update project roadmapdocs/deployment-guide.md[optional]: Update deployment guidedocs/design-guidelines.md[optional]: Update design guidelines
Additional requests
<additional_requests> $ARGUMENTS </additional_requests>
Phase 3: Size Check (Post-Update)
After docs-manager completes:
- Run
wc -l docs/*.md 2>/dev/null | sort -rnto check LOC - Use
docs.maxLocfrom session context (default: 800) - For files exceeding limit: report and ask user
Phase 4: Documentation Validation (Post-Update)
Run validation to detect potential hallucinations:
- Run:
node .opencode/scripts/validate-docs.cjs docs/ - Display validation report (warnings only, non-blocking)
- Checks: code references, internal links, config keys
Important
- Use
docs/directory as the source of truth. - Do not start implementing.