mcpField
G
generate-tdd-tasks

generate-tdd-tasks

github.com/igmarinAgent workflows336 installsUpdated 4w ago
Repository

About generate-tdd-tasks

A skill for turning project requirements into a TDD-oriented task list. It detects repository conventions, structures implementation work around test-first cycles, and checks required documentation and review tasks before saving.

Key features

  1. 01Detects language and project conventions
  2. 02Breaks requirements into implementation tasks
  3. 03Uses RED, GREEN, and REFACTOR cycles
  4. 04Enforces task-list validation gates
  5. 05Specifies output path and required sections

Use cases

  1. 01Planning implementation from a feature request
  2. 02Preparing test-first work in an existing repository
  3. 03Checking a generated task list for required steps

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/igmarin/ruby-core-skills --skill generate-tdd-tasks

After installing, type/generate-tdd-tasksin Claude Code to confirm it loaded.

Details

From the project README

Generate TDD Tasks

Core Process

Step 1: Project Detection

Detect and list the project's conventions before generating tasks:

  1. Test command — Check config files. Ruby: bundle exec rspec if Gemfile has rspec. Python: pytest. JS/TS: npm test / yarn test. Rust: cargo test. Go: go test ./....
  2. Source directory — lib/ (Ruby), src/ (most other languages).
  3. Test directory — spec/ (RSpec), test/ (Minitest/pytest/unittest/Go standard).
  4. Doc tool — YARD (Ruby), JSDoc (JS/TS), rustdoc (Rust), pydoc (Python).
  5. Language/framework — Detect from Gemfile, Cargo.toml, package.json, go.mod, pyproject.toml.
Step 2: Requirements Analysis

Break down the feature/PRD into implementation tasks:

  1. Identify user-visible behaviors — capabilities, endpoints, data flows.
  2. Apply first-slice heuristics:
    • Web app / API: Start with request/integration test.
    • Service / domain logic: Start with service or unit test.
    • Background job: Start with worker test.
    • External integration: Start with client layer test.
    • Library / SDK: Start with public API test.
  3. Group related behaviors into parent tasks with TDD quadruplets.
Step 3: Generate Task List

Create tasks/tasks-<feature-name>.md with the required structure below.

Step 4: Validation Gates (HARD-GATE)

Before saving output, every gate below MUST pass:

1. Task 0.0 is the feature branch creation — mandatory, must be first.
2. Every implementation task uses the TDD quadruplet (RED → fail → GREEN → pass → REFACTOR).
3. Public API documentation, update existing documentation, and code review tasks are present — do not omit them.
4. Guidance Used section explains what conventions/guides/skills drove the breakdown.
5. Relevant Files section lists detected source and test directories and key files.
6. Output is saved to tasks/tasks-<feature-name>.md unless user specifies otherwise.

If any gate fails, correct the task list before saving.

Task List Template

# Task List: <Feature Name>

Based on: <prd or requirement source>

## Guidance Used

- <Skill or convention that guided this breakdown — e.g. tdd-process, test-planning-process, project conventions>
- <Specific decisions: why first slice chosen, why certain boundary selected>

## Relevant Files

- Source directory: `<detected source dir>/`
- Test directory: `<detected test dir>/`
- `<path/to/file.ext>` — <why it's relevant>
- `<path/to/test.ext>` — <test coverage>

---

## Tasks

- [ ] **0.0 Create feature branch**
  `git checkout -b feature/<feature-name>`

- [ ] **1.0 <Behavior Description> (TDD Quadruplet)**
  - [ ] 1.1 Write failing test for `<behavior>`
        `<test-dir>/path/to/test.ext`
  - [ ] 1.2 Run test — verify failure
        `<test-command>` → expected failure
  - [ ] 1.3 Implement minimal code to pass
        `<source-dir>/path/to/impl.ext`
  - [ ] 1.4 Run test — verify success
        `<test-command>` → green
  - [ ] 1.5 REFACTOR: Clean up implementation

- [ ] **2.0 <Next Behavior> (TDD Quadruplet)**
  - [ ] 2.1 ... (same pattern as 1.1-1.5)

- [ ] **3.0 <Next Behavior> (TDD Quadruplet)**
  - [ ] 3.1 ...

- [ ] **N.0 Public API Documentation**
  - [ ] N.1 Add YARD/JSDoc/rustdoc/pydoc comments to all new public methods
        `<source-dir>/path/to/file.ext`

- [ ] **N+1.0 Update Existing Documentation**
  - [ ] N+1.1 Update README or relevant docs for any changed behavior

- [ ] **N+2.0 Code Review**
  - [ ] N+2.1 Self-review diff before creating PR
  - [ ] N+2.2 Run full test suite — all green

Integration

ContextNext Skill
Executing the TDD looptdd-process
Choosing the first failing testtest-planning-process
Documenting public APIswrite-yard-docs
Reviewing the final changesetreview-process
PRD or requirements sourcecreate-prd (agnostic-planning-skills)
Refining individual ticketsplan-tickets (agnostic-planning-skills)

Comments

Markdown supported