feat(analytics-skill): extract metrics from prose and sanity-check ranking 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
This commit is contained in:
Kevin Messiaen 2026-07-07 17:43:39 +07:00
parent 49a4ae6f5b
commit 61058d23f1
No known key found for this signature in database
GPG key ID: 19FF750A17315202
2 changed files with 4 additions and 0 deletions

View file

@ -48,6 +48,8 @@ describe('analytics SKILL.md SQL craft', () => {
'Parse text-encoded numerics before doing math on them', // detect text-encoded numbers (spec 12)
'Strip, scale, and cast in one early CTE', // parse/scale early (spec 12)
'Confirm the parse covered every value', // failure-detecting cast coverage (spec 12)
'Extract the number from prose before parsing it', // lift the numeric token out of a narrative column first (spec 07)
'must pass the parse-coverage check before you answer', // parsed-from-text ranking re-checks parse coverage (spec 07)
'Answer every requested output', // multi-part/multi-output umbrella over identity+inputs (spec 14)
'Final completeness check', // re-read the question, confirm the projection covers all four facets (spec 14)
"Don't over-project", // match the request exactly, no padding columns (spec 14)