A council of 3 AI critics that must reach consensus on code quality decisions
Project description
Code Review Council
A CLI tool that uses a council of 3 AI critics to reach consensus on code quality decisions.
Overview
Code Review Council (ttc) is a command-line tool that employs three specialized AI critics to review your code:
| Critic | Focus |
|---|---|
| ๐ Security Specialist | Vulnerabilities, secrets, security best practices |
| โก Performance Engineer | Efficiency, resource usage, scalability |
| ๐ Clean Code Advocate | Maintainability, readability, code organization |
The three critics must reach consensus before approving code, ensuring thorough and balanced reviews.
Exit Codes
0= โ Approved (all critics agree)1= โ ๏ธ Needs Work (minor issues, some approval)2= โ Rejected (significant issues)
Features
- Multi-AI Provider Support - DeepSeek, Mistral, Kimi, MiniMax, Claude, and any provider with chat completions API
- Consensus-Based Decisions - 3-council system requires majority approval
- Security-First Design - Built-in secret scanning with 50+ patterns
- Flexible Review Strategies - Hierarchical, parallel, chunked reviews
- Customizable Critics - Default brutal prompts with extensive customization options
- Rich Output - Color-coded terminal output with progress indicators
- CI/CD Integration - Exit codes for automated pipelines
Quick Start
Installation
# Install from source
pip install -e .
# Or with optional async support
pip install -e ".[async]"
# Or with all features
pip install -e ".[all]"
Configuration
Create ~/.ttc/config.json with your provider configuration:
{
"active_provider": "deepseek",
"providers": [
{
"name": "deepseek",
"model": "deepseek-chat",
"base_url": "https://api.deepseek.com",
"api_key": "your-deepseek-key"
}
]
}
Custom Providers: You can add any AI provider with a chat completions API by specifying the base_url, model, and api_key. Works with Kimi, MiniMax, Claude, and many others. See QUICKSTART.md for details.
Basic Usage
# Review a single file
ttc review myfile.py
# Review entire project
ttc review /path/to/project
# Switch providers by editing config.json (set active_provider)
# Then run:
ttc review src/
# Streaming mode for large projects
ttc review --streaming large-project/
# Custom critics directory
ttc review --critics-dir ./my-critics src/
Documentation
- Quick Start Guide - Get up and running in minutes
- Usage Guide - Detailed usage instructions and examples
- Critics README - Customizing AI critics
How It Works
โโโโโโโโโโโโโโโโโโโ
โ Your Code โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโผโโโโโโ
โ Council โ
โโโโโโฌโโโโโโ
โ
โโโโโโดโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโ
โ โ โ โ
โโโโโผโโโโ โโโโผโโโโโโ โโโโผโโโโโโโโ โโผโโโโโโโโโ
โSecurityโ โPerform.โ โClean Codeโ โConsensusโ
โCritic โ โCritic โ โCritic โ โBuilder โ
โโโโโฌโโโโ โโโโฌโโโโโโ โโโโฌโโโโโโโโ โโฌโโโโโโโโโ
โ โ โ โ
โโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโ
โ
โโโโโโโโโผโโโโโโโโโ
โ Final Decision โ
โโโโโโโโโโโโโโโโโโ
Security Features
- Secret Scanning - 50+ patterns including AWS keys, GitHub tokens, API keys
- SSL Validation - Certificate verification for all API calls
- TOCTOU Prevention - Time-of-check to time-of-use attack protection
- Secure Config - API keys stored in user directory, never committed
AI Providers
I've tested with DeepSeek, ZAI, Mistral, Claude, and OpenAI. Other providers should work as long as they have a standard chat completions API.
To add a provider, specify the base_url, model, and api_key in your config:
{
"active_provider": "your-provider",
"providers": [
{
"name": "your-provider",
"model": "model-name",
"base_url": "https://api.provider.com",
"api_key": "your-api-key"
}
]
}
Development
Running Tests
pytest
Project Structure
totool/
โโโ council/ # Main Python package
โ โโโ critics/ # AI critic configurations
โ โโโ data/ # Configuration data
โ โโโ ...
โโโ tests/ # Test suite
โโโ docs/ # Documentation
โโโ pyproject.toml # Package configuration
See .claude/CLAUDE.md for detailed architecture and development reference.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE for details.
Links
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file totool_council-0.1.3.tar.gz.
File metadata
- Download URL: totool_council-0.1.3.tar.gz
- Upload date:
- Size: 136.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1856db139311b60948d1c4b824d2c9195803a01139110f8f24805c2611fd8cc3
|
|
| MD5 |
a1b9974afb552a95731105eb4cf43123
|
|
| BLAKE2b-256 |
b926ded5c663db8669d1e0cb45d623cc584f4abb7343b0b16e49c81a1cf40590
|
File details
Details for the file totool_council-0.1.3-py3-none-any.whl.
File metadata
- Download URL: totool_council-0.1.3-py3-none-any.whl
- Upload date:
- Size: 130.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d284ce94f423bc792f3c57a8f79087875387a1ba5cb2ecb9830c8e3f1112a40a
|
|
| MD5 |
1f7861de5522359024d78dd83030361c
|
|
| BLAKE2b-256 |
b7980acbbfcd0017bb4b3655b6ed4b1cab112e6b2a30cd204a84c6afd1c56bda
|