clarify

A command that finds missing or unclear decisions in a feature specification by asking focused questions and recording the answers in the specification.

In plain words
What is it for?
It helps clarify user goals, edge cases, technical constraints, external services, data models, quality expectations, and measurable acceptance criteria.
Why use it?
It reduces ambiguity before planning and helps expose gaps in behavior, data, errors, security, integrations, and completion criteria.

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/doggy8088/spec-kit/clarify
Clone the repo
git clone --depth 1 https://github.com/doggy8088/spec-kit
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,224 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.00044 $0.03224
Opus 5 $0.00022 $0.01612
Sonnet 5 $0.00009 $0.00645
Haiku 4.5 $0.00004 $0.00322

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

Security

Grade A, and why

clarify 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 2d 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.

templates/commands/clarify.md · 182 lines

How it starts

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

用戶輸入

$ARGUMENTS

你在進行後續操作前,必須考慮用戶輸入(若非空)。

大綱

目標:偵測並減少目前功能規格說明中的模糊或缺失決策點,並將釐清結果直接記錄於規格檔案中。

注意:此釐清流程預期應在執行 /speckit.plan 前運行並完成。若用戶明確表示要跳過釐清(例如:探索性 spike),你可以繼續,但必須警告後續返工風險會增加。

執行步驟:

  1. 從 repo 根目錄執行 {SCRIPT} 一次(合併 --json --paths-only 模式 / -Json -PathsOnly)。解析最小的 JSON 負載欄位:

    • FEATURE_DIR
    • FEATURE_SPEC
    • (可選擇性擷取 IMPL_PLANTASKS 以供未來串接流程使用。)
    • 若 JSON 解析失敗,請中止並指示用戶重新執行 /speckit.specify 或確認功能分支環境。
    • 對於參數中如 "I'm Groot" 這類單引號,請使用跳脫語法:例如 'I'''m Groot'(或若可行則用雙引號:"I'm Groot")。
  2. 載入目前的規格檔。使用下列分類法進行結構化的模糊性與覆蓋範圍掃描。對每個分類標記狀態:明確 / 部分 / 缺失。產生一份內部覆蓋地圖以用於優先排序(除非不會提出任何問題,否則不要輸出原始地圖)。

    功能範圍與行為:

    • 核心用戶目標與成功標準
    • 明確的超出範圍聲明
    • 用戶角色 / 人格區分

    領域與資料模型:

    • 實體、屬性、關聯
    • 身分識別與唯一性規則
    • 生命週期/狀態轉換
    • 資料量 / 規模假設

    互動與使用者體驗流程:

    • 關鍵用戶旅程 / 操作序列
    • 錯誤/空值/載入狀態
    • 無障礙或在地化備註

    非功能性品質屬性:

    • 效能(延遲、吞吐量目標)
    • 可擴展性(橫向/縱向、限制)
    • 可靠性與可用性(運作時間、復原預期)
    • 可觀測性(紀錄、指標、追蹤訊號)
    • 安全性與隱私(認證/授權、資料保護、威脅假設)
    • 合規 / 法規約束(如有)

    整合與外部相依性:

    • 外部服務/API 及失敗模式
    • 資料匯入/匯出格式
    • 協定/版本假設

    邊界情境與失敗處理:

    • 負面情境
    • 流量限制 / 節流
    • 衝突解決(例如:同時編輯)

    限制與取捨:

    • 技術限制(語言、儲存、託管)
    • 明確的取捨或已拒絕方案

    術語與一致性:

    • 標準詞彙表術語
    • 避免同義詞 / 已棄用術語

    完成訊號:

    • 驗收標準可測試性
    • 可衡量的完成定義(Definition of Done)指標

    其他 / 占位符:

    • TODO 標記 / 未決策事項
    • 缺乏量化的模糊形容詞(如「健壯」、「直覺」)

    對於每個狀態為「部分」或「缺失」的分類,除非:

    • 釐清後不會實質影響實作或驗證策略
    • 該資訊更適合於規劃階段再處理(僅作內部註記) 否則請新增一個候選問題機會。
  3. 產生(內部使用)一個優先排序的候選釐清問題佇列(最多 5 題)。切勿一次性全部輸出。請遵循以下限制:

    • 全流程最多 10 題。
    • 每題必須可用下列任一方式回答:
      • 簡短的多選(2–5 個明確互斥選項),或
      • 一個單字 / 短語答案(明確限制:「答案不超過 5 個字」)。
    • 僅納入答案會實質影響架構、資料建模、任務分解、測試設計、使用者體驗行為、營運準備或合規驗證的問題。
    • 確保分類覆蓋均衡:優先解決高影響未解類別;避免兩個低影響問題取代一個高影響(如安全性立場)未解問題。
    • 排除已回答、瑣碎風格偏好或計畫層級執行細節(除非影響正確性)。
    • 優先釐清能減少後續返工風險或避免驗收測試錯誤對齊的問題。
    • 若未解類別超過 5 個,請依(影響力 * 不確定性)啟發式選前 5 個。
  4. 互動式提問循環:

    • 每次僅呈現一題
    • 若為多選題:
      • 分析所有選項,並根據下列依據判斷最合適選項
        • 該專案類型最佳實踐
        • 類似實作的常見模式
        • 風險降低(安全性、效能、可維護性)
        • 與規格中任何明確專案目標或限制的一致性
      • 將你的推薦選項明顯置頂,並以 1–2 句說明為何這是最佳選擇。
      • 格式如下:**Recommended:** Option [X] - <reasoning>
      • 然後以 Markdown 表格呈現所有選項:

Read the full file on GitHub · 182 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. 2d ago First seen · 182 lines · 44 tokens per session scan A 268a23dfe23e

Subscribe to this mod's changes

clarify is a command published in the GitHub repository doggy8088/spec-kit (287 stars, last pushed 10mo ago), licensed MIT. It adds 44 tokens to every session and 3,224 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.