Skip to content

Commit 5f7f277

Browse files
AFDocs fixes: improve llms-txt-coverage with complete customSets (#41)
* AFDocs fixes: improve llms-txt-coverage with complete customSets - Add root pages (index, quickstart) to the Getting Started custom set - Simplify Support custom set to use support-and-community/** glob instead of manually listing individual pages, which missed warp-preview-and-alpha-program - Fix indentation inconsistency in customSets config Co-Authored-By: Oz <oz-agent@warp.dev> * Add /api to markdown-url-support allowlist in known-exceptions /api is a custom Astro page, not a Starlight doc page, so it won't have a .md variant. This is expected and intentional. Co-Authored-By: Oz <oz-agent@warp.dev> * Extend starlight-llms-txt patch to exclude pages from custom sets The upstream plugin only applied the `exclude` option to llms-small.txt. Our existing patch already extended it to llms-full.txt; this adds the same exclude pass to llms-custom.txt.ts so custom sets (e.g. the Support set) also skip pages that cause a stack overflow in hast-util-to-text. Fixes the build failure caused by `support-and-community/**` including the ~25k-line open-source-licenses page in the Support custom set. Co-Authored-By: Oz <oz-agent@warp.dev> --------- Co-authored-by: Oz <oz-agent@warp.dev>
1 parent 13b60b6 commit 5f7f277

3 files changed

Lines changed: 30 additions & 10 deletions

File tree

.agents/skills/afdocs-audit/references/known-exceptions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ This file lists checks from the afdocs-audit skill that may flag as warnings or
4646
**Reason**: Only evaluated when tab panels contain section headers. Most sampled pages with tabs don't have headers inside the tab panels, so the check is skipped.
4747
**Action**: None needed.
4848

49+
## markdown-url-support
50+
51+
**Expected status**: fail (for `/api`)
52+
**Reason**: `/api` is a custom Astro page (`src/pages/api.astro`), not a Starlight content page. The docs-markdown integration only generates `.md` variants for Starlight doc pages under `src/content/docs/`, so `/api.md` does not exist.
53+
**Action**: No fix needed. This page is intentionally outside the Starlight content pipeline.
54+
4955
## auth-alternative-access
5056

5157
**Expected status**: skip

astro.config.mjs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,25 +139,27 @@ export default defineConfig({
139139
// widely consumed by AI agents.
140140
starlightLlmsTxt({
141141
projectName: 'Warp',
142-
// Excludes pages from llms-small.txt that cause a stack overflow
143-
// in hast-util-to-text due to their size. Note: the `exclude`
144-
// option only applies to llms-small.txt, not llms-full.txt.
145-
exclude: ['support-and-community/community/open-source-licenses'],
142+
// Excludes pages that cause a stack overflow in hast-util-to-text
143+
// due to their size. The upstream plugin only applies `exclude` to
144+
// llms-small.txt; our patch (patches/starlight-llms-txt+0.8.1.patch)
145+
// extends it to llms-full.txt and custom sets as well.
146+
exclude: ['support-and-community/community/open-source-licenses'],
146147
description:
147148
'Documentation for Warp, the agentic development environment, and Oz, Warp\'s programmable agent for running and coordinating agents at scale.',
148149
customSets: [
149150
{ label: 'Terminal', description: 'Warp Terminal features and configuration.', paths: ['terminal/**'] },
150151
{ label: 'Agent Platform', description: 'Warp\'s Agent Platform: capabilities, local agents, CLI agents, cloud agents.', paths: ['agent-platform/**'] },
151152
{ label: 'Code', description: 'Code editor, code review, and Git worktrees.', paths: ['code/**'] },
152153
{ label: 'Enterprise', description: 'Enterprise features, SSO, team management, and security.', paths: ['enterprise/**'] },
153-
{ label: 'Getting Started', description: 'Installation, quickstart, and migration guides.', paths: ['getting-started/**'] },
154+
{ label: 'Getting Started', description: 'Installation, quickstart, and migration guides.', paths: ['index', 'quickstart', 'getting-started/**'] },
154155
{ label: 'Knowledge and Collaboration', description: 'Warp Drive, teams, and the Admin Panel.', paths: ['knowledge-and-collaboration/**'] },
155156
{ label: 'Reference', description: 'CLI and API reference.', paths: ['reference/**'] },
156-
// Includes all support-and-community/ pages except open-source-licenses.mdx
157-
// (excluded globally above — ~25k lines causes a stack overflow in hast-util-to-text).
158-
{ label: 'Support', description: 'Troubleshooting, billing, and privacy.', paths: ['support-and-community/index', 'support-and-community/plans-and-billing/**', 'support-and-community/privacy-and-security/**', 'support-and-community/troubleshooting-and-support/**', 'support-and-community/community/contributing', 'support-and-community/community/open-source-partnership', 'support-and-community/community/refer-a-friend'] },
159-
{ label: 'Guides', description: 'Task-oriented walkthroughs and tutorials.', paths: ['guides/**'] },
160-
{ label: 'Changelog', description: 'Warp release notes by year.', paths: ['changelog/**'] },
157+
// All support-and-community/ pages. open-source-licenses.mdx is excluded
158+
// globally above (stack overflow in hast-util-to-text); the patch ensures
159+
// it's excluded from this custom set as well.
160+
{ label: 'Support', description: 'Troubleshooting, billing, and privacy.', paths: ['support-and-community/**'] },
161+
{ label: 'Guides', description: 'Task-oriented walkthroughs and tutorials.', paths: ['guides/**'] },
162+
{ label: 'Changelog', description: 'Warp release notes by year.', paths: ['changelog/**'] },
161163
],
162164
}),
163165
],

patches/starlight-llms-txt+0.8.1.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
diff --git a/node_modules/starlight-llms-txt/llms-custom.txt.ts b/node_modules/starlight-llms-txt/llms-custom.txt.ts
2+
index f96dbbd..7f19ab5 100644
3+
--- a/node_modules/starlight-llms-txt/llms-custom.txt.ts
4+
+++ b/node_modules/starlight-llms-txt/llms-custom.txt.ts
5+
@@ -30,6 +30,7 @@ export const GET: APIRoute<Props, Params> = async (context) => {
6+
minify: true,
7+
description,
8+
include: context.props.paths,
9+
+ exclude: starlightLllmsTxtContext.exclude,
10+
});
11+
return new Response(body);
12+
};
113
diff --git a/node_modules/starlight-llms-txt/llms-full.txt.ts b/node_modules/starlight-llms-txt/llms-full.txt.ts
214
index 03f408b..9907aed 100644
315
--- a/node_modules/starlight-llms-txt/llms-full.txt.ts

0 commit comments

Comments
 (0)