一键导入
fly
Use when executing a preflight checklist. Triggers: 'fly', 'launch execution', 'run the checklist', or when given a preflight checklist file path.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when executing a preflight checklist. Triggers: 'fly', 'launch execution', 'run the checklist', or when given a preflight checklist file path.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user says '/learn', 'learn this', 'document this', 'capture this', 'remember this for next time', 'update the docs', asks to capture a durable project learning, or after fixes/reviews reveal reusable patterns.
Use when the user asks to merge, land, rebase before landing, resolve landing conflicts, or advance an integration branch such as main, master, or m3.
Use when the user asks to close, end, clean up, tear down, or finish a worktree/session after work is landed.
Use when starting an interactive parent task session, when the user gives feedback about agent behavior, or when the user asks about observations, skill improvements, or observation logs. Skip delegated/non-interactive subagents, review-only workers, verify-only workers, Codex/Claude print-mode reviewers, and sessions that only report back to a parent agent.
Use when the user says 'deep review', 'thorough review', 'full review', 'triple review', or 'ultra review'.
Use when the user says 'new session', 'start a session', 'new worktree', 'start fresh', or 'spin up a workspace'.
| name | fly |
| description | Use when executing a preflight checklist. Triggers: 'fly', 'launch execution', 'run the checklist', or when given a preflight checklist file path. |
| argument-hint | ["path to checklist file"] |
| user-invocable | true |
Execute a preflight checklist. Walks tasks, dispatches subagents, fills slots, auto-fixes review findings, verifies completion.
Docs naming note: where this skill says
AGENTS.md, readAGENTS.mdorCLAUDE.md, whichever the project has. Same for user-global~/.claude/AGENTS.mdvs~/.claude/CLAUDE.md. Each agent handles the fallback conventionally.
Execute a preflight checklist by:
/fly does NOT invoke superpowers:subagent-driven-development as a skill. It owns its per-task loop and uses that skill's prompt templates by reading them at runtime.
The user runs /fly and walks away for hours. Don't pause to ask, offer options, or wait for decisions. When something fails: try, escalate, then defer with FIXME and continue. The deferred-resolution task at session end is the user's inbox.
Halt only on: integrity gate failure you can't fix yourself, or phase regression that persists after fix-implementer retries. When halting, print: HALT: <reason>. Run /compact then re-invoke /fly <checklist>. Mid-flight pickup resumes from this task.
Five bash scripts live adjacent to this SKILL.md. Use the "Base directory for this skill" path injected by the runtime to locate them:
<base-dir>/dispatch-reviewer.sh - MANDATORY reviewer-dispatch contract resolver (run BEFORE every reviewer Task call)
<base-dir>/integrity-check.sh - per-task reviewer-dispatch + model verification
<base-dir>/final-verify.sh - end-of-run checklist sweep
<base-dir>/phase-regression.sh - phase gate regression check
<base-dir>/tick-steps.sh - bulk-tick plan-step checkboxes
<base-dir>/reviewer-override.md - Reviewer Independence Override block (Read once, cache, append to every reviewer dispatch)
On first use in a session, resolve SCRIPT_DIR once and cache it:
SCRIPT_DIR.SCRIPT_DIR=$(dirname "$(find ~/.claude -name "integrity-check.sh" -path "*/fly/*" 2>/dev/null | head -1)")All script invocations below use $SCRIPT_DIR/<script-name>. Do NOT use Glob or ad-hoc path guessing.
Read these only when you reach the matching step:
references/review-artifacts.md - path conventions, post-dispatch verification, deep-review normalization passreferences/outcome-format.md - structured Outcome slot format, tokens, examplesreferences/integrity-gate.md - rationale + agent-agnostic caveat for the per-task integrity checkreferences/final-verify-output.md - how to react to PASS / HALT / WARN / DEFERRED outputUser invokes /fly <checklist-path> - typically in a fresh Claude Code session for clean context.
/preflight).READ FIRST header (e.g., plan-1.md).On entry, read the checklist file and the plan file referenced in its READ FIRST header. Then classify state:
- [ ]) and all slots contain <fill>.<fill>. Resume from the first unticked checkbox or unfilled slot.Announce mode at start: "Flying . Mode: fresh run." / "Mode: resuming from Task <X.Y>." / "Already complete."
/fly executes exactly ONE checklist file per invocation. Each checklist has a companion per-session plan file (e.g., plan-1.md); the checklist tracks progress, the plan file holds task content. Together they form a complete session: own tasks, own phase regression checks, own session deep-review gate.
For split plans (<plan>-checklist-1.md, -checklist-2.md, ...), the user runs /fly <checklist-N> once per file in order, each in a fresh session. Fly does not cross-reference sibling checklists or coordinate state between them. The checklist you were handed is the universe for this invocation.
Applies ONLY to per-task and phase-level dispatches of implementer, spec-reviewer, and code-quality-reviewer subagents. NOT to deep-review gate dispatches - those invoke /deep-review directly via the Skill tool in main context (see "Session Gate").
For in-scope dispatches, resolve each template at dispatch time:
~/.claude/plugins/cache/claude-plugins-official/superpowers/*/skills/subagent-driven-development/<template>.mdTemplates /fly resolves this way:
implementer-prompt.md - implementer subagents (step A)spec-reviewer-prompt.md - spec reviewer (step E)code-quality-reviewer-prompt.md - code reviewer (step E) and phase normal reviewNOT resolved this way: /deep-review (Skill tool, no template); fix-implementer dispatches (reuse implementer template).
If Glob returns no match, halt: "Upstream templates not found at . Check plugin install or update the Glob pattern."
Walk the checklist's tasks in order. For each task, FIRST check Mode::
Tasks tagged Mode: inline skip IMPLEMENTER subagent dispatch. The orchestrator does the work directly using already-loaded context. Saves ~5-20k boot tokens per task. Reviewer dispatch is unchanged - inline tasks still get reviewed by a subagent, preserving independent-review fidelity (subtle bugs in 30 LOC are exactly where review earns its keep).
Inline flow:
[INJECTED] TDD steps if any: write failing test, watch it fail, then implement.feat: <task title> (task <id>). Commit message MUST contain task <id> substring (final-verify.sh greps for it; no separate transcript).bash $SCRIPT_DIR/tick-steps.sh <checklist-path> <task-id> 1,2,....(orch-inline, task <id>).If you can't commit cleanly (tests fail, conflict), HALT and surface to user.
Standard Task-dispatch flow per steps A-G below.
Resolve implementer-prompt.md via Glob + Read.
Substitute placeholders:
[FULL TEXT of task from plan - paste it here, don't make subagent read file] → the task's full text from the per-session plan file. Match the checklist's task ID (e.g., Task 0.1) to the corresponding ### Task 0.1: section in the plan file.[Scene-setting: where this fits, dependencies, architectural context] → short paragraph from checklist's overall goal and phase description.[directory] → user's project root.Append explicit override text:
## Checklist Overrides
The following overrides take precedence over anything in the task text above:
1. **TDD is mandatory.** Write a failing test first, watch it fail, then implement. If the task text doesn't mention TDD, do it anyway.
2. **Extra steps from preflight audit** (execute these before the plan's own steps):
<list of [INJECTED] step titles from the checklist for this task>
3. **REQUIRED PRE-READING (read these BEFORE any tool call - do not skip):**
<comma-separated list from the task's `Pre-reading:` line in the checklist>
Subagents do not inherit the orchestrator's CLAUDE.md or SessionStart context, so these docs must be loaded explicitly. They contain project conventions and gotchas (e.g., memory-pressure patterns, schema invariants) that prevent expensive failures.
If no injected steps, say "None." If the task has no Pre-reading: line in the checklist, omit section 3 entirely.
Append a ## Token Delegation Override block after ## Checklist Overrides. Copy the Token Delegation rules from ~/.claude/AGENTS.md verbatim, limited to these required parts:
ask-intern;ask-intern -t draft-write examples;Do not paraphrase this block. If ~/.claude/AGENTS.md is unavailable, use .claude/AGENTS.md from this dotfiles repo as the fallback source. These agents rebuild context from scratch, and this block is the difference between delegation being available in theory and actually being used during 30-fix runs.
Dispatch via Task tool:
subagent_type: general-purposemodel: the EXACT model string from the checklist's Model: annotation. No drift in either direction. If the checklist says Model: sonnet, the Task call gets model: "sonnet" - not opus, not haiku, not a different opus variant. The checklist IS the contract.description: Implement <task id>: <task name>prompt: the substituted templateUse the checklist's Model annotation verbatim. If you think it's wrong, log a note in deferred.md and continue - the user reviews at session end. Don't pause to ask.
Same rule for REVIEWER model dispatch in step E and session-gate dispatches: the model parameter is copied verbatim from the checklist annotation.
Exception: fix-implementer dispatches (step F and session-gate fix loops) are NOT governed by a checklist annotation. The fixer defaults to the task's implementer model but may upgrade on its own judgment when a finding is architecturally gnarly or when the default-model fix BLOCKED. Discretionary, not contract-gated.
Wait for the implementer's report.
bash $SCRIPT_DIR/tick-steps.sh <checklist-path> <task-id> <comma-separated-step-numbers>
Output: OK <N checkboxes ticked> on success, ERROR <reason> on failure. On ERROR, halt and surface.
Rationale: N Edit calls per task bloat orchestrator context. The script handles all steps in one sed pass.
Read the implementer's report for the commit SHA. Edit the checklist to replace the task's SHA: \`withSHA: ```.
For tasks annotated Review: combined (default): dispatch ONE reviewer covering both spec + code concerns.
Step 0 (MANDATORY): resolve the dispatch contract before doing anything else.
bash $SCRIPT_DIR/dispatch-reviewer.sh <checklist-path> <task-id> combined <task-sha>
The script parses the checklist for the task's (reviewer: <model>) annotation and emits canonical key=value lines:
MODEL=sonnet
REVIEW_PATH=/abs/path/to/reviews/task-<id>-combined.md
DIFF_CMD=git show <sha>
PROMPT_HEADER_NOTE=...
You copy these values verbatim into the Task call. The orchestrator never types the model string by hand. This is how reviewer-model drift sneaks in (e.g., silently downgrading sonnet to haiku to save cost). Any value the script emits is contract; if it's wrong, edit the checklist and re-run the script - do not modify the script's output before passing to Task.
If the script exits non-zero, HALT and surface - it means the checklist is missing a reviewer annotation that /preflight should have written.
Resolve code-quality-reviewer-prompt.md via Glob + Read.
Review file path: use REVIEW_PATH from the script.
Substitute placeholders:
[FULL TEXT of task requirements] → the task's text from the per-session plan file.[From implementer's report] → the implementer's summary, under the heading ## Implementer-Reported Summary (untrusted).Append a ## Actual Diff section containing the output of DIFF_CMD.
Append the Reviewer Independence Override block verbatim (read once from $SCRIPT_DIR/reviewer-override.md, cache for the session). Substitute <review-file-path> with REVIEW_PATH.
5b. If the task has a Pre-reading: line in the checklist, append:
## Required Pre-Reading
Before evaluating the diff, read these project convention docs - they encode the rules the implementation should comply with:
<comma-separated list from the task's Pre-reading: line>
Reviewers without this context flag valid code as wrong (or miss real violations). Skip this section if the task has no Pre-reading line.
5c. Append the same ## Token Delegation Override block used for implementers. Reviewers often need to inspect callers or tests beyond the diff, so they need the exact same delegation threshold and exact-code prohibition.
## Review scope section to the prompt with explicit dual focus:
This is a COMBINED review covering both spec and code concerns. Emit findings under both lenses:
### Spec concerns: does the commit satisfy plan requirements? (missing steps, wrong behavior, scope drift)
### Code concerns: quality, correctness, conventions, duplication, edge cases.
subagent_type: general-purposemodel: MODEL value from the script, verbatim.description: Combined review <task id>prompt: the substituted + augmented templatereferences/review-artifacts.md). If missing, re-dispatch; if fails again, halt.### Finding N: sections are source of truth.Combined review Outcome slot using the structured format (see references/outcome-format.md).For Review: separate tasks (high-risk: opus implementer / security / schema / broad blast-radius): use the legacy two-step pattern - dispatch spec-reviewer first (run dispatch-reviewer.sh ... spec ... to get its model + path), then code-reviewer (dispatch-reviewer.sh ... code ...), filling the Spec review and Code review Outcome slots separately. Same fix-loop semantics apply per review. Spec and code reviewers often have DIFFERENT models in the checklist - the script's per-call output is what guarantees you don't conflate them.
Parse the reviewer's output. Every admissible finding has a unique number, a priority, a disposition, and a file:line citation. Classify by disposition:
inadmissible=N in the Outcome. Do NOT act on them.[fix] - auto-fix via fix-implementer (see below). Default disposition; most findings land here regardless of priority.[defer] - write to deferred.md. Only valid if the reviewer cited one of the three defer criteria (user decision / phase-sized / extremely risky). Reject otherwise: halt and re-dispatch the reviewer asking it to reconsider disposition.Accounting invariant: admissible_findings = fixed + deferred. Every admissible finding lands in one bucket. No "skipped" / "ignored" / "wontfix".
Fix loop (all [fix] findings, highest priority first):
Order by priority (critical → major → minor → cosmetic). For each finding, choose a path - your judgment, but lean conservative:
fix: §<n> <title> (orch-inline, task <id>). Inline-mode tasks always go this path.Wait for fix report (if dispatched). Missing finding numbers or failed inline Edits = BLOCKED.
BLOCKED retries escalate: inline → fix-implementer dispatch; default-model dispatch → upgraded model. Still BLOCKED: defer with FIXME and continue.
Re-dispatch reviewer (Reviewer Independence Override, fresh diff). Re-reviewer overwrites the prior review. Reviewer dispatch stays strict regardless of how fixes were applied - the integrity gate validates the re-review the same way. Loop until no [fix] admissible findings remain.
Why inline is safe: the integrity gate guards reviewer authorship, not fix authorship, and the re-review runs on a real subagent so any orchestrator-inline fix that went wrong gets caught.
Deferred-write (only [defer] findings + any [fix] that legitimately blocked):
Each deferred finding gets its own §N entry with priority in the heading and the specific defer reason. If you find yourself writing many defer entries in a single review, that's a signal - either the reviewer is mis-disposing (re-dispatch), or the scope of this task genuinely needs the user's attention (halt, surface).
Fill the Outcome slot from the FINAL review file (after all fix loops complete). The Outcome's findings=N must match the current file on disk, not an earlier review round. Format: see references/outcome-format.md.
Fill the Resolution slot:
None needed.Fixed in <last-fix-commit-sha>.Fixed in <sha>; N deferred to -deferred.md §A-§Z (or just the defer reference if nothing was fixed inline).For tasks annotated Review: phase: skip step E (no per-task review). The task's diff gets covered by the Phase Normal Review at end of phase (see "Phase Normal Review" below).
Every reviewer dispatch (per-task combined or separate, phase normal review, session gate) MUST include the Reviewer Independence Override block, appended AFTER the upstream template's placeholder substitutions. The block lives at $SCRIPT_DIR/reviewer-override.md. Read once per session, cache. Substitute <review-file-path> with the absolute path the orchestrator assigns.
Reviewer prompt MUST also contain, clearly labeled:
## Implementer-Reported Summary (untrusted) - implementer's report text.## Actual Diff - raw output of git show <sha> for single-task reviews, or git diff <base>..<head> for phase/session reviews.After filling BOTH Outcome slots for a task, fly MUST invoke the integrity-check script:
bash $SCRIPT_DIR/integrity-check.sh <task-id> <plan-dir> <task-sha>
Output:
PASS (exit 0) - integrity verified. Proceed to the next task.HALT: <reason> (exit 1) - STOP immediately. Do NOT try to patch the symptom (re-dispatching, re-writing, tweaking slots). Surface verbatim with the recovery hint: HALT: <reason>. Run /compact then re-invoke /fly <checklist>. Mid-flight pickup resumes from this task.Why this gate exists, what the script checks, and the agent-agnostic caveat: see references/integrity-gate.md.
Every 10 completed tasks (before task 11, 21, ...), Read this SKILL.md to refresh discipline against late-session drift. One Read per 10 tasks; triggers at most twice per /fly run.
After all tasks in a phase complete (all per-task slots filled). Per-task TDD catches regressions inside each task's scope. Phase regression check catches regressions task-level tests didn't cover (unrelated tests newly broken, integration failures). Also defangs "it was a pre-existing failure" gaslighting: pre-existing = proven by running test at base commit, not asserted.
NO reviewer subagent at phase boundaries. Per-phase deep-reviews are gone; one session-end deep-review covers all that session's tasks at lower total cost.
Invoke the regression script:
bash $SCRIPT_DIR/phase-regression.sh <phase-first-commit-sha>^ <phase-last-commit-sha>
(The caret ^ on the base SHA expands to its parent in the script's git invocations.)
Parse the single-line output:
tests_pass=N tests_fail=N regressions=K | <test1> | <test2> | ...
regressions=0: phase regression check passes. Fill the Phase Regression Check Outcome with tests_pass=N tests_fail=N regressions=0. Continue to the next phase.regressions>0: dispatch a fix-implementer with the regression list, re-run the script, loop until regressions=0. If fix-implementer BLOCKs at upgraded model after 2 tries, halt with the compact-restart hint (continuing on a broken codebase makes every subsequent task fail).If the checklist's phase block contains a ### Phase <N> Normal Review block (preflight emits this only when at least one task in the phase is annotated Review: phase):
Review: phase tasks in this phase. Their commit SHAs are in their filled SHA slots; the phase normal review's scope is the union (git diff <first-phase-task-sha>^..<last-phase-task-sha> works if they're contiguous; otherwise pass each SHA range explicitly).code-quality-reviewer-prompt.md template against that diff. Review file path: <plan-dir>/reviews/phase-<N>-normal-review.md.If no Phase Normal Review block exists for this phase, skip - all tasks were reviewed individually.
After filling the Phase Regression Check Outcome + Resolution (and Phase Normal Review if present), check the phase's end-state verification section (written by preflight):
Residual manual test lines and surfaces them as the REQUIRED "Try it yourself" walkthrough.After all phases complete + their regression checks pass, run the session-end deep-review. Always present, every checklist (single-session OR per-checklist-N.md):
Locate the ## Session Gate: /deep-review over <scope> block. Scope is the cumulative diff for THIS session's tasks (<session-base-sha>^..HEAD per checklist annotation).
/deep-review directly via Skill tool from main fly context. Do NOT wrap in a Task-dispatched subagent - subagents cannot nest-dispatch Task, which /deep-review may need internally for its parallel sub-reviewers.findings = fixed + deferred). Default disposition is [fix]; only legitimately-defer findings go to deferred.md. Do NOT accept prose summary in place of enumerated findings.references/outcome-format.md)./deep-review has its own internal auto-fix mechanism. If it reports findings already auto-fixed, count those in fixed. Findings flagged as deferred go into /fly's deferred.md (same file).
Independent reviewer caveat: when /deep-review's independent reviewer is Codex, codex review --base <X> takes a BRANCH name, not a SHA. The /deep-review skill owns the reviewer-specific dispatch details. Do NOT skip the independent reviewer - it's load-bearing.
Prefer doing over deferring. Default is fix-inline; the synthetic deferred-resolution task at end of run will process whatever does land in the deferred file anyway. The 3 valid defer criteria (needs user decision / phase-sized / extremely risky) are spec'd canonically in reviewer-override.md - reviewers see them there.
Anything user-relevant you notice mid-run that ISN'T a review finding - tooling bug you worked around (e.g. "tick-steps.sh broke on consolidated IDs, edited checklist by hand"), plan defect (e.g. "plan's example test code missed jsdom env"), convention drift, anything you'd otherwise be tempted to mention in a "Known issues" status update - append a §N entry to deferred.md NOW with a one-line description and any context the deferred-resolution task needs to format it properly. The synthetic task at session end will translate it into user-facing-impact framing per the global "Surfacing to the User" rule. Don't keep these in your head and dump them on the user later in dev-todo form.
<plan-basename>-deferred.md format. Each finding gets its own §N entry:
# Deferred Items: <feature>
## §1: <task/gate context> - [priority] <short title>
**Finding:** <reviewer description, preserving file:line citation>
**Why deferred:** <which of the 3 criteria + specifics>
**Suggested fix:** <from reviewer's output>
Update Resolution slot when writing: Action: Deferred to <plan-basename>-deferred.md §N. Create the file with the header before appending §1 if it doesn't exist.
More than 1-2 defer entries per review = signal. If reviewer seems to be mis-disposing, re-dispatch once; otherwise log a ## Defer rate note line in deferred.md and continue. Fire-and-forget: don't pause to ask.
After all tasks, phase regression checks, and session gate are processed, run:
bash $SCRIPT_DIR/final-verify.sh <checklist-path>
How to react to PASS / HALT / WARN / DEFERRED output (including the spawn_task handoff for deferred-resolution items): see references/final-verify-output.md.
After final verification passes:
§N titles, descriptions, or your own commentary on them./ship or prompt the user about shipping. User decides when to ship; nudging adds noise./fly exists because LLM coordinators rationalize shortcuts under context pressure. The checklist is the contract; every slot traces to a tool call that produced it. If you can't point to the Task / Write / Edit / Bash call that filled a slot, the slot is unfilled.
If you catch yourself thinking any of these, STOP - you're about to violate the contract:
| If you're tempted to... | Reality |
|---|---|
Skip dispatch-reviewer.sh and just type the model into the Task call ("haiku is faster", "sonnet for the small diff", "the checklist annotation is obvious") | Run the script. Always. The MODEL value goes in verbatim. integrity-check.sh reads message.model from the JSONL and HALTs if the dispatched model doesn't match the checklist. Skipping the script doesn't get you out of the verification - it just means the HALT lands later, after wasted reviewer work. |
| Skip a review ("trivial", "code looks fine", "I read the diff") | Review = dispatched subagent + on-disk file. No dispatch, no review. Per-task integrity gate catches this; do not try to override. |
| Dispatch haiku reviewer when checklist says sonnet ("the diff is small", "just test fixtures", "haiku is fine here") | DRIFT. Halt, edit the checklist explicitly, then re-dispatch. integrity-check.sh verifies the JSONL message.model against the checklist annotation post-hoc; you can't get away with it. |
| Use a different model than checklist says (upgrade "to be safe" or downgrade "looks easy") | Checklist IS the contract. Silent drift breaks the audit trail. Use it verbatim; if you think it's wrong, log a note in deferred.md and continue. |
| Pause to ask the user "should I plow on, stop here, or pivot?" - even with a polite "I'll keep going if no answer" | The user is gone for hours. /fly is fire-and-forget. Pick the default (plow on), log uncertainty in deferred.md, keep moving. The deferred-resolution task surfaces it at the end. |
| Emit a "Known issues / Things to flag / Notes for next time" list in your own voice (mid-run status, end-of-run report, or anywhere else) - even if it feels helpful | Append each item to deferred.md as a §N entry the moment you notice it. The deferred-resolution synthetic task is the SOLE surface for anything user-facing about this run; it formats with mandatory user-facing-impact framing. Your own voice doesn't, and dev-todo phrasing leaks past the user. |
| Skip TDD because the task text didn't mention it | Implementer dispatch always appends TDD override. Do TDD. |
| Stretch inline-fix path ("basically a rename, just a few extra lines", "I see what the reviewer means") | Inline-fix is for trivial verbatim slam-dunks. If you have to think, dispatch. |
| Consolidate / merge / paraphrase reviewer findings | Every numbered finding processed by number. findings == fixed + deferred invariant. Halt if violated. |
| Defer a finding without one of the 3 valid criteria | Reject the disposition and re-dispatch reviewer. Default = [fix]. |
| Write "Looks good" in an Outcome slot | Outcome needs findings=N fixed=N deferred=N (review: <path>). Final verification rejects prose-only. |
| Act on findings missing number/priority/disposition/citation | Inadmissible. Discard, log inadmissible=N, move on. |
| Tick the final verification block without actually running checks | Run final-verify.sh. Tick only after PASS. |
| Skip the periodic SKILL.md re-read at task 10/20 | Structural reminder. One Read. Do it. |
| Override an integrity-gate or final-verify HALT because "the work is really fine" | HALT means evidence doesn't support the claim. Surface to user, don't override. |
All shortcuts mean: you are about to violate the checklist contract. Do the work.