Skip to content

Update sweeper-fix skill to v6: agent-ready tiers, plan-first mode, plan file - #336827

Open
Erich Gamma (egamma) wants to merge 1 commit into
mainfrom
egamma/sweeper-fix-skill-v6
Open

Erich Gamma (egamma) wants to merge 1 commit into
mainfrom
egamma/sweeper-fix-skill-v6

Conversation

@egamma

@egamma Erich Gamma (egamma) commented Sep 18, 2026

Copy link
Copy Markdown
Member

TL;DR — The VS Code Sweeper reviews the open backlog nightly and, for issues it can diagnose from the source, writes a brief an agent can act on. This skill is how a maintainer turns that brief into a draft PR from their own checkout, under their own identity, with the sweeper never writing to this repo. Until now the lane only covered small, fully diagnosed bugs; most issues worth an agent's time instead need a human decision first (which of two designs, what the boundary is, whether the repro even holds). v6 adds that second tier: for those issues the skill writes a plan with the maintainer and stops for approval before touching code, and for the fully diagnosed ones it goes straight to the change as before. Both paths end with the change validated against a written plan, so a plausible fix for the wrong problem is caught before review. The matching Implement / Plan buttons in vscode-tools are in microsoft/vscode-tools#1114.

Skill v6 (generated from the vscodesweeper repo's template; getting started: https://egamma.github.io/vscodesweeper-state/fix-skill.html).

The sweeper's review records now carry an agent-readiness tier instead of the boolean fix flag: implement (the review did the diagnosis — confirmed defect, bounded change, a named validation) or plan (the goal is clear but a design or diagnosis is open). The skill reads the tier and runs in the matching mode; the old autoFixable: true records still count as implement.

  • One skill, two modes. implement goes straight to the change, as v5 did. plan-first puts the review's open decisions to you first (with a recommendation each, never guessed), reproduces before designing when the review could not confirm the bug, writes the plan with you and stops for your approval before touching any code. You can ask for plan-first on an implement record; the reverse is never allowed.
  • A plan file, never committed. Both modes write .sweeper/plans/issue-<n>.md (Behavior / Approach / Validation / Open decisions), seeded from the review's brief, and add .sweeper/ to .git/info/exclude — no .gitignore change, works in worktrees.
  • Validate against the plan. Before showing the diff, the skill checks it statement by statement: every Behavior statement covered by a test, nothing changed outside the plan's boundary, every named test fails before and passes after, no open decision left. Then the full diff is its own approval step — never folded into the validate summary.
  • PR body. Adds Sweeper mode: implement | plan-first under the seeded-by line and the plan in a collapsed <details> block, so reviewers get the map of the change.
  • Reads the review's brief in its new two-part form (Behavior / Trace) and still accepts older records' Fix prompt.

Unchanged from v5: the strict trigger (only explicit sweeper requests), the graceful hand-back when no record exists, the live gates (issue open, no security label, no open PR referencing the issue, staleness warning, re-checked before push), the clean-checkout requirement, explicit-path staging, and the draft-only PR the maintainer owns.

Both modes were exercised end to end on the sweeper's sandbox repo before this update (plan-first: egamma/sweeper-sandbox#18; implement: egamma/sweeper-sandbox#19).

Copilot AI balanced review requested due to automatic review settings September 18, 2026 20:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Worktree handling, untracked-file review, and safe PR-body submission have unresolved gaps.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity

Open (3)
What changed in this PR

Updates the Sweeper skill to support implement and plan-first workflows.

Changes:

  • Adds agent-readiness tiers and approval-gated planning.
  • Introduces local plan files and plan-based validation.
  • Expands draft PR metadata with mode and plan details.
File Description
.github/​skills/​sweeper-fix/​SKILL.md Defines the v6 Sweeper workflow.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


```
gh pr create --repo microsoft/vscode --base main --draft --title "<concise fix title>" --body "<body>"
gh pr create --repo microsoft/vscode --base main --draft --title "<concise title>" --body "<body>"
Comment on lines +104 to +106
Before writing the file, make sure it never reaches git: add the line `.sweeper/` to
`.git/info/exclude` if it isn't there (never touch `.gitignore` — that is a product
change). Then write the file with exactly these sections:
Comment on lines +188 to +190
- the **Approach** boundary: nothing outside the named files and their immediate neighbors
changed, and nothing the plan said must stay untouched did (`git diff --stat` against the
plan's file list);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants