Skip to content

Put one canonical exemplar into each surface's generation path (closes #834) - #835

Merged
atomchung merged 1 commit into
mainfrom
claude/issue-834-exemplars-in-path
Aug 22, 2026
Merged

Put one canonical exemplar into each surface's generation path (closes #834)#835
atomchung merged 1 commit into
mainfrom
claude/issue-834-exemplars-in-path

Conversation

@atomchung

Copy link
Copy Markdown
Owner

What this closes

#832's post-merge rerun (receipts on PR #833) bent the length curve for the first
time in three of four frozen scenes, and regressed the fourth — the no-book
freeform one, the surface with the emptiest guidance and no engine payload
anchoring the answer. The diagnosis in that report: the canonical exemplars were
wired into QC (tests/agent/expression-witnesses.json) but never into the
generation path, and an example only steers output when the model sees it while
writing. This puts one there, per surface.

Placement only#832's stop condition holds. No new rule, no registry ID, no
length cap, no obligation.

The four exemplars

Each conversational surface's reference file now opens with its own copy,
which is where progressive disclosure loads it: when that surface is in play.

Surface Reference file Scene Why this one
consider references/trade-consequence.md consider_three_way_comparison #830 acceptance template 1, owner-approved; the only witness that exercises a multi-candidate stance, a counter-side that exists only as the overturning line, and a full caliber end block. WDGT/GRDC/FABR.
no-book references/decision-framing.md no_book_single_name #830 acceptance template 3, owner-approved; every book-derived claim refused and a stance still landed. This is the shape the regressed live scene was answering in. WDGT.
freeform references/freeform-answers.md freeform_positions_view The structural derivation stays empty (rule 4 is unchanged), so the exemplar is the whole of what this file shows: it is the only freeform witness that exercises all four floors, including the bottom floor as a single offer rather than a section. GRDC.
weekly references/weekly-market-read.md weekly_read_connection The fullest weekly witness: the one engine↔book connection leads, the bound on what the alert claims follows, the next-week check closes. No issuer named.

Every issuer is fictional and nothing is derived from a user record — the corpus
already guaranteed that and the copies are verbatim.

Single source, mechanically

  • Marker format: a fenced block whose info string is exemplar <scene_id>.
    One line, no counting, no heading walk — and the id travels with the text
    instead of sitting in a table beside it.
  • Sync test: tests/test_expression_contract.py::test_every_surface_reference_opens_with_its_canonical_exemplar
    normalizes both copies (per-line rstrip + strip) and fails closed on drift, so
    editing either side alone reddens.
  • The pairing is never hand-listed. Which reference file owns a surface is
    read from the corpus's own surfaces map; which scene a file carries is read
    from that file's own fence. The test compares two declarations that already
    existed rather than adding a third to keep in step.
  • Mutation proofs: test_exemplar_drift_is_caught (a one-character edit must
    redden; an untagged fence must stop being read as an exemplar) and
    test_no_other_document_carries_an_exemplar_block (the fence cannot spread to
    a fifth file).

The one interpretation I had to make

tests/test_doc_language.py::test_implementation_markdown_is_english_only covers
every .md under skills/fomo-kernel/, and three of the four exemplars are this
product speaking Traditional Chinese. Pasting them was a hard conflict with that
gate, and the issue's own wording (~300 zh chars, drawn from the existing
witnesses) rules out substituting English ones — there are no English witnesses
for the no-book and freeform surfaces.

Resolution: the gate now skips exactly the lines inside a tagged exemplar
fence in a surface reference, on the ground that quoted product output is not
documentation prose — the same distinction that already keeps copy/zh-TW.json
out of ENGLISH_IMPLEMENTATION_ASSETS. The exemption is bounded three ways at
once: by directory (references/ only), by fence tag, and by the byte-identity
the sync test proves. test_the_exemplar_carve_out_stays_narrow is its mutation
proof — the same Chinese line stays visible in another directory, in an untagged
fence, and in the prose on either side of the fence.

Always-loaded byte budget

File Before After
AGENTS.md 7,808 7,808
skills/fomo-kernel/SKILL.md 8,512 8,563
Pair total 16,320 / 16,384 16,371 / 16,384 (13 bytes free)

SKILL.md gained one clause in "Shape of the answer": "Each reference opens with
its exemplar; follow it."
— the pointer the issue allows if bytes allow. Nothing
else moved into the always-loaded layer.

Tests

Both offline groups, on python3.12, from a clean worktree off origin/main@6aabbcd:

python3 tests/run_all.py --group product   →  PASS: all 48 suites passed
python3 tests/run_all.py --group qa-eval   →  PASS: all 11 suites passed

The two suites this touches:

  • tests/test_expression_contract.py24/24 (21 before; +3: the sync test,
    the stray-fence gate, the drift mutation proof)
  • tests/test_doc_language.py36 (35 before; +1: the carve-out mutation
    proof)

Files changed

  • skills/fomo-kernel/references/trade-consequence.md, decision-framing.md,
    freeform-answers.md, weekly-market-read.md — each opens with a
    ## The exemplar section: three lines of what the exemplar demonstrates, the
    provenance line, and the verbatim block.
  • skills/fomo-kernel/SKILL.md — one clause pointing at them.
  • docs/expression-contract.md §3.5 — records that the corpus is no longer the
    only place the exemplars live, and that the two copies are one text.
  • docs/maintainer-guide.md — the [implementation·skill] Put one canonical exemplar into each surface's generation path — examples-first, closing #832's residual force #834 mirrored-surfaces row: exemplar ↔ witness
    sync ownership, the marker format, the English-only carve-out and its bounds.
  • tests/test_expression_contract.py — the sync test, the stray-fence gate, and
    the drift mutation proof.
  • tests/test_doc_language.py — the scoped English-only carve-out and its
    mutation proof.

Not in this PR

The live proof. Per the issue, the frozen four-scene rerun happens post-merge in
the private harness; the expectation on record is convergence toward exemplar
scale with the freeform regression reversed.

🤖 Generated with Claude Code

…#834)

The exemplars that state the accepted answer scale lived only in the QC
layer (`tests/agent/expression-witnesses.json`), so the model never met one
while generating. #832's post-merge rerun bent the length curve in three of
four frozen scenes and regressed the fourth -- the no-book freeform one,
the surface with the emptiest guidance and no engine payload anchoring the
answer. Prose norms alone do not bind scale; a worked example does.

Each conversational surface's reference file now opens with its own copy of
one canonical exemplar, where progressive disclosure loads it exactly when
that surface is in play:

  references/trade-consequence.md   consider_three_way_comparison
  references/decision-framing.md    no_book_single_name
  references/freeform-answers.md    freeform_positions_view
  references/weekly-market-read.md  weekly_read_connection

The corpus stays the source and the reference file is the copy. The marker
is one line -- a fence tagged `exemplar <scene_id>` -- and the sync test
reads the file<->surface pairing from the corpus's own `surfaces` map
rather than a third list, then compares the two copies normalized and fails
closed on drift. Three of the four exemplars are this product speaking
Traditional Chinese, so the English-only documentation gate exempts exactly
that fence, bounded by directory, by tag, and by the byte-identity the sync
test proves.

Placement only, per #832's stop condition: no new registry ID, no length
cap, no obligation. The always-loaded pair stays inside its budget at
16,371/16,384 bytes; SKILL.md gained one clause pointing at the exemplars.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@atomchung
atomchung merged commit 94d28d0 into main Aug 22, 2026
5 checks passed
@atomchung

Copy link
Copy Markdown
Owner Author

Post-merge live measurement (sanitized): every scene drops; the regression reverses; writes go perfect

Fourth frozen-scene rerun against merged main 94d28d0, same model and inputs as every prior round. First-answer zh chars across the four interventions (loosened → obligation-deletion → mother law → exemplars-in-path):

  • cash-deployment: 1,839 → 1,755 → 1,098 → 1,227 (conversation total 5,360 → 2,334)
  • no-book single name: 1,495 → 1,524 → 1,849 ⚠️959 — the surface that regressed under the mother law flipped hardest once its reference opened with an exemplar, exactly as diagnosed
  • discovery: 2,670 → 2,696 → 2,310 → 1,719
  • comparison+selection: 2,297 → 2,204 → 1,888 → 1,356; the recording confirmation runs ~345 chars — template scale

Writes this round: exploration produced zero canonical rows on all surfaces (the discovery scene explicitly told the user its six trials left no record), and the selection scene produced exactly one row for the user-selected candidate. No process-narration openers observed.

Mechanism now demonstrated end-to-end across four rounds: prose rules alone < obligation deletion < positive shape norm < shape norm + a visible exemplar — only layers that reach the generation path move the needle, which is the documented examples-first guidance. Remaining scale (full analyses at ~1.0–1.7k zh chars ≈ 2–3 phone screens) is information-dense rather than obligation discharge; per #832's stop condition no further rules are added — whether to compress further is an owner judgment from real usage.

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.

1 participant