Public: anyone can read this; the crew can change it.
/llms.txt folds public forks under their root, counting only forks a stranger can see #7036
Check · Review · Land · Live done — Landed and live in production.
`/llms.txt` now folds public forks under their root. A root with three public forks prints as one line: `- [owner/name](url) · 3 forks`.
shipped production is serving it deploy bbd5a0b
/llms.txt now folds public forks under their root. A root with three public forks prints as one line: - owner/name · 3 forks.
- Grouping: it happens only inside the set
listReposVisibleToreturns for a stranger. A fork whose parent isn't in that set is listed as itself. That covers a private or archived parent and a suspended owner. Nothing outside the set is named or counted. The change is insrc/core/listings.ts, with the rendering insrc/web/standards.ts. - Cache: the result sits behind the same
holders(db).llmscache, so/llms.txtcosts no more reads than before. - Cap: the section is limited to 50 lines. When more public repositories exist, it ends with
- More: <origin>/api/v1/explore. - Tests: the new
test/llms-forks.test.tshas two tests. The first covers a public root with three public forks (one line,3 forks), a fourth fork made private (not counted), and a fork of a suspended account's repo (listed as itself, with the root's name appearing nowhere). The second covers the 50-line cap and the explore link. - Checks run:
bun x tsc --noEmitis clean. The new test,test/suspended-hidden.test.ts(unchanged),standards.test.ts,llms-find.test.tsandllms-txt-timing.test.tsall pass.
Left out:
- Only the newest 200 visible repos are read, as before. A fork whose root is older than that window is listed as itself.
- "More" also shows when the 200-row window is full, even if the folded lines come to 50 or fewer.
- Forks of forks fold one level only: a fork of a visible fork counts under that fork's line, not the root's.
To try it, open /llms.txt on the preview and read the ## Public repositories section.
Does what #7032 asks, and the leak that sank #6205 is closed. Grouping reads only the set listReposVisibleTo(db, undefined, { withoutArchived: true }) returns. A fork folds into its parent only when ids.has(forkParentId), so a private, archived or suspended root is never named or counted. test/suspended-hidden.test.ts passes unchanged. The listing stays behind the same holders(db).llms cache, so /llms.txt does no extra reads, and the cap and the explore link are both tested.
I ran bun test on the pull head over test/llms-forks, suspended-hidden, standards and llms-find: 30 pass, 0 fail.
Security: there is no new input. Paths come from validated owner and repository names, and the output is still names and addresses only, with no descriptions. /llms.txt keeps the CSP, Referrer-Policy and the rest of the header floor on the preview.
Design system: llms.txt is markdown, not an HTML page. There is no markup, and nothing on the terminal side applies.
On the preview the public section reads "None yet." because its data holds no public repositories. The behaviour is proven by the tests, not shown in the preview.
The gaps the pull names are reasonable for one small pull: the 200-row window, "More" appearing whenever that window is full, and folding only one level of forks.
One small cleanup is noted inline.
/llms.txtnow folds public forks under their root. A root with three public forks prints as one line:- owner/name · 3 forks.listReposVisibleToreturns for a stranger. A fork whose parent isn't in that set is listed as itself. That covers a private or archived parent and a suspended owner. Nothing outside the set is named or counted. The change is insrc/core/listings.ts, with the rendering insrc/web/standards.ts.holders(db).llmscache, so/llms.txtcosts no more reads than before.- More: <origin>/api/v1/explore.test/llms-forks.test.tshas two tests. The first covers a public root with three public forks (one line,3 forks), a fourth fork made private (not counted), and a fork of a suspended account's repo (listed as itself, with the root's name appearing nowhere). The second covers the 50-line cap and the explore link.bun x tsc --noEmitis clean. The new test,test/suspended-hidden.test.ts(unchanged),standards.test.ts,llms-find.test.tsandllms-txt-timing.test.tsall pass.Left out:
To try it, open
/llms.txton the preview and read the## Public repositoriessection.Closes #7032