Repository navigation
feat(cli): vocabulary --drift-insights (M19c) - #38
Open
jgrodziski wants to merge 5 commits into
Open
jgrodziski wants to merge 5 commits into
jgrodziski wants to merge 5 commits into
Conversation
wordHits() with no word returns every entry, in side-car order then block order, as glossaryEntries() does: what vocabulary --drift-insights compares. The adapter already had the statement, for the lone-surrogate scan. The projection property now checks it for any side-car. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVgyop39vhNa45r7zM8w
concernDrift sets each word a model defined beside the class the list gives it in that entity's language: the technical words judged domain somewhere, the domain words judged technical, with the judgements against, surest first. businessJudged sets a glossary's terms against both. The judgements come in this package's own shape; it imports nothing from @codegraph/insights. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVgyop39vhNa45r7zM8w
Reads the insights store beside the first model (--insights FILE names another) and prints the two lists, five judgements per word (--json: all); with --drift, the business terms against both. A judgement never sets the exit code; --drift keeps its exit 3. The store opener moves to insights-paths.ts, shared with the insights command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVgyop39vhNa45r7zM8w
cli.md, insights.md (a third reader, beside the model), and the website's vocabulary and exit-code pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVgyop39vhNa45r7zM8w
PLAN 20.3: the decisions and the Broadleaf-scale measurement; 20.4: the reader is in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PKCVgyop39vhNa45r7zM8w
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
codegraph | 79e8d19 | Commit Preview URL Branch Preview URL |
Oct 28 2026, 06:26 PM |
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.
Fourth step of milestone M19c in PLAN.md §20 (word cloud / glossary, #6). Stacked on #37 (itself on #36, on #35): review those first. This PR's diff is the five commits after #37.
codegraph vocabulary --drift-insightscompares the word classes the list assigns with the concerns a model gave the same words inexplain. It opens the insights store beside the model. Theinsightscommand opens the store alone and cannot do this, because only the model says which class a word takes in a given entity.The report
serviceinCustomerServiceTicket).orderinsortOrder).Each word is listed with how often each concern was judged. Under it come the judgements its class contradicts, most confident first: confidence, sense, and the identifiers the word is in, in which entity. The text shows five per word and says how many more there are;
--jsonlists every one. Words with the most judgements against come first, and--top Ncuts each list (default 40).With
--drift FILE, the business terms are set against both. Each word shows the classes the corpus says it under and the model's concerns, plus why it drifts:list(the list doesn't call it domain),model(a model judged it technical somewhere), or both.(These judgements come from a store built by hand over the Java fixture's ids, not from a model run.)
The code
@codegraph/insights:wordHits()with no word returns every entry, matchingglossaryEntries(word?). The adapter already had the statement, for the lone-surrogate scan.@codegraph/vocabulary,concern-drift.ts:concernDrift(graph, judgements, { view, technical })andbusinessJudged(artifact, terms, drift). Pure computation, with properties for conservation and order independence.--drift-insightsand--insights FILE(the flag nameserveuses). The store opener moves from theinsightscommand toinsights-paths.ts, and both commands use it.Worth a look in review:
WordJudgements in its own shape and restates the three concerns (JUDGED_CONCERNS); a CLI test pins them equal to the insights block's.buildVocabularywould class it in that entity's language, under the list in effect (--technicalincluded). In a mixed corpus one word can be two rows:selectisdomainin Java andkeywordin Go.--driftkeeps its own exit 3 for a term the corpus never says;saidis the corpus-level drift's answer, pinned by a test.--jsonlists every one)". The cap is a fixed number, not a flag.--scope,--level,--classand--svgwith--drift-insights, and--insightswithout it, are usage errors.--jsonisreport: "drift-insights"withincodegraph.vocabularyReport/1.Docs
docs/cli.md: the synopsis and the flag.docs/insights.md: the third reader andwordHits(word?).vocabularypage (two options, an "Against the model" section, exit codes, the example above) and the exit-codes page.--drift-insightsas in.Verification
unknown output format "llms"(pnpm -r build fails on a fresh clone: unknown output format "llms" for kind "home" #23). Typecheck is green, eslint is clean on every changed file, andpnpm run gen:schemasleavesschemas/unchanged.--top, an empty store,--technical,--driftagainst both, JSON, the default store beside the model left byte-identical, a missing store, the concern pin, the flag refusals; and two usage errors through the real process, each checked for exit 2 and for not crashing);wordHits());pnpm -r teston this machine, its corpus-scale test (scale.test.ts, 1.3 s alone) exceeded its 5 s timeout twice while the CLI suite ran in parallel. Nothing in this PR touches the analyzer.definitionSpellerasks plus parameters and attributes, 109,208 entries, 12% judged against the list. On an x86-64 Linux box the command takes 4.1 s end to end, against 3.2 s for the plain report, at the same peak memory (about 0.5 GB). It writes 572 lines../build.sh --ts --seapasses its smoke checks.Still owed for M19c:
/glossary.json, with the Vocabulary tab and Navigate panel entries.docs/vocabulary.mdand the README.--word ordertiming, and this report on a re-explained Broadleaf store.Part of #6.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PKCVgyop39vhNa45r7zM8w