AgentSkillsCN

os-tk-bootstrap

根据 OpenSpec 变更(预览或执行)创建 tk epic + 任务。

SKILL.md
--- frontmatter
name: os-tk-bootstrap
description: Create tk epic + tasks from an OpenSpec change (preview or execute).

/os-tk-bootstrap

Inputs

  • <change-id>
  • <epic-title>
  • Optional --yes for execute mode

Resolve skill dir (for scripts)

bash
SKILL_DIR=".pi/skills/os-tk-bootstrap"
if [[ ! -d "$SKILL_DIR" ]]; then SKILL_DIR="pi/skills/os-tk-bootstrap"; fi

Parse arguments

  • eval "$(bash "$SKILL_DIR/scripts/parse-args.sh" "$@")"CHANGE_ID, EPIC_TITLE, MODE

Load proposal for context

  • bash "$SKILL_DIR/scripts/show-proposal.sh" (requires CHANGE_ID)

Design tickets

  • Create small focused tasks based on openspec/changes/<id>/tasks.md.
  • If a task feels too large, split it.
  • Decide real dependencies.
  • Predict file touches (files-modify, files-create).

Build commands (preview)

Epic creation:

  • source "$SKILL_DIR/scripts/build-epic-command.sh" → sets EPIC_CMD

Task creation (repeat per task):

  • source "$SKILL_DIR/scripts/build-task-command.sh" → sets TASK_CMD

Dependencies (repeat):

  • source "$SKILL_DIR/scripts/build-dep-command.sh" → sets DEP_CMD

Preview mode

If MODE=preview:

  • Print the exact commands that would run.
  • STOP.

Execute mode

If MODE=execute:

  • eval "$(bash "$SKILL_DIR/scripts/execute-epic.sh")" → creates epic, sets EPIC_ID

For each task:

  • eval "$(bash "$SKILL_DIR/scripts/execute-task.sh")" → creates task, sets TASK_ID

Then apply frontmatter fields via tk-frontmatter:

  • alias: <change-id>.<n>
  • files-modify: [...]
  • files-create: [...]
  • openspec_task_ref: <checkbox or task reference>

Finally, apply dependencies:

  • bash "$SKILL_DIR/scripts/apply-dep.sh"

Show queue:

  • bash "$SKILL_DIR/scripts/show-ready.sh"

Stop condition

  • In preview mode: STOP after listing commands.
  • In execute mode: STOP after creating tickets and showing tk ready.