By applepig
Structures AI-assisted software development into a repeatable Document Driven Development workflow: write formal specs, break into tasks, implement via TDD, and automatically cross-review code, specs, and security before commit.
DDD 開發者 subagent——以 TDD 循環實作功能程式碼與測試。 Use this agent when dispatching implementation work during /ddd.work, when a specific task needs autonomous implementation, or when test cases need to be written for existing or planned code. Examples: <example> Context: /ddd.work 平行模式,coordinator 派發工作線給 worker user: "開始實作 milestone 3" assistant: "這個 milestone 有兩條平行工作線,我派發 ddd-developer agent 分別處理。" <commentary> Milestone 包含 🔀 可平行工作線,coordinator 需要派發獨立 worker 執行各工作線。 </commentary> </example> <example> Context: 單一 task 需要獨立實作,主 session 繼續做其他事 user: "這個 API endpoint 你派 agent 去寫,我們繼續討論下一個 milestone" assistant: "好,我派 ddd-developer 去實作 API endpoint,我們繼續規劃。" <commentary> 使用者想平行推進,派 developer agent 背景執行實作任務。 </commentary> </example> <example> Context: 功能已實作但缺少測試 user: "這個模組沒有測試,補一下" assistant: "我派 ddd-developer 分析模組行為並補上測試。" <commentary> 既有程式碼缺少測試覆蓋,需要 developer agent 補上。 </commentary> </example>
DDD 審查 subagent——獨立審查文件、規格一致性、實作與安全性風險,產出 review 報告。 Use this agent when dispatched by /ddd.xreview for cross-review, or when documents or code changes need independent review before committing. Examples: <example> Context: /ddd.xreview 派發 Claude 端的 reviewer user: "cross review 這次的變更" assistant: "我同時派出 Gemini 和 Claude reviewer 獨立審查。" <commentary> xreview 需要派出獨立的 Claude reviewer subagent,與 Gemini reviewer 平行執行。 </commentary> </example> <example> Context: Milestone 完成,提交前需要 review user: "commit 前幫我 review 一下" assistant: "我派 ddd-reviewer 審查這次的變更。" <commentary> 提交前的獨立 DDD review,確認文件、規格一致性、實作與安全性風險。 </commentary> </example>
E2E 除錯指南:用 agent-browser CLI 在 DDD 工作流中系統性除錯前端問題。 Trigger: "debug E2E", "check the page", "why is the test failing", "open the browser", "take a screenshot", "inspect the DOM", "E2E 失敗", "測試壞了", "檢查頁面", /ddd.agent-browser。 E2E 測試失敗、需要視覺驗證 UI 行為、或追蹤前端問題時使用。
Bug 修復:系統性診斷與修復 bug,產出三合一 works.md。 獨立觸發的 hotfix 快速解,main agent 直接修,不派 ddd-developer。 Trigger: "fix bug", "fix this", "bugfix", "hotfix", "修 bug", "修這個", "這裡壞了", "有 bug", /ddd.fixbug。 發現 bug 需要快速修復時使用;xreview findings 的修正走 /ddd.xreview 流程,不用本 skill。
前置規劃:DDD 版 grill-with-docs。用 PRD、TECHSTACK、既有 sprint 文件與 codebase stress-test 使用者的 idea / rough plan,沿 decision tree 逐一釐清阻塞決策,最後直接 chain 到 /ddd.spec。 適用於 brownfield extension、greenfield brainstorming、需求模糊、需要 domain language / 技術方向校準的情境。 Trigger: "plan a feature", "plan an extension", "clarify requirements", "brainstorm", "explore ideas", "from scratch", "greenfield", "規劃擴充", "規劃改動", "規劃功能", "釐清需求", "腦力激盪", "從頭開始", /ddd.plan。
撰寫規格書:產出包含 User Story、驗收條件、API 契約、ADR、輕量 Milestones 的 spec.md。 Trigger: "write a spec", "define requirements", "draft acceptance criteria", "寫規格", "定義需求", "驗收條件", /ddd.spec。 功能需要正式規格才能開始實作時使用。
任務拆解:spec.md 確認後,必要時細化 Milestones、建立 optional tasks.md 作為複雜執行計畫, 或將過大的 scope 拆成 semver-like 子編號資料夾。 Trigger: "細化 milestones", "拆分 sprint", "break down tasks", "create a task list", "split into sub-sprints", /ddd.tasks。
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Document Driven Development 工作流——讓 AI agent 用結構化的文件驅動開發,而非直接跳進程式碼。
No Code Without Docs, No Code Without Tests.
每個功能都從文件開始:先釐清需求、寫 spec,確認後才動手寫程式碼。Main agent 擔任 Coordinator(規劃、派工、驗收),實作和 review 交給專屬 subagent,保護 main agent 的 context window 不被消耗。
使用 Agent Skills CLI 安裝全部 DDD skills:
npx skills add applepig/ddd-workflow --skill "*" -g -a claude-code -a opencode -a codex -a gemini-cli
先檢查可用 skills:
npx skills add applepig/ddd-workflow --list
如果你已 clone 本 repo,也可以從本機目錄安裝:
npx skills add . --skill "*" -g -a claude-code -a opencode -a codex -a gemini-cli
npx skills 只安裝 skills/。本 package 另外提供 bin/ entrypoints,處理 agents、instruction files、config 與 runtime scripts。
建立平台 agents 產物:
npm run agents:build
部署 non-skill 項目到本機 agent 設定目錄:
npm run agents:deploy -- --dry-run
npm run agents:deploy
可指定單一平台:
npm run agents:deploy -- claude --dry-run
npm run agents:deploy -- opencode
flowchart TD
Start([新專案]) --> Init["建立 docs/<br/>PRD.md + TECHSTACK.md"]
Init --> Feature([提出功能需求])
Feature --> Clarity{需求明確?}
Clarity -- 模糊 --> Plan["/ddd.plan<br/>釐清方向"]
Plan --> Spec
Clarity -- 明確 --> Spec["/ddd.spec<br/>撰寫 spec.md"]
Spec --> UserSpec{使用者確認 spec?}
UserSpec -- 修改 --> Spec
UserSpec -- 確認 --> NeedTasks{需要細化 Milestones?}
NeedTasks -- 否 --> Work
NeedTasks -- 是 --> Tasks
Tasks["/ddd.tasks<br/>細化 Milestones / optional tasks / 拆分 Sprint"] --> UserTasks{使用者確認任務來源?}
UserTasks -- 修改 --> Tasks
UserTasks -- 確認 --> Work
Work["/ddd.work<br/>TDD 循環實作"] --> Review
Review["/ddd.xreview<br/>Cross review(多模型獨立審查)"] --> Fix{需要修正?}
Fix -- 是 --> Work
Fix -- 否 --> Next{還有下一個功能?}
Next -- 是 --> Feature
Next -- 否 --> Done([完成])
flowchart LR
User([使用者]) <--> Coord
subgraph Main["Main Agent(Coordinator)"]
Coord[規劃 / 派工 / 驗收]
end
Coord --> Dev["ddd-developer<br/>TDD 實作"]
Coord --> Rev["ddd-reviewer<br/>程式碼審查"]
Dev --> Coord
Rev --> Coord
| 角色 | 職責 | 不做什麼 |
|---|---|---|
| Coordinator(main agent) | 需求分析、撰寫 spec、必要時細化 Milestones、派工、驗收 | 不寫 production code、不 debug、不做 review(例外:/ddd.fixbug 直接修) |
| ddd-developer | 以 TDD 循環實作功能程式碼與測試 | 不做架構決策、不跳過測試 |
| ddd-reviewer | 獨立審查程式碼變更,產出 review 報告 | 不修改程式碼 |
每個需求對應一個文件包,作為 SSOT(Single Source of Truth):
docs/
├── PRD.md # 產品需求文件(專案層級,只建一次)
├── TECHSTACK.md # 技術棧 + 參考文件連結(專案層級,只建一次)
└── <編號>-<名稱>/ # Sprint 文件包(每個功能一個)
├── plan.md # (optional) 初步筆記
├── research.md # (optional) 技術調研
├── spec.md # 規格書:User Story、驗收條件、ADR、輕量 Milestones
├── tasks.md # (optional, 淘汰中) 複雜執行協調用,需核可才作任務來源
└── works.md # 成果與決策紀錄
專案初始化時先建立 PRD.md(產品目標、使用者、範圍)和 TECHSTACK.md(語言、框架、部署環境),後續每個功能的 spec 都以此為基礎。
主流程 skills(按順序使用,指令名稱與文件名皆為 alphabetical order — by design):
| Slash Command | 用途 | 何時觸發 |
|---|---|---|
/ddd.plan | 需求模糊時釐清方向 | 「我有個想法…」 |
/ddd.spec | 撰寫正式規格書 spec.md,含輕量 Milestones | 需求明確,準備定義規格 |
/ddd.tasks | 細化 Milestones 或拆分 Sprint(複雜協調才建 optional tasks.md) | spec 確認後,且需要細化或拆分 Sprint |
/ddd.work | 以 TDD 循環實作(支援平行派工) | spec 確認後 |
/ddd.xreview | 多模型 cross review | 實作完成,準備提交前 |
輔助 skills:
| Slash Command | 用途 |
|---|---|
/ddd.fixbug | Bug 快速修復——main agent 直接診斷與修復(唯一不派工的例外) |
/ddd.agent-browser | E2E 除錯——用瀏覽器自動化系統性地除錯前端問題 |
ddd-workflow/
├── skills/ # Agent Skills 定義(slash commands)
│ └── ddd.<name>/
│ ├── SKILL.md # YAML frontmatter + 指令內容
│ └── references/ # (optional) 參考資料
├── agents/ # Claude-compatible canonical agents
├── bin/ # public CLI entrypoints
├── chunks/ # bin runtime chunks
├── deploy/ # bin deploy runtime
├── scripts/ # package-level runtime scripts
├── config/ # user-editable config templates
├── policies/ # CLI policy files
├── references/
│ └── AGENTS.md # 共用指令檔(coding style、工具偏好等)
└── package.json
MIT
npx claudepluginhub applepig/ddd-workflowSpecification-driven development workflow: specify → plan → tasks → implement
AI-driven development toolkit for TDD and SDD workflows, providing comprehensive command templates and agents to enhance developer productivity with Claude Code
Spec-driven development methodology for full-stack teams
Agent Driven Development (ADD) — Coordinated AI agent teams that ship verified software. Spec-driven TDD, trust-but-verify orchestration, human-AI collaboration protocols, environment-aware deployment, and cross-project learning.
Helder's personal SDLC toolbelt for AI coding agents — from PRD to ship. Bundles the tracer-bullet workflow alongside TDD, code review, audits, and shipping skills.
Spec-driven development for big features. When features get too big, plan mode gets too vague—leading to hallucinations during implementation. ShipSpec replaces vague plans with structured PRDs, technical designs, and ordered tasks that keep Claude grounded.