74aa75945e
PHASE 0 — contentEngine makes Truth Law structural, not careful. Copy is
token-substituted and an unbacked {token} REFUSES to render -- there is no
code path that produces a plausible default. The fact contract is asserted
before any string is built. Card and copy render from ONE fact object, so
a caption and a card cannot disagree. No live model writes factual claims:
the voice is in the template, the facts are pulled, and the voice-polish
port is deliberately unwired, because an LLM that can rewrite a sentence
can rewrite a number.
18 tests carry the proof. The one that matters most: ZERO IS PRESENT.
"0 cleared B+" is our most honest possible post, and treating 0 as missing
would be the Number(null)===0 breach wearing its opposite coat -- it would
silently delete exactly the post the brand is built on.
PHASE 1 — three templates, generating real posts from tonight's data:
hot hitters off the repaired full-season log, the honesty flex off the
real servedGrade distribution (2,140 graded / 70 cleared B+ / 42% not
separable / A unissuable), and streaks verified from settled outcomes only.
THE ENGINE CAUGHT A BUG IN ITSELF, and it is the sharpest lesson here. The
first run published "No hitter is meaningfully hot tonight -- we could
dress up a middling week as a streak. We don't." That was FALSE: the
box-score cache spans only the settled window, every player had under 20
games, and the pool was empty. A broken pull was publishing as considered
editorial judgement -- the fourth appearance of this class tonight and the
first where our OWN HONESTY COPY was the disguise.
Fixed structurally rather than by patching the number: an absent() variant
may now DECLINE to speak, and the template separates "no candidates at
all" (SKIP with a reason) from "candidates judged, none hot" (honest
absence). Both locked by test. Source corrected to mlbStatsAdapter.fullLog,
the same log the repaired champion reads.
PHASE 2 — cardRenderer emits SVG rather than canvas: it is text, so it
diffs in review and its numbers are greppable, which matters when the
whole claim is that the numbers are real. VYND white + R green, slashed-Y,
scanlines, mono. The card never formats its own facts -- every string
arrives pre-rendered and gate-checked.
PHASE 3 — scripts/generate-content.js writes copy + card per template to
.content-out/<date>/. Template N+1 is a registry entry: requires, pull,
copy, card, absent. Queued as stubs, not built: hot takes, daily reads,
"grades we DIDN'T give", cross-sport streak variants (the streak template
is already sport-agnostic -- settled outcomes and a noun).
FULLY ISOLATED: read-only on every source, zero writes to serving, model
or ledger tables. Serving fingerprint verified unchanged. The accrual clock
is untouched at 0 eligible dates.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W1sivYNqY2TS5ftykmHBU9
74 lines
3.0 KiB
JavaScript
74 lines
3.0 KiB
JavaScript
'use strict';
|
|
|
|
/**
|
|
* TEMPLATE 2 — THE HONESTY FLEX.
|
|
*
|
|
* The differentiator, and the one that would be worthless if it were padded.
|
|
* It publishes the REAL grade distribution: how many props were graded, how few
|
|
* cleared the ceiling, and the fact that A is unissuable because no band of this
|
|
* model has ever earned one.
|
|
*
|
|
* Every competitor's card is all A's. Ours says most of tonight is a base-rate
|
|
* read — and that claim is only impressive if it is exactly true, so the numbers
|
|
* come from servedGrade's own bands rather than from a marketing sentence.
|
|
*/
|
|
|
|
const { knownNumber } = require('../../../utils/known');
|
|
|
|
module.exports = {
|
|
id: 'honesty_flex',
|
|
sport: 'mlb',
|
|
label: 'The Honesty Flex',
|
|
requires: ['graded', 'ceiling_letter', 'ceiling_realized', 'base_rate', 'date'],
|
|
|
|
async pull(deps) {
|
|
const g = await deps.gradeDistribution(); // injected, read-only
|
|
const sg = deps.servedGrade || require('../../model/servedGrade');
|
|
const total = knownNumber(g && g.total);
|
|
const top = (g && g.by_letter && (g.by_letter['B+'] || 0)) || 0;
|
|
const flat = (g && g.not_separable) || 0;
|
|
const ceiling = sg.BANDS[0];
|
|
return {
|
|
date: deps.date,
|
|
graded: total,
|
|
top_count: top,
|
|
top_pct: total ? Math.round((top / total) * 100) : null,
|
|
flat_count: flat,
|
|
flat_pct: total ? Math.round((flat / total) * 100) : null,
|
|
ceiling_letter: ceiling.letter,
|
|
ceiling_realized: Math.round(ceiling.realized * 100),
|
|
base_rate: Math.round(sg.BASE_RATE * 100),
|
|
unissuable: sg.UNISSUABLE.join(', '),
|
|
};
|
|
},
|
|
|
|
copy: () => `WE GRADED {graded} PROPS TONIGHT. {top_count} CLEARED {ceiling_letter}.
|
|
|
|
That's {top_pct}%. The other {flat_pct}% we can't separate from the baseline, and we say so on the card instead of calling them leans.
|
|
|
|
Our ceiling is {ceiling_letter} — those reads land about {ceiling_realized}% against a {base_rate}% baseline. We do not issue {unissuable}. No band of this model has ever hit at a rate that would justify one.
|
|
|
|
Everybody else's card is all A's. Ask them what their A actually hits.`,
|
|
|
|
card: () => ({
|
|
kind: 'flex',
|
|
title: 'TONIGHT, HONESTLY',
|
|
subtitle: '{date}',
|
|
lines: [
|
|
{ text: '{graded} graded', style: 'lead' },
|
|
{ text: '{top_count} cleared {ceiling_letter} — {top_pct}%', style: 'stat' },
|
|
{ text: '{flat_pct}% we cannot separate from baseline', style: 'dim' },
|
|
{ text: '', style: 'rule' },
|
|
{ text: 'Ceiling: {ceiling_letter} · lands {ceiling_realized}%', style: 'body' },
|
|
{ text: 'Baseline: {base_rate}%', style: 'body' },
|
|
{ text: 'We do not issue {unissuable}.', style: 'body' },
|
|
],
|
|
footer: 'Grades are earned from realized outcomes, not issued on confidence.',
|
|
}),
|
|
|
|
absent: () => ({
|
|
copy: 'No slate graded tonight. Nothing to show, so nothing shown.',
|
|
card: { kind: 'absence', title: 'NO SLATE TONIGHT', subtitle: 'NOTHING TO PAD', lines: [{ text: 'No props graded. An empty board is an honest board.', style: 'body' }], footer: 'We post the count even when the count is zero.' },
|
|
}),
|
|
};
|