From odin
Executes end-to-end implementation from a plan document, spec path, or build prompt. Routes to the correct execution strategy based on plan metadata.
How this skill is triggered — by the user, by Claude, or both
Slash command
/odin:work [Plan doc path or description of work. Blank to auto use latest plan doc][Plan doc path or description of work. Blank to auto use latest plan doc]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Execute a plan or prompt systematically. Ship complete features by understanding requirements quickly, following existing patterns, and maintaining quality.
Execute a plan or prompt systematically. Ship complete features by understanding requirements quickly, following existing patterns, and maintaining quality.
This skill adds structured plan handling, execution-engine selection, and a shipping tail to plain implementation.
<input_document> = $ARGUMENTS
Determine how to proceed based on <input_document>.
Plan document (input is a path to an existing plan or spec):
artifact_contract: odin-unified-plan/v1, classify artifact_readiness before reading the body.
requirements-only → stop. Tell the user this plan needs /plan enrichment before implementation. Offer /plan <plan-path>.implementation-ready plus execution: code → continue to Phase 1 using the unified-plan reader strategy.execution: knowledge-work to the carve-out; otherwise ask the user to return to /plan for an implementation-ready code plan.active, in_progress, completed, done) are invalid readiness values. Stop and ask for plan repair.execution: knowledge-work, load references/non-code-execution.md and follow that carve-out.execution: code) → continue to Phase 1.Blank invocation: glob docs/plans/*.md and docs/plans/*.html. Inspect metadata for the newest candidates and auto-select only when the newest matching artifact is implementation-ready plus execution: code or a legacy code plan. Stop instead of silently executing a requirements-only, knowledge-work, approach-plan, or unclassified artifact. Ask for an explicit path or /plan enrichment.
Superseded sibling: if a requirements-only candidate has a same-basename file in the other format (<basename>.md / <basename>.html) that is implementation-ready, the requirements-only copy is stale, so select the implementation-ready sibling instead of stopping.
Bare prompt (input is a description, not a file path):
Scan the work area.
Assess complexity and route.
| Complexity | Signals | Action |
|---|---|---|
| Trivial | 1-2 files, no behavioral change (typo, config, rename) | Proceed to Phase 1 step 2 (environment setup), then implement directly, with no task list and no execution loop. Apply Test Discovery if behavior-bearing code is touched. |
| Small / Medium | Clear scope, under ~10 files | Build a task list from discovery. Proceed to Phase 1 step 2. |
| Large | Cross-cutting, architectural decisions, 10+ files, touches auth/payments/migrations | Inform the user this would benefit from /plan to surface edge cases and scope boundaries. Honor their choice. If proceeding, build a task list and continue. |
Read plan and clarify (skip if arriving from Phase 0 with a bare prompt)
Goal Capsule, Verification Contract, Definition of Done, the Implementation Units heading list, and only the active U-ID section plus referenced R/F/AE/KTD excerpts. Read appendices or unrelated U-IDs only when cited.
rg -n '^#{1,3} ' <plan>.<h1> through <h3> elements and anchor ids.Goal Capsule, Verification Contract, ### U<N>., …), ignoring wrapper tags.Implementation Units, Work Breakdown, Requirements, Files, Test Scenarios, or Verification as primary source material.Execution note on each unit; these carry execution posture (e.g., test-first, characterization-first).Deferred to Implementation / Implementation-Time Unknowns before starting.Scope Boundaries: explicit non-goals. Refer back if implementation drifts.- [ ] / - [x] marks or status: fields on unit headings.Setup environment
First, check the current branch:
current_branch=$(git branch --show-current)
default_branch=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
if [ -z "$default_branch" ]; then
default_branch=$(git rev-parse --verify origin/main >/dev/null 2>&1 && echo "main" || echo "master")
fi
If already on a feature branch (not default):
feat/login, fix/email-validation). Auto-generated worktree names or opaque names are not meaningful.git branch -m <meaningful-name> derived from the plan title or work description.[current_branch], or create a new branch?"If on the default branch, choose:
Option A: Create a new branch
git pull origin [default_branch]
git checkout -b feature-branch-name
Use a meaningful name (e.g., feat/user-authentication, fix/email-validation).
Option B: Use a worktree (recommended for parallel development)
/worktree
# Detects existing isolation, prefers harness-native worktree tool, else creates from default branch.
Option C: Continue on the default branch
Create task list (skip if Phase 0 already built one, or if Phase 0 routed as Trivial)
Use the platform's task tracking tool to break the plan into actionable tasks.
Execution note into the task when present.Patterns to follow before implementing.Verification field as the primary "done" signal.Choose execution engine, then strategy
For implementation-ready unified code plans, first pick the engine: inline/subagent (default), goal-mode, or dynamic-workflow. Read references/execution-engines.md for the host-capability probe, selection table, copyable prompts, and resume rules. An engine choice never changes tail ownership.
For the inline/subagent engine, prefer subagents for any structured multi-unit plan: each worker gets a fresh context window for one unit. Parallelize independent units whenever safe; fall back to serial only when parallel isn't safe or the harness cannot isolate concurrent writes. Let the plan's Dependencies and Files drive batching.
| Strategy | When to use |
|---|---|
| Inline | Trivial work, user interaction mid-flight, or bare prompts without structured units. |
| Serial subagents | Default for structured multi-unit plans whose units are dependent, few, or whose parallel-safety is uncertain. |
| Parallel subagents | Independent units (per the Parallel Safety Check) when the harness can isolate concurrent work. |
Parallel Safety Check: before dispatching a batch:
Files: section (Create/Modify/Test paths).Isolation is the harness's job, never /work's. Never run git worktree add yourself. Probe what your subagent mechanism provides and pick the parallel path:
Agent with isolation: "worktree" + run_in_background: true). Parallelize freely, including overlapping-file units, subject to merge-cost judgment. Works even when already inside a worktree, because harness worktrees are peers rather than nested.Dispatch uses the harness's subagent/worker mechanism. Give each worker:
Shared-workspace constraints: subagents that share your working directory must not git add, commit, or run the full test suite concurrently (index corruption + test interference); the orchestrator does all that after the batch. A worker may run a single focused unit test only if it touches no shared state.
Permission mode: Omit the mode parameter when dispatching subagents so the user's configured permission settings apply. Do not pass mode: "auto".
After each serial unit: review the diff against the unit's scope and Files:, run relevant tests, fix before dispatching the next, update the task list, and commit.
After a parallel batch: the orchestrator integrates; never trust the handoff summary alone:
git status/diff).Task execution loop
For each task in priority order:
while tasks remain:
- Mark task in-progress
- Read any referenced files from the plan or Phase 0
- If the unit's work is already present and matches the plan's intent, verify it matches, mark complete, and move on
- Look for similar patterns in codebase
- Find existing test files for implementation files being changed (Test Discovery)
- Implement following existing conventions
- Add, update, or remove tests to match changes
- Run System-Wide Test Check
- Run tests after changes
- Assess testing coverage
- Mark task completed
- Evaluate for incremental commit
When a unit carries an Execution note, honor it. For test-first units, write the failing test before implementation. For characterization-first units, capture existing behavior before changing it. For units without an Execution note, proceed pragmatically.
Guardrails:
Test Discovery: before implementing changes to a file, find its existing test files (search for test/spec files that import, reference, or share naming patterns with the implementation file). Changes to implementation files should be accompanied by corresponding test updates: new tests for new behavior, modified tests for changed behavior, removed or updated tests for deleted behavior.
Test Scenario Completeness: before writing tests for a feature-bearing unit, check whether the plan's Test scenarios cover all applicable categories. If a category is missing or vague, supplement from the unit's context:
| Category | When it applies | How to derive if missing |
|---|---|---|
| Happy path | Always for feature-bearing units | Read the unit's Goal and Approach for core input/output pairs. |
| Edge cases | Unit has meaningful boundaries | Identify boundary values, empty/nil inputs, concurrent access. |
| Error/failure paths | Unit has failure modes | Enumerate invalid inputs, permission/auth denials, downstream failures. |
| Integration | Unit crosses layers | Identify the cross-layer chain and exercise it without mocks. |
System-Wide Test Check: before marking a task done, pause and ask:
| Question | What to do |
|---|---|
| What fires when this runs? | Read actual code for callbacks, middleware, observers, event handlers, and trace two levels out. |
| Do my tests exercise the real chain? | Write at least one integration test using real objects through the full chain. No mocks for interacting layers. |
| Can failure leave orphaned state? | Trace failure path with real objects. Test cleanup or idempotency. |
| What other interfaces expose this? | Grep for the method/behavior in related classes. Add parity now if needed. |
| Do error strategies align across layers? | List specific error classes at each layer. Verify rescue list matches what lower layer raises. |
Skip for leaf-node changes with no callbacks, no state persistence, no parallel interfaces.
Incremental commits
| Commit when... | Don't commit when... |
|---|---|
| Logical unit complete | Small part of a larger unit |
| Tests pass + meaningful progress | Tests failing |
| About to switch contexts | Purely scaffolding with no behavior |
| About to attempt risky/uncertain changes | Would need a "WIP" message |
Heuristic: "Can I write a commit message that describes a complete, valuable change?"
If the plan has Implementation Units, use them as a starting guide for commit boundaries, but adapt based on what you find. Use each unit's Goal to inform the commit message.
Commit workflow:
# 1. Verify tests pass (project's test command)
# 2. Stage only files related to this logical unit
git add <files related to this logical unit>
# 3. Commit with conventional message
git commit -m "feat(scope): description of this unit"
Handle merge conflicts immediately. Incremental commits make conflict resolution easier.
Follow existing patterns
Test continuously
Simplify as you go
After completing a cluster of related implementation units (or every 2-3 units), review recently changed files for simplification opportunities: consolidate duplicated patterns, extract shared helpers, improve reuse.
Do not simplify after every single unit; early patterns may diverge intentionally in later units. Wait for a natural phase boundary or when accumulated complexity is visible.
Invoke /simplify at phase boundaries when the diff is >=30 lines. If /simplify is unavailable, do a brief manual pass.
Figma Design Sync (if applicable)
For UI work with Figma designs:
references/agents/figma-design-sync.md and dispatch a generic subagent seeded with that local prompt to compare implementation against the Figma design.Frontend design guidance (if applicable)
For UI tasks without a Figma design, where the implementation touches view, template, component, layout, or page files, creates user-visible routes, or the plan contains explicit UI/frontend/design language:
Track progress
/tmp/odin/work/<run-id>/progress.json (or equivalent) so state survives context compaction. Never write progress into the plan body.When all Phase 2 tasks are complete, load references/shipping-workflow.md and run the full shipping tail. Do not skip this.
Code review path. Review with /review. It self-sizes. Skip dedicated review only for purely mechanical diffs (formatting, dep-bumps, lint-only, generated). /review is review-only; apply fixes afterward per references/review-findings-followup.md, then handle residuals through the Residual Work Gate in references/shipping-workflow.md.
/review; document the reason when skipping.npx claudepluginhub outlinedriven/odin-claude-plugin --plugin odinExecutes work from plans, specs, or build requests end-to-end. Handles input triage, plan reading, and systematic implementation. Use for concrete work; use ce-debug for bugs.
Executes coding tasks from plan documents or prompts: triages input complexity, builds task lists, implements systematically following patterns, verifies with tests. Use to ship complete features efficiently.
Executes implementation plans from plan.md files via Superpower Loop phases: task creation, batch execution with verification, git commits. Use after plan ready or on 'execute the plan'.