Autonomous Coding Agent with Self-Review, Quality Convergence, and Production-Ready Output
Quick Start β’ Features β’ Methodology β’ Examples β’ Docs
Corbat-Coco is an autonomous coding agent that transforms natural language requirements into production-ready code. Unlike other AI coding tools, it iteratively improves code until it meets senior-level quality standards.
"Every line of code must be worthy of a senior engineer's signature."
| Feature | Cursor/Copilot | Claude Code | Corbat-Coco |
|---|---|---|---|
| Generate code | β | β | β |
| Self-review loops | β | β | β |
| Quality scoring | β | β | β (11 dimensions) |
| Architecture planning | Basic | Basic | β Full ADR system |
| Progress persistence | β | Session | β Checkpoints |
| Production deployment | β | β | β CI/CD generation |
# Using npm
npm install -g corbat-coco
# Using pnpm (recommended)
pnpm add -g corbat-coco
# Verify installation
coco --versioncoco init my-project # Initialize & describe what you want
coco plan # Generate architecture & backlog
coco build # Build with quality iteration$ coco init my-api
π Welcome to Corbat-Coco!
? What would you like to build?
> A REST API for task management with user authentication
? Tech stack preferences?
> TypeScript, Express, PostgreSQL, JWT auth
π Specification generated!
$ coco plan
π Designing architecture...
β ADR-001: Express.js framework
β ADR-002: JWT authentication
β ADR-003: PostgreSQL with Prisma
π Backlog: 2 epics, 8 stories, 24 tasks
$ coco build
π¨ Building Sprint 0...
Task 1/6: User entity β (3 iterations, score: 92/100)
Task 2/6: Auth service β (4 iterations, score: 89/100)
...
π Sprint Complete!
ββ Average quality: 90/100
ββ Test coverage: 87%
ββ Security issues: 0For day-to-day development work on existing projects, use coco task to execute specific tasks:
$ cd my-existing-backend
$ coco task
? Describe your task (paste from Jira, GitHub issue, etc.):
> ## JIRA-1234: Add GET endpoint for user orders
>
> **Story Points:** 5
> **Acceptance Criteria:**
> - Create GET /api/v1/users/{userId}/orders endpoint
> - Return paginated list of orders (default: 20 items)
> - Support query params: status, fromDate, toDate, page, size
> - Include order items in response
> - Return 404 if user not found
> - Add unit tests (>80% coverage)
> - Update OpenAPI spec
π Analyzing codebase...
β Detected: Java 17 + Spring Boot 3.2
β Found: OrderRepository, UserRepository, existing /api/v1/* structure
β Style: Following existing patterns in UserController.java
π Task breakdown:
1. Create OrderController with GET endpoint
2. Create OrderService with business logic
3. Create OrderDTO and OrderPageDTO
4. Add validation and error handling
5. Write unit tests for Service layer
6. Write integration tests for Controller
7. Update OpenAPI documentation
? Proceed with implementation? (Y/n) Y
π¨ Executing task...
Step 1/7: OrderController β (2 iterations, score: 94/100)
β Created: src/main/java/com/example/controller/OrderController.java
β Follows existing controller patterns
Step 2/7: OrderService β (3 iterations, score: 91/100)
β Created: src/main/java/com/example/service/OrderService.java
β Using existing OrderRepository
Step 3/7: DTOs β (1 iteration, score: 96/100)
β Created: OrderDTO.java, OrderPageDTO.java, OrderFilterDTO.java
Step 4/7: Error handling β (2 iterations, score: 93/100)
β Added: UserNotFoundException handling
β Updated: GlobalExceptionHandler.java
Step 5/7: Unit tests β (2 iterations, score: 89/100)
β Created: OrderServiceTest.java (12 tests)
β Coverage: 94%
Step 6/7: Integration tests β (3 iterations, score: 88/100)
β Created: OrderControllerIntegrationTest.java (8 tests)
Step 7/7: OpenAPI β (1 iteration, score: 97/100)
β Updated: openapi.yaml with new endpoint schema
π Task Complete!
ββ Files created: 6
ββ Files modified: 2
ββ Tests added: 20 (all passing)
ββ Coverage: 92%
ββ Average quality: 92/100
ββ Time: 12 minutes
? Create commit? (Y/n) Y
β Committed: feat(orders): add GET endpoint for user orders [JIRA-1234]
? Push to remote? (Y/n) Y
β Pushed to origin/feature/JIRA-1234-user-ordersPro tips for existing projects:
- Coco automatically detects your tech stack and coding patterns
- Paste your Jira/GitHub issue directly - it parses acceptance criteria
- Use
coco task --dry-runto preview without changes - Use
coco task --no-committo skip auto-commit
Code is automatically reviewed and improved until it meets quality standards:
Generate β Test β Review β Improve β Repeat until excellent
11 dimensions measured on every iteration:
| Dimension | Weight | Description |
|---|---|---|
| Correctness | 15% | Tests pass, logic correct |
| Completeness | 10% | All requirements met |
| Robustness | 10% | Edge cases handled |
| Readability | 10% | Code clarity |
| Maintainability | 10% | Easy to modify |
| Complexity | 8% | Cyclomatic complexity |
| Duplication | 7% | DRY score |
| Test Coverage | 10% | Line/branch coverage |
| Test Quality | 5% | Test meaningfulness |
| Security | 8% | No vulnerabilities |
| Documentation | 4% | Doc coverage |
| Style | 3% | Linting compliance |
Never lose progress:
- Automatic checkpoints every 5 minutes
- Resume from any interruption
- Full version history per task
- Rollback capability
Generated automatically:
- Architecture Decision Records (ADRs)
- System diagrams (C4 model)
- Backlog with epics, stories, tasks
- Sprint planning
Outputs ready for deployment:
- Dockerfile & docker-compose.yml
- GitHub Actions workflows
- README & API documentation
- Deployment guides
Four phases from idea to deployment:
ββββββββββββ ββββββββββββββ ββββββββββββ ββββββββββ
β CONVERGE β β β ORCHESTRATEβ β β COMPLETE β β β OUTPUT β
ββββββββββββ ββββββββββββββ ββββββββββββ ββββββββββ
β β β β
Understand Plan & Execute & Deploy &
Requirements Design Iterate Document
| Phase | Purpose | Output |
|---|---|---|
| Converge | Understand requirements through Q&A | Specification document |
| Orchestrate | Design architecture, create plan | ADRs, Backlog, Standards |
| Complete | Build with quality iteration | Quality code + tests |
| Output | Prepare for production | CI/CD, Docs, Deployment |
# New projects
coco init [path] # Initialize new project
coco plan # Run discovery and planning
coco build # Execute tasks with quality iteration
coco build --sprint=N # Build specific sprint
# Existing projects (day-to-day workflow)
coco task # Execute a single task (Jira, GitHub issue, etc.)
coco task --dry-run # Preview changes without applying
coco task --no-commit # Skip auto-commit after task
# Utilities
coco status # Show current progress
coco status --verbose # Detailed status
coco resume # Resume from checkpoint
coco config set <key> <value> # Configure settings
coco config get <key> # Get configuration valueConfiguration is stored in .coco/config.json:
{
"project": {
"name": "my-project",
"version": "0.1.0"
},
"provider": {
"type": "anthropic",
"model": "claude-sonnet-4-20250514"
},
"quality": {
"minScore": 85,
"minCoverage": 80,
"maxIterations": 10,
"convergenceThreshold": 2
},
"persistence": {
"checkpointInterval": 300000,
"maxCheckpoints": 50
}
}| Setting | Default | Description |
|---|---|---|
minScore |
85 | Minimum quality score (0-100) |
minCoverage |
80 | Minimum test coverage (%) |
maxIterations |
10 | Max iterations per task |
convergenceThreshold |
2 | Score delta to consider converged |
See the examples/ directory for complete examples:
| Example | Description | Time |
|---|---|---|
| REST API (TypeScript) | Task management API with auth | ~30 min |
| CLI Tool | Image processing CLI | ~25 min |
| Spring Boot (Java) | Order management microservice | ~40 min |
- Node.js: 22.0.0 or higher
- Anthropic API Key: For Claude models
- Git: For version control features
export ANTHROPIC_API_KEY="sk-ant-..." # Required
export COCO_CONFIG_PATH="..." # Optional: custom config path- Quick Start Guide - Get started in 5 minutes
- Configuration Guide - Complete configuration reference
- Tutorial - Detailed tutorial with examples
- Troubleshooting - Common issues and solutions
- API Reference - Use Corbat-Coco as a library
- Architecture - System design & C4 diagrams
- ADRs - Architecture Decision Records
- Production Readiness - Assessment & roadmap
# Clone the repository
git clone https://github.com/corbat/corbat-coco.git
cd corbat-coco
# Install dependencies
pnpm install
# Run in development
pnpm dev --help
# Run tests
pnpm test
# Run all checks
pnpm check # typecheck + lint + test
# Build
pnpm buildContributions are welcome! Please read the Contributing Guide first.
- Fork the repository
- Create a feature branch (
git checkout -b feat/amazing-feature) - Write tests (80% coverage minimum)
- Run checks (
pnpm check) - Commit with conventional commits
- Open a Pull Request
export ANTHROPIC_API_KEY="sk-ant-..."- Check the quality report for specific issues
- Review suggestions in
.coco/versions/task-XXX/ - Consider adjusting
maxIterations
coco resume --from-checkpoint=<id>
# Or start fresh:
coco build --restartFor more help, see Issues.
- OpenAI provider support
- Local model support (Ollama)
- VS Code extension
- Web dashboard
- Team collaboration features
MIT License - see LICENSE for details.
Built with β€οΈ by Corbat