Skip to content

Split large skill script tables out of INDEX.md into a lazy INDEX-scripts.md - #1955

Merged
remigiusz-antczak merged 1 commit into
mainfrom
feat/idxtrim-land9
Oct 23, 2026
Merged

remigiusz-antczak merged 1 commit into
mainfrom
feat/idxtrim-land9

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Summary

A run reads agentic-delivery/INDEX.md when SKILL.md routing has no match. 78 script rows took up 12.6 KB of the file's 16,962 bytes.

skill_index.py now handles skills with more than 12 scripts differently. It moves their script table into a lazy INDEX-scripts.md and leaves the references table plus a pointer in INDEX.md.

  • agentic-delivery/INDEX.md shrinks to 4,533 bytes, a 73% cut for reference lookups.
  • deep-code-review, which has 24 scripts, splits the same way: its INDEX.md goes from 22,660 to 18,650 bytes on current main, with 4,415 bytes in the lazy scripts file.
  • Smaller skills are unchanged.

Measurement (offline byte counts)

Lookup Bytes Change
Reference 16,962 → 4,533 −73%
Script (INDEX.md + INDEX-scripts.md) 16,962 → 17,367 +405 bytes, +2.4%

The pointer says to open INDEX-scripts.md only when a script is needed.

Safety

  • --check now flags an orphan INDEX-scripts.md.
  • land-release.sh, test-conflict-free-prs.sh and the CI comment treat INDEX-scripts.md as a derived file.
  • --regen keeps size rows for both split skills.

Review

  • The first independent review found two 🟡 items:
    • the GENERATED regex missed INDEX-scripts.md;
    • the pointer overstated the saving for script lookups.
  • Both are fixed. The re-review is pinned to d33a09377efe5b111ded98ffde5f502ff3abfaf4.

This branch is that commit cherry-picked onto main 061e61883aff2be6411223ff95a197a191a8cce5. The only conflict was in size-budgets.tsv. I kept main's new rows, took the trimmed .claude/skills/INDEX.md budget (12,344), and set the deep-code-review/INDEX.md row to 18,650 to match the regenerated file, which now includes the method-split references from #1954.

Tests

  • 190/190 and test-land-release passed on the lane commit. On the landed tree, test_skill_index_split and test_method_split pass.
  • Gates pass locally on the landed tree: size, size-ratchet, rules, mustload, check_section_pointers, skill_index --check (14 INDEX files) and bench_check --changed.
  • CI on the exact SHA is the blocking gate.

🤖 Generated with Claude Code

…ipts.md

agentic-delivery/INDEX.md is what a run reads when SKILL.md routing has no
match; 78 script rows were 12.6 KB of its 16,962 bytes. skill_index.py now
moves the script table of a skill with more than 12 scripts into
INDEX-scripts.md and leaves the references table plus a pointer in
INDEX.md (4,533 bytes). deep-code-review (24 scripts) splits the same way;
smaller skills are unchanged.

The saving applies to reference lookups only. A script lookup reads
INDEX.md plus INDEX-scripts.md, 17,367 bytes against the old 16,962
(+405, 2.4%). The pointer tells the reader to open INDEX-scripts.md when
a script is needed; the entry index keeps only one-line purpose and args.

--check now flags an orphan INDEX-scripts.md. land-release.sh,
test-conflict-free-prs.sh and the CI comment treat INDEX-scripts.md as a
derived file, and --regen keeps size rows for both split skills' index
files. The entry index text is trimmed to stay under its frozen budget
(12,352 to 12,344).

Tests: 190/190

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@remigiusz-antczak
remigiusz-antczak merged commit 3141932 into main Oct 23, 2026
1 check passed
@remigiusz-antczak
remigiusz-antczak deleted the feat/idxtrim-land9 branch October 23, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant