feat(autopilot): pre-flight isolation question on rule 6 - #33
Merged
Conversation
Isolation rules 1-5 are forced by observable git state or an explicit user declaration — nothing to decide. Rule 6 (clean tree, on the default branch) is the only rung where worktree and branch-in-place are both legal, and the skill picked worktree silently. Move the Isolate step to step 2, before recon or planning touch the repo, and turn rule 6 into a pre-flight question — worktree recommended, branch in place the alternative — asked once while the user is still present so the autonomous stretch that follows stays genuinely uninterrupted. Falls back to worktree, recorded in the final report, when no one is reachable to ask. Also fixes allowed-tools: rev-parse, rev-list and worktree list were commanded by the Isolation section but missing from the allowlist.
Reviewer's GuideAdds a pre-flight isolation question to the autopilot skill’s isolation ladder (rule 6), runs isolation earlier in the sequence, and updates allowed tools and documentation to keep the autonomous-mode promise consistent with the new interaction. Sequence diagram for the new pre-flight isolation question in rule 6sequenceDiagram
actor User
participant AutopilotSkill
participant AskUserQuestionTool
User->>AutopilotSkill: invoke autopilot
AutopilotSkill->>AutopilotSkill: [Isolation step 2]
AutopilotSkill->>AutopilotSkill: Bash(git status:*)
AutopilotSkill->>AutopilotSkill: Bash(git rev-parse:*)
AutopilotSkill->>AutopilotSkill: Bash(git rev-list:*)
AutopilotSkill->>AutopilotSkill: Bash(git worktree list:*)
alt preference already stated
AutopilotSkill->>AutopilotSkill: EnterWorktree
AutopilotSkill->>AutopilotSkill: Bash(git branch:*)
else headless or no preference
AutopilotSkill->>AskUserQuestionTool: AskUserQuestion
AskUserQuestionTool->>User: AskUserQuestion
User-->>AskUserQuestionTool: answer(worktree|branch)
AskUserQuestionTool-->>AutopilotSkill: answer(worktree|branch)
alt answer worktree
AutopilotSkill->>AutopilotSkill: EnterWorktree
else answer branch
AutopilotSkill->>AutopilotSkill: Bash(git branch:*)
end
end
AutopilotSkill->>AutopilotSkill: Agent
AutopilotSkill->>AutopilotSkill: proceed to recon, plan, build, verify, ship
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The description of Isolation rule 6 in SKILL.md is quite dense; consider breaking the three governing clauses (prior preference, structured vs plain-text question, headless fallback) into a short bulleted list to make the decision flow easier to scan during implementation.
- Now that step 2 is the isolation pre-flight and step 3+ are the autonomous stretch, it may help to add a brief explicit statement in SKILL.md’s Sequence section about when the “no-interruption” promise starts (i.e., after isolation is settled) to avoid any ambiguity for harness implementers.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The description of Isolation rule 6 in SKILL.md is quite dense; consider breaking the three governing clauses (prior preference, structured vs plain-text question, headless fallback) into a short bulleted list to make the decision flow easier to scan during implementation.
- Now that step 2 is the isolation pre-flight and step 3+ are the autonomous stretch, it may help to add a brief explicit statement in SKILL.md’s Sequence section about when the “no-interruption” promise starts (i.e., after isolation is settled) to avoid any ambiguity for harness implementers.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
allowed-tools:git rev-parse,git rev-list,git worktree listwere commanded by the Isolation section body but missing from the frontmatter allowlist — the ladder could stall on a permission prompt. Added those plusAskUserQuestion.Decisions
Review
Dispatched one correctness-review subagent over the full diff (docs-only, no security surface — skill instruction text, no executable code). It found two real issues, both fixed before this commit:
AskUserQuestiontool, so its "already set to this same surface" claim was stale against the frontmatter.Verification
uv run tools/build-docs --check— exit 0, no drift (this repo's docs-check CI gate, which watches exactly these file paths).rg '\\u[0-9A-F]{4}'over the changed files — no escaped-unicode violations (repo hard rule).Test plan
Summary by Sourcery
Introduce a pre-flight isolation choice in autopilot runs while keeping the autonomous execution contract intact, and update tooling and docs to match.
New Features:
Enhancements: