adopt loomctl's guarantees, and generate the sidebar from the locks

The sidebar named its four sections by hand, so adopting from a new repository
needed a config edit — a second place to update, which is exactly what the
autogenerated directories were already avoiding one level down. It is written
from the locks now and astro.config.mjs names nothing.

guarantees.usages.md is the first usages facet here with a short real answer,
because this site is built with the tool: check-reports-does-not-fix is what lets
npm run check run in CI, and the etag being the publisher's verbatim is what the
guide stamps are.

It also records what we lean on that the page explicitly does not promise — the
command surface, quoted in our README. A renamed command breaks our documentation
and not our build, and no check will catch it, because the thing that moved is
not a document we adopted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-08 10:37:10 -04:00
co-authored by Claude Opus 5
parent e7d7cc9451
commit b41148f369
8 changed files with 304 additions and 11 deletions
+9
View File
@@ -232,6 +232,15 @@ for (const [repo, records] of [...sections].sort(([a], [b]) => a.localeCompare(b
else if (!existing) console.log(` created ${repo}/index.mdx (blank guide, yours to fill)`)
}
// The sidebar named its sections by hand, which made adopting from a new
// repository a config edit — a second place to update, which is the thing the
// autogenerated directories were already avoiding one level down.
const sidebar = [
{ label: 'Start here', link: '/' },
...[...sections.keys()].sort().map((repo) => ({ label: repo, autogenerate: { directory: repo } })),
]
writeFileSync(join(root, 'src/sidebar.json'), JSON.stringify(sidebar, null, 2) + '\n')
console.log(
`generate: ${written.length} pages from ${sections.size} sections` +
(ACK ? ', stamps refreshed' : staleTotal ? `, ${staleTotal} stale` : ''),