
Sync Specs
Use when code changes may have made documentation outdated, when reviewing docs for...
Install
npx skills add nexu-io/nexu --skill sync-specs -g -a claude-code -y- Repository
- nexu-io/nexu3.3k
- Category
- Writing
- Updated
- 6mo ago
- License
- MIT
- Context cost
- Lightabout 1,114 tokens
- Runs scripts
- Yes, review before use
What it does
Use when code changes may have made documentation outdated, when reviewing docs for consistency, or when the user asks to sync or audit documentation.
Documentation Sync
Review code changes and update project documentation for consistency.
Mode
| Mode | How to activate | Behavior |
|---|---|---|
delta (default) | No argument, or say "delta" | Diff against merge-base with origin/main + working tree changes |
full | Say "full audit" or "full sync" | Complete audit of all docs against current codebase |
| Scope keyword | Say the keyword (e.g. "db", "api") | Targeted check (see Scope Filters below) |
Delta Mode Baseline
Identify changed files using merge-base (not a fixed commit count):
# Branch changes since diverging from main
git diff --name-only $(git merge-base HEAD origin/main)...HEAD
# Plus staged + unstaged
git diff --name-only --cached
git diff --name-only
Combine the results into a single list of changed files. Then use the Impact Mapping to identify which docs may need updates.
Impact Mapping
Map changed areas to the docs they affect:
| Changed area | Affected docs |
|---|---|
apps/controller/src/routes/ | specs/references/api-patterns.md, ARCHITECTURE.md, specs/product-specs/*.md (if route is user-facing) |
apps/web/src/pages/ or apps/web/src/app.tsx | specs/FRONTEND.md |
apps/landing/ | ARCHITECTURE.md (Monorepo layout) |
apps/controller/src/runtime/ | ARCHITECTURE.md, specs/RELIABILITY.md |
packages/shared/src/schemas/ | ARCHITECTURE.md (Type safety) |
package.json scripts | CLAUDE.md + AGENTS.md Commands sections |
| New apps/packages dirs | ARCHITECTURE.md (Monorepo layout) |
| Config generator | specs/references/openclaw-config-schema.md, specs/openclaw-config-reference.md |
| Auth changes | specs/SECURITY.md |
| New/moved doc files | CLAUDE.md Doc Map, AGENTS.md Where to look, relevant index files |
Cross-Reference Pairs
Always verify consistency between these paired docs:
