AGENT SKILL
skilltta-task-guidance
暂无简介
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- skilltta-task-guidance
03 SKILL.md 正文
Maven Build Failure Repair Guidance
Scope
Fix build errors in a Java/Maven repository at /home/travis/build/failed/<repo>/<id>. Produce analysis notes, diff patches, and apply them.
Workflow
Step 1 — Analyze
lsthe repo root and locatepom.xml(root + any nested modules, including nested test projects referenced by integration tests).- Inspect
.travis.yml/travis_build.log(if present) and rootpom.xmlfor:<modules>list (identify nested/sub-projects, including test fixtures).- Declared Maven/JDK toolchain (
maven.compiler.source/target,java.version, enforcer rules). - Plugin versions pinned to EOL artifacts.
- Reproduce the failure deterministically before editing:
cdto the repo id directory.- Run
mvn -B -ntp -fae -e clean verify(or the goal used in CI). Capture first ERROR stack and the module path. - If a nested test project fails on its own lifecycle, re-run inside that submodule to isolate.
- Classify the root cause:
- Code: compile errors, missing import, API drift, generics, annotation processor (e.g., AutoValue/AutoService) output mismatch.
- Config: missing/incorrect dependency
<version>, wrong<scope>(e.g.,providedfor annotation processors should move toannotationProcessorPaths), plugin version, repository URL, Java release level, module not listed in parent<modules>.
- Write findings to
/home/travis/build/failed/failed_reasons.txtwith:- Failing module path, failing goal, exact error excerpt.
- Root cause classification + proposed fix list (file → change).
Step 2 — Propose Patches
- For each file to modify, create
/home/travis/build/failed/<repo>/<id>/patch_{i}.diffin unifiedgit diffformat:diff --git a/path/File.java b/path/File.java --- a/path/File.java +++ b/path/File.java @@ -L,N +L,N @@ - old + new - Keep each patch focused (one concern per diff). Prefer minimal changes.
- For nested test projects: patch the nested
pom.xmlAND, if the parent aggregates them, keep parent<modules>and dependencyManagement consistent. - For annotation-processor libraries (e.g., Google AutoValue, AutoService, Dagger): ensure both the API jar and processor jar are on the right path. Prefer:
<plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <annotationProcessorPaths> <path><groupId>…</groupId><artifactId>…</artifactId><version>…</version></path> </annotationProcessorPaths> </configuration> </plugin>
Step 3 — Apply & Verify
- Apply patches:
cd /home/travis/build/failed/<repo>/<id> && git apply --whitespace=nowarn patch_1.diff patch_2.diff …(orpatch -p1 < patch_i.diffif not a git repo). - Re-run the same Maven command used to reproduce. Iterate until BUILD SUCCESS.
- Also build any nested test module explicitly to confirm no regression:
mvn -pl <nested> -am -B verify.
Patterns Borrowed From Examples
- Iterate-match-act (like the file-move examples): walk candidate files (
pom.xml, failing.java), apply a regex/criterion (error signature), act (patch). Count/track fixes applied, mirroring themoved_files_countdiscipline — every change must be justified by a matched error. - Download-and-scan pattern: treat the build log as the "downloaded text",
grep -nE '\b(ERROR|BUILD FAILURE|cannot find symbol|package .* does not exist)\b'to enumerate occurrences before fixing. - Archive-processed pattern: once a file is patched, mark it (suffix in notes
_processed) so repeated passes do not re-edit it.
Guardrails
- Do not invent dependency versions; use versions already present in the repo's
dependencyManagementor sibling modules. - Do not reformat unrelated code.
- Do not add new modules unless an existing
<module>entry references a missing directory. - Never claim knowledge of a hidden reference fix; derive every change from observed errors + repo contents.
04 同仓库更多 Skills
video-frame-extraction
Extract frames from video files and save them as images using OpenCV
★ 0
openai-vision
Analyze images and multi-frame sequences using OpenAI GPT vision models
★ 0
image-ocr
Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms
★ 0
video-frame-extraction
Extract frames from video files and save them as images using OpenCV
★ 0
openai-vision
Analyze images and multi-frame sequences using OpenAI GPT vision models
★ 0
image-ocr
Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms
★ 0