mcpField
G
generate-tdd-tasks

generate-tdd-tasks

github.com/igmarinエージェントワークフロー336 回インストール4 週間前に更新
リポジトリ

generate-tdd-tasks について

プロジェクト要件を TDD に沿ったタスクリストへ整理するスキルです。リポジトリの慣習を検出し、テスト先行で実装作業を分解して、保存前に文書化やレビューなどの必須項目を確認します。

主な機能

  1. 01言語とプロジェクト慣習の検出
  2. 02要件を実装タスクに分解
  3. 03RED、GREEN、REFACTOR の適用
  4. 04タスクリストの検証条件を適用
  5. 05出力先と必須セクションの指定

活用シーン

  1. 01機能要望から実装を計画
  2. 02既存リポジトリでテスト先行作業を準備
  3. 03生成したタスクリストの必須項目を確認

インストール

コマンドをコピーしてターミナルで実行します。

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

インストール後、Claude Code で/generate-tdd-tasksを入力して読み込まれたか確認します。

詳細

TDD タスクの生成

コアプロセス

ステップ 1:プロジェクトの検出

タスクを生成する前に、プロジェクトの規約を検出して一覧にします。

  1. テストコマンド — 設定ファイルを確認します。Ruby:Gemfile に rspec がある場合は bundle exec rspec。Python:pytest。JS/TS:npm test / yarn test。Rust:cargo test。Go:go test ./...。
  2. ソースディレクトリ — lib/(Ruby)、src/(その他のほとんどの言語)。
  3. テストディレクトリ — spec/(RSpec)、test/(Minitest/pytest/unittest/Go 標準)。
  4. ドキュメントツール — YARD(Ruby)、JSDoc(JS/TS)、rustdoc(Rust)、pydoc(Python)。
  5. 言語/フレームワーク — Gemfile、Cargo.toml、package.json、go.mod、pyproject.toml から検出します。
ステップ 2:要件分析

機能/PRD を実装タスクに分解します。

  1. ユーザーから見える動作を特定する — 機能、エンドポイント、データフロー。
  2. 最初のスライスのヒューリスティクスを適用する:
    • Web アプリ/API:リクエスト/統合テストから始めます。
    • サービス/ドメインロジック:サービスまたはユニットテストから始めます。
    • バックグラウンドジョブ:ワーカーテストから始めます。
    • 外部連携:クライアント層のテストから始めます。
    • ライブラリ/SDK:パブリック API テストから始めます。
  3. 関連する動作を TDD の 4 タスクセットを含む親タスクにまとめます。
ステップ 3:タスクリストの生成

以下の必須構造で tasks/tasks-<feature-name>.md を作成します。

ステップ 4:検証ゲート(ハードゲート)

出力を保存する前に、以下のすべてのゲートを必ず通過する必要があります。

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.

いずれかのゲートに失敗した場合は、保存する前にタスクリストを修正します。

タスクリストのテンプレート

# 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

連携

コンテキスト次のスキル
TDD ループの実行tdd-process
最初に失敗させるテストの選択test-planning-process
パブリック API のドキュメント作成write-yard-docs
変更セットの最終レビューreview-process
PRD または要件のソースcreate-prd (agnostic-planning-skills)
個別チケットの詳細化plan-tickets (agnostic-planning-skills)

コメント