Tdd Workflow
Scannednpx machina-cli add skill ruslan-korneev/python-backend-claude-plugins/tdd-workflow --openclawTDD Workflow Orchestration
This skill orchestrates full-cycle TDD development by integrating multiple specialized plugins into a cohesive workflow.
When to Use This Skill
Use this skill when the user wants to:
- Develop a feature "from scratch to production"
- Follow strict TDD methodology (Red-Green-Refactor)
- Get help with the complete development cycle
- Orchestrate multiple development tools automatically
- Create a development plan with test cases
Trigger phrases:
- "Develop feature X end-to-end"
- "Full TDD cycle for..."
- "Create complete implementation of..."
- "Help me build X from start to finish"
- "Plan and implement..."
Core Principles
1. Red-Green-Refactor Cycle
┌─────────────────────────────────────────────────────────┐
│ TDD CYCLE │
│ │
│ ┌─────────┐ ┌─────────┐ ┌───────────┐ │
│ │ RED │───▶│ GREEN │───▶│ REFACTOR │──┐ │
│ │ Write │ │ Make │ │ Improve │ │ │
│ │ Failing│ │ Test │ │ Code │ │ │
│ │ Test │ │ Pass │ │ Quality │ │ │
│ └─────────┘ └─────────┘ └───────────┘ │ │
│ ▲ │ │
│ └────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────┘
2. Three-Phase Orchestration
| Phase | Agent | Model | Purpose |
|---|---|---|---|
| Explore | codebase-explorer | sonnet | Fast module discovery |
| Plan | planning-agent | opus | Deep analysis, user questions |
| Execute | execution-agent | opus | TDD implementation |
3. Plugin Integration
This workflow integrates with existing plugins:
- pytest-assistant — Creating failing tests first (Red phase)
- clean-code — Code review and refactoring suggestions
- ruff-lint — Auto-formatting via hooks
- python-typing — Type checking via hooks
- software-architect — Architecture decisions during planning
Workflow Overview
User Prompt
│
▼
┌─────────────────┐
│ Codebase │ Find relevant modules
│ Explorer │ Understand project structure
└────────┬────────┘
│
▼
┌─────────────────┐
│ Planning │ Ask clarifying questions
│ Agent │ Create development plan
└────────┬────────┘ Define test cases
│
▼
┌─────────────────┐
│ EnterPlanMode │ User reviews and approves
│ (Claude Code) │ the development plan
└────────┬────────┘
│
▼
┌─────────────────┐
│ Execution │ TDD cycle for each test
│ Agent │ Quality gates
└────────┬────────┘ Documentation
│
▼
Completed Feature
Memory Anchors
Plans include Memory Anchors — structured context that persists across sessions:
---
id: dev-{uuid}
feature: {name}
status: draft | approved | in_progress | completed
---
Anchors capture:
- TASK: The end goal
- APPROACH: Chosen implementation strategy
- CONSTRAINTS: Technical limitations
References
- Plan Format — Development plan structure
- Context Handoff — How context flows between agents
- Plugin Integration — How plugins work together
Source
git clone https://github.com/ruslan-korneev/python-backend-claude-plugins/blob/master/plugins/tech-lead/skills/tdd-workflow/SKILL.mdView on GitHub Overview
This skill orchestrates the complete TDD process by integrating specialized plugins into a cohesive workflow. It supports developing features from scratch to production, strict Red-Green-Refactor TDD, and automatic planning, execution, and documentation across the full development cycle.
How This Skill Works
Technically, the skill uses a three-phase orchestration: Explore (codebase-explorer for fast module discovery), Plan (planning-agent with opus for deep analysis and questions), and Execute (execution-agent driving the TDD cycle). It wires in plugins such as pytest-assistant, clean-code, ruff-lint, python-typing, and software-architect to manage tests, refactoring suggestions, formatting, type checks, and architectural decisions throughout the workflow.
When to Use It
- Develop a feature from scratch to production
- Follow strict TDD methodology (Red-Green-Refactor)
- Get help with the complete development cycle
- Orchestrate multiple development tools automatically
- Create a development plan with test cases
Quick Start
- Step 1: Describe the feature and acceptance criteria to trigger planning.
- Step 2: Review and approve the plan in EnterPlanMode.
- Step 3: Run the TDD execution cycle and deliver the feature.
Best Practices
- Always start the cycle with a failing Red test to define acceptance criteria.
- Use the Plan phase to ask clarifying questions and shape a concrete development plan.
- Leverage Memory Anchors to persist context (task, approach, constraints) across sessions.
- Apply code quality gates (ruff-lint, python-typing) during execution to maintain standards.
- Review and approve the EnterPlanMode plan before executing the TDD cycle.
Example Use Cases
- Develop feature X end-to-end from initial idea to production-ready code.
- Plan and implement a backend feature with a complete set of test cases.
- Automate the full TDD cycle for a new service using pytest-assistant.
- Refactor code with clean-code insights after the initial green tests.
- Make architectural decisions during planning with the software-architect plugin.