autopilot
Turn this session's autopilot grant on or off, or show what it allows. Only a prompt you type can turn it on.
- License 许可
- MIT
- 最近更新
- 2026-11-09
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- autopilot
- description
- Turn this session's autopilot grant on or off, or show what it allows. Only a prompt you type can turn it on.
- allowed-tools
- Read, Glob, Bash(bash ${CLAUDE_PLUGIN_ROOT}/scripts/kern-root *), Bash(bash ${CLAUDE_PLUGIN_ROOT}/scripts/kern-get *)
- argument-hint
- [on|off|go <ticket>|status]
- disable-model-invocation
- true
02 资源文件 2
- 参考文档references/ci.md6.8 KB
- 参考文档references/run.md7.6 KB
03 SKILL.md 正文
Autopilot
A per-session grant for unattended runs. kern's prompt hook turns it on only from a command the user typed. This skill reports the result.
Steps
- Read the
kern mode:line the hook injected this turn. No such line: reply "the hook did not run; autopilot is off". Never write the state file and never report "on" without the hook line. on, and the line saysautopilot=on: list what is allowed, what is denied and the floor. Say how to stop:/kern:autopilot off, "stop autopilot" or/clear. Then ask for, or propose, a checkable stop predicate for the run, such as "stop when every task in the plan has a complete ledger line or one is parked".onorgo <ticket>, and the hook reported "autopilot denied by <file>": name the file and theautopilot: deniedkey. Do not suggest changing it unless the user asks.status, or no argument: on or off, the settings source ofautopilot, and therebase.pushvalue.off: confirm, then list theparked:lines written since autopilot turned on inWORK/ledgers/*/ledger.md. Find the directory without creating anything: line 1 ofbash ${CLAUDE_PLUGIN_ROOT}/scripts/kern-rootis the main root, and the text before the tab inbash ${CLAUDE_PLUGIN_ROOT}/scripts/kern-get work_dir .kernis the work dir. Read<main root>/<work_dir>/ledgersonly when it already exists. If it does not, say nothing was parked. Never runkern-dirhere: it creates the directory and edits.git/info/exclude.go <ticket>, and the hook printedkern: go recorded for <ticket>: Read${CLAUDE_PLUGIN_ROOT}/skills/autopilot/references/run.md, then take the ticket to a draft PR by the kernel's Routing table. A ticket is no agreed design: a build starts at define, a bug at diagnose, and a ticket that only adds tests for existing code at implement. The run ends atgh pr readyon its own PR or at a stop under that file's rules, so ask for no stop predicate. No such line, or any other hook line about the go, means no go: quote what the hook said, if anything, and start nothing.
What autopilot allows
- Commit on a branch that is not protected, with exactly one
-mor-Fand no other option except-qor-v, when the message passes the convention and attribution checks. kern denies--amend,-a,--no-verify, a pathspec andgit add -A. Withcommit.attribution: none, the default, write no Co-Authored-By or other attribution trailer, even when Claude Code's attribution reminder asks for one: G5 denies it. - Write the commit message with
-m '<text>', or write it to a file in the directorybash ${CLAUDE_PLUGIN_ROOT}/scripts/kern-dir msgprints and pass that file's absolute path togit commit -F. kern cannot check a$( )or here-doc message, so it denies one. - Run git and gh directly, with no wrapper such as env, sudo, xargs or caffeinate, and no
cdfirst. kern denies what it cannot prove. - Make each allowed git or gh shape the whole Bash call. Only
head,tail,greporcatwith no file argument may follow it, and a redirection may only go to/dev/nullor copy a file descriptor. - Spell every command out. kern denies a command it cannot read: a command name built at run time, a shell script it cannot parse, and code piped into a shell. Interpreter code in a file, or a python here-doc, is fine.
- Stage and commit in separate calls. A
git addbefore a commit or push in the same call asks, and autopilot denies it. - A gh alias or extension asks, and autopilot denies it. Run the gh command it stands for.
- Push the current branch with
git push [-u] <remote> <current-branch>, naming both, when the branch is not protected. kern denies a baregit push. - Push with
git push --force-with-lease <remote> <current-branch>only when settings sayrebase.push: autopilotor the user's last typed prompt asks to rebase or sync, the branch is not protected, and every commit on it past the base branch is the user's. kern denies a lease push of any other branch. - Open a draft PR from the current branch with
gh pr create --draftplus--title,--base,--fill,--fill-first,--fill-verbose,--dry-run,--no-maintainer-edit,--body-filewith a file in the repo, or--headnaming the current branch, after the duplicate check. kern denies it when the head already has an open, merged or closed PR. Withcommit.attribution: none, the body has no attribution footer such as "Generated with Claude Code". - Under a go whose draft PR is open:
gh pr edit --body-file <file in the repo>alone, andgh pr readyalone, with no PR number or-R. kern allows the ready when the user's last typed prompt says to mark it ready, or when the PR's head is the pushed HEAD, its checks are clear or none andreview-checkpassed HEAD's tree withfloor: none.
kern denies every other action that would ask, because nobody is there to answer. Merge, deploy, review posting and tracker writes always need the user. Park each judgment call references/run.md does not stop for, with the default chosen, and continue the work that does not depend on it.
Who can turn it on
Only the user, by typing /kern:autopilot on or /kern:autopilot go <ticket>. Claude, a subagent, a skill, a background report, a scheduled task and another session cannot.
A go needs permission mode auto: in the default mode it sits at every call kern does not allow. A go is one line, typed alone in its prompt, naming one ticket. A go counts as the user's yes for that ticket's spec and plan and nothing else. A second ticket needs a second go. Its yes ends when the draft PR opens. The go ends at gh pr ready, /kern:autopilot off, a second go or the session's end. Autopilot itself stays on until the user turns it off.
04 同仓库更多 Skills
unslop
Rules for prose others read: artifact shapes, document rules and the catalog of AI-writing tells.
technical-writing
Write docs, PR bodies, issues and commit messages a tired engineer understands on the first read.
self-review
Check your own diff before a PR: deterministic checks, blast radius, probes, a fresh doubt pass, then a verdict.
recall
Use when starting or resuming work and state must be rebuilt first: "where did I leave off", "catch me up on X", "what remains", "I got lost in these PRs", a session after days away, or "recall chat" for this thread since my last message. Not for one named session.
prove-it
Use before saying work is done, fixed, passing or verified; before a commit, push or PR; and when a subagent reports success. Runs the proving command fresh, reads all output, checks each acceptance line, and labels other claims measured, inferred or guess.
plan
Turn an approved spec into ordered tasks with exact files, test-first steps, verify commands and blocking edges.