index-sync — Claude Code rule for keeping indexes in sync
The index-sync rule ties changes in guide/ to updates in machine-readable indexes and link checks. Use it when those indexes feed an MCP server or the site search palette.
CC-BY-SA-4.0 ★ 6,529 updated 2026-10-22
.claude/rules/index-sync.mdWhat index-sync does
When someone adds a page, section, concept, or tool to guide/, the rule calls for corresponding index updates. Add a deep_dive entry with an anchor in machine-readable/reference.yaml, then copy the change manually to mcp-server/content/reference.yaml. A new top-level guide area also affects llms-full.txt; the two coverage lists in llms.txt must remain identical.
Run python3 scripts/check-index-coverage.py --check and python3 scripts/validate-reference-yaml.py --ci to check coverage and references. CI runs both checks. Changes to a deep_dive entry also require pnpm build:search in the landing repository, or the palette keeps its previous entry. The .claude/hooks/index-sync-reminder.sh hook warns at the end of a turn; it does not block edits.
What it helps with
- update indexes after adding a guide page
- point a reference entry to a stable anchor
- check guide coverage and resolve broken references
- get a reminder when guide edits lack index updates
Example prompts for the agent
- I added a page to
guide/; update the indexes required by this rule. - Check reference anchors and guide coverage after my changes.
- I changed a
deep_diveentry; tell me what to rebuild for search.
How to install index-sync
Manually: put the files in place
.claude/rules/index-sync.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/index-sync.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/index-sync.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/index-sync.mdManually: put the files in place
.clinerules/index-sync.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about index-sync
How do I install index-sync in Claude Code?
Place the rule file at .claude/rules/index-sync.md.
What does the index-sync rule do?
It describes which indexes to update when guide/ changes and which checks to run. Its hook gives a reminder without stopping the turn.
Do I need to rebuild search after changing deep_dive?
Yes. Run pnpm build:search in the landing repository so the palette can serve the updated entry.