| name | docs-sync |
| description | Align docs/ with the real implementation — remove stale claims, add missing details, correct wrong file names, and update contracts. |
docs-sync skill
Use this skill when implementation has moved ahead of docs, when docs reference stale filenames/APIs, or when you need to harden the docs before a new feature phase.
Doc-to-code mapping
This table tells you which code to inspect for each doc. Always inspect both sides before editing a doc.
| Doc | Inspect these code files |
|---|
docs/ARCHITECTURE.md | src/engine/index.ts, src/app/store/workspace.store.ts, src-tauri/src/lib.rs, src/features/ directory structure, src-tauri/src/ directory structure |
docs/ENGINE_SPEC.md | src/engine/index.ts, src/engine/types.ts, src/engine/evaluator/evaluator.ts, src/engine/context/evaluation-context.ts, src/engine/language/builtin-functions.ts |
docs/DATABASE_SCHEMA.md | src-tauri/src/db/, src-tauri/src/services/document_repository.rs, src-tauri/src/services/settings_repository.rs |
docs/AI_SPEC.md | src/features/ai/ai.types.ts, src/features/ai/ai.native.ts, src-tauri/src/commands/ai.rs, src-tauri/src/services/ai_service.rs, src-tauri/src/services/openrouter_provider.rs |
docs/API_CONTRACTS.md | src-tauri/src/lib.rs (tauri::generate_handler!), all src/features/*/*.native.ts files, all src-tauri/src/commands/*.rs files |
docs/IMPLEMENTATION_ROADMAP.md | src/features/ directory — which features exist vs. what roadmap claims |
docs/STATUS_GAP_ANALYSIS.md | Any file the gap references — verify gap is still real by reading the actual file |
docs/SYNTAX_REFERENCE.md | src/engine/language/lexicon.ts, src/engine/language/builtin-functions.ts, src/engine/types.ts |
Common drift patterns in this repo
- Stale filenames:
docs/ARCHITECTURE.md uses old file names (document-scanner.ts, eval-context.ts, evaluator.operators.ts) that were renamed. Always verify against the real file tree.
- Missing commands: A new Tauri command was added to
lib.rs and commands/*.rs but not listed in docs/API_CONTRACTS.md.
- Roadmap not updated: A feature was implemented but
docs/IMPLEMENTATION_ROADMAP.md still shows it as pending.
- Gap analysis stale:
docs/STATUS_GAP_ANALYSIS.md lists a gap that was already fixed in code.
- Schema not updated: A new SQLite table was added in
db/ but docs/DATABASE_SCHEMA.md doesn't reflect it.
Required workflow
- For each doc being synced: read the doc, then inspect the corresponding code files from the table above.
- Note every specific claim in the doc that cannot be verified in code (stale), or code behavior not mentioned in the doc (missing).
- Edit the doc to match reality — remove stale, add missing.
- Do not invent implementation details — only document what actually exists in code.
- Keep docs practical and engineering-focused — not marketing.
Constraints
- Do not make code changes as part of docs-sync unless a tiny clarifying comment is unavoidable.
- Do not add tests.
- Do not speculate about intent — only document observable code behavior.
Output
Always summarize:
- which docs were updated
- specific corrections made (old claim → new reality)
- remaining gaps that require code changes before they can be documented