Engineering
tdd-london-chicago avatar

tdd-london-chicago

Master professional TDD with the London (mockist) and Chicago (classicist) schools. Automate test-first workflows, style selection, and refactoring with AI agents.

Introduction

This skill provides a systematic framework for practicing Test-Driven Development (TDD) by leveraging the distinct philosophies of the London and Chicago schools. It is designed for software engineers, quality assurance professionals, and technical teams looking to standardize their testing architecture. By categorizing code based on its nature—domain logic versus external interactions—this skill guides users in selecting the appropriate methodology, ensuring that tests drive design rather than merely verifying implementation. It integrates seamlessly with a suite of specialized agents, including qe-test-generator, qe-test-implementer, and qe-test-refactorer, to execute the Red-Green-Refactor cycle with precision.

  • Employs London school techniques for service layers and controllers, utilizing mocks and stubs to verify interaction patterns and dependency orchestration.

  • Utilizes Chicago school principles for domain-driven design, value objects, and pure functions, focusing on state-based assertions and public API behavior.

  • Automates the generation of failing tests, minimal implementation code, and safe refactoring suggestions to minimize manual overhead and maintain test-design alignment.

  • Reduces test debt and design complexity by identifying over-mocking patterns and suggesting improvements when tests become coupled to implementation internals.

  • Orchestrates agent-human collaboration, enabling users to define test concepts while AI handles the formal Red-Green-Refactor implementation steps.

  • Users should identify the code type before starting: calculations and domain state are best suited for Chicago, while external API integrations and side-effect-heavy workflows benefit from London.

  • Always prioritize writing the failing test first to ensure that new features are fully covered and to prevent premature implementation.

  • Input expectations include the target file path, desired TDD style (chicago or london), and the business logic or requirement to be tested.

  • The output includes structured test files, refactoring recommendations, and status updates for the Red, Green, and Refactor phases.

  • Use the provided quick-reference guide to resolve common testing dilemmas, such as avoiding test-pain by reducing excessive mocking and maintaining public API boundaries.

Repository Stats

Stars
329
Forks
65
Open Issues
4
Language
TypeScript
Default Branch
main
Sync Status
Idle
Last Synced
Apr 29, 2026, 06:57 AM
View on GitHub