loop-engineering
/loop-engineering
Wdraża samokorygujące się pętle wykonania agentów, równoległe przepływy wielu agentów, izolację przestrzeni roboczej (Git Worktrees) i automatyczny audyt pull requestów oparty na cron.
- Autor
- jggomez ↗
- Repozytorium
- expert-ai-developer-skills ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 19.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 4
- Skrypty
- 2
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 19.10.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
- 2 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/pr_cron_reviewer.py, scripts/run_parallel_agents.py
Co robi i kiedy
Wdraża samokorygujące się pętle wykonania agentów, równoległe przepływy wielu agentów, izolację przestrzeni roboczej (Git Worktrees) i automatyczny audyt pull requestów oparty na cron.
Oryginalny opis (EN)
Implements self-correcting agent execution loops, multi-agent parallel workflows, workspace isolation (Git Worktrees), and automated cron-based Pull Request auditing. Use this skill when asked to orchestrate parallel workers or construct review loops.
Jak działa
- Overview
- When to Use
- Process
- Usage
- Red Flags
- Verification
- References
Podgląd SKILL.md
---
name: loop-engineering
description: Implements self-correcting agent execution loops, multi-agent parallel workflows, workspace isolation (Git Worktrees), and automated cron-based Pull Request auditing. Use this skill when asked to orchestrate parallel workers or construct review loops.
---
# Loop Engineering Skill
## Overview
This skill designs and executes multi-agent workflows, isolated parallel worker topologies, and self-correcting development loops. It acts as a Loop Engineering and Multi-Agent Orchestrator, enabling manager agents to coordinate multiple worker agents operating concurrently in dedicated git worktrees, protected by automated review crons, deterministic iteration caps, and quality verification gates.
## When to Use
### Trigger Scenarios
- Orchestrating multi-agent parallel execution across disjoint modules or features.
- Provisioning isolated git worktrees to prevent mutational file conflicts among concurrent agents.
- Setting up automated periodic review crons to audit open pull requests and branches.
- Establishing self-correcting execution loops that detect build/test failures and automatically remediate code.
### When NOT to Use
- **Single-agent sequential development tasks**: Standard execution suffices.
- **Trivial isolated fixes**: Avoid worktree provisioning overhead.
- **Pure git commit message validation**: Route to `commit-expert`.
- **Stand-alone manual code reviews**: Route to `pull-request-expert`.
## Process
### Multi-Agent Topologies Taxonomy
Multi-agent systems require rigorous topologies to avoid race conditions, context contamination, and execution chaos:
1. **Manager-Worker Topology**:
- An orchestrator coordinates high-level objectives, decomposes tasks into independent deliverables, and delegates execution to specialized worker subagents.
- Workers execute autonomously in isolated git worktrees or branches with zero shared mutable state, returning structured reports to the manager.
2. **Sequential Pipeline (DAG)**:
- Deterministic state machine governing sequential transitions: `Plan -> Build -> Test -> Audit -> Ship`.
- Each phase enforces strict entry and exit criteria; failure loops back directly to the responsible upstream phase rather than restarting blindly.
3. **Review Committee**:
- Parallel specialist evaluations where multiple independent agents concurrently evaluate code diffs for distinct domains (e.g. Security, Architecture, Performance, QA).
- Findings are aggregated and synthesized into an actionable checklist before merge approval.
### Phase 1: Task Decomposition & Worktree Provisioning
1. Identify independent, disjoint tasks with zero shared mutational state.
2. Run the worktree provisioning script to create one isolated git worktree and branch per task:
```bash
python3 ./skills/loop-engineering/scripts/run_parallel_agents.py --tasks "task1:path1" "task2:path2"
```
The script creates the worktree directories and outputs ready-to-use prompts for each subagent.
### Phase 2: Parallel Subagent Dispatching
1. Launch concurrent subagents via host-native subagent tools (`Agent` on Antigravity, `Agent` on Claude Code).
2. Assign each subagent to its dedicated worktree directory and branch.
3. Subagents execute implementation and local testing autonomously within their isolated directories.
### Phase 3: Continuous Review Crons & Quality Gates
1. Run automated PR/branch auditors to scan feature and bugfix branches:
```bash
python3 ./skills/loop-engineering/scripts/pr_cron_reviewer.py
```
2. The auditor runs static analyzers, test runners, and secret scanners against git diffs, appending actionable comments to the review log.
### Phase 4: Self-Correction Protocol (Strict 3-Loop Cap)
1. **Defect Detection**: If quality gates fail, the subagent analyzes the exact traceback, compiler diagnostic, or linter error.
2. **Targeted Remediation**: The subagent applies surgical fixes to the failing code and re-runs the verification command.
3. **Strict 3-Loop Cap**:
- Auto-remediation is strictly bounded to a **maximum of 3 self-correction cycles**.
- Under no circumstances may an agent enter a runaway loop beyond 3 attempts.
4. **Escalation Mechanism**:
- If a defect persists after 3 cycles, the agent must immediately **halt execution**.
- Compile a comprehensive diagnostic report detailing:
* Exact failing assertion or error traceback.
* The 3 remediation hypotheses attempted and why each failed.
* Specific questions or guidance requested from the user.
- Escalate to the user and await manual intervention.
## Usage
### Commands & Automation Scripts
```bash
# Provision isolated worktrees and generate subagent prompts
python3 ./skills/loop-engineering/scripts/run_parallel_agents.py
# Execute automated PR and branch diff quality review cron
python3 ./skills/loop-engineering/scripts/pr_cron_reviewer.py
```
### Example Prompts
- *"Provision isolated worktrees for these 3 independent API routes and dispatch parallel subagents."*
- *"Run the PR review cron to inspect all active feature branches for quality gate compliance."*
- *"Orchestrate a self-correcting development loop for this refactoring until all tests pass, adhering to the 3-loop cap."*
### Host Execution Instructions
- **Claude Code**: Run `run_parallel_agents.py` to create worktrees, then dispatch subagents into each worktree path via `Agent(agent="...", prompt="...")`.
- **Antigravity**: Launch subagents with `Agent(agent="...", prompt="...")` using `Workspace='branch'` or `Workspace='share'` and monitor execution reactively.
## Red Flags
- Spawning parallel subagents in the same directory without worktree isolation (causing race conditions and file collisions).
- Exceeding the 3-loop cap and entering runaway, cost-inefficient retry loops.
- Bypassing the self-correction protocol when quality gates fail.
- Allowing subagents to commit directly to production branches without PR review.
- Running parallel subagents on heavily coupled tasks with shared mutable state.
## Verification
- [ ] Multi-agent topology (Manager-Worker, DAG, or Review Committee) explicitly chosen and documented.
- [ ] Worktrees provisioned cleanly with isolated branches:
```bash
python3 ./skills/loop-engineering/scripts/run_parallel_agents.py
```
- [ ] Subagents execute and commit changes to their respective branches without collision.
- [ ] PR cron reviewer passes with zero gate failures:
```bash
python3 ./skills/loop-engineering/scripts/pr_cron_reviewer.py
```
- [ ] Self-correction protocol strictly adheres to the 3-loop cap, escalating persistent defects to the user after 3 cycles.
## References
- [Loop Engineering & Multi-Agent Orchestration Reference](references/loop-architecture.md)
Pliki w paczce (4)
- SKILL.md 7 KB
- references/loop-architecture.md 3 KB
- scripts/pr_cron_reviewer.py 4 KB
- scripts/run_parallel_agents.py 3 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · jggomez/expert-ai-developer-skills | 100 | Apache-2.0 |
| dwarvesf/dwarves-kit | 100 | MIT |
| huytieu/cog-second-brain | 100 | MIT |
| jggomez/expert-ai-developer-skills | 100 | Apache-2.0 |
| bojieli/ai-agent-book | 100 | Apache-2.0 |
| Mark393295827/third-brain-v7-skills | 100 | MIT |
| alvinunreal/oh-my-opencode-slim | 90 | MIT |
| JZKK720/cubecloud-skills-bundle-kit | 90 | MIT |
| telagod/code-abyss | 85 | MIT |
Identyczna treść występuje jeszcze w 3 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 13.11.2026 · wersja paczki 02e7ff715c48 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 96generate-agentic-loop
Projektuje lub wdraża ograniczone pętle wykonania agentów z weryfikacją, limitami zasobów i odzyskiwalnym stanem. - 100workflow-parallel-agents
Uruchamia wielu agentów równolegle przez git worktree, agentów w chmurze lub porównanie wielu modeli, na przykład best-of-N i porównanie podejść. - 100parallel-agent-worktrees
Uruchamia kilku agentów kodujących w jednym repozytorium bez wzajemnego psucia zmian, z drzewami roboczymi gita. - 100parallel-orchestrator
Orkiestruje równoległe przepływy agentów przez narzędzie Task przy planowaniu pracy wielu agentów; skill jest oznaczony jako zarchiwizowany i zastąpiony innym. - 100parallel-orchestrator
Orkiestruje równoległe przepływy agentów przez ParallelWorkflow z Wipnote przy planowaniu pracy wielu agentów, subagentach narzędzia Task i równoległej implementacji funkcji. - 100workmux
Zarządza agentami terminalowymi, git worktree i sesjami tmux przez workmux: otwiera agentów w projekcie, sprawdza ich postęp i obsługuje równoległe przepływy agentów.