mpt-ext-task-dependabot-pr-policy-fix
Skill3 starsChanged 4 months agoApache-2.0View on GitHub
Apply dependency-policy fixes to a selected Dependabot PR or checked-out branch: sync dev dependency pins, revert opentelemetry-family bumps, and refresh the dependency lock.
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/mpt-extension-skills.mdcCursor rule
- mpt-ext-task-apply-dashboard-jira-decisionSkill
- mpt-ext-task-commit-changesSkill
- mpt-ext-task-create-initial-epicSkill
- mpt-ext-task-create-work-branchSkill
- mpt-ext-task-ensure-active-sprintSkill
- mpt-ext-task-fix-pre-commit-failuresSkill
- mpt-ext-task-fix-repository-check-failuresSkill
- mpt-ext-task-handle-pr-commentsSkill
- mpt-ext-task-move-jira-to-code-reviewSkill
- mpt-ext-task-move-jira-to-qaSkill
- mpt-ext-task-notify-pr-ready-in-teamsSkill
- mpt-ext-task-open-pull-requestSkill
- mpt-ext-task-run-repository-checksSkill
- mpt-ext-task-start-jira-workSkill
- mpt-ext-task-update-docs-from-changesSkill
- mpt-ext-task-write-documentationSkill
- mpt-ext-task-write-python-unittestsSkill
- mpt-ext-tool-gh-pr-opsSkill
- mpt-ext-tool-git-branch-opsSkill
- mpt-ext-tool-jira-workitem-opsSkill
- mpt-ext-tool-teams-send-messageSkill
- mpt-ext-workflow-address-review-feedbackSkill
- mpt-ext-workflow-complete-after-mergeSkill
- mpt-ext-workflow-dashboard-failure-triageSkill
- mpt-ext-workflow-decompose-tdrSkill
- mpt-ext-workflow-fix-dependabot-prsSkill
- mpt-ext-workflow-hotfix-backportSkill
- mpt-ext-workflow-notify-pr-readySkill
- mpt-ext-workflow-send-to-reviewSkill
- mpt-ext-workflow-skill-authoringSkill
- mpt-ext-workflow-start-workSkill
- mpt-ext-workflow-update-documentationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 11 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
Use these shared documents as the source of truth instead of restating their policy.
- Very specific: line 50
If a dev dependency changes in pyproject.toml or uv.lock, and the same tool is pinned or referenced in .pre-commit-config.yaml, update …
- Distinctive: line 61
Read repository-specific docs when they exist, because they may extend or override shared guidance.
- Distinctive: line 62
Read shared docs only when the repository explicitly points to them, using the resolution rule from Shared References.
- Distinctive: line 65
Verify the selected PR is authored by Dependabot, or verify the current branch is the selected Dependabot head branch.
- Distinctive: line 66
Verify the selected change is dependency-related before applying this task.
- Distinctive: line 67
If the PR has no relevant dependency policy issue, report it as no-op and do not edit files.
- Distinctive: line 68
Use the bundled analyzer to make deterministic PR classification and policy-signal detection repeatable:
- Very specific: line 79
Use the analyzer output fields is_dependabot, is_dependency_related, skip_reason, changed_dependency_files, opentelemetry_packages, …
- Distinctive: line 82
Use the analyzer output as the initial violation plan.
- Very specific: line 89
Update .pre-commit-config.yaml when the corresponding dev dependency changed.
- Distinctive: line 96
Leave validation, commit amendment, push, and multi-PR reporting to the workflow that invoked this task.
- Distinctive: line 100
Never process non-Dependabot PRs with this task.
- Distinctive: line 101
Never discover PRs, create branches, amend commits, push branches, or create pull requests from this task.
- Very specific: line 102
Never leave pyproject.toml dependency specifiers broader than the shared dependency policy allows.
- Very specific: line 103
Never keep Dependabot opentelemetry-family version bumps in the PR.
- Very specific: line 104
Never update .pre-commit-config.yaml opportunistically for unrelated tools.
- Distinctive: line 105
Never fix validation failures that are unrelated to the dependency-policy files handled by this task.
≈ “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.
Files
Dependabot PR Policy Fix
Purpose
Apply SoftwareOne dependency policy fixes to one already selected Dependabot PR or currently checked-out Dependabot branch in an extension repository.
Use When
- A specific Dependabot PR or Dependabot branch has already been selected.
- The selected PR changes Python dependencies in
pyproject.toml,uv.lock, or.pre-commit-config.yaml. - The work requires enforcing shared dependency policy on the dependency files only.
- A broader workflow will handle PR discovery, branch checkout, validation, commit amendment, and push.
Do Not Use When
- The PR is not authored by Dependabot.
- The user wants to bump dependencies manually from a normal feature branch.
- The repository does not follow the shared Python dependency-management and validation workflow.
- The task requires changing dependency policy itself rather than applying the existing policy.
- The user wants an end-to-end Dependabot PR processing workflow including discovery, checkout, validation, auto-fixing checks, commit amendment, and push.
Inputs
- Target repository under the
softwareone-platformorganization. - One selected Dependabot PR, or the current local checkout already positioned on the matching Dependabot branch.
- Analyzer inputs for the selected PR:
pr.json,files.json, andpr.diff. - 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
python3for the deterministic PR analysis script.
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.mdknowledge/manage-dependencies.mdknowledge/build-and-checks.mdstandards/pull-requests.md
Dependabot-Specific Policy
This task applies shared dependency policy with these Dependabot-specific additions:
- Dev dependency bumps must stay in sync with pre-commit:
- If a dev dependency changes in
pyproject.tomloruv.lock, and the same tool is pinned or referenced in.pre-commit-config.yaml, update.pre-commit-config.yamlin the same PR. - Examples commonly include linters, formatters, type checkers, and hook
additional_dependencies.
- Dependencies whose package name contains
opentelemetrymust not be bumped by Dependabot in this workflow:
- Match package names containing
opentelemetry, including names likeazure-monitor-opentelemetry-exporterand*-opentelemetry-*. - Restore matching dependency versions to the base branch version in both dependency declarations and lockfile entries.
Workflow
- Build repository context first.
- Read the target repository
AGENTS.mdonce 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.
- Confirm the selected Dependabot context.
- Verify the selected PR is authored by Dependabot, or verify the current branch is the selected Dependabot head branch.
- Verify the selected change is dependency-related before applying this task.
- If the PR has no relevant dependency policy issue, report it as no-op and do not edit files.
- Use the bundled analyzer to make deterministic PR classification and policy-signal detection repeatable:
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- For branch-only mode, generate equivalent
pr.json,files.json, andpr.difffrom the checked-out branch before running the analyzer. If those inputs cannot be generated, run a preflight check and stop with a clearmissing required analyzer inputsblocker instead of continuing from partial context. - Use the analyzer output fields
is_dependabot,is_dependency_related,skip_reason,changed_dependency_files,opentelemetry_packages,dev_dependency_indicators,pre_commit_sync_needed, andpyproject_policy_violations.
- Detect policy violations.
- Use the analyzer output as the initial violation plan.
- Inspect the implicated files directly before editing to confirm the deterministic findings in repository context.
- Record which shared or Dependabot-specific rules were violated.
- Apply fixes in place.
- Convert invalid
pyproject.tomldependency specifiers according to the shared dependency policy. - Revert all
*opentelemetry*dependency version changes to the base branch version. - Update
.pre-commit-config.yamlwhen the corresponding dev dependency changed. - Refresh
uv.lockthrough the target repository dependency-management workflow.
- Report the policy-fix result.
- State whether dependency-policy changes were applied or the selected PR was a no-op.
- List the changed files.
- List the violated or fixed rules.
- Leave validation, commit amendment, push, and multi-PR reporting to the workflow that invoked this task.
Guardrails
- Never process non-Dependabot PRs with this task.
- Never discover PRs, create branches, amend commits, push branches, or create pull requests from this task.
- Never leave
pyproject.tomldependency specifiers broader than the shared dependency policy allows. - Never keep Dependabot
opentelemetry-family version bumps in the PR. - Never update
.pre-commit-config.yamlopportunistically for unrelated tools. - Never fix validation failures that are unrelated to the dependency-policy files handled by this task.
Expected Outcome
The selected Dependabot PR or checked-out Dependabot branch has dependency-policy violations fixed in place, with changed files and applied rules reported clearly for the invoking workflow to validate and publish.
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.

