Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Validation Feature Flags — Future Design

Status: Draft Last updated: 2026-05-01 09:47 EDT

Current State

chatter validate runs a fixed set of validation rules. The only customization is --suppress E### which suppresses specific error codes from the output (they still run, just hidden).

chatter clan check accepts CLAN-compatible flags:

  • --bullets N / +cN — bullet consistency mode (0=full, 1=missing only)
  • --check-target / +g2 — require CHI Target_Child
  • --check-unused / +g5 — flag unused speakers
  • --check-ud / +u — validate UD features on %mor
  • --check-id / +g4 — require @ID tiers (on by default)

Problem

CLAN CHECK allows users to enable/disable specific validation categories. chatter validate does not. This creates two issues:

  1. Users can’t opt in to stricter checks (bullet consistency, CHI requirement, unused speakers) without switching to chatter clan check.

  2. Users can’t opt out of noisy checks without knowing the specific error code to suppress.

Proposed: --enable and --disable Flags

# Enable stricter checks (off by default)
chatter validate --enable bullets        # CHECK +c0 equivalent
chatter validate --enable target-child   # CHECK +g2 equivalent
chatter validate --enable unused-speakers # CHECK +g5 equivalent
chatter validate --enable ud-features    # CHECK +u equivalent

# Disable always-on checks
chatter validate --disable cross-speaker-overlap  # suppress E729
chatter validate --disable bullet-timing          # suppress E701/E704/E729

# Combine
chatter validate --enable bullets --disable cross-speaker-overlap corpus/

Validation Categories

CategoryDefaultErrorsCHECK Flag
structureONE5xx (headers, @Begin/@End)always
contentONE2xx, E3xx (words, terminators)always
tiersONE6xx (dependent tier validation)always
alignmentONE7xx (mor/gra/pho alignment)always
bullet-timingONE701, E704, E729always
bulletsOFFE730, E732 (gap, missing)+c0/+c1
target-childOFFCHECK 68+g2
unused-speakersOFFCHECK 0+g5
ud-featuresOFFUD validation+u

vs --suppress

--suppress hides specific error codes from output. --disable prevents the validation from running at all.

For most users, the difference doesn’t matter. But for large corpus runs, skipping expensive checks (alignment, bullet-timing) saves time.

--suppress is the current workaround. --enable/--disable is the principled long-term solution.

Implementation Notes

The validation pipeline already has ValidationContext with flags like bullets_mode, ca_mode, enable_quotation_validation. Adding more flags is mechanical — the architecture supports it.

The work is:

  1. Add flags to ValidationContext / SharedValidationConfig
  2. Wire CLI --enable/--disable to the config
  3. Gate each validation category on its config flag
  4. Document which categories exist and what they control

CLAN CHECK Behaviors We Deliberately Don’t Implement

CHECKBehaviorWhy Not
81Bullet positionGrammar enforces structurally
89Wrong chars in bulletGrammar validates format
90Illegal time in bulletGrammar validates format
118Delimiter before bulletGrammar enforces order
11Symbol not in depfileWe don’t use depfile.cut (yet)
17Tier not in depfileSame
147Form marker not in depfileSame

These either can’t occur due to our grammar being stricter than CLAN’s parser, or require depfile.cut integration which is a separate project.

CLAN CHECK Behaviors We Haven’t Implemented Yet

CHECKBehaviorStatus
84Cross-speaker overlapDONE (E729)
85Gap between tiersE730 defined, not implemented
110Missing bullet (+c mode)E732 defined, not implemented
133Speaker self-overlap (timing)DONE (E704 + E731)
13Duplicate speaker declarationNot implemented
122@ID lang not in @LanguagesNot implemented
142Role mismatch @ID vs @ParticipantsNot implemented
153Age format (missing zero pad)Not implemented
157Media filename matchPartially implemented (E531)