Skip to content

Conversation

@OverlordBaconPants
Copy link
Contributor

Summary

Adds a new Test-Driven Development (TDD) agent that enforces strict test-first methodology with RED-GREEN-REFACTOR cycles for story implementation.

What's New

  • Agent: dev-tdd.agent.yaml - TDD Developer Agent (Ted) that enforces test-first development
  • Workflow: dev-story-tdd - Complete TDD implementation workflow with automated cycles
  • Documentation: Comprehensive instructions, README, and checklist for TDD practices

Key Features

  • ✅ Enforces test-first development - no code without failing tests
  • 🔴🟢♻️ RED-GREEN-REFACTOR cycle automation
  • 📊 RVTM (Requirements Verification Traceability Matrix) integration
  • 📋 Story Context as single source of truth
  • 🔗 Automatic test registration and status tracking
  • 📈 Coverage metrics and reporting

Files Added

  • src/modules/bmm/agents/dev-tdd.agent.yaml - Agent definition with proper YAML structure
  • src/modules/bmm/workflows/4-implementation/dev-story-tdd/workflow.yaml - Workflow configuration
  • src/modules/bmm/workflows/4-implementation/dev-story-tdd/instructions.md - Detailed TDD process guide
  • src/modules/bmm/workflows/4-implementation/dev-story-tdd/README.md - Workflow overview
  • src/modules/bmm/workflows/4-implementation/dev-story-tdd/checklist.md - Implementation checklist

Implementation Details

Agent Structure

  • Follows BMAD v6 agent definition format
  • Properly structured prompts as array of objects with id and content fields
  • Menu items with correct trigger, action, workflow, and exec attributes
  • Critical actions for TDD enforcement

TDD Workflow Features

  1. RED Phase: Generate failing tests from acceptance criteria
  2. GREEN Phase: Implement minimal code to pass tests
  3. REFACTOR Phase: Improve code while maintaining green tests
  4. Continuous Integration: Auto-updates RVTM throughout the cycle

Testing & Validation

  • Agent YAML structure validated against BMAD compilation requirements
  • Prompts use correct array structure (not key-value pairs)
  • Menu items properly formatted with required attributes
  • All referenced workflows and instructions exist
  • Workflow paths use {project-root} placeholder correctly
  • Conforms to existing agent patterns (dev.agent.yaml, tea.agent.yaml)

Use Cases

This agent is ideal for:

  • Teams practicing strict TDD methodology
  • Projects requiring high test coverage
  • Stories needing complete requirement traceability
  • Developers learning test-first development

Integration

The TDD agent integrates seamlessly with:

  • Existing dev agent for standard implementation
  • Test Architecture (TEA) workflows
  • RVTM traceability system
  • Story Context JSON/XML format

Notes

  • Agent complements the existing dev.agent.yaml by providing TDD-specific implementation
  • Can be used alongside regular dev agent based on team preferences
  • Fully compatible with BMAD v6 compilation process

This contribution adds test-driven development capabilities to the BMAD Method, promoting higher code quality through disciplined test-first practices.

- Created dev-tdd.agent.yaml in proper BMAD format with array-based prompts
- Added complete TDD workflow (dev-story-tdd) with RED-GREEN-REFACTOR cycles
- Included workflow.yaml, instructions.md, README.md, and checklist.md
- Removed incorrectly formatted agent files from test directories
- Agent now conforms to BMAD compilation requirements and will generate proper XML

The agent implements strict TDD methodology with:
- Test-first development enforcement
- RED-GREEN-REFACTOR cycle automation
- RVTM traceability integration
- Story Context as single source of truth

🤖 Generated with Claude Code

Co-Authored-By: Claude <[email protected]>
Copy link
Collaborator

@bmadcode bmadcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not merge

@bmadcode bmadcode closed this Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants