Skip to content

chant dev check-lexicon

llms.txt lists every page for an agent
chant dev check-lexicon <dir> [--format json]

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 look at the filesystem (file presence, directory contents, simple content inspection). Two tier-1 checks (chant #1067) run something:

  • Every shipped example builds discovers and serializes each examples/*/src/ directory (the same discover-and-serialize pipeline chant build runs) and fails if any produces a structural error or no output. It does not require the output to pass post-synth/lint checks, which are gated separately with their own severity model.
  • Registered intrinsics are exported / … isTag matches how they’re authored / … foldsAsCall opt-in is only on plain calls parse src/plugin.ts’s intrinsics() registrations and src/index.ts’s export surface (static AST analysis, nothing executed) to verify every registered intrinsic exists, that its isTag claim matches whether it is authored as a tagged template, and that a foldsAsCall: true opt-in is not declared on a tagged template, which has no plain-call form to opt in.

just check-lexicons (which also runs each lexicon’s own tsconfig.build.json build first) and CI’s “Lexicon completeness contract” step both run this command. Each is gated against an allowlist of known gaps, each gap linked to an issue (see scripts/check-lexicons.ts).

FlagDescription
--format jsonOutput CheckResult as JSON instead of a colored table
Terminal window
# Check the AWS lexicon
chant dev check-lexicon lexicons/aws
# Check with JSON output (for CI)
chant dev check-lexicon lexicons/aws --format json
# Check current directory
chant dev check-lexicon .
  • 0 — All tier-1 checks pass
  • 1 — One or more tier-1 checks fail

chant