software-implementation

Write minimal production code that makes failing TDD tests pass.

902|58|Updated May 31, 2012
One-click install
npx skills add https://github.com/stencila/stencila --skill software-implementation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: software-implementation
Source: https://github.com/stencila/stencila/tree/main/.stencila/skills/software-implementation
Command: npx skills add https://github.com/stencila/stencila --skill software-implementation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

During test-driven development, once failing tests exist, someone must write production code that satisfies them without over-engineering or breaking existing behavior. This Skill automates the green phase of red-green-refactor by interpreting failing test output and producing focused, convention-consistent implementation code.

Core Features & Use Cases

  • Test-driven implementation: Reads failing test output and test files to derive exact signatures, types, and behaviors the production code must provide.
  • Convention discovery: Inspects build files and existing source code to match the codebase's module layout, naming, error handling, and coding style before writing anything.
  • Compile and parse verification: Runs language-appropriate checks (cargo check, tsc --noEmit, py_compile, go build) and fixes errors before reporting completion.
  • Use Case: Given a Rust test failure reporting that validate_token is missing from the auth module, the Skill studies sibling functions, adds the function with the expected signature and error types, and verifies the crate compiles cleanly.

Quick Start

Given these failing test results and test file paths, write the minimal production code needed to make all the tests pass and verify it compiles.

Frequently Asked Questions about software-implementation

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

FAQPage Schema
How do I make failing TDD tests pass with minimal code?

Read the failing test output and test files to extract the exact signatures and behaviors expected, then write only the production code needed to satisfy those assertions. Follow the existing codebase's conventions and verify the result compiles or parses before running the tests.

What is the green phase of red-green-refactor?

The green phase is the step where you write production code to make previously failing tests pass. The goal is the simplest correct implementation, without adding features, optimizations, or abstractions the tests do not require.

Does this implementation approach work with any programming language?

Yes, it works with any language or framework by first discovering the codebase's build system, module layout, and style. It uses language-appropriate verification such as cargo check for Rust, tsc --noEmit for TypeScript, or py_compile for Python.

Can it handle revision feedback after a partial implementation?

Yes, when feedback from a failed test run or reviewer is provided, it re-reads the previously written files and revises them rather than starting over. It addresses each feedback point against the current test failure output.

What are the limitations of test-driven implementation?

The implementation is intentionally minimal and only covers what the tests assert, so it may need refactoring for broader production use. It does not create or modify tests, and suspected test bugs are reported rather than fixed.