feat(match): alias glossary & corrections store (E2/G4)#29
Merged
Conversation
… (E2/G4) Business vocabulary and human corrections now feed the matcher as the highest-weight signals (TRACKER step 4.6): - Aliases (E2): a checked-in glossary (phrase → component) resolves terms that appear nowhere in the code — "invoice widget" → BillingSummaryCard — as `kind:"alias"` evidence. - Corrections (G4): recordCorrection/loadCorrections over a JSONL store; a recorded correction outranks even a correct text match (`kind:"correction"`), so the next identical query resolves the confirmed way. Core: MatchQuery gains `aliases` + `corrections`; new corrections.ts store. Eval: harness loads a fixture's aliases.yaml and threads it into query matching; fixture e2-business-vocab (alias-only phrase resolves; plain text still works). CLI: `find` gains --aliases/--corrections; new `correct <component> <terms…>` command records a correction. 39 core + 3 vision + 102 parser tests pass; eval green. (4.5 calibration deferred — Gate 4 still pending it.) Co-Authored-By: Claude Opus 4.8 <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.
Step 4.6 — Alias glossary & corrections store
Failure modes E2 / G4. Business vocabulary and human corrections feed the matcher as the highest-weight signals, above text and structure.
aliases.yaml, phrase → component) resolves terms that appear nowhere in the code:"invoice widget"→BillingSummaryCard, surfaced askind:"alias"evidence.recordCorrection/loadCorrectionsover a JSONL store. A recorded correction outranks even a correct text match (kind:"correction"), so the next identical query resolves the confirmed way.API / CLI
MatchQuerygainsaliases+corrections; newcorrections.tsstore in core.aliases.yamland threads it into query matching.findgains--aliases/--corrections; newcorrect <component> <terms…>command.Demo (real CLI):
Eval / tests
Fixture e2-business-vocab: the alias-only phrase resolves; plain-text queries still work. Core tests cover alias resolution, correction override, and the JSONL round-trip flipping top-1.
Note
4.5 (confidence calibration) was deferred, so this does not close Gate 4 yet — the TRACKER records Gate 4 as pending calibration.
Verification
39 core + 3 vision + 102 parser tests pass;
pnpm evalgreen.🤖 Generated with Claude Code