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

# Specs

> A spec is a plain-language description of what your agents are supposed to do - the rubric Glassray finds deviations against.

A **spec** is a generated, plain-language description of what your agents are *supposed* to do. It's the **rubric** Glassray judges your traces against when it looks for [deviations](/deviations).

## Where a spec comes from

Glassray builds the spec from your code. You provide that intent one of two ways:

* **[Connect GitHub](/github)** and Glassray reads your repo and generates the spec (about 3–5 minutes).
* **Bring your own spec** (below) - generate it yourself and import the finished markdown.

A spec is tied to a repository and branch. You can generate new specs as your code changes; older specs stay as history.

## Bring your own spec

If you'd rather not connect your repository, produce the spec yourself and import it:

<Steps>
  <Step title="Generate the spec" icon="wand-magic-sparkles">
    Write it, or have your own coding agent generate it from your code.
  </Step>

  <Step title="Import it" icon="file-arrow-up">
    On the **Deviations** page, choose **Import spec**, paste the finished spec markdown, and enter your repo name (`owner/repo`).
  </Step>

  <Step title="Ready to use" icon="circle-check">
    Glassray saves it as a ready spec - no generation step - and can immediately find [deviations](/deviations) against it.
  </Step>
</Steps>

## What it's used for

<CardGroup cols={2}>
  <Card title="Finds deviations" icon="ghost">
    Glassray scans your traces against the spec and surfaces recurring [deviations](/deviations).
  </Card>

  <Card title="Readable anywhere" icon="book-open">
    Read the spec in the dashboard, or over the [MCP server](/mcp-server) with `get_spec` and `list_specs`.
  </Card>
</CardGroup>

<Tip>
  No spec yet? [Connect GitHub](/github) and Glassray generates one for you.
</Tip>
