doc-compactlisted
Install: claude install-skill x0c/doc-skills
# doc-compact
Apply the installed `Project Documentation Management` lifecycle contract. Environment instructions own language, permissions, model selection and shared-document locations.
Before running, discover the files that are actually in effect—do not hardcode paths.
`<DOC_INIT_DIR>` defaults to a sibling of this skill: `<directory of this SKILL.md>/../doc-init`
## Flow
**Step 1 validate global rules → Step 2 read-only audit → Step 3 decide secondary indexes → Step 4 fix structure → Step 5 compress (core, non-skippable) → Step 6 verify**
---
## Step 1 — Global rules (may write)
For an explicitly read-only audit, inspect the installed contract and run Step 2 only. Report proposed changes; do not run the injector, stamp files, or execute repair/compression steps.
**Target files are global AI instruction files only**—never pass a project `AGENTS.md`:
```bash
python3 <DOC_INIT_DIR>/scripts/discover_global_instruction_files.py
```
Exit `0` prints unique real paths (one per line). Exit `3` means none of the candidates exist — report that and ask the user for their global instruction file. Do not hand-roll a bash `readlink` loop (breaks on Windows).
For each printed path, run: `python3 <DOC_INIT_DIR>/scripts/insert_doc_governance.py <global-file-path>`.
The script prints `[skip]` = already current; `[added]` / `[upgrade]` = written—then migrate only explicitly reviewed duplicate clauses. Preserve unrelated non-managed text; no theme-based deletion.
If `<DOC_INIT_DIR