A topical llms file from a pool of facts

Problem

An export is organised by site: one index per host, sections by URL path. A reader asking “what does everyone say about llms-full.txt grammars” does not care which host said it. The concept axis is the other way to cut the same facts — sections are concepts, and a fact from Cloudflare’s docs sits next to one from the spec and one from a research spoke.

The hub’s first concept-axis file was built for the subject it knows best: llms.txt itself. The pool was four /dr research spokes (the spec, the ecosystem evidence, the generation tooling, the recreation-and-aggregation notes), every footnoted sentence in them becoming one fact anchored to its footnote URL. The question was whether a deterministic assignment — no model call — could file those facts into sections a reader would agree with.

Inputs

Commands

# cwd: ~/.global-ai-hub
PYTHONPATH=scripts .venv/bin/python -m docset_refine topical \
  --from ~/.claude/skills/document-formats/references/llms-txt.md \
  --from ~/.claude/skills/document-formats/references/llms-txt-generation-tooling.md \
  --from ~/.claude/skills/document-formats/references/llms-txt-ecosystem-evidence.md \
  --from ~/.claude/skills/document-formats/references/llms-txt-recreation-and-aggregation.md \
  --subject "llms.txt and LLM-readable documentation" \
  --out llms-topical/llms-txt.llms/ \
  --base-url http://127.0.0.1:8788/t/llms-txt --register

# lint the result against nothing (topical files have no single mirror) and probe it
.venv/bin/python scripts/llms_lint.py check llms-topical/llms-txt.llms/llms.txt
.venv/bin/python scripts/docset_indexer.py keyword topical__llms-txt__facts "describedby" --layer facts

--register writes the file path onto the tree node (llmsFile), so hub_concept_lookup returns it and the served root lists it under ## Topics.

Outputs

llms-topical/llms-txt.llms/ after the fifth iteration:

FileBytesTokens
llms.txt6,1441,523
llms-facts.txt74,21018,271
llms-vocabulary.txt10,3132,532

Sections and their fact counts: specification v2 (21), ecosystem evidence (39), llms-full page grammars (16), generation tooling (45), recreation and family aggregation (40), plus ## Shared (7) for the cross-cutting lines. No section is thin (the coverage rule is ≥ 3 facts and ≥ 1 definition per section), and no frontier child was left as a BLOCKED: unresearched row.

How the 168 facts were assigned, from the manifest’s assignment block:

StageFacts filed
keyword match on section name / aliases30
file affinity (the spoke the fact came from)122
embedding nearest-centroid9
## Shared7

The vocabulary layer (45 terms, 22 defined from units, 18 defined by the local model, 12 sent to research) was added in a later pass; it is described in the vocabulary essay.

What the lint found

Five /ldo iterations. The deterministic passes were clean from iteration two (0 High); the loop stopped on a dissenting blind audit rather than on a green report:

Lessons

Reproduce

The pilot’s manifest.json, llms.txt, llms-facts.txt and llms-vocabulary.txt are in this repository under outputs/llms-topical/llms-txt.llms/. The how-to that explains each stage of the assignment (and where to intervene) is skills/llms-deep-optimizer/references/facts-to-llms-howto.md. Recipe 12 in the examples cookbook is the copy-only version of the commands block.