outside-in-double-loop

Implement features with multiple services using outside-in TDD loops.

3|1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/jon23d/skillz --skill outside-in-double-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: outside-in-double-loop
Source: https://github.com/jon23d/skillz/tree/main/skills/outside-in-double-loop
Command: npx skills add https://github.com/jon23d/skillz --skill outside-in-double-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the challenge of implementing features with multiple dependencies, especially when those dependencies don't exist yet, by guiding a structured, test-driven development process.

Core Features & Use Cases

  • Incremental Implementation: Guides the development of features by starting with the user-facing contract and progressively building out underlying dependencies.
  • Dependency Management: Ensures that code is only built when a test demands it, preventing premature or speculative development.
  • Use Case: When building a new microservice, use this skill to define the API contract first, stub all downstream services, get the API test passing, and then iteratively build each downstream service one by one.

Quick Start

Use the outside-in-double-loop skill to implement the new user registration feature, starting with the API endpoint and stubbing all internal services.

Frequently Asked Questions about outside-in-double-loop

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

FAQPage Schema
How do I implement a new feature when its downstream dependencies do not exist yet?

To implement a feature with missing dependencies, use an outside-in TDD approach: define the user-facing contract first, stub the unavailable dependencies, pass the outer test, then iteratively build each dependency. This prevents speculative code and ensures tests drive development.

What is the outside-in double loop approach in test-driven development?

The outside-in double loop approach in TDD is a development process where you write tests for the outer user-facing contract first, then iteratively write inner loops of tests for underlying dependencies. This ensures complex features are built incrementally and strictly driven by test demands.

How do I build a microservice incrementally when downstream services are not ready?

To build a microservice incrementally with unready downstream services, define the API contract first, stub all internal services, get the API test passing, and then build each downstream service one by one. This ensures development proceeds without waiting for dependencies.

What is the best way to manage dependencies in software design to avoid premature development?

The best way to manage dependencies and avoid premature development is to enforce strict rules about interface definition and dependency construction. Code is only built when a test demands it, ensuring an efficient, driven development process.

When should I use an outside-in TDD strategy for software refactoring?

You should use an outside-in TDD strategy when implementing features with multiple collaborating modules or services. It is particularly effective when dependencies are not yet available and you need to build complex features incrementally from the user-facing contract down.

Does outside-in TDD require existing dependencies before starting feature implementation?

No, outside-in TDD does not require existing dependencies before starting. The process guides implementation by starting with the user-facing contract and stubbing downstream services, allowing you to iteratively build dependencies only when tests demand them.