agentleFS
softwareone-platformsoftwareone-platform/mpt-extension-skills/skills/mpt-ext-workflow-fix-dependabot-prs/SKILL.md

mpt-ext-workflow-fix-dependabot-prs

Skill3 starsChanged 4 months agoApache-2.0View on GitHub

Process open Dependabot PRs end to end: apply the shared dependency policy, validate, and push the fixes back to the same upstream branches for review.

  • Deletes or force-pushes
  • Commits and pushes

The file

Show its rules and text

We split this skill into the rules it gives an agent

27 rules. About 0 are common, 23 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈23

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Use these shared documents as the source of truth instead of restating their policy.

    line 38
  2. Distinctive:

    Read repository-specific docs when they exist, because they may extend or override shared guidance.

    line 52
  3. Distinctive:

    Read shared docs only when the repository explicitly points to them, using the resolution rule from Shared References.

    line 53
  4. Distinctive:

    If the user provided a PR number, inspect only that PR.

    line 56
  5. Distinctive:

    Read and classify each PR before changing anything.

    line 65
  6. Distinctive:

    Read PR metadata, changed files, and diff.

    line 66
  7. Distinctive:

    Verify the PR head branch is a Dependabot branch.

    line 67
  8. Distinctive:

    Verify the changed files are dependency-related before applying this workflow.

    line 68
  9. Distinctive:

    Use the analyzer bundled with the policy-fix task for repeatable classification:

    line 69
  10. Distinctive:

    Check out the exact Dependabot branch.

    line 81
  11. Distinctive:

    Check out the existing Dependabot branch directly.

    line 83
  12. Distinctive:

    Do not create a new work branch.

    line 92
  13. Distinctive:

    Keep the task scoped to dependency-policy files and dependency lock refresh.

    line 96
  14. Very specific:

    If the repository follows the shared validation guidance and uv.lock changed, run make build before make check-all.

    line 101
  15. Very specific:

    If validation fails, hand the failing output to mpt-ext-task-fix-repository-check-failures once.

    line 105
  16. Distinctive:

    After staging, check whether there are staged changes before amending:

    line 111
  17. Distinctive:

    If there are no staged changes, skip git commit --amend --no-edit and git push --force-with-lease, then report the PR as validated with no …

    line 118
  18. Distinctive:

    If staged changes exist, amend the existing Dependabot commit and push it back to the same upstream branch:

    line 119
  19. Distinctive:

    Do not create a new PR and do not push to a personal fork.

    line 126
  20. Distinctive:

    Never process non-Dependabot PRs with this workflow.

    line 140
  21. Distinctive:

    Never create new branches or pull requests for Dependabot remediation.

    line 141
  22. Distinctive:

    Never push fixes anywhere except the original Dependabot branch in upstream.

    line 142
  23. Very specific:

    Never restate or diverge from the dependency-policy rules that mpt-ext-task-dependabot-pr-policy-fix owns (broad pyproject.toml specifiers, …

    line 143
  24. Distinctive:

    Never continue to amend or push after failed validation unless the failure has been fixed and the required validation flow passes.

    line 144
  25. Distinctive:

    Never wrap a fix task that already owns its bounded loop in a second retry loop.

    line 145
  26. Distinctive:

    Never use validation auto-fix as permission to make unrelated product-code changes in a Dependabot PR.

    line 146
  27. Distinctive:

    Never run repository-required validation steps in parallel when the shared validation workflow requires a sequence.

    line 147

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Fix Dependabot PRs

Purpose

Coordinate the full SoftwareOne Dependabot PR remediation workflow for extension repositories.

Use When

  • The user wants to process one or more open Dependabot PRs in a softwareone-platform extension repository.
  • Dependabot PRs may need dependency-policy fixes before review or merge.
  • The workflow must validate the result and push fixes back to the original upstream Dependabot branches.
  • Validation failures may need scoped follow-up fixes before the branch can be published.

Do Not Use When

  • The PR is not authored by Dependabot.
  • The user wants to bump dependencies manually from a normal feature branch.
  • The task is only to apply the dependency policy fix to an already selected PR or checked-out branch.
  • The task requires changing shared dependency policy rather than applying it.
  • The repository does not follow the shared Python dependency-management and validation workflow.

Inputs

  • Target repository under the softwareone-platform organization.
  • Open Dependabot PR number, or permission to process all open Dependabot PRs in the repository.
  • GitHub authentication that can read PR metadata and push to Dependabot branches in the upstream repository.
  • Local Git checkout of the target upstream repository.
  • Repository dependency and validation workflow that follows the shared package guidance.
  • Python 3.12 or later is available as python3 for bundled deterministic scripts.

Shared References

Use these shared documents as the source of truth instead of restating their policy. When shared guidance is needed, resolve it from ${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current when available; otherwise read the same path from the main branch of the shared GitHub repository.

  • standards/packages-and-dependencies.md
  • knowledge/manage-dependencies.md
  • knowledge/build-and-checks.md
  • standards/pull-requests.md
  • skills/mpt-ext-task-dependabot-pr-policy-fix/SKILL.md
  • skills/mpt-ext-task-run-repository-checks/SKILL.md
  • skills/mpt-ext-task-fix-repository-check-failures/SKILL.md

Workflow

  1. Build repository context first.
  • Read the target repository AGENTS.md once per session. If you already loaded it earlier in this session and still have its full contents, reuse them instead of re-reading; if the context was summarized or you are unsure it is complete, read it again. Do not pre-load shared docs in this step; read them lazily only when the repository points to them.
  • Read repository-specific docs when they exist, because they may extend or override shared guidance.
  • Read shared docs only when the repository explicitly points to them, using the resolution rule from Shared References.
  1. Find the target Dependabot PRs.
  • If the user provided a PR number, inspect only that PR.
  • Otherwise list open Dependabot PRs in the upstream repository:
gh pr list --repo softwareone-platform/<repo> --state open --author 'dependabot[bot]' --limit 200 --json number,title,url,headRefName,baseRefName
  • Collect PR number, title, URL, head branch, and base branch.
  1. Read and classify each PR before changing anything.
  • Read PR metadata, changed files, and diff.
  • Verify the PR head branch is a Dependabot branch.
  • Verify the changed files are dependency-related before applying this workflow.
  • Use the analyzer bundled with the policy-fix task for repeatable classification:
python3 "${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current/skills/mpt-ext-task-dependabot-pr-policy-fix/scripts/analyze_dependabot_pr.py" \
  --metadata-json pr.json \
  --changed-files-json files.json \
  --diff-file pr.diff \
  --pretty
  • Skip PRs that are not Dependabot-authored, are not dependency-related, or have no relevant policy signal.
  1. Check out the exact Dependabot branch.
  • Fetch the base and head branches from upstream.
  • Check out the existing Dependabot branch directly.
  • Rebase the Dependabot branch on the latest base branch before editing:
git fetch origin <base-branch> <head-branch>
git checkout <head-branch>
git pull --rebase origin <base-branch>
  • Do not create a new work branch.
  1. Apply dependency-policy fixes.
  • Invoke mpt-ext-task-dependabot-pr-policy-fix for the selected PR or checked-out Dependabot branch.
  • Keep the task scoped to dependency-policy files and dependency lock refresh.
  • Record changed files and fixed rules for the final report.
  1. Run repository checks.
  • Invoke mpt-ext-task-run-repository-checks using the repository-defined validation flow.
  • If the repository follows the shared validation guidance and uv.lock changed, run make build before make check-all.
  • Preserve command output with the command that produced it.
  1. Fix actionable validation failures.
  • If validation fails, hand the failing output to mpt-ext-task-fix-repository-check-failures once; that task owns the bounded fix-and-rerun loop. Do not re-loop it from here.
  • Constrain the fix scope to failures clearly caused by the Dependabot dependency change, dependency lock refresh, pre-commit pin sync, or validation fallout from those files.
  • Act on its returned outcome: continue to publishing only on fixed; on any other outcome — including failures that are environment-related, unrelated to the Dependabot change, or that need a product or design decision — stop without committing or pushing and record the blocker.
  1. Amend and push to the same Dependabot branch.
  • Stage only files from the recorded changed-file list produced by the policy-fix and validation-fix steps.
  • After staging, check whether there are staged changes before amending:
git add <recorded-changed-file>...
git diff --cached --quiet
  • If there are no staged changes, skip git commit --amend --no-edit and git push --force-with-lease, then report the PR as validated with no publishable changes.
  • If staged changes exist, amend the existing Dependabot commit and push it back to the same upstream branch:
git commit --amend --no-edit
git push --force-with-lease origin <head-branch>
  • Do not create a new PR and do not push to a personal fork.
  1. Report results.
  • Record processed, skipped, fixed, pushed, and blocked PRs.
  • Include PR number and URL, status, fixed rules, changed files, validation commands and results, amended commit SHA, push result, and skip or blocker reasons.
  • Render the multi-PR report deterministically: collect the per-PR result objects into a JSON file and pass it to the bundled render_result.py for a stable Markdown summary.
python3 "${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current/skills/mpt-ext-workflow-fix-dependabot-prs/scripts/render_result.py" \
  --results-json results.json

Guardrails

  • Never process non-Dependabot PRs with this workflow.
  • Never create new branches or pull requests for Dependabot remediation.
  • Never push fixes anywhere except the original Dependabot branch in upstream.
  • Never restate or diverge from the dependency-policy rules that mpt-ext-task-dependabot-pr-policy-fix owns (broad pyproject.toml specifiers, opentelemetry-family bumps, opportunistic .pre-commit-config.yaml edits); delegate them to that task.
  • Never continue to amend or push after failed validation unless the failure has been fixed and the required validation flow passes.
  • Never wrap a fix task that already owns its bounded loop in a second retry loop; invoke it once per Dependabot PR, consume its classified outcome, and stop on anything other than success.
  • Never use validation auto-fix as permission to make unrelated product-code changes in a Dependabot PR.
  • Never run repository-required validation steps in parallel when the shared validation workflow requires a sequence.

Expected Outcome

Relevant open Dependabot PRs are fixed in their existing upstream branches, repository-required checks pass, amended Dependabot commits are pushed back for review, and skipped or blocked PRs are reported with precise reasons.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.