/os-tk-done
Inputs
- •ticket id or alias
Resolve skill dir (for scripts)
bash
SKILL_DIR=".pi/skills/os-tk-done" if [[ ! -d "$SKILL_DIR" ]]; then SKILL_DIR="pi/skills/os-tk-done"; fi
Load config
- •
eval "$(bash "$SKILL_DIR/scripts/load-config.sh")"→CONFIG,MAIN_BRANCH,USE_WORKTREES,WORKTREE_DIR
Resolve ticket id
- •
TICKET_ID="$(bash "$SKILL_DIR/scripts/resolve-ticket-id.sh" "$1")"
Re-anchor (mandatory)
Invoke os-tk-reanchoring.
Canonical diff_hash + gate verification
- •
eval "$(bash "$SKILL_DIR/scripts/canonical-diff-hash.sh")"→BASE_REF,MERGE_BASE_SHA,DIFF_HASH
Verify gate (latest SHIP note matches current diff):
- •
bash "$SKILL_DIR/scripts/verify-ship-note.sh"(requiresTICKET_ID,DIFF_HASH)
Logging
Invoke os-tk-logging to write:
- •activity.log start/end events
- •progress.md
- •errors.log updates on failure
- •lessons learned (only if a new durable lesson is discovered)
Close ticket
- •
bash "$SKILL_DIR/scripts/close-ticket.sh"(requiresTICKET_ID)
Sync OpenSpec tasks
- •
eval "$(bash "$SKILL_DIR/scripts/resolve-openspec-refs.sh")"→EPIC_ID,CHANGE_ID,TASK_REF,TITLE - •
python3 "$SKILL_DIR/scripts/sync-openspec-tasks.py" "$CHANGE_ID" "$TASK_REF" "$TITLE"
Auto-archive if all tasks closed
- •
bash "$SKILL_DIR/scripts/auto-archive.sh"(requiresEPIC_ID,CHANGE_ID)
Merge + push
- •
bash "$SKILL_DIR/scripts/merge-push.sh"(requiresUSE_WORKTREES,WORKTREE_DIR,TICKET_ID,MAIN_BRANCH)
Cleanup worktree
- •
bash "$SKILL_DIR/scripts/cleanup-worktree.sh"(requiresUSE_WORKTREES,WORKTREE_DIR,TICKET_ID)
Stop condition
STOP after successful close + merge + logging.