with one click
documentation-sync
// Use after builder-workflow checkup passes for a plan phase and before git-pr-workflow, to sync docs/AGENTS/README/skills with code per the plan Documentation before PR list. Not during builder implement.
// Use after builder-workflow checkup passes for a plan phase and before git-pr-workflow, to sync docs/AGENTS/README/skills with code per the plan Documentation before PR list. Not during builder implement.
| name | documentation-sync |
| description | Use after builder-workflow checkup passes for a plan phase and before git-pr-workflow, to sync docs/AGENTS/README/skills with code per the plan Documentation before PR list. Not during builder implement. |
README.md, AGENTS.md, docs/**, or .cursor/rules/*.mdc.Run after builder-workflow completes a plan phase (checkup PASS). Run before git-pr-workflow.
Full order: initiative-workflow.
| Do | Do not |
|---|---|
| Sync docs once code/config for the phase is stable | Edit docs during builder scout/implement/checkup |
| Use the plan’s Documentation before PR path list | Drive-by doc edits outside that list |
Re-run targeted rg for stale paths/commands | Replace the plan’s verify gate |
Prerequisite message from user: “Phase N build complete. documentation-sync per plan doc list.”
| Topic | Owner | documentation-sync may… |
|---|---|---|
| Plan → build → docs → PR | initiative-workflow | Link one line only |
| Subagents, model tiers | builder-workflow/orchestration.md | Not edit unless on plan doc list |
| Commit / branch / PR | git-pr-workflow | Not describe steps |
TS strict / noExplicitAny | tools/typescript/base.json, biome.json | Reference paths in rules/AGENTS if renamed |
| Command tables | docs/CHEATSHEET.md | Sync when root package.json scripts change |
| Quick setup | README.md | Single bootstrap section; link CHEATSHEET for commands |
| Compose / layout / troubleshooting | AGENTS.md | Workspaces table, ports column, nested guides |
| This phase’s doc files | Plan Documentation before PR | Edit only listed paths |
Do not edit .cursor/skills/ or .cursor/rules/ unless the plan’s doc list explicitly includes them.
.cursor/rules/ — Code standards (compact); not workflowsAGENTS.md — Map: layout, pointers, nested AGENTS.md linksREADME.md — Human overview; keep aligned with architecture changesdocs/ — Human guides (CHEATSHEET, SCRIPTING, etc.); setup in README, map in AGENTSREADME.md ──────┐
├─→ Complementary pair (different audiences, same project)
AGENTS.md ──────┘
│
├─→ References → .cursor/rules/ (for standards)
│
└─→ Points to → docs/ (for detailed guides)
.cursor/rules/ ──→ AI uses → AGENTS.md (for project context)
docs/ ──→ Human reads → README.md (for overview)
README.md and AGENTS.md are complementary and should be kept in sync:
# Code-first, compact, scannable
- Focus on patterns, not explanations
- Show ✅ good vs ❌ bad code examples
- Keep under 300 lines per rule
- Use globs/alwaysApply metadata correctly
- Reference files with @filename when needed
- Remove explanations, trust linter
# Map, not encyclopedia
- Package/app structure and nested AGENTS.md links
- Pointer to .cursor/rules/, README (quick setup), AGENTS (map), CHEATSHEET (commands)
- Cursor skills index (one line each) — not skill bodies
- Do not paste TypeScript/testing/security prose (rules + biome/tsconfig own that)
# Project description and architecture
- What the project is and why it exists
- Architectural ideas and design decisions
- Development mindset and philosophy
- Quick start tips (detailed usage in AGENTS.md)
- Visual badges and emojis for scannability
- High-level overview, not implementation details
- Keep in sync with AGENTS.md for same project context
# Brief, summarized developer guides (NOT exhaustive)
- Friendly, enjoyable to read
- Examples that actually work
- Table of contents with anchor links
- Troubleshooting guides (concise)
- Technical summaries (not deep-dives)
- Workflow overviews (brief)
- Keep it summarized - developers want quick answers, not novels
Keep documentation in sync with package.json and tsconfig.json:
package.json scripts (root and workspace packages you mention)package.json when documenting installspackage.json when documenting commandstsconfig.json references to describe how packages relatepackage.json when documenting commands or scriptstsconfig.json to understand package relationships.cursor/rules/: Code standards, patterns, workflows changeAGENTS.md: Project structure, commands, scripts, package/app context changeREADME.md: Architecture changes, project description, development philosophy changedocs/: Workflows, processes, setup instructions, technical details changeImportant: When architecture or project structure changes, update both README.md and AGENTS.md.
Run from the repository root. Prefer rg (ripgrep); if it is missing, use grep -RIn "TERM" <dir> over the same paths.
Replace TERM with concrete strings from the change: path segments (apps/express, packages/ui), script names, env vars, service names, CLI flags, feature names.
rg -n "TERM" docs/
rg -n "TERM" --glob "AGENTS.md" .
rg -n "TERM" --glob "README.md" .
rg -n "TERM" .cursor/rules/
git log --oneline -30 -- docs/ README.md AGENTS.md .cursor/rules/
git log --oneline -20 -- docs/ | rg -i "TERM"
Workspace / app / package paths (example: UI package):
rg -n "packages/ui|@packages/ui" docs/ AGENTS.md README.md .cursor/rules/
API app (adjust TERM to your area):
rg -n "apps/express|express\b|3003" docs/ AGENTS.md README.md
Docker / Compose:
rg -n "docker|compose|container|Dockerfile" docs/ AGENTS.md README.md
Scripts and documented commands:
rg -n "bun run|npm run|turbo run" AGENTS.md README.md docs/
CI / GitHub Actions:
rg -n "github|actions|workflow|CI" docs/ AGENTS.md README.md .github/
Technology names (narrow with TERM):
rg -n "TERM" docs/ README.md AGENTS.md
rg -n "CHEATSHEET|SCRIPTING|AUTO_VERSIONING|AGENTS\.md|README\.md" docs/
find docs -name "*.md" -type f 2>/dev/null | sort
find . \( -path "./node_modules" -o -path "./.git" \) -prune -o -name "README.md" -print | sort
find . \( -path "./node_modules" -o -path "./.git" \) -prune -o -name "AGENTS.md" -print | sort
find .cursor/rules -name "*.mdc" -type f | sort
rg -n "TERM" docs/ .cursor/rules/ --glob "*.md" --glob "*.mdc"
rg -n "TERM" --glob "README.md" --glob "AGENTS.md" .
Use multiple passes with different TERMs (symbol, path, old filename) if the first pass is empty.
AGENTS.md / README under apps/ and packages/ when behavior is local).package.json and paths with workspace layout and tsconfig; remove dead links.AGENTS.md.