chant dev check-lexicon
Synopsis
Section titled “Synopsis”chant dev check-lexicon <dir> [--format json]Description
Section titled “Description”chant dev check-lexicon evaluates a lexicon directory against three tiers of completeness checks:
- Tier 1 (Required) — Must all pass. Exit code 1 on failure.
- Tier 2 (Recommended) — Warnings for missing features.
- Tier 3 (Thoroughness) — Informational, tracks depth of coverage.
Most checks are filesystem checks — file presence, directory contents, simple content inspection. Two tier-1 checks (chant #1067) go further and actually run something:
- Every shipped example builds discovers and serializes each
examples/*/src/directory (the same discover-and-serialize pipelinechant buildruns) and fails if any produces a structural error or no output. It does not additionally require the output to pass post-synth/lint checks — that’s a separate, already-gated contract with its own severity model. - Registered intrinsics are exported / …
isTagmatches how they’re authored / …foldsAsCallopt-in is only on plain calls parsesrc/plugin.ts’sintrinsics()registrations andsrc/index.ts’s export surface (no execution — static AST analysis) to verify every registered intrinsic actually exists, that itsisTagclaim matches whether it’s really authored as a tagged template, and that afoldsAsCall: trueopt-in is not declared on a tagged template, which has no plain-call form to opt in.
This command runs for real: just check-lexicons (which also runs each lexicon’s own tsconfig.build.json build first) and CI’s “Lexicon completeness contract” step, both gated against a small, explicit, issue-linked allowlist of currently-known gaps (see scripts/check-lexicons.ts) rather than silently skipped.
Options
Section titled “Options”| Flag | Description |
|---|---|
--format json | Output CheckResult as JSON instead of a colored table |
Example
Section titled “Example”# Check the AWS lexiconchant dev check-lexicon lexicons/aws
# Check with JSON output (for CI)chant dev check-lexicon lexicons/aws --format json
# Check current directorychant dev check-lexicon .Exit code
Section titled “Exit code”0— All tier-1 checks pass1— One or more tier-1 checks fail
See also
Section titled “See also”- Completeness Checklist — full tier reference
chant init lexicon— scaffold a new lexiconchant dev onboard— wire into CI