Skip to content

Completeness Checklist

The chant dev check-lexicon command evaluates a lexicon directory against three tiers of completeness. Run it from anywhere:

Terminal window
chant dev check-lexicon lexicons/my-lexicon

Pass --format json for machine-readable output.

These must all pass for the command to exit 0. CI should gate on this.

CheckWhat it verifies
src/plugin.ts existsPlugin entry point
src/serializer.ts existsBuild output serializer
At least 1 lint rulesrc/lint/rules/*.ts (not index.ts)
At least 1 post-synth checksrc/lint/post-synth/*.ts (not index.ts/helpers.ts)
src/lsp/completions.ts existsLSP completion provider
src/lsp/hover.ts existsLSP hover provider
dist/manifest.json existsLexicon bundle was built
At least 1 exampleNon-empty subdirectory in examples/
plugin.test.ts existsPlugin unit test
serializer.test.ts existsSerializer unit test
At least 1 .mdx doc pageDocumentation exists

Warnings — these make the lexicon useful in practice.

CheckWhat it verifies
Uncommented mcpToolsMCP tool contributions active
Uncommented mcpResourcesMCP resource contributions active
Uncommented skillsAI skills active
Uncommented detectTemplateTemplate detection active
Uncommented initTemplatesInit templates active
At least 1 compositesrc/composites/*.ts (not index.ts)
At least 3 examplesBroader usage coverage
completions.test.ts existsLSP completions tested
hover.test.ts existsLSP hover tested
default-labels.test.ts existsDefault labels/annotations tested
coverage.test.ts existsCoverage analysis tested
coverage.ts implementedNo “not yet implemented” placeholder
At least 8 doc pagesComprehensive documentation — recommended topics: overview, getting-started, resources, intrinsics, pseudo-parameters, composites, lint-rules, importing
At least 15 post-synth checksCovering security, correctness, and best practices (see Post-Synth Check Guide)
At least 3 skillsCore patterns, cloud/platform-specific, advanced patterns (see Skills Authoring Guide)
At least 3 initTemplatesDefault, domain-specific variant 1, domain-specific variant 2

Informational — tracks depth of testing and feature coverage.

CheckWhat it verifies
Each lint rule has a .test.tsPer-rule or consolidated test coverage (e.g. rules.test.ts)
Each post-synth has a .test.tsPer-check or consolidated test coverage (e.g. post-synth.test.ts)
import/parser.test.ts existsImport parser tested
import/generator.test.ts existsImport generator tested
import/roundtrip.test.ts existsImport round-trip tested
typecheck.test.ts existsType-level verification
roundtrip.test.ts existsSerialize/deserialize round-trip
At least 5 compositesRich composition library
src/actions/ with actionsAutomation actions
At least 5 examples with testsTested usage patterns (per-example or consolidated root test)
validate.ts checks at least 30 required namesDeep artifact validation covering resources, property types, and bundle files
Composite tests existcomposites.test.ts covering all composites (props, types, defaults, dependencies)

When designing post-synth checks, aim for coverage across these categories:

CategoryExamples
SecurityEncryption enabled, TLS version, HTTPS-only, access control, identity configuration
CorrectnessRequired fields present, valid values, correct dependencies
Best PracticesNaming conventions, tagging/labeling, resource configuration defaults
DeprecationOutdated API versions, legacy features, deprecated properties

See Testing Your Lexicon for patterns, mock helpers, and checklists for each test file.

Use the AWS lexicon as reference for full coverage:

lexicons/my-lexicon/
├── src/
│ ├── plugin.ts # LexiconPlugin entry point
│ ├── plugin.test.ts
│ ├── serializer.ts # Build output serializer
│ ├── serializer.test.ts
│ ├── index.ts # Re-exports
│ ├── coverage.ts # Coverage analysis
│ ├── validate.ts # Artifact validation
│ ├── validate-cli.ts
│ ├── codegen/
│ │ ├── generate.ts # Code generation pipeline
│ │ ├── generate-cli.ts
│ │ ├── naming.ts # Naming strategy
│ │ ├── package.ts # Bundle packaging
│ │ └── docs.ts # Docs generation
│ ├── spec/
│ │ ├── fetch.ts # Upstream schema fetching
│ │ └── parse.ts # Schema parsing
│ ├── lint/
│ │ ├── rules/ # Lint rules + tests
│ │ └── post-synth/ # Post-synthesis checks + tests
│ ├── lsp/
│ │ ├── completions.ts # LSP completions
│ │ ├── completions.test.ts
│ │ ├── hover.ts # LSP hover
│ │ └── hover.test.ts
│ ├── composites/ # Composite resources
│ ├── actions/ # Automation actions
│ ├── import/ # Template parser + generator
│ └── generated/ # Generated artifacts (do not edit)
├── dist/ # Built bundle
├── examples/ # Usage examples with tests
├── docs/ # Starlight docs site
├── package.json
├── tsconfig.json
└── justfile

After scaffolding with chant init lexicon:

  1. Implement src/spec/fetch.ts and src/spec/parse.ts
  2. Implement src/codegen/generate.ts and src/codegen/naming.ts
  3. Run just generate to produce types
  4. Implement src/serializer.ts
  5. Write lint rules in src/lint/rules/
  6. Add post-synth checks in src/lint/post-synth/
  7. Implement LSP completions and hover
  8. Build examples
  9. Generate docs
  • K8s — the most mature lexicon: 20 post-synth checks, 3 skills, 3 initTemplates, 33 required names, full docs site
  • Azure — comprehensive ARM template lexicon with 20 post-synth checks, 3 skills, and 11 doc pages
  • AWS — full coverage across all tiers, including per-rule tests and composites
  • Flyway — good example of per-rule testing patterns with test helpers