plugins/agile-workflow/skills/ln-400-story-executor/SKILL.md
Executes Story tasks in priority order (To Review, To Rework, Todo). Use when Story has planned tasks ready for implementation.
npx skillsauth add levnikolaevich/claude-code-skills ln-400-story-executorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Paths: File paths (
references/,../ln-*) are relative to this skill directory.
Type: L2 Coordinator Category: 4XX Execution
Runtime-backed coordinator for Story execution. Owns task ordering, worktree lifecycle, task/group checkpoints, and the final Story transition to To Review.
| Input | Required | Source | Description |
|-------|----------|--------|-------------|
| storyId | Yes | args, git branch, kanban, user | Story to process |
| --rework-focus | No | ln-1000 | Comma-separated blocking categories from prior quality gate FAIL |
Resolution: Story Resolution Chain.
Status filter: Todo, In Progress, To Rework, To Review
To Review -> To Rework -> TodoTodo parallel groups only when explicitly marked.hex-skills/story-execution/runtime/To Review; never to DoneMANDATORY READ: Load references/environment_state_contract.md, references/storage_mode_detection.md, references/input_resolution_pattern.md
MANDATORY READ: Load references/coordinator_runtime_contract.md, references/story_execution_runtime_contract.md, references/coordinator_summary_contract.md, references/loop_health_contract.md
MANDATORY READ: Load references/git_worktree_fallback.md — use the Story execution row
Runtime CLI:
node references/scripts/story-execution-runtime/cli.mjs start --story {storyId} --manifest-file .hex-skills/story-execution/manifest.json
node references/scripts/story-execution-runtime/cli.mjs status
node references/scripts/story-execution-runtime/cli.mjs checkpoint --phase PHASE_3_SELECT_WORK --payload '{...}'
node references/scripts/story-execution-runtime/cli.mjs record-worker --task-id {taskId} --payload '{...}'
node references/scripts/story-execution-runtime/cli.mjs record-group --group-id {groupId} --payload '{...}'
node references/scripts/story-execution-runtime/cli.mjs record-stage-summary --story {storyId} --payload '{...}'
node references/scripts/story-execution-runtime/cli.mjs record-loop-health --scope task --scope-id {taskId} --payload '{...}'
node references/scripts/story-execution-runtime/cli.mjs advance --to PHASE_4_TASK_EXECUTION
storyId.task_provider from task-management config.story_idtask_providerproject_rootworktree_dirparallel_group_policystatus_transition_policyPHASE_0_CONFIG.listTasksByStory(storyId) operation (transport per references/provider_file.md, references/provider_github.md, references/provider_linear.md).processable_counts for:
to_reviewto_reworktodoPHASE_1_DISCOVERY.feature/*, treat current directory as active worktree..hex-skills/worktrees/story-{identifier} and branch feature/{identifier}-{slug} per worktree fallback guide.PHASE_2_WORKTREE_SETUP with:
worktree_readyworktree_dirbranchworktree_ready=true.Selection order is deterministic:
To Review task first, sequentiallyTo Rework task, sequentiallyTodo tasks:
**Parallel Group:** {N} may run as one groupCheckpoint PHASE_3_SELECT_WORK with:
current_task_id or current_group_idprocessable_countsIf all processable counts are zero, skip execution and advance to PHASE_7_STORY_TO_REVIEW.
When rework_focus is provided:
blocking_categories entry are selected first within the same priority tier.Used for:
To Review -> ln-402To Rework -> ln-403, then immediate ln-402Todo test task -> ln-404, then immediate ln-402Todo impl/refactor task -> ln-401, then immediate ln-402Flow:
childRunId = {parent_run_id}--{worker}--{taskId}..hex-skills/runtime-artifacts/runs/{parent_run_id}/task-status/{taskId}--{worker}.json..hex-skills/story-execution/{worker}--{taskId}_manifest.json.task-worker-runtime and checkpoint executor child_run metadata before invocation.--run-id and --summary-artifact-path..hex-skills/runtime-artifacts/runs/{parent_run_id}/task-status/{taskId}--{worker}.json.ln-402 summary, task status delta, files_changed delta, or scenario improvement exists.record-loop-health --scope task --scope-id {taskId} result.pause.pause=true, stop and surface paused_reason.ln-402.ln-402 review summary artifact for the same task from .hex-skills/runtime-artifacts/runs/{parent_run_id}/task-status/{taskId}--ln-402.json.record-worker.PHASE_4_TASK_EXECUTION.PHASE_6_VERIFY_STATUSES.Used only for Todo groups with more than one task.
runId, artifact path, and manifest path.task-worker-runtime per executor and checkpoint all child metadata before spawning Agents.ln-402 runtime per task, review each task sequentially, and read the latest review artifact for every task.record-worker, then record the group summary with record-group.PHASE_5_GROUP_EXECUTION.PHASE_6_VERIFY_STATUSES.processable_counts.ln-402 machine-readable summary.To Rework for the third consecutive time, pause runtime with escalation reason.PHASE_6_VERIFY_STATUSES.PHASE_3_SELECT_WORK.PHASE_6B_SCENARIO_VALIDATION.Runs once when all tasks are Done. Delegates to an external agent to trace the user scenario end-to-end against implemented code. The executor has completion bias after shepherding tasks through implementation — an external agent has no investment in the story being done.
Load the Story ACs and the traceability table (from .hex-skills/task-planning/{identifier}_traceability.md). If the traceability artifact is missing, reconstruct an equivalent trace from the Story ACs and task Implementation Plans — do not fail scenario validation solely because the planner artifact is absent.
Run agent health check. If an advisor agent is available:
a. Build validation prompt from references/agents/prompt_templates/scenario_validator.md
b. Fill with: Story ACs, traceability table, architecture context, project root path (agent reads code directly)
c. Save prompt to .hex-skills/story-execution/{identifier}_scenario_prompt.md
d. Launch agent:
node references/agents/agent_runner.mjs \
--agent {agent} \
--prompt-file .hex-skills/story-execution/{identifier}_scenario_prompt.md \
--output-file .hex-skills/story-execution/{identifier}_scenario_result.md \
--cwd {project_dir}
e. Parse result JSON for broken segments
If no agent available: run self-check as fallback (trace 5 segments via code inspection).
If any segment is broken or missing:
To Rework with scenario findings as rework contextPHASE_3_SELECT_WORKMax 2 scenario validation loops. If still failing after 2 rework cycles, PAUSE for user review.
If all segments pass -> advance to PHASE_7_STORY_TO_REVIEW.
Checkpoint PHASE_6B_SCENARIO_VALIDATION with:
scenario_pass: true/falsesegments_traced: countsegments_passed: countrework_tasks: list of task IDs sent back (empty if pass)validation_mode: agent_validated or self_check_onlyTodo, To Review, or To Rework.To Review.To Review.PHASE_7_STORY_TO_REVIEW with:
story_transition_done=truestory_final_status="To Review"final_result="READY_FOR_GATE"summary_kind=pipeline-stagestage=2story_idstatus=completedfinal_result="READY_FOR_GATE"story_status="To Review"warningsBuild final checklist from runtime state, not memory:
worktree_ready=trueln-402 summary artifactTo ReviewCheckpoint PHASE_8_SELF_CHECK with pass=true|false.
Complete runtime only after pass=true.
Host Skill Invocation: Skill(skill: "...", args: "...") is mandatory delegation.
SKILL.md, treat args as $ARGUMENTS, execute that skill workflow, then return here with its result/artifact.| Status | Worker | Invocation |
|--------|--------|------------|
| To Review | ln-402-task-reviewer | Inline via Skill() |
| To Rework | ln-403-task-rework | Agent, then immediate ln-402 |
| Todo tests | ln-404-test-executor | Agent, then immediate ln-402 |
| Todo impl/refactor | ln-401-task-executor | Agent, then immediate ln-402 |
Executors and reworkers run isolated:
node references/scripts/task-worker-runtime/cli.mjs start --skill {worker} --task-id {taskId} --manifest-file .hex-skills/story-execution/{worker}--{taskId}_manifest.json --run-id {childRunId} --summary-artifact-path .hex-skills/runtime-artifacts/runs/{parent_run_id}/task-status/{taskId}--{worker}.json
node references/scripts/story-execution-runtime/cli.mjs checkpoint --phase PHASE_4_TASK_EXECUTION --payload '{"child_run":{"worker":"{worker}","task_id":"{taskId}","run_id":"{childRunId}","summary_artifact_path":".hex-skills/runtime-artifacts/runs/{parent_run_id}/task-status/{taskId}--{worker}.json"}}'
Agent(
description: "Execute task {taskId}",
prompt: "Execute task worker.\n\nStep 1: Invoke worker:\n Skill(skill: \"{worker}\", args: \"{taskId} --run-id {childRunId} --summary-artifact-path .hex-skills/runtime-artifacts/runs/{parent_run_id}/task-status/{taskId}--{worker}.json\")\n\nCONTEXT:\nTask ID: {taskId}",
subagent_type: "general-purpose"
)
Reviewer runs inline:
node references/scripts/task-worker-runtime/cli.mjs start --skill ln-402 --task-id {taskId} --manifest-file .hex-skills/story-execution/ln-402--{taskId}_manifest.json --run-id {reviewRunId} --summary-artifact-path .hex-skills/runtime-artifacts/runs/{parent_run_id}/task-status/{taskId}--ln-402.json
node references/scripts/story-execution-runtime/cli.mjs checkpoint --phase PHASE_4_TASK_EXECUTION --payload '{"child_run":{"worker":"ln-402","task_id":"{taskId}","run_id":"{reviewRunId}","summary_artifact_path":".hex-skills/runtime-artifacts/runs/{parent_run_id}/task-status/{taskId}--ln-402.json"}}'
Skill(skill: "ln-402-task-reviewer", args: "{taskId} --run-id {reviewRunId} --summary-artifact-path .hex-skills/runtime-artifacts/runs/{parent_run_id}/task-status/{taskId}--ln-402.json")
- Start ln-400 runtime (pending)
- Load Story/task metadata (pending)
- Setup or detect worktree (pending)
- Select next task/group (pending)
- Start child runtime(s) and checkpoint child metadata (pending)
- Execute task/group with managed transport inputs (pending)
- Review task results immediately (pending)
- Re-read statuses and record checkpoint (pending)
- Validate user scenario end-to-end (pending)
- Move Story to To Review (pending)
- Run runtime self-check and complete (pending)
Done.record-worker is the primary runtime ingestion path for worker outcomes.record-loop-health is the primary retry-usefulness ingestion path before repeating task/group/scenario work.task-worker-runtime before invocation.ln-1000 consumes the Stage 2 coordinator artifact, not free-text stage output.ln-402 remains the only worker that can accept a task as Done.PHASE_0_CONFIG checkpointedPAUSED) when neededTo Review, not DoneOptional reference: load references/meta_analysis_protocol.md only when the user asks for post-run meta-analysis or protocol-formatted run reflection.
Skill type: execution-orchestrator. When requested, run after phases complete. Output to chat using the execution-orchestrator format.
references/coordinator_runtime_contract.mdreferences/story_execution_runtime_contract.mdreferences/coordinator_summary_contract.mdreferences/git_worktree_fallback.md../ln-401-task-executor/SKILL.md../ln-402-task-reviewer/SKILL.md../ln-403-task-rework/SKILL.md../ln-404-test-executor/SKILL.mdVersion: 4.0.0 Last Updated: 2026-01-29
testing
Checks runtime lifecycle and config validation: bootstrap, shutdown, probes, cleanup, env sync, and fail-fast startup. Use for runtime readiness.
testing
Checks races, deadlocks, async hazards, TOCTOU, blocking I/O, and shared resource contention. Use when auditing concurrency correctness.
testing
Checks diagnosability through structured logs, metrics, traces, correlation IDs, and useful log levels. Use when auditing incident visibility.
development
Finds code that can be safely deleted: unreachable, unused, obsolete compatibility, and commented-out code. Use when pruning dead code.