spec-write-tasks
把 settled spec-plan 编译成可验证 task pack,或验证已有 task pack。
ASCII 链路图
Codebase -> Spec -> Plan -> Tasks -> Code -> Review -> Knowledge
|
v
spec-write-tasks
entry: spec-write-tasks
type: workflow command基本信息
| 字段 | 内容 |
|---|---|
| Skill | spec-write-tasks |
| 类型 | workflow command |
| 研发链路位置 | Tasks |
| 当前入口 | spec-write-tasks |
| 兼容别名 | /spec:write-tasks、$spec-write-tasks |
| Source | skills/spec-write-tasks/SKILL.md |
| Governance | src/cli/contracts/dual-host-governance/skills-governance.json(supported-host skills governance) |
描述
Public workflow entrypoint (spec-write-tasks): compile a settled local spec-plan into an optional derived task pack for spec-work, or validate an existing local task pack before execution. Use for explicit plan-splitting/task-doc requests or high-complexity work suitability; do not use for plan authoring, implementation execution, unresolved scope, small low-risk plans, progress/approval state, remote/generic task lists, or generated runtime mirror edits. Keep the plan as single source of truth; tasks are derived and optional.
Source 契约摘要
When To Use
Use when a settled local source plan is too large or dependent for direct execution, when the user explicitly asks to split a plan into tasks, or when an existing local task pack needs validation before spec-work.
When Not To Use
Do not use for unresolved product or architecture scope, small changes that do not need a derived layer, remote repositories or package names, marketplace skill lookup, or implementation prompts that should go directly to spec-work.
Inputs
A local source plan path, existing task-pack path, or clear task-splitting request that resolves to one local source plan. Inputs must stay local and source-owned; remote repos, packages, marketplace identifiers, and generic task lists are rejected.
Outputs
One of: executable derived task pack, validated existing task-pack handoff, skip, return-to-plan, draft-only, or validate-only envelope. Task packs are derived execution indexes and never replace the source plan.
Artifacts
Executable task packs live under docs/tasks/ and must carry an artifact-root-relative POSIX source_plan, canonical source_plan_hash, generated_by: spec-write-tasks, mode: derived, and a valid Task Pack Contract JSON block. Executable identity is source-plan-path+body-hash; spec_id is an optional compatibility trace rather than a required identity field.
Failure Modes
Use machine-readable reason codes: source_plan_missing, ambiguous_plan, wrong_chain, stale_hash, unverifiable_hash, invalid_contract, repo_scope_missing, or scope_gap.
Workflow
Classify input, verify plan identity and repo scope, choose one branch (compile, skip, return-to-plan, draft-only, validate-only), use bounded source orientation only when it improves task boundaries, write or validate the task pack, then return the final decision envelope.
Downstream Consumers
spec-work, high-risk spec-doc-review handoff, human reviewers, and later code-review/compound workflows.
何时使用
- 用户要求拆任务。
- 计划足够大,direct work 会增加上下文负担。
- 需要明确 dependencies、waves、file ownership 和 stop_if。
工作步骤
- 读取 source plan,并验证 spec_id、source_plan_hash 和 repo scope。
- 从计划中抽取 requirements、implementation units、files、verification 和 stop conditions。
- 按真实依赖、文件重叠和验证面拆分 task cards 与 execution waves。
- 确保 task pack 只派生执行切片,不新增 scope 或第二套计划。
输出
- executable task pack、draft-only task pack、skip、return-to-plan 或 validation result。
- task graph、execution waves、task cards、test_focus、done_signal 和 stop_if。
Agent 调度
- 通常不需要 persona agents;必要时只做 bounded source orientation。
- task pack 语义质量可交给 spec-doc-review personas 审查。
本 skill 当前没有 skill-local references/agents 或 references/personas 文件;默认由 orchestrator 直接完成,或按阶段需要临时调用其他 skill 的专家。
边界
- 只把 settled plan 编译成派生 task pack,不新增 source plan 没有的 scope 或 acceptance criteria。
- 不改变计划范围或验收标准。
源码校准
- 本页由
website/scripts/generate-skill-detail-pages.js从上游 source skill 生成。 - 当前入口、兼容别名与宿主投递 metadata 来自
src/cli/contracts/dual-host-governance/skills-governance.json。 - 当 source skill 或 governance contract 变化后,应重新运行
npm run reference:pages并执行npm run content:audit。
