Audit rule reference

What each finding means—and what it does not.

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.

Evidence first Every finding points back to source. Intent wins A deliberate exception can be accepted. No silent repair Ledgermachine never edits the project.

01 / Tokens

Declared decisions versus direct values

These rules compare the token inventory with the values the source actually uses.

LM-TOKEN-001

Value matches a declared token

Flagged when A direct visual value resolves to exactly the same value as a declared token.

Decision guidance

Decide Use the token unless the direct value must remain independent from theme or system changes.

Open rule guide
LM-TOKEN-002

Value is close to a declared token

Flagged when A direct color is difficult to distinguish from a declared color token under the project’s color-distance setting.

Decision guidance

Decide Merge it into the token if the small difference carries no real semantic or accessibility role.

Open rule guide
LM-TOKEN-003

Several token names share one value

Flagged when Independent tokens in the same context and category resolve to one value without aliasing each other.

Decision guidance

Decide Keep separate semantic names when their roles may diverge; otherwise alias them to one canonical token.

Open rule guide

02 / Color

Palette distinctions people can actually see

Color rules normalize syntax and compare visual distance, opacity, frequency, and token ownership.

LM-COLOR-001

Colors may look indistinguishable

Flagged when A rare color sits very close to a more established color in perceptual color space.

Decision guidance

Decide Keep both only if the subtle distinction communicates a state, layer, brand role, or accessibility requirement.

Open rule guide
LM-COLOR-002

Color appears in one place

Flagged when An undeclared static color appears once and is not visually close to a declared palette token.

Decision guidance

Decide Name its specific role or fold it into the established palette. One-off artwork and data visualization colors are often valid exceptions.

Open rule guide

03 / Typography

A type system, not a pile of numbers

Typography rules compare declared scales, repeated roles, font support, and equivalent text-style signatures.

LM-TYPE-005

The same text style is declared two ways

Flagged when Several selectors produce the same text-style signature, but some use tokens while others repeat values directly.

Decision guidance

Decide Prefer one declaration path so later typography changes do not split the roles apart.

Open rule guide

04 / Spacing

A rhythm with room for real exceptions

Spacing rules compare numeric distance, frequency, units, and arbitrary utility syntax.

LM-SPACE-002

Spacing appears in one place

Flagged when A static undeclared spacing value appears in one layout declaration.

Decision guidance

Decide Confirm it as a local adjustment or replace it with the scale. Screen-reader-only geometry is excluded.

Open rule guide
LM-SPACE-004

A utility uses a custom spacing value

Flagged when An arbitrary utility introduces spacing outside the named utility scale.

Decision guidance

Decide Use the nearest named utility when the difference is incidental; retain exact values for real geometry constraints.

Open rule guide

05 / Shape

Edges and controls that speak the same language

Shape rules compare radii, border widths, and control-specific conventions.

06 / Effects

Depth, precedence, and layer intent

Effects rules compare shadow purpose, stacking scales, and forced cascade precedence.

LM-EFFECT-002

A layer value sits far from the others

Flagged when A rare z-index is separated from the project’s other observed levels by a large gap.

Decision guidance

Decide Name the overlay role and align it with the stacking scale; third-party widgets may need an explicit exception.

Open rule guide
LM-EFFECT-003

Styles rely on !important

Flagged when A declaration forces precedence with !important.

Decision guidance

Decide Confirm whether layers, specificity, or source order can express the intent. Utility and accessibility overrides can be legitimate.

Open rule guide

07 / Responsive

Thresholds that correspond to actual layout changes

Responsive rules look at media queries, container queries, named scales, and context-only values.

LM-BREAKPOINT-001

Two responsive thresholds are very close

Flagged when Two media-query widths sit close enough that they may describe the same transition.

Decision guidance

Decide Merge them when the layout change is shared; keep both when distinct breakpoints prevent a real failure.

Open rule guide

08 / Cascade

Ownership across cascade layers

These rules surface results that may be correct in the browser but surprising in the source.

09 / Components

One owner for each shared role

Component rules use source structure and visual signatures; they do not execute imported components.

LM-COMPONENT-001

More than one component may own the same role

Flagged when Several definitions share a component name or a page-local implementation overlaps a shared component role.

Decision guidance

Decide Reuse the shared owner when the behavior is the same; preserve separate domain components when their responsibilities differ.

Open rule guide

10 / History

Change relative to an explicit baseline

History rules only appear when the ledger has enough prior evidence to make the comparison honestly.

LM-DRIFT-001

Value was added after the baseline

Flagged when A normalized visual value is present now but absent from the pinned baseline scan.

Decision guidance

Decide Confirm the new vocabulary as intentional or return the source to an established value.

Open rule guide
LM-DRIFT-002

A repaired issue has returned

Flagged when A finding previously verified as repaired appears again in a later scan.

Decision guidance

Decide Restore the repair, or record that the product decision changed. Regression status is ledger evidence, not guesswork.

Open rule guide

The reference is not the verdict

Inspect the evidence in your own source.

A rule explains why something deserves attention. The project ledger is where you decide whether to repair, plan, accept, or ignore it.

Open Ledgermachine