# AI spec coverage mapper

> AI spec coverage mapper is an open-source agent skill for developer tools. Maps existing tests to spec requirements and names the uncovered ones. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/testland/qa/tree/main/plugins/qa-ai-assisted/skills/ai-spec-coverage-mapper
- **Repository:** https://github.com/testland/qa
- **GitHub stars:** 18
- **License:** MIT
- **Skill name:** ai-spec-coverage-mapper
- **Collection:** https://github.com/testland/qa
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill takes a spec document and an existing test suite and works out which spec sections, identified by their AC IDs, each test covers. The mapping is semantic rather than line-based, so it can flag a test that exercises a requirement but asserts different wording than the spec, as well as requirements with no test at all. The output is a coverage matrix per ID with a tier for full, partial or no coverage, plus a list of gaps to act on.

The workflow is to point the mapper at the spec file and test file globs, set the pattern used to extract AC IDs, and run an LLM over the spec and tests together. The guidance recommends scheduling it regularly, comparing runs to track coverage trends, and spot-checking the model's full-coverage claims before relying on them. The skill does not generate new tests; it leaves authoring tests for gaps to a separate generator skill.

It expects a spec written with clearly numbered acceptance criteria and a test suite with descriptive test names. The worked example uses a Python script calling an OpenAI chat model, with YAML-style inputs for spec path and test globs.

## When your agent uses it

> Use when a spec and a test suite both exist but nobody can say which requirements are covered, before a release sign-off, an audit or planning test effort. Uses an LLM to map existing tests to spec sections, outputs a coverage matrix per spec ID and names the gaps. It does not write new tests.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/testland/qa/tree/HEAD/plugins/qa-ai-assisted/skills/ai-spec-coverage-mapper)
- [License: MIT](https://github.com/testland/qa/tree/HEAD/plugins/qa-ai-assisted/skills/ai-spec-coverage-mapper)

## Features

- **Semantic test-to-spec mapping:** Matches each acceptance criterion to the existing tests that exercise it, based on meaning rather than code lines.
- **Per-ID coverage matrix:** Lists each spec ID with a full, partial or none tier and the covering test names.
- **Gap identification:** Flags partially covered and uncovered requirements, including wording drift between spec and assertions.
- **Action item generation:** Turns each partial or uncovered row into a concrete follow-up item for the team.
- **Coverage trend tracking:** Compares runs over time to show changes in the number of criteria and the share fully covered.
- **Verification guidance:** Advises spot-checking the model's full-coverage claims and scheduling repeated runs.

## Good for

- Check which checkout requirements are covered before a release sign-off
- Find spec acceptance criteria that have no matching test
- Prepare spec-to-test traceability evidence for an audit
- Spot tests that assert old wording after an acceptance criterion changed
- Plan the next test effort by listing the uncovered requirements

## Install

### Claude Code

This skill ships in the `qa-ai-assisted` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add testland/qa
/plugin install qa-ai-assisted@testland-qa
```

Or copy only this skill to `~/.claude/skills/ai-spec-coverage-mapper`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/ai-spec-coverage-mapper &&
cp -R "$tmp/plugins/qa-ai-assisted/skills/ai-spec-coverage-mapper" ~/.claude/skills/ai-spec-coverage-mapper &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/ai-spec-coverage-mapper` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/ai-spec-coverage-mapper` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/ai-spec-coverage-mapper &&
cp -R "$tmp/plugins/qa-ai-assisted/skills/ai-spec-coverage-mapper" ~/.agents/skills/ai-spec-coverage-mapper &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/ai-spec-coverage-mapper` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/ai-spec-coverage-mapper` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/ai-spec-coverage-mapper &&
cp -R "$tmp/plugins/qa-ai-assisted/skills/ai-spec-coverage-mapper" ~/.cursor/skills/ai-spec-coverage-mapper &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/ai-spec-coverage-mapper` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/testland/qa.git --path plugins/qa-ai-assisted/skills/ai-spec-coverage-mapper
```

Or copy the folder to `~/.gemini/skills/ai-spec-coverage-mapper` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/ai-spec-coverage-mapper`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/testland/qa.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/ai-spec-coverage-mapper &&
cp -R "$tmp/plugins/qa-ai-assisted/skills/ai-spec-coverage-mapper" ~/.copilot/skills/ai-spec-coverage-mapper &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/ai-spec-coverage-mapper` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/testland/qa.git
```

Then copy `qa/plugins/qa-ai-assisted/skills/ai-spec-coverage-mapper` into your agent's skills folder as `ai-spec-coverage-mapper`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does AI spec coverage mapper write new tests?

No. It maps tests that already exist and names the gaps. Writing tests for those gaps is handled by the separate ai-test-generator skill.

### What inputs does AI spec coverage mapper need?

A spec document, globs matching the test files, and a pattern for extracting AC IDs from the spec.

### Is the mapping always accurate?

No. The LLM reads code without running it, so a test that throws at runtime may still be marked covered. The guidance recommends verifying high-priority claims.

### Which tools does the worked example use?

The example is a Python script calling an OpenAI chat model, with the spec and test files supplied as input text.

### How do I install AI spec coverage mapper in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/ai-spec-coverage-mapper to use it in all your projects, or to .claude/skills/ai-spec-coverage-mapper in one project. Or install the qa-ai-assisted plugin, which includes it: /plugin marketplace add testland/qa, then /plugin install qa-ai-assisted@testland-qa.

### Does AI spec coverage mapper run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use AI spec coverage mapper?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to AI spec coverage mapper?

The closest alternatives to AI spec coverage mapper are Spec, Spec conformance check, Spec driven development, Test coverage analysis and Mt spec.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Spec](https://ai-powered.com/skills/spec-jasgujral): Spec is an open-source agent skill for developer tools.
- [Spec conformance check](https://ai-powered.com/skills/spec-conformance-check): Spec conformance check is an open-source agent skill for developer tools.
- [Spec driven development](https://ai-powered.com/skills/spec-driven-development-addyosmani): Spec driven development is an open-source agent skill for developer tools.
- [Test coverage analysis](https://ai-powered.com/skills/test-coverage-analysis): Test coverage analysis is an open-source agent skill for developer tools.
- [Mt spec](https://ai-powered.com/skills/mt-spec): Mt spec is an open-source agent skill for developer tools.
- [Vibe coverage enforcer](https://ai-powered.com/skills/vibe-coverage-enforcer): Vibe coverage enforcer is an open-source agent skill for developer tools.
- [AI test generator](https://ai-powered.com/skills/ai-test-generator): AI test generator is an open-source agent skill for developer tools.
- [Update specification](https://ai-powered.com/skills/update-specification): Update specification is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/ai-spec-coverage-mapper
