Skip to content

Rename skill retrieval fields to use_for/not_for and audit them against a recorded confusion matrix - #3630

Merged
malibio merged 1 commit into
mainfrom
issue-3522-skill-use-for-not-for
Oct 5, 2026
Merged

malibio merged 1 commit into
mainfrom
issue-3522-skill-use-for-not-for

Conversation

@malibio

@malibio malibio commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #3522.

What changes

The skill fields are renamed. skill.description becomes skill.use_for and skill.exclusion becomes skill.not_for, with no alias and no fallback read: reset the database. The app labels them "What it's for" and "What it's NOT for", and each schema field's description carries the authoring guidance. The rename reaches the wire type (useFor / notFor), generated TypeScript, the SkillGuidanceEntry proto field, CLI output (use_for in skill guidance --json and in human output), the model-facing candidate summary and the skill references. The in-app prompt's Purpose: label is unchanged. The SKILL.md frontmatter description is unchanged.

Three built-in skills are reworded or gain a not_for, each measured:

Skill Change
Schema Creation not_for: "Add one record of a kind that already exists. Save a view, a filter or a query."
Relationship Management use_for leads with the linking verbs and keeps "record an edge between two nodes"; not_for: "Start keeping track of a kind of thing. Mark it done, resolved or paid."
Organization use_for names folders, filing and moving; not_for: "Start keeping track of a kind of thing. Explain how something works."

A confusion matrix is kept with the live suite (packages/agent/tests/it/skill_confusion_matrix.rs): 129 recorded rows over 114 distinct requests: each request with the skill that owns it, plus the requests a neighbouring skill must not lead. tests/golden/skill_retrieval/baseline.tsv holds the scores before the audit, current.tsv the scores now, and current.sha256 a digest of the text they were measured from, which a gate test holds the seed table to.

The single-list pin test is replaced. only_measured_skills_carry_an_exclusion is gone; every_not_for_names_its_live_guards runs in the gate and requires every seeded skill with a not_for to name live guards that exist.

Measured result

On the locked nomic-embed-text-v1.5 model, against this branch merged with main:

  • Old wording: 27 of 129 rows miss.
  • New wording: 18 of 129 miss.
  • With the old wording, exactly the seven new guards fail and every earlier live guard passes.
  • All 37 live tests (the matrix and 36 guards, three of which arrived with main) pass with no SKIP. The gate does not run them: they are #[ignore]d and need the model on disk.

The 18 remaining misses are listed in NOT_YET_WON as a ratchet: a wording that wins one fails the matrix until the request is taken off the list, and a request that newly misses is a failure.

Measured costs, recorded on the seed rows:

  • Schema Creation's not_for moves "create a record of who made which architecture decision" from first (0.897) to third (0.844).
  • Organization's not_for lowers two of its own requests by 0.048 and 0.024; both keep their place.
  • Relationship Management keeps "record an edge between two nodes" beside the verbs, because a guard that arrived with main routes a request Stage 1 words that way to it (it leads by 0.001 with the phrase; Graph Editing leads without). The phrase narrows the skill's lead on "connect the retro notes to the sprint they belong to" to 0.004 and takes "which tasks depend on the API migration?" from first to third.
  • The second sentence of its not_for gives Graph Editing back the lead on "mark the outage report done" (0.032), which the reworded use_for had taken by 0.002. It lowers three linking requests: "link this invoice…" by 0.006 (still first), "point rebuild task at the decision it has to respect" by 0.024 (second to third, in the window) and "this task depends on the API migration" by 0.020 (not won either way).
  • Two asserted results rest on 0.004 or less: the "record an edge…" lead (0.001) and the "connect the retro notes…" lead (0.004). They fail loudly if a later rewording flips them.

Tried and not kept, because each broke more than it fixed: dropping the tool sentence from Graph Editing, three rewordings of Node Creation, and two other wordings of Schema Creation's not_for.

Beyond the issue text

  • Playbook skills are out of scope now. main removed the installable methodologies while this was in progress, so the acceptance criteria about Playbook seeds and Playbook not_for entries have nothing left to apply to. The Spec-driven not_for entries measured earlier went with them.
  • SkillUpdater is removed. It rewrote Node Creation's retrieval text at runtime with a second, unmeasured wording and was never started outside its own tests.
  • SKILL_TEXT_OVERRIDES names a JSON file of trial use_for / not_for text, so wording can be measured against the whole live suite without a rebuild.

Node type sequence

skill is an existing flat core type. Two fields are renamed (use_for, required text; not_for, optional text). No field, relationship or rule is added.

Docs

The companion nodespace-docs change is committed locally and is pushed just before bun run merge, as the node type sequence requires: the skill sheet in components/node-types.md, architecture/prompt-skill-system.md, ADR-064 rule 3, ADR-093, components/participation.md, development/agent-eval.md and architecture/write-atomicity-inventory.md.

Verification

  • bun run test:changed passes with every tier in scope (frontend, scripts, skill, browser, types:check, node-types:check, Rust workspace).
  • Live suite as above.
  • Not done: the app was not launched to look at the two field labels. The labels come from the schema's friendly_name through the generic schema form, which test_skill_schema_has_fields and the form tests cover.

🤖 Generated with Claude Code

@malibio

malibio commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

Pragmatic Code Review (part 1 of 2: summary and requirements)

Review Type: Initial Review

Reviewed the net change against origin/main at head 07e5cf08 (57 files, +1689 / -1006). No prior reviews or comments on the PR.

What I ran: every_not_for_names_its_live_guards through nextest (passes), bun run node-types:check against the companion docs commit (passes, 28 core types), and a recount of the misses from both recorded .tsv files. I did not run the live retrieval suite, the confusion matrix, types:check, or test:changed; the live numbers below are checked against the recordings, not re-measured.

Code Review Summary

A clean, complete rename plus a well-argued retrieval audit. The rename reaches every layer the node type sequence names (closed schema, promoted fields, wire type, generated TypeScript, proto, CLI, typed write path, tests) with no alias, no fallback read and no migration. No unrelated description (collection, play, schema-field metadata, SKILL.md frontmatter, tool definitions) was renamed by mistake. Every score quoted in the new seed comments agrees with baseline.tsv / current.tsv, and the headline numbers recompute exactly: 27 missing rows before, 18 now, and the 18 are exactly the NOT_YET_WON entries.

Nothing blocks the merge. Three findings are worth fixing here because each is small and each weakens a guarantee the PR’s own comments claim: the ratchet excuses more than it says, the trial-wording hook can mismeasure silently, and one model-facing tool description still names the old key.

Requirements Check

  • ✅ Rename everywhere, nothing reads the old names — schema (core_schemas.rs:1693,1716), promoted fields (convert.rs:382-383), SkillFields / SkillNodeUpdate, generated TS, proto SkillGuidanceEntry.use_for, CLI JSON and human output, find_skills / skills_by_id JSON, SkillCandidate, eval fixture. One prose leftover in a model-facing tool description (finding 3).
  • ➖ Core and Playbook seeds use the new names — core: ✅. Playbook: no longer applicable. Verified on origin/main: packages/core/src/methodology/ is gone (removed in Make spec, plan and decision core types with checklist criteria and seeded rules; remove the installable methodologies #3618) and SKILL_SEEDS is the only skill seeder left.
  • ✅ node-types:check and types:check pass — node-types:check passes against the companion docs commit (I ran it). types:check not run by me; the generated files match the Rust shapes on inspection.
  • ✅ Labels and authoring guidance — "What it’s for" / "What it’s NOT for" with the Decisions-table descriptions; labels pinned in test_skill_schema_has_fields (core_schemas.rs:3213-3221).
  • ✅ Recorded confusion matrix kept with the live suite — skill_confusion_matrix.rs plus baseline.tsv / current.tsv. Playbook half ➖.
  • ✅ not_for where the matrix shows a confusion — Schema Creation (existing-type records; saved views/filters/queries), Relationship Management, Organization. Remaining confusions are listed in NOT_YET_WON rather than hidden.
  • ✅ Each not_for and changed use_for has a live guard — seven new guards, benefit side and cost side for each of the three skills. Not executed by me.
  • ➖ No existing live guard regresses — not verifiable without the model; the PR reports all 34 pass. Taken on the author’s statement.
  • ✅ only_measured_skills_carry_an_exclusion replaced — by every_not_for_names_its_live_guards, which runs in the gate and passes.
  • ✅ Prompt/routing goldens — Purpose: kept, so no prompt golden changes; the snapshot test only renames the struct field. See finding 3 for the one model-facing string that arguably should have changed.
  • ✅ Docs — companion commit 111c18d covers node-types.md, prompt-skill-system.md, ADR-064, participation.md, agent-eval.md, write-atomicity-inventory.md. Note: it sits on a side branch (issue-3522-skill-fields) in a temporary docs checkout, and the local docs main is 23 commits behind its remote, so it still has to land on docs main before the merge is queued.
  • ➖ quality:fix, test:changed, live suite on the locked model — not run by me; reported passing in the PR body.

Scope: removing SkillUpdater — appropriate. On origin/main it is referenced only by its own module, its own test file, pub mod skill_updater and one doc comment in query.rs; nothing constructs or starts it. It also carried a second, unmeasured wording for Node Creation, which contradicts the rule this PR enforces. Deleting unused code is what the project rules ask for, and the removal is complete (SkillNodeUpdate::description, its test, the query.rs comment).

Recommendation: APPROVE (findings follow in part 2)

@malibio

malibio commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

Pragmatic Code Review (part 2 of 2: findings)

Code Review Findings

🟡 Important: NOT_YET_WON excuses a wrong-skill lead on the same request

📁 packages/agent/tests/it/skill_confusion_matrix.rs:316-341, 481-483 (overlapping rows at 266-273, 306)

Failures are partitioned by request string alone:

.partition(|(request, _)| NOT_YET_WON.contains(request));

Three requests are both an owner case that currently misses and a must-not-lead confusion: "add another album: Blue Train by Coltrane" (not Schema Creation), "log today’s gig at the Blue Room, paid 300" (not Schema Creation) and "new note: call the plumber" (not Bulk Import). Because the request is on the list for its owner miss, the confusion row is excused too. If Schema Creation started leading "log today’s gig…", which is the exact confusion its new not_for exists to prevent, the matrix would stay green. The doc comment’s claim that "a request that newly misses is a failure" does not hold for these rows.

Recommendation: key the list on the failing row, not the request, for example (request, owner_or_"not <skill>"), or keep must-not-lead failures out of the partition so they always fail.
Principle: a ratchet must be exactly as wide as what it records; a wider key turns a recorded miss into an unrecorded exemption.

🟡 Important: the trial-wording hook can silently measure the wrong thing

📁 packages/agent/tests/it/live_skill_retrieval_stability.rs:68-103, packages/agent/tests/it/skill_confusion_matrix.rs:471-503

Test-only code reading an env var and a file is acceptable here: it is reachable only from #[ignore]d tests, a missing or malformed file panics, and UPDATE_GOLDEN refuses to record a trial. Two holes remain:

  1. A key that matches no skill is ignored (let Some(wording) = overrides.get(&t.title) else { return t; } iterates skills, never checks the keys of the file), as is a misspelt field ("usefor"). A trial of "Organisation" measures the seeded wording and reports it as the result of the trial.
  2. Under the variable the matrix returns before both assertions (if trial { return; }), so it passes whatever the wording does, and the only signal is an eprintln! (line 79) that nextest hides for passing tests. A variable left exported in a shell makes "the matrix passes" meaningless, and every other live guard is silently measured against the trial text.

Recommendation: panic on any override key that is not a seeded skill title and on any field other than use_for / not_for; and end the matrix under a trial with an explicit failure ("trial wording: results above are not a pass") instead of a silent return.
Principle: a measurement tool should fail loudly when it did not measure what was asked; a pass must mean the same thing on every run.

🟡 Important: search_skills still tells the model each match has a description

📁 packages/agent/src/local_agent/tools.rs:1874

description: "Search registered skills by describing your intent. Returns up to 3 matches sorted by relevance, each with name, description, confidence (0-1), tools, and instructions. \

The key in the result is now use_for (skill_ops.rs:861). This is the one place where model-facing text documents the old shape.

Recommendation: either change it to name what is returned (and regenerate the affected goldens with UPDATE_GOLDEN=1), or state in the PR that the word is prose and stays, as was decided for Purpose:.
Principle: a tool description is its contract with the model; it should match the payload.

🟢 Suggestion: nothing in the gate ties the seed wording to its recording

📁 packages/agent/tests/it/live_skill_retrieval_stability.rs:1780-1816, packages/agent/tests/golden/skill_retrieval/current.tsv

every_not_for_names_its_live_guards is meaningful for what it says: the set of skills carrying a not_for must equal NOT_FOR_GUARDS, and each named guard must exist as a function. It is the same strength as the test it replaces, generalised. But rewording an existing use_for or not_for passes the gate untouched, and current.tsv is never compared with anything, so it can go stale without notice. A no-model gate test that pins a digest of the use_for / not_for of each seed next to the recording (failing with "re-run the live suite and regenerate current.tsv") would close this cheaply. Also minor: the existence check is a substring match on async fn <name>(), so it does not notice a guard that lost its #[tokio::test].
Principle: a recorded measurement is only evidence while something checks it still describes the code.

🟢 Suggestion: stale exclusion wording left in the live suite and two prose spots

📁 packages/agent/tests/it/live_skill_retrieval_stability.rs:631, 660, 690, 692, 1077, 1177, 1179, 1401, 1469; packages/skill/references/cli.md:630; packages/agent/src/seeds/rules/agent/node-deletion-wrong-skill.md:1

Nine doc comments still name the field as exclusion, cli.md:630 says the "description should still say when it applies", and the deletion rule tells the model the scoping lives outside the skill "description". None is read as a key, so nothing breaks; the rule file is model-facing, so changing it is a golden change and may be left deliberately.
Recommendation: rename the nine comments and the cli.md sentence; decide the rule file deliberately.
Principle: one name per concept; a retired name left in comments sends the next reader looking for a field that is gone.

Nitpicks

  • Nit: packages/core/src/ops/skill_ops.rs:468 — "carry an not_for" should be "a".
  • Nit: packages/agent/tests/it/skill_confusion_matrix.rs:313-315 — "the list can only shrink without anyone noticing" reads as the opposite of what is meant; and the group comments at 317/323 say Graph Editing leads requests that current.tsv shows led by Conflict Journal ("add another album") and Research & Search ("books I lend out").
  • Nit: packages/agent/tests/it/live_skill_retrieval_stability.rs:727 — requests_its_not_for_changes takes a registry that every caller passes as seed_skill_nodes() and is pub(crate) with no outside caller; both are left over from the Playbook half.
  • Nit: packages/agent/src/skill_pipeline.rs:1563, 1609, 1649 — test names still say description while asserting on use_for.
  • Nit: packages/cli/src/output.rs:1193 — the namespace fixture uses "skill":{"description":"d",…}; harmless (the test is about flattening), but it is the last raw old key on a skill node.
  • Nit: the "128 requests" in the PR body is 128 recorded rows over 113 distinct requests (15 appear as both an owner case and a confusion).
  • Nit: packages/agent/tests/it/live_skill_retrieval_stability.rs:1588 — linking_requests_route_relationship_management asserts rank 1 on "which tasks depend on the API migration?", which current.tsv records at +0.009 over Node Creation while the matrix asks only for the window. Thin for a must-lead guard.

Recommendation: APPROVE

The change is a clear net improvement and meets every acceptance criterion that still applies. The three Important findings are small, local fixes to test tooling and one string; none changes product behaviour.

@malibio malibio left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated pragmatic-code-review: APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.

@malibio

malibio commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

Review addressed (commit cc66367)

Addressed

  • 🟡 NOT_YET_WON excused a wrong-skill lead. The list now excuses an owner's miss only. A must-not-lead failure on a listed request always fails, and the stale check counts owner misses only.
  • 🟡 Trial wording could mis-measure silently. A key that is not a seeded skill, or a field other than use_for / not_for, panics. Under SKILL_TEXT_OVERRIDES the matrix prints its results and then fails ("a measurement, not a pass") instead of returning. Checked both: a misspelt skill name fails at once, and a valid trial fails after printing.
  • 🟡 search_skills described a description key. It now names use_for. No golden carries that text.
  • 🟢 Nothing tied the seed wording to its recording. current.sha256 holds a digest of every seed's name, use_for and not_for, written with the recording. the_recorded_matrix_is_of_the_seeded_text runs in the gate and fails when they differ; I confirmed it fails on a tampered digest. The guard table now requires each guard's #[tokio::test] and #[ignore] attributes as well as its name.
  • 🟢 Stale exclusion wording: the nine live-suite comments and the cli.md sentence are renamed.
  • Nits: "a not_for"; the ratchet's doc comment and group comments reworded; requests_its_not_for_changes lost its unused registry parameter and pub(crate); four tests renamed from …description… to …use_for…; the CLI namespace fixture uses use_for; "which tasks depend on the API migration?" (a +0.009 margin) is no longer in the must-lead guard, and stays in the matrix as a window case.

Not changed

  • seeds/rules/agent/node-deletion-wrong-skill.md still says "the skill's description". It is prose in model-facing text, not a field name, and rewording it would change a prompt golden for no behavioural gain.

Correction to the PR description: "128 requests" is 128 recorded rows over 113 distinct requests; 15 appear both as an owner case and as a confusion.

Verification

  • All 34 live tests pass on the locked model with no SKIP; current.tsv is byte-identical after re-recording.
  • bun run test:changed passes in every tier.

Re-Review Decision

Decision: NO RE-REVIEW NEEDED

Rationale: every change is confined to test tooling, comments and one tool-description string. No product code path changed, the review's verdict was already APPROVE, and each new check was run in both its passing and failing direction.

@malibio malibio left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated pragmatic-code-review (re-review): APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.

@malibio

malibio commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

Pragmatic Code Review (re-review)

Review Type: Re-Review

Reviewed 07e5cf08..cc663672 (the review fixes) and the branch's own change in the merge 3ded32c3 (merged parent f17f9f1c).

What I ran: the_recorded_matrix_is_of_the_seeded_text and every_not_for_names_its_live_guards (both pass), relationship_management_use_for_carries_the_linking_verbs and no_seeded_use_for_names_operations_it_excludes (both pass), and a recount of both .tsv recordings. I did not run the live suite or the matrix: every score below is read from the recordings, and "all 37 live tests pass" is the merge commit's statement, not something I measured.

Previous Review Summary

  • Previous recommendations: 5 findings (3 Important, 2 Suggestion) and 7 nits.
  • Addressed: all 5 findings and all 7 nits. One part of a Suggestion (the word "description" in the model-facing deletion rule file) was declined with a stated reason, which I accept.
  • Not addressed: none.
  • New issues: 2 Important (both about how the post-review wording change is reported), 2 Suggestions, 3 nits. None blocks.

How each fix checks out:

First-review finding Status What I verified
NOT_YET_WON excused a wrong-skill lead Fixed, correct Failures carry an excusable flag: true for an owner miss, false for a must-not-lead row. The partition and the stale check both use it. No request appears twice as an owner case in current.tsv, so the request key is now exactly as wide as the list.
Trial wording could mismeasure silently Fixed, one small gap An unknown skill, a non-object value and a field other than use_for / not_for all panic before any registry is built, on both paths (seed_and_embed_registry and requests_its_not_for_changes). The matrix asserts !trial after printing. UPDATE_GOLDEN still refuses to record a trial. Gap: nit 1.
search_skills named a description key Fixed The text now says use_for, the key find_skills returns. No golden or snapshot carries either wording.
Nothing tied the seed text to its recording Fixed, with limits current.sha256 matches the seeds at head (the test passes) and is written only beside current.tsv. Suggestion 2 lists what it does not cover.
Guard-existence check was a name match Fixed The check now needs #[tokio::test], the exact #[ignore = …] line and async fn <name>() together. Every named guard satisfies it.
Stale exclusion wording, nits Fixed Nine comments, cli.md, four test names, the CLI fixture, the unused registry parameter.

Merge resolution (packages/agent/tests/it/live_skill_retrieval_stability.rs): both sides are intact. Against the merged parent, the only function of main's that is gone is graph_editing_exclusion_leaves_completion_state_scores_unchanged, which the branch renamed and rebuilt on requests_its_not_for_changes. The branch's block (through every_not_for_names_its_live_guards) sits before main's ADDS_NAMING_ANOTHER_SKILLS_SUBJECT and its three tests, all present. No conflict markers.

Requirements Check (only what the new commits touch)

  • ✅ Recorded confusion matrix kept with the live suite — now also tied to the seed text by a gate test.
  • ✅ Each not_for and changed use_for has a live guard — the guard table now proves each named guard is a live test, not just a function.
  • ⚠️ Headline numbers — current.tsv at head has 19 missing owner rows, not 18 (baseline 27 is unchanged). NOT_YET_WON has 19 entries and they are exactly those 19 rows. The code is right; the PR description is not (finding 1).
  • ➖ No existing live guard regresses — one request moved against a skill this PR does not reword, inside what the guards allow (finding 2).

Code Review Findings

🟡 Important: the PR description still reports the pre-merge result

📁 PR description: "New wording: 18 of 128 miss", "The 18 remaining misses…", "All 34 live tests"

The wording change in 3ded32c3 gave back one win: "which tasks depend on the API migration?" went from first (0.805, +0.009) to fourth (0.774; Node Creation leads at 0.796). The recording, the list and the merge commit message all say so, but the description still says 18 misses and 34 live tests. It is now 19 of 128 and 37 tests, and the description does not mention that "record an edge between two nodes" was kept or what it cost.

Recommendation: update the three numbers and add one sentence on the trade (the edge phrase kept for the guard that arrived with main; one window place given back; linking leads lowered). The PR is squash-merged, so the description is the record that outlives the branch.
Principle: a measurement claim in the durable record must match the committed recording.

🟡 Important: the seed comment accounts for the costs of the not_for, but not for the costs of keeping the edge phrase

📁 packages/agent/src/skill_pipeline.rs:430-447; packages/agent/tests/golden/skill_retrieval/current.tsv:28, 80, 84

Every number in the comment that I can check is right (0.719 / 0.805 / 0.793 match current.tsv; 0.604, 0.672, 0.720, 0.710 match baseline.tsv; "first on none of seven" is right). What it leaves out is what the phrase itself cost, compared with the wording reviewed at cc663672:

Request Before the phrase With it
which tasks depend on the API migration? first, +0.009 fourth, -0.022
connect the retro notes to the sprint they belong to first, +0.025 over Node Merge first, +0.004
attach the contract to the Harbor Freight account first, +0.087 first, +0.047
link this invoice to the Acme account first, +0.108 first, +0.083
mark the outage report done (a Graph Editing request) Graph Editing first, +0.002 Relationship Management first; Graph Editing second, -0.002

Two things follow.

  1. The comment says the question drops "by 0.009, from third to fourth" under the not_for. True, and the smaller half: the phrase had already taken it from first at 0.805 to third at 0.783. A reader of the comment alone would not learn that this request was won one commit earlier.
  2. "mark the outage report done" is now led by Relationship Management. On main Graph Editing led it by 0.026. No guard fails, because completion_state_updates_route_graph_editing asks only for the window, and research_and_search_does_not_displace_write_skills compares only against Research & Search (its doc comment says "must still lead with its own skill", which is not what it asserts). It is a window case, so this is within the rules the PR set; it is still a cost to another skill that nothing mentions.

Three results now rest on 0.004 or less: "connect the retro notes…" (+0.004, rank 1 asserted on every rep), "record an edge between the rebuild task and the storage decision" (+0.002, by the comment; asserted as leader by add_shaped_requests_for_another_skill_keep_their_leader), and the outage report the other way. The first review called +0.009 thin for a must-lead guard and that request was taken out of the guard; these are thinner. They fail loudly if they flip, which is the right failure, but the next rewording of Node Merge or Graph Editing is likely to hit them.

Recommendation: add the three omitted lines to the comment (the question's fall from first, the retro-notes margin, the outage-report lead), and add "record an edge between the rebuild task and the storage decision" to the matrix as a First case so its 0.002 is in current.tsv and not only in a comment. No wording change asked for: with the guard from main in place, the comment's measurement (Graph Editing at 0.895 and this skill outside the top three without the phrase) justifies keeping it.
Principle: a comment that accounts for a trade-off should account for all of it; a margin a guard depends on belongs in the recording.

🟢 Suggestion: say what the not-yet-won dependency question costs, not only why it is excused

📁 packages/agent/tests/it/skill_confusion_matrix.rs:338-342; packages/agent/src/skill_pipeline.rs:448-449

Recording "which tasks depend on the API migration?" as not yet won is honest, not a hidden regression. baseline.tsv has Relationship Management unranked on it, so against main the request moved from nowhere to fourth; the row is in current.tsv; the list entry gives a reason; and the merge commit says it in plain words. The ratchet's "the list only shrinks" was bent once, in the open, inside the PR that introduces the list.

The reason given is thinner than it reads. "The question is a lookup once Stage 1 has routed it" is supported by the lookup row (Research & Search first at 1.061). But get_related_nodes is held by Relationship Management alone, and Research & Search does not list it. So on either route this question is answered without the traversal tool: routed as a lookup it leads with a skill that cannot traverse, and as the raw message its only traversal skill is fourth. The use_for still ends with "Show which records depend on or are linked to one.", a sentence aimed at exactly this request.

Recommendation: note in the list comment that the question is then served by search and not by get_related_nodes; and, in a later change, measure whether that last sentence still earns its place (if removing it changes no rank in the matrix, it is cost without benefit).
Principle: an excused miss should name its consequence, so the excuse can be judged again later.

🟢 Suggestion: the digest covers the seed text only

📁 packages/agent/tests/it/skill_confusion_matrix.rs:392-424

The gate test does what it claims: a reworded use_for or not_for fails until current.tsv is recorded again. Two things it does not cover:

  • The request lists (SKILL_CASES, CASES, REQUESTS_ANOTHER_SKILL_MUST_NOT_LEAD) are not in the digest, so a request added to the matrix leaves current.tsv a row short with the gate green. Feeding the three lists into the same hasher closes it.
  • It shows the recording was made from this text, not that the live guards were run. The failure message says to run them, which is as far as a no-model test can go; one line in the doc comment would say so.

Principle: a check's doc comment should claim exactly what the check holds.

Nitpicks

  • Nit: packages/agent/tests/it/live_skill_retrieval_stability.rs:115-117 — "not_for": 5 (any value that is neither a string nor null) clears the not_for silently, where a non-string use_for panics. Same class of silent mismeasure the fix closed; accept only a string or null.
  • Nit: packages/agent/tests/it/live_skill_retrieval_stability.rs:60-72 — under a trial, every guard other than the matrix still passes or fails on the trial text with only a hidden eprintln!. Now documented, which is acceptable; a variable left exported is caught only when the matrix is run.
  • Nit: packages/agent/tests/it/live_skill_retrieval_stability.rs:1690 — "Relationship Management 0.843 against Schema Creation's 0.805" was measured on the wording before the edge phrase came back. The seed comment dropped that figure in this commit; this doc comment kept it.

Recommendation: APPROVE

Every finding of the first review is fixed, and each fix does what it says. The merge keeps both sides. The post-review wording change is forced by a guard that arrived with main, is measured, and is recorded without hiding anything. What remains is reporting: the PR description is one commit behind, and the seed comment accounts for the costs of the not_for but not for those of the phrase. Both are text-only fixes and neither changes behaviour.

@malibio

malibio commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

Re-review addressed (commit 7efe6a9)

Addressed

  • 🟡 PR description was one commit behind. Updated: 18 of 129 rows miss (27 before), 37 live tests, and the "record an edge" trade-off is stated.
  • 🟡 Seed comment left out what the "edge" phrase costs. It now states the narrowed leads and the question's fall from first to third. The reviewer also pointed out that the reworded use_for had taken the lead on "mark the outage report done" from Graph Editing by 0.002. I fixed that instead of only documenting it: Relationship Management's not_for gains "Mark it done, resolved or paid.", after which Graph Editing leads by 0.032 and "which tasks depend on the API migration?" is back in the window and off the not-yet-won list. The comment gives what that sentence costs (three linking requests lowered by 0.006, 0.024 and 0.020; none loses its place).
  • "record an edge between the rebuild task and the storage decision" is now a must-lead matrix case, so its 0.001 lead is in current.tsv.
  • 🟢 Excused dependency question: the list comment says the question is then answered by search, without the traversal tool. (That question itself is no longer on the list.)
  • 🟢 Digest covered the seed text only: it now covers the matrix's request lists too, and the doc comment says it shows what the recording was made from, not that the live guards ran.
  • Nits: a trial not_for that is neither a string nor null panics; the stale 0.843 figure is replaced with the value measured on the final wording (0.827).

Not changed

  • Measuring whether the use_for's last sentence ("Show which records depend on or are linked to one.") still earns its place. The reviewer proposed it for a later change; it would reopen wording that is now measured.
  • Under a trial, guards other than the matrix still pass or fail on the trial text with only a hidden eprintln!. Documented; the matrix failing under a trial is what catches a variable left set.

Verification

  • All 37 live tests pass on the locked model with no SKIP. baseline.tsv was re-recorded with the old wording so both recordings have the same 129 rows.
  • bun run test:changed passes in every tier.

Re-Review Decision

Decision: NO RE-REVIEW NEEDED

Rationale: the one behavioural change is a sentence added to one skill's not_for. It was made in direct response to a reviewer finding, measured against the whole live suite, and every cost it has is recorded on the seed row and pinned by a guard. Everything else is comments, the PR description and test tooling. Both reviews returned APPROVE.

@malibio
malibio force-pushed the issue-3522-skill-use-for-not-for branch from 7efe6a9 to 78c2b8e Compare October 5, 2026 15:46
@malibio
malibio merged commit 63e08da into main Oct 5, 2026
@malibio
malibio deleted the issue-3522-skill-use-for-not-for branch October 5, 2026 15:46
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.

Audit skill retrieval text: rename description/exclusion to use_for/not_for, tighten what each skill is for, and add measured not_for entries

1 participant