Skip to content

Autonomous coding agent with self-review and quality convergence. Uses COCO methodology (Converge-Orchestrate-Complete-Output) to generate production-ready code with 85+ quality scores.

License

Notifications You must be signed in to change notification settings

corbat-tech/coco

πŸ₯₯ Coco

The AI coding agent that actually delivers production-ready code

Features β€’ Quick Start β€’ How It Works β€’ Commands β€’ Documentation

NPM Version License TypeScript Node Tests


The Problem

Most AI coding tools generate code and walk away. If tests fail, types don't match, or security issues creep in β€” that's on you.

The Solution

Coco doesn't just generate code. It iterates until it's right.

After writing code, Coco automatically:

  • βœ… Runs your tests
  • πŸ“Š Measures quality across 12 dimensions
  • πŸ” Diagnoses what's wrong
  • πŸ”§ Fixes issues and repeats

Until your code hits production-quality standards you define.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Generate β”‚ ──► β”‚   Test   β”‚ ──► β”‚ Measure  β”‚ ──► β”‚   Fix    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                         β”‚
                                             Score < 85? β”‚ ──► Loop
                                             Score β‰₯ 85? β”‚ ──► Done βœ…

✨ Features

πŸ”„ Quality Convergence Loop (COCO Mode)

Not just code generation β€” iterative quality improvement:

Iteration Score Status
1 52 Code generated β€” 3 tests failing, no error handling
2 71 Tests fixed, security vulnerability found
3 84 Security patched, coverage 82%
4 91 βœ… All green β€” quality converged

Enable with /coco β€” now on by default for better results

πŸ“Š 12-Dimension Quality Scoring

Real metrics, not guesses:

Dimension How It's Measured
Test Coverage c8/v8 instrumentation
Security Pattern matching + optional Snyk
Complexity Cyclomatic complexity (AST)
Duplication Line-based similarity
Correctness Test pass rate + build verification
Style oxlint / eslint / biome
Documentation JSDoc coverage
+ 5 more Readability, Maintainability, Test Quality, Completeness, Robustness

πŸš€ Full Release Pipeline

Ship with confidence using /ship:

/ship                          # Complete 10-step pipeline

Pipeline: Preflight β†’ Review β†’ Tests β†’ Lint β†’ Branch β†’ Version β†’ Commit β†’ PR β†’ CI β†’ Merge

Each step is interactive β€” press Ctrl+C anytime to safely cancel.

πŸ€– Multi-Agent Architecture

Six specialized agents with automatic routing:

  • Researcher β€” Codebase exploration and analysis
  • Coder β€” Code implementation (default)
  • Tester β€” Test generation and coverage
  • Reviewer β€” Quality auditing and code review
  • Optimizer β€” Refactoring and performance
  • Planner β€” Architecture and task decomposition

🌐 Multi-Provider Support

Bring your own API key:

Provider Auth Models
Anthropic API key / OAuth Claude Opus, Sonnet, Haiku
OpenAI API key GPT-5.3 Codex, GPT-4.1, o4-mini
Google API key / gcloud Gemini 3, 2.5 Pro/Flash
Ollama Local Any local model
LM Studio Local Any GGUF model
Moonshot API key Kimi models

⚑ Modern Terminal UX

  • Ghost-text completion β€” Tab to accept suggestions
  • Image paste β€” Ctrl+V to paste screenshots
  • Intent recognition β€” Natural language β†’ commands
  • Full-access mode β€” /full-access for auto-approvals (with safety guards)
  • Self-update β€” Type "update coco" anytime

πŸš€ Quick Start

# Install globally
npm install -g @corbat-tech/coco

# Start interactive mode
coco

# Or use directly
coco "Add user authentication with tests"

That's it. Coco walks you through provider setup on first launch.


πŸ’¬ Commands

Slash Commands

Command What it does
/help Show available commands
/status Project status, git info, session stats
/review Code review with severity-rated findings
/diff Visual diff with syntax highlighting
/ship Full release pipeline (review β†’ test β†’ PR β†’ merge)
/coco [on|off] Toggle quality mode (default: ON)
/full-access [on|off] Auto-approve safe commands
/compact Reduce context when conversation grows
/clear Clear conversation history

Natural Language

You don't need slash commands. Just talk:

You say Coco does
"review the code" Runs /review
"let's ship it" Runs /ship
"show me the changes" Runs /diff
"update coco" Runs /update-coco

Bilingual support (English/Spanish).


🎯 How It Works

COCO Methodology

Four phases for production-ready output:

 CONVERGE          ORCHESTRATE         COMPLETE            OUTPUT
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Gather   β”‚     β”‚ Design       β”‚   β”‚ Execute with β”‚   β”‚ Generate β”‚
β”‚ reqs     β”‚ ──► β”‚ architecture │──►│ quality      │──►│ CI/CD,   β”‚
β”‚ + spec   β”‚     β”‚ + backlog    β”‚   β”‚ convergence  β”‚   β”‚ docs     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                         ↑    ↓
                                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                    β”‚ Convergence β”‚
                                    β”‚    Loop     β”‚
                                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. Converge β€” Understand requirements
  2. Orchestrate β€” Design architecture
  3. Complete β€” Build with quality iteration
  4. Output β€” Generate deployment config

πŸ“– Documentation


πŸ§‘β€πŸ’» Development

git clone https://github.com/corbat/corbat-coco
cd corbat-coco
pnpm install
pnpm dev          # Run in dev mode
pnpm test         # 4,350+ tests
pnpm check        # Typecheck + lint + test

Project Structure

src/
β”œβ”€β”€ agents/           # Multi-agent coordination
β”œβ”€β”€ cli/              # REPL + commands
β”œβ”€β”€ phases/           # COCO phases
β”œβ”€β”€ quality/          # 12-dimension scoring
β”œβ”€β”€ providers/        # LLM provider integrations
└── tools/            # File ops, git, tests, etc.

Stack: TypeScript + Node.js 22 + Vitest + oxlint/oxfmt + Zod


πŸŽ“ Use Cases

  • Feature development β€” Get tested, reviewed code
  • Refactoring β€” Improve quality with measurable progress
  • Test generation β€” Meaningful tests, not boilerplate
  • Code review β€” 12-dimensional quality feedback
  • Learning β€” See how quality improves across iterations

⚠️ Known Limitations

We'd rather you know upfront:

  • TypeScript/JavaScript first β€” Other languages have basic support
  • CLI-only β€” No IDE extension yet (VS Code planned)
  • Iteration takes time β€” Convergence adds 2-5 min per task
  • LLM-dependent β€” Quality depends on your model choice
  • Early stage β€” Not yet battle-tested at enterprise scale

🀝 Contributing

Contributions welcome:

  • πŸ› Bug reports and feature requests
  • πŸ”¬ New quality analyzers
  • πŸ”Œ Additional LLM providers
  • πŸ“š Documentation and examples

See CONTRIBUTING.md.


πŸ“„ License

MIT Β© Corbat


Built by developers who measure before they ship πŸ₯₯

GitHub Β· corbat.tech Β· npm

About

Autonomous coding agent with self-review and quality convergence. Uses COCO methodology (Converge-Orchestrate-Complete-Output) to generate production-ready code with 85+ quality scores.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •