magpie-issue-fix-workflow
For a single triaged `<issue-tracker>` issue confirmed as a bug or feature, draft a fix against `<upstream>` on `<default-branch>`. Produces the failing test, the smallest production change, the targeted+module test runs, and the commit. The PR is NOT opened on autopilot; the human committer reviews, signs, and pushes. Hand-back artefact summarises branch, commits, test results, and scope.
apache · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add apache/magpie --skill magpie-issue-fix-workflow技能说明
SPDX-License-Identifier: Apache-2.0
https://www.apache.org/licenses/LICENSE-2.0
name: magpie-issue-fix-workflow
family: issue
mode: Drafting
description: |
For a single triaged <issue-tracker> issue confirmed as a
bug or feature, draft a fix against <upstream> on
<default-branch>. Produces the failing test, the smallest
production change, the targeted+module test runs, and the
commit. The PR is NOT opened on autopilot; the human
committer reviews, signs, and pushes. Hand-back artefact
summarises branch, commits, test results, and scope.
when_to_use: |
Invoke when a maintainer says "draft a fix for this issue",
"write the patch for the confirmed bug", or "implement the
improvement from this issue". Also as a natural follow-up
to issue-triage for issues classified BUG or
FEATURE-REQUEST. Skip when the fix is non-trivial enough to
need design discussion — those go through an RFC first.
capability: capability:fix
license: Apache-2.0
issue-fix-workflow
This skill drafts a code fix for a single <issue-tracker> issue
that has already been triaged as actionable (classification BUG
or FEATURE-REQUEST per issue-triage).
It produces the failing test, the smallest production change, the
targeted and module test-run results, and the commit — but stops
before opening a PR. The human committer reviews the hand-back
artefact and decides what happens next.
This skill mirrors security-issue-fix
in the security family, adapted to the general-issue tracker.
Confidentiality and CVE-scrubbing concerns do not apply here; the
issue is already public.
It composes with:
issue-triage— predecessor; produces the classification this skill builds on.issue-reproducer— if the triaged issue carries averdict.json, the adapted reproducer inside it is a regression-test starting point.issue-reassess— campaign-level caller; thestill-fails-*tail of a reassess campaign feeds directly into this skill.
Golden rules
Golden rule 1 — every state-changing action is a proposal.
Writing files in <upstream>, committing, pushing, opening a PR,
posting to <issue-tracker>, transitioning workflow state — all
require explicit user confirmation. The fact that the user invoked
the skill is not a blanket "yes"; each action gets its own
confirmation.
Golden rule 2 — never autopilot the PR. Even when the fix is complete and clean, the skill does not open a PR (draft or otherwise), comment on the issue, self-assign, or transition workflow state on autopilot. The hand-back contract (below) is firm. With explicit instruction the skill may open a draft PR after the user reviews the title, body, and diff — never non-draft, never on autopilot.
Golden rule 3 — failing test first. The project's fix-workflow
convention is failing test on <default-branch> first, then the
smallest production change that turns it green. If the issue
carries an adapted reproducer (a verdict.json from
issue-reproducer), the
reproducer is the starting point for the regression test — but
the test lives in the project's test tree, not in a scratch
file. The placement and naming conventions live in the project's
own contributing docs.
Golden rule 4 — smallest fix; scope discipline. The diff is the test, the production change, and any directly-required edit — nothing else. No drive-by reformatting, no stray imports, no speculative refactor. A two-minute diff beats a half-hour diff a maintainer has to unpick.
Golden rule 5 — grounded identifiers only. AI tooling reaches
for plausible method or flag names that don't exist or have been
renamed. grep the identifier in the working tree before
depending on it. If it isn't there, it isn't there. Hallucinated
identifiers are the most common failure mode for AI-drafted
patches.
Golden rule 6 — cause, not symptom. The reproducer throws an exception at line N; the patch adds a guard at line N. Sometimes correct; often not — the symptom may indicate earlier state the surrounding code assumed was populated. Trace one or two frames up before reaching for the local guard.
Golden rule 7 — green build is the floor, not the ceiling. The targeted test passing means the change isn't obviously wrong; it does not mean the change is right. Scope discipline, regression- test quality, and the hand-back contract all still apply.
Golden rule 8 — every PR / <issue-tracker> / <upstream>
reference is clickable in the surface it lands on. Whenever
this skill emits a reference to an issue, PR, or commit — the
hand-back artefact printed to the user's terminal, the proposed
commit message body, the draft PR body the human committer will
use, any tracker comment posted on <issue-tracker> — the
reference must be one click away in whatever surface it lands on:
- On markdown surfaces (the draft PR body, the commit-message
body destined for
git log, any tracker comment posted on<issue-tracker>): use the markdown link form per [AGENTS.md§ *Linking tracker