What Is SPECTRA?
SPECTRA reads your product documentation, generates versioned Markdown test cases, verifies every step with an independent critic, and executes them through a deterministic state machine. Your docs already describe how the product should behave. SPECTRA turns that into a suite you can review, version and trace.
It makes no model calls of its own. Analysis, generation and verification run inside your coding agent (Claude Code, Cursor, GitHub Copilot, Codex CLI or Gemini CLI) through skills and a critic subagent that SPECTRA installs into your repository.
In this article we’ll take the documentation of the Windows Calculator demo and go all the way: analyze, generate, verify, execute and trace.
Why Do You Need SPECTRA?
| Hand-written test cases | SPECTRA | |
|---|---|---|
| Source of truth | Tester memory | Your docs, indexed |
| Time to a first suite | Days | Minutes |
| Invented steps | Unchecked | Rejected by the critic |
| Boundary data | Picked by hand | Supplied by Testimize |
| Coverage | A spreadsheet | Docs, criteria and automation on one dashboard |
Getting Started
Install the CLI, initialize the repository and index your documentation.
dotnet tool install -g Spectra.CLI
spectra init
spectra docs index
spectra init creates the configuration, the folders, the skills and the critic subagent.
my-project/
├── spectra.config.json
├── docs/
│ ├── _index/
│ └── criteria/_criteria_index.yaml
├── test-cases/
├── .claude/
│ ├── agents/spectra-critic.agent.md
│ └── skills/spectra-*/SKILL.md
└── templates/bug-report.md
Step 1: Analyze
In your IDE, ask the coding agent for test cases. SPECTRA first analyzes the indexed docs, groups the behaviors by the categories in your configuration, and recommends a count before anything is written.
Create test cases for the standard calculator
| Category | Recommended |
|---|---|
| happy_path | 82 |
| negative | 34 |
| boundary | 38 |
| edge_case | 30 |
| error_handling | 24 |
| keyboard_interaction | 28 |
| Total | 236 |
You confirm or change the number. Nothing is generated until you do.
Step 2: Generate, With Testimize Boundaries
Test cases are written in batches. For every boundary or equivalence case, SPECTRA asks Testimize for the values and puts them into the prompt verbatim, so a test for “the input accepts up to 16 digits” really uses 16 and 17 digits, not whatever the model remembers.
Every test case is a Markdown file with YAML frontmatter. It lives in Git next to your code and diffs like code.
---
id: TC-999
title: Verify division by zero displays an error
priority: high
category: error_handling
source: docs/standard-calculator.md#error-handling
---
## Preconditions
Calculator is open in Standard mode and displays 0
## Steps
1. Enter 10
2. Press ÷
3. Enter 0
4. Press =
## Expected Result
Display shows "Cannot divide by zero" without crashing
Step 3: Verify With an Independent Critic
A separate critic subagent checks every step and expected result against the source docs. It runs with its own context and never sees the generator’s reasoning, only the step and the documentation. Each test case gets a verdict.
| Verdict | Meaning | What happens |
|---|---|---|
| Grounded | Every step is supported by the docs | Kept |
| Partial | Some steps are supported, some are assumptions | Kept and flagged for review |
| Hallucinated | Contradicts or invents behavior | Rejected |
In the Calculator run, 236 test cases were requested, 189 came back grounded and 13 were flagged. One draft claimed that division by zero shows infinity; the docs say the display shows an error. The critic rejected it.
Note
A rejected test case is a feature, not a failure. Every hallucination the critic catches is one your testers would otherwise have executed and argued about.
The suite is also validated structurally, so broken frontmatter or duplicate IDs never reach the run.
spectra validate
Step 4: Execute and Ask
Tell SPECTRA what changed and it picks what to run. After a change to how Calculator handles division by zero, it searches the suite for the affected cases, starts a run and opens the execution console.
We changed how Calculator handles division by zero. What should I run?
Testers record each verdict in the console. If a step is unclear, they ask in the chat and the answer comes from the source docs, not from memory. At the end, SPECTRA finalizes the run and writes an HTML report with pass rate, timing and every result, ready to attach to the release.
Test cases that need automating can be handed straight to the BELLATRIX Agent, which runs them on the live app and writes the automated test, tagged with the SPECTRA ID.
Step 5: Trace Coverage
One coverage number hides more than it shows. SPECTRA measures three: how much of the documentation has test cases, how many acceptance criteria are covered, and how much of the suite is automated.
spectra ai analyze --coverage --output-format json
spectra dashboard --output ./site
| Dimension | Calculator demo |
|---|---|
| Documentation coverage | 87.5% |
| Acceptance criteria coverage | 100% |
| Automation coverage | 25.7% |
A GitHub Action can rebuild the dashboard on every push and publish it to Cloudflare Pages behind GitHub sign-in, so only people with access to the repository can see it.
Summary
SPECTRA turns documentation into grounded, versioned test cases, catches what the model invents before a tester ever sees it, runs the suite with answers from the docs, and shows exactly what is still uncovered. Install it, index your docs, and ask your coding agent for your first suite.
