doc-auditlisted
Install: claude install-skill Wubabalala/claude-skills
# Doc Garden — Documentation Drift Audit & Normalization
Audit project documentation against codebase reality. Detect drift, report it, optionally fix.
## NEVER
- Never update a doc based on what the code *should* look like — only sync to what it *actually* is now
- Never fix docs for a section you didn't audit — partial fixes create false confidence
- Never auto-fix non-deterministic issues without user confirmation
- Never modify code based on documentation — docs follow code, not the other way
## Modes
```
/doc-audit → Report only, no file changes
/doc-audit fix → Report + auto-fix deterministic issues (ghost refs, path redirects)
/doc-audit normalize → Report + suggest structural fixes, user confirms each
```
## Two-Layer Architecture
### Layer 1: Universal Audit Core (this file)
Always executed. Project-agnostic drift detection.
### Layer 2: Project-Specific Config (`.claude/doc-garden.json`)
Generated on first run. Records doc hierarchy, environment domains, staleness threshold.
### Config Loading Flow
```
On audit trigger:
1. Call has_config(cwd) to check .claude/doc-garden.json
- Exists → load_config(cwd), proceed to audit
- Missing → enter Config Generation Workflow (see below)
2. User says "update config" or "重新生成配置" → re-enter generation workflow
```
`load_config()` `deep_merge`s the user's file on top of `DEFAULT_CONFIG`, so a
stale config missing newer fields (e.g. `doc_patterns`, `path_resolvers`)
inherits sensible