Workflow Patterns

Read plan.md and identify the next pending [ ] task. Select tasks in order within the current phase. Do not skip ahead to later phases

What Is the Workflow Patterns Skill?

The Workflow Patterns skill is a structured approach to managing and executing tasks within the Conductor TDD (Test-Driven Development) workflow. It is designed for users who need to implement individual tasks from a project plan (plan.md), ensuring each task is addressed in order, quality is maintained through rigorous testing and verification protocols, and progress is meticulously recorded. This skill also handles phase checkpoints, git commit practices, and integrates quality assurance gates into the daily flow of software development. By following defined patterns, teams can rely on a repeatable, auditable process that minimizes errors and maximizes traceability.

Why Use the Workflow Patterns Skill?

The primary motivation for leveraging the Workflow Patterns skill is to bring order and predictability to task management within complex projects, particularly those using Conductor's TDD workflow. This structure provides several tangible benefits:

  • Task Order Integrity: By enforcing the selection of the next pending [ ] task in the plan.md and preventing skipping ahead to later phases, the skill maintains logical progression and prevents dependency issues.
  • Consistent TDD Cycle: The workflow patterns strictly follow the red-green-refactor cycle, ensuring tests are written before code and that all phases of development are covered.
  • Auditability: Every action, from marking a task as in progress to committing code, is logged in a traceable way, supporting audits and progress tracking.
  • Quality Assurance: The workflow includes explicit checkpoints and verification steps, reducing the risk of incomplete or untested features.
  • Team Coordination: Clear conventions for marking, committing, and reviewing tasks prevent miscommunication and make parallel work more manageable.

How to Use the Workflow Patterns Skill

The Workflow Patterns skill prescribes an 11-step TDD task lifecycle, with the first steps focusing on task selection and state management. Here is a detailed breakdown of the process with code examples and best practices:

1. Select the Next

Task

Open the project’s plan.md file. Locate the next task in the current phase that is marked with [ ] (pending). Tasks must be addressed in sequential order within their current phase. Do not select tasks from later phases or skip ahead.

Example:

## Phase 2:

User Management

- [x] **Task 2.0**: Define user model
- [ ] **Task 2.1**: Implement user validation
- [ ] **Task 2.2**: Integrate authentication

In this case, you should select Task 2.1.

2. Mark Task as In

Progress

Once the task is selected, update its status to [~] to indicate it is currently being worked on.

Example:

- [~] **Task 2.1**: Implement user validation

This status change should be committed separately in your version control system to maintain a clear audit trail.

Git Commit Example:

git add plan.md
git commit -m "Mark Task 2.1 as in progress"

3. RED - Write Failing

Tests

Begin by writing tests that define the requirements for the task, before any implementation is written.

  • Create or update the relevant test file.
  • Write tests for the happy path, edge cases, and error conditions.
  • Run the tests to ensure they fail (which confirms the tests are valid and not falsely passing).

Python Example:

def test_user_validation_fails_on_empty_email():
    with pytest.raises(ValueError):
        validate_user(email="")

def test_user_validation_accepts_valid_email():
    assert validate_user(email="user@example.com") is True

Run with:

pytest tests/test_user_validation.py

All tests should fail until the implementation is completed.

4. GREEN - Implement the

Code

Write the minimal implementation needed to make the tests pass.

Python Example:

def validate_user(email):
    if not email:
        raise ValueError("Email required")
    return True

Rerun the tests to confirm they now pass.

5. REFACTOR

Review and refactor both tests and implementation to improve readability, maintainability, and performance, without changing functionality. Rerun tests to ensure nothing breaks.

6. Commit

Progress

Commit your changes in logical steps:

git add .  # Add test and implementation files
git commit -m "Implement user validation (Task 2.1)"

7. Update Task

Status

Change the task status in plan.md from [~] to [x] to indicate completion. Commit this change separately.

- [x] **Task 2.1**: Implement user validation
git add plan.md
git commit -m "Mark Task 2.1 as complete"

8-11.

Verification and Checkpoints

Follow any additional verification protocols or phase checkpoints as described in your project. This may include code reviews, QA gates, or automated verification scripts.

When to Use the Workflow Patterns Skill

  • When implementing any task from a plan.md file within a Conductor-managed project.
  • During phase checkpoints to verify all tasks in the current phase are complete before proceeding.
  • When managing git commits for each significant change to ensure clear traceability.
  • During code reviews and QA processes, ensuring all verification steps are followed.

Important Notes

  • Do not skip tasks or phases: Always select the next pending [ ] task in the current phase. Skipping ahead can break dependencies and undermine project integrity.
  • Separate commits for status changes: Marking a task as in progress or complete should be committed separately from code or test changes.
  • Follow the TDD cycle: Always write tests before implementation (RED), make them pass (GREEN), then refactor.
  • Use verification protocols: Ensure quality and completeness before marking a task as done.
  • Maintain plan.md: This file is the source of truth for task progress and must be kept up to date at all times.

By following the Workflow Patterns skill, teams can ensure a robust, auditable, and high-quality implementation process aligned with Conductor’s best practices.