Skip to content

Retrieval rows move into the skill that owns them - #536

Open
ion-alpha-dev wants to merge 2 commits into
mainfrom
refactor/retrieval-rows-per-skill
Open

Retrieval rows move into the skill that owns them#536
ion-alpha-dev wants to merge 2 commits into
mainfrom
refactor/retrieval-rows-per-skill

Conversation

@ion-alpha-dev

Copy link
Copy Markdown
Collaborator

What

Each bundled skill now carries its own retrieval.txt, and skillrecall.LoadTable assembles the pack's retrieval table from those files instead of reading one table beside the skill directories. A row must name its own directory's skill in one of its two columns, and every row now carries the file it was written in, so a retrieval failure prints skills/deletion/retrieval.txt:4 rather than a bare line number.

Why

The single table gave every branch that adds a skill the same last line to append to. Four skill branches in flight meant four conflicts on the same tail, each resolved by hand, on text a reviewer does not read and a merge tool cannot order. Adding a skill is now an added file, which nothing else touches.

The split costs something real: the rows for two skills no longer sit next to each other, and reading one skill's claims beside another's is how the "must not be offered" column gets written. The ownership rule pays that back by making a skill's file the whole of what the pack asserts about it, so there is one file to open per skill rather than a region of a shared one to find.

How to verify

go test ./skill/.... TestPackIsRetrievable and TestEveryPackSkillStatesItsTriggers run over the same 68 rows as before, now loaded from ten files; a skill whose rows went missing still fails, because the coverage test refuses a shipped skill no row claims. New tests in skill/skillrecall cover the loader: rows assembled across skills, a skill with no rows yet, a row that wandered into another skill's file, and a malformed row refused by file and line.

Notes for reviewers

The row text is unchanged: the split was mechanical, and the per-file contents are the old blocks in the same order. The three unmerged skill branches (concurrency, performance measurement, untrusted input) each need their rows relocated from the end of the old table into a new file, which is the last conflict any of them has to resolve.

The pack kept one retrieval table beside the skill directories, so every
branch that added a skill appended to the same last line. Two skills
authored in the same week conflicted on text no reviewer reads, and the
resolution was by hand, once per branch.

Each skill now carries its own retrieval.txt and LoadTable assembles the
pack's table from them, so adding a skill is an added file. A row must
name its own directory's skill in one of its columns, which keeps the
file the whole of what the pack claims about that skill, and rows now
carry the file they came from so a failure reads as an address.

Signed-off-by: Ion Alpha <contact@ionalpha.io>
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…names

The pack's messages tell an author to open skills/<slug>/retrieval.txt,
and the rows are found by walking the tree, so nothing until now checked
that the two agree. A file that exists and will not open is also now
distinguished from one that is absent, which is the difference between a
broken checkout and a skill that has not written its rows yet.

Signed-off-by: Ion Alpha <contact@ionalpha.io>
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