software-engineering-eng-tdd

Locate seams and break dependencies to make legacy code testable.

Updated May 6, 2025
One-click install
npx skills add https://github.com/rodrigo-altissimo/qiartificial --skill software-engineering-eng-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: software-engineering-eng-tdd
Source: https://github.com/rodrigo-altissimo/qiartificial/tree/main/.claude/skills/software-engineering/eng-tdd
Command: npx skills add https://github.com/rodrigo-altissimo/qiartificial --skill software-engineering-eng-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you gain testability and confidence in legacy code by identifying seams, writing characterization tests, and applying safe dependency-breaking techniques before refactoring.

Core Features & Use Cases

  • Seam finding and classification: Identify object, link, and preprocessing seams to pinpoint where behavior can be altered without changing the risky code in place.
  • Characterization-first testing: Capture and lock in current behavior with characterization tests and golden master/approval-style checks for complex outputs.
  • Dependency-breaking strategy: Apply pragmatic approaches (e.g., extract-and-override, parameterize constructor, extract interface, sprout/wrap techniques) to break hard dependencies safely.
  • Test strategy and anti-pattern avoidance: Use risk-based coverage priorities and avoid brittle or misleading test practices (over-mocking, implementation-detail assertions, slow/flaky tests).

Quick Start

Tell the AI: "Find the seams in my legacy function, propose the smallest dependency-breaking technique to make it testable, and write the first characterization test to lock in current behavior."

Frequently Asked Questions about software-engineering-eng-tdd

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

FAQPage Schema
How do I make legacy code testable when it has hard dependencies on databases and APIs?

Break down legacy code testability problems by identifying seams and applying dependency-breaking techniques like extract-and-override to safely decouple hard dependencies without changing behavior.

What is a characterization test and when do I need it for legacy code?

A characterization test captures and locks in current behavior before refactoring. Use it when modifying untestable legacy modules to ensure existing functionality remains unchanged during safe dependency breaking.

What is the best way to break hard dependencies in untestable modules?

Apply pragmatic dependency-breaking techniques such as extract interface, parameterize constructor, and sprout/wrap methods to safely isolate global state and external calls in untestable modules.

How do I find seams in legacy code to safely refactor without changing behavior?

Identify object, link, and preprocessing seams to pinpoint where behavior can be altered without editing risky code in place, enabling safe refactoring of legacy code without changing behavior.

When should I use golden master testing for legacy code refactoring?

Use golden master testing when dealing with complex legacy outputs requiring approval-style checks, capturing current behavior comprehensively before applying dependency-breaking techniques and refactoring.