workflow-methodology

Core development methodology for claude-flow. Enforces TDD (test-first), systematic debugging (4-phase), and verification gates. Use when starting any development task, fixing bugs, or completing features.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

The Claude-Flow Development Methodology skill provides a rigorous, test-centric framework for AI-assisted software engineering. It enforces Test-Driven Development (TDD) through the 'Red-Green-Refactor' cycle and a systematic 4-phase debugging protocol to ensure code quality and reliability. By integrating strict verification gates and isolated workspace management, it transforms Claude into a disciplined developer that prioritizes empirical evidence over assumptions, significantly reducing hallucinations and technical debt.

Use Cases

  • Test-Driven Development (TDD): Enforcing the 'Red-Green-Refactor' cycle to ensure all new features are validated by failing tests before any production code is written.
  • Systematic Debugging: Utilizing a 4-phase protocol (Investigate, Analyze, Hypothesize, Implement) to identify and resolve the root causes of complex bugs rather than applying superficial fixes.
  • Rigorous Verification: Applying strict verification gates that require fresh test runs and empirical evidence to confirm that a task is truly complete and the original symptom is fixed.
  • Workspace Isolation: Managing complex development tasks using git worktrees to maintain clean, isolated environments for each feature, preventing context contamination and dependency conflicts.
nameworkflow-methodology
descriptionCore development methodology for claude-flow. Enforces TDD (test-first), systematic debugging (4-phase), and verification gates. Use when starting any development task, fixing bugs, or completing features.

Claude-Flow Development Methodology

The 5 Iron Laws

1. TDD Iron Law

"NO production code without a failing test first"

RED → GREEN → REFACTOR
  • Write ONE failing test
  • Implement MINIMAL code to pass
  • Refactor while tests pass
  • Commit at each green

2. Verification Law

"Evidence before claims, always"

Before claiming ANY task complete:

  • Run fresh tests (not cached)
  • Read complete output
  • Confirm exit code 0
  • Verify original symptom fixed

3. Debugging Law

"Root cause before fix attempts"

4-Phase Protocol:

  1. Investigate - Reproduce, read errors, check recent changes
  2. Analyze - Find working examples, compare patterns
  3. Hypothesize - Test ONE change at a time, max 3 attempts
  4. Implement - TDD the fix after understanding

4. Planning Law

"Plans executable with zero context"

Plans must include:

  • Exact file paths
  • Complete code examples
  • Verification commands
  • No assumptions about reader knowledge

5. Isolation Law

"Isolated workspace for each feature"

Use git worktrees:

git worktree add .worktrees/feature-name -b feature/feature-name

Red Flags (STOP immediately)

  • Writing code before tests
  • Tests passing immediately
  • Multiple simultaneous changes
  • "Just this once" thinking
  • Using "should," "probably," "seems to"
  • Third fix attempt failed

Thinking Budget

Keyword Tokens Use For
think ~4k Simple tasks
think hard ~10k Debugging
think harder ~20k Complex changes
ultrathink ~32k Architecture