patch-upgrade
Skill188 starsChanged 10 days agoApache-2.0View on GitHub
Review every MetaX monkey patch with removal as the objective, using target upstream fixes, supported extension points and adapted local modules; minimize and justify any unavoidable retained patch.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- attention-upgradeSkill
- common-senseSkill
- csrc-upgradeSkill
- environment-checkSkill
- model-adaptationSkill
- model-upgradeSkill
- registry-upgradeSkill
- vllm-metax-model-trimSkill
- vllm-metax-upgradeSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Read the patch README, templates and existing AUDIT.md for repository conventions.
- Distinctive: line 24
Remove: if upstream fixed the issue, the path disappeared, the requirement no longer applies, or the completed local adaptation makes it …
- Distinctive: line 28
Retain only the irreducible difference: when the first two choices cannot preserve required behavior.
- Distinctive: line 34
Do not merely rename or relocate a monkey patch and call it removed.
- Very specific: line 43
Use the supported registry/CustomOp/hook for only the platform entries that need it.
- Very specific: line 46
Follow template decorator semantics.
- Distinctive: line 50
Read review-patterns.md for quantization arguments, tokenizer behavior, regional ordering, kernel and communication restrictions.
- Distinctive: line 55
Keep license/copyright and the repository's dedicated header on each Python file, including infrastructure.
- Very specific: line 68
Do not add long algorithm essays or mandatory examples to every patch.
- Distinctive: line 75
Verify removal retires activation and stale aliases.
- Very specific: line 81
Update the existing patch audit for every entry: remove/replace/retain outcome, target evidence, why removal was or was not possible, …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Patch Upgrade
Apply common-sense. This skill concerns vllm_metax/patch/;
normal model/backend/kernel adaptations do not inherit patch headers or audit requirements.
Read the patch README, templates and existing AUDIT.md for repository conventions.
Review every patch with removal as the objective
In a full upgrade, perform the complete patch pass after all framework and model source adaptation. The coordinator may permit an early narrowly scoped blocking repair with an explicit reason; re-review that patch during the final patch phase.
Inventory each replacement and activation path, including disabled files, direct
assignments, registry mutation, sys.modules redirects, aliases and aggregate imports.
Classify infrastructure separately. One file can contain multiple patch decisions.
For every patch establish the actual target, original purpose, current target CUDA
behavior, MACA restriction and all bound callers before deciding:
- Remove if upstream fixed the issue, the path disappeared, the requirement no longer applies, or the completed local adaptation makes it redundant.
- Replace with an existing supported extension point or the appropriate local implementation, then remove the monkey patch and overlapping activation.
- Retain only the irreducible difference when the first two choices cannot preserve required behavior. Explain why they failed. Simplify a full replacement to a narrow wrapper/hook where possible, preserving unaffected upstream behavior.
Challenge every retention. An old adaptation, disabled state or historical PR link is not a reason to keep or delete it; verify the actual target revision and trigger. Do not merely rename or relocate a monkey patch and call it removed. If removal needs a normal module repair, track that repair and consumer revalidation before final model validation. Never trade required MACA correctness for a smaller patch count.
Preserve exact bindings and semantics
- Resolve dynamic exports, inheritance, decorators and aliases to the real target.
A failed static lookup does not prove removal. Check old
from ... import ...bindings, descriptor behavior, repeated activation and fresh-process import order. - Use the supported registry/CustomOp/hook for only the platform entries that need it; preserve unrelated platforms and explicit inputs. A small wrapper delegates unchanged behavior to the target implementation.
- Follow template decorator semantics.
allow_missing=Trueis only for an intentional added compatibility attribute, never a renamed target or typo. - Preserve upstream validation, model branches, cleanup, lazy initialization and Triton decorator order. Inspect parameter meanings, not just matching names.
- Read review-patterns.md for quantization arguments, tokenizer behavior, regional ordering, kernel and communication restrictions.
Explain retained patches briefly
Keep license/copyright and the repository's dedicated header on each Python file, including infrastructure. Use concise factual text:
# -----------------------------------------------------------------------------
# Note: Concrete MACA restriction and why the target upstream path is insufficient.
#
# Affected versions: Evidence-backed scope and reviewed target revision.
#
# Remove at: Verifiable upstream/component condition that removes this restriction.
# -----------------------------------------------------------------------------Do not add long algorithm essays or mandatory examples to every patch. Preserve useful
existing/upstream comments; place detailed invariants, comparison examples and evidence
in AUDIT.md or tests. Infrastructure notes describe infrastructure without inventing
an upstream defect. Each retained patch needs a current reason and removal condition.
Patch acceptance
Verify removal retires activation and stale aliases; callers reach the intended original or supported local path. Verify retained patches bind the exact intended target in fresh processes. Use discriminating component cases for configuration overrides, state/batch ordering, quantization, layouts, kernel restrictions or descriptor behavior as applicable. Complete-model checks still wait for the coordinator's final validation phase.
Update the existing patch audit for every entry: remove/replace/retain outcome, target evidence, why removal was or was not possible, remaining minimal difference, activation and caller checks, removal condition and shared evidence links. Keep unrelated findings outside the patch audit. Source completion requires this final removal-first review, including patches repaired earlier.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

