Repository navigation
docs(core): make the lexicon docs contract check what it claims (#1312) - #1325
Merged
Merged
Conversation
The completeness contract judged documentation by counting files — "at least
1 .mdx page" at tier 1, "at least 8" at tier 2 — and never opened one. A
lexicon could ship eight stale, unreachable, hand-edited pages and pass both.
That is how every At-a-Glance table drifted, and how azure, temporal, helm and
github accumulated pages no sidebar points at. Counting even rewarded the
orphans: azure cleared the >=8 check with ten of its fifteen pages invisible.
Five codegen gaps, each found by fixing the one before it:
- Emitted pages carried no provenance marker, so they get edited directly and
the next regen reverts the edit. Every generated page now carries one, in
the `{/* ... */}` form MDX accepts.
- A generated page silently overwrote an `extraPages` entry claiming the same
slug. Helm declared an "Intrinsics Reference" and a pre-synth rules page and
shipped neither. Explicit authorship now wins and the collision is reported.
- Suppressing a page stopped it being written but left the previous copy on
disk — unreferenced, and indistinguishable from a hand-written page. The
marker makes reaping safe: only a file this pipeline stamped is removed.
- buildSidebar declined to link a generated `rules` page when a `lint-rules`
page existed, while the pipeline emitted it anyway, guaranteeing an orphan.
- Nothing reported pages absent from the sidebar. Starlight has no
auto-discovery, so those are reachable only by typing the URL. The generator
warns and `chant dev check-lexicon` gates on it at tier 1.
Normalizing against the new check: helm's rescued page takes the
`intrinsics-guide` slug aws and gitlab already use, azure/gcp/helm suppress the
duplicate generated `rules` table in favour of their own `lint-rules` page, and
azure, temporal, github, helm and aws declare their hand-written pages in
`sidebarExtra`. Temporal deliberately keeps both: its `lint-rules` page links
out to the generated table, the same overview/reference pairing aws uses.
Also finishes #1315's sweep — its page intro, unsupported-patterns preamble and
the EVL page still described running as the default.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jp6SP7ZiavhoEB1AFuwwoJ
This was referenced Aug 2, 2026
lex00
added a commit
that referenced
this pull request
Aug 2, 2026
…#1333) `chant emulator` is dispatched in cli/main.ts and had no reference page — the only command in that position, and the reason it was also the only one missing from the CLI overview. Documents the three subcommands, both flags, the `--json` report other tools consume (behold's `serve --local` reads it), and the aws Floci container it boots, all read off the handler and the capability rather than inferred. Only aws declares an emulator today, so the page says that instead of implying the others exist. Writing it turned up the same orphan class on the main site that #1325 fixed for the lexicons. Its sidebar is hand-maintained in docs/astro.config.mjs, and two substantial pages were absent from it: the `chant migrate` reference and the COMP001-007 composition lint rules. Both were reachable only by following a link from another page. The main site now resolves in both directions — no page without an entry, no entry without a page. The tutorial sweep found one real path bug. fargate-lucene-efs-solr cited its sources under `lexicons/aws/examples/fargate-lucene-efs/`, which is where the example used to live; it has since moved to the root `examples/` tier that contributing/examples.mdx documents for reference deployments. Twelve references, all pointing at nothing. Everything else checked out: every other `examples/<name>` path referenced anywhere in the docs exists, every `npm run <script>` a tutorial tells you to run is in that example's package.json, and every `just <recipe>` in a code context is a real recipe. Claude-Session: https://claude.ai/code/session_01Jp6SP7ZiavhoEB1AFuwwoJ Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the remaining items on #1312: the unreachable pages, the duplicate rule pages, and the enforcement gap that let both happen.
The gap
chant dev check-lexiconjudged documentation by counting files — "At least 1 .mdx doc page" at tier 1, "At least 8 doc pages" at tier 2 — and never opened one. A lexicon could ship eight stale, unreachable, hand-edited pages and pass both tiers. That is the same gap behind every drifted At-a-Glance table in #1315.The count check was, if anything, rewarded by the problem: azure cleared the ≥8 check comfortably while ten of its fifteen pages appeared in no sidebar, including its getting-started, resource reference and composites pages.
Five codegen gaps
Each of these surfaced by fixing the one before it, so they are listed in the order they appeared:
{/* … */}form MDX accepts rather than<!-- -->, which MDX parses as JSX.extraPagesentry with the same slug.extraPagesare written first, then the generated pagessetover them. Helm declared its own "Intrinsics Reference" and a pre-synth rules page and has shipped neither for as long as the slugs collided. Explicit authorship now wins, and the collision is reported rather than resolved in silence.writeDocsSiteonly removed files it was about to rewrite, so a page that stops being generated stays forever — unreferenced and indistinguishable from a hand-written one. The marker from (1) is what makes reaping safe: only a file this pipeline stamped is ever removed.buildSidebardeclined to link a generatedrulespage when alint-rulespage existed, while the pipeline emitted it anyway — a guaranteed orphan by construction. That is exactly how gcp'srules.mdxcame to exist.docs/README.mdsays so), so sidebar membership is the whole of reachability. The generator now warns, and the contract gates on it at tier 1.Normalization
intrinsics-guideslug that aws and gitlab already use; its deadrulesdeclaration is removed.rulestable in favour of their ownlint-rulespage, matching aws, k8s, gitlab and github.sidebarExtra. Azure and temporal had never declared any.lint-rulespage links out to the generated table for the always-current version, the same overview/reference pairing aws uses forintrinsics-guideandintrinsics. Suppressing it there would have broken that link — worth checking before assuming the pair is always redundant.Also finishes #1315's sweep: that PR fixed the Folded-vs-Run section but left the page intro, the unsupported-patterns preamble and the EVL page still describing running as the default.
Verification
chant dev check-lexiconpasses the new tier-1 check on all twelve, and fails correctly when a page is added without a sidebar entry (1 unreachable: zz-unwired) — verified rather than assumed, since a check that cannot fail is worthless.check-lexicon.test.tsanddocs-sections.test.tspass; main docs site builds at 149 pages; the fly lexicon site builds, confirming the MDX marker parses.🤖 Generated with Claude Code
https://claude.ai/code/session_01Jp6SP7ZiavhoEB1AFuwwoJ