Skip to content

Tighten skill wording so the two near-tie requests win on CPU (#4273) - #4276

Merged
mstomar125 merged 3 commits into
mainfrom
drain-4273
Nov 13, 2026
Merged

mstomar125 merged 3 commits into
mainfrom
drain-4273

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

Fixes #4273

What changed

Retrieval wording of four seeded skills (packages/agent/src/skill_pipeline.rs):

  • Completing a Task: not_for is now "Continue, resume or pick up work on a task."
  • Deprecating and Migrating: not_for gains "Ask which tasks or records depend on something."
  • Relationship Management: the lookup sentence of use_for now reads "Ask which tasks or other records depend on, are blocked by or are linked to a given one."
  • Implementing a Task: unchanged. A first try that edited its use_for made Implementing a Task lead "point rebuild task at the decision it has to respect", so it was reverted.

Both requests leave NOT_YET_WON. The golden (current.tsv, current.sha256) is re-recorded on CPU (nomic-embed-text-v1.5 Q8_0, NODESPACE_FORCE_CPU=1).

Measured on CPU (retrieval scores)

Request Before After
continue the task I was working on Implementing a Task unranked; Completing a Task leads at 0.984 Implementing a Task first at 0.982, Graph Editing 0.056 behind
which tasks depend on the API migration? Relationship Management 5th at 0.779, Deprecating and Migrating leads at 0.876; the routed candidates miss it Relationship Management 3rd at 0.794 (Creating a Task leads retrieval at 0.873); the routed candidates serve it, which is what the test asserts

Golden diff

14 rows (28 lines), all among these four skills and their neighbours. Relationship Management rows moved by up to 0.045 (the launch task is blocked by the security review 6th to 3rd, this task depends on the API migration 7th to 6th, record an edge between the rebuild task and the storage decision 3rd to 2nd; link this invoice to the Acme account still first with its lead 0.051 to 0.037), plus 0.001 to 0.007 drift on rows that name Completing a Task. No row lost a rank it held. This is not a full re-record (#4271 changed 380 lines of current.tsv).

Checks

  • cargo test -p nodespace-agent --test it skill_confusion_matrix:: -- --ignored on CPU: the matrix passes with NOT_YET_WON holding no stale rows; the non-ignored digest test passes.
  • live_skill_retrieval_stability on CPU: unmodified main fails 4 of 40 (add_shaped_requests_for_another_skill_keep_their_leader, filing_requests_route_organization, scenario_11c_routes_relationship_management_every_rep, without_the_add_rule_those_adds_lead_with_a_skill_that_removes). With this change 2 fail, the same two as on main that are about other skills (filing_requests_route_organization, without_the_add_rule_…). Not fixed here.
  • bun run shape:check is in step (skill use_for text is not in the shape record); cargo fmt --check, cargo clippy -p nodespace-agent --all-targets -- -D warnings and cargo test -p nodespace-agent --lib skill pass.
  • Scores are CPU-recorded; a GPU run may order near-ties differently.

🤖 Generated with Claude Code

@mstomar125

Copy link
Copy Markdown
Contributor Author

APPROVE (head c254360, read-only review; nothing run on a model, and I did not compile or run the digest test, see "Not verified")

No blockers. The golden diff is confined to the three edited skills and their neighbours, no row loses a rank, and the PR body matches the diff. Findings are all low severity.

1. Golden diff (14 rows, 28 lines, matches the PR's count). Every changed row is a Relationship Management, Completing a Task, Deprecating and Migrating or Implementing a Task row, or a row where one of them is the runner-up or the scored skill:

  • Rank gains: record an edge 3 to 2 (0.895 to 0.900); this task depends 7 to 6 (0.784 to 0.810); launch task blocked 6 to 3 (0.719 to 0.765); which tasks depend 5 to 3 (0.779 to 0.794, now Creating a Task 0.873 leads); continue the task - to 1 (0.982, Graph Editing 0.056 behind).
  • Drift only, same rank: mark incident resolved 0.909 to 0.908; mark export task done 0.945 to 0.941 (margin over Graph Editing +0.086 to +0.082); not-RM "Add this note to my reading list" RM score 0.786 to 0.779 (still far below Researching 0.884); remove completed items margin +0.029 to +0.036; get rid of the paid invoices runner-up Deprecating and Migrating to Answering a Question (+0.026 to +0.027; this is the only runner-up swap, and it is in a neighbour).
  • Margins that shrank or worsened (none lost a rank): link this invoice to the Acme account lead 0.051 to 0.037 (RM 0.788 to 0.774, matches the PR; still 1st). attach the contract to the Harbor Freight account RM 0.722 to 0.717, deficit to Shipping a Change -0.015 to -0.021 (still 2nd; the PR body does not mention this one). connect the retro notes... lead over Node Merge +0.006 to +0.005 (already razor thin; it was +0.001-level before in the seed comments). None is a rank loss, and First still holds on the first and third.
  • No unrelated-skill row changed. All the Deprecating and Migrating owner rows are untouched.

2. sha256. The digest is not of the tsv: seed_text_digest() hashes every seed's title/use_for/not_for plus the matrix requests (skill_confusion_matrix.rs:756-785). NOT_YET_WON is not hashed, so its shrink cannot desync it. The only seed-text changes in the diff are the three edited strings, and the sha changed, which is the expected direction. I did not recompute it (see below).

3. NOT_YET_WON. Removing "which tasks depend on the API migration?" and "continue the task I was working on" is consistent with the golden: continue is a Procedure owner (Implementing a Task), so it is won if judged, and it now ranks 1st at 0.982. which-tasks-depend is a Window row at rank 3, within the window (the tsv "routed_leader" column is Node Creation for it; that column is the routed lead, not whether RM is judged, so the actual win cannot be confirmed from the tsv alone, only by the ignored run the author reports). The two dependency-as-fact rows stay listed and still fail on First (launch task: routed leader Play Workflow State). The ratchet (stale check, ~line 985) and the "excuses an owner's miss" doc are unchanged and still correct. The removed comment was specific to the two rows, so nothing is left dangling.

4. Wording.

  • Completing a Task not_for: "Continue, resume or pick up work on a task." The close/mark-done/"won't let me mark done" requests do not contain those verbs and their rows are unchanged (1.022, 0.947 unchanged; 0.945 to 0.941). Low risk: a request like "finish the task I was working on" or "keep going once the blocker is resolved" is not in the matrix or stability tests, and the not_for could pull it slightly. Not blocking; worth a matrix row later.
  • Deprecating and Migrating not_for: "... Ask which tasks or records depend on something." Its own use_for says "find who still uses it", so a model reading the skill list could read "who still depends on the v1 API we are deprecating" as both for and not for. The matrix and stability tests contain no such request (greps for deprecat/phase out/sunset/depend show only the three plain deprecate cases at matrix lines 432-443, all unchanged in the golden), so no regression is demonstrated. Low severity; a more specific phrase ("Ask which tasks or notes depend on a given record") would remove the ambiguity.

5. Honesty of claims. The body matches the diff: the row counts, the before/after scores table, "No row lost a rank it held", and "link this invoice ... lead 0.051 to 0.037" all check against the tsv. "Up to 0.045" is actually 0.046 (launch task), trivial. The caveat that second row wins only on routed candidates is honest: retrieval rank 3, 0.079 behind Creating a Task. The omission is the Harbor Freight margin worsening (-0.015 to -0.021). The 4-to-2 stability result is the author's and I could not reproduce it.

6. Seeded-text rules. Greps of the head tree: the changed skills' use_for/not_for text appears only in packages/agent/src/skill_pipeline.rs; packages/core/shape-record/current.json and snapshots contain only the field schema for use_for/not_for, not seed text. The old strings ("Show which records depend on or are linked to one", the old not_for) appear nowhere else, so no prompt snapshot or golden embeds them apart from the regenerated tsv. shape:check should be unaffected, consistent with the author.

Stale comments (low, non-blocking, fix in a follow-up or here):

  • skill_pipeline.rs ~line 535-540: the comment still quotes the removed sentence ("Show which records depend on or are linked to one.") and its 0.890/0.895/0.799/0.801 measurements, which are no longer the text or numbers in force.
  • live_skill_retrieval_stability.rs ~1862-1870: the doc comment of relationship_management_not_for_leaves_linking_scores_unchanged cites 0.793 to 0.787 for the invoice link and 0.805 to 0.785 for "this task depends"; current recorded values are 0.774 and 0.810.

Not verified: I did not compile or run anything (no cargo, no model, no GPU); in particular I did not recompute the sha256 via the digest test, and I did not reproduce the matrix or the live_skill_retrieval_stability counts (the 4 to 2 failures, including the two that still fail on main). GPU near-tie ordering is untested, as the author notes.

@mstomar125

Copy link
Copy Markdown
Contributor Author

Merge queue: #4276 was taken out of the queue — the merge gate failed on it, on top of main. Reproduce by merging or rebasing origin/main and running bun run test:changed, fix, push, and re-run bun run merge 4276.

PASS [   0.023s] (1084/5987) nodespace-agent::it live_openai_compat_routing::tests::the_probes_block_matches_the_routed_names_arm
        PASS [   0.176s] (1085/5987) nodespace-agent::it extends_chain_tool_results_test::empty_search_on_a_subtype_names_inherited_filterable_fields
        FAIL [   0.021s] (1086/5987) nodespace-agent::it live_skill_retrieval_stability::every_not_for_names_its_live_guards
  stdout ───
    running 1 test
    test live_skill_retrieval_stability::every_not_for_names_its_live_guards ... FAILED
    failures:
    failures:
        live_skill_retrieval_stability::every_not_for_names_its_live_guards
    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 264 filtered out; finished in 0.00s
  stderr ───
    thread 'live_skill_retrieval_stability::every_not_for_names_its_live_guards' (5430986) panicked at packages/agent/tests/it/live_skill_retrieval_stability.rs:2061:5:
    assertion `left == right` failed: the skills that carry a not_for and the skills NOT_FOR_GUARDS lists must be the same
      left: ["Asking the User", "Completing a Task", "Deprecating and Migrating", "Diagnosing a Bug", "Graph Editing", "Organization", "Play Authoring", "Prototyping", "Relationship Management", "Researching", "Reviewing a Task", "Schema Creation", "Shipping a Change", "Writing a Spec"]
     right: ["Asking the User", "Deprecating and Migrating", "Diagnosing a Bug", "Graph Editing", "Organization", "Play Authoring", "Prototyping", "Relationship Management", "Researching", "Reviewing a Task", "Schema Creation", "Shipping a Change", "Writing a Spec"]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  Cancelling due to test failure: 9 tests still running
        PASS [   0.020s] (1087/5987) nodespace-agent::it live_stage1_compound_intent::tests::every_compound_prompt_has_at_least_one_keyword
        PASS [   0.021s] (1088/5987) nodespace-agent::it live_stage1_compound_intent::tests::mentions_all_requires_every_keyword_present
        PASS [   0.189s] (1089/5987) nodespace-agent::it extends_chain_tool_results_test::get_node_on_a_subtype_returns_and_lists_inherited_fields
        PASS [   0.172s] (1090/5987) nodespace-agent::it get_related_nodes_both_direction::forward_name_with_both_direction_still_unions_directions
        PASS [   0.171s] (1091/5987) nodespace-agent::it get_related_nodes_both_direction::reverse_name_equal_to_forward_name_reports_each_node_once
        PASS [   0.188s] (1092/5987) nodespace-agent::it get_related_nodes_both_direction::builtin_reverse_name_with_both_direction_reports_each_node_once
        PASS [   0.167s] (1093/5987) nodespace-agent::it link_field_values::the_write_tools_take_a_link_and_refuse_a_bare_string
        PASS [   0.187s] (1094/5987) nodespace-agent::it get_related_nodes_both_direction::reverse_name_with_both_direction_reports_each_node_once
        PASS [   4.045s] (1095/5987) nodespace-agent pty::session::tests::an_agents_own_variables_are_forwarded_and_no_others
────────────
     Summary [   8.913s] 1095/5987 tests run: 1094 passed, 1 failed, 120 skipped
        FAIL [   0.021s] (1086/5987) nodespace-agent::it live_skill_retrieval_stability::every_not_for_names_its_live_guards
warning: 4892/5987 tests were not run due to test failure (run with --no-fail-fast to run all tests, or run with --max-fail)
error: test run failed
error: script "rust:test:workspace" exited with code 100
error: script "rust:test" exited with code 100
[stage exited with code 100]

  full output: /var/folders/3w/y9kj522n1_j9wqmt6vl_sb6r0000gp/T/nodespace-gate-logs/_gate-merge-2026-11-13T15-58-03-337Z/rust-test-rust-workspace-nextest.log

✗ rust:test (Rust workspace, nextest) failed — merge blocked.
  Fix the failure, push, and re-run: bun run merge <PR#>

mstomar125 and others added 3 commits November 13, 2026 17:15
…recating skill wording so two near-tie requests win on CPU (#4273)

"continue the task I was working on" led Completing a Task (0.984) because the
retrieval text of Completing a Task has no word against continuing work. Its
not_for now says so, and Implementing a Task leads at 0.982 with Graph Editing
0.056 behind. "which tasks depend on the API migration?" was missed by 0.097
with Deprecating and Migrating leading: that skill's not_for now excludes the
dependency lookup, and Relationship Management's use_for asks for which tasks
or records depend on, are blocked by or are linked to a given one (rank 5 at
0.779 to rank 3 at 0.794; the request is now served by the routed candidates).

The golden is re-recorded on CPU; the diff is limited to the rows of these four
skills and their neighbours. Both requests leave NOT_YET_WON. On CPU, two
live_skill_retrieval_stability tests that fail on main now pass; the two that
still fail also fail on unmodified main.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… measurements belong to

The comment quoted a sentence that the wording change replaced; it now names the current sentence and states that the scores are the earlier sentence's.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Completing a Task now carries a not_for, so the table of not_for guards lists it with the matrix test that ranks the request it exists for.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.

Skill matrix: two requests lead by near-ties on CPU (Implementing a Task vs Completing a Task, Relationship Management)

1 participant