Skip to content

feat(match): alias glossary & corrections store (E2/G4)#29

Merged
officialCodeWork merged 1 commit into
developmentfrom
build/phase-4/step-4.6-aliases
Jul 14, 2026
Merged

feat(match): alias glossary & corrections store (E2/G4)#29
officialCodeWork merged 1 commit into
developmentfrom
build/phase-4/step-4.6-aliases

Conversation

@officialCodeWork

Copy link
Copy Markdown
Owner

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 (E2) — a checked-in glossary (aliases.yaml, phrase → component) resolves terms that appear nowhere in the code: "invoice widget"BillingSummaryCard, surfaced 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.

API / CLI

  • MatchQuery gains aliases + corrections; new corrections.ts store in core.
  • The eval harness loads a fixture's aliases.yaml and threads it into query matching.
  • CLI: find gains --aliases / --corrections; new correct <component> <terms…> command.

Demo (real CLI):

$ ui-lineage find "invoice widget" -a aliases.yaml     → BillingSummaryCard (alias)
$ ui-lineage correct BillingSummaryCard "Recent invoices"
$ ui-lineage find "Recent invoices"                    → BillingSummaryCard (correction overrides InvoiceList)

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 eval green.

🤖 Generated with Claude Code

… (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>
@officialCodeWork
officialCodeWork merged commit c501824 into development Jul 14, 2026
1 check passed
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.

2 participants