Reference · Style ledger

Style ledger — format, accumulation, and routing

Load when the ledger itself — its format, how deltas accumulate into rules, the promotion threshold, and how to route a promoted rule to the template vs the generator.

Part of the Style Extractor skill · loaded on demand from SKILL.md

The ledger is the artifact that improves over time. The extractor's SKILL.md is stable; the ledger grows as you feed it edits. The live copy lives at the skill root as STYLE_LEDGER.md — this page explains its shape.

What a rule looks like

Each rule records one style preference, its confidence, and where it should eventually be fixed. A workable Markdown shape:

### body size → 18pt
- property: run.size_pt
- from: 14.0
- to: 18.0
- status: always           # candidate | always | conflicting
- count: 3                 # distinct decks this delta appeared in
- first_seen: deck-2026-04-02
- last_seen: deck-2026-06-18
- routing: template-defect # template-defect | template-style | generator-rule
- note: body copy is consistently bumped; fix the master, don't paper over it

status, count, and routing are the fields that drive action. Everything else is provenance.

How deltas accumulate

For each delta the differ emits, compare against existing rules:

SituationAction
Same property and same to as an existing ruleincrement count, update last_seen
New property/to pairadd as candidate, count: 1
Same property, different to than an existing rulemark both conflicting; record both values; never overwrite

A conflict is signal, not noise: it means the preference is context-dependent (e.g. body size differs between section dividers and content slides), so it should not be promoted to a blanket rule.

The promotion threshold

A candidate becomes always once its count >= 3 distinct decks. Only always rules are acted on. Three independent recurrences is the bar that separates a genuine standing preference from a one-off correction on a single deck.

Routing a promoted rule

Promotion answers "is this real?"; routing answers "where does it get fixed?"

  • template-defect — a default that should simply be different (a size, colour, or font). Fix once in the .potx master/theme and rebuild layout_map.json. Do not encode it in the generator.
  • template-style — a structural treatment the template lacks (e.g. a distinct heading style). Add the style to the template, or make it a generator convention.
  • generator-rule — a judgement about layout selection (e.g. "dense comparison → 2 text"). A generator heuristic or a content-md convention.

The discipline: a correction you make every time is a defect at the source, not a learned preference. The ledger exists to make that obvious and push the fix upstream, so the loop converges instead of running forever.

Convergence history

Keep a short log of total deltas per iteration at the bottom of the ledger. Trending down means generation and the template are absorbing the corrections. A plateau on the same recurring delta is the cue to fix it at the source.