Skip to content

feat(analytics-skill): extract ranking values from prose across phrasings and dialects#351

Open
kevinmessiaen wants to merge 3 commits into
mainfrom
cherry/analytics-extract-from-prose
Open

feat(analytics-skill): extract ranking values from prose across phrasings and dialects#351
kevinmessiaen wants to merge 3 commits into
mainfrom
cherry/analytics-extract-from-prose

Conversation

@kevinmessiaen

@kevinmessiaen kevinmessiaen commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Changes

  • packages/cli/src/skills/analytics/SKILL.md — three new SQL-craft rules (extract-across-phrasings, prose-as-join-key, parsed-metric top-N coverage gate)
  • packages/cli/src/context/sql-analysis/dialects/*.md — extract-from-text idiom for all 9 engines
  • packages/cli/test/skills/analytics-skill-content.test.ts — assertions guarding the three new rules

kevinmessiaen and others added 3 commits July 12, 2026 18:40
…nking magnitude

When the ranking value lives in a free-text column, extract the numeric token
with its separators before the strip/scale/cast pipeline; after ranking a
parsed-from-text metric, re-check parse coverage so dropped high-magnitude
values can't silently sink the true leaders out of a top-N.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Q2q8GTZBn98eg6zUjDxvR
Each dialect note gains an Extract-from-text bullet giving that engine's
separator-preserving idiom (regexp_extract/REGEXP_SUBSTR/extract, or a
positional PATINDEX/INSTR hand-roll for tsql/sqlite), so the analytics skill's
'get the regex-extract idiom from sql_dialect_notes' reference resolves to a
real per-engine recipe.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Q2q8GTZBn98eg6zUjDxvR
…sing join key

Root-cause correction for the deps_dev_v1 fork-count failure: the dominant
cause is not comma-stripping but (1) the same fact phrased several ways in the
narrative, so a single regex drops every other form to NULL, and (2) a table
with no structured key whose identifier lives only in prose. Reframe the
extract rule to sample distinct phrasings and COALESCE one pattern per
phrasing; add a schema-linking rule that parses a missing join key out of the
prose; note a second phrasing as a cause in the parse-coverage check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Q2q8GTZBn98eg6zUjDxvR
@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ktx-docs-site Ready Ready Preview, Comment Jul 12, 2026 11:42am

Request Review

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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