specification-driven-tdd

Enforce a contract-first testing workflow for JavaScript and TypeScript projects.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/ReadyStateChange/agents --skill specification-driven-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: specification-driven-tdd
Source: https://github.com/ReadyStateChange/agents/tree/main/skills/specification-driven-tdd
Command: npx skills add https://github.com/ReadyStateChange/agents --skill specification-driven-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces a contract-first testing workflow where a formal specification drives every test and production code.

Core Features & Use Cases

  • Establish an implementation-independent specification before tests to lock in observable behavior.
  • Write a failing contract test derived from the specification, then implement the minimum production code to satisfy it.
  • Refactor after passing tests to improve structure while preserving contract and observable outcomes.
  • Follow approved testing guidance for JavaScript/TypeScript and avoid asserting implementation details beyond the specification.

Quick Start

Write or confirm a specification first, then write a failing contract test, implement the minimum code to pass, and refactor without changing observable behavior.

Frequently Asked Questions about specification-driven-tdd

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

FAQPage Schema
What is contract-first testing in JavaScript and TypeScript?

Contract-first testing requires writing a formal specification before tests, ensuring tests validate only observable behavior and lock in implementation-independent contracts for JavaScript and TypeScript projects.

How do I write tests from a specification instead of implementation details?

To write tests from a specification, define the expected behavior first, create a failing contract test reflecting only that spec, implement the minimal code to pass, and refactor while preserving the contract.

Can I use specification-driven TDD to refactor existing TypeScript code?

Yes, specification-driven TDD supports refactoring by improving code structure after tests pass, provided the refactor preserves the contract and observable outcomes defined by the original specification.

Why do my TDD tests keep breaking when I refactor?

Tests break during refactoring when they assert implementation details beyond the specification; specification-driven testing prohibits testing internal logic beyond what the specification promises to ensure refactor safety.

Does contract-first testing require approved JavaScript testing guidance?

Yes, contract-first testing requires alignment with approved testing guidance shaped by javascript-testing-expert, ensuring teams follow established JavaScript and TypeScript testing standards and avoid implementation assertions.