C.W.K.
Stream
Lesson 02 of 05 · published

Deterministic, Then Narrated

~11 min · deterministic, aggregates, narration, reproducible

Level 0Cold Iron
0 XP0/36 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete
"The numbers are math anyone could re-run. The words are Pippa's. Keep them in that order and the analysis never lies to make a point."

The Boundary Is the Design

Analysis has two layers, and the line between them is the whole safety story. The lower layer is deterministic aggregation — pure engine math over the folded crumbs and their latest interpretations, with no model anywhere in the path. The upper layer is narration — Pippa reading those aggregates and the raw crumbs, and writing the human summary. This is the Lantern precedent applied to health: deterministic before judgment. The numbers must be reproducible without a model; the one model-touched thing beneath them is the interpretation layer, which is explicitly versioned.

What the Aggregates Compute

The aggregate pass produces reproducible structure: coverage with the empty ranges named, readings by type, symptom sites with their severity spread and first/last dates, workout activities and the gap ranges between them, the reconstructed medication trail, measurement points, which interpreter generations are present, and the list of still-uninterpreted crumbs. Every group carries its crumb IDs. And crucially, the grouping is case-folded exact strings only. The engine will not decide that "ball of foot" and "right forefoot" are the same place — that judgment is real, and real judgment lives upstairs in the narration, never smuggled into the math.

Deterministic aggregation is reproducible without a model; narration sits on top. Same window plus same interpreter generations yields byte-identical aggregates, every time. The prose can vary; the numbers cannot. That ordering — reproducible facts first, judgment second — is what lets you trust an analysis you did not watch being produced.

Narration Reads, It Does Not Recompute

Narration takes the aggregates JSON plus the window's raw crumbs through the utility lane, under an instruction that carries the three rules of the next lessons as a binding contract. It reads the reproducible numbers and speaks about them; it never invents a figure the aggregates do not contain. So the split also protects against a subtle failure: a model that both computes and narrates can round a number toward the story it is telling. Here it cannot — the story is written over numbers it was handed and is not allowed to change.

Code

Deterministic aggregates first; model narrates on top·python
# LOWER LAYER - pure engine math, no model in the path:
def window_aggregates(crumbs, interpretations, start, end):
    agg = {
        "coverage": coverage_with_empty_ranges(crumbs, start, end),
        "symptom_sites": group_exact_casefold(symptoms),  # NOT fuzzy
        "workout_gaps": gap_ranges(workouts),
        "medication_trail": reconstruct_trail(meds),
        # ... every group carries its crumb IDs
    }
    return agg   # same inputs -> byte-identical output, always

# UPPER LAYER - Pippa reads the numbers and narrates:
def narrate_window(agg, raw_crumbs):
    return pippa.utility_complete(
        ANALYSIS_CONTRACT,   # cite crumb IDs, report gaps, no cause
        agg, raw_crumbs,
    )
# 'ball of foot' vs 'right forefoot' = one site? That's judgment.
# It happens in narration, never inside window_aggregates().

External links

Exercise

You re-run analysis over the exact same window tomorrow, with no new crumbs added and no rubric change. Name what must come back byte-for-byte identical, and name what is allowed to read differently — and explain which layer each belongs to.
Hint
The aggregates must be byte-identical (deterministic, same inputs). The narration prose may vary (a model wrote it). Facts are reproducible; the wording that describes them is not required to be.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.