agentleFS
softwareone-platformsoftwareone-platform/mpt-extension-skills/skills/mpt-ext-task-fix-repository-check-failures/SKILL.md

mpt-ext-task-fix-repository-check-failures

Skill3 starsChanged 4 months agoApache-2.0View on GitHub

Fix failures from a standalone repository validation run (`make check`/`make test`), outside the `git commit` hook. Isolates one blocker at a time, applies the smallest fix, and reruns; max 5 iterations.

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈19

    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
  1. Very specific:

    Use this shared document as the source of truth instead of restating its guidance.

    line 44
  2. Distinctive:

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

    line 52
  3. Very specific:

    Read shared docs only when the repository explicitly points to them.

    line 53
  4. Distinctive:

    Read the failing validation result.

    line 55
  5. Distinctive:

    Start from the current failing command output instead of rerunning everything blindly.

    line 56
  6. Distinctive:

    Check for a stale-toolchain/config-parse failure first.

    line 60
  7. Very specific:

    If the failure matches this pattern, rebuild the local environment once using the repository's documented rebuild target (for example make …

    line 62
  8. Distinctive:

    If the rebuild resolves the failure, treat that check as passing and continue with the remaining required validation instead of entering …

    line 63
  9. Distinctive:

    If the failure does not match this pattern, or persists after the rebuild, proceed to the bounded fix loop starting at the next step.

    line 64
  10. Distinctive:

    Keep the fix scoped to the reported failure instead of opportunistically refactoring unrelated areas.

    line 68
  11. Distinctive:

    If the failing output is ambiguous, stop and inspect the implicated file or test before changing more code.

    line 69
  12. Distinctive:

    When the repository workflow requires a broader rerun before the work is considered clean, run the broader check after the targeted rerun …

    line 73
  13. Very specific:

    Before each attempt, state the iteration explicitly: Iteration N/5 — failing check: <command>.

    line 77
  14. Distinctive:

    Stop early, without consuming the remaining iterations, when there is no progress: the same check fails with the same error signature after …

    line 79
  15. Distinctive:

    Stop when all required validation passes, when the remaining failure needs user input, unavailable environment access, or a broader design …

    line 80
  16. Distinctive:

    Never guess the cause of a failure without reading the reported output first.

    line 95
  17. Distinctive:

    Never batch unrelated speculative fixes together when the validation output identifies a narrower blocker.

    line 96
  18. Distinctive:

    Never treat environment/setup failures as product-code failures.

    line 97
  19. Distinctive:

    Never run more than 5 validation-fix iterations before stopping with a blocker, and stop sooner when the loop stops converging.

    line 98
  20. Distinctive:

    Never spend a fix iteration on a config-parse/unknown-rule failure before attempting the single pre-loop rebuild described in Step 3.

    line 99
  21. Distinctive:

    Never rebuild more than once per failure before falling back to the bounded loop.

    line 100
  22. Distinctive:

    Never let the caller re-loop this task.

    line 101
  23. Distinctive:

    Never mix commit creation, PR creation, or Jira transitions into this task.

    line 102

≈ “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 Repository Check Failures

Purpose

Fix failing repository checks or tests in a controlled step-by-step loop until the required validation flow passes, the loop stops converging, a clear blocker remains, or 5 fix iterations have been attempted.

Use When

  • The repository validation flow has failed.
  • The user wants to work through local check or test failures one by one.
  • The task requires isolating the next actionable validation blocker before changing code or documentation.

Do Not Use When

  • The task is only to run checks without fixing failures.
  • The task is only to address pre-commit hook failures triggered during git commit.
  • The task is to create a commit or open a pull request.
  • The task is to guess fixes without reading the failing validation output first.

Inputs

  • Current failing validation output from the repository-required checks.
  • Repository validation rules from repo docs.
  • Current repository change scope.
  • Installed shared package root:
${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current

Assumptions

  • The target repository is available locally and the documented validation commands can be executed.
  • The failing validation output being handled matches the current repository state.
  • Repository-required tooling is installed or otherwise available before rerunning checks.

Shared References

Use this shared document as the source of truth instead of restating its guidance. 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.

  • knowledge/build-and-checks.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. Resolve those shared docs from ${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current when available; otherwise read them from the main branch of the shared GitHub repository.
  1. Read the failing validation result.
  • Start from the current failing command output instead of rerunning everything blindly.
  • Identify the first actionable failing check, test, or build step.
  • Separate true repository failures from environment or setup problems.
  1. Check for a stale-toolchain/config-parse failure first.
  • Before spending a fix iteration, check whether the failure matches the stale-toolchain/config-parse pattern in knowledge/build-and-checks.md: the validation tool fails on its own configuration or rejects an option/rule it does not recognize, rather than reporting a finding tied to a specific file, line, or test (for example a ruff "unknown rule selector" error right after switching to a branch that pins a different ruff version).
  • If the failure matches this pattern, rebuild the local environment once using the repository's documented rebuild target (for example make build), then rerun the failing check. This single rebuild-and-rerun attempt is not counted as one of the 5 fix iterations.
  • If the rebuild resolves the failure, treat that check as passing and continue with the remaining required validation instead of entering the fix loop for it.
  • If the failure does not match this pattern, or persists after the rebuild, proceed to the bounded fix loop starting at the next step.
  1. Fix one blocker at a time.
  • Apply the smallest change that addresses the current blocker.
  • Keep the fix scoped to the reported failure instead of opportunistically refactoring unrelated areas.
  • If the failing output is ambiguous, stop and inspect the implicated file or test before changing more code.
  1. Rerun the relevant validation.
  • Rerun the narrowest safe command that confirms the fix for the current blocker.
  • When the repository workflow requires a broader rerun before the work is considered clean, run the broader check after the targeted rerun passes.
  1. Repeat until clean, blocked, or the iteration limit is reached.
  • One iteration = one scoped fix + one targeted re-run of the affected check. A final full-suite confirmation run after the loop is not an iteration. The pre-loop rebuild-and-rerun attempt in Step 3 is not an iteration either.
  • Before each attempt, state the iteration explicitly: Iteration N/5 — failing check: <command>.
  • Continue through the next failing blocker only after the current one is resolved or explicitly understood.
  • Stop early, without consuming the remaining iterations, when there is no progress: the same check fails with the same error signature after a fix attempt, or a fix re-introduces a previously-passing check. Report it as a non-converging blocker.
  • Stop when all required validation passes, when the remaining failure needs user input, unavailable environment access, or a broader design decision, or after 5 fix iterations. Report the last failing command output as the blocker.
  1. Report the result clearly.
  • State which failures were fixed.
  • State which commands were rerun.
  • State what is still failing or blocked, if anything.
  • End with exactly one classified outcome the caller can act on, chosen by this precedence (success first):
    • fixed — the full required validation passes, even when reached on the final allowed iteration.
    • needs-user-input — a remaining failure needs user direction or a broader design decision.
    • environment-blocker — the remaining failure is environment or setup related, not product code.
    • non-converging — the same failure signature recurred after a fix, or a fix reintroduced a previously-passing check.
    • iteration-limit-reached — 5 fix iterations were spent without reaching any of the above.

Guardrails

  • Never guess the cause of a failure without reading the reported output first.
  • Never batch unrelated speculative fixes together when the validation output identifies a narrower blocker.
  • Never treat environment/setup failures as product-code failures.
  • Never run more than 5 validation-fix iterations before stopping with a blocker, and stop sooner when the loop stops converging.
  • Never spend a fix iteration on a config-parse/unknown-rule failure before attempting the single pre-loop rebuild described in Step 3.
  • Never rebuild more than once per failure before falling back to the bounded loop; a rebuild that does not resolve the failure is evidence of a real blocker, not a retry target.
  • Never let the caller re-loop this task; this task owns the bounded fix-and-rerun loop and returns a single classified outcome.
  • Never mix commit creation, PR creation, or Jira transitions into this task.

Expected Outcome

A stale-toolchain/config-parse failure is caught and resolved with a single pre-loop rebuild-and-rerun before any fix iteration is spent on it. Remaining repository validation failures are addressed one by one with scoped fixes and targeted reruns until the required checks pass, the loop stops converging, a precise blocker remains, or the 5-iteration limit is reached, and the task returns a single classified outcome (fixed, needs-user-input, environment-blocker, non-converging, or iteration-limit-reached) for the caller to act on.

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.