OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Build the docs pipeline
Generate reference docs, chunk the index, and wire the docs pages the same way this repo does.
What you'll build
- Generated Markdown and a chunked index manifest.
- Reference routes powered by the docs loader.
- Versioned outputs you can publish per release.
1) Generate contract docs
contractspec generateExpected output: Markdown in generated/docs.
2) Build the docs index
bun docs:generate
# versioned output
bun docs:generate -- --version v1.0.0This writes docs-index.manifest.json and chunkeddocs-index.*.json files in the generated docs bundle.
3) Wire reference routes
import { notFound } from "next/navigation";
import {
DocsReferenceIndexPage,
DocsReferencePage,
getGeneratedDocById,
listGeneratedDocs,
} from "@contractspec/bundle.library";
export async function generateStaticParams() {
const docs = await listGeneratedDocs();
return docs.map((doc) => ({ slug: doc.id.split("/") }));
}
export default async function Page({ params }: { params: { slug?: string[] } }) {
const slug = params.slug?.join("/") ?? "";
const doc = await getGeneratedDocById(slug);
if (!doc) notFound();
return <DocsReferencePage entry={doc.entry} content={doc.content} />;
}Use the index page on /docs/reference to render the searchable list.
Repo reference
This repo wires docs under packages/apps/web-landing/src/app/docs/reference.
Need decision-to-export automation?
Studio exports evidence-backed spec changes and task packs to Linear, Jira, Notion, and GitHub.
See what Studio addsGenerate docs, clients, and schemas
Export stable docs and client-facing artifacts from the same contract layer.
Libraries overview
Navigate the core libraries, runtimes, and system packages that make up the open foundation.
Why ContractSpec
Keep educational and comparison content reachable without letting it define the primary OSS learning path.