Streamline AI coding tasks with a tiered agent system.
Project details
Foreman orchestrates AI coding agents to optimize task execution within hard budgets. By utilizing a multi-tiered approach, the system ensures effective delegation and management of coding tasks, enhancing productivity and maintaining budgetary constraints. Zero dependencies and simple installation make it accessible for any project.
Foreman: Multi-Model Orchestration for AI Coding Agents
Foreman provides an innovative framework for managing a tiered team of AI coding agents operating under hard budgets and gates, utilizing the power of opencode. This system is structured around a director, who writes comprehensive tickets, which are then executed by a skilled workforce stratified into different roles:
director ─▶ lead (premium: plan · review · gates)
├─▶ coder (standard: implement)
├─▶ tester (standard: tests)
├─▶ drone (economy: reports, chores)
└─▶ librarian (economy: retrieval)
Foreman acts as a middleman between the manager (Claude/you) and the AI workers, managing the flow from ticket creation through task execution:
MANAGER (Claude/you) FOREMAN WORKER (opencode, headless)
───────────────── ─────── ──────────────────────────
writes ticket ─────────────▶ run <id> ──────────────▶ reads PROTOCOL + ticket
streams JSONL to disk ◀── edits, runs, tests
tails digest ◀───────────── digests events
reads REPORT ◀───────────── report <id> ◀─────────── writes REPORT.md, stops
runs gate ─────────────▶ verify <id> (runs gates itself)
writes feedback ────────────▶ run <id> --continue ───▶ SAME session
commits when verified
A simple command line interface enables seamless interaction with the system:
foreman ticket hello --title "Add a hello test"
foreman run T001 --verify
foreman report T001 # Check worker's claims
foreman tail T001 # Live digest of worker activity
A live dashboard is available to monitor the status of tasks and worker performance:
foreman # display live status of tasks and workers
foreman ui --once # one-time snapshot for CI or screenshots
This project boasts zero dependencies and is designed for Node ≥22. It's particularly useful for teams looking to harness AI for coding tasks under stringent requirements. Explore the detailed design documentation and review the example ticket to fully leverage Foreman in your projects.
For further insights, visit the official site at GitHub Page for Foreman and watch the demo showcasing its capabilities.
Comments
0Start the conversation
Share the first comment.