> ## Documentation Index
> Fetch the complete documentation index at: https://xspec.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# xspec: Requirement Traceability for MDX Specs

> xspec turns MDX specification documents into a typed, queryable dependency graph — linking every requirement to the code that implements and tests it.

xspec is a CLI tool that bridges the gap between written requirements and the code that delivers them. You define your specifications as MDX documents, run `xspec build`, and get back a fully typed TypeScript module for each spec file — giving you import-time references that your compiler can check, your coverage tool can measure, and your CI pipeline can gate on. Instead of relying on naming conventions or manual bookkeeping, xspec builds an explicit graph that makes requirement traceability a first-class part of your development workflow.

<CardGroup cols={2}>
  <Card title="Introduction" icon="book-open" href="/introduction">
    Learn what xspec is, why it exists, and the core ideas behind typed requirement traceability.
  </Card>

  <Card title="Quickstart" icon="bolt" href="/quickstart">
    Install xspec and trace your first requirement from spec to code to coverage in under ten minutes.
  </Card>

  <Card title="Writing Specs" icon="pen-to-square" href="/writing-specs/mdx-syntax">
    Discover the MDX syntax for authoring nested, tagged, richly linked specification documents.
  </Card>

  <Card title="CLI Reference" icon="terminal" href="/cli/overview">
    Explore every xspec command: build, check, coverage, impact, and more.
  </Card>
</CardGroup>

## Get up and running in four steps

Whether you are adding xspec to an existing project or starting fresh, the onboarding path is the same short sequence below.

<Steps>
  <Step title="Install xspec">
    Clone the repository, build it, and link the binary onto your `PATH` with `npm link`.
  </Step>

  <Step title="Create your config">
    Add an `xspec.config.ts` file at the root of your workspace that points xspec at your spec files, source code, and test files.
  </Step>

  <Step title="Write your first spec">
    Author an MDX file under your `specs/` directory using the `<S>` component to declare nested, identifiable requirements.
  </Step>

  <Step title="Build and measure">
    Run `xspec build` to generate typed modules and the project graph, then `xspec coverage tested --check` to enforce that every requirement is tested.
  </Step>
</Steps>
