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

generate-contract-docs
contractspec generate

Expected output: Markdown in generated/docs.

2) Build the docs index

docs-generate
bun docs:generate
# versioned output
bun docs:generate -- --version v1.0.0

This writes docs-index.manifest.json and chunkeddocs-index.*.json files in the generated docs bundle.

3) Wire reference routes

docs-reference-route
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 adds
OSS docsbuildStart with OSS. Adopt Studio when you want the operating layer.

Why ContractSpec

Keep educational and comparison content reachable without letting it define the primary OSS learning path.