Skip to content

Restructure docs for agent-ready site workflow#59

Merged
KayleeWilliams merged 6 commits into
mainfrom
KayleeWilliams/restructure-docs-2
May 18, 2026
Merged

Restructure docs for agent-ready site workflow#59
KayleeWilliams merged 6 commits into
mainfrom
KayleeWilliams/restructure-docs-2

Conversation

@KayleeWilliams
Copy link
Copy Markdown
Collaborator

Summary

Restructures the Leadtype docs around the agent-ready site workflow:

  • Reorganizes docs navigation into Start, Build an Agent-Ready Site, Docs Sources, Package Docs for Agents, Author Content, and Reference.
  • Moves collections documentation under the new Docs Sources section and adds a task-led source configuration guide.
  • Refreshes the overview, quickstart, source primitive, framework matrix, and build-site docs around site mode, bundle mode, and Agent Readability.
  • Splits runtime markdown/JSON-LD/sitemap serving guidance into a dedicated Serve agent responses page.
  • Regenerates the example app generated docs artifacts and updates the CLI expectation for the new nav title.

Validation

  • bun run check
  • bun test

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c7e302d2-62d7-47f8-a77d-e3f969d7fb5a

📥 Commits

Reviewing files that changed from the base of the PR and between b3f6d7b and 5216b45.

⛔ Files ignored due to path filters (3)
  • apps/example/src/generated/agent-readability.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-search-content.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-search-index.json is excluded by !**/generated/**
📒 Files selected for processing (2)
  • docs/build/deploy-generated-artifacts.mdx
  • docs/quickstart.mdx
📜 Recent review details
🔇 Additional comments (2)
docs/quickstart.mdx (1)

8-10: LGTM!

Also applies to: 12-12, 20-31, 35-54, 58-65, 79-108, 114-145, 152-173, 181-189, 193-200

docs/build/deploy-generated-artifacts.mdx (1)

9-9: LGTM!

Also applies to: 103-148, 242-277, 279-283


📝 Walkthrough

Summary by CodeRabbit

  • Documentation

    • Reframed guides around building an “agent-ready” docs site; updated landing, quickstart, vocabulary, and how-it-works content.
    • Added guides for configuring sources, serving agent responses, generating/deploying agent artifacts, and CI validation (GitLab, CircleCI).
    • Introduced TanStack Start in framework matrix; revised framework integration recipes, navigation, collections, and reference wording.
    • Expanded installation examples and updated README links.
  • Tests

    • Updated CLI generate test expectation to match new wording.

Walkthrough

Reframes Leadtype as an agent-ready docs pipeline: adds middleware/serving guidance, rewrites quickstart, updates build/deploy and framework integration docs, introduces comprehensive source configuration, restructures navigation/config, and adjusts links/tests accordingly.

Changes

Agent-Ready Docs Site Restructuring

Layer / File(s) Summary
Terminology and site framing
docs/how-it-works.mdx, docs/methodology.mdx, docs/index.mdx, docs/authoring/components.mdx
Expand vocabulary (site/bundle modes, source primitive, Agent Readability), adjust framework/compiler mentions, and link/formatting tweak for "Flattening".
Quickstart: GA happy path
docs/quickstart.mdx
Rewrite to require title/description, add docs/docs.config.ts example, Next App Router rendering sample, npx leadtype generate usage, expected public artifact tree, and verification checks.
Serve agent responses / middleware wiring
docs/build/serve-agent-responses.mdx, docs/build/optimize-docs-for-agents.mdx
New middleware example for markdown negotiation, sitemap/robots regeneration, JSON-LD insertion, markdown response rules, and caching/Vary guidance; clarify artifact generation vs. app wiring.
Build and deployment for agent artifacts
docs/build/build-a-docs-site.mdx, docs/build/deploy-generated-artifacts.mdx, docs/build/generate-static-artifacts.mdx
Rebrand guide as "agent-ready", enumerate CLI-generated artifacts (llms.txt, markdown mirrors, search JSON, sitemap/robots, agent-readability), add TanStack Start deployment section, and reorganize framework-specific guidance.
Framework integration & source primitive
docs/build/framework-matrix.mdx, docs/build/use-the-source-primitive.mdx, docs/reference/source.mdx, docs/reference/architecture.mdx
Promote TanStack Start to first-class adapter, add TanStack/Nuxt sections, reposition Astro recipes, update SvelteKit helpers, change loadPage() vs direct import guidance, and add Adapter shapes / public-surface text.
Configure sources & collections
docs/sources/configure-sources.mdx, docs/sources/collections.mdx
New comprehensive configure-sources guide (local/multi/remote/collections), sync/pinning/bundle filtering docs; add per-collection nav option and fallback behavior.
Navigation and docs.config.ts
docs/docs.config.ts, docs/authoring/frontmatter.mdx
Restructure nav groups (Start, Build an Agent-Ready Site, Docs Sources, Package Docs for Agents, Author Content, Reference), convert bestStartingPoints to objects with titles/descriptions, and reassign collections.
Reference/documentation links & tests
docs/reference/cli.mdx, docs/reference/evals.mdx, docs/reference/mdx.mdx, README.md, packages/leadtype/src/cli.test.ts
Update CLI links to /docs/sources/configure-sources, adjust evals and mdx wording, update README links/install commands, and update test expectation to "Build an agent-ready docs site".
CI lint examples
docs/build/validate-in-ci.mdx
Add GitLab CI and CircleCI examples that run npx leadtype lint docs with JSON output and upload lint-report.json as artifacts.

Sequence Diagram(s)

sequenceDiagram
  participant Author as Author/App
  participant CLI as Leadtype CLI
  participant Config as docs.config.ts
  participant Artifacts as Generated Artifacts
  participant Middleware as App Middleware
  participant Agent as Agent/LLM
  Author->>CLI: npx leadtype generate
  CLI->>Config: Load nav/product config
  CLI->>Artifacts: Generate llms.txt, llms-full.txt, markdown mirrors, search.json, agent-readability.json
  Author->>Middleware: Wire serve-agent-responses middleware
  Agent->>Middleware: Request markdown via Accept header
  Middleware->>Artifacts: Read markdown mirrors, regenerate sitemap/robots
  Middleware->>Agent: Return markdown with content negotiation
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • inthhq/leadtype#28: Overlapping docs-config and navigation changes affecting docs.config.ts and starter/navigation structure.
  • inthhq/leadtype#57: Adds JSON-LD helpers and related metadata wiring used by the new serve-agent-responses guide.

Poem

🐰 I hopped through docs to make them bright,
Agent-ready artifacts now take flight,
Middleware hums and quickstart lights the way,
TanStack joins the integration play,
Docs sing clear — hop on, build and sway!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary objective of the changeset—restructuring documentation around an agent-ready site workflow.
Description check ✅ Passed The description is directly related to the changeset and provides meaningful detail about the restructuring effort, including specific navigation changes and new documentation sections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch KayleeWilliams/restructure-docs-2

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

@KayleeWilliams KayleeWilliams marked this pull request as ready for review May 18, 2026 03:56
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d3826e850

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/docs.config.ts
Comment on lines +140 to +144
"mdx",
"remark",
"search",
"evals",
],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include frontmatter transformers in Reference nav

With this change the Reference section switched from { include: "*" } to an explicit pages list, and docs/reference/frontmatter-transformers.mdx is not listed. The generator only emits pages reachable through this curated nav in the committed artifacts, so /docs/reference/frontmatter-transformers is now absent from apps/example/src/generated/docs-pages.json even though the source page still exists; users lose that reference page from the site and agent bundles unless it is added here.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/authoring/frontmatter.mdx (1)

97-105: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the explanatory sentence to match the new nested-group example.

The snippet now uses source-primitive / agent-artifacts, but Line 105 still says group: remote-source, which makes the example internally inconsistent.

Suggested fix
-A page sets `group: remote-source` and lands in that nested slot. Only **leaf** groups (no children) directly contain pages; non-leaf groups are headings only.
+A page sets `group: source-primitive` (or `group: agent-artifacts`) and lands in that nested slot. Only **leaf** groups (no children) directly contain pages; non-leaf groups are headings only.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/authoring/frontmatter.mdx` around lines 97 - 105, The explanatory
sentence below the frontmatter example is inconsistent with the shown
nested-group keys; update the sentence that mentions `group: remote-source` so
it references the actual example keys (`source-primitive` / `agent-artifacts`)
and clarifies that only leaf groups contain pages; modify the text that
currently reads "A page sets `group: remote-source` and lands in that nested
slot" to instead reference a page setting `group: source-primitive` (or
`agent-artifacts`) to match the `children` array and emphasize that non-leaf
groups are headings only.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/build/deploy-generated-artifacts.mdx`:
- Around line 103-124: The example middleware uses h3/Nitro utilities but
doesn't import them; add an import for eventHandler, getRequestURL, and
getHeaders from "h3" at the top of the module so the exported handler
(eventHandler(...)) and the calls to getRequestURL and getHeaders resolve
correctly; specifically, add an import statement for eventHandler, getHeaders,
getRequestURL so normalizeAgentReadabilityManifest, createAgentMarkdownResponse,
and readMarkdownFile can be used without reference errors.

In `@docs/build/framework-matrix.mdx`:
- Around line 75-89: The text in use-the-source-primitive.mdx incorrectly calls
the leadtype/nuxt adapter a "future adapter"; update the copy to reflect that
the adapter already exists in production by removing the "future adapter"
language and instead state that createLoadPageData from "leadtype/nuxt" is
available (as used in apps/nuxt-example/server/api/docs.get.ts), and adjust any
example text referencing createLoadPageData to present it as an existing adapter
rather than a future one.

In `@docs/quickstart.mdx`:
- Around line 42-43: The example for bestStartingPoints in docs/quickstart.mdx
is missing required fields for the new config contract; update the example
object(s) in bestStartingPoints to use the full structured shape (include
urlPath, title, and description) so the quickstart shows valid config for the
new contract (refer to bestStartingPoints and the surrounding quickstart example
to locate and replace the current [{ urlPath: "/docs" }] entry).

---

Outside diff comments:
In `@docs/authoring/frontmatter.mdx`:
- Around line 97-105: The explanatory sentence below the frontmatter example is
inconsistent with the shown nested-group keys; update the sentence that mentions
`group: remote-source` so it references the actual example keys
(`source-primitive` / `agent-artifacts`) and clarifies that only leaf groups
contain pages; modify the text that currently reads "A page sets `group:
remote-source` and lands in that nested slot" to instead reference a page
setting `group: source-primitive` (or `agent-artifacts`) to match the `children`
array and emphasize that non-leaf groups are headings only.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 74d3bd17-a317-4d74-8e7a-c37673fe46cd

📥 Commits

Reviewing files that changed from the base of the PR and between 479e954 and 6d3826e.

⛔ Files ignored due to path filters (5)
  • apps/example/src/generated/agent-readability.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-nav.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-pages.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-search-content.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-search-index.json is excluded by !**/generated/**
📒 Files selected for processing (23)
  • README.md
  • docs/authoring/components.mdx
  • docs/authoring/frontmatter.mdx
  • docs/build/build-a-docs-site.mdx
  • docs/build/deploy-generated-artifacts.mdx
  • docs/build/framework-matrix.mdx
  • docs/build/generate-static-artifacts.mdx
  • docs/build/optimize-docs-for-agents.mdx
  • docs/build/serve-agent-responses.mdx
  • docs/build/use-the-source-primitive.mdx
  • docs/build/validate-in-ci.mdx
  • docs/docs.config.ts
  • docs/how-it-works.mdx
  • docs/index.mdx
  • docs/methodology.mdx
  • docs/quickstart.mdx
  • docs/reference/cli.mdx
  • docs/reference/evals.mdx
  • docs/reference/mdx.mdx
  • docs/reference/source.mdx
  • docs/sources/collections.mdx
  • docs/sources/configure-sources.mdx
  • packages/leadtype/src/cli.test.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use explicit types for function parameters and return values when they enhance clarity
Prefer unknown over any when the type is genuinely unknown
Use const assertions (as const) for immutable values and literal types
Leverage TypeScript's type narrowing instead of type assertions

Files:

  • packages/leadtype/src/cli.test.ts
  • docs/docs.config.ts
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use meaningful variable names instead of magic numbers - extract constants with descriptive names
Use arrow functions for callbacks and short functions
Prefer for...of loops over .forEach() and indexed for loops
Use optional chaining (?.) and nullish coalescing (??) for safer property access
Prefer template literals over string concatenation
Use destructuring for object and array assignments
Use const by default, let only when reassignment is needed, never var
Always await promises in async functions - don't forget to use the return value
Use async/await syntax instead of promise chains for better readability
Handle errors appropriately in async code with try-catch blocks
Don't use async functions as Promise executors
Remove console.log, debugger, and alert statements from production code
Throw Error objects with descriptive messages, not strings or other values
Use try-catch blocks meaningfully - don't catch errors just to rethrow them
Prefer early returns over nested conditionals for error cases
Extract complex conditions into well-named boolean variables
Use early returns to reduce nesting
Prefer simple conditionals over nested ternary operators
Don't use eval() or assign directly to document.cookie
Avoid spread syntax in accumulators within loops
Use top-level regex literals instead of creating them in loops
Prefer specific imports over namespace imports
Use descriptive names for functions, variables, and types for meaningful naming
Add comments for complex logic, but prefer self-documenting code

Files:

  • packages/leadtype/src/cli.test.ts
  • docs/docs.config.ts
**/*.{test,spec}.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{test,spec}.{js,ts,jsx,tsx}: Write assertions inside it() or test() blocks
Avoid done callbacks in async tests - use async/await instead
Don't use .only or .skip in committed code
Keep test suites reasonably flat - avoid excessive describe nesting

Files:

  • packages/leadtype/src/cli.test.ts
🪛 LanguageTool
docs/build/serve-agent-responses.mdx

[style] ~155-~155: To form a complete sentence, be sure to include a subject or ‘there’.
Context: ..., must-revalidate. readMarkdownFile` may be sync or async. In Node/Bun, read fro...

(MISSING_IT_THERE)


[style] ~155-~155: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ..., fetch from KV/R2 or an asset binding. In Vercel Edge, fetch from the deployment'...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~175-~175: You have already used ‘right’ in nearby sentences. Consider using an alternative word to let your writing stand out and sound more polished.
Context: ...ew, staging, and prod all advertise the right URLs without per-environment config. T...

(REP_RIGHT)

🔇 Additional comments (20)
docs/build/validate-in-ci.mdx (1)

54-86: LGTM!

docs/docs.config.ts (1)

15-86: LGTM!

Also applies to: 96-144

docs/reference/cli.mdx (1)

12-12: LGTM!

Also applies to: 47-47, 161-161

docs/reference/evals.mdx (1)

8-8: LGTM!

Also applies to: 19-23

docs/reference/mdx.mdx (1)

8-8: LGTM!

README.md (1)

30-30: LGTM!

Also applies to: 36-42, 66-66

packages/leadtype/src/cli.test.ts (1)

204-204: LGTM!

docs/how-it-works.mdx (1)

45-46: LGTM!

Also applies to: 118-137, 161-162

docs/methodology.mdx (1)

26-27: LGTM!

Also applies to: 37-38

docs/index.mdx (1)

3-3: LGTM!

Also applies to: 8-10, 31-45, 51-68

docs/authoring/components.mdx (1)

12-13: LGTM!

docs/quickstart.mdx (1)

3-3: LGTM!

Also applies to: 8-10, 12-13, 18-37, 50-195

docs/build/serve-agent-responses.mdx (1)

1-187: LGTM!

docs/build/optimize-docs-for-agents.mdx (1)

3-3: LGTM!

Also applies to: 10-10, 33-33, 64-67, 107-109

docs/build/build-a-docs-site.mdx (1)

1-64: LGTM!

docs/build/use-the-source-primitive.mdx (1)

1-235: LGTM!

docs/reference/source.mdx (1)

1-226: LGTM!

docs/sources/collections.mdx (1)

1-187: LGTM!

docs/build/generate-static-artifacts.mdx (1)

1-205: LGTM!

docs/sources/configure-sources.mdx (1)

195-195: The bundle documentation link is valid.

The referenced path /docs/package-docs/bundle exists as docs/package-docs/bundle.mdx and is properly configured in the documentation system.

Comment thread docs/build/deploy-generated-artifacts.mdx
Comment on lines +75 to +89
## Nuxt/Nitro

Nuxt Content is a Nuxt CMS. Leadtype is the portable artifact pipeline: use it when the same source needs framework-agnostic markdown, search JSON, `llms.txt`, and package docs.

Keep Leadtype source loading and adapter helpers in Nitro server files, not Vue client bundles:

```ts title="server/api/docs.get.ts"
import { createLoadPageData } from "leadtype/nuxt";

const source = await getSource();
const loadPageData = createLoadPageData({ source });
```

Use `leadtype/search/vue` for the client search composable.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if leadtype/nuxt adapter exports exist
rg -n "leadtype/nuxt" --type=ts -g '!docs/**' -C3

Repository: inthhq/leadtype

Length of output: 1834


Update use-the-source-primitive.mdx: the leadtype/nuxt adapter already exists.

The framework-matrix.mdx example correctly imports createLoadPageData from leadtype/nuxt, which is an existing adapter used in production code (e.g., apps/nuxt-example/server/api/docs.get.ts). However, use-the-source-primitive.mdx still refers to it as a "future adapter" on line 204. Remove the "future adapter" language to reflect current state.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/build/framework-matrix.mdx` around lines 75 - 89, The text in
use-the-source-primitive.mdx incorrectly calls the leadtype/nuxt adapter a
"future adapter"; update the copy to reflect that the adapter already exists in
production by removing the "future adapter" language and instead state that
createLoadPageData from "leadtype/nuxt" is available (as used in
apps/nuxt-example/server/api/docs.get.ts), and adjust any example text
referencing createLoadPageData to present it as an existing adapter rather than
a future one.

Comment thread docs/quickstart.mdx Outdated
Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Two regressions worth fixing before merge: the new explicit Reference nav drops the just-added frontmatter-transformers page, and one quickstart card link points to a slug that doesn't exist in the regenerated nav. Both are anchored inline.

TL;DR — Reorganizes the docs around an "agent-ready site" workflow, adds docs/sources/configure-sources.mdx, splits runtime serving out of optimize-docs-for-agents.mdx into a new serve-agent-responses.mdx, and refreshes copy across the build/source/quickstart pages around site mode, bundle mode, and Agent Readability.

Key changes

  • New nav shape in docs/docs.config.ts — Start / Build an Agent-Ready Site / Docs Sources / Package Docs for Agents / Author Content / Reference, and expanded bestStartingPoints with per-entry title and description.
  • Split runtime serving into docs/build/serve-agent-responses.mdx — middleware, JSON-LD, sitemap/robots regenerators move out of optimize-docs-for-agents.mdx and cross-link both ways.
  • Add docs/sources/configure-sources.mdx — task-led source guide covering single folder, --docs-dir mounts, and remote git collections.
  • Refresh framework coverage — Vite-only and "any other host" sections removed; explicit recipes for Next, TanStack Start, Nuxt, Astro, SvelteKit, Fumadocs replace them across build-a-docs-site, use-the-source-primitive, framework-matrix, deploy-generated-artifacts.
  • Regenerate apps/example/src/generated/* and align cli.test.ts — picks up the renamed page title Build an agent-ready docs site.

Summary | 28 files | 4 commits | base: mainKayleeWilliams/restructure-docs-2


Reference nav drops frontmatter-transformers

Before: Reference used pages: [{ include: "*" }], so any new docs/reference/*.mdx (including the just-merged frontmatter-transformers.mdx from #58) was picked up automatically.
After: Reference is now an explicit list that omits frontmatter-transformers.

Confirmed by the regenerated artifacts in this PR: apps/example/src/generated/docs-pages.json and docs-nav.json both have zero occurrences of frontmatter-transformers, so the page won't render in the sidebar or appear in the agent-readability manifest.

docs/docs.config.ts · apps/example/src/generated/docs-nav.json


Quickstart SvelteKit card anchor doesn't match generated slug

Before: href="/docs/build/use-the-source-primitive#sveltekit-mdsvex" (single dash) — matched the slug Leadtype's slugger produces.
After: href="/docs/build/use-the-source-primitive#sveltekit--mdsvex" (double dash) — anchor doesn't exist.

The regenerated docs-nav.json and agent-readability.json from this PR both record the slug as #sveltekit-mdsvex for the ### SvelteKit + mdsvex heading, so the new link will land on the page top instead of the section.

docs/quickstart.mdx


bestStartingPoints title leaks editorial shorthand

Before: No per-entry title or description in bestStartingPoints.
After: Each entry gets a curated title/description that feeds the Agent Readability manifest.

Most entries match the underlying page title cleanly. The Build a docs site (router) entry stands out — the page title is Build an agent-ready docs site, and (router) is unexplained jargon agents and humans will see in the manifest.

docs/docs.config.ts

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using Claude Opus𝕏

Comment thread docs/docs.config.ts
Comment on lines 132 to +144
base: "reference",
pages: [{ include: "*" }],
pages: [
"architecture",
"cli",
"source",
"llm",
"convert",
"lint",
"mdx",
"remark",
"search",
"evals",
],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

frontmatter-transformers is missing from this explicit list. The previous shape pages: [{ include: "*" }] auto-included every docs/reference/*.mdx, so the new frontmatter-transformers.mdx page added in #58 no longer appears in the Reference sidebar or the agent-readability manifest (verified: zero matches in the regenerated docs-pages.json / docs-nav.json). Add it to the list, or revert to a glob include for Reference.

Comment thread docs/quickstart.mdx Outdated
title="SvelteKit"
description="mdsvex preprocessor + createMdxSourcePlugins()."
href="/docs/build/use-the-source-primitive#sveltekit-mdsvex"
href="/docs/build/use-the-source-primitive#sveltekit--mdsvex"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anchor mismatch: the regenerated docs-nav.json shows the actual slug is #sveltekit-mdsvex (single dash), not #sveltekit--mdsvex. Leadtype's slugger collapses + and surrounding whitespace into a single -. The previous single-dash form was correct.

Suggested change
href="/docs/build/use-the-source-primitive#sveltekit--mdsvex"
href="/docs/build/use-the-source-primitive#sveltekit-mdsvex"

Comment thread docs/docs.config.ts Outdated
},
{
urlPath: "/docs/build/build-a-docs-site",
title: "Build a docs site (router)",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The (router) suffix is inconsistent with the page's real title (Build an agent-ready docs site) and is unexplained jargon as it appears in the agent-readability manifest. Consider aligning with the page title, e.g. Build an agent-ready docs site, or dropping the parenthetical.

Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No new issues. Reviewed the following changes:

  • Restored frontmatter-transformers in the explicit Reference nav so the just-merged page reappears in the sidebar and Agent Readability manifest.
  • Fixed the quickstart SvelteKit card anchor from #sveltekit--mdsvex to #sveltekit-mdsvex to match the slug in the regenerated artifacts.
  • Renamed the bestStartingPoints entry from "Build a docs site (router)" to "Build an agent-ready docs site".
  • Added the missing h3 import to the TanStack Start middleware example and expanded the quickstart bestStartingPoints snippet with title and description fields.
  • Reframed TanStack Start, Nuxt, SvelteKit, and Astro guidance from "future adapter" language to concrete adapter helpers (createLoadPageData, createEntries, createDocsServerHandler, Nitro handlers), and switched architecture.mdx from "Planned adapter shapes" to "Adapter shapes" — verified each named export exists.
  • Regenerated apps/example/src/generated/* to track the nav, slug, and adapter copy changes.

Pullfrog  | View workflow run | Using Claude Opus𝕏

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/build/deploy-generated-artifacts.mdx`:
- Around line 103-124: The example middleware calls createAgentMarkdownResponse
and passes readMarkdownFile but never defines or imports readMarkdownFile; add a
function (e.g., readMarkdownFile) that reads markdown from your docs folder and
import node fs/path as needed, then pass that function into
createAgentMarkdownResponse; reference the manifest constant and the
eventHandler wrapper so the fix adds a docsRoot (or equivalent) path resolver
and an async readMarkdownFile(relativePath: string) that returns the file
contents (utf8) for the given relativePath before exporting the eventHandler.

In `@docs/quickstart.mdx`:
- Around line 189-190: Update the two links that currently point to "Optimize
docs for agents" so they instead point to the new dedicated runtime page "Serve
agent responses" (replace the link text/target "[Optimize docs for
agents](/docs/build/optimize-docs-for-agents)" with the "Serve agent responses"
page link, e.g. "[Serve agent responses](/docs/build/serve-agent-responses)");
search for the literal link text "Optimize docs for agents" in
docs/quickstart.mdx (appears in the sentence about runtime handling for markdown
responses, sitemap/robots regeneration, and JSON-LD and again later) and update
both occurrences to reference the new page and wording.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0c5ed51c-ba30-4564-96b2-e796ad1403b8

📥 Commits

Reviewing files that changed from the base of the PR and between 6d3826e and b3f6d7b.

⛔ Files ignored due to path filters (5)
  • apps/example/src/generated/agent-readability.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-nav.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-pages.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-search-content.json is excluded by !**/generated/**
  • apps/example/src/generated/docs-search-index.json is excluded by !**/generated/**
📒 Files selected for processing (6)
  • docs/build/deploy-generated-artifacts.mdx
  • docs/build/use-the-source-primitive.mdx
  • docs/docs.config.ts
  • docs/quickstart.mdx
  • docs/reference/architecture.mdx
  • docs/sources/configure-sources.mdx
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use explicit types for function parameters and return values when they enhance clarity
Prefer unknown over any when the type is genuinely unknown
Use const assertions (as const) for immutable values and literal types
Leverage TypeScript's type narrowing instead of type assertions

Files:

  • docs/docs.config.ts
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use meaningful variable names instead of magic numbers - extract constants with descriptive names
Use arrow functions for callbacks and short functions
Prefer for...of loops over .forEach() and indexed for loops
Use optional chaining (?.) and nullish coalescing (??) for safer property access
Prefer template literals over string concatenation
Use destructuring for object and array assignments
Use const by default, let only when reassignment is needed, never var
Always await promises in async functions - don't forget to use the return value
Use async/await syntax instead of promise chains for better readability
Handle errors appropriately in async code with try-catch blocks
Don't use async functions as Promise executors
Remove console.log, debugger, and alert statements from production code
Throw Error objects with descriptive messages, not strings or other values
Use try-catch blocks meaningfully - don't catch errors just to rethrow them
Prefer early returns over nested conditionals for error cases
Extract complex conditions into well-named boolean variables
Use early returns to reduce nesting
Prefer simple conditionals over nested ternary operators
Don't use eval() or assign directly to document.cookie
Avoid spread syntax in accumulators within loops
Use top-level regex literals instead of creating them in loops
Prefer specific imports over namespace imports
Use descriptive names for functions, variables, and types for meaningful naming
Add comments for complex logic, but prefer self-documenting code

Files:

  • docs/docs.config.ts
🔇 Additional comments (5)
docs/build/deploy-generated-artifacts.mdx (1)

9-9: LGTM!

Also applies to: 97-101, 127-127, 221-223, 225-226, 256-263

docs/build/use-the-source-primitive.mdx (1)

3-3: LGTM!

Also applies to: 8-8, 191-191, 193-205, 206-219, 232-235

docs/reference/architecture.mdx (1)

43-59: LGTM!

docs/sources/configure-sources.mdx (1)

1-215: LGTM!

docs/docs.config.ts (1)

15-87: LGTM!

Also applies to: 96-129, 133-145

Comment thread docs/build/deploy-generated-artifacts.mdx
Comment thread docs/quickstart.mdx Outdated
Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No new issues. Reviewed the following changes:

  • Added a concrete readMarkdownFile implementation to the TanStack Start middleware example, with imports for node:fs/promises, node:path, and the MarkdownMirrorTarget type — verified the type is re-exported from leadtype/llm/readability.
  • Renamed the two "Optimize docs for agents" links in quickstart.mdx (the inline next-step sentence and the "Common next steps" table row) to "Serve agent responses", pointing at the new dedicated runtime page.
  • Regenerated apps/example/src/generated/* to track the renamed links.

Pullfrog  | View workflow run | Using Claude Opus𝕏

@KayleeWilliams KayleeWilliams merged commit a5549d6 into main May 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant