dispatch

Use when a task file exists in .hyperflow/tasks/ and workers need dispatching. Fans out parallel workers under per-batch Reviewers, runs a final integration review, and commits per sub-task. Endpoint of the auto-chain — no auto-deploy. Trigger with /hyperflow:dispatch, "run the plan", "execute the task", "build it", "run the batches".

Allowed Tools

ReadWriteEditBash(git:*)Bash(gh:*)Bash(grep:*)Bash(rm:*)Bash(bash:*)Bash(python3:*)AgentSkillAskUserQuestion

Provided by Plugin

hyperflow

Point it at a GitHub issue and get back a reviewed pull request. Hyperflow turns one AI coding session into a structured engineering pipeline: plan sharpens and decomposes the work, dispatch fans out parallel workers, and a domain specialist reviews every step — nothing ships unreviewed. 18 skills, 22 specialist reviewer and investigator agents, adaptive depth so a 5-line fix never triggers a deep run, and persistent per-project memory that lives in your repo and never leaves it. Runs on whatever model your session already uses — zero config, no API keys, no daemon. Works across Claude Code, Codex App/CLI, OpenCode, Grok, Antigravity, and Cursor.

ai agency v5.9.0
View Plugin

Installation

This skill is included in the hyperflow plugin:

/plugin install hyperflow@claude-code-plugins-plus

Click to copy

Instructions

Dispatch

Workhorse phase. Picks up a task file from /hyperflow:plan and runs it through the orchestrator pattern with parallel worker dispatch and multi-level reviews.

This skill exercises Layer 3 (Orchestrator), Layer 5 (Quality Gates), Layer 6 (Project Memory), Layer 8 (Git Workflow), and Layer 9 (Security) from the doctrine. Multi-level review (L1–L5) is applied per the triage's flow profile.

Per-Step Agent Map (DOCTRINE rule 12 — §12.1 inline-allowed for trivial steps · §12.2 sub-phase decomposition)

Every substantive step dispatches at least one Agent. Trivial steps (≤ 2 tool calls, no content generation, no decision-making, mechanically verifiable) MAY be performed inline by the orchestrator per §12.1. Non-trivial steps decompose into ≥ 2 named sub-phases per §12.2.

Step Sub-phase Workers Reviewer Notes
0 — Mode confirm — (exempt) AskUserQuestion only
0.5 — Operational choices — (exempt) AskUserQuestion only
1 — Load task — (atomic · §12.2.8) Read + schema check = single mechanical decision; no parallel angles
2a — Pre-dispatch Composer × N parallel — one per sub-task; stitches persona + injects learnings Reviewer — reviews prompt set for completeness Parallel worker prompts built before any fan-out fires
2b — Worker fan-out Implementer / Searcher / Writer × N parallel Domain specialist Reviewer — the Specialist:-matched agent, batched over full batch (P2) or per-sub-task fallback One Reviewer call per batch; security/correctness specialists run with --thorough
2c — Gate run Worker — runs lint/typecheck/tests on affected files Reviewer — judges gate output Small focused diff
2d — Learnings + commit Writer — synthesizes per-batch learnings — (mechanical commit · §12.1) Per-sub-task PASS commits land here; learnings appended to context
3 — Final integration review — (atomic · §12.2.8) Reviewer — broadest matching specialist(s), L1–L over full diff Single Reviewer dispatch; skipped under D7 incl. single-specialist coverage (rule 17)
4 — Wrap up Writer — optional; only if memory prose is non-trivial §12.1 trivial-inline; no Reviewer (D5)
5 — End of chain — (exempt) ONE AskUserQuestion with audit + deploy questions

Iron rule — review agents ≥ batches + 1 (one batched Reviewer per batch + final integration when not skipped). The batched Reviewer counts as 1 per batch regardless of how many sub-tasks are in the batch. If less, a per-step reviewer was skipped.

Review Levels (scale by flow profile)

Every batch reviewer and the final integration reviewer uses the level set below. Profile comes from /hyperflow:plan triage and is propagated via the chain args (triage=).

Profile Levels Workers Reviewers
fast L1 1 inline self-review only
standard L1–L2 default 1–2 1 per-batch reviewer
deep L1–L5 3+ per-batch + final integration
research L1–L2 + synthesis 3+ searchers inline synthesis
creative L1–L3 + UX 1–2 1 reviewer
scientific L1–L5 + TDD 2–3 per-batch + final

L1 syntax/format · L2 spec/naming/edges · L3 integration/security · L4 perf/scale · L5 a11y/UX. See review-levels.md for the full checklist.

Default cap is L1-L2. Triage may flag security: true or integration_risk: true in its output; when either is set, the cap elevates to L1-L3 for both per-batch and final integration reviewers. Workers do NOT request elevation — only the upstream triage classification can elevate. See reviewer-prompt-batched.md — workers must honor the cap passed to them (cap enforcement lives on the reviewer-prompt side).

Approval Gates

Gate When Format
Session context Step 0, resolved (not asked) inherited session= / handoff HANDOFF.md / default one
Phase-dispatch scope Step 1.5, feature mode with ≥ 2 incomplete phases AskUserQuestion — all phases / phase by phase
Inter-batch (manual mode only) After each batch's gates pass AskUserQuestion — continue / stop. Auto mode fires NO inter-batch question — see DOCTRINE rule 8 (invented gates banned).
Hard halt Any SECURITY_VIOLATION from a reviewer Stop the chain, surface the finding
Audit prompt Step 5, after wrap-up AskUserQuestion — run /hyperflow:audit? (yes/no, recommended toggles with flow profile)
Deploy prompt Step 5, after audit gate AskUserQuestion — run /hyperflow:deploy? (yes/no, recommended toggles with gate state)

Inputs

  • Task artefact — positional arg (slug or path): either a flat .hyperflow/tasks/.md or a feature folder .hyperflow/features// (see ../hyperflow/feature-phases.md). Default — the most-recently-modified of either.
  • Handoff package — a positional slug/path resolving to .hyperflow-handoff// (see ../hyperflow/session-handoff.md). When present, dispatch is a second-session build: it rehydrates artefact/ into .hyperflow/ (Step 1.0) and reads session/handoff/chain args from HANDOFF.md. on_complete (review|deploy) governs Step 5.
  • session= — passed in by /hyperflow:plan (or read from a handoff package's HANDOFF.md). If absent, assume one. In a two-session build, handoff= governs the end-of-build behavior at Step 5.
  • --from-batch — resume from a specific batch (skip prior batches).
  • --final-only — skip batch dispatch, run only the final integration review.
  • --thorough — disable P2 batched reviews; fall back to per-sub-task reviewers for every sub-task in every batch, and always run the final integration review (D7 skip is disabled). Use when belt-and-suspenders depth is required on a high-risk run. P3 (concurrent pre-conditions) and P5 (lean worker prompts) remain on. When --thorough is passed, BOTH D5 (wrap-up Reviewer drop) and D7 (integration review skip) are disabled — the full pre-round-2 ceremony runs. D2 combined gate stays (no quality tradeoff), D6 default L1-L2 stays (cap can still be elevated by triage flags).

Flow

Step 0 — Resolve session context (only if invoked directly)

Dispatch is the build endpoint — it is on the far side of the planning→build split, so it does not ask the one/two-session question (that decision is made upstream at spec/scope, or carried inside a handoff package). It resolves the session context instead:

  • A session= arg was propagated (from scope) → use it.
  • Invoked directly on a handoff package (slug resolving to .hyperflow-handoff//) → read session/handoff/chain args from its HANDOFF.md; this is a second-session build (see ../hyperflow/session-handoff.md).
  • Invoked directly on a plain task file with no session= arg → default session=one (build here, then offer the audit/deploy gates at Step 5). No session question fires — there is nothing left to split.

Step 0.5 — Operational Choices (STRUCTURAL GATE · fires immediately after Step 0)

When operational args (commit=, branch=, push=) were NOT already propagated from a prior chain-starter or a handoff package, fire ONE AskUserQuestion call with 3 questions covering every operational decision dispatch needs. After this batch, dispatch runs silently until the end-of-chain audit + deploy gates.

Skip when operational args are already propagated (re-asking is an invented-gate violation).

Dispatch owns this gate (plan no longer asks operational choices at startup — it stops at a build-location gate and lets dispatch decide commit/branch/push when a build actually starts). The 3 questions are commit cadence · branch behaviour · push at end, with the canonical option text, recommended-default logic, the Per-task (deferred) queue behaviour, and the commit=/branch=/push= propagation contract in ../hyperflow/git-workflow.md. Recommended defaults: commit Per-task (unless complexity=low ∧ sub-tasks≤2Single); branch Create on main/master else Stay; push Ask at deploy gate always. Skip only when the args are already propagated (re-asking is an invented-gate violation).

Step 1.0 — Handoff rehydration (handoff pickup only)

When invoked on a handoff package (.hyperflow-handoff//), before loading the task:

  1. Read HANDOFF.md → artefact type, chain args (commit=/branch=/push=/triage=/mode=, plus ghissue=/pr=/comment= when the plan was GitHub-native), oncomplete.
  2. If the .hyperflow/ cache is absent → run /hyperflow:scaffold first (so workers get Layer-0 context). If scaffold cannot run here, fall back to the package's context/ copies.
  3. Copy artefact/tasks/.md.hyperflow/tasks/.md (flat), or artefact/features//.hyperflow/features// (feature), if not already present locally.
  4. Leave STATUS=planned until the build completes (Step 5 flips it).

Then continue Step 1 normally. (Non-handoff runs skip Step 1.0.)

Step 1 — Load the task (atomic · §12.2.8)

Detect the artefact mode:

  • Flat.hyperflow/tasks/.md (the terse roster). Read it; extract batches, sub-tasks, flow-profile, and operational args. For each roster line carrying a Brief: /T.md pointer, note the brief path — Step 2a loads it verbatim (do not inline its body here).
  • Feature (multi-phase).hyperflow/features//. Read feature.md for the ordered phase roster +

dependency graph + Specialists. Each phase--/ is executed as if it were a task file: its

phase.md carries the batch/task roster and its tasks/T*.md are the sub-tasks. Also read each phase's spec.md

/ research.md (when present) and inject them as the phase's design context into Step 2a Composers.

Confirm structural completeness: batches/tasks non-empty, each task has id, title, files, complexity,

Specialist. If absent or malformed, stop and suggest /hyperflow:plan first.

> Atomic-exempt per §12.2.8 — file/folder existence + schema validation is a single mechanical decision with no parallel angles. No Worker or Reviewer dispatched.

Step 1.5 — Phase loop (feature mode only)

Phase-dispatch scope gate (STRUCTURAL GATE · feature mode, ≥ 2 incomplete phases). Before the loop, fire ONE AskUserQuestion — a named-workflow choice, so the recommended option goes first with (Recommended):


This feature has <N> phases. How should I build them?

  All phases (Recommended)  — build every phase in order, straight through to the end.

  Phase by phase            — build only the NEXT phase, then stop so you can review it
                              before the next one starts. Re-run /hyperflow:dispatch
                              <slug> to continue with the following phase.

Skip the gate (default all) when: only one phase is incomplete; --phases=all|next was passed; or this is an on_complete=deploy two-session build (fully autonomous — all). Portable surface without popup (Codex / OpenCode / Grok) → Hyperflow Question chat-block fallback; no channel at all → default All phases. Propagate the choice as --phases=.

In feature mode, Step 2 runs once per phase, in roster order. A phase does not start until its Depends on

phase is completed. For each phase:

  1. Run Step 2 over that phase's batches (parallel inside the phase, exactly as flat mode).
  2. On all-tasks-PASS + exit criteria met → set phase.md status completed, advance feature.md's Phases bar,

and append the phase's decisions.md learnings to .hyperflow/memory/ (Step 2d learnings synthesis writes here).

  1. Run Step 3 (final integration review) per phase over that phase's cumulative diff (D7 + single-specialist

skip apply per phase). After the last phase, also run one feature-level integration pass over the full diff

when ≥ 2 phases touched disjoint surfaces.

  1. If --phases=next — STOP after this phase completes. Print: Phase done (/). Review it, then run /hyperflow:dispatch to build the next phase. Do NOT advance to the next phase. If --phases=all — continue to the next phase immediately.

In flat mode, skip Step 1.5 — Step 2 runs once over the single task file's batches as before.

Step 2 — For each batch

Print the batch header: Batch .

Mode resolution (one-time per chain, before Step 2a fires for the first batch): run python3 $PLUGINROOT/scripts/resolve-mode.py $PROJECTROOT --from-args "$CHAIN_ARGS" and cache the resulting word (default / lean / thorough). Subsequent batches use the cached value.

Sub-phases 2a–2d run in order for every batch (P1 sequential — each depends on the prior sub-phase's output). Within each sub-phase, Workers are parallel.

Step 2a — Pre-dispatch (P1 · sequential after mode resolution)

For each sub-task in the batch, dispatch a Composer Worker in parallel (one Composer per sub-task — N total). Each Composer:

  • Loads the pre-authored brief verbatim when one exists. If the roster line carries a Brief: /T.md pointer (plan's briefs=auto default), read that file and use its body — Task / Why / Scope / Files / Acceptance criteria / Test cases (incl. the E2E case) / Gotchas — as the worker-prompt body unchanged. Do NOT re-derive those sections; plan already authored them on the strong model. The Composer's only job is then to append context (below). Fallback (no brief): trivial sub-task or a legacy terse task file → author the brief inline per worker-prompt.md, the pre-existing behavior. This loader path is what lets dispatch run faithfully on a cheaper model or a second session.
  • Selects the worker persona (Implementer / Searcher / Writer) from the sub-task brief.
  • Stitches the persona header + Project Context per resolved mode:
  • mode = default / thorough → inline excerpts from .hyperflow/profile.md, architecture.md, conventions.md matching the worker's role.
  • mode = lean → render the lean Project Context block: a Project Context (load on demand): heading + paths to .hyperflow/memory/session-context.md, .hyperflow/profile.md, .hyperflow/architecture.md, .hyperflow/conventions.md, .hyperflow/testing.md, .hyperflow/memory/index.md with one-line descriptions each. Workers read on demand. Saves ~2k tokens × N; same content, lazy access.
  • Injects accumulated Learnings from prior batches (in all modes).
  • Outputs a complete worker prompt ready for fan-out.

Use the worker-prompt.md template for each Composer output. Persona stitching (top-3), memory injection (all tag matches), and all clarification gates remain unchanged regardless of mode.

Each Composer also reads the sub-task's Specialist: field from the task file and stitches that specialist's

output-contract expectations (../../agents/README.md) into the worker prompt, so

workers produce review-ready output for the specialist that will judge it (e.g. an api-reviewer sub-task tells the

worker to document status codes + validation up front). It also fills the worker-prompt {{CONSULTPEERHINT}} slot

from that specialist's Composes with: line (the recommended peers); if the line is absent it renders "any

specialist as needed". The hint only ranks peers — the worker may consult any agent in agents/ (consultation.md).

After all Composers return, dispatch one Reviewer over the full prompt set: confirms persona selection is correct, context block is well-formed, learnings are injected. Verdict: PASS / NEEDSREVISION. NEEDSREVISION re-dispatches only the affected Composer(s).

Step 2b — Worker fan-out (P1 · sequential after 2a · internal parallelism P1)

Dispatch all N sub-task Workers in a single message with parallel Agent calls using the composed prompts from Step 2a. Workers are Implementer / Searcher / Writer and run fully in parallel.

When all workers have returned, dispatch one batched per-batch Reviewer covering the entire batch (P2 — batched single-pass review):

  • Dispatch as the matching domain specialist. Read the batch's sub-task Specialist: fields (Brain-decided, from the task file). Dispatch the per-batch Reviewer as that specialist agent (../../agents/README.md) — its charter + strict checklist + output contract injected on top of reviewer-prompt-batched.md. When the batch spans several surfaces, inject the union of the matching charters. On a gated flow the specialist runs its web-research-first pass (web-research.md) before the verdict.
  • Check level-cap homogeneity first. If every sub-task shares the same review-level cap → batched review. If any sub-task carries a different cap (rare mixed profile) → fall back to per-sub-task reviewers.
  • Also fall back to per-sub-task reviewers when --thorough was passed.
  • Batched reviewer dispatch: use reviewer-prompt-batched.md. Print Reviewer — batched review Batch (L1–L, sub-tasks). Returns one verdict per sub-task.
  • Per-sub-task fallback (mixed caps or --thorough): dispatch a separate reviewer per sub-task per reviewer-prompt.md. Print Reviewer — reviewing (L1–L).
  • Per-batch vs final-integration split: per-batch reviewers are anchored to one batch's diff and catch L1–L issues there. The final integration Reviewer at Step 3 sees the cumulative diff across all batches and catches cross-batch contradictions no single batch-anchored reviewer could see. Running both passes covers more ground than running either alone.

(Path note: reviewer-prompt-batched.md lives in skills/hyperflow/ because it is a cross-skill template shared across the chain; reviewer-prompt.md stays in dispatch/references/ from prior convention. The asymmetric paths are intentional.)

Failure recovery: DOCTRINE rule 14 — skills/hyperflow/failure-recovery.md. When a Worker errors out (tool crash, OOM, 5xx, timeout) or returns malformed output: retry → escalate (add a deeper review pass) → abort. After 3 cumulative aborts in the chain, the chain itself aborts and prints the full failure trail.

Parse the per-sub-task verdicts:

  • SECURITY_VIOLATIONhalt the chain immediately. Surface the finding; do not commit anything in the batch.
  • Worker returned OVERSIZE: with SUGGESTED-SPLIT: — do NOT proceed. Dispatch a Planner consultation: Planner — mid-flight split — split per Worker's OVERSIZE signal. Pass the Worker's reason, suggested split, the original brief, and batch context. The Planner returns a final split plan (N new sub-tasks, each complexity = low | medium). Remove the original; dispatch the N new sub-tasks as a new sub-batch. The per-batch Reviewer fires after the new sub-batch completes. No user question — splitting an oversized brief is a mechanical reshape.
  • Worker (or batched Reviewer) returned CONSULT: — do NOT mark the sub-task done. Broker per consultation.md: resolve to agents/.md (any registered agent), dispatch it with the consultation brief (CONSULT-CONTEXT + "answer in ≤8 lines, you are consulted not taking over"), then re-dispatch only that Worker/Reviewer with Consultation answer from : injected. Cap 2 consults/worker; a consulted peer may not itself consult (depth-1). If doesn't resolve or errors, fall back to failure-recovery (ESCALATE) — never block. No user question — a consult is a mechanical handoff.
  • NEEDS_FIX — re-dispatch only that sub-task's Worker with the fix list. After the fix, dispatch a single focused reviewer for just that sub-task (not a full re-batch). Repeat until PASS (max 3 retries before re-scoping the sub-task).
  • PASS — sub-task handed to Step 2d for commit.

Step 2c — Gate run (P1 · sequential after 2b verdicts resolve)

After all sub-tasks in the batch have passed review, run Layer 5 quality gates (lint / typecheck / tests on affected files) per quality-gates.md.

Dispatch one Worker to run the gate commands. Dispatch one Reviewer to judge the gate output. Verdict: PASS / NEEDSFIX. On NEEDSFIX the Worker applies fixes (never amending per-sub-task commits — fixes land as small additional commits) and the gate re-runs. Max 3 gate cycles before escalating.

Failure recovery: DOCTRINE rule 14 — skills/hyperflow/failure-recovery.md. When the per-batch Reviewer returns NEEDSREVISION, retry the Worker once with a ## Learnings from review injection. A second NEEDSREVISION surfaces the sub-task as partial; the chain continues with the latest output marked partial — no third Worker dispatch.

Step 2d — Learnings + commit (P1 · sequential after 2c PASS)

For each sub-task whose verdict is PASS:

  • Commit immediately per git-workflow.md rule 2 (per-sub-task commit cadence). Stage only the files that sub-task touched. Write a conventional commit (feat(): </code> derived from the task file). One sub-task = one commit. A batch of 3 parallel sub-tasks produces 3 commits, even though they were reviewed in a single batched Reviewer call.</li> <li><strong>Update the task file's <code>## Status</code> block</strong> after each commit lands: tick <code>[ ]</code> → <code>[x]</code>, increment <code>Sub-tasks: <done>/<total></code>, add tokens to <code>Tokens used:</code> running totals, refresh <code>Wall-clock:</code> and <code>Last update:</code>, recompute <code>ETA:</code> once ≥3 sub-tasks are done. This is what <code>/hyperflow:status</code> reads for live progress.</li> </ul> <p>Dispatch one Writer in parallel to synthesize per-batch learnings from all Worker outputs and the Reviewer's notes. The learnings are appended to the in-memory <code>Learnings from prior batches</code> context (injected at Step 2a of subsequent batches). Writer also checks off the batch — in <strong>flat mode</strong> in the task file; in <strong>feature mode</strong> in the current phase's <code>phase.md</code> task roster (and writes durable learnings to that phase's <code>decisions.md</code>).</p> <p>The two activities (commits + learnings synthesis) run concurrently — the Writer synthesizes while commits land sequentially per the commit cadence arg.</p> <p>After Step 2d, print a one-line status update — <em>"Batch 1 done · 9/36 sub-tasks · next: B2 deps"</em> — then proceed to the next batch immediately. Per DOCTRINE rule 8, "transparency checkpoints" / "midway sanity checks" / "scope re-confirmations" / "cost heads-ups" are banned. The only inter-batch gates are: (a) <code>SECURITY_VIOLATION</code> → hard halt; (b) <code>ESCALATE: <reason></code> crossing the irreversibility boundary → fire the escalation gate per <a href="../hyperflow/escalation.md">escalation.md</a>. If none apply, the next batch fires immediately.</p> <h3>Step 3 — Final Integration Review</h3> <p><strong>Skip condition (D7):</strong> if ALL of the following hold, skip the final integration review and print <code>Final integration review skipped — all batches PASSed first try</code>:</p> <ul> <li>Every per-batch Reviewer returned PASS on first try (no NEEDS_FIX retries)</li> <li>No escalations fired (no <code>ESCALATE:</code> markers during Step 2)</li> <li>No security flags raised (no triage <code>security: true</code> AND no Reviewer security warnings)</li> <li>No per-batch Reviewer surfaced <code>[Important]</code> out-of-cap notes (via the <code>reviewer-prompt-batched.md</code> "Honor the Level Cap" escape hatch — these notes signal a concern the Reviewer wanted to flag but couldn't escalate within the cap; D7 must NOT swallow them)</li> <li><strong>Single-specialist coverage (DOCTRINE rule 17 extension):</strong> one specialist covered the whole changed surface (all batches map to the same responsible specialist). When several specialists touched <strong>disjoint</strong> surfaces, this condition fails — keep the final pass to catch cross-surface contradictions no single anchored specialist could see.</li> </ul> <p>If ANY of these conditions fails, the final integration review runs.</p> <p>> <strong>Risk note:</strong> the skip is the riskiest D-decision in round 2 — multi-batch cross-interaction bugs could slip. The guard conditions are deliberately strict (first-try PASS + no escalations + no security flags) to keep risk low. Pass <code>--thorough</code> to disable the skip and always run the integration review.</p> <p>> Atomic-exempt per §12.2.8 — this is a single Reviewer dispatch over the cumulative diff with no parallel angles. No sub-phase decomposition warranted.</p> <p><strong>Failure recovery:</strong> DOCTRINE rule 14 — <a href="../hyperflow/failure-recovery.md"><code>skills/hyperflow/failure-recovery.md</code></a>. If the integration Reviewer errors, retry once with the prior error injected. On a second failure, re-dispatch with the prior error in context. Third failure → abort the integration review; chain completes with a partial integration verdict surfaced to the user.</p> <p>Dispatch a <strong>Reviewer</strong> over the full changed-file set across every batch (all sub-task commits from Step 2d). Dispatch it <strong>as the broadest matching specialist(s)</strong> from the task file's <code>Specialists</code> roster (Brain-decided) — when the diff spans several surfaces, inject the union of their charters so the integration pass carries the right domain lenses. Use the same level cap as the batch reviewers (per flow profile). On a gated flow the specialist runs web-research-first before the verdict.</p> <p>Print: <code><strong>Reviewer</strong> — final integration review (L1–L<n>)</code></p> <p>The integration Reviewer returns a single structured verdict with per-sub-task findings where applicable. This is the one pass that catches cross-batch contradictions — per-batch reviewers are anchored to one batch's diff and cannot see cross-batch integration issues.</p> <p>Parse the verdict:</p> <ul> <li><code>PASS</code> → proceed to Step 4.</li> <li><code>NEEDS_FIX</code> → re-dispatch only the affected sub-tasks' Workers with the fix list. After fixes land, re-run Step 3 for the updated diff.</li> <li><code>SECURITY_VIOLATION</code> → <strong>halt the chain immediately.</strong> Print finding; do not auto-continue.</li> </ul> <h3>Step 4 — Wrap Up</h3> <p>Trivial-eligible per §12.1 (D5 + D9). Wrap-up is mechanical work: delete task file + memory append + chore commit. The per-batch reviewers and final integration review (when not skipped per D7) already validated the substantive changes.</p> <p><strong>Nominal path (inline orchestrator):</strong> perform the following directly without an Agent dispatch wrapper:</p> <ol> <li><strong>Flat mode</strong> — delete the completed task file from <code>.hyperflow/tasks/</code>. <strong>Feature mode</strong> — set <code>feature.md</code></li> </ol> <p>status <code>completed</code> (do not delete mid-feature); when every phase is <code>completed</code>, the feature folder becomes</p> <p>eligible for archival to <code>.hyperflow/archive/features/YYYY-MM/<slug>/</code> (the session-start archiver moves it).</p> <ol> <li>Before appending: <code>grep -F</code> the proposed entry's first-line title against <code>.hyperflow/memory/*.md</code> files (inline dedup-check — replaces the dropped Reviewer dedup pass). If a match exists, edit the existing entry rather than append a duplicate.</li> <li>Append durable patterns/decisions to <code>.hyperflow/memory/</code> per <a href="references/memory-system.md">memory-system.md</a>.</li> <li>Commit the memory + task-file-deletion as a <code>chore(memory):</code> commit (separate from the per-sub-task commits from Step 2 — keeping memory writes out of feature commits keeps the diff clean).</li> <li>Print the usage summary per <a href="references/output-style.md">output-style.md</a>.</li> <li>Mark dispatch-end compact readiness by writing <code>.hyperflow/.dispatch-auto-compact-ready</code> with the current UTC timestamp. This short-lived marker is consumed by the <code>PreCompact</code> hook and is the only signal that allows automatic compaction; do not write it before every sub-task, batch, gate, or partial stop has completed.</li> </ol> <p><strong>When the Writer dispatch IS required:</strong> if memory append requires non-trivial prose generation (e.g., synthesizing learnings from a multi-batch run with cross-cutting patterns), dispatch <code>Writer — finalizing dispatch artifacts</code> for the memory write. At that point the step is no longer §12.1-trivial and the Writer Agent handles it. The chore commit still follows immediately; no Reviewer is dispatched for wrap-up.</p> <p>> <strong>No wrap-up Reviewer (D5):</strong> the Reviewer that previously sanity-checked the chore commit and memory entries is dropped. Wrap-up is mechanically verifiable — <code>git status</code> clean, task file absent, memory file present. The orchestrator's direct observation is sufficient.</p> <h3>Step 5 — End of build</h3> <p><strong>Handoff build (second session) — completion marker first.</strong> When this run came from a handoff pickup, before the normal gate: write the completion marker, then branch on <code>on_complete</code>:</p> <ol> <li>Write <code>.hyperflow-handoff/<slug>/COMPLETION.md</code> (built-by provider, base = originating commit from <code>HANDOFF.md</code>, head = current <code>HEAD</code>, <code>Diff range = <base>..<head></code>, commit count, branch, <code>Result: built | partial (<done>/<total>)</code>).</li> <li>Set <code>STATUS=built</code>.</li> <li><code>git add .hyperflow-handoff/<slug>/</code> + commit <code>chore(handoff): build complete <slug></code>; if <code>handoff.autoPush</code> and <code>push != never</code> → push (surface the push command on failure).</li> <li>Branch:</li> </ol> <ul> <li><strong><code>on<em>complete=deploy</code></strong> → invoke <code>Skill</code> with <code>skill: deploy</code> (its own push gate applies). Do NOT also fire the audit/deploy <code>AskUserQuestion</code> below — <code>on</em>complete</code> already encoded the disposition.</li> <li><strong><code>on_complete=review</code></strong> → STOP. Print: <code>Build complete — committed + pushed (range <base>..<head>). Return to session 1 and run /hyperflow:audit <base>..<head> (or /hyperflow:handoff review <slug>).</code></li> </ul> <p><strong>Normal (single-session) end-of-chain — Audit + Deploy gates.</strong> Dispatch is the endpoint of the auto-chain. Fire ONE <code>AskUserQuestion</code> with <strong>both</strong> questions in the <code>questions[]</code> array (D2 — combined gate). DOCTRINE rule 8 — structural gates always fire, never silently default. The <code>AskUserQuestion</code> tool accepts up to 4 questions per call; this combined gate uses 2 (audit + deploy) — or 3 when the chain is <strong>GitHub-native</strong> (<code>gh_issue=</code> chain arg present and <code>pr=ask</code>): question [3] is the PR exit below. Do not cram further unrelated questions here; the gate's scope is end-of-chain disposition only. On portable surfaces (Codex / OpenCode / Grok), if the popup UI is unavailable, render the questions in one <code>Hyperflow Question</code> chat block and wait for the user's answers.</p> <p>> <strong>DOCTRINE rule 8 preserved:</strong> every gate question still fires; they just batch into one round-trip instead of two or three. Combined gate cuts human-in-the-loop latency at end-of-chain.</p> <pre><code> ? End-of-chain gates [1] Run /hyperflow:audit on the cumulative diff? Yes — outside-eye L3 review, independent of per-batch reviewers No — skip; per-batch L1–L<n> reviews were enough [2] Run /hyperflow:deploy now? (lint + typecheck + build + tests + security sweep, then asks before push) Yes — gates pass · ready to ship No — keep commits local · push manually later [3] Open a pull request for this chain? (GitHub-native chains only — gh_issue= present, pr=ask) Yes — push feature branch · gh pr create · Closes #<n> No — keep the branch local · print the gh pr create command </code></pre> <p>Per DOCTRINE rule 8, the gate questions are binary action gates — no <code>(Recommended)</code> marker on any option. Two-outcome framing is symmetric; the orchestrator's analysis is reflected in the surrounding status output (gate results, retry counts, security verdict), not in pre-marking the choice.</p> <p><strong>Process answers in order:</strong></p> <p>On audit <code>Yes</code> → invoke <code>Skill</code> with <code>skill: audit</code> and <code>args: "level=3"</code> (or <code>level=5</code> for scientific). Wait for it to finish. Then process the deploy answer.</p> <p>Then, process the deploy answer. Option labels MUST be one short clause each (≤ 12 words) — never paragraphs of reasoning.</p> <p><strong>Internal recommendation signal (used for status framing, NOT for marker):</strong></p> <p>The orchestrator still computes whether the chain is in a "green" or "marginal" state — this drives the status line the user reads above the gate, not a <code>(Recommended)</code> marker on the options. A chain is <strong>marginal</strong> (and the status line should say so) when one of these <em>concrete</em> signals is present:</p> <ul> <li>A <code>SECURITY_VIOLATION</code> was raised (and resolved) during dispatch</li> <li>A worker <code>ESCALATE:</code> crossed the irreversibility boundary</li> <li>≥ 2 Hyperflow batch-reviewer retries (<code>NEEDS_FIX</code> → re-dispatch) for the <em>same</em> sub-task — true repeated failure of the Layer 5 quality gates</li> <li>A flaky test failure that wasn't conclusively root-caused</li> <li>Any reviewer left a <code>[Critical]</code> finding unresolved</li> </ul> <p>The following are <strong>NOT</strong> "marginal" signals and MUST NOT flip the recommendation to <code>No</code>:</p> <table><thead><tr> <th>Signal</th> <th>Why it's fine</th> </tr></thead><tbody> <tr> <td>Pre-commit hook auto-fixed style (commitlint subject-case, prettier, eslint --fix)</td> <td>These are commit-time linters at the editor layer, not Hyperflow quality gates. Hooks fixing themselves is normal.</td> </tr> <tr> <td><code>/hyperflow:audit</code> was run and applied fixes through <code>/hyperflow:plan → :dispatch</code></td> <td>This is the audit fix-gate working as designed. The code is now <em>better</em> than before audit. Strong positive signal.</td> </tr> <tr> <td>Quality gates passed on first try (or after one auto-fix retry)</td> <td>First-pass green is the happy path.</td> </tr> <tr> <td>Single-batch dispatch with no escalations</td> <td>Simpler runs trend cleaner, not more suspect.</td> </tr> <tr> <td>Many sub-tasks (e.g. 27 commits) without any of the concrete-signal failures above</td> <td>Volume is not a risk signal on its own.</td> </tr> </tbody></table> <p>The orchestrator is not the user's risk advisor. The user already saw every reviewer verdict, every gate result, and the audit findings in scrollback. Inventing risk narratives in the recommendation label ("eyeballing the diff before push is prudent") is paternalism, not guidance.</p> <p>On deploy <code>Yes</code> → invoke <code>Skill</code> with <code>skill: deploy</code>. Deploy has its own push-confirmation gate at its Step 6.</p> <p><strong>PR exit (GitHub-native chains only — <code>gh_issue=<n></code> present).</strong> Fires after the deploy answer is processed:</p> <ul> <li><code>pr=ask</code> (default) → question [3] in the combined gate: <code>Open a pull request for this chain? Yes / No</code> (binary, no marker). <code>pr=auto</code> → open without asking once the chain's gates passed. <code>pr=never</code> → skip; print the ready-to-run <code>gh pr create</code> command in the wrap-up instead.</li> <li>On PR yes/auto: <code>git push -u origin <branch></code> (never force, never to <code>main</code>/<code>master</code> directly — the feature branch is the only outbound surface), then <code>gh pr create</code> with a conventional title from the dominant commit type and a body of what / why / validation summary + <code>Closes #<n></code>. No AI attribution anywhere in the PR.</li> <li>After the PR opens: when <code>comment=ask</code>, offer one courtesy comment on issue <code>#<n></code> linking the PR; <code>comment=never</code> skips silently. One batched comment — never incremental updates.</li> <li><code>gh</code> unauthenticated or push rejected → print the exact recovery commands (<code>gh auth login</code>, <code>git push -u origin <branch></code>, <code>gh pr create …</code>) and stop cleanly. Never half-post.</li> </ul> <p>On <code>No</code> to both gates → stop cleanly. Print one line:</p> <pre><code> Dispatch complete — <n> batches, <m> agents, <p> per-sub-task commits on branch <branch>. Next: invoke /hyperflow:audit or /hyperflow:deploy manually when ready. </code></pre> <p>The orchestrator does <strong>NOT</strong> auto-invoke audit or deploy. Both gates wait for an explicit user choice. Defaulting silently is a doctrine violation.</p> <h2>Agent Label Style</h2> <p>No icons, no brackets. Em-dash separator. Bold for Reviewer and Debugger roles:</p> <pre><code> Implementer — creating auth middleware Searcher — finding related test files Writer — generating API documentation **Reviewer** — reviewing auth middleware output **Debugger** — investigating test failure in auth.test.ts </code></pre> <h2>Operational Args (from Scope Step 0.5 pre-elections)</h2> <p>Scope batches three operational pre-elections at its Step 0.5 (<code>commit</code>/<code>branch</code>/<code>push</code>) and propagates them as chain args (or, in two-session mode, embeds them in the handoff package's <code>HANDOFF.md</code>); the GitHub-native args (<code>pr</code>/<code>comment</code>) arrive from <code>/hyperflow:issue</code> the same way. Dispatch reads them at Step 1 and honors them without re-asking. Missing args fall back to the indicated defaults.</p> <table><thead><tr> <th>Arg</th> <th>Values</th> <th>Default</th> <th>Honored at</th> </tr></thead><tbody> <tr> <td><code>commit</code></td> <td><code>per-task</code> / <code>per-batch</code> / <code>per-task-deferred</code> / <code>single</code> / <code>none</code></td> <td><code>per-task</code></td> <td>Step 2 (commit cadence after each PASS)</td> </tr> <tr> <td><code>branch</code></td> <td><code>new</code> / <code>current</code></td> <td><code>new</code> if currently on <code>main</code> or <code>master</code>, else <code>current</code></td> <td>Step 2 (before first commit)</td> </tr> <tr> <td><code>push</code></td> <td><code>ask</code> / <code>auto</code> / <code>never</code></td> <td><code>ask</code></td> <td>Forwarded to Deploy Step 6 via chain args</td> </tr> <tr> <td><code>pr</code></td> <td><code>ask</code> / <code>auto</code> / <code>never</code></td> <td><code>ask</code></td> <td>Step 5 PR exit — only meaningful when <code>gh_issue=<n></code> is present (set by <code>/hyperflow:issue</code>)</td> </tr> <tr> <td><code>comment</code></td> <td><code>ask</code> / <code>never</code></td> <td><code>ask</code></td> <td>Step 5 PR exit — courtesy comment on the originating issue</td> </tr> </tbody></table> <p><strong><code>commit=per-task</code></strong> (default) — commit after every sub-task PASS as the existing flow. Commits land directly on the user's working branch as they happen.</p> <p><strong><code>commit=per-batch</code></strong> — accumulate sub-task changes; commit once per batch after all sub-tasks PASS, with a message rolling up the batch (<code>feat(<scope>): batch <n> — <one-line summary></code>). One per-batch commit per batch.</p> <p><strong><code>commit=per-task-deferred</code></strong> — produce N per-task commits like <code>per-task</code>, but <strong>queue them on a private <code>hyperflow/staging-<chain-id></code> branch during the chain</strong> and flush all onto the user's working branch at Step 4 wrap-up. Useful when the user wants no user-visible commits landing mid-chain (atomic cumulative reveal at the end) or wants the crash-safe manifest recovery path. After each sub-task PASS, call <code>bash $PLUGIN<em>ROOT/scripts/queue-commit.sh $PROJECT</em>ROOT $CHAIN<em>ID "<msg>" <file>...</code> instead of <code>git add</code> + <code>git commit</code>. The script auto-creates the staging branch + manifest at first call, runs <code>git commit</code> <strong>with hooks enabled</strong> (no <code>--no-verify</code> — ever, per DOCTRINE Layer 8), and appends to <code>.hyperflow/commits-queue/manifest.json</code>. If a hook rejects a sub-task's commit, the orchestrator surfaces the error and stops; the user fixes and resumes from the affected sub-task. At Step 4 wrap-up, dispatch runs <code>bash $PLUGIN</em>ROOT/scripts/flush-commits.sh $PROJECT_ROOT</code> which fast-forward-merges the staging branch onto the user's branch (every queued commit lands in order, original SHAs preserved, original messages preserved). If the user's branch diverged (manual commits mid-chain on same branch), flush surfaces the error + recovery suggestions (<code>git rebase</code> / <code>git cherry-pick</code>); staging branch + manifest preserved for manual handling. Crash recovery: <code>/hyperflow:flush</code> re-runs the same script against the persisted manifest.</p> <p><strong>Trade-off honesty:</strong> hooks fire per sub-task (same load as <code>per-task</code> immediate). The deferred mode does NOT skip pre-commit hooks — it never has, and any earlier draft suggesting otherwise was a doctrine violation since corrected. Use this mode for the UX benefit (no user-visible commits until end) and crash-safety (manifest survives session loss); not for hook avoidance.</p> <p><strong><code>commit=single</code></strong> — accumulate all changes; commit once at Step 4 wrap-up with a message rolling up the whole chain (<code>feat(<scope>): <feature name> · <n> sub-tasks</code>). One commit total.</p> <p><strong><code>commit=none</code></strong> — never commit during dispatch; leave working tree dirty. Skip the per-sub-task commit step entirely. Print at Step 4: <code>Working tree intentionally left dirty (commit=none); review and commit manually before deploy.</code></p> <p><strong><code>branch=new</code></strong> — at Step 2 before the first commit, if currently on <code>main</code> / <code>master</code> / <code>develop</code>, create <code>feat/<task-slug></code> and switch to it. If already on a feature branch, treat as <code>branch=current</code>.</p> <p><strong><code>branch=current</code></strong> — never auto-create. All commits land on whatever branch the orchestrator was invoked on.</p> <p><strong><code>push=…</code></strong> — dispatch does NOT push commits to the user's branch. It only propagates the chosen value to Deploy Step 6 in the chain args; Deploy honors it there. <strong>One carve-out:</strong> the GitHub-native PR exit (Step 5, <code>gh_issue=</code> present) pushes the <em>feature branch</em> itself before <code>gh pr create</code> — that push is the PR's outbound surface, gated by <code>pr=</code> (not <code>push=</code>), and never targets <code>main</code>/<code>master</code>.</p> <h2>Iron Rules</h2> <ul> <li><strong>Failure recovery (rule 14).</strong> Worker errors, malformed output, NEEDS_REVISION, and gate failures follow the canonical policy in <a href="../hyperflow/failure-recovery.md"><code>skills/hyperflow/failure-recovery.md</code></a>. Retry → escalate → abort. Chain budget: 3 cumulative aborts.</li> <li>Workers never review, never coordinate, never ask the user questions.</li> <li>Every batch produces <strong>one</strong> per-batch Reviewer dispatch — batched over all sub-tasks in the batch (P2), or per-sub-task when mixed level caps or <code>--thorough</code>. Either way: one Reviewer call per batch in the nominal case.</li> <li>Plus <strong>one</strong> final integration Reviewer at the end (Step 3) <strong>when not skipped per D7</strong> — this is the Reviewer that sees the cumulative diff across batches.</li> <li><strong>No wrap-up Reviewer at Step 4 (D5).</strong> Wrap-up is §12.1 trivial — delete task file + memory append + chore commit is mechanical and the orchestrator performs it inline. The previous Reviewer at Step 4 is dropped.</li> <li>Therefore — <code>review agents in usage summary >= batches + 1</code>. Floor lowered from +2 to +1 per round 2 D5: the wrap-up Reviewer is dropped because wrap-up is §12.1 trivial. If your dispatch run includes a final integration review (conditions for D7 skip not met), the floor adapts: <code>>= batches + 1</code> still holds because the integration review is the "+1". If the integration review skips AND all batches pass, <code>review agents = batches</code> exactly — which satisfies the floor since the +1 was the integration review that ran implicitly. The batched Reviewer counts as <strong>1</strong> per batch regardless of sub-task count. If less, a per-step reviewer was skipped. The task was done wrong.</li> <li>Any <code>SECURITY_VIOLATION</code> verdict from the batched Reviewer (or a per-sub-task reviewer) halts the chain immediately — no commits, no auto-continue. Same behavior regardless of whether review is batched or per-sub-task.</li> <li><strong>Usage summary fires ONLY at the very end of the chain — after Step 4 wrap-up. NEVER mid-batch. NEVER after partial sub-task completion.</strong> Printing <code>── Hyperflow Usage ──</code> with "B1W1 only" or "<n>/<m> sub-tasks completed" while sub-tasks remain pending is a doctrine violation, not a status update. In <code>auto</code> mode, a usage summary is a terminal signal — it means the chain is finished. If you printed one with sub-tasks still pending, the chain is in a broken state.</li> <li><strong>Automatic compact readiness is end-of-dispatch only.</strong> <code>.hyperflow/.dispatch-auto-compact-ready</code> is written exactly once after Step 4 wrap-up and the final usage summary. The <code>PreCompact</code> hook blocks automatic compaction until this marker exists and is fresh; manual <code>/compact</code> still works at any time.</li> <li><strong>Auto mode must complete every sub-task in every batch before producing any summary, transition, or end-of-chain artefact.</strong> "To resume" instructions, partial usage tables, or "stopping here for now" prose are all forbidden in <code>auto</code> mode. The only legal terminations mid-chain are: (a) <code>SECURITY<em>VIOLATION</code>, (b) <code>ESCALATE: <reason></code> crossing the irreversibility boundary, (c) a per-sub-task Reviewer returning <code>NEEDS</em>FIX</code> after 3 worker retries with no resolution. If none of those fired and the chain stopped, surface as <code>ESCALATE: dispatch halted with N/M sub-tasks remaining — root cause unknown</code> and ask the user — do NOT print a partial usage summary as if the chain ended cleanly.</li> <li><strong>If batch dispatch is interrupted (token exhaustion, runtime crash, manual abort) — leave the task file's Status block intact with the partial <code>[x]</code> checkmarks, do NOT print a usage summary, do NOT print "To resume" hand-off instructions.</strong> The user can re-invoke <code>/hyperflow:dispatch --from-batch <n> <slug></code> on their own; the task file already reflects which sub-tasks completed. Hand-off instructions printed by a half-finished chain are themselves the bug — they make the user think the chain self-paused cleanly when it actually broke.</li> </ul> <h2>Doctrine</h2> <p>Full rules in <a href="../hyperflow/DOCTRINE.md">DOCTRINE.md</a>. This skill is the execute phase invoked at the end of <code>/hyperflow:plan</code>.</p> <h2>Overview</h2> <p><code>/hyperflow:dispatch</code> is the workhorse phase — it reads a task file from <code>/hyperflow:plan</code> and executes it through the orchestrator pattern.</p> <p>Parallel workers dispatched in a single message, per-batch Reviewers that send work back with <code>NEEDS_FIX</code>, a conditional final integration review (skipped when all batches pass first-try with no escalations), inline wrap-up, and (at the end of the auto-chain) ONE combined <code>AskUserQuestion</code> gate with both audit and deploy questions.</p> <p>Doctrine floor: review agents ≥ batches + 1 (per-batch reviewer + final integration when not skipped per D7; wrap-up Reviewer dropped per D5 / §12.1).</p> <h2>Prerequisites</h2> <ul> <li>A task file exists at <code>.hyperflow/tasks/<slug>.md</code> (produced by <code>/hyperflow:plan</code>).</li> <li><code>.hyperflow/profile.md</code>, <code>architecture.md</code>, <code>conventions.md</code> populated (Layer 0 context injected into worker prompts).</li> <li>Git repository for per-sub-task commits.</li> <li>For Step 5: <code>AskUserQuestion</code> popup available, or Codex chat fallback available — required for audit + deploy gates. Headless mode with no interactive channel skips gates with explicit warning.</li> </ul> <h2>Instructions</h2> <p>The numbered steps live in <a href="#step-0--choose-mode-only-if-invoked-directly--structural-gate">Step 0 — Choose mode</a> through <a href="#step-5--end-of-auto-chain--audit--deploy-gates">Step 5 — End of Auto-Chain</a> above. Summary:</p> <ol> <li>Resolve session context (inherited <code>session=</code> / handoff <code>HANDOFF.md</code> / default <code>one</code>) — dispatch is the build endpoint, no session question.</li> <li>Load task file from <code>.hyperflow/tasks/</code> — Read + schema check inline (atomic · §12.2.8).</li> <li>Per batch, run four sub-phases in sequence:</li> </ol> <ul> <li><strong>Step 2a</strong> — Composer Workers in parallel build worker prompts; Reviewer confirms prompt set.</li> <li><strong>Step 2b</strong> — Worker fan-out (N parallel Workers); batched Reviewer over the batch; parse verdicts (PASS / NEEDS<em>FIX / SECURITY</em>VIOLATION / OVERSIZE).</li> <li><strong>Step 2c</strong> — Layer 5 quality gates via a Worker + Reviewer.</li> <li><strong>Step 2d</strong> — Per-sub-task commits + learnings synthesis via Writer.</li> </ul> <ol> <li>Final integration review — conditional (D7): skip if all batches PASSed first try + no escalations + no security flags. Otherwise: Reviewer dispatched over cumulative diff; verdict routes to Step 4 (PASS), re-dispatch (NEEDS<em>FIX), or halt (SECURITY</em>VIOLATION). Atomic per §12.2.8.</li> <li>Wrap-up (§12.1 inline) — orchestrator deletes task file + appends memory + makes <code>chore(memory):</code> commit, then writes <code>.hyperflow/.dispatch-auto-compact-ready</code> after the usage summary. No Reviewer (D5). Writer Agent required only if memory prose generation is non-trivial.</li> <li>ONE combined <code>AskUserQuestion</code> gate with both audit and deploy questions — process answers in order.</li> </ol> <h2>Output</h2> <p>Per-batch and per-sub-task agent labels print as they fire (<code>Implementer — creating auth middleware</code>, <code><strong>Reviewer</strong> — reviewing auth middleware output (L1-L3)</code>). After the full chain, the usage summary prints:</p> <pre><code> ── Hyperflow Usage ────────────────────── 11 agents 206.4k tokens (5 implementers + 1 writer + 1 searcher + 3 batch reviewers + 1 final) ───────────────────────────────────────── </code></pre> <p>(Wrap-up Reviewer no longer appears per D5. If the integration review skipped per D7, the review agent count equals the batch count exactly.)</p> <p>Plus the End-of-Chain block listing batches, agents, and per-sub-task commits.</p> <h2>Error Handling</h2> <table><thead><tr> <th>Failure</th> <th>Behavior</th> </tr></thead><tbody> <tr> <td>No task file at <code>.hyperflow/tasks/</code></td> <td>Stop and suggest <code>/hyperflow:plan</code> first.</td> </tr> <tr> <td>Worker times out or returns nothing</td> <td>Re-scope the sub-task into smaller pieces; redispatch. Max 2 re-scope attempts before surfacing the failure.</td> </tr> <tr> <td>Reviewer returns <code>NEEDS_FIX</code></td> <td>Re-dispatch worker with the fix list. Max 3 retries before surfacing the failure to the user.</td> </tr> <tr> <td>Reviewer returns <code>SECURITY_VIOLATION</code></td> <td><strong>Halt the chain immediately.</strong> Print finding; do not commit, do not auto-continue. User decides remediation.</td> </tr> <tr> <td>Layer 5 gate failure (lint/typecheck/test)</td> <td>Worker fix + re-run. Max 3 gate cycles before escalating.</td> </tr> <tr> <td>Per-sub-task commit fails (hook rejects, conflict)</td> <td>Stop; surface the hook error. Do NOT use <code>--no-verify</code>. Do NOT amend per-sub-task commits.</td> </tr> <tr> <td>Wrap-up memory append has duplicate entries (detected post-commit)</td> <td><code>git revert HEAD</code> reverts the chore(memory) commit; orchestrator rewrites and recommits. No Reviewer to catch this inline — <code>git log</code> and <code>git revert</code> are the recovery path.</td> </tr> <tr> <td><code>AskUserQuestion</code> popup unavailable (Codex / OpenCode / Grok)</td> <td>Print audit/deploy as a <code>Hyperflow Question</code> chat block and wait for the user's answers.</td> </tr> <tr> <td>No interactive channel for audit/deploy gates</td> <td>Print end-of-chain block with <code>Audit/Deploy gates skipped — interactive mode required</code>. Do NOT silently auto-invoke either.</td> </tr> <tr> <td>Thinking-agent count < batches + 1 at end (when integration review ran)</td> <td>Print explicit doctrine violation warning in usage summary. Suggests a per-step reviewer was skipped.</td> </tr> </tbody></table> <h2>Examples</h2> <p>Worked transcripts moved to <a href="references/examples.md">examples.md</a> so the SKILL body stays lean. The examples are illustrative — not load-bearing for behaviour. Read the companion file when you want to see end-to-end transcripts.</p> <h2>Resources</h2> <ul> <li><a href="../hyperflow/DOCTRINE.md">DOCTRINE.md</a> — orchestration rules (especially #8 structural gates, #12 per-step agents).</li> <li><a href="references/worker-prompt.md">worker-prompt.md</a> — implementer/searcher/writer template.</li> <li><a href="references/reviewer-prompt.md">reviewer-prompt.md</a> — reviewer template (per-sub-task fallback).</li> <li><a href="../hyperflow/reviewer-prompt-batched.md">reviewer-prompt-batched.md</a> — batched reviewer template (P2).</li> <li><a href="../hyperflow/latency-patterns.md">latency-patterns.md</a> — P1–P5 latency patterns; P2 dispatch win ~75% reviewer-phase latency.</li> <li><a href="references/review-levels.md">review-levels.md</a> — L1-L5 checklist.</li> <li><a href="references/memory-system.md">memory-system.md</a> — wrap-up memory append format.</li> <li><a href="references/quality-gates.md">quality-gates.md</a> — Layer 5 lint/typecheck/test policy.</li> <li><a href="references/git-workflow.md">git-workflow.md</a> — per-sub-task commit cadence, no AI attribution.</li> <li><a href="references/output-style.md">output-style.md</a> — agent label + usage summary format.</li> </ul></div> </div> </section> <!-- 8. Bottom CTA --> <section class="detail-cta" data-astro-cid-qcigfm7x> <h2 class="detail-cta__headline" data-astro-cid-qcigfm7x>Ready to use hyperflow?</h2> <div class="detail-cta__actions" data-astro-cid-qcigfm7x> <button class="detail-cta__primary" data-copy-install="/plugin install hyperflow@claude-code-plugins-plus" data-astro-cid-qcigfm7x> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true" data-astro-cid-qcigfm7x> <rect x="5" y="5" width="9" height="9" rx="1.5" stroke="currentColor" stroke-width="1.5" data-astro-cid-qcigfm7x></rect> <path d="M3 11V3a1 1 0 011-1h8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" data-astro-cid-qcigfm7x></path> </svg> <span class="detail-cta__btn-text" data-astro-cid-qcigfm7x>Copy Install Command</span> </button> </div> </section> <script type="module">document.querySelectorAll("[data-copy-install]").forEach(t=>{t.addEventListener("click",async()=>{const a=t.dataset.copyInstall||"";await navigator.clipboard.writeText(a);const e=t.querySelector(".detail-cta__btn-text");if(e){const o=e.textContent;e.textContent="Copied!",t.classList.add("copied"),window.trackEvent&&window.trackEvent("install_copied",{plugin_name:a.split(" ").pop()||"",source:"detail_cta"}),setTimeout(()=>{e.textContent=o,t.classList.remove("copied")},2e3)}})});</script> <!-- 9. Related Skills (6, with tool pills) --> <section class="related-skills-section" data-astro-cid-jrlgpo3w> <h2 class="related-skills-heading" data-astro-cid-jrlgpo3w>Related Skills</h2> <div class="related-skills-grid" data-astro-cid-jrlgpo3w> <a href="/skills/agency-os/" class="related-skill-card" data-astro-cid-jrlgpo3w> <h3 class="related-skill-title" data-astro-cid-jrlgpo3w>agency-os</h3> <p class="related-skill-description" data-astro-cid-jrlgpo3w>Notion-as-source-of-truth dispatch board for running your work like an AI agency.</p> <div class="related-skill-tools" data-astro-cid-jrlgpo3w> <span class="related-tool-pill" data-astro-cid-jrlgpo3w>Read</span><span class="related-tool-pill" data-astro-cid-jrlgpo3w>Write</span><span class="related-tool-pill" data-astro-cid-jrlgpo3w>Edit</span> </div> </a><a href="/skills/apex/" class="related-skill-card" data-astro-cid-jrlgpo3w> <h3 class="related-skill-title" data-astro-cid-jrlgpo3w>apex</h3> <p class="related-skill-description" data-astro-cid-jrlgpo3w>Engineering lead — hand Apex any task and it routes internally.</p> <div class="related-skill-tools" data-astro-cid-jrlgpo3w> <span class="related-tool-pill" data-astro-cid-jrlgpo3w>Read</span><span class="related-tool-pill" data-astro-cid-jrlgpo3w>Write</span><span class="related-tool-pill" data-astro-cid-jrlgpo3w>Edit</span> </div> </a><a href="/skills/apex-plan/" class="related-skill-card" data-astro-cid-jrlgpo3w> <h3 class="related-skill-title" data-astro-cid-jrlgpo3w>apex-plan</h3> <p class="related-skill-description" data-astro-cid-jrlgpo3w>Plan and scope a project — discovery, challenge assumptions, present S/M/L options with token and cost estimates.</p> <div class="related-skill-tools" data-astro-cid-jrlgpo3w> <span class="related-tool-pill" data-astro-cid-jrlgpo3w>Read</span><span class="related-tool-pill" data-astro-cid-jrlgpo3w>Write</span><span class="related-tool-pill" data-astro-cid-jrlgpo3w>Edit</span> </div> </a><a href="/skills/apex-recon/" class="related-skill-card" data-astro-cid-jrlgpo3w> <h3 class="related-skill-title" data-astro-cid-jrlgpo3w>apex-recon</h3> <p class="related-skill-description" data-astro-cid-jrlgpo3w>Engineering lead reconnaissance — inventory the project before planning.</p> <div class="related-skill-tools" data-astro-cid-jrlgpo3w> <span class="related-tool-pill" data-astro-cid-jrlgpo3w>Read</span><span class="related-tool-pill" data-astro-cid-jrlgpo3w>Bash</span><span class="related-tool-pill" data-astro-cid-jrlgpo3w>Glob</span> </div> </a><a href="/skills/apex-review/" class="related-skill-card" data-astro-cid-jrlgpo3w> <h3 class="related-skill-title" data-astro-cid-jrlgpo3w>apex-review</h3> <p class="related-skill-description" data-astro-cid-jrlgpo3w>Cross-cutting review of recent work — catches gaps between specialists.</p> <div class="related-skill-tools" data-astro-cid-jrlgpo3w> <span class="related-tool-pill" data-astro-cid-jrlgpo3w>Read</span><span class="related-tool-pill" data-astro-cid-jrlgpo3w>Write</span><span class="related-tool-pill" data-astro-cid-jrlgpo3w>Edit</span> </div> </a><a href="/skills/apex-status/" class="related-skill-card" data-astro-cid-jrlgpo3w> <h3 class="related-skill-title" data-astro-cid-jrlgpo3w>apex-status</h3> <p class="related-skill-description" data-astro-cid-jrlgpo3w>CTO-level project status from git and codebase state.</p> <div class="related-skill-tools" data-astro-cid-jrlgpo3w> <span class="related-tool-pill" data-astro-cid-jrlgpo3w>Read</span><span class="related-tool-pill" data-astro-cid-jrlgpo3w>Write</span><span class="related-tool-pill" data-astro-cid-jrlgpo3w>Edit</span> </div> </a> </div> </section> </div> <script> document.querySelectorAll('.install-command').forEach(el => { el.addEventListener('click', function() { const text = this.dataset.copy || this.textContent; navigator.clipboard.writeText(text).then(() => { const originalText = this.textContent; this.textContent = 'Copied to clipboard!'; this.style.color = 'var(--brand-green)'; setTimeout(() => { this.textContent = originalText; this.style.color = ''; }, 2000); }); }); }); </script> </main> <!-- Footer --> <footer data-astro-cid-37fxchfa> <div class="footer-inner" data-astro-cid-37fxchfa> <div class="footer-signup-row" data-astro-cid-37fxchfa> <h4 data-astro-cid-37fxchfa>Agent Skills in Your Inbox</h4> <form data-signup-form="footer" class="footer-signup-form" data-astro-cid-37fxchfa> <input type="email" name="email" placeholder="you@example.com" required data-astro-cid-37fxchfa> <input type="text" name="website" tabindex="-1" autocomplete="off" aria-hidden="true" style="position:absolute;left:-9999px;opacity:0;height:0;width:0;" data-astro-cid-37fxchfa> <button type="submit" data-astro-cid-37fxchfa>Subscribe</button> </form> <p class="footer-form-note" data-astro-cid-37fxchfa>No spam, ever. Unsubscribe with one click.</p> </div> <div class="footer-columns" data-astro-cid-37fxchfa> <div class="footer-col" data-astro-cid-37fxchfa> <h5 data-astro-cid-37fxchfa>Product</h5> <ul data-astro-cid-37fxchfa> <li data-astro-cid-37fxchfa><a href="/explore" data-astro-cid-37fxchfa>Explore</a></li> <li data-astro-cid-37fxchfa><a href="/skills" data-astro-cid-37fxchfa>Skills</a></li> <li data-astro-cid-37fxchfa><a href="/cowork" data-astro-cid-37fxchfa>Cowork</a></li> <li data-astro-cid-37fxchfa><a href="/compare-marketplaces" data-astro-cid-37fxchfa>Compare</a></li> <li data-astro-cid-37fxchfa><a href="/tools" data-astro-cid-37fxchfa>Tools</a></li> </ul> </div> <div class="footer-col" data-astro-cid-37fxchfa> <h5 data-astro-cid-37fxchfa>Resources</h5> <ul data-astro-cid-37fxchfa> <li data-astro-cid-37fxchfa><a href="/docs" data-astro-cid-37fxchfa>Docs</a></li> <li data-astro-cid-37fxchfa><a href="/changelog" data-astro-cid-37fxchfa>Changelog</a></li> <li data-astro-cid-37fxchfa><a href="/collections" data-astro-cid-37fxchfa>Collections</a></li> <li data-astro-cid-37fxchfa><a href="/playbooks" data-astro-cid-37fxchfa>Playbooks</a></li> <li data-astro-cid-37fxchfa><a href="/research" data-astro-cid-37fxchfa>Research</a></li> <li data-astro-cid-37fxchfa><a href="/learning" data-astro-cid-37fxchfa>Learning</a></li> </ul> </div> <div class="footer-col" data-astro-cid-37fxchfa> <h5 data-astro-cid-37fxchfa>Company</h5> <ul data-astro-cid-37fxchfa> <li data-astro-cid-37fxchfa><a href="/community" data-astro-cid-37fxchfa>Community</a></li> <li data-astro-cid-37fxchfa><a href="/community#hall-of-fame" data-astro-cid-37fxchfa>Hall of Fame</a></li> <li data-astro-cid-37fxchfa><a href="https://github.com/jeremylongshore/claude-code-plugins" target="_blank" data-astro-cid-37fxchfa>GitHub</a></li> </ul> </div> <div class="footer-col" data-astro-cid-37fxchfa> <h5 data-astro-cid-37fxchfa>Legal</h5> <ul data-astro-cid-37fxchfa> <li data-astro-cid-37fxchfa><a href="/privacy" data-astro-cid-37fxchfa>Privacy</a></li> <li data-astro-cid-37fxchfa><a href="/terms" data-astro-cid-37fxchfa>Terms</a></li> <li data-astro-cid-37fxchfa><a href="/acceptable-use" data-astro-cid-37fxchfa>Acceptable Use</a></li> </ul> </div> </div> <div class="footer-bottom" data-astro-cid-37fxchfa> <p class="footer-blurb" data-astro-cid-37fxchfa>Tons of Skills by <a href="https://intentsolutions.io" target="_blank" data-astro-cid-37fxchfa>Intent Solutions</a>. Marine. Citadel Grad. 20 years ops → self-taught dev → AI architect.</p> <p class="footer-copyright" data-astro-cid-37fxchfa>© 2026 Tons of Skills | <a href="https://intentsolutions.io" target="_blank" data-astro-cid-37fxchfa>Intent Solutions</a></p> </div> </div> </footer> <!-- Light theme global overrides (must be unscoped to target body/nav/footer) --> <!-- Email signup + killer-skill nomination forms. Posts to /api/forms/{signup,nominate} on the same origin. The endpoint is a tiny Node service on the VPS (`forms-api.service`, 127.0.0.1:8090) that forwards to the Slack webhook in /etc/intentsolutions/notify.env. Anti-spam: honeypot field `website`, email/URL regex, 8 KiB body cap, per-IP rate limit on the server. See intent-os/ops/host/services/forms-api. --> <script type="module"> (() => { const flash = (btn, msg, ok = true, restoreMs = 3000) => { const orig = btn.dataset.origText ?? btn.textContent; if (!btn.dataset.origText) btn.dataset.origText = orig; btn.textContent = msg; btn.style.opacity = ok ? '0.85' : '1'; btn.disabled = ok; if (!ok) setTimeout(() => { btn.textContent = orig; btn.style.opacity = ''; btn.disabled = false; }, restoreMs); }; const wireSignup = (form) => form.addEventListener('submit', async (e) => { e.preventDefault(); const btn = form.querySelector('button[type="submit"]'); const emailInput = form.querySelector('input[type="email"]'); const honey = form.querySelector('input[name="website"]'); const email = (emailInput?.value || '').trim(); if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) { flash(btn, 'Invalid email', false); return; } flash(btn, 'Subscribing…', true, 0); try { const r = await fetch('/api/forms/signup', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ email, source: form.dataset.signupForm || 'unknown', website: honey?.value || '' }) }); if (r.ok) { flash(btn, "You're in!", true, 0); if (emailInput) emailInput.value = ''; } else if (r.status === 429) { flash(btn, 'Slow down', false); } else { const j = await r.json().catch(() => ({})); flash(btn, j.error || 'Something went wrong', false); } } catch { flash(btn, 'Network error', false); } }); const wireNomination = (form) => form.addEventListener('submit', async (e) => { e.preventDefault(); const btn = form.querySelector('button[type="submit"]'); const repoInput = form.querySelector('input[name="repo"]'); const honey = form.querySelector('input[name="website"]'); const repoUrl = (repoInput?.value || '').trim(); if (!/^https:\/\/github\.com\/[^/\s]+\/[^/\s]+/.test(repoUrl)) { flash(btn, 'GitHub URL only', false); return; } flash(btn, 'Submitting…', true, 0); try { const r = await fetch('/api/forms/nominate', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ repoUrl, source: form.dataset.nominationForm || 'unknown', website: honey?.value || '' }) }); if (r.ok) { flash(btn, 'Submitted!', true, 0); if (repoInput) repoInput.value = ''; } else if (r.status === 429) { flash(btn, 'Slow down', false); } else { const j = await r.json().catch(() => ({})); flash(btn, j.error || 'Something went wrong', false); } } catch { flash(btn, 'Network error', false); } }); const wireContact = (form) => form.addEventListener('submit', async (e) => { e.preventDefault(); const btn = form.querySelector('button[type="submit"]'); const nameInput = form.querySelector('input[name="name"]'); const emailInput = form.querySelector('input[type="email"]'); const messageInput = form.querySelector('textarea[name="message"]'); const honey = form.querySelector('input[name="website"]'); const name = (nameInput?.value || '').trim(); const email = (emailInput?.value || '').trim(); const message = (messageInput?.value || '').trim(); if (name.length < 2) { flash(btn, 'Name required', false); return; } if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) { flash(btn, 'Invalid email', false); return; } if (message.length < 10) { flash(btn, 'Tell me more', false); return; } flash(btn, 'Sending…', true, 0); try { const r = await fetch('/api/forms/contact', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ name, email, message, source: form.dataset.contactForm || 'unknown', website: honey?.value || '' }) }); if (r.ok) { flash(btn, "Got it — back within 24h!", true, 0); if (nameInput) nameInput.value = ''; if (emailInput) emailInput.value = ''; if (messageInput) messageInput.value = ''; } else if (r.status === 429) { flash(btn, 'Slow down', false); } else { const j = await r.json().catch(() => ({})); flash(btn, j.error || 'Something went wrong', false); } } catch { flash(btn, 'Network error', false); } }); const init = () => { document.querySelectorAll('[data-signup-form]').forEach(wireSignup); document.querySelectorAll('[data-nomination-form]').forEach(wireNomination); document.querySelectorAll('[data-contact-form]').forEach(wireContact); }; if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } })(); </script> <!-- Theme Toggle Script --> <script> document.addEventListener('DOMContentLoaded', function() { var themeToggle = document.querySelector('.theme-toggle'); if (themeToggle) { themeToggle.addEventListener('click', function() { var current = document.documentElement.getAttribute('data-theme') || 'dark'; var next = current === 'dark' ? 'light' : 'dark'; document.documentElement.setAttribute('data-theme', next); localStorage.setItem('theme', next); var meta = document.querySelector('meta[name="theme-color"]'); if (meta) meta.setAttribute('content', next === 'dark' ? '#0a0a0c' : '#fafaf9'); }); } window.matchMedia('(prefers-color-scheme: light)').addEventListener('change', function(e) { if (!localStorage.getItem('theme')) { document.documentElement.setAttribute('data-theme', e.matches ? 'light' : 'dark'); } }); }); </script> <!-- Nav Scroll State --> <script> (function() { var nav = document.querySelector('nav'); if (!nav) return; function onScroll() { if (window.scrollY > 20) { nav.classList.add('scrolled'); } else { nav.classList.remove('scrolled'); } } window.addEventListener('scroll', onScroll, { passive: true }); onScroll(); })(); </script> <!-- Mobile Menu Script --> <script> document.addEventListener('DOMContentLoaded', function() { var menuToggle = document.querySelector('.mobile-menu-toggle'); var navLinks = document.querySelector('.nav-links'); var menuIcon = document.querySelector('.menu-icon'); var closeIcon = document.querySelector('.close-icon'); if (menuToggle && navLinks) { menuToggle.addEventListener('click', function() { navLinks.classList.toggle('active'); document.body.classList.toggle('menu-open'); if (navLinks.classList.contains('active')) { menuIcon.style.display = 'none'; closeIcon.style.display = 'block'; } else { menuIcon.style.display = 'block'; closeIcon.style.display = 'none'; } }); navLinks.querySelectorAll('a').forEach(function(link) { link.addEventListener('click', function() { navLinks.classList.remove('active'); document.body.classList.remove('menu-open'); menuIcon.style.display = 'block'; closeIcon.style.display = 'none'; }); }); document.addEventListener('click', function(e) { if (navLinks.classList.contains('active') && !navLinks.contains(e.target) && !menuToggle.contains(e.target)) { navLinks.classList.remove('active'); document.body.classList.remove('menu-open'); menuIcon.style.display = 'block'; closeIcon.style.display = 'none'; } }); } // Track outbound link clicks (nav + footer) document.querySelectorAll('nav a[target="_blank"], footer a[target="_blank"]').forEach(function(link) { link.addEventListener('click', function() { if (window.trackEvent) { window.trackEvent('outbound_click', { url: link.href, link_text: link.textContent.trim() }); } }); }); }); </script> </body> </html>