kanevry/session-orchestrator/wave-executor

Claude Code and agent skill by kanevry/session-orchestrator

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use this skill when executing the agreed session plan in waves with role-based execution and parallel subagents. Handles inter-wave quality checks, plan adaptation, and progress tracking. Core orchestration engine for feature and deep sessions. Triggered by /go command.

Install

npx vskill@latest install kanevry/session-orchestrator/wave-executor

SKILL.md

The same SKILL.md was published earlier as kanevry/session-orchestrator/wave-executor.

Wave Executor Skill

Plugin root: ${CLAUDE_PLUGIN_ROOT}. Claude Code replaces this with the plugin's absolute path when it loads this file. Where it appears unreplaced — in a file this skill reads with the Read tool, or on Codex, Cursor or Pi — the plugin root is the directory that contains this skill's skills/ folder (two levels above the folder of this SKILL.md). Write that absolute path literally into every command that starts a plugin script: the Bash tool has no plugin variable, and shell variables do not survive between tool calls.

Execution Model

You are the coordinator. You do NOT implement — you orchestrate. Your job:

  1. Dispatch subagents for each wave
  2. Wait for ALL agents in a wave to complete
  3. Review their outputs
  4. Adapt the plan if needed
  5. Dispatch the next wave
  6. Repeat until all waves complete

Design Philosophy

This harness exists to enable multi-agent coordination at scale — not by removing friction, but by making it visible, classifiable, and recoverable.

The wave-executor is process scaffolding around LLM agents. It handles task breakdown, scope enforcement, circuit breaker guards, and recovery patterns. Unlike direct chat with an agent, it trades flexibility for safety and repeatability across a bounded execution envelope.

Every harness creates friction. The goal is not minimum friction — it is useful friction that prevents higher-cost problems downstream.

Friction we accept:

  • Wave planning overhead and wave-scope.json pre-dispatch setup
  • Per-wave quality gates before proceeding
  • Worktree isolation costs for parallel agents
  • Turn-limit constraints that stop runaway agents early

Friction we prevent:

  • Agent scope violations (PreToolUse hooks block out-of-scope file edits)
  • Cascading failures (circuit breaker + spiral detection halt broken agents before they propagate damage)
  • Silent partial completion (STATUS line requirement forces explicit reporting)
  • Untracked carryover work (session-end plan verification catches unresolved tasks)

The harness does not hope agents self-correct. It detects stagnation patterns — pagination-spiral, turn-key-repetition, error-echo (read by the coordinator during post-wave review), plus psa007-git-write and status-partial (detected live by the transcript tailer, recorded with source: "tail") — classifies error-echo into the Error-Class Taxonomy defined in circuit-breaker.md, and re-scopes mechanically. Review logic lives in wave-loop.md § "Review Agent Outputs"; the tailer's start and its silence-is-not-success caveat live in the same file, step 2.0-bis.

Platform Note

State files live in the platform's native directory: .claude/ for Claude Code, .codex/ for Codex CLI, .cursor/ for Cursor IDE. All references to .claude/ below should use the platform's state directory. Shared metrics (sessions.jsonl, learnings.jsonl) live in .orchestrator/metrics/ — both platforms read and write there. See skills/_shared/platform-tools.md for tool mappings.

Phase 0: Bootstrap Gate

Read skills/_shared/bootstrap-gate.md and execute the gate check. If the gate is CLOSED, invoke skills/bootstrap/SKILL.md and wait for completion before proceeding. If the gate is OPEN, continue to the Pre-Execution Check.

Session-start only: This gate check runs ONCE at the start of /go execution — before the first wave. It does NOT run before each wave step. Repeating the check per wave would add latency with no safety benefit, since bootstrap.lock is immutable within a session.

<HARD-GATE> Do NOT proceed past Phase 0 if GATE_CLOSED. There is no bypass. Refer to skills/_shared/bootstrap-gate.md for the full HARD-GATE constraints. </HARD-GATE>

Phase 0.5: Parallel-Aware Preamble

Skip silently when persistence: false in Session Config.

Before Phase 1, run the parallel-aware preamble per skills/_shared/parallel-aware-preamble.md. The preamble detects other active sessions in the worktree-family via findPeers(repoRoot, { mySessionId }), classifies the caller's mode via classifyMode(callerMode) against the exclusivity-matrix, and fires the appropriate AUQ on conflict.

Outcome handling:

  • PASS_THROUGH → continue to Phase 1
  • EXCLUSIVE_BLOCKED → exit Phase 0 cleanly per the AUQ outcome
  • PROMOTION_OFFER → user picks Worktree-Promotion (see parallel-aware-auq.md outcome-handling — calls enterWorktree()), in-place + Deviation, or Abbrechen

For session-end specifically: the preamble is DETECTION-ONLY. The lock-release path in later phases keeps its current behavior — releasing the OWN session's lock requires no matrix consultation.

Implementation reference: skills/_shared/parallel-aware-preamble.md § Implementation. AUQ reference: skills/_shared/parallel-aware-auq.md.

Pre-Execution Check

Before any express-path or housekeeping shortcut, check User-authorized housekeeping execution deviation. If active, use the actual agreed plan's counts and execution fields, retain session-type: housekeeping, and follow the normal scope, dispatch, verification and review flow. Do not apply the coordinator-only default's zero agent cap or serial shortcut. Confirm that the plan records the original user request; reuse that authorization rather than asking again about the same shape.

Before starting the first wave (Discovery role):

  1. git status --short — ensure clean working directory (commit or stash if needed)
  2. Verify no parallel session conflicts (unexpected modified files)
  3. Confirm the agreed plan is still valid (no new critical issues since planning)
  4. Check `jq` for shell snippets that call it — run command -v jq before using those snippets. The scope and command enforcement hooks run without jq. In Scope Manifest step 4, keep the configured enforcement value in wave-scope.json regardless of jq availability.
  5. Read Session Config: Parse Session Config per skills/_shared/config-reading.md. Store result as $CONFIG. Extract these fields:
  • persistence (default: true), enforcement (default: warn), isolation (default: auto)
  • agents-per-wave (default: 6), max-turns (default: auto), pencil (default: null)

Neither `agents-per-wave` nor `max-turns` carries its own default here. Ordinarily the per-wave agentCap and maxTurns come from the RESOLVED SHAPE (node "${CLAUDE_PLUGIN_ROOT}/scripts/session-shape.mjs" --repo-root "$PWD" --session-type <session-type> [--profile <session-profile>] [--known-scope true|false], module scripts/lib/session-shape.mjs). Session Config's agents-per-wave (with its per-type override, e.g. 6 (deep: 18)) CLAMPS the shape's agentCap; max-turns: auto is expanded per type inside the shape. For the user-authorized housekeeping deviation, use the actual plan's bounded execution fields resolved by the linked planning procedure instead.

Execution Config shortcut: If the session-plan output contains an ### Execution Config section, its execution-level fields (waves, agents-per-wave, isolation, enforcement, max-turns) take precedence over $CONFIG. Session-level fields (persistence, pencil) always come from $CONFIG. If the Execution Config section is missing, use $CONFIG alone.

  1. Initialize session metrics (if persistence enabled): Prepare a metrics tracking object for this session:
  • session_id: the STATE.md frontmatter session value, verbatim (the semantic label, = semantic_session_id in .orchestrator/current-session.json) — never a constructed <branch>-<YYYY-MM-DD>-<HHmm>; scripts/emit-session.mjs attaches the raw UUID and token rollup only when the labels match
  • session_type: from Session Config
  • started_at: ISO 8601 timestamp
  • waves: empty array (populated after each wave)

This object lives in memory during execution — it is written to disk by session-end.

Pre-Execution: User Instructions

If the user provided additional instructions with /go (e.g., /go focus on API endpoints), apply them as a priority modifier:

  1. Incorporate into agent prompts: Add a "Priority Focus:" section to each agent's prompt that includes the user's instructions verbatim
  2. Do NOT override the plan: User instructions adjust emphasis within the existing plan, they do not replace it. If the instructions conflict with the plan, note the conflict and follow the plan.

Example: If user said /go focus on API endpoints, each agent prompt includes:

**Priority Focus (from user):** focus on API endpoints

Pre-Wave 1a: Capture Session Start Ref

Before dispatching Wave 1, capture the current commit of the session's own checkout as the session baseline — the tree this session's STATE.md lives in and its consumers diff (repoRoot); in a promoted or EnterWorktree session that is the worktree (#1652). Same value as STATE.md's session-start-ref:

bash
SESSION_START_REF=$(git -C "<session checkout (repoRoot)>" rev-parse HEAD)

Store this value for use throughout the session — it is needed by the simplification pass (Quality wave) and session-reviewer dispatch to determine which files changed during this session. Include it in the coordinator's context, NOT in individual agent prompts. This single ref covers the session's own checkout only: commits made in additional worktrees of the session are recorded by the staging fence as orchestrator.session.work_tree events and listed by node "${CLAUDE_PLUGIN_ROOT}/scripts/session-commit-files.mjs" (#1659; remaining limits: references/wave-executor-state-init.md).

Pre-Wave 1b: Initialize STATE.md

Skip entirely if persistence: false. Otherwise, before dispatching Wave 1, write <state-dir>/STATE.md (YAML frontmatter + Markdown body), then VALIDATE total-waves against the resolved shape — do not skip this step, a plan whose wave count the shape does not produce must never be dispatched silently. Full template, the shape-mismatch AUQ procedure, and the Docs Tasks Persistence extension (A3 / #230): references/wave-executor-state-init.md.

Read WHEN: before the first wave dispatches, every session with persistence: true; the VALIDATE step must not be skipped.

Wave Execution Loop

Read and follow wave-loop.md in this skill directory for the complete wave execution loop, including agent dispatch, output review, plan adaptation, progress updates, and scope manifest creation.

Since #1157 that file is a 39-line INDEX and the loop body lives in three files under references/. Its own table is the routing table — read it there, not here: it carries a Read WHEN column stating at which moment each file is due, which is the half a copy loses. Two of the three steps are marked MANDATORY-BEFORE-DISPATCH; skipping either dispatches the wave unguarded and the failure is SILENT — no error, no ledger entry, indistinguishable from a clean run.

Turn budget, maxTurns, and stagnation recovery are unmoved: circuit-breaker.md. Every wave-loop.md § … citation elsewhere in this file resolves into one of the three sub-files.

Mission-Status Updates (#340)

The coordinator (you) is responsible for updating per-task mission status in STATE.md as tasks progress through the wave. Use setMissionStatus(stateContent, taskId, status) from scripts/lib/state-md.mjs and write the result back to STATE.md immediately.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
52
Repository forks
7
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/kanevry/session-orchestrator/wave-executor/badge)](https://verified-skill.com/skills/kanevry/session-orchestrator/wave-executor)

Something wrong with this skill or its page? Tell us.