一键导入
self-fix-loop
Self-learning fix loop - commit, push, monitor CI, auto-fix failures using swarm agents with skills on demand, loop until all checks pass.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Self-learning fix loop - commit, push, monitor CI, auto-fix failures using swarm agents with skills on demand, loop until all checks pass.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Coordinate multiple agents for software development across any language. Use for parallel execution of independent tasks, sequential chains with dependencies, swarm analysis from multiple perspectives, or iterative refinement loops. Handles Python, JavaScript, Java, Go, Rust, C#, and other languages.
Multi-step GOAP planning for complex audio pipeline development. Orchestrates analysis, decomposition, strategy selection, and execution with state persistence in plans/.
Generates DORA metrics and agent delivery reports from structured events.
Records agent execution events for lead time, success rate, and human intervention tracking.
Generic TRIZ analysis for identifying technical and physical contradictions in software architecture and pipelines.
Generic TRIZ solver for resolving architectural and technical contradictions using inventive principles.
| name | self-fix-loop |
| description | Self-learning fix loop - commit, push, monitor CI, auto-fix failures using swarm agents with skills on demand, loop until all checks pass. |
| version | 1.0 |
| template_version | 0.2 |
Automated self-learning cycle: commit → push → monitor → analyze failures → fix → retry until all GitHub Actions pass.
Continuous improvement loop that:
# Full loop with auto-fix
./scripts/self-fix-loop.sh
# With options
./scripts/self-fix-loop.sh --max-retries 5 --auto-research --fix-issues
# Dry run (simulate without push)
./scripts/self-fix-loop.sh --dry-run
# Convert a handoff into machine-readable agent tasks
./scripts/handoff-to-tasks.sh analysis/handoffs/self-fix-loop-iter-1-*.md
| Argument | Description | Default |
|---|---|---|
--max-retries N | Maximum fix iterations | 5 |
--auto-research | Use web research on failures | true |
--fix-issues | Attempt automatic fixes | true |
--strict-validation | ALL checks must pass | true |
--timeout SECONDS | Per-iteration timeout | 1800 |
--poll-interval SECONDS | CI check polling | 30 |
--dry-run | Simulate without pushing | false |
--base-branch BRANCH | Target branch | main |
[Start]
↓
Phase 1: COMMIT & PUSH
- Stage all changes
- Run quality gate
- Atomic commit
- Push to feature branch
↓
Phase 2: CREATE/UPDATE PR
- Create new PR or update existing
↓
Phase 3: MONITOR CI
- Poll GitHub Actions
- Wait for all checks complete
↓
Phase 4: ANALYZE FAILURES
- Identify failed checks
- Extract error messages
- Categorize failure type
↓
Phase 5: FIX (if failures)
- Generate parallel handoff bundle for swarm agents
- Route to relevant skills on demand
- Apply fixes
- Commit fix
↓
Phase 6: RETRY LOOP
- If retries remaining → Phase 1
- If max retries → FAIL
- If all pass → SUCCESS
| Failure Type | Skills Activated |
|---|---|
| Shell script errors | shell-script-quality |
| YAML syntax | cicd-pipeline |
| Python errors | code-quality |
| TypeScript/JS errors | code-quality |
| Markdown issues | markdownlint |
| Security warnings | security-code-auditor |
| Link/reference errors | validate-links.sh |
| Skill format issues | validate-skill-format.sh |
| Unknown errors | web-search-researcher + do-web-doc-resolver |
On each failure:
The script writes a handoff file under analysis/handoffs/ with:
Use scripts/handoff-to-tasks.sh to convert the handoff markdown into JSON task payloads for fixer-agent automation.
scripts/self-fix-loop.sh now exists and supports loop orchestration, PR checks monitoring, failure classification, and handoff bundle generation.cargo fmt, optional shfmt).SELF_FIX_LOOP_MAX_RETRIES=5
SELF_FIX_LOOP_TIMEOUT=1800
SELF_FIX_LOOP_POLL_INTERVAL=30
SELF_FIX_LOOP_AUTO_RESEARCH=1
SELF_FIX_LOOP_STRICT_VALIDATION=1
Loop succeeds when:
plans/050-status-report/STATUS.md
with file path, reason, and follow-up action before closing the run.| Code | Meaning |
|---|---|
| 0 | Success - all checks passed |
| 1 | Quality gate failed |
| 2 | Git operations failed |
| 3 | Max retries exceeded |
| 4 | Timeout |
| 5 | PR operations failed |
git-github-workflow/SKILL.md - Full git workflowatomic-commit/SKILL.md - Atomic commit patternweb-search-researcher/SKILL.md - Web research skill