From odin
Orchestrates backlog task selection through isolated implementation, review, documentation, verification, and publish gates. Use when asking for the next task or backlog work.
How this skill is triggered — by the user, by Claude, or both
Slash command
/odin:next-taskThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
`next-task` is an `extend` op-cell: select one real backlog item, isolate it, implement it, prove it, and end at an explicit delivery decision. It is a workflow driver, not a suggestion engine. It records the chosen task verbatim, separates planning from implementation, runs quality gates before publish, and never pushes until the final user decision.
next-task is an extend op-cell: select one real backlog item, isolate it, implement it, prove it, and end at an explicit delivery decision. It is a workflow driver, not a suggestion engine. It records the chosen task verbatim, separates planning from implementation, runs quality gates before publish, and never pushes until the final user decision.
Load these local references before running the workflow:
references/isolation.md — detached-HEAD setup, branchless recovery, branch/push/PR path.references/gates.md — slop, docs/changelog, review-loop, and repo-native verifier gates.Apply when the user explicitly asks for the next task, backlog work, next issue selection, or a complete task-to-branch workflow.
Do not apply for ad-hoc bug fixes with a known target, pure review, pure planning, broad project audits, speculative roadmap work, or any task that should stay in the current checkout. This skill is explicit-invocation-only.
Use only .outline/next-task/:
{
"flow.json": {
"version": 1,
"status": "selecting|isolating|exploring|planning|implementing|gating|complete|blocked",
"phase": "source|selection|isolation|explore|plan|implement|gates|decision",
"task": { "id": "", "source": "", "title": "", "body": "", "labels": [], "url": "" },
"policy": { "source": "", "filters": {}, "stopPoint": "publish|pr|local|queue|pick-another" },
"selection": { "score": 0, "readiness": [], "blockers": [] },
"git": { "mode": "detached-head", "base": "", "baseSha": "", "startSha": "", "headSha": "", "publishBranch": "" },
"decisions": [],
"gateResults": [],
"updatedAt": "ISO-8601"
},
"current.md": "verbatim selected task text",
"queue.md": "optional local queue source",
"tasks.json": "optional active-task registry for collision avoidance",
"low-debt.md": "LOW review findings that do not block critical/high cleanup"
}
current.md is not a summary. Paste the selected issue/card/backlog item exactly, then append a short provenance block: source, selection time, base ref, chosen stop point.
gh is authenticated and a remote points at GitHub.glab is authenticated and a remote points at GitLab.PLAN.md, TODO.md, tasks.md, docs/**/*.md, and .outline/next-task/queue.md.ask with a single-select question. One option is Recommended: prefer the source with explicit open tasks and tracker metadata; otherwise prefer .outline/next-task/queue.md; otherwise local Markdown.gh issue list --state open --json number,title,labels,state,body,milestone,assignees,createdAt,url --limit 100
glab issue list --state opened --output json --per-page 100
For Markdown backlogs, use find to locate candidate files and search with:
^\s*[-*]\s+\[ \]\s+(?:\((P0|P1|P2|critical|high|medium|low)\)\s*)?(.*)$
^\s*(TODO|FIXME|NEXT|P0|P1|P2|CRITICAL|HIGH):\s+(.*)$
{
"id": "source-local-id",
"source": "github|gitlab|markdown|queue",
"title": "",
"body": "",
"labels": [],
"priority": "critical|high|medium|low|unknown",
"milestone": "",
"dependencies": [],
"filesMentioned": [],
"url": "",
"raw": "verbatim source text"
}
.outline/next-task/flow.json or any active .outline/next-task/tasks.json registry you find in sibling worktrees.gh pr list --state open --json number,title,body,headRefName,url --limit 100
Treat closing keywords in PR body, title (#N), and issue-number branch suffixes as PR-linked evidence. Closing keywords are stronger than suffixes.
3. Score remaining candidates:
| Signal | Score |
|---|---|
critical, P0, sev0, blocking release | +100 |
high, P1, sev1 | +50 |
security, vulnerability, CVE | +40 |
bug, regression, crash, data-loss | +30 |
small, quick, good first, file count <= 3 | +20 |
| Bug older than 30 days | +10 |
| Missing dependency / blocked label | -100 |
| Mentioned files do not exist and task is not a creation task | -25 |
| Open linked PR | exclude |
ask, single-select. Each option includes score, labels, blockers, and provenance. If no task is ready, offer: widen filters, choose a blocked task anyway, edit .outline/next-task/queue.md, or stop..outline/next-task/current.md with the selected task verbatim. Update flow.json with task, policy, score, and phase: isolation.Run the recipe in references/isolation.md.
Required invariant: implementation starts from detached HEAD, not a branch. Branch creation is a publish step after gates pass.
Minimum sequence:
git fetch --prune origin
git checkout --detach origin/<base>
If no remote base exists and the user explicitly accepts local-only work, detach from current HEAD and record base: HEAD in flow.json.
Claim before editing. Validate all untrusted task fields before using them in a ref, path, shell argument, or branch name. Never force-push.
explore agent when the affected files are unknown; otherwise do the narrow lookup directly. Required output:
ast-grep + search;plan or task agent for non-trivial tasks. The plan must be concrete JSON or Markdown with ordered steps, files, tests, risks, verification commands, and rollback scope. Do not allow implementation in the planning pass.ask:
approve-plan (Recommended when specific, testable, and scoped);revise-plan;pick-another-task;stop-keep-claimed.task or deep_task agents for disjoint file groups, or implement directly for narrow changes. Implementation agents may edit and commit, but may not push, create PRs, mark gates passed, or delete the task claim.Run all gates in references/gates.md in order:
Gate mutations are ordinary commits only after green verification. On any red verifier, restore the offending batch with git restore -- <files...>, rerun the same verifier to confirm baseline recovery, and keep the gate open.
Use ask after all gates pass. Single-select:
publish-branch — Recommended when the stop point is branch publication. Create branch at detached tip and push: git branch <branch> HEAD; git push -u origin <branch>.open-pr — create branch and push, then gh pr create --base <base> --head <branch> --title <title> --body <summary>.keep-in-queue — leave local commits and state intact; record blocker/next action in flow.json and current.md.pick-another-task — release or close the current claim per user choice, then restart at source resolution.Never force-push. Never delete remote branches. If publication fails because a branch already exists, choose a new branch suffix or ask.
| Gate | Pass Criteria | Blocks |
|---|---|---|
| Source resolved | Exactly one source selected, filters recorded, candidates normalized | Ambiguous source without ask |
| Task selected | Score/readiness computed, user selected one option, current.md contains verbatim task | No ready task or no recorded task |
| Claim written | .outline/next-task/flow.json updated before edits | Concurrent claim risk |
| Isolation | Detached HEAD from validated base; branch not created yet | Dirty state, invalid base, unsafe slug |
| Exploration | Primary/related/test/doc surfaces known or explicitly unavailable | Unknown edit surface |
| Plan approval | User approved specific plan with tests and verification | Implementation attempt |
| Implementation | Plan steps complete, commits are concern-sized | Uncommitted or partial work |
| Slop gate | HIGH deterministic cleanup applied or flagged, verifier green | Regression or unsafe fix |
| Docs gate | Safe fixes applied; semantic drift flagged | Public-surface drift unreported |
| Review gate | No open critical/high findings, or explicit user deferral at iteration cap/stall | Open critical/high without decision |
| Verifier gate | Repo-native test/lint/build/type commands pass | Any red required command |
| Decision gate | User chose publish/PR/queue/pick-another | Any remote action before choice |
Output at completion: selected task, detached-head base, commits created, changed files, gate results, verifier commands, rollback actions if any, and final decision.
npx claudepluginhub outlinedriven/odin-claude-plugin --plugin odinOrchestrates end-to-end task pipeline: discovers tasks via taskmaster-ai or GitHub issues, plans changes, implements with TDD and auto-fixes, reviews via certainty-graded gates, ships PRs. Git-resumable.
Orchestrates task execution with git worktree isolation, TDD implementation, validation loop, and merge for phrases like 'execute task N' or 'implement TASK-NNN'.