Promote data-driven AI-tells + first-class severity into prose.mjs - #9
Merged
Conversation
Migrates the spike (issue #6) into production: - ai-tells.json (root, canonical) — AI-tell patterns + lexicon as data, each rule carrying its own severity level. Promoted from spikes/; seeded from the vale-signs-of-ai-writing corpus. aiIsms() loads it; the structural tells (em-dash count, anaphora, tricolons) stay in code. - prose.mjs — every check now returns { level, msg } (error | warn | suggestion) instead of bare strings, so severity is first-class. - audit.mjs — derives the render glyph from level (and classifies the still- string, cached type-audit findings into the same model) instead of regex-matching message text for tiering. Output is unchanged. - spikes/ — vale-rules.mjs now reads the promoted root ai-tells.json (single source of truth, can't drift); spikes/ai-tells.json removed; README notes the promotion. The optional vale-provider.mjs spike stays (proposal 2). - test.mjs — assert on finding.msg; add coverage for the { level, msg } contract and an error-level data rule. - README — document the data-driven rules file and first-class severity. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011GNDVjvsbTPsbWV9fEyjLt
bdelanghe
marked this pull request as ready for review
June 23, 2026 03:00
bdelanghe
added a commit
that referenced
this pull request
Jun 23, 2026
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.
Promotes the spike from #8 into production, closing proposals 1 & 3 of #6. Behavior-preserving — the deterministic audit output is byte-identical; the change is structural.
What changed
ai-tells.json(root, canonical) — AI-tell patterns + lexicon as data, each rule carrying its ownlevel. Promoted fromspikes/; seeded from thevale-signs-of-ai-writingcorpus.aiIsms()loads it; the structural tells that aren't simple regex (em-dash count, anaphora, tricolons) stay in code.prose.mjs— every check now returns{ level, msg }(error|warn|suggestion) instead of bare strings, so severity is first-class rather than re-derived downstream.audit.mjs— renders the glyph fromlevel(and folds the still-string, cached type-audit findings into the same model via a small classifier) instead of regex-matching message text for tiering.spikes/—vale-rules.mjsnow reads the promoted rootai-tells.json(single source of truth — the spike can't drift from production);spikes/ai-tells.jsonremoved; spike README notes the promotion. The optionalvale-provider.mjsshell-out spike stays (proposal 2, still open).test.mjs— assert onfinding.msg; add coverage for the{ level, msg }contract and an error-level data rule (chatbot artifact).README.md— document the data-driven rules file and first-class severity.Why
Before: patterns/lexicon hard-coded in
prose.mjs, and tiers were pattern-matched from message text inaudit.mjs(/^(ai-ism:|proofread:)/etc.) — brittle and duplicated. Now the AI-tell rules are editable data that tracks the upstream corpus, and severity rides on each finding.Verification
node test.mjspasses. Stubbed fullnode audit.mjsproduces identical output tomain, now driven bylevel:New data rules (e.g. chatbot artifacts) now fire at
error:(Full
audit.mjsverified locally with stubs for the network-blocked JSR deps; CI has JSR access.)Closes #6 proposals 1 & 3 (proposal 2 — the
valeshell-out — remains an opt-in spike).🤖 Generated with Claude Code
Generated by Claude Code