agentleFS
theyoungastronautstheyoungastronauts/polaris/skills/autopilot/SKILL.md

autopilot

Skill4 starsChanged 4 months agoMITView on GitHub

Autonomous multi-phase loop over a plan.md — execute, lint/test, verify, and commit each phase.

38 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ultrawork, cancel and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • zephyrpersonalSkill

    ultrawork

    Obsessive task completion mode (Sisyphus Mode) - activates maximum intensity work with todo continuation enforcement

    Also in 3 projects that use this

  • AGMO-IncSkill

    cancel

    Use when the user wants to stop current execution. Triggers on "취소", "중단", "그만", "cancel", "stop".

    Also in 3 projects that use this

  • ElliotJLTSkill

    pipeline

    Orchestration pattern for sequential, dependent tasks. When work must flow through stages where each stage depends on the previous (design → implement → test → review), structure as a pipeline with explicit handoffs. Each stage completes before the next begins.

    Also in 3 projects that use this

  • ahilarionSkill

    trace

    Evidence-driven debugging with parallel hypothesis testing

    Also in 3 projects that use this

  • nicepkgSkill

    team

    根据任务快速组建临时 AI Agent 团队协作。自动从 .claude/agents/ 中选择最合适的成员组队。

    Also in 4 projects that use this

  • Dr4gon42Skill

    ralph

    Autonomous agent loop for completing features. Use when asked to 'use ralph', 'ralph this', or to autonomously implement a feature end-to-end. Creates prd.json with user stories, then executes them one by one until complete.

    Also in 4 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 11 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 32 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Look for plan.md in the current directory, then ../plan.md.

    line 13
  2. Very specific:

    If the user specified a starting phase (e.g., /autopilot 3), skip phases before that number.

    line 17
  3. Very specific:

    Check the project's CLAUDE.md plus any Makefile, package.json, pyproject.toml, or docker-compose.yml for test and lint commands.

    line 21
  4. Distinctive:

    Create all tasks upfront using TaskCreate with dependencies.

    line 40
  5. Distinctive:

    Wait for the executor's completion report.

    line 59
  6. Distinctive:

    Run the test and lint commands yourself.

    line 64
  7. Distinctive:

    If still failing, send the executor a message describing what to fix and wait for the fix

    line 66
  8. Distinctive:

    Wait for the reviewer's verdict.

    line 74
  9. Distinctive:

    If the commit fails (hook rejection, nothing staged, git error): do NOT mark the phase complete.

    line 81
  10. Distinctive:

    Stop the loop immediately

    line 86
  11. Distinctive:

    Do NOT attempt to fix FAIL verdicts — they represent design or correctness issues needing human judgment

    line 88
  12. Distinctive:

    After all phases pass:

    line 93
  13. Distinctive:

    Test failures after 3 fix attempts: stop and report with failing output.

    line 100
  14. Distinctive:

    Commit failure: do not mark the phase complete.

    line 101

“Common” is measured: kept by at least 6 in 10 of the 32 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Autopilot: Autonomous Phase Orchestration

You are the lead agent for autonomous multi-phase execution. You orchestrate a team of an executor and a reviewer through each phase of a plan: execute → lint/test → verify → commit → next phase.

1. Find the Plan and Discover Phases

Look for plan.md in the current directory, then ../plan.md. If not found, ask the user.

Parse all phases from the plan. Each phase has a number, name, objective, and task list.

If the user specified a starting phase (e.g., /autopilot 3), skip phases before that number. Otherwise start from Phase 1.

2. Discover Test and Lint Commands

Check the project's CLAUDE.md plus any Makefile, package.json, pyproject.toml, or docker-compose.yml for test and lint commands. If you cannot determine them, ask the user once. Store them for reuse across all phases.

Typical patterns:

  • Python: pytest, ruff check .
  • Node/TS: npm test, npm run lint
  • Django + Docker: docker compose exec api pytest, docker compose exec api ruff check .

3. Spawn the Agents

Spawn two named agents using the Agent tool (called Task in older Claude Code versions). Give each a name: so you can address it with SendMessage:

Executor (name: "executor", subagent_type: "general-purpose"):

You are an execution agent. Read the executor agent definition in .claude/agents/executor.md (or agents/executor.md) for your role. You will receive messages assigning you phases to implement. For each assignment: read plan.md, find the phase, and implement all tasks. Do NOT enter plan mode — the plan is pre-approved. Do NOT commit. When done, send the lead a message summarizing what you implemented, files changed, and any deviations or concerns.

Reviewer (name: "reviewer", subagent_type: "general-purpose"):

You are a review agent. Read the reviewer agent definition in .claude/agents/reviewer.md (or agents/reviewer.md) for your role. You will receive messages assigning you phases to verify. For each assignment: read plan.md, find the phase, and verify the implementation. Do NOT commit — the lead commits. Write the verification report to the project root's docs/verification/phase-N-[name].md (one level above the sub-project) and send the lead a message with the verdict (PASS, PASS WITH WARNINGS, or FAIL) and a summary of findings.

4. Create Tasks

Create all tasks upfront using TaskCreate with dependencies. For each phase create four tasks in sequence:

  • Execute Phase N → Lint/Test Phase N → Verify Phase N → Commit Phase N

Each task is blocked by its predecessor. This provides progress visibility and supports resume.

5. Phase Loop

<!-- Maintainer note: this execute → lint/test → verify → commit loop is duplicated in skills/orchestrator/SKILL.md (§7b Phased Mode). Change both when you touch loop behavior. -->

Before executing each phase, run git status. If the working tree is dirty (uncommitted changes from a previous phase, a crash, or manual edits), stop and ask the user how to proceed — stash, reset, or commit — before continuing. A clean tree at each phase boundary keeps commits reviewable one phase at a time.

Durable state lives in per-phase commits, not in the in-session task list: if this session dies, the committed phases survive and you resume with /autopilot N, but the in-session tasks do not. Treat the last commit as the source of truth for where you are.

For each phase (starting from the start phase):

5a. Execute

Assign the execute task to "executor" and send a message:

Execute Phase N: [Name]. Objective: [objective from plan]. Implement all tasks for this phase. Do not commit.

Wait for the executor's completion report.

If the executor reports it is blocked or that the plan is stale/wrong (as opposed to "done, with notes"), pause immediately and escalate to the user. Do NOT proceed to lint/test — a blocked executor means the phase isn't implemented, and running checks on a half-done tree only produces confusing failures.

5b. Run Tests and Lint

Run the test and lint commands yourself. If any fail:

  1. Analyze failures and fix simple issues (lint errors, imports, formatting) yourself
  2. If still failing, send the executor a message describing what to fix and wait for the fix
  3. Re-run checks after each fix attempt
  4. Stop after 3 failed attempts — report to the user with full test output

5c. Verify

Assign the verify task to "reviewer" and send a message:

Verify Phase N: [Name]. Implementation is complete and tests/lint pass. Review against the plan. Produce a verification report. Do not commit.

Wait for the reviewer's verdict.

5d. Handle Verdict

PASS or PASS WITH WARNINGS:

  • Stage and commit all changes: feat(scope): implement phase N — [name]
  • Include the verification report in the commit
  • If the commit fails (hook rejection, nothing staged, git error): do NOT mark the phase complete. Surface the git error to the user and stop — the work is verified but uncommitted, and advancing would bury it.
  • Log any warnings for the final summary
  • Mark tasks completed, move to next phase

FAIL:

  • Stop the loop immediately
  • Report to the user: which phase failed, what the issues are, reviewer's recommendations
  • Do NOT attempt to fix FAIL verdicts — they represent design or correctness issues needing human judgment
  • Tell the user: fix the issues, then run /autopilot N to resume

6. Completion

After all phases pass:

  1. Send both agents a final message that all phases are complete so they can wrap up
  2. Report summary: phases completed, warnings logged, commits made, suggested next steps

Error Handling

  • Teammate crash or timeout: stop and report. Do not retry.
  • Test failures after 3 fix attempts: stop and report with failing output.
  • Commit failure: do not mark the phase complete. Surface the git error and stop.
  • Unexpected errors: stop and report with full context. Never silently continue.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.