원클릭으로
tk-triage
Review abandoned and in-progress tk tickets with timestamps and ralph logs. Use to audit stalled work and decide what to do about it.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Review abandoned and in-progress tk tickets with timestamps and ralph logs. Use to audit stalled work and decide what to do about it.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Convert conversation context into atomic PKM artifacts (.ref.md, .synth.md, .temp.md) with compound extensions and frontmatter. Use when the user asks to capture findings, save research, or create knowledge base entries.
Nurture intuitions into defined problems and evaluate approaches through dialogue.
Reference material for producing epistemically classified PKM artifacts during research. Covers epistemic classification, PKM schema, behavioral guidance, and qmd duplicate checking.
Evaluate and fix unresolved review comments for a PR
Execute tk tickets interactively with human approval gates. Dispatches subagents per task, presents results for review.
Convert a plan file into actionable tk tickets with dependencies. Researches the codebase to vet the plan, decomposes into tickets, verifies the decomposition, and creates tickets in tk.
| name | tk-triage |
| description | Review abandoned and in-progress tk tickets with timestamps and ralph logs. Use to audit stalled work and decide what to do about it. |
| disable-model-invocation | false |
Triage stalled tk tickets. Surface abandoned and in-progress work, examine timestamps and ralph execution logs, classify failure modes, and help the user decide next steps.
!bash ~/dotfiles/scripts/tk-triage-context.sh ready
!bash ~/dotfiles/scripts/tk-triage-context.sh stale
!bash ~/dotfiles/scripts/tk-triage-context.sh abandoned
!bash ~/dotfiles/scripts/tk-triage-context.sh logs
Identify tickets to triage: From the state above, collect all in-progress and abandoned tickets. If none are found, tell the user and stop.
Gather context for each ticket:
tk show <id> for full details (status, tags, creation timestamp, notes)git log --oneline --all --grep="tk(<id>)" — an abandoned ticket with commits means partial work exists in the repogrep -E "^(Started by|Claim relinquished by)" "$(tk dir)/<id>.md"${RALPH_LOG_DIR:-.ralph/runs}/<id>.json. If it exists, read it and extract:
result — what the agent reportedsubtype — success or errorduration_ms — how long the session rantotal_cost_usd — cost of the runnum_turns — how many turns the agent took (key for failure classification)permission_denials — tool permissions that blocked the agenttk dep tree --reverse <id> to show which tickets depend on this one recursively (the full downstream cascade). Also run tk dep tree <id> to show its own dependencies (context for why it may be stuck). Present both trees in the report.Classify failure mode (Inferred — cite evidence from log and ticket notes):
| Pattern | Classification | Evidence |
|---|---|---|
| Permission denials present | Permission blocked | Agent needed tools ralph doesn't allow |
Low num_turns (< 5), no commits | Underspecified or early block | Agent couldn't make progress — ticket may need more context |
High num_turns (> 20), no tk close | Too large or context exhaustion | Agent worked extensively but couldn't finish in one session |
| Exit code 0 but not closed | Agent confusion | Agent thought it was done but didn't close the ticket |
| Exit code non-0 | Crash or timeout | Agent process terminated abnormally |
| Commits exist but ticket open | Partial work | Agent committed changes but didn't complete all acceptance criteria |
in_progress, no abandoned tag, no ralph log | Stale claim | Claimed by /execute or ralph but session ended without closing or abandoning — likely user closed terminal or switched context |
in_progress, no abandoned tag, has ralph log | Missed abandonment | Ralph ran but failed to tag — check log for details |
| Multiple "Started by" notes, no close | Repeated claim failure | Ticket claimed multiple times without completion — may be underspecified, too large, or orphaned by double-relinquish (both claimers saw each other and both backed off) |
| "Claim relinquished" notes present | Claim contention | Competing claims detected — check whether someone actually owns it now. Double-relinquish can leave a ticket in_progress with no owner |
Present the triage report as a structured summary per ticket:
| Field | Value |
|---|---|
| ID / Title | from tk show |
| Status | current status + tags |
| Created | creation timestamp |
| Last Activity | most recent note timestamp |
| Ralph Outcome | success/error, duration, cost, turns |
| Failure Mode | classification from step 3 |
| Partial Work | commits found via git log --grep |
| Claim History | who claimed, how many times, any relinquishments |
| Downstream Impact | tickets blocked by this one |
| Agent Notes | any tk add-note content from the agent (agents are told to note what's blocking them) |
After all tickets, show aggregate stats: total stalled tickets, total cost burned, tickets with downstream impact.
Check for stale worktree state: Run git status --short — if there are uncommitted changes, flag them as potentially leftover from a failed ralph run.
Offer actions for each ticket (wait for user decision before acting):
tk reopen <id> then tk untag <id> abandoned — reset for another attempttk close <id> — work was completed or is no longer neededtk add-note <id> "<context>", tk untag <id> abandoned, tk reopen <id> — enrich the ticket with what was missingtk close <id> — intentionally abandon, not worth pursuing