doc-enforce-shapelisted
Install: claude install-skill nikolanovoselec/codeflare
# Documentation Enforcement — Structural shape
This skill enforces the rules that police HOW canonical lane files are rendered: per-section field presence, file-wide shape uniformity, and the strict per-endpoint binding template for `api-reference*.md` files. Invoked by `doc-enforce` (the spine) when an api-reference file or canonical lane file is in the diff.
## Inputs
- `diff`: git diff against base
- `scope`: `all` | `diff`
- `mode`: `interactive` | `auto` | `unleashed`
- `files`: list of canonical lane files in diff (when scope=diff)
- `layout`: `nested` | `flat` (auto-detected by parent `doc-enforce` via `test -d documentation/lanes`)
**Layout-awareness.** Canonical lane file resolution is layout-aware:
- Nested: `documentation/lanes/{architecture,api-reference*,configuration,deployment,security,observability,troubleshooting}.md`
- Flat: `documentation/{architecture,api-reference*,configuration,deployment,security,observability,troubleshooting}.md`
- ADR ledger: `documentation/decisions/README.md` in both layouts.
Per-lane format templates and the binding endpoint template apply identically across layouts; only the file globs change.
## Output
Returns findings array + auto-fix actions. Writes evidence-count rows back to the spine's manifest:
- `Pass 5 — Format-template field presence`: `ran (S sections, M findings)`
- `Pass 6 — File-level shape consistency`: `ran (K files, M findings)`
- `Pass 7 — Canonical per-endpoint rendering`: `ran (E endpoints, M findings)`