Skip to content

Lexicons

A lexicon is a collection of types and semantic lint rules for an operational area. The core system is lexicon-agnostic — it discovers files, collects exports, resolves dependencies, and runs semantic lint rules. Each lexicon plugs into this pipeline with its own types and rules.

LexiconPackageResourcesReference
AWS CloudFormation@intentius/chant-lexicon-aws1500+Reference
Azure ARM@intentius/chant-lexicon-azure200+Reference
GCP Config Connector@intentius/chant-lexicon-gcp150+Reference
Kubernetes@intentius/chant-lexicon-k8s50+ resources, 35+ propertiesReference
Helm@intentius/chant-lexicon-helm10+ resourcesReference
GitLab CI/CD@intentius/chant-lexicon-gitlab3 resources, 16 propertiesReference
Flyway@intentius/chant-lexicon-flyway5 resources, 20 propertiesReference

TypeScript definition files that describe available resource classes, their properties, and intrinsic functions. These types power editor autocompletion, inline documentation, and compile-time checks.

Lint rules specific to the target ecosystem. These integrate with chant lint to catch provider-specific mistakes like invalid resource configurations or naming convention violations.

Each lexicon implements the Serializer interface to convert evaluated resources into the target platform’s output format.

interface Serializer {
name: string;
rulePrefix: string;
serialize(entities: Map<string, Declarable>, outputs?: LexiconOutput[]): string | SerializerResult;
}

A bundle is the distributable form of a lexicon — a dist/ directory containing everything chant needs at build time:

ArtifactDescription
manifest.jsonLexicon metadata (name, version, intrinsics, pseudo-parameters)
meta.jsonResource registry mapping type names to definitions
types/index.d.tsTypeScript declarations for all resource and property types
integrity.jsonPer-artifact xxhash64 checksums
rules/Lint rule implementations
skills/AI assistant skill definitions

When you install a lexicon package (e.g. @intentius/chant-lexicon-aws), the bundle is what ships inside it. Lexicon authors produce bundles with chant dev publish.

chant is provider-agnostic by design. The core handles parsing, module resolution, evaluation, and serialization — but knows nothing about specific infrastructure platforms.

Lexicons bridge this gap:

  • The core stays lean — no bundled provider SDKs or type catalogs
  • Providers update independently — new resource types ship as lexicon updates
  • Custom targets are first-class — organizations can author internal lexicons
  • Projects declare exactly what they need — explicit, reproducible dependencies