AgentSkillsCN

os-tk-work

采用工作者模式实施单个工单(需重新锚定)。

SKILL.md
--- frontmatter
name: os-tk-work
description: Implement one ticket using the worker model (re-anchoring required).

/os-tk-work

Purpose

Implement one ticket using the worker model.

Resolve skill dir (for scripts)

All helper scripts live alongside this skill. Resolve a path that works:

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

Parse arguments

Run:

  • eval "$(bash "$SKILL_DIR/scripts/parse-args.sh" "$@")" to populate INPUT and WITH_SCOUTS.

Load config

Run:

  • eval "$(bash "$SKILL_DIR/scripts/load-config.sh")" to populate CONFIG, USE_WORKTREES, WORKTREE_DIR, and MAIN_BRANCH.

Resolve ticket id

  • TICKET_ID="$(bash "$SKILL_DIR/scripts/resolve-ticket-id.sh" "$INPUT")"

Validate readiness

  • bash "$SKILL_DIR/scripts/validate-ready.sh" "$TICKET_ID"

Re-anchor

Invoke os-tk-reanchoring (mandatory).

Optional repo scouting

If WITH_SCOUTS=1, run repo-scout before implementation:

bash
if [[ "$WITH_SCOUTS" == "1" ]]; then
  subagent({
    "agent":"os-tk-repo-scout",
    "task":"Review ticket ${TICKET_ID} and the related OpenSpec change/specs. Find existing patterns, conventions, related code paths, and test patterns to reuse. Include file paths + line refs.",
    "agentScope":"both",
    "async": false
  })
fi

Worktree setup

  • bash "$SKILL_DIR/scripts/worktree-setup.sh"

Start ticket

  • bash "$SKILL_DIR/scripts/start-ticket.sh"

Delegate implementation

Use the worker model:

js
subagent({
  "agent":"os-tk-worker",
  "task":"Implement ticket ${TICKET_ID}. Run tests, verify acceptance, commit changes, and record evidence.",
  "agentScope":"both",
  "async": false
})

Output

  • Summarize changes and files touched.
  • Instruct next steps:
    • /os-tk-review <ticket-id|alias>
    • /os-tk-done <ticket-id|alias>