スキル一覧に戻る
morodomi

tdd-init

by morodomi

Question-Driven TDD workflow for Claude Code. Risk-based automation: INIT → PLAN → RED → GREEN → REFACTOR → REVIEW → COMMIT

0🍴 0📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: tdd-init description: Start a new TDD cycle and create a Cycle doc. Triggers on "new feature", "start TDD", "add feature".

TDD INIT Phase

Start a new TDD cycle and create a Cycle doc.

Progress Checklist

INIT: STATUS check → Environment → Existing cycle → Questions → Risk assessment → Scope → Feature name → Cycle doc → Guide to PLAN

Restrictions

  • No detailed implementation planning (done in PLAN)
  • No test code (done in RED)
  • No implementation code (done in GREEN)

Workflow

Step 1: Check Project Status

cat docs/STATUS.md 2>/dev/null

If not found, recommend tdd-onboard.

Step 2: Collect Environment Info

Collect language versions and key packages for Cycle doc Environment section. Details: reference.md

Step 3: Check Existing Cycles

ls -t docs/cycles/*.md 2>/dev/null | head -1

If an active cycle exists, recommend continuing it.

Step 4: Ask What to Implement

Ask "What feature do you want to implement?" e.g., login, CSV export.

Step 4.5: Risk Score Assessment

Calculate risk score (0-100) from user input:

ScoreResultAction
0-29PASSShow confirmation, auto-proceed
30-59WARNScope confirmation (Step 5)
60-100BLOCKRisk-type questions (Step 4.6)

Keyword scores: reference.md Record Risk: [score] ([result]) in Cycle doc.

Step 4.6: Brainstorm & Risk Questions (BLOCK only)

First, clarify the problem (Brainstorm):

  • What problem are you really trying to solve?
  • Have you considered alternative approaches?

Then, risk-type questions based on detected keywords:

Risk TypeQuestions
SecurityAuth method, target users, 2FA
External APIAPI auth, error handling, rate limiting
Data ChangesExisting data impact, rollback

Templates: reference.md. Record in Risk Interview section.

Step 5: Scope (Layer) Confirmation

Use AskUserQuestion to confirm scope:

LayerDescriptionPlugin
BackendPHP/Python etc.tdd-php, tdd-python, tdd-flask
FrontendJavaScript/TypeScripttdd-js, tdd-ts
BothFull stackMultiple plugins

Details: reference.md

Step 6: Generate Feature Name & Create Cycle Doc

Generate feature name (3-5 words) and create Cycle doc from templates/cycle.md.

Step 7: Complete & Guide to PLAN

Display INIT Complete and guide to PLAN phase.

Reference

Details: reference.md | Japanese: reference.ja.md

スコア

総合スコア

70/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です