- Machine-readable docs and agent-facing setup notes.
+
+ Machine-readable docs, a task router, and copy-paste agent prompts.
diff --git a/docs-site/content/docs/getting-started/quickstart.mdx b/docs-site/content/docs/getting-started/quickstart.mdx
index 5fe69113..50059cb6 100644
--- a/docs-site/content/docs/getting-started/quickstart.mdx
+++ b/docs-site/content/docs/getting-started/quickstart.mdx
@@ -9,8 +9,8 @@ This guide takes a local analytics project from empty to agent-ready. You'll
install the CLI, run one guided setup command, and hand the context to a
coding assistant.
-If you're a coding assistant choosing a docs route, start with the
-[Agent Quickstart](/docs/ai-resources/agent-quickstart) instead.
+If you're a coding assistant choosing a docs route, start with
+[AI Resources](/docs/community/ai-resources) instead.
= {
- "ai-resources": "AI Resources",
"cli-reference": "CLI Reference",
+ community: "Community & Resources",
};
if (labels[category]) {
diff --git a/docs-site/next.config.mjs b/docs-site/next.config.mjs
index e47a0cc7..f800bcf5 100644
--- a/docs-site/next.config.mjs
+++ b/docs-site/next.config.mjs
@@ -72,6 +72,32 @@ const config = {
permanent: false,
basePath: false,
},
+ {
+ // AI Resources collapsed from four pages to one and now lives under the
+ // Community & Resources section. Redirect the old top-level URL and the
+ // retired per-page slugs to the new home. Redirects run before the .md
+ // rewrite, so the Markdown variants must be matched first and keep their
+ // .md suffix; otherwise a cached Markdown URL would 308 to the HTML page
+ // and break the agent Markdown contract.
+ source: "/docs/ai-resources.md",
+ destination: "/docs/community/ai-resources.md",
+ permanent: true,
+ },
+ {
+ source: "/docs/ai-resources/:slug([^/]+\\.md)",
+ destination: "/docs/community/ai-resources.md",
+ permanent: true,
+ },
+ {
+ source: "/docs/ai-resources",
+ destination: "/docs/community/ai-resources",
+ permanent: true,
+ },
+ {
+ source: "/docs/ai-resources/:slug",
+ destination: "/docs/community/ai-resources",
+ permanent: true,
+ },
];
},
};
diff --git a/docs-site/tests/docs-index-route.test.mjs b/docs-site/tests/docs-index-route.test.mjs
index 6fac0e3c..e2ab24f0 100644
--- a/docs-site/tests/docs-index-route.test.mjs
+++ b/docs-site/tests/docs-index-route.test.mjs
@@ -145,6 +145,53 @@ test("/ktx/docs redirects to the docs introduction", async () => {
);
});
+test("retired AI Resources URLs redirect to the page under Community", async () => {
+ // The former top-level URL.
+ const bare = await fetch(
+ `${docsSiteUrl}${docsBasePath}/docs/ai-resources`,
+ { redirect: "manual" },
+ );
+
+ assert.equal(bare.status, 308);
+ assert.equal(
+ bare.headers.get("location"),
+ `${docsBasePath}/docs/community/ai-resources`,
+ );
+
+ // A retired per-page slug.
+ const slug = await fetch(
+ `${docsSiteUrl}${docsBasePath}/docs/ai-resources/agent-quickstart`,
+ { redirect: "manual" },
+ );
+
+ assert.equal(slug.status, 308);
+ assert.equal(
+ slug.headers.get("location"),
+ `${docsBasePath}/docs/community/ai-resources`,
+ );
+
+ // A retired per-page Markdown URL must stay Markdown: it has to redirect to
+ // the new .md route, not fall through to the HTML page.
+ const markdown = await fetch(
+ `${docsSiteUrl}${docsBasePath}/docs/ai-resources/agent-quickstart.md`,
+ { redirect: "manual" },
+ );
+
+ assert.equal(markdown.status, 308);
+ assert.equal(
+ markdown.headers.get("location"),
+ `${docsBasePath}/docs/community/ai-resources.md`,
+ );
+
+ // Following that redirect end to end must land on Markdown, not HTML.
+ const followed = await fetch(
+ `${docsSiteUrl}${docsBasePath}/docs/ai-resources/agent-quickstart.md`,
+ );
+
+ assert.equal(followed.status, 200);
+ assert.match(followed.headers.get("content-type") ?? "", /text\/markdown/);
+});
+
test("/ redirects into the /ktx docs site", async () => {
const response = await fetch(`${docsSiteUrl}/`, {
redirect: "manual",