kairo-design

A technical-design command that turns an approved requirements document into a software design document. It can cover data flows, TypeScript interfaces, database schemas, and API endpoints.

In plain words
What is it for?
Use it with a requirement name to choose the design scope, gather project context, and produce the selected architecture, data-flow, type, database, and API specifications.
Why use it?
It makes implementation details explicit before coding, reducing uncertainty about how data, types, storage, and service requests should fit together.

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/kairo-design
Clone the repo
git clone --depth 1 https://github.com/classmethod/tsumiki
Per session 61 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 14,241 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.00061 $0.14241
Opus 5 $0.00030 $0.07121
Sonnet 5 $0.00012 $0.02848
Haiku 4.5 $0.00006 $0.01424

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

Security

Grade A, and why

kairo-design 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/kairo-design.md · 1,557 lines

How it starts

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

Kairo開発の技術設計を実施し、PRD・EARS要件定義書・既存設計文書を参照しながら技術仕様を明確化します。信頼性レベルを示しながら設計文書を作成します。

context

出力ディレクトリ="docs/design" 要件名={{requirement_name}} 作業規模={{work_scope}} 信頼性評価=[]

step

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

step2: 作業規模の確認

  • AskUserQuestion ツールを使って作業規模を質問する:

    • question: "この設計の作業規模について教えてください"
    • header: "設計規模"
    • multiSelect: false
    • options:
      • label: "フル設計(推奨)" description: "包括的なアーキテクチャ設計、詳細なデータフロー、完全な型定義、DBスキーマ、API仕様を含む"
      • label: "軽量設計" description: "必要最小限の設計、基本的なアーキテクチャとデータフロー、主要な型定義のみ"
      • label: "カスタム" description: "含めたい設計項目を個別に選択"
  • ユーザーの選択を context の {{work_scope}} に保存

  • カスタムを選択した場合は、AskUserQuestion ツールを使って以下を質問:

    • question: "設計文書に含める項目を選択してください(複数選択可)"
    • header: "含める項目"
    • multiSelect: true
    • options:
      • label: "詳細なデータフロー図" description: "包括的なデータフロー図とシーケンス図を作成"
      • label: "TypeScript型定義" description: "詳細な型定義ファイルを作成"
      • label: "データベーススキーマ" description: "データベース設計とスキーマ定義"
      • label: "API仕様" description: "APIエンドポイントとリクエスト/レスポンス定義"
  • step3 を実行する

step3: 開発コンテキストの準備

  • タスクノートの読み込み

    • docs/spec/{要件名}/note.md が存在する場合は読み込み
    • 存在しない場合:
      • Task ツールを使用して subagent_type: "general-purpose" で /tsumiki-legacy:kairo-tasknote {要件名} コマンドを実行してノートを生成
      • 生成されたノートファイルを読み込み
    • ノートには技術スタック、開発ルール、関連実装、設計文書、注意事項が含まれる
  • 要件定義書の読み込み

    • ./docs/spec/{要件名}-requirements.md を読み込み
    • ./docs/spec/{要件名}/requirements.md を読み込み
    • ./docs/spec/{要件名}-user-stories.md が存在する場合は読み込み
    • ./docs/spec/{要件名}/user-stories.md が存在する場合は読み込み
    • ./docs/spec/{要件名}-acceptance-criteria.md が存在する場合は読み込み
    • ./docs/spec/{要件名}/acceptance-criteria.md が存在する場合は読み込み
    • EARS要件定義から機能要件と非機能要件を抽出
  • 追加ルールの読み込み

    • docs/rule ディレクトリが存在する場合は読み込み
    • docs/rule/kairo ディレクトリが存在する場合は読み込み
    • docs/rule/kairo/design ディレクトリが存在する場合は読み込み
    • 各ディレクトリ内のすべてのファイルを読み込み、追加ルールとして適用
  • 技術スタック定義の読み込み

    • docs/tech-stack.md が存在する場合は読み込み
    • 存在しない場合は CLAUDE.md から技術スタックセクションを読み込み
    • どちらも存在しない場合は note.md の技術スタック情報を使用

Read the full file on GitHub · 1,557 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 · 1,557 lines · 61 tokens per session scan A 95af6722e8a2

Subscribe to this mod's changes

kairo-design is a command published in the GitHub repository classmethod/tsumiki (974 stars, last pushed 25d ago), licensed MIT. It adds 61 tokens to every session and 14,241 once invoked, about $0.0003 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.