Concepts
How AI Council works: the six specialized agents, the confidence-weighted voting system, structured debates, and security safeguards.
Agents Overview
AI Council assembles a diverse panel of specialized AI agents.
Senior Developer
Generalist15+ years of experience. Focuses on maintainability, best practices, readability, testability, and long-term sustainability. Comments on any aspect of the code.
Security Engineer
SpecialistIdentifies security vulnerabilities, authentication issues, SQL injection, XSS, CSRF, and other security concerns. Abstains when code has no security implications.
Performance Engineer
SpecialistAnalyzes algorithmic complexity (O(n), O(log n)), memory usage, caching opportunities, and optimization potential. Abstains for code without performance implications.
Software Architect
SpecialistEvaluates design patterns, scalability, separation of concerns, system boundaries, and how code fits into the broader system. Abstains for simple changes.
Gemini Thinker
ChallengerPowered by Google Gemini. Challenges assumptions, reframes problems, identifies edge cases, and provides alternative system-level perspectives.
Pragmatist
GeneralistBalances perfectionism with shipping. Considers deadlines, team velocity, and whether the code effectively solves the problem. Sometimes "good enough" is right.
Voting System
Each agent casts a vote with a confidence score. The system uses these to reach a final decision.
Vote Types
Code meets quality standards and can be merged
Code needs improvements before merging
Code has fundamental issues that must be addressed
Agent defers due to low confidence or irrelevant domain
Confidence Scores
Each vote includes a confidence score from 0.0 to 1.0:
- 0.8-1.0: High confidence - agent is certain about their assessment
- 0.5-0.8: Moderate confidence - reasonable certainty
- < 0.5: Low confidence - agent automatically abstains
Abstention Rules
Agents abstain in two scenarios:
- Domain Mismatch: Specialist agents (Security, Performance, Architect) abstain when code doesn't match their domain expertise
- Low Confidence: Any agent with confidence below 0.5 automatically abstains
Debate System
When Gemini dissents from the majority, AI Council triggers an automated debate to explore the disagreement.
Debate Flow
- Detection: System detects Gemini's vote differs from majority
- Escalation: Debate is triggered between Gemini and the strongest majority voice
- Rebuttal: Majority agent responds to Gemini's concerns
- Counter: Gemini provides final response (maintain, partial concede, or full concede)
- Judgment: Judge considers the debate when making final decision
โก Debate escalation: Gemini (REJECT) dissents from majority (APPROVE)
1. senior-dev (DEFEND): The null check on line 42 handles the edge case
Gemini mentioned. The early return pattern is intentional for...
2. gemini (PARTIAL_CONCEDE): I acknowledge the null check, but maintain
concern about the async race condition that could still occur when...
Gemini uses a different AI model (Google's) than other agents. This intentional diversity helps catch edge cases and provides truly alternative perspectives that might be missed by a single AI provider.
Security & Sanitization
AI Council applies multiple layers of input and output sanitization to reduce injection and information-leakage risks.
User Input
All user-provided text is sanitized before use in AI prompts:
- Null bytes and control characters are stripped
- Shell command-substitution characters (backticks,
$() are removed - Line endings are normalized and whitespace is collapsed
- Input is capped at 10,000 characters
Agent Suggestions
Suggestion output from agents is sanitized before display:
- Control characters and null bytes are stripped
- Output is capped at 20,000 characters
- Suggestions are never executed by the tool; they are for human review only
Error Logging
API keys (OPENAI_API_KEY, GEMINI_API_KEY) are automatically redacted from any error messages written to stderr, preventing accidental credential leakage in logs or CI output.
Agent suggestions are AI-generated and not guaranteed correct or safe. Always review and validate suggestions before applying them to your codebase.
Need Help?
Can't find what you're looking for? Here are some resources: