Skip to content

docs: say what the build actually does by default (#1312) - #1315

Merged
lex00 merged 2 commits into
mainfrom
docs/audit-truth-coherency
Aug 2, 2026
Merged

lex00 merged 2 commits into
mainfrom
docs/audit-truth-coherency

Conversation

@lex00

@lex00 lex00 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Fixes the hand-written half of #1312.

resolveFoldEnabled() (packages/core/src/config.ts:425) has defaulted to true since #1134, but the docs still described folding as opt-in. concepts/typescript-as-data.mdx was contradicting itself inside a single section: the prose called folding "the default build path" and the table two lines below it had a Default state row reading "Off". This reframes that comparison around fold-as-default, and follows through in cli/build.mdx, architecture/evaluator.mdx, concepts/evaluation-pipeline.mdx, getting-started/quick-start.mdx, concepts/comparison.mdx, and guide/writing-resources.mdx.

Also in scope, each verified against source rather than against another doc page:

  • stateSnapshot(env) / chant state snapshot in the temporal Ops page. Neither exists; it is lifecycleSnapshot and chant lifecycle snapshot.
  • Node.js 20+ in the development guide, against .nvmrc = 24 and three node-version: '24' entries in CI.
  • "Ten lexicons ship today" where main has twelve. The skills table also undercounted AWS (2→3), K8s (7→9) and GitLab (2→3) and had no Fly or Fountain row; counts taken from lexicons/*/src/skills/*.md.
  • cli/overview.mdx was missing carve, describe, search, and vendor — all dispatched in cli/main.ts and all with reference pages already written, just unlinked.
  • Live-diff categories read six on two pages and seven on two others. unobserved (fix(core): observation contract — "not observed" is silently "not present" #1089) makes seven.
  • docs/README.md documented an api/ content directory that does not exist, and omitted components/ and local-testing/.

The intrinsics "Folds?" preamble is codegen output, so docs-sections.ts is fixed alongside the four emitted intrinsics.mdx pages — otherwise the next regen puts the opt-in phrasing back.

Left for #1312, because it needs a decision before a keystroke: the per-lexicon At-a-Glance tables are stale against their own generated lexicon-*.json (AWS 1700→1659, Azure 1969→1989, K8s 165→198, Fly 3→6, Helm 7→23 intrinsics), Azure's 333871 property-type count looks like a codegen bug rather than drift, and those generated pages carry no DO NOT EDIT marker so hand-written prose has since been added into them. A regen today would destroy the K8s Quick Start and the AWS link list.

Verification: npm run build in docs/ — 149 pages, clean. The changed codegen string is not asserted by docs-sections.test.ts, which checks only the table rows.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Jp6SP7ZiavhoEB1AFuwwoJ

lex00 and others added 2 commits August 2, 2026 13:33
An end-to-end read of the docs corpus turned up claims that contradict the
source or each other. This fixes the hand-written ones; the stale generated
At-a-Glance tables need a codegen decision first and are left to #1312.

The load-bearing one is `--fold`. `resolveFoldEnabled()` has returned true by
default since #1134, but the docs still described folding as opt-in — in the
build flag table, in the Folded-vs-Run comparison (whose own table contradicted
the paragraph above it), in the evaluator and evaluation-pipeline pages, and in
quick-start, comparison, and writing-resources. A reader following those pages
would have the wrong model of what `chant build` does to their source.

Also corrected: `stateSnapshot`/`chant state snapshot` in the temporal Ops page
(the activity is `lifecycleSnapshot` and the command is `chant lifecycle
snapshot`); Node 20+ in the development guide against an .nvmrc and CI that
both pin 24; "Ten lexicons" where twelve ship, plus the skills table's counts
for AWS, K8s, and GitLab and its missing Fly and Fountain rows; five real
commands absent from the CLI overview; a six-vs-seven split on the live-diff
categories now that `unobserved` exists; and an `api/` content directory in
docs/README.md that does not exist.

The intrinsics "Folds?" preamble is generated, so docs-sections.ts is fixed
alongside the four emitted pages to keep a regen from reintroducing it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jp6SP7ZiavhoEB1AFuwwoJ
…1312)

Every lexicon's overview table had drifted from what the pipeline actually
produces, and the `Lexicon version:` line had drifted furthest — AWS advertised
0.19.1 against a package at 0.34.1, fly and fountain still said 0.0.1.

Rather than hand-patch generated pages, this runs the real `docs` pipeline for
all twelve. The counts move to what the committed artifacts already contain:
AWS 1700/9082 -> 1659/9059, Azure 1969/333871 -> 1989/14324, K8s 165/166 ->
198/336, fly 3 -> 6 resources, helm 7 -> 23 intrinsics. Azure's 333871 turned
out to be plain staleness rather than a counting bug, and docker's hand-written
table was already correct (1 pre-synth + 6 post-synth, verified by rule id).

AWS's spec endpoint is unpinned, so a full `generate` would have folded an
upstream CloudFormation spec upgrade into a docs change. The dist artifacts
already in the tree produce counts identical to freshly generated ones for all
eleven lexicons that had them, so those were used directly; only the manifest
version needed syncing, which is what a re-bundle writes from package.json
anyway. Helm had no dist and bundles offline, so it was built.

Two things the regen exposed, both fixed at their source so a future run keeps
them:

- The k8s "Live Cluster" sidebar group (api-client, chant kube) had been added
  by hand to the emitted astro.config.mjs and was dropped on regen. It is now a
  `sidebarExtra` entry.
- The AWS intrinsics guide claimed plain calls cannot fold and that #1044
  "tracks changing that". #1044 landed; the generated Folds? column on the very
  next page says Yes for all nine. The guide's prose lives in the lexicon's
  codegen config, so the .mdx had been patched directly and the config never
  was. Fixed in the config, along with the fold-is-opt-in phrasing in the aws,
  github, gitlab, and helm docs configs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jp6SP7ZiavhoEB1AFuwwoJ
@lex00
lex00 merged commit 06946fa into main Aug 2, 2026
6 checks passed
lex00 added a commit that referenced this pull request Aug 2, 2026
… (#1325)

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.


Claude-Session: https://claude.ai/code/session_01Jp6SP7ZiavhoEB1AFuwwoJ

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lex00
lex00 deleted the docs/audit-truth-coherency branch August 3, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant