tdd-align

Generate three-layer tests from approved specs into executable test contracts.

8|1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/zxdxjtu/harness --skill tdd-align
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-align
Source: https://github.com/zxdxjtu/harness/tree/main/skills/tdd-align
Command: npx skills add https://github.com/zxdxjtu/harness --skill tdd-align

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generating executable tests from a formal spec to ensure alignment between requirements and implementation.

Core Features & Use Cases

  • Auto-extract acceptance criteria and invariants from approved specs and generate three-layer tests (unit, integration, and end-to-end) with corresponding invariant tests.
  • Maintain strict naming and quality guidelines, including one-assertion focus per test and clear, plain-language descriptions.
  • Auto-detect the project's test framework and adapt test artifacts accordingly, while ensuring tests remain runnable in isolation.

Quick Start

Generate V1, V2, and V3 tests from the approved spec for the provided feature ID, starting with the first AC/INV.

Frequently Asked Questions about tdd-align

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

FAQPage Schema
How do I generate unit, integration, and e2e tests from a spec?

To generate tests from a spec, this skill reads approved markdown specifications, extracts acceptance criteria and invariants, and produces V1 unit, V2 integration, and V3 end-to-end executable test contracts automatically.

What is spec-driven test generation and how does it align requirements with implementation?

Spec-driven test generation converts formal requirements into executable test contracts, ensuring alignment between specifications and implementation by extracting acceptance criteria and invariants directly from the approved spec.

Can I auto-detect my project's test framework when generating tests from markdown specs?

Yes, the test generation process auto-detects the project's test framework and adapts the generated V1, V2, and V3 test artifacts accordingly, ensuring tests remain runnable in isolation within your environment.

Do I need an approved spec before generating unit and integration tests?

Yes, an approved spec is required before proceeding. The tooling reads .harness/specs markdown files, extracts the defined acceptance criteria and invariants, and requires formal approval to generate the three-layer tests.

What are the naming and quality conventions for spec-generated executable test contracts?

Generated executable test contracts follow strict quality guidelines, enforcing one-assertion focus per test and clear, plain-language descriptions to maintain high test quality and readable naming conventions across all layers.

Does spec-driven testing support invariant tests alongside standard three-layer tests?

Yes, alongside V1 unit, V2 integration, and V3 end-to-end tests, the generation process specifically extracts invariants from the approved spec and produces corresponding invariant tests to enforce strict system rules.