the loom conventions, rendered — and adopted the way the conventions say

Astro Starlight over .loom/externals/. Every reference page is a copy of a
document published by another loom repository, adopted with loomctl, locked to
the etag it was fetched at. Nothing is written twice.

Two kinds of page. Generated ones are overwritten every build because nobody
typed them. Guides are hand-written, never overwritten, and stamped in
frontmatter with the etags they were written against; when a source moves, the
build renders a banner onto the page asking whether it is still true. It cannot
answer that — only a person can — so it asks where a reader will see it too, and
the site degrades honestly instead of reading as authoritative and being wrong.
npm run ack is the person saying they re-read it.

Declined: having the build stage a polad into the cart. loomctl external check
does that and is right to, but a docs build runs in CI and in worktrees where
there is no cart, and staging a polad is an act of judgment. The build reports;
a person raises.

The guides are worked examples rather than explanations, deliberately. An
explanation is a second saying of a rule owned on the page beside it and goes
stale silently; an example goes stale visibly, because the artifacts in it are
the wrong shape.

Generation is byte-deterministic — locks are walked in path order, no timestamps
— because the diff is most of the value.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-08 09:51:16 -04:00
co-authored by Claude Opus 5
commit 969524b8ea
37 changed files with 9769 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import { defineCollection, z } from 'astro:content'
import { docsLoader } from '@astrojs/starlight/loaders'
import { docsSchema } from '@astrojs/starlight/schema'
// `loom` is the machine-owned block. Everything else on a page is a person's.
const source = z.object({
path: z.string(),
etag: z.string(),
})
export const collections = {
docs: defineCollection({
loader: docsLoader(),
schema: docsSchema({
extend: z.object({
loom: z
.object({
// Set on a generated page: this is a rendering of somebody's document.
generated: z.boolean().optional(),
source: z.string().optional(),
path: z.string().optional(),
etag: z.string().optional(),
visibility: z.string().optional(),
// Set on a hand-written page: what it was written against.
writtenAgainst: z.array(source).optional(),
})
.optional(),
}),
}),
}),
}