map-invariants

Map uncovered invariants to existing tests and generate missing test skeletons.

6|3|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/jamesaphoenix/tx --skill map-invariants
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: map-invariants
Source: https://github.com/jamesaphoenix/tx/tree/main/.claude/skills/map-invariants
Command: npx skills add https://github.com/jamesaphoenix/tx --skill map-invariants

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Auto-annotates spec and invariant gaps by linking tests to invariants and inserting [INV-*] tags or @spec markers, reducing manual traceability and improving test coverage.

Core Features & Use Cases

  • Map uncovered invariants to existing tests by analyzing test bodies and source code structure.
  • Annotate tests with [INV-*] tags or add @spec markers to enforce traceability.
  • Generate skeletons for MISSING invariants and assist in stepwise re-discovery workflow in tx.

Quick Start

Run tx spec gaps --doc $ARGUMENTS to identify gaps, then map each invariant to existing tests or add @spec annotations, and generate missing test skeletons if needed.

Frequently Asked Questions about map-invariants

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I map invariants to existing tests and find spec gaps?▼

You can map invariants to tests by analyzing test bodies and source code structure to find gaps, then annotating matched tests with [INV-*] tags or adding @spec comments for traceability.

What is the best way to generate test skeletons for missing invariants?▼

Generating test skeletons for missing invariants involves reading spec gaps, identifying uncovered invariants, and producing skeleton test code for each missing invariant.

How does tagging tests with [INV-*] markers improve test coverage?▼

Tagging tests with [INV-*] markers improves coverage by linking invariants directly to tests, providing a concise summary of coverage gaps and highlighting which invariants still need test skeletons.

Can I use spec annotations to automate invariant traceability in my test suite?▼

Yes, you can automate invariant traceability by inserting @spec annotations and [INV-*] tags into your tests, linking test bodies to invariants and reducing manual traceability effort.

What steps are needed to identify uncovered invariants from spec gaps?▼

Identifying uncovered invariants requires reading spec gaps and test bodies, mapping found invariants to existing test structures, and generating skeletons for any missing invariant coverage.