Repository navigation
fix(skf-audit-skill): give an empty QMD collection setup's route, and route a stale one - #1278
Merged
Merged
Conversation
… route one QMD no longer holds On Deep tier, the audit's semantic diff called a registered extraction collection with no files one that had never been indexed, and logged "Run `qmd update` to (re-)index" a folder placeholder nothing bound. qmd 2.8.3 indexes a folder as soon as it is added, so such a collection's folder is almost always gone or holds no file its pattern matches: `qmd update` cannot refill it, re-indexes every collection on the machine, and was followed by no `qmd embed`. A registered collection that `qmd ls` reports as `Collection not found`, as it is once the user removes it the way setup advises, matched no case at all. The empty-collection log now gives setup's FORGE STATUS route: `qmd collection show <name>` for the folder; `qmd collection remove <name>` when that folder is gone or holds no matching file, after which the next Deep-tier setup drops the registry entry and a Create Skill run of the skill registers a fresh collection; and, only for a folder that does hold matching files, `qmd update` with its machine-wide caveat, then `qmd embed -c <name>`. A collection QMD no longer holds is logged as a stale registry entry with the same Create Skill route, is labeled `registered but not in QMD`, and takes the direct-content fallback, as an empty one does. The find step now binds the collection name the cases use, and the report's confidence legend names the new reason. The audit test pins both routes, bans the old wording, and checks that the audit's log and setup's banner share the same `qmd update` caveat, so the two copies cannot drift apart unnoticed. Fixes #1271 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1271.
Release target: patch. The only fragment is a new
fixedone: the audit's advice now matches what qmd does.What was broken
On Deep tier, Audit Skill's semantic diff (
semantic-diff.md§2 item 1) probes the skill's registered extraction collection withqmd ls. When QMD listed no file for it, the step said the collection "has never been indexed" and logged "Runqmd updateto (re-)index{collection.path}, then re-audit". The direct-content fallback it then took was right. The diagnosis and the advice were not:qmd collection addindexes the folder at once, and Create Skill registers the collection only after that add succeeds. So an empty extraction collection almost always means its folder is gone (for one, a Drop Skill purge of the version Create Skill last compiled deletes it, and the nextqmd updateempties the collection) or holds no file its pattern matches.qmd updatecannot refill it, so the same line came back on every audit, and nothing saidqmd collection remove.qmd updatetakes no collection name: it re-indexes every collection on the machine and empties any whose folder is gone. The log asked for noqmd embedafter it either.{collection.path}was bound nowhere: a registry entry holds no path.qmd lsprintsCollection not found: <name>and exits 1. No case named that outcome.What changed
The empty case. The probe names the line
qmd lsprints for it (No files found in collection: <name>), orFiles: 0inqmd statuswhatever its(updated ...)text, and says the folder is most often gone or holds no matching file. The log now gives setup's route, with the name filled in:qmd collection show <name>gives the folder.qmd collection remove <name>. The next Deep-tier setup drops the registry entry, and a Create Skill run of the skill then registers a fresh collection. That last clause is the audit's own: without it the user is never told how Deep-tier semantic coverage comes back.qmd update(with setup's machine-wide caveat), thenqmd embed -c <name>, and re-audit.The label stays
<name> (registered but empty), and the step still takes the direct-content fallback.A collection QMD no longer holds. A new sub-bullet of the empty case, since the same probe finds it. On
Collection not found, the step logs that the registry entry is stale, that the next Deep-tier setup cleans it, and that a Create Skill run registers a fresh collection. The Semantic Drift header labels it<name> (registered but not in QMD), and the step takes the same direct-content fallback, which later audits keep until Create Skill registers a fresh collection.Smaller fixes. The find step now binds
{collection_name}from the entry'sname: the cases used it, but nothing bound it. "never indexed" and{collection.path}are gone. The fallback's "used when" list and theT1-low-fallbackline of the report's confidence legend (report.md) name the new reason.The audit still only advises: it runs no
qmd collection remove,qmd updateorqmd embed. Setup,qmd-registry.md, Create Skill and Drop Skill are unchanged.Fragments
audit-semantic-diff-empty-collection-advice.yaml(fixed, skf-audit-skill): the empty-collection route, the stale-entry route and its label, and the confidence legend. The link commit adds this pull request's number to itsprsonce it opens.Tests
test_a_missing_registry_takes_the_direct_content_fallbackintest-skf-audit-drift-json.pynow pins:{collection_name}binding in the find step;qmd collection show,qmd collection remove, the Create Skill clause, theqmd updatecaveat andqmd embed -c;Collection not foundsub-bullet: its log, its label and fallback as one phrase, and the sentence on later audits;semantic-diff.mdholds exactly oneqmd update, after "When the folder does hold such files", and no "never been indexed", "never indexed",{collection.path}or(updated never).qmd updatecaveat phrase must appear in bothsemantic-diff.mdand setup's banner emitter (skf-emit-result-envelope.py). If a later change rewrites the banner's caveat, this fails, and the audit's log is brought back in step.{collection.path}and(updated never), which the test now bans, and none of the pinned route phrases.The pre-commit hook ran the full
npm testfor each commit.Review
Three review layers (blind, edge-case, verification-gap) read the first draft. The verification-gap layer found no gaps; the other two raised 23 findings:
T1-low-fallbacklegend named only an unregistered or empty collection, while the new route also reportsT1-low-fallback.qmd-registry.mdstill describes only found and not found, so it misses the empty route (older than this change) and the new one. This change leaves that file alone; a docs-only follow-up adds both.qmd lsfailures, and an emptynamein a hand-edited registry: no route before this change either, unlikely, and each fix adds a branch.statustool shows an empty and a missing collection alike, and Deep tier requires the qmd CLI.🤖 Generated with Claude Code