Repository navigation
tests(advisory): maintainer-side authoring audit — duplicate rules and routing misses - #394
Merged
Merged
Conversation
…d routing misses tests/advisory/authoring-audit.py (Python 3 stdlib only, never shipped): - dupes: sparse TF-IDF cosine on 1-2-grams over rule-sized chunks of skills/, agents/, CLAUDE.md and README "Baseline routing"; allowlist seeded from the hand-judged pointer/tombstone/boilerplate pairs and the declared architect-agent mirror. - routing: BM25 over skill-routing.tsv trigger text vs 55 labelled phrasings; lists top-3 misses; --strict exits 1 only on a must_hit miss (none marked yet). Non-blocking CI job, golden fixture tests/wave2/test-authoring-audit.sh (floor top-3 >= 44/55), run-all.sh resolves .py subjects and tests/advisory/, CLAUDE.md rule 8 pointer. Field evidence, master 484e7ff: routing top-1 36/55, top-3 46/55; dupes top 40 = 20 judged true duplicates, 9 false positives, 11 unjudged; dupes 16.3 s over 7,031 chunks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
- dupes: allowlist check runs before the per-file-pair cap, so allowlisted pairs never spend it. - dupes: relpaths normalised to forward slashes (Windows). - dupes-allow.tsv: four broad match substrings replaced by phrases from the allowlisted chunks; the same 18 pairs stay allowlisted and the top 40 is unchanged. - fixture: miss listing proven on a synthetic one-hit/one-miss phrasings file, so it keeps testing after the real triggers improve; floor stays 44/55. - checks.yml comment: ~15 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
run-all.sh: tests/advisory/ joins #389's tests/behaviour/ in the one candidate list. CHANGELOG: both Unreleased lines kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
MendixMau
pushed a commit
that referenced
this pull request
Oct 15, 2026
Master moved again during the field-run fixes (#393, #394). Clean merge; render-routing --check re-run after it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Merged
4 of 6 tasks
MendixMau
added a commit
that referenced
this pull request
Oct 15, 2026
…fire (#391) Trigger text (column 3) of nine skill-routing.tsv rows rewritten and re-rendered (README, ROUTING, six agent stubs). Every rendered cell is a superset of its base content words. Retrieval (BM25, 55 labelled phrasings, in-sample): full trigger top-3 46 -> 55, agent-visible stub text top-3 39 -> 47; no phrasing ranks worse. Review: independent review MERGE (superset verified across all 44 rendered cells; numbers reproduced; render-routing --check identical totals; routing fixtures pass; merge-tree clean vs #392/#393/#394). First commit truncated stub rows before " — " (lost "Every module before it is called done" etc.); fixed in 9bcd19d. Behaviour: probe A/B on the head pack 15/15, same as baseline. Known: bug-lookup row widened to every CE error (intended); one stub-mode over-trigger (scss phrasing ranks wiring-sweep #1, learned-css #2; base had learned-css outside top 5); agent-stub routing words are not counted by render-routing --check (mdl stub +69 words). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
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.
Direct lane
What changed and why (one paragraph):
A maintainer-side, advisory authoring audit,
tests/advisory/authoring-audit.py(Python 3 stdlib only, never shipped: not underbin/orproject-bin/).dupessplitsskills/**/*.md,agents/*.md,CLAUDE.mdand README "Baseline routing" into rule-sized chunks (table rows, bullets, short paragraphs). It skipsROUTING:BEGIN/ENDblocks, same-file pairs and agent-to-agent pairs, ranks cross-file pairs by sparse TF-IDF cosine on 1–2-grams (inverted index, at most 3 pairs per file pair), and prints the top N that are not intests/advisory/dupes-allow.tsv. The allowlist is seeded with the declared architect-agent ↔ workflow-structure-rules mirror and the P-labelled (pointer/tombstone/boilerplate) pairs.routingruns BM25 over the trigger text (column 3) of everybin/lib/skill-routing.tsvrow against the 55 labelled phrasings intests/advisory/routing-phrasings.tsv, prints top-1/top-3 and lists every phrasing whose expected skill is not in the top 3. It always exits 0;--strictexits 1 only when amust_hitrow misses, and none is marked yet. Also in this PR: a non-blocking CI job, a golden fixture, a one-line subject-resolution fix inrun-all.sh, and a pointer under CLAUDE.md authoring rule 8 ("test retrieval").Impact
authoring-audit,continue-on-erroron job and step,|| trueon both runs). It prints output and never gates. No human step, no stage artifact.tests/wave2/run-all.sh. Its usage-line regex now accepts.py, andtests/advisory/sits next to #389'stests/behaviour/in the one candidate list (origin/master merged in after #389 landed). Subject resolution is replicated for all 113 wave2 fixtures: onlytest-authoring-audit.shdiffers from master, and none are unresolved. The tool reads onlybin/lib/skill-routing.tsvand repo markdown, which always exist.bin/render-routing.sh --checkgives the same result on base (origin/master) and head: "Routing surfaces in sync with the table; all skills routed or exempted. Baseline: 73522 words (budget 80000)." Stage 5 is 68226 words / 25 files on both (lead 25820/10, ba 25842/9, architect 23929/8, mdl 30185/14, gate 22354/11, test 21296/8, review 30889/12). Toolkit-repo sessions: about +25 words in the always-loadedCLAUDE.md(the rule-8 pointer).dupestakes 15.7 s over 7,031 chunks / 143 files (16.3 s before the review fixes);routingtakes under 0.1 s. Hot paths unaffected: the CI job runs in parallel, and the fixture adds about 1 s torun-all.sh.Field evidence. The experiment ran on master 484e7ff, with 69 hand-judged pairs (T/P/F):
TF-IDF cosine: 19/40 true duplicates in its top 40 and 82.5% non-false-positive. 5-shingle Jaccard was worse.
BM25 on trigger text: top-3 46/55. That matches or beats an LSA stand-in (the embedding model could not be downloaded).
Stdlib port on the same master:
routingtop-1 36/55 and top-3 46/55, identical to the numpy run.dupestop 40 after the allowlist: 20 judged T, 9 judged F, 11 unjudged.No client data anywhere in the diff. Leak guard passes, and a whole-word grep of added lines against the maintainer's name list plus
/Users/and/home/userfound nothing.Size cap: 8 files, 270 lines excluding the two data TSVs and CHANGELOG.
Test tier: fixture
tests/wave2/test-authoring-audit.sh(5 checks: exit 0, top-3 ≥ 44/55 floor on the committed phrasings, miss listing on a synthetic one-hit/one-miss file,must_hitexits 0 without--strictand 1 under--strict). Usage-line subject resolution was replicated by hand: only this fixture's resolution changes.Instrument: the golden input is the real
skill-routing.tsvat master and the labelled phrasings from the experiment. There are no layout or platform assumptions: the fixture usesrequire_py.CHANGELOG.mdline appended.Checks run locally:
bin/check-scripts.sh: passes.bin/render-routing.sh --check: passes.bin/check-portability.sh: passes.bin/check-pr-discipline.sh origin/master: clean.tests/wave2/test-behaviour-score.sh(from new(tests/behaviour): standing behaviour suite — M/T/N arms, skill ablation, tool-call and token columns #389): 7/7 after the merge.bin/check-no-private-citations.sh: clean.LEAKGUARD_ALLOW_NO_DENYLIST=1 bin/check-no-client-data.sh: clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Generated by Claude Code