unit-planner
从选定的管道和单元模板(deps/checkpoints/acceptance)实例化或更新工作区`UNITS.csv`。**触发**:单元规划器,生成UNITS.csv,执行合同,单元模板,生成单元。**使用时间**:初始化/更新执行合同:从管道选择生成`UNITS.csv`,或范围扩展需要添加单元/依赖。**如果**:`UNITS.csv`已正确反映当前工作范围(撤销重写)。**网络**:无。**Guardrail**:保持CSV合法;范围增长时新增单位;只在满足仓库后标记“DONE”。
📖 中文导读:从选定的管道和单元模板(deps/checkpoints/acceptance)实例化或更新工作区`UNITS.csv`。**触发**:单元规划器,生成UNITS.csv,执行合同,单元模板,生成单元。**使用时间**:初始化/更新执行合同:从管道选择生成`UNITS.csv`,或范围扩展需要添加单元/依赖。**如果**:`UNITS.csv`已正确反映当前工作范围(撤销重写)。**网络**:无。**Guardrail**:保持CSV合法;范围增长时新增单位;只在满足仓库后标记“DONE”。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: unit-planner
description: |
Instantiate or update a workspace UNITS.csv from a selected pipeline and units template (deps/checkpoints/acceptance).
Trigger: unit planner, generate UNITS.csv, execution contract, units template, 生成工作单元.
Use when: 初始化/更新执行合同:从 pipeline 选择生成 UNITS.csv,或 scope 扩展需要新增 units/依赖。
Skip if: UNITS.csv 已正确反映当前 scope(无需重写)。
Network: none.
Guardrail: 保持 CSV 合法;scope 增长时新增 units;只在满足验收后标 DONE。
Skill: unit-planner
Goal
- Turn a pipeline (
pipelines/*.pipeline.md) into a concreteUNITS.csvcontract for a specific workspace.
Inputs
PIPELINE.lock.md(preferred) or a chosenpipelines/*.pipeline.mdtemplates/UNITS.*.csvreferenced by the pipeline front matter- Existing workspace artifacts (to adjust scope if needed)
Outputs
UNITS.csv(in the workspace root)- Optional:
STATUS.mdupdated with next runnable units
Procedure (MUST FOLLOW)
Uses: templates/UNITS.*.csv.
- Read
PIPELINE.lock.md(or ask to create it viapipeline-router). - Copy the pipeline’s
units_templateinto the workspace asUNITS.csvif missing. - If
UNITS.csvexists, only edit it to reflect:- new scope (add rows)
- corrected dependencies
- clarified acceptance criteria
- Ensure every unit has:
unit_id,skill,outputs,acceptance,checkpoint,status,owner. - Keep checkpoints consistent with
CHECKPOINTS.md; add missing checkpoints if the pipeline uses custom checkpoints.
Acceptance criteria (MUST CHECK)
-
UNITS.csvparses as CSV and includes all required columns. - Every
depends_onreferences an existingU###.
Side effects
- Allowed: edit
UNITS.csv,STATUS.md,CHECKPOINTS.md(for adding custom checkpoints). - Not allowed: change pipeline files in
pipelines/unless requested.
Troubleshooting
Issue: PIPELINE.lock.md is missing
Fix:
- Run
pipeline-router(Mode A) orpython scripts/pipeline.py kickoff|initto createPIPELINE.lock.mdbefore generating units.
Issue: UNITS.csv becomes invalid CSV after edits
Fix:
- Keep semicolon-delimited
inputs/outputsand avoid unescaped commas inside fields; validate withpython scripts/validate_repo.py.