Skill: /horizon_aios_documentation_index_update
Model preference: #lowcost (per horizon_aios_model_prefs.md; overridable by a prompt directive).
Maintain the documentation index at $HORIZON_DOCS/index.md so that every
document is registered and can be referenced by a stable index entry. This is the
tool that satisfies CC-G4 in
$HORIZON_DOCS/development_tools/consistency_checks.md.
When to invoke
- "index the docs", "update/rebuild the documentation index", "register this doc".
- After any doc is added, moved, renamed, or removed.
- When a consistency pass reports CC-G4 (indexed & referenceable) as FAIL/PARTIAL.
Run this as a subagent (do this first)
This skill reads every document in the repo, so running it inline bloats the
invoking session's context. When invoked, delegate the work to a general-purpose
subagent instead of doing it in the main session (this follows the agent
delegation model in agents.md — the main session orchestrates, subagents do the
file-heavy work). Only run inline if subagents are unavailable.
How to delegate:
- Spawn one general-purpose subagent (the harness's Agent/Task tool,
subagent_type: general-purpose). Subagents start cold — give it enough scope
and context to be self-sufficient.
- Tell it to follow this SKILL.md, pass it the Scope and Index format
below, and instruct: "report the index path, entry count by area, and any
docs flagged as missing a title/purpose; do not commit."
- The subagent runs the Execution loop and returns a summary; the main session
relays it.
For a very large doc tree you may fan out one subagent per area and have the main
session merge their entries into a single index.md.
Scope (what gets indexed)
- Every
*.md under $HORIZON_DOCS/ (horizon_system/documentation/), recursively.
- The authority + invariant docs that govern the project:
documentation/philosophy.md, documentation/dev_values.md,
documentation/build_decisions/architecture_decisions.md, and the invariant
docs under horizon_system/ai_os_etc/ (security_invariants.md,
file_structure_invariants.md, ai_os_personalizations.md,
horizon_aios_agents.md — the OS-layer agent config loaded into every session).
- Exclude: the index file itself, skills' own
index.md files, and any
non-documentation file.
Index format
$HORIZON_DOCS/index.md is a Markdown catalog grouped by area (top-level
directory), entries sorted by path. The index entry / reference ID is the
repo-relative path — stable, unique, and needs no renumbering when docs are
added or removed.
# Horizon AIOS — Documentation Index
Reference a document by its path (the ID column). Regenerate with
`/horizon_aios_documentation_index_update`.
## <area> (e.g. getting_started)
| ID (path) | Title | Purpose |
|---|---|---|
| `documentation/getting_started/ReadMeToSetupYourSystem.md` | Setup guide | One-line purpose |
Execution
- Glob all in-scope docs.
- For each doc, derive its Title (first
# heading) and a one-line
Purpose. If the doc already has an index entry with a curated purpose,
preserve it; only fill in purposes for new docs (from the doc's intro).
- Read the existing
index.md if present.
- Rebuild the index: one row per in-scope doc, grouped by area, sorted by
path. Add rows for new docs, remove rows whose files no longer exist.
- Write
index.md. Keep purposes short — the index is referenced often, so it
is itself subject to token economy (CC-G5).
- Report added / removed / changed entries and the new total.
Notes for the executing agent
- Deterministic & idempotent: re-running with no doc changes must produce no
diff.
- If a doc has no clear title or purpose, flag it (it may itself be a CC-G1/
CC-G3 finding) rather than inventing a description.
- Do not index outside the defined scope; do not invent IDs other than the path.
- Commit only if the user asks (DCO sign-off per repo rules); a new/removed doc
and its index entry should land in the same commit.
1---2name: horizon-aios-documentation-index-update3description: Create or rebuild the Horizon AIOS documentation index so every document is registered and referenceable by a stable index entry. Use when asked to index the docs, update/rebuild the documentation index, or after adding/moving/removing documentation (supports CC-G4 in the consistency-check standard).4---56# Skill: /horizon_aios_documentation_index_update78**Model preference:** `#lowcost` (per `horizon_aios_model_prefs.md`; overridable by a prompt directive).910Maintain the documentation index at `$HORIZON_DOCS/index.md` so that every11document is registered and can be referenced by a stable index entry. This is the12tool that satisfies **CC-G4** in13`$HORIZON_DOCS/development_tools/consistency_checks.md`.1415---1617## When to invoke1819- "index the docs", "update/rebuild the documentation index", "register this doc".20- After any doc is added, moved, renamed, or removed.21- When a consistency pass reports CC-G4 (indexed & referenceable) as FAIL/PARTIAL.2223## Run this as a subagent (do this first)2425This skill reads every document in the repo, so running it inline bloats the26invoking session's context. **When invoked, delegate the work to a general-purpose27subagent** instead of doing it in the main session (this follows the agent28delegation model in `agents.md` — the main session orchestrates, subagents do the29file-heavy work). Only run inline if subagents are unavailable.3031How to delegate:321. Spawn one general-purpose subagent (the harness's Agent/Task tool,33 `subagent_type: general-purpose`). Subagents start cold — give it enough scope34 and context to be self-sufficient.352. Tell it to follow this SKILL.md, pass it the **Scope** and **Index format**36 below, and instruct: "report the index path, entry count by area, and any37 docs flagged as missing a title/purpose; **do not commit**."383. The subagent runs the Execution loop and returns a summary; the main session39 relays it.4041For a very large doc tree you may fan out one subagent per area and have the main42session merge their entries into a single `index.md`.4344## Scope (what gets indexed)4546- Every `*.md` under `$HORIZON_DOCS/` (`horizon_system/documentation/`), recursively.47- The authority + invariant docs that govern the project:48 `documentation/philosophy.md`, `documentation/dev_values.md`,49 `documentation/build_decisions/architecture_decisions.md`, and the invariant50 docs under `horizon_system/ai_os_etc/` (`security_invariants.md`,51 `file_structure_invariants.md`, `ai_os_personalizations.md`,52 `horizon_aios_agents.md` — the OS-layer agent config loaded into every session).53- **Exclude:** the index file itself, skills' own `index.md` files, and any54 non-documentation file.5556## Index format5758`$HORIZON_DOCS/index.md` is a Markdown catalog grouped by area (top-level59directory), entries sorted by path. The **index entry / reference ID is the60repo-relative path** — stable, unique, and needs no renumbering when docs are61added or removed.6263```markdown64# Horizon AIOS — Documentation Index6566Reference a document by its path (the ID column). Regenerate with67`/horizon_aios_documentation_index_update`.6869## <area> (e.g. getting_started)70| ID (path) | Title | Purpose |71|---|---|---|72| `documentation/getting_started/ReadMeToSetupYourSystem.md` | Setup guide | One-line purpose |73```7475## Execution76771. **Glob** all in-scope docs.782. For each doc, derive its **Title** (first `#` heading) and a one-line79 **Purpose**. If the doc already has an index entry with a curated purpose,80 **preserve it**; only fill in purposes for new docs (from the doc's intro).813. Read the existing `index.md` if present.824. **Rebuild** the index: one row per in-scope doc, grouped by area, sorted by83 path. **Add** rows for new docs, **remove** rows whose files no longer exist.845. Write `index.md`. Keep purposes short — the index is referenced often, so it85 is itself subject to token economy (CC-G5).866. **Report** added / removed / changed entries and the new total.8788## Notes for the executing agent8990- **Deterministic & idempotent:** re-running with no doc changes must produce no91 diff.92- If a doc has no clear title or purpose, **flag it** (it may itself be a CC-G1/93 CC-G3 finding) rather than inventing a description.94- Do not index outside the defined scope; do not invent IDs other than the path.95- Commit only if the user asks (DCO sign-off per repo rules); a new/removed doc96 and its index entry should land in the same commit.