tdd-requirements

A requirements-planning command for test-driven development, or TDD, where tests are written before the implementation. It gathers project context and creates a requirements document with reliability ratings.

In plain words
What is it for?
Use it with a requirement name and task ID to collect the relevant task notes, prepare a TDD requirements document, and review its clarity, completeness, feasibility, and reliability levels.
Why use it?
It helps turn a feature idea into clearer requirements before coding and records the expected inputs, outputs, constraints, and implementation checks.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/classmethod/tsumiki/tdd-requirements
Clone the repo
git clone --depth 1 https://github.com/classmethod/tsumiki
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,991 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00038 $0.02991
Opus 5 $0.00019 $0.01496
Sonnet 5 $0.00008 $0.00598
Haiku 4.5 $0.00004 $0.00299

Measured 3d ago against content hash c2056762e7e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tdd-requirements scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

legacy/commands/tdd-requirements.md · 234 lines

How it starts

The opening of the file, as written. The whole thing — 234 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TDD開発の要件整理を実施し、EARS要件定義書・設計文書を参照しながら機能仕様を明確化します。信頼性レベルを示しながら要件定義を作成します。

context

出力ディレクトリ="./docs/implements" 機能名={{feature_name}} タスクID={{task_id}} 要件名={{requirement_name}} 信頼性評価=[] タスクファイル1=./docs/tasks/{要件名}/{{task_id}}.md タスクファイル2=./docs/tasks/{要件名}-phase*.md タスクoverviewファイル1=./docs/tasks/{要件名}/overview.md タスクoverviewファイル2=./docs/tasks/{要件名}-overview.md 出力ファイル=./docs/implements/{要件名}/{{task_id}}/{feature_name}-requirements.md

step

  • $ARGUMENTS がない場合、「引数に要件名とTASK-IDを指定してください(例: ユーザー認証機能 TASK-0001)」と言って終了する
  • $ARGUMENTS の内容と context の内容をまとめてユーザに宣言する
  • step2 を実行する

step2

  • 開発コンテキストの準備を実行する: タスクノートの読み込み

    • ./docs/implements/{要件名}/{{task_id}}/note.md が存在する場合は読み込み
    • 存在しない場合:
      • @task で /tsumiki-legacy:tdd-tasknote {要件名} {{task_id}} コマンドを実行してノートを生成
      • 生成されたノートファイルを読み込み
    • ノートには技術スタック、開発ルール、関連実装、設計文書、注意事項が含まれる
  • 読み込み完了後、step3 を実行する

step3

  • <requirements_template> の内容を context の情報で埋めて、要件定義書を直接作成する

    • 読み込んだコンテキスト情報(タスクノート、追加ルール等)を活用
    • 信頼性レベル(🔵🟡🔴)を各項目に記載
    • Write ツールを使用して 出力ファイル に保存
  • 作成した要件定義書の内容について、品質判定基準に基づいて以下を評価:

    • 要件の曖昧さの有無
    • 入出力定義の完全性
    • 制約条件の明確性
    • 実装可能性
    • 信頼性レベル(🔵🟡🔴の分布)
  • 品質判定結果をユーザーに表示する

  • step4 を実行する

step4

  • TodoWrite ツールで TODO ステータスを更新する
    • 現在のTODOを「completed」にマーク
    • 要件定義フェーズの完了をTODO内容に反映
    • 次のフェーズ「テストケース洗い出し」をTODOに追加
    • 品質判定結果をTODO内容に記録
  • 次のステップ表示: 「次のお勧めステップ: /tsumiki-legacy:tdd-testcases {{要件名}} {{TASK-ID}} でテストケースの洗い出しを行います。」

rules

ファイル名のルール

出力ファイルのパス形式

  • docs/implements/{要件名}/{task_id}/{feature_name}-requirements.md
  • 例: docs/implements/user-auth/task-001/login-requirements.md

ファイル名の命名規則

  • 機能名を簡潔な英語に変換する
  • ケバブケース(kebab-case)を使用
  • 最大50文字程度に収める
  • 例:
    • "ユーザー認証機能" → "user-auth"
    • "データエクスポート機能" → "data-export"
    • "パスワードリセット機能" → "password-reset"

品質判定基準

✅ 高品質:
- 要件の曖昧さ: なし
- 入出力定義: 完全
- 制約条件: 明確
- 実装可能性: 確実
- 信頼性レベル: 🔵(青信号)が多い

⚠️ 要改善:
- 要件に曖昧な部分がある
- 入出力の詳細が不明確
- 技術的制約が不明
- ユーザー意図の確認が必要
- 信頼性レベル: 🟡🔴(黄・赤信号)が多い

TODO更新パターン

- 現在のTODOを「completed」にマーク
- 要件定義フェーズの完了をTODO内容に反映
- 次のフェーズ「テストケース洗い出し」をTODOに追加
- 品質判定結果をTODO内容に記録

Read the full file on GitHub · 234 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 234 lines · 38 tokens per session scan A c2056762e7e1

Subscribe to this mod's changes

tdd-requirements is a command published in the GitHub repository classmethod/tsumiki (974 stars, last pushed 26d ago), licensed MIT. It adds 38 tokens to every session and 2,991 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.