LoopTroop: Automating Complex Coding Tasks with AI Councils
LoopTroop is an open-source, local GUI orchestrator designed to automate large coding tasks from start to finish. It transforms a coding ticket into a planned, reviewable, and agent-executed pull request. Unlike traditional AI chat sessions that can become bloated and lose focus, LoopTroop breaks down complex work into distinct stages: Planning, Execution, and Shipping.
- Planning: Transforms an initial idea into a detailed Product Requirements Document (PRD) and then into small, manageable milestones called "beads." This stage involves an LLM Council that drafts, scores, refines, and verifies plans through a consensus-driven process.
- Execution: Each "bead" is executed in an isolated Git worktree by an AI coding agent (OpenCode). The system employs a "Ralph-style recovery loop" for retries, ensuring that failures are handled by resetting the environment and retrying with fresh context, preventing the compounding of errors.
- Shipping: Includes final verification steps and optional manual QA, ensuring code quality and alignment with the initial vision before merging.
Key features include:
- Context Engineering: Minimizes context sent to the AI agent at each step to prevent "context rot" and maintain focus, ensuring high-correctness code generation.
- LLM Council: Leverages multiple AI models for planning to achieve robust and well-vetted specifications.
- Atomic Bead Decomposition: Breaks down large features into small, independently implementable units of work.
- Isolated Git Worktrees: All code modifications are performed in separate worktrees, keeping the main working branch clean.
- Human Approval Gates: Provides opportunities for human review and sign-off at critical stages of the workflow.
LoopTroop is ideal for complex, multi-file feature development where accuracy and alignment are paramount. It is recommended to run LoopTroop within a VM or sandboxed environment due to the agent's extensive execution privileges.