contract-first-tdd

Implements contract-first development for TDL code with binding, validation, and schema checks.

1|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/stephendor/TDL --skill contract-first-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: contract-first-tdd
Source: https://github.com/stephendor/TDL/tree/main/.agents/skills/contract-first-tdd
Command: npx skills add https://github.com/stephendor/TDL --skill contract-first-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps developers implement or fix TDL code by enforcing contract-first development, ensuring that contracts are resolved before any implementation code is written.

Core Features & Use Cases

  • Contract-First Development: Ensures that contracts are defined and validated before implementation, improving code quality and reliability.
  • Public/Scientific Interface Tests: Tests the public or scientific interface of the code, not private internals, for better maintainability.
  • Guardrails and Checklists: Provides guardrails and checklists to ensure compliance with best practices and prevent common errors.
  • Integration Checks: Runs contract binding, validation, and result schema/provenance checks to ensure code correctness.

Quick Start

Run the contract-first-tdd skill to implement a new feature in your TDL code, ensuring that contracts are defined and validated before writing any implementation code.

Frequently Asked Questions about contract-first-tdd

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

FAQPage Schema
What is contract-first development for TDL code?

Contract-first development for TDL code requires defining and validating contracts before writing implementation. It improves code quality by ensuring correctness upfront, using guardrails and checklists to prevent common errors during development.

How do I implement contract-first test-driven development in TDL?

To implement contract-first TDD in TDL, define contracts first, then run contract binding and validation checks. Test public or scientific interfaces rather than private internals, and use provided guardrails and checklists to ensure compliance with best practices.

Does contract-first testing target private internals or public interfaces?

Contract-first testing targets public or scientific interfaces, not private internals. Testing public interfaces improves maintainability by focusing on external behavior and contract compliance rather than internal implementation details.

What checks are included in contract-first TDL validation?

Contract-first TDL validation includes contract binding, contract validation, and result schema and provenance checks. These integration checks ensure that the code adheres to defined contracts and produces correct, verifiable results.

Why should I use contracts before writing implementation code?

Using contracts before implementation ensures correctness by resolving requirements upfront. This practice improves code quality and reliability, provides guardrails against common errors, and validates that code meets defined specifications before execution.

Can I use contract-first development for fixing existing TDL code?

Yes, contract-first development can be used to implement or fix TDL code. By enforcing contract resolution before implementation, it ensures that fixes adhere to validated contracts, improving reliability and preventing regression in existing code.