Przejdź do treści
Biblioteka skilli
AI i agenci · Automatyzacja

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.

Licencja
Apache-2.0
Ostatnia zmiana repozytorium
19.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
4
Skrypty
2
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 19.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co sprawdzić przed instalacją
  • 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

  1. Overview
  2. When to Use
  3. Process
  4. Usage
  5. Red Flags
  6. Verification
  7. References
Sekcje z nagłówków SKILL.md, w oryginale · 108 linii, 836 słów
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 (`invoke_subagent` 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 `invoke_subagent(name="...", 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

RepozytoriumWynikLicencja
Ta strona · jggomez/expert-ai-developer-skills100Apache-2.0
dwarvesf/dwarves-kit100MIT
huytieu/cog-second-brain100MIT
jggomez/expert-ai-developer-skills100Apache-2.0
bojieli/ai-agent-book100Apache-2.0
Mark393295827/third-brain-v7-skills100MIT
alvinunreal/oh-my-opencode-slim90MIT
JZKK720/cubecloud-skills-bundle-kit90MIT
telagod/code-abyss85MIT

Identyczna treść występuje jeszcze w 4 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 13.11.2026 · wersja paczki d106cb34b103 (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.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.