Skip to content

docs: audit for truth and coherency — fold default, stale counts, missing commands #1312

Closed

Description

@lex00

A full read of the documentation corpus — 148 pages on the main Starlight site plus 133 across the 12 lexicon sites — turned up a set of claims that either contradict the source or contradict each other. Each item below was checked against code on main (94ca434f), not against another doc page.

Grouped by what it takes to fix them.

1. --fold is documented as opt-in; it has been default-on since #1134

resolveFoldEnabled() (packages/core/src/config.ts:425) returns true when neither the CLI flag nor build.fold is set, and its own docblock says "DEFAULT-ON since chant #1134". The docs still describe the pre-#1134 world:

  • cli/build.mdx — flag table lists --fold with Default: false.
  • concepts/typescript-as-data.mdx — the Folded-vs-Run table has a Default state row reading "Off — pass --no-fold or set build.fold: false", directly under a paragraph that says folding is "the default build path (proposal: make --fold the default build path #1134; opt-in via --fold until then)". The page contradicts itself in two adjacent lines.
  • architecture/evaluator.mdx — "Default: import and run" / "Opt-in: fold instead of run".
  • concepts/evaluation-pipeline.mdx — Stage 4 says chant imports and runs each file by default and --fold skips it.
  • getting-started/quick-start.mdx, concepts/comparison.mdx — describe --fold as an opt-in build path.
  • Several lexicon pages (aws/composites, azure/composites, helm/composites, github/composites, gitlab/intrinsics-guide) inherit the same framing.

This is the highest-value item: it is the one place where a reader following the docs would form a wrong model of what chant build does to their source by default.

2. stateSnapshot does not exist

lexicons/temporal/docs/src/content/docs/ops.mdx lists a pre-built activity builder stateSnapshot(env, opts?) running chant state snapshot. Neither exists. The activity is lifecycleSnapshot (lexicons/temporal/src/op/activities/lifecycle.ts) and the command is chant lifecycle snapshot. The main guide/ops.mdx already uses the correct name, so the two Ops pages disagree.

3. Node version

contributing/development.mdx requires Node.js 20+. .nvmrc pins 24 and all three node-version entries in .github/workflows/chant.yml are '24'. getting-started/installation.mdx already says 24+.

4. Lexicon count is stuck at ten; twelve ship

main contains twelve lexicons (fly and fountain are the additions). Stale claims:

  • concepts/comparison.mdx — "Ten lexicons ship today", enumerating ten.
  • lexicon-authoring/skills.mdx — "All 10 lexicons ship skills", with a per-lexicon count table.

The skills table's counts are also wrong against lexicons/*/src/skills/*.md:

Lexicon Table says Actual
AWS 2 3
K8s 7 9
GitLab 2 3
Fly absent 4
Fountain absent 3

Azure (4), GCP (4), GitHub (3), Helm (3), Docker (2), Temporal (2), Forgejo (1) are correct.

5. cli/overview.mdx omits five real commands

packages/core/src/cli/main.ts dispatches audit build carve components describe dev doctor emulator graph import init lifecycle lint list migrate run search serve update vendor. The overview's command tables are missing carve, describe, search, vendor, and emulator.

Four of those have reference pages already (cli/carve.mdx, cli/describe.mdx, cli/search.mdx, cli/vendor.mdx) and are simply unlinked from the index. chant emulator has no page at all.

6. Diff-category count disagrees across four pages

unobserved was added as a seventh resource category (#1089; packages/core/src/lifecycle/change-set.ts). Pages not updated:

7. docs/README.md describes a directory that does not exist

It lists an api/ content directory. There is none. It also omits components/ and local-testing/, both of which are real.

8. Generated At-a-Glance tables are stale snapshots

docsPipeline (packages/core/src/codegen/docs.ts) owns index.mdx, intrinsics.mdx, pseudo-parameters.mdx, rules.mdx, and serialization.mdx per lexicon, but the committed copies predate the current specs. Counted against each lexicon's generated lexicon-*.json:

Lexicon Table says Actual
AWS 1700 res / 9082 prop 1659 / 9059
Azure 1969 res / 333871 prop 1989 / 14324
K8s 165 res / 166 prop 198 / 336
Fly 3 res, 0 pseudo-params 6 res, 3 pseudo-params (its own page documents all 3)
Helm 7 intrinsics 23 (its own intrinsics.mdx lists 23)

GCP, GitLab, GitHub, Docker, Temporal, and Fountain match.

Azure's 333871 is not drift, it is a bad number — worth a look at the Azure property-type counting in codegen rather than just regenerating over it.

Two related problems make this worse than a stale-number bug:

  • These files carry no DO NOT EDIT marker, unlike the post-synth barrel. Hand-written prose has since been added into them (the K8s index.mdx Quick Start, the AWS link list), so a regen would silently destroy it.
  • The K8s hand-written prose carries its own third set of numbers: "147 resource types" and "50 property types", agreeing with neither its table (165/166) nor reality (198/336).

Suggested handling: add the generated-file marker, move the hand-written intros into a codegen-supported slot (or extraPages), then regenerate.

Proposed split

Items 1–7 are hand-written prose and safe to fix directly; I have a branch for them. Item 8 needs a codegen decision first and should not be hand-patched.

Activity

  1. lex00 commented on Aug 2, 2026

    @lex00
    ContributorAuthor

    Item 8 is done in #1315 — all twelve At-a-Glance tables regenerated from the real pipeline. Two claims in the original report were wrong, and the regen turned up something new.

    Correction 1 — a regen does not destroy the hand-written prose. I said it would. DocsConfig has an overview field, and each lexicon supplies its intro through it (lexicons/k8s/src/codegen/docs.ts holds the Quick Start, lexicons/aws/src/codegen/docs.ts the link list). The prose is config-supplied input to the generator, not something added to its output afterwards. The DO NOT EDIT marker is still worth adding, but for a different reason than I gave: the risk is people editing the emitted .mdx and losing it, which is exactly what had already happened (see below).

    Correction 2 — Azure's 333871 was not a codegen bug. It was plain staleness. The current pipeline produces 14324, and the committed dist/meta.json already contained that. No counting logic needs looking at.

    Also worth recording: the pipeline was not re-run from scratch. AWS's spec URL (schema.cloudformation.us-east-1.amazonaws.com/CloudformationSchema.zip) is a live unpinned endpoint, so npm run generate would have pulled whatever AWS publishes today and folded a spec upgrade into a docs change. The dist/ artifacts already in the tree give counts identical to freshly generated ones for all eleven lexicons that had them, so those were used directly and only manifest.version was synced — which is what a re-bundle writes from package.json regardless. Helm had no dist/ and bundles with no network, so it was built normally.

    New: the emitted pages are being edited directly, and it costs

    Two cases where a regen silently reverted work, both now fixed at source in #1315:

    Both are the same failure: lexicons/*/docs/src/content/docs/ is generator output, but nothing marks it as such.

    New: 25 lexicon doc pages are in no sidebar

    Starlight does not auto-discover pages, so a page absent from astro.config.mjs is reachable only by direct URL. Cross-checking every emitted sidebar against the pages on disk (all sidebars unchanged from main except k8s, so this is pre-existing):

    Lexicon Sidebar slugs Orphaned pages
    Azure 5 getting-started, resources, composites, examples, importing, linked-templates, lint-rules, parameters-outputs, skills, aks-kubernetes
    Temporal 3 getting-started, resources, ops, worker-profiles, skills, temporal-concepts, lint-rules
    GitHub 10 workflows, actions, matrix, multi-workflow
    Helm 9 helm-concepts, examples, lint-rules
    AWS 11 nested-stacks
    GCP 12 rules

    Azure is the worst: ten pages including its getting-started, resource reference, and composites are invisible from its own sidebar.

    A related wrinkle worth deciding before anyone fixes this: several lexicons ship two rule pages — a generated rules.mdx and a hand-written lint-rules.mdx — with different totals (Azure's say 23 and 20; GCP's say 26 and 20, while its skills page claims 17). The orphan is usually the generated one. Whether the fix is to add the orphans to sidebarExtra or to suppress the duplicates depends on which of each pair is meant to be canonical, so I have left it alone.

    Left in this issue: the DO NOT EDIT marker, the orphaned pages, and the duplicate rule pages. Not touched, per scope: the tutorial code samples.

  2. lex00 commented on Aug 2, 2026

    @lex00
    ContributorAuthor

    #1325 is merged; #1331 finishes the rules half. Status of everything in this issue:

    Done — items 1–7 (#1315), item 8 (#1315), the emitted-page marker, unreachable pages, duplicate rule pages, and the enforcement gap (#1325), plus per-lexicon rule coverage (#1331).

    The enforcement gap, for the record

    chant dev check-lexicon judged documentation by counting files — "At least 1 .mdx doc 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 tiers. The count check was, if anything, rewarded by the problem: azure cleared ≥8 comfortably while ten of its fifteen pages sat in no sidebar.

    There is now a tier-1 check that every doc page is reachable from the sidebar, verified to fail when a page is added without an entry rather than assumed to.

    Five codegen gaps, each found by fixing the one before

    1. Emitted pages carried no provenance marker, so they get edited directly and the next regen reverts it.
    2. A generated page silently overwrote an extraPages entry with the same slug — helm declared an "Intrinsics Reference" and a rules page and shipped neither.
    3. Suppressing a page stopped it being written but left the previous copy on disk forever, unreferenced.
    4. buildSidebar declined to link a generated rules page when a lint-rules page existed while the pipeline emitted it anyway — an orphan by construction.
    5. Nothing reported pages absent from the sidebar.

    Corrections to my earlier reports in this issue

    • "25 unreachable pages" was wrong. That counted pages merely absent from a sidebar. 15 were genuinely unreachable once inbound links from sibling pages are counted. The stricter in-sidebar rule is what the new check enforces, which is why 26 sidebar entries were added.
    • "a regen would destroy the hand-written prose" was wrong (already noted above): DocsConfig.overview supplies it, so it is generator input.
    • Azure's 333871 was not a codegen bug, just staleness.
    • The duplicate rule pages are not always redundant. Temporal's lint-rules page deliberately links out to the generated table, so suppressing it there would have 404'd that link. Only azure, gcp and helm were true duplicates; aws turned out to need the opposite fix — un-suppressing its table, because its prose page covers 26 of 50 rules.

    Still open

    • chant emulator has no docs page. It is dispatched in cli/main.ts and is the only command with no reference page, so it is also the one command still missing from cli/overview.mdx.
    • Tutorial code samples have not been checked against the example directories they describe. Untouched by design; this is the most likely remaining source of drift and wants its own pass.
  3. lex00 commented on Aug 2, 2026

    @lex00
    ContributorAuthor

    Rules presentation normalized across all twelve lexicons — #1338

    Every lexicon now links its generated rules table as All Rules, alongside the prose lint-rules page where one exists. The prose pages are selections, not catalogs (aws's covered 26 of the 50 rules it ships), so on the six lexicons that suppressed the table there was no complete list published at all. Each table was checked against the rule ids in its lexicon's src/ and matches exactly.

    The root cause of the gcp orphan reported earlier: buildSidebar refused to link rules whenever a prose lint-rules page existed, while the pipeline emitted the page anyway. That exclusion is gone.

    Two further gaps surfaced while making the presentation uniform:

    • forgejo's docs site has never been published. build-docs.sh has no step for it, and the main site links a hand-written stub instead of the lexicon's own site — the only lexicon wired that way. Its dialect, serialization, and rules pages were unreachable from the published site entirely. Fixed by moving the stub's content into the lexicon's DocsConfig.overview, pointing the sidebar at /lexicons/forgejo/, and adding the build step.
    • docker had no generated table at all — it hand-authors its site, which left its rule list the one in the repo free to fall behind src/lint/ unnoticed. A new generateRulesPage() export renders that single page for a lexicon without a full docsPipeline.

    Also in #1338: the generated page was titled "Lint Rules", colliding with the prose page of the same name on nine lexicons (now "All Rules"), and the rule-count summary never pluralized ("1 lint rules").

    Helm intrinsics guide verified

    Every claim in the helm intrinsics guide checks out against src/intrinsics.ts — the values proxy and .pipe(), Release.*, ChartRef.*, include, required, helmDefault, toYaml, quote, printf, tpl, lookup, withOrder, argoWave.

    Five claims on helm-concepts.mdx beside it do not, each confirmed by running the call:

    claim reality
    helmDefault(values.x, "IfNotPresent") arguments reversed; signature is helmDefault(def, val)
    quote(x) → {{ quote .Values.x }} renders {{ .Values.x | quote }}
    toYaml(x) → ... | nindent 12 the pipe only appears with the indent argument
    Capabilities.apiVersions("policy/v1") does not exist — Capabilities is a property proxy, paths are not callable, so this throws
    include("my-app.labels", {}) ctx is a string defaulting to "."; an object renders [object Object]
  4. lex00 commented on Aug 3, 2026

    @lex00
    ContributorAuthor

    Closing the loop on this audit. Everything found is now either fixed or tracked.

    Fixed

    What Where
    Fold default documented backwards, plus six other truth errors #1315
    Lexicon docs contract had no enforcement — five codegen gaps #1325
    Rules documented inconsistently across twelve lexicons #1338
    Helm's helm-concepts.mdx — five template-function examples that throw or render wrong #1338
    chant spell cast — a removed command documented in 16 example READMEs #1399
    TESTING.md — test counts off by 10×, a path stale since the packages/→lexicons/ move, "6 lexicons" wrong in four of five places #1404
    Editor READMEs advertising a code-actions feature the LSP never offers; test-utils README naming the wrong test runner; four broken links in SPRAWL-VALIDATION.md #1406

    The contract work this audit turned into is #1340, now complete — nine issues, all closed.

    Tracked, not fixed

    What the method was worth recording

    The prose was largely sound. What had rotted was every number and path that nothing checks: resource counts, test counts, file paths that survived a directory move, and commands that survived their own removal. Reading for plausibility would have caught almost none of it — each was found by asking source the same question the doc answered.

    Three of the fixes are now guards rather than corrections, so the same classes cannot silently return: the completeness checklist is generated-equal to the tool's own check list, the authoring member table is diffed against the LexiconPlugin interface, and every doc page must be reachable from its sidebar.

  5. lex00 commented on Aug 3, 2026

    @lex00
    ContributorAuthor

    One more for the list, tracked elsewhere so it doesn't need duplicating here.

    The apply surface is documented as delegation to a native mechanism; that is true for one of three targets.

    • guide/ops.mdx:264 — "apply via the target's native mechanism — a Kubernetes server-side apply, CloudFormation deploy, or an ARM deployment"
    • guide/reconciling-lifecycle.mdx:39 — same sentence, plus "Deletes ride the native delete path scoped to the ownership marker, so they only ever touch chant-owned orphans"

    Against lexicons/temporal/src/op/activities/apply.ts: kubectl is a typed server-side apply through the k8s lexicon (#1075), and cloudformation and arm are still exec of the aws/az CLIs. Neither page mentions that gcpApply and flyApply exist, or that ApplyTarget has no target for either. The marker-scoping sentence is false for arm specifically — filed as #1448.

    Correction tracked in #1449's acceptance criteria (docs land with the dispatcher change), so this is a cross-reference rather than a separate item. Flagging it here so the audit's record is complete.

    Related: #1446, #1448, #1449.

  6. lex00 commented on Aug 3, 2026

    @lex00
    ContributorAuthor

    The apply item I added above is fixed on main in #1453 (37751bc) — guide/ops.mdx, guide/reconciling-lifecycle.mdx, contributing/lifecycles.mdx and whats-new.mdx, plus two source docblocks. Nothing else on this issue's list was touched.

  7. lex00 commented on Aug 7, 2026

    @lex00
    ContributorAuthor

    One more truth item, surfaced twice independently during the rubric product research (01-chant.md and the Estate proposal's OQ1): the third dial position has two names in published docs. lifecycle-models.mdx:76 says observe → reconcile → authoritative (and line 83 defines authoritative); overview.mdx and comparison.mdx say observe / reconcile / apply. Both are live today — re-verified 2026-08-07. Whichever term wins, the loser should redirect to it in one place rather than coexist.

  8. added
    area:docs
    documentation
    on Aug 23, 2026
  9. lex00 commented on Aug 25, 2026

    @lex00
    ContributorAuthor

    Shipped in PR #1922: docs truth sweep — most prior claims verified already-correct on main; 1 stale Node-version fact fixed, follow-up flagged (cedar/k3d/k3s missing site integration keeps lexicon counts stale).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:docsdocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions