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.
npx agentmods add commands/doggy8088/spec-kit/constitutiongit clone --depth 1 https://github.com/doggy8088/spec-kitWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00031 | $0.01536 |
| Opus 5 | $0.00015 | $0.00768 |
| Sonnet 5 | $0.00006 | $0.00307 |
| Haiku 4.5 | $0.00003 | $0.00154 |
Grade A, and why
constitution 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.
How it starts
The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.
用戶輸入
$ARGUMENTS
你在繼續操作前,必須考慮用戶輸入(若非空)。
大綱
你正在更新位於 /memory/constitution.md 的專案憲章(project constitution)。此檔案為一個模板(TEMPLATE),內含以方括號標示的占位符(placeholder token)(例如:[PROJECT_NAME]、[PRINCIPLE_1_NAME])。你的工作是:(a) 收集或推導具體值,(b) 精確填入模板,(c) 將任何修訂同步至所有相依產物。
請依照以下執行流程(Execution Flow)操作:
-
載入現有的專案憲章模板(project constitution template),路徑為
/memory/constitution.md。- 辨識所有形式為
[ALL_CAPS_IDENTIFIER]的占位符。 重要事項:用戶可能需要的原則(principle)數量比模板中多或少。若指定數量,請遵循該數量,並依一般模板格式調整。你將相應更新文件內容。
- 辨識所有形式為
-
收集/推導占位符的具體值:
- 若用戶輸入(對話內容)有提供值,則直接採用。
- 否則,從現有 repository 上下文(如 README、文件、過往憲章版本(若有嵌入))推導。
- 關於治理日期(governance dates):
RATIFICATION_DATE為最初通過日期(original adoption date)(若不明請詢問或標記 TODO),LAST_AMENDED_DATE若有變更則為今日,否則維持原值。 CONSTITUTION_VERSION必須依語意化版本控制(Semantic Versioning)規則遞增:- MAJOR:治理或原則有向下不相容的移除或重新定義。
- MINOR:新增原則/章節,或指引有實質擴充。
- PATCH:釐清、措辭、錯字修正、非語意性微調。
- 若版本號遞增類型不明確,請先提出推論理由再定案。
-
擬定更新後的專案憲章內容:
- 用具體文字取代所有占位符(除非專案選擇暫不定義的模板欄位,否則不得殘留方括號 token——如有保留,需明確說明理由)。
- 保留標題階層,已被取代的註解可移除,除非仍具釐清指引價值。
- 確保每個原則(Principle)章節:有簡明命名行、段落(或條列)說明不可協商規則,若理由不明顯則需明確說明。
- 確保治理(Governance)章節列出修訂程序、版本管理政策、合規審查預期。
-
一致性同步檢查清單(將先前檢查清單轉為主動驗證):
- 閱讀
/templates/plan-template.md,確保所有「專案憲章檢查(Constitution Check)」或規則與最新原則一致。 - 閱讀
/templates/spec-template.md,檢查範疇/需求一致性——若憲章增減強制章節或限制,需同步更新。 - 閱讀
/templates/tasks-template.md,確保任務分類反映新增或移除的原則驅動任務類型(如可觀察性、版本管理、測試紀律)。 - 閱讀
/templates/commands/*.md內每個指令檔(包括本檔),確認無過時引用(如僅限 agent 專屬名稱 CLAUDE,若需通用指引則移除)。 - 閱讀所有執行時指引文件(如
README.md、docs/quickstart.md,或 agent 專屬指引檔如有),同步更新原則相關引用。
- 閱讀
-
產生同步影響報告(Sync Impact Report)(更新後於憲章檔案頂端以 HTML 註解形式前置):
- 版本變更:舊版 → 新版
- 修改過的原則(若標題有更名則列出 舊標題 → 新標題)
- 新增章節
- 移除章節
- 需同步更新的模板(✅ 已更新 / ⚠ 待處理),附檔案路徑
- 若有占位符刻意延後,列為後續 TODO
-
輸出前驗證:
- 無未解釋的方括號 token 殘留。
- 版本號行與報告一致。
- 日期採用 ISO 格式 YYYY-MM-DD。
- 原則必須具宣告性、可測試,且避免模糊語言(如「should」→ 視情況改為 MUST/SHOULD 並給出理由)。
-
將完成的專案憲章覆寫寫回
/memory/constitution.md。 -
向用戶輸出最終摘要,內容包含:
- 新版本號與遞增理由。
- 任何需人工後續處理的檔案。
- 建議的 commit message(如
docs: amend constitution to vX.Y.Z (principle additions + governance update))。
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.
- 2d ago First seen · 79 lines · 31 tokens per session scan A 1ea2c791cb0f
constitution is a command published in the GitHub repository doggy8088/spec-kit (287 stars, last pushed 10mo ago), licensed MIT. It adds 31 tokens to every session and 1,536 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.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.