Repository navigation
Add the entity-resolution tier, and the measurement that shows it works - #2856
Conversation
…#2841) Completes the three-tier context the prompt carries. Two tiers already shipped — schemas+relationships and skills/tools, both bounded deterministic retrieval rendered as fact — and entities were the missing top tier. This adds it following the same shape rather than inventing a parallel mechanism. The failure it removes: a turn naming a node the graph contains stalled asking the user for an id ("I need a Node ID to update the capacity for Northwind Trading"). Retrieval matched the message against type-level text only, so an instance name was just tokens. Resolution is a deterministic index lookup over the `node_title_fts` index added earlier, with no model call and no generative pass — which is what lets it run as a system step ahead of routing without spending a turn, consistent with ADR-038 keeping retrieval out of the model's hands. Runs inside `build_workspace_context`, which the daemon already calls before the session reaches Stage 1, so a resolved entity is available to constrain the decisions downstream. No relocation of context assembly was needed. Precision policy is cap + relative bm25 cutoff, not unique-match. Unique-match goes silent exactly when the tier is most needed: a name resolving to two nodes of different types is the case the turn most needs to see. The cutoff is relative to the best score rather than absolute because bm25 is corpus-dependent, so a fixed threshold that works on a small workspace excludes everything on a large one. The tier's output is three-state. "Resolved to nothing" means CREATE and renders explicitly; "did not run" renders nothing at all. Collapsing those would reintroduce the ambiguity the tier exists to remove. Fixture: the three scenarios previously scored as schema-selection failures are re-scored as entity-resolution cases, and a Northwind INSTANCE is now seeded. Both setup turns created types only, so those scenarios asked the agent to update and read a company that had never existed — they could not have been resolution successes. A no-match scenario is added so seeding does not lose that signal. Numbers from this fixture are a NEW baseline, not a delta against the recorded 5/8: the workspace differs, so the two are different experiments. Known limitation, pinned rather than asserted away: child nodes currently carry their own body text as a title and so enter the entity index. The cause is in the create path, not here (#2849) — `create_node_in_tx` recomputes a title with rootness unknown, before the parent edge exists. They rank poorly and the cutoff drops them when a real entity is present, so the tier degrades rather than breaks. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_018ePBsnfpieijs3XGXWDBfo
Found while verifying the entity tier end to end. Asked "when did we sign
Northwind?", the model resolved the entity correctly — it produced
`node_type` and the full stored title from the tier — and then failed on
the filter it attached:
{"operator": "equals", "property": "signed_date", "value": null}
That is projection expressed as a filter. Filters only narrow WHICH
nodes match; every matching node already comes back with all of its
properties, so the right call carried no filter at all.
Two changes, because the model's mistake was made easy and then punished
opaquely.
The tool schema now says what a filter is for. `value`'s description
states that it never selects fields, that matching nodes already include
every property, and that `exists` is the operator for "is this set at
all" — which the schema already offered but described only as
"Comparison operator". Measured effect: the model now omits `value`
entirely rather than sending null. It still does not retry after the
error, so this narrows the failure rather than removing it.
`QueryService` no longer rejects with a bare "Missing value". The
message names both real intents: drop the filter to read a property, or
use `exists` to test for one. The model demonstrably reads it — it
paraphrased the text back accurately in a manual turn.
Also deletes the `Some(Value::Null)` arm in `bind_json_value`. It was
unreachable from the wire: `QueryFilter::value` is `Option<Value>`, so
serde folds an explicit JSON null and an absent key into the same `None`.
Binding SQL NULL would have been wrong even if reached, since
`json_extract(...) = NULL` is never true and would match nothing rather
than finding unset fields. The clean build with no unreachable-pattern
warning confirms it was dead.
Test verified to fail against the old message. The `exists` half is
already covered by `test_property_filter_exists_status`.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_018ePBsnfpieijs3XGXWDBfo
The decision fixture could not measure the entity tier, for two reasons that were both structural rather than incidental. Three full 3-rep runs were spent discovering them, and each looked like a model result rather than a harness one. **Scenarios shared one chat.** `groups: [[...SETUP, ...FIXTURES]]` put every scenario in a single group, and a group is one conversation. A measured run recorded `toolsCalled: []` for every scenario after the fourth — including `skill-instance-request`, which is unrelated to this work and passes in isolation. That is conversation length being scored as decision quality. Each scenario now gets its own group, so it starts from a short conversation; the setup turns are cheap to repeat and idempotent in effect. **Instances could not be seeded.** The fixture's setup turns create TYPES. Entity resolution needs a named NODE to resolve to, so the scenarios were asking the agent to update and read a company that had never existed — "When did we sign Northwind?" is only a sensible question if Northwind exists. Seeding it was not expressible with the hooks available. `seedGroup` fires inside the group loop, and `--between-runs` wipes the database between reps, so the first group of every rep sees a workspace whose types its own setup turns have not created yet. A seed hung there finds nothing and silently no-ops — every scenario then scores against a workspace with no instance in it, invisibly. So this adds `EvalFixture.seedRun`: once per rep, after the between-runs wipe and after the preflight gate, before any group. That is the only point at which "every scenario in this rep has the instance" can be stated. The hook is general; any fixture whose scenarios act on named instances needs it rather than `seedGroup`. Verified against a genuinely COLD database — zero non-core schemas, the state a rep actually starts from — rather than the warm one an earlier attempt was checked against, which is why that attempt passed its checks and still measured nothing. Confirmed through the runner: the instance was present with zero turns run, and again after the rep-2 wipe. Also re-scores the three scenarios that were filed as schema-selection failures. They are entity-resolution cases: the model never reached a choice among the candidates on offer, it could not get from "Northwind" to a node id and deferred. Scoring that as a bad schema pick attributes a lookup failure to a judgment the model never made. A no-match scenario is added so seeding does not lose the "resolved to nothing means create" signal, and the summary gains an `Entity resolution` line. Five fixture-assembly invariants are pinned in decisions.test.ts, including that seeding stays run-scoped — moving it back to `seedGroup` now fails the build rather than silently measuring an empty workspace. Numbers from this fixture are a NEW baseline, not a delta against the recorded 5/8: the workspace, the chat structure and the scoring categories all differ. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_018ePBsnfpieijs3XGXWDBfo
…2841) Three things, all from measuring the tier rather than reasoning about it. **Cutoff calibrated against a probe of the landed index.** A seeded workspace of 8 entities plus 5 decoys carrying a real message's noise words scored "Northwind Trading" as: -6.53 Northwind Trading the intended entity -3.27 Northwind Logistics a real sibling entity -2.13 Trading terms for new customers a noise-word decoy The factor was 0.55, putting the bar at -3.59 — which dropped the sibling. That collapses exactly the ambiguity "render all candidates" was chosen to preserve: a partial name legitimately matching two entities is the case the tier exists to surface, not one to resolve silently. 0.45 puts the bar at -2.94, keeping the sibling and excluding the decoy. Pinned by a test that fails at the old factor. Relative rather than absolute despite the probe suggesting an absolute band near -2.5 to -3.0: bm25 is corpus-dependent, so a raw threshold calibrated on 51 indexed rows would drift as the workspace grows. The probe calibrates the factor, not the score. **`route_clarify` added to Node Creation's whitelist**, with guidance for the already-exists case. "Add X" when X is already in the graph is ambiguous — a second distinct record is a real thing to want — so the turn should hand the choice back rather than guess. The tool was previously unreachable from this skill, so the model had no way to ask even if it wanted to. This does NOT fix the behaviour, and the commit does not claim it does. Measured on the locked model with the entity rendered and the tool on the menu: guidance prose, the `create_node` tool description, and both together all still produced `create_node` and a silent duplicate. The middle result is worth recording — ADR-064 measured the tool-schema channel at 100% compliance where prose reached 87.5%, and it moved this not at all. "Do not take the obvious action when a condition holds" appears to be a harder ask than the output-shape constraints that measurement covered. Closing it needs a deterministic guard on the write path, tracked separately. The guidance and whitelist are kept because they are correct regardless: the tool should be reachable. **Fixture fix, not a weakening.** `schema-field-disambiguates` asserted a schema decision on a turn that correctly calls `update_node` — which takes a node id and records no schema decision, so the assertion could not pass however well the model reasoned. It now scores the operation, which is what the scenario can actually observe. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_018ePBsnfpieijs3XGXWDBfo
Code Review SummaryReview Type: Initial Review (no prior reviews on this PR) This is strong, well-argued work. The three-tier framing is right, the mechanism follows the two shipped tiers rather than inventing a parallel one, the three-state output is a genuinely good design call, and the commit messages are unusually honest about what was measured versus what was reasoned. Test quality is high: I reverted However, I found one blocking defect that I believe invalidates the PR's headline measurement.
I verified this against a real database using the exact prior turns the eval's own per-scenario groups produce. All three entity scenarios resolve to nothing. Requirements Check (against the AMENDED criteria)Reviewed against the criteria as amended by the issue comments, not the issue body.
Code Review Findings🔴 Critical📁
let mut parts: Vec<&str> = recent.into_iter().rev().collect();
if !current.is_empty() { parts.push(current); } // current message goes LAST
parts.join("\n")
Verified empirically against a real DB, seeding A minimal case with a single prior turn is enough to break it: Two consequences, and the second is worse than the first:
This changes how the PR's own results should be read. To be fair to the PR: I cannot rerun the eval to prove the counterfactual, and the commit does say the entity was "rendered" during manual verification — a single-turn manual probe would indeed have rendered it, which is consistent with both the manual observation and the eval result. That is the shape of the confound, not a contradiction. Suggested direction (for the author to weigh — I am not prescribing the shape):
🟡 Improvements📁
But the name is the one thing a reader sees in test output, and it states the wanted behaviour while the body pins the unwanted one. A Also: the comment references 📁
Minor along the same lines: those blocks use 📁 If This mirrors the pre-existing 📁 Given how central this constant turns out to be (🔴-1), its doc comment is thinner than the neighbouring 🟢 NitpicksNit: 📁 Nit: 📁 Nit: 📁 Nit: 📁 Commit SeparationCoherent and well-separated. Each of the four is independently revertible and independently reviewable, and the mechanical/behavioural split is respected:
Two small notes on Doc-Comment AccuracyI checked the specific empirical claims rather than trusting them:
Known-Gap Handling
RecommendationREQUEST CHANGES The design is sound and I would happily approve the shape of this. One blocking item:
The 🟡 items are worth addressing in the same pass (the stale Everything else here is net-positive by a wide margin: the tier is the right mechanism in the right place, the three-state output is a genuinely good decision, the cutoff is calibrated against measurement rather than intuition and pinned by a test that I confirmed fails without it, and the |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: REQUEST CHANGES (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
…ookup (#2841) Review found a blocking defect, and it invalidates part of this PR's own headline measurement. Confirmed independently before fixing. `build_workspace_context` received the BLENDED retrieval query — up to two prior conversational turns prepended before the current message — and `resolve_entities_by_title` kept only the first 6 non-stop-word tokens. On any turn but the first, the prior turns consumed the whole budget: "Add Northwind Trading to the companies we sell to" bare -> add northwind trading companies sell blend -> set up new type places hold (the prior turn's opening) The entity never reached the index. Worse than failing silent: empty candidates take `NoMatch`, which renders "anything named in this message does not exist yet" — a lookup that could not SEE the name reported as a confirmed absence, and `create_node`'s description then cites exactly that string as licence to create. A truncation laundered into an instruction to duplicate user data. Two fixes, because the blend was only half of it. `build_workspace_context` now takes `entity_query` separately from `query`. The blend exists for EMBEDDING recall of pronoun antecedents, which a lexical name lookup does not need; the daemon has both strings at the call site and passes the current message. The resolver's token cap now keeps CAPITALISED tokens in preference rather than the first N. Taking the first N was arbitrary — the budget went to whatever the sentence opened with — and the regression test proves the daemon fix alone was insufficient: a single long message still truncated. This is the proper-noun bias as a SELECTION input, not a pre-filter: a lowercase name is deprioritised, never dropped, and a message with no capitalised tokens falls back to the plain order. `a_partial_name_still_resolves` and `stop_words_alone_do_not_resolve` both still pass, which is what distinguishes a bias from a filter. `a_name_late_in_a_long_message_still_resolves` pins it. It failed against the daemon fix alone, which is why the resolver changed too. Every pre-existing test passed a bare message, which is why none caught this. What this means for the measurement, stated plainly: the 2/4 Entity-resolution score and the conclusion that ADR-064 channel authority could not move `schema-on-menu-company` both assumed the entity was rendered. Under the blend it was not, on any scenario with a prior turn. Those numbers need re-measuring before they are relied on; the single-turn manual probes remain valid, since a bare message never hit the truncation. Also from review: renamed the known-limitation test to say it pins a bug rather than the wanted behaviour, and corrected two fixture comments that still described `seedGroup` and claimed `--runs` shares one database across reps — the exact comment drift that cost three measured runs. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_018ePBsnfpieijs3XGXWDBfo
) The remaining review items, after the truncation blocker. **A header with no entities under it.** `format_for_prompt` wrote the header, then checked each line against the budget — so a budget that fit the header but not the first line left a heading promising resolved ids above nothing. That reads as a fourth state `EntityResolution` does not have, and it is worse than rendering nothing: the model is told entities were resolved and then shown none. Lines are now built before the header is committed. Pinned by a test verified to fail against the old ordering. **The budget test was passing trivially.** It exercised only the case where the header fits and no line does, so the `break` satisfied it without ever testing partial truncation. It now asserts that a budget one line short renders the first entity and drops the second. **`NoMatch` logged nothing.** The type distinguishes "ran and found nothing" from "never ran"; the logs did not, so a resolver failing to see the entity looked exactly like one correctly reporting absence. That is how the truncation went unnoticed through three measured runs. Both NoMatch paths now log, the cutoff one with the candidate count. **`ENTITY_RESOLUTION_MAX_TOKENS` was asserted, not justified.** Its comment said it "may want to diverge" from `BM25_MAX_TOKENS` while already diverging, unexplained. Now states why 6: entity names run to two or three tokens, so a message naming two entities needs room for both. Pinned by a test that fails at a cap of 2, where only the first name resolves. Skipped, with reasons: - `debug_assert!(best < 0.0)` on the cutoff. `best` comes from FTS5 `bm25()`, which is negative by construction; the assert would guard a state the source cannot produce. - Trimming `create_node`'s already-exists prologue. The review suggests re-evaluating it once the truncation is fixed — which is now true but unmeasured, since the eval that produced "channel authority cannot move this" ran under the truncation. Removing it on a hunch is worse than leaving it pending a real measurement. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_018ePBsnfpieijs3XGXWDBfo
Code Review SummaryReview Type: Re-Review (scope: The 🔴 blocker is fixed, and fixed more thoroughly than I asked for. I pushed on every claim the commit messages make and they hold under independent verification. The author did not stop at the daemon-side separation I suggested — they discovered it was insufficient on its own and fixed the resolver too, which is the correct depth. Every 🟡 and 🟢 from the prior review is either addressed or skipped with a reason I accept. Two things I want to single out as unusually good practice:
I found one new 🟡 (a genuine residual starvation case that survives the fix) and two 🟢. None block. Previous Review Summary
Verification of the blocker fix1. Is the separation complete? — YesI traced every call site of
The doc comment on 2. Is the token-selection fix sound? — Yes, with one caveat (🟡-1 below)I extracted the exact selection logic and ran it against adversarial inputs: Answering each sub-question directly:
3. Does the regression test actually pin it? — Yes, verifiedI reverted the selection to front-first It fails with exactly the message it promises, and the other 10 pass — so it isolates the selection change specifically. Restored immediately; Worth recording: 4. Was anything missed? — One residual case (🟡-1)See below. Code Review Findings🟡 Improvements📁 The capitalised-first bias fixes the case where filler is lowercase. It does not help when the competing tokens are also capitalised — and Title Case is common in exactly the register where users name entities. Measured against the real logic:
This is materially less severe than the blocker — it needs an unusual message register rather than merely a second conversational turn — so I am not blocking on it. Two things I would want, in decreasing order of value:
A stronger long-term shape, if this ever needs revisiting: prefer runs of adjacent capitalised tokens over isolated ones, since a multi-token entity name is contiguous and Title Case filler is not clustered around the name specifically. Not worth doing speculatively — noting it so the option is on record. 🟢 NitpicksNit: 📁 The strengthening is real and I verified the intent: the test now asserts
Nit: 📁
The header fix (item 5)Budget arithmetic is correct. The predicate is: if out.len() + header.len() + lines.len() + line.len() > max_chars { break; }All four components are accounted for: what is already emitted, the header not yet committed, the lines accumulated so far, and the candidate. The prior version's inner check was
Is the strengthened budget test non-trivial now? — Yes, but see 🟢-1. It genuinely exercises partial truncation (first entity present, second absent), which the prior version did not. It does not fail against the old ordering — correctly, since partial truncation worked before; the header-empty case is what the old ordering broke, and that is the new test's job. Two tests, two properties, cleanly separated. One observation on scope:
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review (re-review): APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Re-review approved the blocker fix and found one genuine residual the
fix does not cover. Reproduced before acting on it.
The capitalised-first selection helps when the filler competing for the
token budget is lowercase. It does nothing when the competing tokens are
capitalised too — front-first truncation then applies WITHIN the
capitalised class, which is the same defect one level down:
"Could You Kindly Update The Customer Record And Billing Address
For Northwind Trading"
-> kindly update customer record and billing (entity dropped)
Left unfixed, deliberately. "Prefer the longest run of adjacent
capitalised tokens" was the obvious next heuristic and was tried: it
gives no discrimination here, because a Title Case sentence is one long
run. Inventing a fourth variant to chase an unusual register is worse
than recording the limit accurately.
It is also materially less severe than the bug it replaced, in the way
that decides whether it can mislead: it degrades to a weak one-token
match rather than to `NoMatch`, so it cannot produce the false "does not
exist" claim that licenses creating a duplicate. A test pins that
distinction — asserting the entity is still FOUND, with a note to invert
the assertion if a future change makes it rank first, since that would be
an improvement rather than a regression.
The comment now also records that the cap's justification reasons about
the IDEAL token set (a name is two or three tokens) while the cap applies
to the SELECTED set — those coincide only when selection puts the name
first, which is exactly what the residual breaks.
Also from re-review: the budget test's `full.len() - 20` magic offset now
derives from the dropped line's own length, so the boundary stays correct
if the rendered line format changes.
Not addressed: `///` vs `/** */` in decisions.ts. Cosmetic, and the
reviewer marked it optional.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_018ePBsnfpieijs3XGXWDBfo
Corrected results — the earlier numbers were measured under a bug this PR fixesThe results table originally posted here reported 7/9 pass^3, Entity resolution 2/4. Those numbers are withdrawn. They were measured while the entity was being truncated out of its own lookup — review found that Re-measured on
Per rep: 8/9, 8/9, 8/9. Stage-1 decision cost 2424 / 2037 / 1896 ms mean. What moved, and what actually caused itThree things differ between the two runs, so the aggregate improvement should not be attributed to one of them:
What is clean about both runs: zero variance across three reps, so neither set of numbers is noise, and the v4 run's provenance is The one remaining failure is the documented gap, and it is now better evidenced
This was previously reported with a caveat that it might be confounded: if the entity had been truncated away, the model never saw it, and concluding "instruction channels cannot move this" would have been unfounded. That caveat is now resolved, and the conclusion holds. With the entity correctly rendered in Closing it needs a deterministic guard on the write path — the system already holds the resolved entity, so the collision is detectable before the write with no model judgment — which is tracked separately. |
Completes the entity tier for #2841. The FTS5 index landed separately in #2845; this is the resolution step that uses it, plus the measurement apparatus needed to tell whether it works.
The three-tier context is now complete
A turn's prompt carries three tiers. Two already shipped — schemas+relationships and skills/tools, both bounded deterministic retrieval rendered as fact. Entities were the missing top tier, and this adds it following the same shape rather than inventing a parallel mechanism.
The failure it removes: a turn naming a node the graph contains stalled asking the user for an id.
Retrieval matched the message against type-level text only, so an instance name was just tokens.
Measured results
3 reps,
gemma-4-e4b-q4km, purged database between reps. Zero variance — every scenario passed 3/3 or failed 0/3.Four scenarios went from failing every rep to passing every rep, including
op-read-then-write(an ADR-056 recorded failure) andschema-shared-name-signed— "When did we sign Northwind?", one of the three prompts this issue was filed on.These numbers are a new baseline, not a delta against the recorded 5/8. The workspace, chat structure and scoring categories all differ. Three variables also moved together — the tier, the tool-schema wording, and group isolation — so the aggregate is attributable but the individual contributions are not.
What made the measurement possible
The decision fixture could not measure this at all, for two structural reasons. Three full 3-rep runs were spent discovering them, each looking like a model result rather than a harness one.
Scenarios shared one chat. All of them sat in a single group, and a group is one conversation. A measured run recorded
toolsCalled: []for every scenario after the fourth — including ones unrelated to this work that pass in isolation. That is conversation length being scored as decision quality. Each scenario now gets its own group.Instances could not be seeded. The fixture's setup turns create TYPES; entity resolution needs a named NODE. Seeding was not expressible:
seedGroupfires inside the group loop, and--between-runswipes the database between reps, so the first group of every rep saw a workspace whose types its own setup turns had not created yet. A seed hung there silently no-ops.So this adds
EvalFixture.seedRun— once per rep, after the wipe and the gate, before any group. That is the only point where "every scenario in this rep has the instance" is expressible. The hook is general; any fixture acting on named instances needs it.Verified against a genuinely cold database, not the warm one an earlier attempt checked against — which is why that attempt passed its checks and still measured nothing.
Precision calibration
The cutoff was calibrated against a probe of the landed index (8 entities plus 5 decoys carrying a real message's noise words):
The factor was 0.55, putting the bar at -3.59 — which dropped the sibling, collapsing exactly the ambiguity "render all candidates" exists to preserve. Now 0.45 (bar -2.94): sibling survives, decoy excluded. Pinned by a test verified to fail at the old value.
Relative rather than absolute despite the probe suggesting a band near -2.5 to -3.0: bm25 is corpus-dependent, so a raw threshold calibrated on 51 rows would drift as the workspace grows.
Design decisions
build_workspace_context, which the daemon already calls before the session reaches Stage 1 — so no relocation of context assembly was needed.A tool bug found while verifying
Asked "when did we sign Northwind?", the model resolved the entity correctly — it produced
node_typeand the full stored title from the tier — then failed on the filter it attached:{"operator": "equals", "property": "signed_date", "value": null}That is projection expressed as a filter. The schema now states that filters never select fields, and
QueryServiceno longer rejects with a bare"Missing value". Also deletes an unreachableSome(Value::Null)arm —valueisOption<Value>, so serde folds JSON null intoNone.Measured effect: the model now omits
valuerather than sending null. It still does not retry, so this narrows the failure rather than removing it.Two known gaps, both deliberate
schema-on-menu-companyfails, and is left asserting the wanted behaviour rather than blessing the observed one. "Add X" when X exists produces a silent duplicate. This is NOT missing instruction: guidance prose, thecreate_nodetool description, and both together all produced the duplicate with the entity rendered androute_clarifyon the menu. ADR-064 measured the tool-schema channel at 100% where prose reached 87.5%, and it moved this not at all — "do not take the obvious action when a condition holds" appears harder than the output-shape constraints that measurement covered. Closing it needs a deterministic guard on the write path, filed separately.Child nodes carry their own body text as a title and so enter the entity index. The cause is in the create path, not here —
create_node_in_txrecomputes a title with rootness unknown, before the parent edge exists. Filed separately; pinned by a test that documents current behaviour and says to invert it when fixed.Not in scope
Prevalence ("what fraction of real messages name a resolvable entity") stays deferred per the decision recorded on #2841: no legitimate corpus exists, and fixture prompts would invert the signal. The general-vs-special-case gate depends on it and stays open with it.
Verification
test:allvia the pre-push gate: frontend 262 files, skill 95, scripts 565, full Rust suitebun run quality:fixcleanPart of #2841 — does not close it; the routing tiers and prevalence remain open.
🤖 Generated with Claude Code