locales/zh-CN/skills/plan/SKILL.md
[UDS] 从 Spec 文档、OpenSpec 变更或自由文本需求生成 plan.json。 Use when: converting specifications into executable task plans for /orchestrate. Keywords: plan, spec, task plan, 计划, 规格, 任务, plan.json, DAG.
npx skillsauth add asiaostrich/universal-dev-standards planInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
语言: English | 简体中文
/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 | 初始发布(从上游迁移) |
development
[UDS] 扫描代码库的调试残留与代码质量问题;可自动修正安全模式。 Use when: before committing, during PR review, or periodic codebase cleanup. Keywords: sweep, debug cleanup, console.log, debugger, TODO, ts-any, code quality, 扫描, 清理.
tools
[UDS] 从规格衍生 BDD 场景、TDD 骨架或 ATDD 表格
development
[UDS] 识别重复流程并以正确的开发深度构建 Skill
tools
[UDS] AI 辅助 git push 安全层:质量门禁 + 协作护栏。 Use when: pushing commits, force pushing, pushing to protected branches, pushing feature branches. Keywords: git push, force push, protected branch, quality gate, push receipt, PR automation, 推送, 保护分支, 质量门禁.