agentleFS
VladTheProgrammerVladTheProgrammer/claude-asimov/.claude/skills/autopilot/SKILL.md

autopilot

Skill0 starsChanged 4 months agoMITView on GitHub

Run ONE tick of the autonomous control loop — reconcile state against reality, decide the single highest-value next action toward the objective, dispatch it to fresh sub-context, record, and schedule the next tick. Run it on a loop (`/loop /autopilot`) on the droplet.

  • Reads credentials

76 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use review-bugbot, rename-chat and 10 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.
  • 0mlkrizzz655335vSkill

    review-bugbot

    缺陷导向代码审查。用 Bugbot 子代理找 bug。

    Also in 3 projects that use this

  • 0mlkrizzz655335vSkill

    rename-chat

    重命名当前聊天。按聊天内容改标题。"disable-model-invocation: true

    Also in 3 projects that use this

  • Tsumugii24Skill

    split-to-prs

    Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.

    Also in 4 projects that use this

  • PandelisZSkill

    update-cli-config

    View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.

    Also in 3 projects that use this

  • 32103210Skill

    migrate-to-skills

    Convert 'Applied intelligently' Cursor rules (.cursor/rules/*.mdc) and slash commands (.cursor/commands/*.md) to Agent Skills format (.cursor/skills/). Use when you want to migrate rules or commands to skills, convert .mdc rules to SKILL.md format, or consolidate commands into the skills directory.

    Also in 3 projects that use this

  • 32103210Skill

    update-cursor-settings

    Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.

    Also in 3 projects that use this

  • +1 more from 32103210
  • +1 more from 0mlkrizzz655335v

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 68 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    Never trust a counter (e.g.

    line 14
  2. Very specific:

    Reconcile: if Linear/status disagree with reality (e.g.

    line 32
  3. Distinctive:

    If a task is in flight, determine the real next step from reality, not the counter: which artifacts exist + git state.

    line 39
  4. Distinctive:

    No task in flight → Phase 3.

    line 44
  5. Very specific:

    Run the real current step via the matching skill, as a fresh sub-agent reading docs/{task}/ + the wiki and writing the next artifact: facts …

    line 82
  6. Very specific:

    Verify consistency + discovery: after design, research, and structure, a second fresh sub-agent verifies the artifact's internal …

    line 90
  7. Very specific:

    Post-execute review (the catch-net): after execute finishes a task, run review-auto — a

    line 94
  8. Distinctive:

    Wiki authority rule: only human-ratified decisions are authority you cannot override.

    line 126

“Common” is measured: kept by at least 6 in 10 of the 68 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

You are the dispatcher, not a doer. Move the project toward docs/objective.md by one action, then stop.

Three laws (read first, every tick)

  1. One canonical source of truth = reality on disk — the git working tree + the artifacts in docs/{task}/. Linear, the wiki, and the runtime status file are derived caches that can lag or desync. When a cache disagrees with reality, reality wins and you reconcile the cache to it. Never trust a counter (e.g. a recorded pipeline_step) over an actual artifact or git state.
  2. Stateless / amnesia-correct — hold nothing across ticks; reconstruct everything from reality + the caches each tick. If your context were wiped right now, this tick must still be correct. Pass file paths and short statuses to sub-agents, never artifact content — keep your own context tiny.
  3. Single-flight — at most one task is ever in the pipeline. Acquire an atomic lock; if you can't, another tick owns the loop — no-op. This is what prevents code collisions.

The heavy work happens in fresh sub-agents that read docs/{task}/ + the wiki and write the next artifact. You only reconcile state, decide one thing, dispatch it, record, and reschedule.

Phase 1 — Read reality, then the caches

  • docs/objective.md — mission, milestones (+ machine-checkable criteria), risk policy. This is the human-owned frame. Read it every tick.
  • Reality: current git branch (must be staging) + clean/dirty; which docs/{task}/ artifacts actually exist; the wiki.
  • Caches: the status file .autopilot/state.json (gitignored), and Linear (via scripts/linear.py, which reads $LINEAR_API_KEY — the headless box has no OAuth MCP) — the queue.
  • Reconcile: if Linear/status disagree with reality (e.g. status says step 4 but no design.md exists), fix the cache to match reality. If .autopilot/paused exists → do nothing, do not reschedule.

Phase 2 — Single-flight & reality-based recovery

  • Acquire the atomic lock (mkdir .autopilot/lock or flock — an atomic primitive, never a JSON read-modify-write). Fail → another tick owns it → no-op, stop.
  • If a task is in flight, determine the real next step from reality, not the counter: which artifacts exist + git state. If the working tree is dirty / an artifact is half-written (a prior tick crashed mid-step) → roll back to the last clean boundary (last committed step / last complete artifact) and resume from there. Steps must be idempotent or guarded ("artifact already exists and validates → skip"). Continue that task — never start a new one.
  • No task in flight → Phase 3.

Phase 3 — Decide the single next action

In priority order:

  1. Task in flight → its real next pipeline step.
  2. Actionable Linear task (unblocked, top priority) → claim it (under the held lock), mark In Progress, set the cache. Begin its pipeline.
  3. Queue empty → goal-assessment (read docs/objective.md + ground truth):
    • Milestone done? — run its assertion; do not self-judge. Green → advance the milestone and generate the next milestone's tasks (capped at N), each grounded in the objective + wiki. You generate tasks within a fixed milestone; you do not create or alter milestones/criteria.
    • OPERATE mode (post-M6) → run the hypothesis loop: form one hypothesis (from data / research / discovered-questions), create a staging task to implement + validate it forward/OOS, capped. Near live money, prefer alert/escalate over auto-act.
    • Nothing to do → idle / long-interval monitor.
  4. Budget check (every tick, before acting): global max-cycles/day, per-cycle token cap, cooldown after failures. Exhausted → escalate/pause.

Escalation triggers — open a needs-human Linear issue (scripts/linear.py create), touch .autopilot/paused, do NOT reschedule

The phone alert is mechanical — the runner's scripts/notify_tick.py detects the paused transition each tick and pushes the priority-5 needs-you ping (with the paused reason / escalation as the body). Do not hand-send it; just write a clear reason into .autopilot/paused and keep the escalation field accurate.

  • A decision would contradict a human-ratified wiki decision, change a milestone/criterion/risk-policy dial or the mission, relax or remove an enforced architecture contract (the [tool.importlinter] set or a wiki/architecture/ invariant), or skip the production gate.
  • The same task failed N consecutive times (e.g. 3); or budget is exhausted.
  • A step needs an autonomous mode that doesn't exist yet (do not run the interactive skill — it would hang waiting for a human).
  • Ground truth is insufficient to run a milestone assertion and can't be made runnable.

Escalation is the system correctly handing a fork to its owner — not a failure.

Phase 4 — Dispatch one pipeline step (fresh sub-context)

Run the real current step via the matching skill, as a fresh sub-agent reading docs/{task}/ + the wiki and writing the next artifact: facts → facts-ext (if needed) → questions → research → design → structure → better-plan → execute → review

  • facts, facts-ext, questions, better-plan run as-is (already non-interactive).
  • research, design, structure, execute, review run in autonomous mode via the *-auto skills (research-auto / design-auto / structure-auto / execute-auto / review-auto). If the mode is missing → escalate (Phase 3), never invoke the interactive version.
  • Verify consistency + discovery: after design, research, and structure, a second fresh sub-agent verifies the artifact's internal consistency and its claims against the actual code/sources. Disagreement → redo or escalate. (Design also has its panel+critic; the verifier is the independent cross-check the author can't do for itself.)
  • Post-execute review (the catch-net): after execute finishes a task, run review-auto — a fresh adversarial review of the task's diff for correctness, cross-module consistency (every consumer / UI / serializer / doc / test of changed code updated — checked against research's blast-radius map), offline≠live gaps, and the CLAUDE.md safety invariants. Findings are adversarially verified; a confirmed correctness/safety bug → bounded fix or escalate. Tier the rigor to blast-radius (heavy for side-effecting, money, or data-loss code; light for docs/infra).
  • Advance one step per tick (thin + resumable), checkpointing reality at each clean boundary.

Phase 5 — Record & gate

  • Step done — the commit path depends on the step kind:
    • Execute / code step → do NOT commit or run the suite yourself. Leave a clean, committable dirty tree and write .autopilot/handoff.json = {"task":"TASK-XX","subject":"<commit subject>","gate":"full"}. The runner (scripts/gate_commit.sh) then runs the deterministic gate (ruff on changed files + scripts/fitness.sh + pytest -m 'not staging') synchronously and commits-if-green / hard-rolls-back+escalates-if-red, then pushes to origin/staging. This takes the checkpoint out of the LLM so it can never be backgrounded or skipped (the TASK-92/TASK-75 no-op-loop fix).
    • Docs-only step (facts…better-plan, review notes, wiki) → commit and push to origin/staging yourself at a clean boundary ([skip ci]); reconcile the caches. (Pushing fires the CI deploy to the runtime box — expected and non-blocking; an operator-approved production restart/deploy stays human-pending, never autonomous.) Deploy health: after any deploy or mode-flip, verify the target service is actually healthy (not just that the commit pushed) — a watchdog on the runtime box catches a stalled or crash-looping service and pings needs-you.
  • Task done (execute complete and review-auto green) → commit to staging — no per-task PR (per-task PRs cause review fatigue and rubber-stamping). A task is not done until its post-execute review passes (no unresolved confirmed correctness/safety finding). Capture the outcome to the wiki as an agent-provisional decision and/or experiment entry (status: provisional). Mark the Linear issue Done; release the lock.
  • Milestone done → ensure the one rolling PR staging → main via scripts/gh.py ensure-pr (idempotent — creates it if none is open, else comment M{N} complete — review point; never a duplicate). Record plan manual-verification steps (e.g. "observe the deploy") as non-blocking notes on the PR/Linear — surface, don't pause. Continue to the next milestone (race-ahead). The milestone phone alert is mechanical — the runner's notify_tick.py detects the new M{N}_DONE in state.json's milestone_status and pushes the 🚀 ping; do not hand-send it. Never merge the PR. Never touch production credentials.
  • Human-pending recorded (a step only a human can do — a production action, an eyes-on-a-screen check, the M5 faithfulness sign-off) → this is the one ping the agent still hand-sends, because the ask is context-specific: scripts/notify.py with the actual ask written in the message body (priority 4, tags eyes); link only to the dashboard if NTFY_CLICK_URL is set — never a bare Linear/GitHub URL (the phone can't open private links). So it never sits silently. Acting against STAGING is NOT human-pending — do it autonomously (isolated; scoped credentials).
  • Wiki authority rule: only human-ratified decisions are authority you cannot override. Treat your own provisional entries as re-examinable evidence, not intent — never let a provisional default calcify into "the human decided this."

Phase 6 — Schedule the next tick

Exit cleanly — the on-box runner (scripts/autopilot.sh) re-invokes the next fresh, stateless tick after its interval (short while building; long in MONITOR/OPERATE, alert-only). On pause/escalation or budget-exhaustion, touch .autopilot/paused so the runner idles instead. Release the lock before exit. (In a self-scheduling session, ScheduleWakeup re-fires instead of the runner.)

Invariants

  • Reality (git + artifacts) is canonical — caches reconcile to it; never trust a counter over a fact.
  • Stateless tick; atomic single-flight; recover to a real clean boundary (rollback, never partial-merge).
  • The objective frame is human-owned — milestones/criteria/risk-policy/mission and the production merge. Proposing a change to the frame is an escalation, never an override.
  • No per-task PR; milestone-level PR only; never merge main; never production creds.
  • Performance is observed, never targeted — validate improvements forward/OOS; log every attempt.
  • Provisional ≠ ratified — only human-ratified decisions are authority.
  • Bounded — global budget/rate ceiling; discovery verified by a second agent; a missing autonomous mode escalates, never hangs.
  • Compounding memory — every completed task writes a (provisional) decision and/or experiment entry, so the next cycle is smarter and never re-runs a dead end.
  • Debt is filed, not buried — any stub, deferral, TODO, or known-gap (e.g. "attribution deferred", a feature postponed, a 0.0 placeholder) becomes a low-priority Linear task (scripts/linear.py create "DEBT: <what>" --desc "<why deferred + file:line + what's needed>" --priority 4), after checking it isn't already filed. Carry-forward debt must never live only in state.json — the Linear backlog is the one human-visible source of truth, so nothing rots unseen.

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.