Problem
Leadtype’s artifact pipeline understands the full project config, including multiple collections, remote sync, inherited source config, mounts, navigation, and route prefixes. The human rendering path does not consume that project model as directly.
Today leadtype init writes both:
docs/docs.config.ts with product identity and navigation; and
lib/source.ts with a repeated contentDir, nav, and baseUrl passed to createDocsSource().
For multi-collection public docs apps, the gap is larger: artifact generation is first-class, while human rendering often needs custom MDX maps and app-specific source plumbing. This makes it possible for the rendered site and generated agent artifacts to disagree despite Leadtype’s “one content graph” goal.
Proposal
Add a project-level runtime primitive that loads the same resolved config/source graph used by generation. Possible API directions:
const project = await createDocsProject({ config: docsConfig });
const pages = await project.listPages();
const page = await project.loadPage(slug);
const navigation = await project.getNavigation();
or an equivalent createDocsSourceFromConfig() helper.
Framework adapters should accept this project/source object directly so consumers do not repeat content roots, navigation, mounts, prefixes, or collection wiring.
Required behavior
- Local single-source projects should become simpler than the current
createDocsSource({ contentDir, nav, baseUrl }) scaffold.
- Multi-collection projects should expose one merged, route-aware page API with collection provenance.
- Remote sources should read from the resolved sync cache; runtime request handling must not unexpectedly clone or fetch repositories.
- Source-owned config inheritance must affect both human rendering and generated artifacts identically.
- Route collisions, missing sources, and stale caches must fail with actionable diagnostics.
- Lower-level
createDocsSource() remains supported for custom integrations.
Framework integration
Update first-party adapters and examples so the normal path is:
- load one project config;
- create one resolved docs project/source;
- pass it to Next/Fumadocs/Astro/Nuxt/SvelteKit/TanStack helpers;
- render with the host app’s components and layout.
Leadtype should continue to own no rendered DOM or site theme. This is shared content/runtime state, not a move toward becoming a docs-site framework.
Acceptance criteria
Problem
Leadtype’s artifact pipeline understands the full project config, including multiple collections, remote sync, inherited source config, mounts, navigation, and route prefixes. The human rendering path does not consume that project model as directly.
Today
leadtype initwrites both:docs/docs.config.tswith product identity and navigation; andlib/source.tswith a repeatedcontentDir,nav, andbaseUrlpassed tocreateDocsSource().For multi-collection public docs apps, the gap is larger: artifact generation is first-class, while human rendering often needs custom MDX maps and app-specific source plumbing. This makes it possible for the rendered site and generated agent artifacts to disagree despite Leadtype’s “one content graph” goal.
Proposal
Add a project-level runtime primitive that loads the same resolved config/source graph used by generation. Possible API directions:
or an equivalent
createDocsSourceFromConfig()helper.Framework adapters should accept this project/source object directly so consumers do not repeat content roots, navigation, mounts, prefixes, or collection wiring.
Required behavior
createDocsSource({ contentDir, nav, baseUrl })scaffold.createDocsSource()remains supported for custom integrations.Framework integration
Update first-party adapters and examples so the normal path is:
Leadtype should continue to own no rendered DOM or site theme. This is shared content/runtime state, not a move toward becoming a docs-site framework.
Acceptance criteria
contentDir, navigation, and route configuration outside its Leadtype config.llms.txt/ Agent Readability navigation come from the same resolved graph.