Skip to content

docs: split the configuration reference and changelog out of the README - #63

Merged
blakebauman merged 2 commits into
mainfrom
docs/split-readme
Aug 13, 2026
Merged

blakebauman merged 2 commits into
mainfrom
docs/split-readme

Conversation

@blakebauman

Copy link
Copy Markdown
Member

The README was 740 lines, and two sections were 74% of it: the configuration reference (5,593 words) and the changelog (5,907). The reference was a lookup surface buried 110 lines into a document whose first job is to say what fold is, and docs/ — 18 files, every design record — had no configuration page at all, so config/config.go had no doc counterpart.

README: 740 → 262 lines (15,329 → 4,145 words).

New file Contents
docs/configuration.md 328 lines — the full reference, 11 sections
CHANGELOG.md 199 lines — 20 releases, newest first

The README keeps both H2s: Configuration gains a ten-row summary table linking into the reference, Changelog becomes a pointer. Keeping the headings is what stops inbound README.md#configuration and #changelog links 404-ing.

Anchors improve rather than just move

### \upstreams` (required)was generating#upstreams-required, and ### `auth` (gateway authentication)was generating#auth-gateway-authentication`. The parentheticals move into body prose, so every anchor is now exactly the config key.

Link repair

Nothing in CI would have caught a break, so this was the actual deliverable: four inbound doc links repointed, the #hook reference in "Not implemented" requalified, and the two [API stability](#api-stability) links inside changelog entries rewritten to README.md#api-stability now that they live in another file.

The tenants links at the old README:344/:350 are deliberately untouched — they sit inside the server table, which travels with its target.

Seven .claude/ files hardcoded the old layout and would have sent future agents at the wrong file: the update-docs mapping, the docs-sync surface list, fold-release step 3 (entries are H2s in CHANGELOG.md now), reloadable-state, and two hooks. .goreleaser.yaml and .dockerignore ship both new files.

Two pre-existing errors the move would have turned into visible contradictions: operations.md listed the audit sinks as stdout/webhook, omitting file and otlp-logs; docs-sync claimed four minted error codes when there are six.

Second commit: a test so this stops being silent

Splitting the README demonstrated the gap — three link claims in a carefully audited plan were wrong, and every one would have shipped silently. internal/doclint asserts every relative link names a file that exists and every #anchor names a heading that file defines. 185 links across ~40 documents, in 20 ms. Same lockstep discipline as observability_pack_test.go. Runs under go test ./..., so make test, make race, and CI gate on it with no workflow change.

Writing it turned up a rule the first draft got wrong: GitHub replaces each space with its own hyphen rather than collapsing runs, so dropping punctuation between two words leaves both flanking spaces and yields two hyphens. ## The cardinality problem — settled anchors as the-cardinality-problem--settled, which docs/benchmarks.md had right all along. That case is pinned in TestSlug.

Inline code spans are excluded from link extraction but not from heading slugs — the launch notes carry `- [owner/repo](url)` as a format template, while ## `tenants` must still anchor as tenants.

Verification

  • 0 dead relative links, 0 broken anchors across 185 internal links
  • The test was verified to fail: broke a file target and an anchor on purpose, confirmed both reported with a clickable file:line, then restored
  • make test green; make check green except lint (golangci-lint not installed locally — CI covers it)

Follow-up, not in this PR

fold.run authors its own docs page carrying <!-- Source: fold README § Configuration — curate, don't fork -->. It is hand-synced rather than built from this repo, so nothing breaks, but that line should later name docs/configuration.md.

🤖 Generated with Claude Code

blakebauman and others added 2 commits August 13, 2026 16:42
The README was 740 lines, and two sections were 74% of it: the config
reference (5,593 words) and the changelog (5,907). The reference was a
lookup surface buried 110 lines into a document whose first job is to say
what fold is, and docs/ — 18 files, every design record — had no
configuration page at all, so config/config.go had no doc counterpart.

Configuration moves to docs/configuration.md, the changelog to a root
CHANGELOG.md. The README keeps both H2s: Configuration gains a ten-row
summary table linking into the reference, Changelog becomes a pointer.
Keeping the headings is what stops inbound README.md#configuration and
#changelog links 404-ing. README lands at 262 lines.

Anchors improve rather than just move. `### upstreams (required)` was
generating #upstreams-required and `### auth (gateway authentication)`
#auth-gateway-authentication; the parentheticals move into body prose so
every anchor is exactly the config key.

Link repair, since nothing in CI would catch a break: four inbound doc
links repointed, the #hook reference in "Not implemented" requalified, and
the two [API stability](#api-stability) links inside changelog entries
rewritten to README.md#api-stability now that they live in another file.
The tenants links at the old README:344/:350 are deliberately untouched —
they sit inside the server table, which travels with its target.

Seven .claude/ files hardcoded the old layout and would have sent future
agents at the wrong file: the update-docs mapping, the docs-sync surface
list, fold-release step 3 (entries are H2s in CHANGELOG.md now),
reloadable-state, and two hooks. .goreleaser.yaml and .dockerignore ship
both new files.

Two pre-existing errors the move would have turned into visible
contradictions: operations.md listed the audit sinks as stdout/webhook,
omitting file and otlp-logs; docs-sync claimed four minted error codes
when there are six.

Verified: 0 dead relative links and 0 broken anchors across 50 anchored
links repo-wide; make check green.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Splitting the README just demonstrated the gap: three link claims in a
carefully audited plan were wrong, and every one would have shipped
silently. There is no link checker in CI, no Markdown lint, and the Stop
hook is satisfied by any .md edit — so a moved section or a renamed
heading leaves a link that still renders, still looks like a link, and
lands the reader on a page that no longer says what was promised.

This is the shape observability_pack_test.go already guards against: an
artifact outside the compiler's reach, naming things the repo owns, with
no signal when the two drift. Same discipline, both halves — every
relative link must name a file that exists, and every '#anchor' must name
a heading that file defines. 185 links across ~40 documents, in 20 ms.
External URLs are deliberately not fetched; a test that needs the network
fails for reasons unrelated to the change under review.

Writing it turned up a rule that is easy to assume wrong, and which the
first draft got wrong: GitHub replaces each space with its own hyphen
rather than collapsing runs, so dropping punctuation between two words
leaves both flanking spaces and yields two hyphens. "The cardinality
problem — settled" anchors as "the-cardinality-problem--settled", which
docs/benchmarks.md had right all along. Collapsing invents an anchor
GitHub never serves. That case is pinned in TestSlug.

Inline code spans are excluded from link extraction but not from heading
slugs, which is the asymmetry the docs actually rely on: the launch notes
carry "`- [owner/repo](url)`" as a format template rather than a link,
while "## `tenants`" must still anchor as "tenants".

Verified by breaking a link and an anchor on purpose and watching both
fail with a clickable file:line, then restoring. Runs under `go test
./...`, so make test, make race, and CI gate on it with no workflow change.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@blakebauman
blakebauman merged commit 5f41c8e into main Aug 13, 2026
7 checks passed
@blakebauman
blakebauman deleted the docs/split-readme branch August 13, 2026 23:45
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