██████╗ ██████╗ ██████╗ ███████╗████████╗██████╗ ██╗██████╗ ██╗ ██╗███╗ ██╗ █████╗ ██╗
██╔════╝██╔═══██╗██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██║██╔══██╗██║ ██║████╗ ██║██╔══██╗██║
██║ ██║ ██║██║ ██║█████╗ ██║ ██████╔╝██║██████╔╝██║ ██║██╔██╗ ██║███████║██║
██║ ██║ ██║██║ ██║██╔══╝ ██║ ██╔══██╗██║██╔══██╗██║ ██║██║╚██╗██║██╔══██║██║
╚██████╗╚██████╔╝██████╔╝███████╗ ██║ ██║ ██║██║██████╔╝╚██████╔╝██║ ╚████║██║ ██║███████╗
╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝An AI-powered code review roundtable where multiple LLM agents debate and critique your code.
Each agent gets a random persona, and one is secretly the Troublemaker — tasked with giving subtly harmful advice without getting caught. You must identify who is sabotaging the review.
- Multi-LLM Support: Ollama (default), OpenAI, Anthropic Claude — mix and match per player
- Persona System: 8 unique reviewer personalities with distinct styles
- Troublemaker Mechanic: One agent secretly works against you — can you spot them?
- Cross-Examination Debate: AI agents accuse each other with evidence before voting
- Vote to Eliminate: AI jury votes out the most suspicious member
- Pause/Resume: Freeze and continue conversations at any time
- Code Analysis: Integrates with garbage-code-hunter for real code analysis
- Dual Storage: Zero-config goagent in-memory, or persistent SQLite with
database.path - YAML Config: Full configurability via
config/roundtable.yaml
- Go 1.26+
- Ollama (for default local setup):
ollama pull llama3.2
The project uses Xiaomi MiMo as the default LLM provider. Set your API key:
# Set the Xiaomi MiMo API key (default provider/use the local Ollama model if none is available).
export XIAOMI_OPENAI_API_KEY=your_api_key_here
# Optional: Other providers (if you configure them in roundtable.yaml)
export OPENAI_API_KEY=sk-your-openai-key
export ANTHROPIC_API_KEY=sk-ant-your-anthropic-key💡 Tip: Add these to your
~/.bashrcor~/.zshrcto persist across sessions.
CodeTribunal supports two modes:
Start the web server and open in browser:
go run ./cmd/roundtable/main.go serve
# Or simply:
go run ./cmd/roundtable serve
# Or with Make:
make serveThe server starts at http://localhost:8765 — open it in your browser to use the full web interface.
Run in terminal with interactive commands:
go run ./cmd/roundtable/main.go
# Or:
go run ./cmd/roundtable
# Or with Make:
make runThe main interface shows the control panel, player list, and real-time chat area with the AI debate.
Agent Beta (Architect) provides detailed architectural analysis, discussing coupling, design patterns, and code organization.
Agent Delta focuses on security vulnerabilities, identifying critical issues like command injection and hardcoded secrets.
In battle mode, agents engage in cross-examination, debating each other's findings with evidence from the discussion.
Edit config/roundtable.yaml:
llm:
default_provider: ollama
default_model: llama3.2
providers:
ollama:
base_url: http://localhost:11434
openai:
api_key: ${OPENAI_API_KEY}
model: gpt-4o
anthropic:
api_key: ${ANTHROPIC_API_KEY}
model: claude-sonnet-4-20250514
roundtable:
players:
- id: player-1
name: "GPT"
provider: openai
- id: player-2
name: "Claude"
provider: anthropic
- id: player-3
name: "DeepSeek"
provider: openai
model: deepseek-chat
- id: player-4
name: "Local"
provider: ollama> submit /path/to/your/code # Start a code review round
> vote player-2 # Vote for the troublemaker
> battle # Trigger AI battle mode (debate on a topic)
> status # Check game state
> pause # Pause the ongoing session
> resume # Resume a paused session
> exit # Quit
# config/roundtable.yaml
database:
path: "" # "" = goagent in-memory (default, no setup)
# path: ./data/tribunal.db # Set to enable persistent SQLite storage- Default: goagent in-memory
MemoryRepository— zero config, restart loses history - SQLite: Set
database.pathto a file path — persistent storage withmodernc.org/sqlite
flowchart LR
Deal["Deal<br/>Assign personas & pick troublemaker"] --> Analyze["Analyze<br/>garbage-code-hunter scan"]
Analyze --> Speak["Speak<br/>3 rounds of discussion"]
Speak --> Debate["Debate<br/>Cross-examination & accusations"]
Debate --> Vote["Vote<br/>AI jury eliminates one member"]
Vote --> Reveal["Reveal<br/>Unmask identities"]
Vote -.->|troublemaker alive| Speak
- Deal: Each player draws one of 8 personas; one is secretly the troublemaker
- Analyze: Run
garbage-code-hunter --jsonto scan the codebase - Speak: 3 rounds — opening statements, rebuttals, closing arguments
- Debate: Cross-examination — each player accuses a suspect with quoted evidence
- Vote: AI jury eliminates the most-voted member. If the troublemaker survives, loop back to Speak
- Reveal: Identities revealed — did you catch the saboteur?
You can pause/resume the session anytime, or interject with questions mid-discussion.
| Persona | Style |
|---|---|
| 🏛️ Architect | Module boundaries, coupling, design patterns |
| ⚡ Performance Guru | Algorithmic complexity, memory, cache |
| 🛡️ Security Guardian | Input validation, injections, access control |
| 🧹 Clean Code Freak | Naming, formatting, dead code |
| 🧪 Test Driver | Coverage, boundary conditions, error paths |
| 🚗 Old Hand | Production wisdom, real-world experience |
| 🕴️ Agent 47 | Concise bullet points, only critical issues |
| 🦸 Deadpool | Breaks the fourth wall, meta-humor |
The troublemaker uses subtle tactics — overcomplicating simple issues, suggesting irrelevant tech, or downplaying real problems. They must stay 80% helpful and only let their bias slip occasionally.
| Disguise | Strategy |
|---|---|
| 🧠 Deep Thinker | Overcomplicate with academic jargon |
| ⛓️ Blockchain! | Suggest irrelevant trendy tech |
| 🔄 Rewrite It | Suggest rewrites far beyond scope |
| ✅ It's Perfect | Downplay every issue's severity |
| 🤖 Let AI Do It | Deflect to linters/automation |
- Language: Go 1.26+
- Agent Framework: goagent v0.1.1
- Core agent infrastructure providing base types, session management, and in-memory storage (
MemoryRepository) - Handles LLM integration, message routing, and agent lifecycle management
- The foundation that enables multi-agent orchestration and debate mechanics
- Core agent infrastructure providing base types, session management, and in-memory storage (
- Vector Database: sqlite-vec (via
asg017/sqlite-vec-go-bindingsv0.1.6)- SQLite extension for vector similarity search and KNN queries
- Powers the experience retrieval system — finds similar past game sessions using embeddings
- Uses keyword-hashing based embeddings (128-dimensional float32 vectors)
- Requires
mattn/go-sqlite3(CGo) for extension support
- Primary Database:
modernc.org/sqlitev1.50.1 (pure Go, no CGO)- Persistent storage for sessions, messages, and game experiences
- Works alongside sqlite-vec in a dual-database architecture
- Real-time Communication:
github.com/coder/websocketv1.8.14- WebSocket support for live chat updates between frontend and backend
- Dependencies:
golang.org/x/syncv0.20.0 (errgroup, semaphore)gopkg.in/yaml.v3v3.0.1 (configuration parsing)github.com/google/uuidv1.6.0 (unique identifiers)
- Code Analyzer: garbage-code-hunter by TimWood
- External tool for static code analysis and issue detection
TimWood — GitHub
This project is licensed under the Apache License 2.0.
See the LICENSE file for details.



