spec-tests

Evaluate intent and assertions in specification tests with dry-run IR debugging.

Updated Jan 3, 2026
One-click install
npx skills add https://github.com/ianphil/my-skills --skill spec-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spec-tests
Source: https://github.com/ianphil/my-skills/tree/main/spec-tests
Command: npx skills add https://github.com/ianphil/my-skills --skill spec-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Intent-based specification tests address the gap between what code does and why it matters, ensuring LLM-driven development preserves business goals and prevents testers from altering thresholds or requirements to pass.

Core Features & Use Cases

  • Dual evaluation of both intent and assertion for each test to prevent gaming.
  • Supports multi-target specs, rerun of failed tests, and an IR/dry-run view for debugging.
  • Integrates with the existing SKILL/docs to enforce per-test intent and code blocks.

Quick Start

Create a spec file with a frontmatter target, an H3 test name, an explicit intent above its code block, and a fenced assertion block.

Frequently Asked Questions about spec-tests

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

FAQPage Schema
What are intent-based specification tests in TDD?

Intent-based specification tests evaluate both why a feature matters and what it must do, preventing testers or LLMs from altering thresholds to game the system and ensuring development preserves business goals.

How do I write a spec test file for AI-assisted testing?

Create a spec test file by defining a frontmatter target, adding an H3 test name, stating an explicit intent above the code block, and including a fenced assertion block to enforce per-test intent.

Can I debug failed specification tests using a dry-run view?

Yes, you can debug failed specification tests using the provided IR or dry-run view. The framework supports rerunning failed tests and offers this intermediate representation to inspect multi-target specs during debugging.

How do I prevent LLM-generated code from drifting from business requirements?

You prevent LLM-generated code drift by adopting intent-driven spec tests that enforce dual evaluation of both feature intent and assertions, bridging the gap between what code does and why it matters for quality assurance.

Does intent-testing support multiple targets within a single spec?

Yes, intent-testing supports multi-target specs within a single file. You can define multiple targets in the frontmatter and evaluate their specific intents and assertions, rerunning only the failed tests as needed.