[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AD0498J5RB99JV7YNYKJ40":3,"skill-same:01M6AD0498J5RB99JV7YNYKJ40":95},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":62,"commitSha":63,"skillDirectory":64,"forksCount":65,"repositoryHtmlUrl":66,"repositoryHomepageUrl":67,"ownerHtmlUrl":68,"ownerBlogUrl":69,"ownerDescription":17,"updatedAt":70,"install":71,"resources":84},"01M6AD0498J5RB99JV7YNYKJ40","override-upstream","本地覆盖文件提交上游 PR","Promote a local `.apache-magpie-overrides\u002F\u003Cskill>.md` into a PR against `apache\u002Fmagpie`. Once it merges and the adopter upgrades, the override is redundant and the skill offers to remove it.","将本地的 `.apache-magpie-overrides\u002F\u003Cskill>.md` 提升为针对 `apache\u002Fmagpie` 的 PR。一旦它合并且采用者完成升级，该覆盖便不再需要，此技能会主动提出将其移除。","apache\u002Fmagpie","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACRKRED1THWRMNQ1E2RYE7",146,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-setup\u002Fskills\u002Foverride-upstream\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,10,51],"upstream","override upstream","local","overrides","when","capability","user","it","offers","magpie","name","with","upgrades","Meta","remove","for","platform","back","setup","pr","promote","2026-11-10 10:12:30",false,"---\n# SPDX-License-Identifier: Apache-2.0\n# https:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\nname: override-upstream\nfamily: setup\nmode: Meta\ndescription: >-\n  Promote a local `.apache-magpie-overrides\u002F\u003Cskill>.md` into a PR\n  against `apache\u002Fmagpie`. Once it merges and the adopter upgrades, the\n  override is redundant and the skill offers to remove it.\nwhen_to_use: >-\n  When the user wants a local override contributed back to the\n  framework — typically after living with it for a while and deciding\n  it belongs upstream.\nargument-hint: \"[skill-name]\"\ncapability: capability:platform\nsurface_hash: sha256:6aa9dd2488726450\nlicense: Apache-2.0\nmeasured_tokens: 3773\n---\n\n\u003C!-- SPDX-License-Identifier: Apache-2.0\n     https:\u002F\u002Fwww.apache.org\u002Flegal\u002Frelease-policy.html -->\n\n\u003C!-- Placeholder convention (see ..\u002F..\u002FAGENTS.md#placeholder-convention-used-in-skill-files):\n     \u003Cadopter-repo>           → repo this skill is being run in (an adopter)\n     \u003Coverride-file>          → .apache-magpie-overrides\u002F\u003Cskill>.md being upstreamed\n     \u003Cframework-skill>        → framework skill the override modifies\n     \u003Cframework-clone>        → user's local clone of apache\u002Fmagpie\n                                (separate from .apache-magpie\u002F, which is a gitignored snapshot)\n     \u003Cframework-fork>         → user's GitHub fork of apache\u002Fmagpie\n                                (where the PR branch gets pushed) -->\n\n# setup-override-upstream\n\nThis skill turns a *local override* into a *framework feature*.\nIt takes one `.apache-magpie-overrides\u002F\u003Cskill>.md` file in an adopter repo, helps the user decide whether the change is worth upstreaming, designs the framework-level abstraction, implements it in `apache\u002Fmagpie`, and opens a PR.\n\nOverrides (per [`docs\u002Fsetup\u002Fagentic-overrides.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md)) are deliberately *agentic* and *adopter-local*: no schema, no anchors, no patch tool.\nThat makes them quick to write but hard to share, since every adopter who wants the same behaviour writes their own.\n**Upstreaming** is the escape hatch: when an override starts looking like a missing feature, a PR bakes it into the framework default, and every adopter gets it on their next `setup update`.\n\n## Adopter overrides\n\n\u003C!-- BEGIN MAGPIE BLOCK: adopter-overrides — generated from tools\u002Fdev\u002Fblocks\u002Fadopter-overrides.md -->\n\nBefore running its default behaviour, this skill consults\n`setup-override-upstream.md` in the personal layer\n(`.apache-magpie-local\u002F` when the project adopted Magpie, falling back to the main checkout's in a linked worktree,\nor `\u003Cgit-common-dir>\u002Fapache-magpie\u002F` when Magpie is only installed; applied first, wins on conflict) and\n[`.apache-magpie-overrides\u002Fsetup-override-upstream.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md) (committed, project-wide)\nin the adopter repo, if present, and applies any agent-readable overrides it finds.\nSee [`docs\u002Fsetup\u002Fagentic-overrides.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md) for the contract.\n\n**Hard rule**: agents NEVER modify the snapshot under `\u003Cadopter-repo>\u002F.apache-magpie\u002F`.\nLocal modifications go in the override file; framework changes go via PR to `apache\u002Fmagpie`.\n\n\u003C!-- END MAGPIE BLOCK: adopter-overrides -->\n\n---\n\n## Golden rules\n\n**Golden rule 1 — not every override should be upstreamed.**\nMany overrides encode *project-specific* choices: canned-response wording, the scope-label taxonomy, a milestone-format regex, a tone-of-voice preference.\nThese stay in the adopter repo.\nThe skill walks through this decision explicitly and stops early if the change does not generalise.\n\n**Golden rule 2 — write to `\u003Cframework-clone>`, never to\nthe snapshot.**\nThe framework PR is implemented in the user's local apache-magpie clone, a separate working directory from the adopter's gitignored, read-only `.apache-magpie\u002F` snapshot.\nIf the user has no clone yet, the skill helps set one up.\n\n**Golden rule 3 — assistant proposes, user fires.**\nPer the framework convention (see [`AGENTS.md`](..\u002F..\u002F..\u002F..\u002FAGENTS.md)), every state-changing action (clone, branch, commit, push, `gh pr create`) is proposed and runs only on explicit user confirmation.\nPublic PR content is shown to the user before it is posted.\n\n**Golden rule 4 — decouple PR from override deletion.**\nOpening the framework PR is one step.\nDeleting the now-redundant override file is a separate step, AFTER the PR has merged AND the adopter has run `setup update` to pick up the change.\nThe skill ends with a pointer at that cleanup; it does not delete the override preemptively.\n\n## Walk-through\n\n### Step 0 — Pre-flight\n\n1. We are in an adopter repo (has `\u003Cadopter-repo>\u002F.apache-magpie.lock` and `\u003Cadopter-repo>\u002F.apache-magpie-overrides\u002F`).\n   If not, stop — the skill is for adopters with at least one override file.\n2. The snapshot is current (no drift per the section above).\n   If drift exists, propose `setup update` first.\n3. Identify `\u003Cframework-clone>`, the user's local clone of `apache\u002Fmagpie`.\n   Common locations: `~\u002Fcode\u002Fmagpie\u002F`, `~\u002Fwork\u002Fmagpie\u002F`.\n   If not found, ask the user where it is, or help them clone it (`git clone\n   git@github.com:apache\u002Fmagpie.git`).\n   The clone is **separate** from `\u003Cadopter-repo>\u002F.apache-magpie\u002F` (the snapshot).\n\n### Step 1 — Pick the override\n\nList `\u003Cadopter-repo>\u002F.apache-magpie-overrides\u002F*.md` (excluding the directory's own `README.md`).\nFor each, print the file name + first headline.\nAlso list `.apache-magpie-overrides\u002Ftools\u002Flocal-tracker\u002Fparsers\u002F*.py`: a body-field parser `setup config` generated is upstreamed as a format adapter, by [`cases\u002Fparser-adapters.md`](cases\u002Fparser-adapters.md).\n\n- **Zero overrides** → stop. There is nothing to upstream.\n- **One override** → auto-pick.\n- **Multiple** → ask the user which one to upstream this run.\n  The skill handles one override per invocation (clean PR, clean review).\n\n### Step 2 — Read the override + framework skill\n\nRead the chosen override file. Surface to the user:\n\n- Title + the override headlines (`### Override N — ...`)\n- The \"why\" paragraph if the file has one\n\nThen read the framework skill it modifies, from the snapshot at `\u003Cadopter-repo>\u002F.apache-magpie\u002Fskills\u002F\u003Cframework-skill>\u002F`.\nSurface:\n\n- The skill's purpose (frontmatter description)\n- The specific section(s) the override modifies (steps, decision-table rows, golden rules)\n- Any cross-skill references the override depends on\n\nGoal: the user and the agent both know *what* the change is and *where* it applies.\n\n**A `delegate:` block is never upstreamed.**\nIf the file's frontmatter carries one, it names a skill that exists only in the adopter's repository, so it is excluded: it is not part of the design, the diff, or the PR body, and the PR does not name the project's skill.\nSay so, and carry on with the `### Override` sections alone.\nA file that holds nothing but a delegate block has nothing generic to upstream: stop at Step 3.\nDelegation itself is already the framework's extension point ([`agentic-overrides.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md#delegate-to-the-projects-own-skill)); if the project's skill does something every adopter would want, design that as a change to the Magpie skill's own steps, described by what it does.\n\n### Step 3 — Decide if upstreamable\n\nWalk through with the user.\nCommon categories:\n\n- **Project-specific** (canned-response wording, scope labels, milestone formats, tooling assumptions particular to this project) → **stop here**.\n  Suggest the override stay local.\n  Generalising would force the framework either to include the adopter's specifics (defeats project-agnosticism) or to expose a config knob no other adopter would set the same way (bloats the contract).\n- **Missing feature** (the override does something useful any adopter might want) → **continue**.\n  The framework should learn this behaviour by default, or expose it as an opt-in.\n- **Better default** (the override changes a default the framework currently picks; if most adopters would prefer the override's default, the framework should adopt it) → **continue**.\n  The PR may also keep the old behaviour reachable via a flag.\n- **Refactor a step** (the framework's step is awkward \u002F redundant \u002F has an edge case) → **continue**.\n  The PR fixes the step itself.\n\nIf the user is unsure, lean toward **stop** — keep the override local until a second adopter wants the same thing.\n\n### Step 4 — Design the framework-level abstraction\n\nOnce the user confirms the change is upstreamable, design the framework-side change.\nPick one of:\n\n| Shape | When |\n|---|---|\n| **Add a config knob** in `\u003Cproject-config>\u002F` | The change is opt-in per-adopter; default behaviour is unchanged. |\n| **Change a default** | The new behaviour is better for the majority; the framework's existing default becomes a `\u003Cproject-config>\u002F` opt-out. |\n| **Add an optional step** | The change is an *additional* step (not a substitute for an existing one). |\n| **Refactor existing step** | The change rewrites how an existing step works. No new config; the new behaviour is universal. |\n\nSurface the proposal to the user and iterate.\nThe output is a concrete plan: which framework files to modify, what to add \u002F remove \u002F change, and which existing framework tests or verification may need updating.\n\n### Step 5 — Implement in the framework clone\n\nIn `\u003Cframework-clone>`:\n\n1. `git fetch origin && git checkout -b\n   feat\u002F\u003Cshort-description> origin\u002Fmain`\n2. Apply the changes from the design step.\n   Read the surrounding framework code first (the framework's `AGENTS.md`, the modified skill's supporting files) to match conventions.\n3. Run framework pre-commit: `prek run --all-files`.\n   Fix anything that fires.\n4. Show the user the diff (`git diff`).\n   Get explicit confirmation before committing.\n5. Commit with a message matching the framework's conventions (Conventional-Commits prefix: `feat(skills): ...` for new framework behaviour, `refactor(skills): ...` for restructure, etc.).\n   Add a `Generated-by: \u003Cagent> (\u003Cmodel>)` trailer with `git commit --trailer`, where `\u003Cagent>` and `\u003Cmodel>` are the actual agent and model you are running as (e.g. `Claude (Opus 4.8)`, `OpenCode (Big Pickle)`).\n   It is the framework repository's own convention ([`commit-attribution.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fcommit-attribution.md)), whatever the adopter uses; do not hardcode either value, per the framework's no-coauthored-by hook.\n\n### Step 6 — Open the PR\n\n1. `git push -u \u003Cfork-remote> feat\u002F\u003Cbranch>`.\n   If no fork remote is configured, help the user add one (`git remote add fork \u003Cuser>\u002Fmagpie.git`).\n2. Draft the PR title + body. Include:\n   - **Summary** — what the change is, in 1–3 bullets.\n   - **Motivation** — link to the originating override file in the adopter repo (the user's project), with enough context that the framework reviewer understands the use case without reading the full override.\n   - **Migration path for existing adopters** — if the change introduces a new config knob, explain the default; if it changes a default, explain how adopters opt out.\n   - **Test plan** — what the user verified locally.\n\n   **Adversarial review by other models.** Run it now, per [pre-pr-adversarial-review.md](pre-pr-adversarial-review.md).\n3. **Confirm with the user before posting**.\n   Show the exact title + body.\n   Wait for \"OK to post\" \u002F \"yes\" \u002F \"send\" \u002F similar before running `gh pr create`.\n4. **Pick the labels.** Every framework PR carries at least one `family:*` and one `capability:*` label per [`docs\u002Flabels-and-capabilities.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Flabels-and-capabilities.md).\n   The override is upstreaming a change to skill `\u003Cskill>`, so:\n   - `family:*` — follow the skill's family (`family:pr-management` for `pr-management-*`, `family:security` for `security-*`, `family:setup` for `setup-*`, `family:issue` for `issue-*`, etc.).\n   - `capability:*` — the capability the change is *implementing*, not the file paths touched.\n     Look it up in the skill-to-capability map at [`docs\u002Flabels-and-capabilities.md#capability-to-skill-map`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Flabels-and-capabilities.md#capability-to-skill-map).\n   - Add `kind:*` and `mode:*` when they apply per the same doc.\n\n   Show the chosen labels in the confirmation preview alongside the PR title and body, so the user sees them before posting.\n\n5. Write the PR body to a tempfile first, then create the PR:\n   ```bash\n   # Write tool: file_path: \u002Ftmp\u002Foverride-pr-body.md, content: \u003CPR body>\n   gh pr create --repo apache\u002Fmagpie --base main \\\n     --head \u003Cuser>:\u003Cbranch> --title \"...\" --body-file \u002Ftmp\u002Foverride-pr-body.md \\\n     --label \"family:\u003Cfamily>\" --label \"capability:\u003Ccapability>\"\n   ```\n\n### Step 7 — Post-PR cleanup pointer\n\nAfter the PR is open, surface to the user:\n\n```text\nFramework PR opened: \u003CPR URL>\n\nNext steps once it merges:\n\n  1. setup update   (in \u003Cadopter-repo>)\n     - Bumps the snapshot to the new framework version.\n     - .apache-magpie.lock will reflect the new pin.\n  2. Delete .apache-magpie-overrides\u002F\u003Cskill>.md in \u003Cadopter-repo>\n     - The override is now redundant; the framework does\n       what the override used to do.\n  3. Commit the deletion + the bumped lock together.\n```\n\nThe skill **does not** delete the override file itself.\nDeletion happens after the PR merges, which the skill cannot predict (or whether reviewers accept it at all); it is the user's manual cleanup once the PR lands.\n\n## Output to the user (skill end)\n\n```text\n✓ Override picked:        .apache-magpie-overrides\u002F\u003Cskill>.md\n✓ Framework skill:        \u003Cframework-skill>\n✓ Decision:               upstreamable as \u003Cshape from Step 4>\n✓ Framework clone:        \u003Cframework-clone>\n✓ Branch:                 feat\u002F\u003Cshort-description>\n✓ Commits:                \u003Ccount>\n✓ PR opened:              \u003CPR URL>\n\nNext: wait for the PR to merge, then in \u003Cadopter-repo>:\n  setup update\n  rm .apache-magpie-overrides\u002F\u003Cskill>.md\n  git add -A && git commit -m \"Remove override \u003Cskill>: upstreamed in apache\u002Fmagpie#\u003CN>\"\n```\n\n## Failure modes\n\n| Symptom | Likely cause | Remediation |\n|---|---|---|\n| `\u003Cadopter-repo>` has no `.apache-magpie-overrides\u002F` | not adopted, or adopted without the overrides scaffold | run `setup install` (idempotent) |\n| Step 1 finds zero overrides | nothing to upstream — adopter has no local modifications recorded | stop |\n| `\u003Cframework-clone>` not found | user has not cloned `apache\u002Fmagpie` yet | help them clone, then resume |\n| Framework pre-commit fails after the implementation | the change does not match framework conventions | iterate with the user, re-run pre-commit, do not bypass with `--no-verify` |\n| User decides mid-flow that the override is project-specific after all | wrong call in Step 3 | stop without opening a PR; the override file in the adopter repo is unchanged, no harm done |\n\n## What this skill is NOT for\n\n- Not for *applying* an override at run-time — that is the per-skill pre-flight protocol in [`docs\u002Fsetup\u002Fagentic-overrides.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md).\n- Not for *creating* a new override — that is [`setup override \u003Cskill>`](..\u002Fsetup\u002Foverrides.md).\n- Not for *upgrading* the snapshot — that is [`setup update`](..\u002Fsetup\u002Fupdate.md).\n  Run that BEFORE this skill if drift exists.\n- Not for framework PRs unrelated to overrides.\n  Other contributions (new skill, new tool, refactor) go through the framework's normal PR workflow.\n\n## Cross-references\n\n- [`docs\u002Fsetup\u002Fagentic-overrides.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md) — the override contract.\n- [`setup\u002Foverrides.md`](..\u002Fsetup\u002Foverrides.md) — how to *create* \u002F *open* an override.\n- [`setup\u002Fupdate.md`](..\u002Fsetup\u002Fupdate.md) — how to upgrade the snapshot post-merge.\n","\u003C!-- SPDX-License-Identifier: Apache-2.0\n     https:\u002F\u002Fwww.apache.org\u002Flegal\u002Frelease-policy.html -->\n\n\u003C!-- Placeholder convention (see ..\u002F..\u002FAGENTS.md#placeholder-convention-used-in-skill-files):\n     \u003Cadopter-repo>           → repo this skill is being run in (an adopter)\n     \u003Coverride-file>          → .apache-magpie-overrides\u002F\u003Cskill>.md being upstreamed\n     \u003Cframework-skill>        → framework skill the override modifies\n     \u003Cframework-clone>        → user's local clone of apache\u002Fmagpie\n                                (separate from .apache-magpie\u002F, which is a gitignored snapshot)\n     \u003Cframework-fork>         → user's GitHub fork of apache\u002Fmagpie\n                                (where the PR branch gets pushed) -->\n\n# setup-override-upstream\n\nThis skill turns a *local override* into a *framework feature*.\nIt takes one `.apache-magpie-overrides\u002F\u003Cskill>.md` file in an adopter repo, helps the user decide whether the change is worth upstreaming, designs the framework-level abstraction, implements it in `apache\u002Fmagpie`, and opens a PR.\n\nOverrides (per [`docs\u002Fsetup\u002Fagentic-overrides.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md)) are deliberately *agentic* and *adopter-local*: no schema, no anchors, no patch tool.\nThat makes them quick to write but hard to share, since every adopter who wants the same behaviour writes their own.\n**Upstreaming** is the escape hatch: when an override starts looking like a missing feature, a PR bakes it into the framework default, and every adopter gets it on their next `setup update`.\n\n## Adopter overrides\n\n\u003C!-- BEGIN MAGPIE BLOCK: adopter-overrides — generated from tools\u002Fdev\u002Fblocks\u002Fadopter-overrides.md -->\n\nBefore running its default behaviour, this skill consults\n`setup-override-upstream.md` in the personal layer\n(`.apache-magpie-local\u002F` when the project adopted Magpie, falling back to the main checkout's in a linked worktree,\nor `\u003Cgit-common-dir>\u002Fapache-magpie\u002F` when Magpie is only installed; applied first, wins on conflict) and\n[`.apache-magpie-overrides\u002Fsetup-override-upstream.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md) (committed, project-wide)\nin the adopter repo, if present, and applies any agent-readable overrides it finds.\nSee [`docs\u002Fsetup\u002Fagentic-overrides.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md) for the contract.\n\n**Hard rule**: agents NEVER modify the snapshot under `\u003Cadopter-repo>\u002F.apache-magpie\u002F`.\nLocal modifications go in the override file; framework changes go via PR to `apache\u002Fmagpie`.\n\n\u003C!-- END MAGPIE BLOCK: adopter-overrides -->\n\n---\n\n## Golden rules\n\n**Golden rule 1 — not every override should be upstreamed.**\nMany overrides encode *project-specific* choices: canned-response wording, the scope-label taxonomy, a milestone-format regex, a tone-of-voice preference.\nThese stay in the adopter repo.\nThe skill walks through this decision explicitly and stops early if the change does not generalise.\n\n**Golden rule 2 — write to `\u003Cframework-clone>`, never to\nthe snapshot.**\nThe framework PR is implemented in the user's local apache-magpie clone, a separate working directory from the adopter's gitignored, read-only `.apache-magpie\u002F` snapshot.\nIf the user has no clone yet, the skill helps set one up.\n\n**Golden rule 3 — assistant proposes, user fires.**\nPer the framework convention (see [`AGENTS.md`](..\u002F..\u002F..\u002F..\u002FAGENTS.md)), every state-changing action (clone, branch, commit, push, `gh pr create`) is proposed and runs only on explicit user confirmation.\nPublic PR content is shown to the user before it is posted.\n\n**Golden rule 4 — decouple PR from override deletion.**\nOpening the framework PR is one step.\nDeleting the now-redundant override file is a separate step, AFTER the PR has merged AND the adopter has run `setup update` to pick up the change.\nThe skill ends with a pointer at that cleanup; it does not delete the override preemptively.\n\n## Walk-through\n\n### Step 0 — Pre-flight\n\n1. We are in an adopter repo (has `\u003Cadopter-repo>\u002F.apache-magpie.lock` and `\u003Cadopter-repo>\u002F.apache-magpie-overrides\u002F`).\n   If not, stop — the skill is for adopters with at least one override file.\n2. The snapshot is current (no drift per the section above).\n   If drift exists, propose `setup update` first.\n3. Identify `\u003Cframework-clone>`, the user's local clone of `apache\u002Fmagpie`.\n   Common locations: `~\u002Fcode\u002Fmagpie\u002F`, `~\u002Fwork\u002Fmagpie\u002F`.\n   If not found, ask the user where it is, or help them clone it (`git clone\n   git@github.com:apache\u002Fmagpie.git`).\n   The clone is **separate** from `\u003Cadopter-repo>\u002F.apache-magpie\u002F` (the snapshot).\n\n### Step 1 — Pick the override\n\nList `\u003Cadopter-repo>\u002F.apache-magpie-overrides\u002F*.md` (excluding the directory's own `README.md`).\nFor each, print the file name + first headline.\nAlso list `.apache-magpie-overrides\u002Ftools\u002Flocal-tracker\u002Fparsers\u002F*.py`: a body-field parser `setup config` generated is upstreamed as a format adapter, by [`cases\u002Fparser-adapters.md`](cases\u002Fparser-adapters.md).\n\n- **Zero overrides** → stop. There is nothing to upstream.\n- **One override** → auto-pick.\n- **Multiple** → ask the user which one to upstream this run.\n  The skill handles one override per invocation (clean PR, clean review).\n\n### Step 2 — Read the override + framework skill\n\nRead the chosen override file. Surface to the user:\n\n- Title + the override headlines (`### Override N — ...`)\n- The \"why\" paragraph if the file has one\n\nThen read the framework skill it modifies, from the snapshot at `\u003Cadopter-repo>\u002F.apache-magpie\u002Fskills\u002F\u003Cframework-skill>\u002F`.\nSurface:\n\n- The skill's purpose (frontmatter description)\n- The specific section(s) the override modifies (steps, decision-table rows, golden rules)\n- Any cross-skill references the override depends on\n\nGoal: the user and the agent both know *what* the change is and *where* it applies.\n\n**A `delegate:` block is never upstreamed.**\nIf the file's frontmatter carries one, it names a skill that exists only in the adopter's repository, so it is excluded: it is not part of the design, the diff, or the PR body, and the PR does not name the project's skill.\nSay so, and carry on with the `### Override` sections alone.\nA file that holds nothing but a delegate block has nothing generic to upstream: stop at Step 3.\nDelegation itself is already the framework's extension point ([`agentic-overrides.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md#delegate-to-the-projects-own-skill)); if the project's skill does something every adopter would want, design that as a change to the Magpie skill's own steps, described by what it does.\n\n### Step 3 — Decide if upstreamable\n\nWalk through with the user.\nCommon categories:\n\n- **Project-specific** (canned-response wording, scope labels, milestone formats, tooling assumptions particular to this project) → **stop here**.\n  Suggest the override stay local.\n  Generalising would force the framework either to include the adopter's specifics (defeats project-agnosticism) or to expose a config knob no other adopter would set the same way (bloats the contract).\n- **Missing feature** (the override does something useful any adopter might want) → **continue**.\n  The framework should learn this behaviour by default, or expose it as an opt-in.\n- **Better default** (the override changes a default the framework currently picks; if most adopters would prefer the override's default, the framework should adopt it) → **continue**.\n  The PR may also keep the old behaviour reachable via a flag.\n- **Refactor a step** (the framework's step is awkward \u002F redundant \u002F has an edge case) → **continue**.\n  The PR fixes the step itself.\n\nIf the user is unsure, lean toward **stop** — keep the override local until a second adopter wants the same thing.\n\n### Step 4 — Design the framework-level abstraction\n\nOnce the user confirms the change is upstreamable, design the framework-side change.\nPick one of:\n\n| Shape | When |\n|---|---|\n| **Add a config knob** in `\u003Cproject-config>\u002F` | The change is opt-in per-adopter; default behaviour is unchanged. |\n| **Change a default** | The new behaviour is better for the majority; the framework's existing default becomes a `\u003Cproject-config>\u002F` opt-out. |\n| **Add an optional step** | The change is an *additional* step (not a substitute for an existing one). |\n| **Refactor existing step** | The change rewrites how an existing step works. No new config; the new behaviour is universal. |\n\nSurface the proposal to the user and iterate.\nThe output is a concrete plan: which framework files to modify, what to add \u002F remove \u002F change, and which existing framework tests or verification may need updating.\n\n### Step 5 — Implement in the framework clone\n\nIn `\u003Cframework-clone>`:\n\n1. `git fetch origin && git checkout -b\n   feat\u002F\u003Cshort-description> origin\u002Fmain`\n2. Apply the changes from the design step.\n   Read the surrounding framework code first (the framework's `AGENTS.md`, the modified skill's supporting files) to match conventions.\n3. Run framework pre-commit: `prek run --all-files`.\n   Fix anything that fires.\n4. Show the user the diff (`git diff`).\n   Get explicit confirmation before committing.\n5. Commit with a message matching the framework's conventions (Conventional-Commits prefix: `feat(skills): ...` for new framework behaviour, `refactor(skills): ...` for restructure, etc.).\n   Add a `Generated-by: \u003Cagent> (\u003Cmodel>)` trailer with `git commit --trailer`, where `\u003Cagent>` and `\u003Cmodel>` are the actual agent and model you are running as (e.g. `Claude (Opus 4.8)`, `OpenCode (Big Pickle)`).\n   It is the framework repository's own convention ([`commit-attribution.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fcommit-attribution.md)), whatever the adopter uses; do not hardcode either value, per the framework's no-coauthored-by hook.\n\n### Step 6 — Open the PR\n\n1. `git push -u \u003Cfork-remote> feat\u002F\u003Cbranch>`.\n   If no fork remote is configured, help the user add one (`git remote add fork \u003Cuser>\u002Fmagpie.git`).\n2. Draft the PR title + body. Include:\n   - **Summary** — what the change is, in 1–3 bullets.\n   - **Motivation** — link to the originating override file in the adopter repo (the user's project), with enough context that the framework reviewer understands the use case without reading the full override.\n   - **Migration path for existing adopters** — if the change introduces a new config knob, explain the default; if it changes a default, explain how adopters opt out.\n   - **Test plan** — what the user verified locally.\n\n   **Adversarial review by other models.** Run it now, per [pre-pr-adversarial-review.md](pre-pr-adversarial-review.md).\n3. **Confirm with the user before posting**.\n   Show the exact title + body.\n   Wait for \"OK to post\" \u002F \"yes\" \u002F \"send\" \u002F similar before running `gh pr create`.\n4. **Pick the labels.** Every framework PR carries at least one `family:*` and one `capability:*` label per [`docs\u002Flabels-and-capabilities.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Flabels-and-capabilities.md).\n   The override is upstreaming a change to skill `\u003Cskill>`, so:\n   - `family:*` — follow the skill's family (`family:pr-management` for `pr-management-*`, `family:security` for `security-*`, `family:setup` for `setup-*`, `family:issue` for `issue-*`, etc.).\n   - `capability:*` — the capability the change is *implementing*, not the file paths touched.\n     Look it up in the skill-to-capability map at [`docs\u002Flabels-and-capabilities.md#capability-to-skill-map`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Flabels-and-capabilities.md#capability-to-skill-map).\n   - Add `kind:*` and `mode:*` when they apply per the same doc.\n\n   Show the chosen labels in the confirmation preview alongside the PR title and body, so the user sees them before posting.\n\n5. Write the PR body to a tempfile first, then create the PR:\n   ```bash\n   # Write tool: file_path: \u002Ftmp\u002Foverride-pr-body.md, content: \u003CPR body>\n   gh pr create --repo apache\u002Fmagpie --base main \\\n     --head \u003Cuser>:\u003Cbranch> --title \"...\" --body-file \u002Ftmp\u002Foverride-pr-body.md \\\n     --label \"family:\u003Cfamily>\" --label \"capability:\u003Ccapability>\"\n   ```\n\n### Step 7 — Post-PR cleanup pointer\n\nAfter the PR is open, surface to the user:\n\n```text\nFramework PR opened: \u003CPR URL>\n\nNext steps once it merges:\n\n  1. setup update   (in \u003Cadopter-repo>)\n     - Bumps the snapshot to the new framework version.\n     - .apache-magpie.lock will reflect the new pin.\n  2. Delete .apache-magpie-overrides\u002F\u003Cskill>.md in \u003Cadopter-repo>\n     - The override is now redundant; the framework does\n       what the override used to do.\n  3. Commit the deletion + the bumped lock together.\n```\n\nThe skill **does not** delete the override file itself.\nDeletion happens after the PR merges, which the skill cannot predict (or whether reviewers accept it at all); it is the user's manual cleanup once the PR lands.\n\n## Output to the user (skill end)\n\n```text\n✓ Override picked:        .apache-magpie-overrides\u002F\u003Cskill>.md\n✓ Framework skill:        \u003Cframework-skill>\n✓ Decision:               upstreamable as \u003Cshape from Step 4>\n✓ Framework clone:        \u003Cframework-clone>\n✓ Branch:                 feat\u002F\u003Cshort-description>\n✓ Commits:                \u003Ccount>\n✓ PR opened:              \u003CPR URL>\n\nNext: wait for the PR to merge, then in \u003Cadopter-repo>:\n  setup update\n  rm .apache-magpie-overrides\u002F\u003Cskill>.md\n  git add -A && git commit -m \"Remove override \u003Cskill>: upstreamed in apache\u002Fmagpie#\u003CN>\"\n```\n\n## Failure modes\n\n| Symptom | Likely cause | Remediation |\n|---|---|---|\n| `\u003Cadopter-repo>` has no `.apache-magpie-overrides\u002F` | not adopted, or adopted without the overrides scaffold | run `setup install` (idempotent) |\n| Step 1 finds zero overrides | nothing to upstream — adopter has no local modifications recorded | stop |\n| `\u003Cframework-clone>` not found | user has not cloned `apache\u002Fmagpie` yet | help them clone, then resume |\n| Framework pre-commit fails after the implementation | the change does not match framework conventions | iterate with the user, re-run pre-commit, do not bypass with `--no-verify` |\n| User decides mid-flow that the override is project-specific after all | wrong call in Step 3 | stop without opening a PR; the override file in the adopter repo is unchanged, no harm done |\n\n## What this skill is NOT for\n\n- Not for *applying* an override at run-time — that is the per-skill pre-flight protocol in [`docs\u002Fsetup\u002Fagentic-overrides.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md).\n- Not for *creating* a new override — that is [`setup override \u003Cskill>`](..\u002Fsetup\u002Foverrides.md).\n- Not for *upgrading* the snapshot — that is [`setup update`](..\u002Fsetup\u002Fupdate.md).\n  Run that BEFORE this skill if drift exists.\n- Not for framework PRs unrelated to overrides.\n  Other contributions (new skill, new tool, refactor) go through the framework's normal PR workflow.\n\n## Cross-references\n\n- [`docs\u002Fsetup\u002Fagentic-overrides.md`](..\u002F..\u002F..\u002F..\u002Fdocs\u002Fsetup\u002Fagentic-overrides.md) — the override contract.\n- [`setup\u002Foverrides.md`](..\u002Fsetup\u002Foverrides.md) — how to *create* \u002F *open* an override.\n- [`setup\u002Fupdate.md`](..\u002Fsetup\u002Fupdate.md) — how to upgrade the snapshot post-merge.\n",{"mode":44,"name":5,"family":49,"license":16,"capability":57,"description":7,"when_to_use":58,"surface_hash":59,"argument-hint":60,"measured_tokens":61},"capability:platform","When the user wants a local override contributed back to the framework — typically after living with it for a while and deciding it belongs upstream.","sha256:6aa9dd2488726450","[skill-name]",3773,"main","d594f578d34fc8482d2e4d633961a37687048c2d","plugins\u002Fmagpie-setup\u002Fskills\u002Foverride-upstream",127,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie","https:\u002F\u002Fmagpie.apache.org\u002F","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-15 00:32:58",{"source":9,"skillName":5,"commands":72,"prompt":82,"zipAvailable":83},[73,76,79],{"tool":74,"command":75},"npx","npx skills add apache\u002Fmagpie --skill override-upstream",{"tool":77,"command":78},"bunx","bunx skills add apache\u002Fmagpie --skill override-upstream",{"tool":80,"command":81},"pnpm","pnpm dlx skills add apache\u002Fmagpie --skill override-upstream","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-setup\u002Fskills\u002Foverride-upstream\u002FSKILL.md",true,[85,91],{"path":86,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":90},"cases\u002Fparser-adapters.md","REFERENCE","参考文档",2109,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-setup\u002Fskills\u002Foverride-upstream\u002Fcases\u002Fparser-adapters.md",{"path":92,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":93,"sourceHtmlUrl":94},"pre-pr-adversarial-review.md",5058,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-setup\u002Fskills\u002Foverride-upstream\u002Fpre-pr-adversarial-review.md",[96,119,143,164,185,214],{"skillNo":97,"name":98,"nameZh":17,"description":99,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":52},"01M70JNYMCY5EEWYWDN30WKDJ4","upgrade","Upgrade Magpie in one run: move to the new version if needed (`setup update`), check this machine and project, apply one approved plan, re-check, and print exact commands for what is out of reach.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-setup\u002Fskills\u002Fupgrade\u002FSKILL.md",[],[98,103,47,46,104,105,106,107,44,108,109,110,111,112,113,114,115,116,117,118],"notice","project","re","move","session","machine","yes","new","version","apply","print","check","last","plan","run","update",{"skillNo":120,"name":121,"nameZh":17,"description":122,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":52},"01M70JJBSW3XE35BAXQ1VTA9SV","dependency-vulnerability-audit","Read-only dependency vulnerability audit for one repository or a local\ncheckout. Detects the project's dependency manager(s), runs the\nappropriate audit tool, surfaces patchable findings grouped by severity,\nand proposes upgrades for maintainer review. Never modifies manifests or\nlock files and never opens update PRs.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-repo-health\u002Fskills\u002Fdependency-vulnerability-audit\u002FSKILL.md",[],[126,127,128,129,130,131,132,133,104,134,33,135,136,137,138,35,139,140,141,142],"vulnerability","audit","dependency","dependency vulnerability audit","never","checkout","chain","scope","dependency manager","only","files","invoke","manifests","ask","patch","hand","review",{"skillNo":144,"name":145,"nameZh":17,"description":146,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":52},"01M70JGBWHKMB7V6T7QWT6G5DQ","thread-mentor","Draft a teaching-register comment on a GitHub issue or PR thread on the\nconfigured `\u003Cupstream>` repo, aimed at a contributor missing context the\nmaintainer would spell out. Reads the thread, decides\nwhether an intervention is warranted, drafts one comment per the tone\nguide and convention pointers, and waits for explicit confirmation before\nposting via `gh`. Escalates on the four hand-off triggers.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-pr-management\u002Fskills\u002Fthread-mentor\u002FSKILL.md",[],[150,151,152,104,153,154,137,155,156,35,157,139,158,141,142,159,160,161,162,163],"thread mentor","mentor","thread","repro","confirmation","pr-management","contributor","number","teaching","at","config","drafts","flags","spell",{"skillNo":165,"name":166,"nameZh":17,"description":167,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":52},"01M70JF866SAVGXSSC33HRX4ZG","merge-candidates","Identify trivial, low-risk PRs in the `ready for maintainer review` queue\nof \u003Cupstream> that pass every quality gate and touch only supplementary\nareas (docs, changelog, translations, tests) — the \"express lane\".\nSurfaces and ranks candidates with per-PR diff summaries, an\nall-gates-green attestation, and the exact merge command. On explicit\nper-PR confirmation it can submit an APPROVE review, exactly as\npr-management-code-review does. It never merges itself — automated merge\nis the deliberately-deferred Agentic Autonomous mode.","https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-pr-management\u002Fskills\u002Fmerge-candidates\u002FSKILL.md",[],[171,172,173,174,175,130,176,177,104,178,179,180,135,181,154,137,155,182,183,184],"merge candidates","merge","ready","quick","show","green","submit","churn","attestation","mode","autonomous","show me","agentic","code",{"skillNo":186,"name":187,"nameZh":188,"description":189,"descriptionZh":190,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":191,"categories":192,"keywords":199,"publishedAt":52},"01M6AD18GMVM1BEM31VF538R8A","generate-cve-json","CVE 5.x JSON 文档生成","Generate a CVE 5.x JSON document from an \u003Ctracker> tracking\nissue, ready to paste into the Vulnogram `#source` tab of the ASF CVE tool\nat https:\u002F\u002Fcveprocess.apache.org\u002Fcve5\u002F\u003CCVE-ID>#source. The conversion is\ndeterministic: same issue in, same JSON bytes out. Handles multiple\ncredits (one per line) and multiple references (URLs extracted from the\nissue's \"Public advisory URL\" and \"PR with the fix\" fields; the\n\"Security mailing list thread\" field is treated as internal-only and\nnever exported).","从 \u003Ctracker> 跟踪工单生成 CVE 5.x JSON 文档，可直接粘贴到 https:\u002F\u002Fcveprocess.apache.org\u002Fcve5\u002F\u003CCVE-ID>#source 处 ASF CVE 工具的 Vulnogram `#source` 标签页。该转换是确定性的：相同的工单输入总是产生完全相同的 JSON 字节输出。支持多条致谢信息（每行一条）和多个引用（URL 从工单的 \"Public advisory URL\" 和 \"PR with the fix\" 字段提取；\"Security mailing list thread\" 字段被视为仅内部使用，绝不导出）。","https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Ftools\u002Fcve-tool-vulnogram\u002Fgenerate-cve-json\u002FSKILL.md",[193,196],{"categoryNo":194,"categoryName":195,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98CYQ7TEW2D1MRQ00TE","安全公告与漏洞管理",{"categoryNo":197,"categoryName":198,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师",[200,201,202,203,10,118,173,130,204,135,205,206,207,208,209,210,211,212,213,159,137,35],"cve","generate","generate cve json","json","fix","either","URL","team","conversion","publish","references","tracker","paste","exported",{"skillNo":215,"name":216,"nameZh":217,"description":218,"descriptionZh":219,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":220,"categories":221,"keywords":226,"publishedAt":52},"01M6AD158PEPPPX9N33DASMRQ8","write-skill","Apache Magpie 技能编写与迁移","Write a new skill for the Apache Magpie framework, or bring an existing one up to current conventions. Scaffolds the directory, walks the house style and the prompt-injection defences, and validates before it ships.","为 Apache Magpie 框架编写新技能，或将现有技能更新至当前规范。它会搭建目录结构、引导遵循项目内部风格与提示注入防护措施，并在发布前进行验证。","https:\u002F\u002Fgithub.com\u002Fapache\u002Fmagpie\u002Fblob\u002Fmain\u002Fplugins\u002Fmagpie-utilities\u002Fskills\u002Fwrite-skill\u002FSKILL.md",[222,223],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":224,"categoryName":225,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理",[227,228,229,10,230,231,44,232,110,35,233,234,235,236,237,40,238,239,36,240],"write skill","write","create","directory","framework","up","optimize","authoring","injection","Utilities","new skill","add","existing skill","bring"]