## What
`cli-skills-map.md` was pervasively built on the pre-3.0 runtime hook
surface — title "CLI ↔ Skills/**Hooks** Wiring Map", a "Hook Callers"
column on every CLI row, a "## Hooks → Commands" section, a
hook-chaining "Session Lifecycle Flow", the `hooks.json` source note,
and a `hooks/finding-compiler.sh` reference. AgentOps 3.0 ships zero
hooks, so all of that documented a removed runtime. Decomposed from
ag-xa2b (the phantom-skill fix shipped in #705).
## Changes
- Retitled → "CLI ↔ Skills Wiring Map"; dropped hooks framing (header,
`hooks.json` note, "12 runtime hook event sections").
- Removed the "Hook Callers" column; the two rows with **only** hook
callers (`ao memory`, `ao extract`) moved to Orphan Commands (still
valid direct commands).
- Replaced "## Hooks → Commands" + hook-chaining lifecycle with a
"Session Lifecycle Flow (hookless)" section (the Codex ensure-start/stop
model).
- `validate-cli-skills-map.sh`: removed the now-impossible
SessionStart-hook-table assertion (the required section no longer
exists). Count-line + phantom-subcommand checks unchanged.
## Verification
- `scripts/validate-cli-skills-map.sh` → **PASS** (76 generated CLI
command headings)
- `tests/docs/validate-doc-release.sh` → **PASS**
- No residual `hooks/` / `hooks.json` / "Hook Callers" refs in the doc
Closes-scenario: ag-xhhf#dehooks
Bounded-context: BC2-Validation
Evidence: docs/cli-skills-map.md
Cycle 1 of this run had to manually bump the declared count in
docs/cli-skills-map.md from 59 → 60 after regenerating COMMANDS.md.
That manual-bump churn is exactly the failure mode L62[9]
(measurement-command audit pre-push gate) was meant to prevent — the
gate fires correctly on drift, but the maintainer still has to remember
the delta.
Two surfaces:
- scripts/validate-cli-skills-map.sh now accepts --fix. When the
declared count differs from the generated count, --fix rewrites the
count line in-place and re-validates. No-op when counts already
match. Default invocation behavior is unchanged.
- scripts/generate-cli-reference.sh calls --fix after regenerating
COMMANDS.md, so a fresh regen can never leave the count gate red.
--check mode is unchanged (only the actual regen path runs --fix).
Verified:
- bash scripts/validate-cli-skills-map.sh: PASS (60 headings)
- End-to-end: temp-edit cli-skills-map.md to "77 generated", run
scripts/generate-cli-reference.sh, observe the count rewritten to
"60 generated" automatically.
- No production code (.go, hooks/, lib/) touched.
https://claude.ai/code/session_01TELU75xMCP6D2WUFUmLQ8G