Orchestrates Story tasks. Prioritizes To Review -> To Rework -> Todo, delegates to ln-401/ln-403/ln-404, hands Story quality to ln-500. Metadata-only loading up front.
Executes a Story end-to-end by looping through its tasks in priority order and delegating quality gates to ln-500-story-quality-gate.
This skill supports dual-mode task storage:
| Aspect | Linear Mode | File Mode |
|---|---|---|
| Detection | Default (MCP Linear available) | docs/tasks/epics/ directory exists |
| Load tasks | list_issues(parentId=Story.id) |
Glob("docs/tasks/epics/*/stories/*/tasks/*.md") + parse status |
| Source of truth | Linear API | Task files + kanban_board.md |
Auto-detection: Check if docs/tasks/epics/ exists → File Mode, otherwise Linear Mode.
File Mode status parsing: Extract **Status:** {value} from ## Status section in each task file.
Status values: Backlog, Todo, In Progress, To Review, To Rework, Done, Canceled
When invoked in Plan Mode (agent cannot execute actions), this skill operates differently:
Phase 1-2: Same as normal mode (Discovery + Load metadata)
Phase 3-4 (Plan Mode only): Instead of executing, generate execution plan:
Plan Output Format:
## Execution Plan for Story {STORY-ID}: {Title}
### Tasks ({N} total)
| # | Task ID | Title | Status | Executor | Reviewer |
|---|---------|-------|--------|----------|----------|
| 1 | {ID} | {Title} | {Status} | ln-40X | ln-402 |
### Sequence
1. [Execute] {Task-1} via ln-401-task-executor
2. [Review] {Task-1} via ln-402-task-reviewer
...
N. [Quality Gate Pass 1] via ln-500-story-quality-gate
N+1. [Quality Gate Pass 2] → Story Done
After approval: User exits Plan Mode, invokes skill again → normal execution.
Phase 1 Discovery: Auto-discover Team ID/config from kanban_board.md + CLAUDE.md. Check current git branch: if not feature/{story-id}-{story-slug}, create/switch to it.
Phase 2 Load: Fetch Story metadata and all child task metadata (ID/title/status/labels only).
list_issues(parentId=Story.id)Glob("docs/tasks/epics/*/stories/{story-slug}/tasks/*.md") + parse **Status:** from each fileSummarize counts (e.g., "2 To Review, 1 To Rework, 3 Todo"). NO analysis — proceed immediately to Phase 3/4.
Phase 3 Context Review (before each Todo task execution): Before delegating a Todo task to ln-401/ln-404, verify its plan against current codebase:
What to check:
Skip Context Review for:
Phase 4 Loop (immediate delegation via Skill tool, one task at a time):
ln-402-task-reviewer. Reload metadata after worker.ln-403-task-rework. After worker, verify status = To Review, then MANDATORY: immediately use Skill tool to invoke ln-402-task-reviewer on that same task. Reload metadata.ln-404-test-executor else use Skill tool to invoke ln-401-task-executor. After worker, verify status = To Review (not Done/In Progress), then MANDATORY: immediately use Skill tool to invoke ln-402-task-reviewer on that same task. Reload metadata. Repeat loop; never queue multiple tasks in To Review—review right after each execution/rework.⚠️ STRICT RULE: Every task execution MUST be followed by review. NO EXCEPTIONS. Execute → Review → Next task. Never skip review. Never batch reviews. Never proceed to next task without completing review of current task.
TodoWrite format (mandatory): For each task, add BOTH steps to todos before starting execution:
Execute [Task-ID]: [Title] — mark in_progress when starting executorReview [Task-ID]: [Title] — mark in_progress after executor completes, completed after ln-402Git branch management (mandatory): Before starting any task execution, ensure working in correct branch:
feature/{identifier}-{story-title-slug}git branch --show-currentgit branch --list "feature/{identifier}-*"git checkout feature/{identifier}-{slug}git checkout -b feature/{identifier}-{slug}ln-500-story-quality-gate Pass 1. If it creates tasks (test/refactor/fix), return to Phase 4 to execute them. When test task is Done, set Story In Progress -> To Review and use Skill tool to invoke ln-500-story-quality-gate Pass 2. If Pass 2 fails and creates tasks, loop to Phase 4; if Pass 2 passes, Story goes To Review -> Done via ln-500.feature/{story-id}-{story-slug} branch. Never commit directly to main/master.CRITICAL: All worker delegations MUST use Skill tool. DO NOT execute tasks directly or do manual reviews.
| Status | Worker to Invoke | How |
|---|---|---|
| To Review | ln-402-task-reviewer | Use Skill tool: ln-402-task-reviewer |
| To Rework | ln-403-task-rework | Use Skill tool: ln-403-task-rework |
| Todo (tests) | ln-404-test-executor | Use Skill tool: ln-404-test-executor |
| Todo (impl) | ln-401-task-executor | Use Skill tool: ln-401-task-executor |
| Quality Gate | ln-500-story-quality-gate | Use Skill tool: ln-500-story-quality-gate |
❌ FORBIDDEN SHORTCUTS (Anti-Patterns):
mypy/ruff/pytest directly instead of invoking ln-500/ln-501/ln-502âś… CORRECT BEHAVIOR:
Skill(skill: "ln-500-story-quality-gate") — ALWAYS, NO EXCEPTIONSZERO TOLERANCE: If you find yourself running commands (mypy, ruff, pytest) directly instead of invoking the appropriate skill, STOP immediately and use Skill tool instead.
Review delegation uses isolated subagent context for quality:
| Aspect | Implementation | Benefit |
|---|---|---|
| Data passed | Task ID only | No executor bias leaked |
| Context loading | ln-402 fetches from Linear | Fresh perspective |
| Assumptions | Reviewer has none | Catches implicit bugs |
| Timing | IMMEDIATELY after execution | No context drift, no forgotten issues |
Analogy: External code reviewer who wasn't involved in implementation—sees only the result, not the "journey".
Why immediate review matters:
feature/{story-id}-{story-slug} (verified in Phase 1).../ln-500-story-quality-gate/SKILL.md../ln-401-task-executor/SKILL.md, ../ln-403-task-rework/SKILL.md, ../ln-404-test-executor/SKILL.md, ../ln-402-task-reviewer/SKILL.mdCLAUDE.md, docs/tasks/kanban_board.mdVersion: 3.3.0 (Added Phase 3 Context Review to verify task plan against current codebase before execution) Last Updated: 2026-01-15