AgentSkillsCN

unit-planner

根据选定的流程与单元模板(依赖项/检查点/验收标准),初始化或更新工作空间中的 `UNITS.csv` 文件。 **触发条件**:单元规划师、生成 UNITS.csv、执行合约、单元模板、生成工作单元。 **适用场景**:当您需要初始化或更新执行合约时——从流程中选择生成 `UNITS.csv`,或因范围扩展而需新增单元与依赖项。 **跳过条件**:若 `UNITS.csv` 已准确反映当前范围(无需重新编写)。 **网络需求**:无。 **约束规则**:确保 CSV 文件合法合规;在范围扩大时新增单元;仅在满足验收标准后,方可标记为“已完成”。

SKILL.md
--- frontmatter
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 concrete UNITS.csv contract for a specific workspace.

Inputs

  • PIPELINE.lock.md (preferred) or a chosen pipelines/*.pipeline.md
  • templates/UNITS.*.csv referenced by the pipeline front matter
  • Existing workspace artifacts (to adjust scope if needed)

Outputs

  • UNITS.csv (in the workspace root)
  • Optional: STATUS.md updated with next runnable units

Procedure (MUST FOLLOW)

Uses: templates/UNITS.*.csv.

  1. Read PIPELINE.lock.md (or ask to create it via pipeline-router).
  2. Copy the pipeline’s units_template into the workspace as UNITS.csv if missing.
  3. If UNITS.csv exists, only edit it to reflect:
    • new scope (add rows)
    • corrected dependencies
    • clarified acceptance criteria
  4. Ensure every unit has: unit_id, skill, outputs, acceptance, checkpoint, status, owner.
  5. Keep checkpoints consistent with CHECKPOINTS.md; add missing checkpoints if the pipeline uses custom checkpoints.

Acceptance criteria (MUST CHECK)

  • UNITS.csv parses as CSV and includes all required columns.
  • Every depends_on references an existing U###.

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) or python scripts/pipeline.py kickoff|init to create PIPELINE.lock.md before generating units.

Issue: UNITS.csv becomes invalid CSV after edits

Fix:

  • Keep semicolon-delimited inputs/outputs and avoid unescaped commas inside fields; validate with python scripts/validate_repo.py.