Engine
Command line
tropelang is the command-line front-end over the core — the analysis and planning
capabilities plus the corpus and round-trip tools. Prebuilt binaries ship on
tropelang-standard
releases; the binary is proprietary and closed-source (see the overview).
tropelang <verb> --help prints a verb's full flags, output shape, and exit codes.
Analysis & CI
- validate <file> [--corpus …] [--strict] [--json]
- Parse + structural validation; with
--corpus, also a vocabulary lint.--strictexits 1 on any warning. - eval <file…> [--why] [--no-imports]
- Evaluation — the firings from the file and its
imported modules (not the corpus). - drams <story…>
- Exact coverage — density over coverage with the uncovered-facts gap.
- fidelity <file>
- Log round-trip check for one file (parse → serialize is lossless and idempotent).
- gate <file>
- Composite acceptance gate: preamble · validate · round-trip · DRY · drams.
- selfcheck <corpus.toml> [--expect-tropes N] [--min-confirmed R]
- Full-corpus count and self-recognition; gates when a threshold is given.
- report <file> [--corpus …] [--json]
- Inline-tag DRY report;
--corpusloads vocabulary to flag unfounded tags. - metrics <source…> [--json]
- Evaluate the corpus's
metricreductions over trope headers.
Recognition
- suggest <file> [--corpus …] [--strike <stem>…]
- The ranked, tiered recognition ladder for a buffer against the corpus.
- shape <file> [--why] [--corpus …] [--emit <fields>] [--format json|tsv]
- Per-hit recognition with coverage.
--emitsurfaces header metadata and derived fields (implies/attrs);--whyshows the satisfied clauses.
Planning
- frontier <chart> <dx> [--corpus …] [--leaves] [--json]
- Backward-chain a goal to its observable frontier;
--leavesdrops the tree for the worklist. - predict <chart> --observe A,B,C [--corpus …] [--fast | --bayesian] [--json]
- Rank candidate observations by information gain, or — with
--bayesian— by value of information over the posterior.
Corpus
- assemble <corpus.toml> [--check]
- Assemble a layered manifest into its effective
index.trl;--checkis the CI staleness gate. - bundle <corpus.toml> --out <dir> [--version]
- Emit
corpus.json+corpus.trlb+manifest.jsonfor publishing. - trlb <encode|decode|inspect|spec>
- The post-parse AST binary bundle (loads without lexing or parsing);
--corpus <x.trlb>loads one. - corpus-versions [--corpus …]
- List the published corpus versions from the registry.
Reference
- grammar [section] [--list]
- The language & grammar spec, printable; narrow to a section by number or keyword.
- style [section] [--list]
- The authoring style guide, printable.
- version · --version
- The engine/grammar version (feeds
engineMin);--versionis the binary's own version.
Conventions
- Exit codes —
0ok / advisory ·1a check failed (validate,fidelity,gate,assemble --check) ·2usage / I/O error.report/shape/suggestare advisory (always0). - Two rule sources —
evalfires the rules in this file plus its imports;suggest/shape/selfcheckfire corpus trope recognition (--corpus). --corpusforms — a bare host (the published standard corpus) ·file://<dir>(a checkout withtropes/) · a local or publishedcorpus.json. Repeat to layer (later wins by stem);--strike <stem>removes.--json— machine-readable output on the analysis verbs; onreachable: unknown,frontiernames the blocking construct rather than guessing.