Generate plan.json from Spec documents, OpenSpec changes, or free-text requirements. Use when: converting specifications into executable task plans for /orchestrate. Keywords: plan, spec, task plan, 計畫, 規格, 任務, plan.json, DAG.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-3 --plugin asiaostrich-universal-dev-standards[spec-file.md | openspec-dir/ | "requirement text" | (interactive)]This skill uses the workspace's default tool permissions.
```
Generates detailed implementation plans from approved spec.md files, iterates with human annotations, and outputs structured plan.json with phases, tasks, and steps. Use after spec approval to break into engineer-ready work.
Generates PLAN.md execution plan from SPEC.md, task directory, or existing plan file; creates phases/*.md, KNOWLEDGE.jsonl, artifacts/, and backups.
Share bugs, ideas, or general feedback.
/plan <spec-file.md> # Spec 模式(自有格式 / SpecKit)
/plan <openspec-change-dir/> # OpenSpec 模式
/plan "需求描述文字" # 需求模式
/plan # 互動模式(自動偵測)
根據引數類型判斷使用模式:
引數是 .md 檔案:
## Requirements 且 ## Technical Design → 自有格式(SPEC-NNN-*.md)## Summary 且 ## Detailed Design → SpecKit 格式引數是目錄:
proposal.md + tasks.md → OpenSpec 格式引數是字串描述(非檔案路徑): → 需求模式
無引數: → 互動模式
openspec/ 目錄存在? → 列出 changes 讓使用者選擇specs/*.md 存在? → 列出可用 Spec 讓使用者選擇讀取目標專案的關鍵資訊:
從 Context 推斷:
pnpm build && pnpm test、pytest -x)pnpm lint、ruff check .)依偵測到的格式,解析 Spec 內容:
提取以下區段:
讀取以下檔案:
proposal.md → Why(動機)、What Changes(變更項目)、Impacttasks.md → - [ ] checklist 項目design.md(若存在)→ 技術決策specs/*/spec.md(若存在)→ Requirements(SHALL/MUST 語句)、Scenarios提取以下區段:
依格式套用不同映射規則:
| Spec 區段 | plan.json 欄位 | 映射規則 |
|---|---|---|
| Technical Design > Phase | 一組 tasks | 每個 Phase 的每個實作項目 = 1 個 task |
| Phase 實作項目描述 | task.spec | 合併:項目描述 + 相關 REQ + 技術細節 |
| Acceptance Criteria (AC-N) | task.acceptance_criteria | 分配到最相關的 task |
| Summary / Motivation | task.user_intent | 萃取與 task 最相關的意圖 |
| Test Plan | task.verify_command | 推斷測試指令 |
| OpenSpec 檔案 | plan.json 欄位 | 映射規則 |
|---|---|---|
tasks.md 的 checklist 項目 | tasks | 每個 - [ ] 項目 = 1 個 task |
proposal.md > Why | task.user_intent | 所有 tasks 共用 |
proposal.md > What Changes | 融入 task.spec | 提供變更脈絡 |
design.md 技術細節 | 融入 task.spec | 補充實作指引 |
specs/*/spec.md > Scenarios | task.acceptance_criteria | 每個 Scenario 映射為一條 criteria |
specs/*/spec.md > Requirements | 融入 task.spec | SHALL/MUST 語句轉為具體實作指引 |
為 tasks 建立 depends_on 關係:
depends_on: [](可並行)依以下優先順序推斷:
pnpm build && pnpm testpytest -xquality: "standard"{
"project": "<專案名稱>",
"quality": "standard",
"defaults": {
"max_turns": 30,
"max_budget_usd": 2.0,
"verify_command": "<推斷的預設驗證指令>"
},
"tasks": [
{
"id": "T-001",
"title": "<task 標題>",
"spec": "<詳細的 task 規格說明>",
"depends_on": [],
"verify_command": "<task 層級驗證指令(可選)>",
"acceptance_criteria": ["<驗收條件 1>"],
"user_intent": "<使用者意圖>"
}
]
}
注意事項:
T-NNN(如 T-001, T-002)spec 欄位應詳盡——它是 agent 執行任務的唯一規格輸入acceptance_criteria 每條都必須是可觀察、可驗證的Claude 對 plan.json 執行以下驗證(無需外部引擎):
tasks 陣列存在且非空、每個 task 含必填欄位(id, title, spec)depends_on 中的所有 ID 均存在、無循環依賴rm -rf /、DROP DATABASE、git push --force)若發現問題,在呈現前先自動修正(若可修正)或標示警告。
向使用者呈現生成結果:
摘要表格:
| Task ID | 標題 | 依賴 | 驗證指令 |
|---------|------|------|----------|
| T-001 | ... | - | ... |
| T-002 | ... | T-001| ... |
DAG 拓撲:
Layer 0: T-001, T-002(並行)
Layer 1: T-003(依賴 T-001)
Layer 2: T-004(依賴 T-002, T-003)
品質設定:quality: standard
品質警告(若有)
詢問使用者:確認或修改?確認後寫入檔案(預設路徑:plans/<spec-name>.plan.json)
| 版本 | 日期 | 變更 |
|---|---|---|
| 2.0.0 | 2026-04-28 | 升格為 UDS 正式 Skill;移除 [DEVAP] 標記;Step 9 改為 Claude-native 驗證(XSPEC-097 Phase 3) |
| 1.0.0 | 2026-04-09 | 初始發布(DevAP packages/cli/skills/) |