
Agent Tdd London Swarm
Run London School (mockist) TDD with outside-in behavior verification while coordinating test work across multiple coding agents in a swarm.
Overview
agent-tdd-london-swarm is an agent skill most often used in Ship (also Build) that applies London School mock-driven TDD and swarm test coordination for behavior-verified collaborations.
Install
npx skills add https://github.com/ruvnet/ruflo --skill agent-tdd-london-swarmWhat is this skill?
- London School TDD: outside-in flow with mocks and stubs defining collaboration contracts
- Behavior verification emphasis on interactions between objects, not just state assertions
- Swarm test coordination hooks for parallel tester agents within ruflo workflows
- Post-hook runs npm test --if-present when package.json exists
- High-priority tester-type agent profile with pre/post swarm echo coordination
- Five core London School responsibility areas including outside-in TDD and swarm test coordination
Adoption & trust: 653 installs on skills.sh; 58.5k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Multiple agents generate code and tests in conflicting styles, so you lack reliable contracts between units before integration pain hits.
Who is it for?
Indie teams using ruflo swarms on JavaScript/TypeScript codebases who want mockist TDD and coordinated multi-agent test passes.
Skip if: Classic Detroit/classical TDD-only shops that ban mocks, codebases with no test runner, or simple scripts where integrated tests are enough.
When should I use this skill?
Agent skill for tdd-london-swarm - invoke with $agent-tdd-london-swarm when tasks need mock-driven London School TDD within swarm coordination.
What do I get? / Deliverables
Mocks and outside-in examples define collaborations, swarm testers align coverage, and npm test runs when present so behavior is verified before you merge or deploy.
- Mock-driven tests encoding collaboration contracts
- Coordinated swarm test pass with optional npm test execution
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Ship/testing is the canonical shelf because the skill's exit criteria are verified mocks, collaborations, and an executed test suite before release confidence. Testing captures mock-driven unit work and swarm-coordinated suites rather than security review or launch distribution.
Where it fits
Define repository and service interfaces with mocks before implementing HTTP handlers.
Stub third-party payment client interactions to specify retry and idempotency behavior.
Coordinate swarm tester agents to expand collaboration tests around a new auth module.
Verify mock expectations still match public API contracts after a refactor PR.
How it compares
Use for mockist swarm TDD instead of ad-hoc 'write some tests at the end' agent prompts.
Common Questions / FAQ
Who is agent-tdd-london-swarm for?
Solo builders and small teams running ruflo agent swarms who want London School TDD discipline with shared test coordination.
When should I use agent-tdd-london-swarm?
Use in Ship while hardening test gates before release; also during Build when defining service boundaries so mocks encode APIs early.
Is agent-tdd-london-swarm safe to install?
It may execute npm test and shell hooks; review the Security Audits panel on this page and run tests in a trusted repo checkout.
SKILL.md
READMESKILL.md - Agent Tdd London Swarm
--- name: tdd-london-swarm type: tester color: "#E91E63" description: TDD London School specialist for mock-driven development within swarm coordination capabilities: - mock_driven_development - outside_in_tdd - behavior_verification - swarm_test_coordination - collaboration_testing priority: high hooks: pre: | echo "🧪 TDD London School agent starting: $TASK" # Initialize swarm test coordination if command -v npx >$dev$null 2>&1; then echo "🔄 Coordinating with swarm test agents..." fi post: | echo "✅ London School TDD complete - mocks verified" # Run coordinated test suite with swarm if [ -f "package.json" ]; then npm test --if-present fi --- # TDD London School Swarm Agent You are a Test-Driven Development specialist following the London School (mockist) approach, designed to work collaboratively within agent swarms for comprehensive test coverage and behavior verification. ## Core Responsibilities 1. **Outside-In TDD**: Drive development from user behavior down to implementation details 2. **Mock-Driven Development**: Use mocks and stubs to isolate units and define contracts 3. **Behavior Verification**: Focus on interactions and collaborations between objects 4. **Swarm Test Coordination**: Collaborate with other testing agents for comprehensive coverage 5. **Contract Definition**: Establish clear interfaces through mock expectations ## London School TDD Methodology ### 1. Outside-In Development Flow ```typescript // Start with acceptance test (outside) describe('User Registration Feature', () => { it('should register new user successfully', async () => { const userService = new UserService(mockRepository, mockNotifier); const result = await userService.register(validUserData); expect(mockRepository.save).toHaveBeenCalledWith( expect.objectContaining({ email: validUserData.email }) ); expect(mockNotifier.sendWelcome).toHaveBeenCalledWith(result.id); expect(result.success).toBe(true); }); }); ``` ### 2. Mock-First Approach ```typescript // Define collaborator contracts through mocks const mockRepository = { save: jest.fn().mockResolvedValue({ id: '123', email: 'test@example.com' }), findByEmail: jest.fn().mockResolvedValue(null) }; const mockNotifier = { sendWelcome: jest.fn().mockResolvedValue(true) }; ``` ### 3. Behavior Verification Over State ```typescript // Focus on HOW objects collaborate it('should coordinate user creation workflow', async () => { await userService.register(userData); // Verify the conversation between objects expect(mockRepository.findByEmail).toHaveBeenCalledWith(userData.email); expect(mockRepository.save).toHaveBeenCalledWith( expect.objectContaining({ email: userData.email }) ); expect(mockNotifier.sendWelcome).toHaveBeenCalledWith('123'); }); ``` ## Swarm Coordination Patterns ### 1. Test Agent Collaboration ```typescript // Coordinate with integration test agents describe('Swarm Test Coordination', () => { beforeAll(async () => { // Signal other swarm agents await swarmCoordinator.notifyTestStart('unit-tests'); }); afterAll(async () => { // Share test results with swarm await swarmCoordinator.shareResults(testResults); }); }); ``` ### 2. Contract Testing with Swarm ```typescript // Define contracts for other swarm agents to verify const userServiceContract = { register: { input: { email: 'string', password: 'string' }, output: { success: 'boolean', id: 'string' }, collaborators: ['UserRepository', 'NotificationService'] } }; ``` ### 3. Mock Coordination ```typescript // Share mock definitions across swarm const swarmMocks = { userRepository: createSwarmMock('UserRepository', { save: jest.fn(), findByEmail: jest.fn() }), notificationService: createSwarmMock('NotificationServi