LM-TOKEN-001Value matches a declared token
Flagged when A direct visual value resolves to exactly the same value as a declared token.
Decide Use the token unless the direct value must remain independent from theme or system changes.
LEDGERMACHINE
Audit rule reference
Ledgermachine findings are prompts for a product decision, not automatic errors. This reference explains what each rule notices, why it can matter, and when keeping the difference is the correct answer.
01 / Tokens
These rules compare the token inventory with the values the source actually uses.
LM-TOKEN-001Flagged when A direct visual value resolves to exactly the same value as a declared token.
Decide Use the token unless the direct value must remain independent from theme or system changes.
LM-TOKEN-002Flagged when A direct color is difficult to distinguish from a declared color token under the project’s color-distance setting.
Decide Merge it into the token if the small difference carries no real semantic or accessibility role.
LM-TOKEN-003Flagged when Independent tokens in the same context and category resolve to one value without aliasing each other.
Decide Keep separate semantic names when their roles may diverge; otherwise alias them to one canonical token.
02 / Color
Color rules normalize syntax and compare visual distance, opacity, frequency, and token ownership.
LM-COLOR-001Flagged when A rare color sits very close to a more established color in perceptual color space.
Decide Keep both only if the subtle distinction communicates a state, layer, brand role, or accessibility requirement.
LM-COLOR-002Flagged when An undeclared static color appears once and is not visually close to a declared palette token.
Decide Name its specific role or fold it into the established palette. One-off artwork and data visualization colors are often valid exceptions.
LM-COLOR-003Flagged when One base color uses multiple alpha levels within a narrow visual range.
Decide Consolidate levels that do the same job; preserve levels that express distinct states or depth.
LM-COLOR-004Flagged when Different CSS notations normalize to the same color.
Decide Standardize the notation when it improves search and maintenance. Keep authored formats when a tool or color space requires them.
03 / Typography
Typography rules compare declared scales, repeated roles, font support, and equivalent text-style signatures.
LM-TYPE-001Flagged when A rare font size sits close to an established or declared step.
Decide Align it when the text serves an existing role; keep it when the content hierarchy genuinely needs another step.
LM-TYPE-002Flagged when A rare line height is close to a repeated or declared line-height value.
Decide Reuse the role’s line height unless content density, language, or typeface metrics justify the difference.
LM-TYPE-003Flagged when A weight is near a common 100-step value and may not be supported as authored.
Decide Verify the loaded font’s axes. Variable fonts may make an in-between weight entirely intentional.
LM-TYPE-004Flagged when A font family is used much less often than the project’s dominant stack.
Decide Keep purposeful code, data, editorial, or display faces; remove accidental local stacks.
LM-TYPE-005Flagged when Several selectors produce the same text-style signature, but some use tokens while others repeat values directly.
Decide Prefer one declaration path so later typography changes do not split the roles apart.
04 / Spacing
Spacing rules compare numeric distance, frequency, units, and arbitrary utility syntax.
LM-SPACE-001Flagged when A rare undeclared spacing value lands near a token or frequently repeated step.
Decide Snap it to the scale unless geometry, optical alignment, or an external asset requires the offset.
LM-SPACE-002Flagged when A static undeclared spacing value appears in one layout declaration.
Decide Confirm it as a local adjustment or replace it with the scale. Screen-reader-only geometry is excluded.
LM-SPACE-003Flagged when Values in different units normalize to the same pixel size.
Decide Keep relative units when they must scale with text or context; otherwise use one convention.
LM-SPACE-004Flagged when An arbitrary utility introduces spacing outside the named utility scale.
Decide Use the nearest named utility when the difference is incidental; retain exact values for real geometry constraints.
05 / Shape
Shape rules compare radii, border widths, and control-specific conventions.
LM-SHAPE-001Flagged when A rare radius is numerically close to a declared or repeated radius.
Decide Reuse the established shape unless the component’s role needs a visibly different silhouette.
LM-SHAPE-002Flagged when A rare border width is near an established step.
Decide Consolidate accidental differences; preserve widths that indicate focus, selection, or hierarchy.
LM-SHAPE-003Flagged when A button, field, toggle, or similar control differs from the control radius used most often.
Decide Keep the distinction only when it communicates a different control family or state.
06 / Effects
Effects rules compare shadow purpose, stacking scales, and forced cascade precedence.
LM-EFFECT-001Flagged when Two shadows have nearly identical geometry and color signatures.
Decide Reuse one recipe unless the difference creates a clearly distinct elevation or focus state.
LM-EFFECT-002Flagged when A rare z-index is separated from the project’s other observed levels by a large gap.
Decide Name the overlay role and align it with the stacking scale; third-party widgets may need an explicit exception.
LM-EFFECT-003Flagged when A declaration forces precedence with !important.
Decide Confirm whether layers, specificity, or source order can express the intent. Utility and accessibility overrides can be legitimate.
07 / Responsive
Responsive rules look at media queries, container queries, named scales, and context-only values.
LM-BREAKPOINT-001Flagged when Two media-query widths sit close enough that they may describe the same transition.
Decide Merge them when the layout change is shared; keep both when distinct breakpoints prevent a real failure.
LM-BREAKPOINT-002Flagged when A project with several breakpoints uses one threshold in a single rule.
Decide Confirm the unique transition or align it with the named responsive scale.
LM-BREAKPOINT-003Flagged when An arbitrary responsive utility uses a width outside the named breakpoint set.
Decide Prefer a named threshold when related layout changes should stay synchronized.
LM-CONTAINER-001Flagged when Container-query widths are within a narrow range.
Decide Merge them if the component changes in the same way; keep them when separate internal layouts truly need both.
LM-CONTAINER-002Flagged when An undeclared visual value is used exclusively inside container-query states.
Decide Promote it when it belongs to the wider system; keep it local when the component owns the decision.
08 / Cascade
These rules surface results that may be correct in the browser but surprising in the source.
LM-LAYER-001Flagged when The same selector and property receive different values in more than one named layer.
Decide Confirm which layer owns the final value and remove declarations that no longer have a distinct purpose.
LM-LAYER-002Flagged when An unlayered declaration competes with a matching declaration inside a cascade layer.
Decide Keep the override only when its higher precedence is explicit and intentional.
09 / Components
Component rules use source structure and visual signatures; they do not execute imported components.
LM-COMPONENT-001Flagged when Several definitions share a component name or a page-local implementation overlaps a shared component role.
Decide Reuse the shared owner when the behavior is the same; preserve separate domain components when their responsibilities differ.
LM-COMPONENT-002Flagged when A local component’s visual signature adds or removes values compared with the shared owner of that role.
Decide Bring it back to the shared component or record why this context needs a maintained variant.
10 / History
History rules only appear when the ledger has enough prior evidence to make the comparison honestly.
LM-DRIFT-001Flagged when A normalized visual value is present now but absent from the pinned baseline scan.
Decide Confirm the new vocabulary as intentional or return the source to an established value.
LM-DRIFT-002Flagged when A finding previously verified as repaired appears again in a later scan.
Decide Restore the repair, or record that the product decision changed. Regression status is ledger evidence, not guesswork.
LM-DRIFT-003Flagged when Static token coverage drops by at least five percentage points from the comparison scan.
Decide Inspect the new direct values and restore token use where the bypass was not deliberate.
The reference is not the verdict
A rule explains why something deserves attention. The project ledger is where you decide whether to repair, plan, accept, or ignore it.
Open Ledgermachine