Skills

Software Implementation

Write the minimal production code needed to make failing TDD tests pass (Green phase of...

Install

npx skills add stencila/stencila --skill software-implementation -g -a claude-code -y
Repository
stencila/stencila914
Category
Testing
Updated
3d ago
License
Apache-2.0
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Write the minimal production code needed to make failing TDD tests pass (Green phase of red-green-refactor). Use when failing tests exist and production code must be written or modified to satisfy them. Reads and interprets failing test output, discovers codebase conventions (module layout, naming, import patterns, error handling, coding style), writes focused production code that satisfies test expectations without over-engineering, integrates new code with existing modules, types, and APIs, handles revision feedback from failed test runs, and verifies implementation compiles or parses before handing off to test execution. Works with any language or framework.

Overview

Write the minimal production code needed to make failing TDD tests pass. This skill handles the "green" phase of a red-green-refactor cycle: given failing test output, test file paths, and slice context, it discovers the codebase's conventions, writes or modifies production code so the tests pass, and verifies the code compiles or parses cleanly.

The core principles are:

  • Discover first, prescribe only as fallback. Adapt to whatever language, framework, and conventions the codebase already uses.
  • Minimal and sufficient. Write exactly the code needed to make the failing tests pass, no more, no less. Do not add features, optimizations, or abstractions beyond what the tests require.
  • Tests are the specification. The failing test output defines what the code must do. Do not second-guess the tests or add untested behavior.

The implementation must:

  • Make all specified failing tests pass
  • Follow the codebase's existing conventions (naming, module layout, error handling, coding style)
  • Compile or parse without errors or warnings where possible
  • Integrate cleanly with existing modules, types, and APIs
  • Not break any existing tests

Required Inputs

This skill requires the following information to operate:

Read the whole SKILL.md on GitHub

More in Testing