tdd-tasknote

A TDD preparation command that gathers a feature's technical context and records it in a note. TDD, or test-driven development, is a method of writing tests before the implementation.

In plain words
What is it for?
Use it before implementing a task to collect project instructions, requirements, related files, implementation patterns, dependencies, and testing information into a task note.
Why use it?
It reduces the need to repeatedly search project rules, specifications, similar code, and test setup before coding.

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-tasknote
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 1,755 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.01755
Opus 5 $0.00019 $0.00877
Sonnet 5 $0.00008 $0.00351
Haiku 4.5 $0.00004 $0.00176

Measured yesterday against content hash 77b7f88f6122, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tdd-tasknote 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 yesterday.

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-tasknote.md · 144 lines

How it starts

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

TDD開発の前にコンテキスト情報を収集し、開発に必要な情報をノートファイルにまとめます。

context

出力ディレクトリ="./docs/implements" 機能名={{feature_name}} タスクID={{task_id}} 要件名={{requirement_name}} 収集情報=[] noteファイル="./docs/implements/{要件名}/{{task_id}}/note.md"

step

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

  • {{noteファイル}} が既にある場合、「すでに完了しています」といって終了する

  • 開発コンテキストを収集する: 追加ルールの読み込み

    • AGENTS.md ファイルが存在する場合は読み込み
    • ./docs/rule ディレクトリが存在する場合は読み込み
    • ./docs/rule/tdd ディレクトリが存在する場合は、サブディレクトリを含む全ファイルを読み込み
      • ./docs/rule/tdd/red/, ./docs/rule/tdd/green/, ./docs/rule/tdd/refactor/, ./docs/rule/tdd/testcases/, ./docs/rule/tdd/verify-complete/ など全て対象
    • 各ディレクトリ内のすべてのファイルを読み込み、追加ルールとして適用

    Task tool (subagent_type: Explore, thoroughness: quick) を使用して実装関連情報を探索

    • ./docs/spec/{要件名}-requirements.md: 統合機能要件と関連文書へ
    • ./docs/spec/{要件名}-user-stories.md: 詳細なユーザストーリー
    • ./docs/spec/{要件名}-acceptance-criteria.md: 受け入れ基準とテスト項目
    • ./docs/spec/{要件名}-*.md: 受け入れ基準とテスト項目
    • 既存の類似機能やユーティリティ関数を探索
    • 実装パターンやアーキテクチャガイドラインを特定
    • 依存関係やインポートパスを確認
    • テスト関連情報の探索(後続フェーズで再探索不要にするため):
      • テストフレームワークの設定ファイル(jest.config.js, playwright.config.js等)
      • 既存のテストファイルのパターンとディレクトリ構成
      • テストユーティリティやモック設定
      • E2Eテスト設定(UIタスクの場合)

    関連ファイルを直接読み込み

    • ./docs/implements/{要件名}/{{task_id}}/*.md - taskに関係する全てのファイルを読み込み
    • 関連する設計文書やタスクファイルも必要に応じて読み込み
  • 収集した情報を整理して {{noteファイル}} に保存する

    • 重要: ノートファイル内のすべてのファイルパスは、プロジェクトルートからの相対パスで記載すること(絶対パスは使用しない)

rules

ファイル名のルール

出力ファイルのパス形式

  • ./docs/implements/{要件名}/{{task_id}}/note.md
  • 例: docs/implements/user-auth/task-0001/note.md

ファイル名の命名規則

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

ファイルパスの記載ルール(必須)

  • プロジェクトルートを基準とした相対パスを使用する
  • 絶対パス(フルパス)は絶対に記載しない
  • ディレクトリパスも相対パスで記載する
  • 例:
    • /Users/username/projects/myapp/src/utils/helper.ts
    • /Users/username/projects/myapp/docs/spec/
    • src/utils/helper.ts
    • docs/spec/
    • backend/app/main.py
    • frontend/src/components/

Read the full file on GitHub · 144 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. yesterday First seen · 144 lines · 38 tokens per session scan A 77b7f88f6122

Subscribe to this mod's changes

tdd-tasknote is a command published in the GitHub repository classmethod/tsumiki (974 stars, last pushed 25d ago), licensed MIT. It adds 38 tokens to every session and 1,755 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.