@corbat-tech/coco 1.0.2 β†’ 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,462 +1,253 @@
1
- # πŸ₯₯ Corbat-Coco: Autonomous Coding Agent with Real Quality Iteration
1
+ <p align="center">
2
+ <img src="https://img.shields.io/badge/v1.2.0-stable-blueviolet?style=for-the-badge" alt="Version">
3
+ <img src="https://img.shields.io/badge/TypeScript-5.7-3178c6?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript">
4
+ <img src="https://img.shields.io/badge/Node.js-22+-339933?style=for-the-badge&logo=nodedotjs&logoColor=white" alt="Node.js">
5
+ <img src="https://img.shields.io/badge/License-MIT-f5c542?style=for-the-badge" alt="MIT License">
6
+ <img src="https://img.shields.io/badge/Tests-4350%2B_passing-22c55e?style=for-the-badge" alt="Tests">
7
+ </p>
2
8
 
3
- **The AI coding agent that doesn't just generate codeβ€”it iterates until it's actually good.**
9
+ <h1 align="center">πŸ₯₯ Corbat-Coco</h1>
4
10
 
5
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue)](https://www.typescriptlang.org/)
6
- [![Node.js](https://img.shields.io/badge/Node.js-22+-green)](https://nodejs.org/)
7
- [![License](https://img.shields.io/badge/License-MIT-yellow)](./LICENSE)
8
- [![Tests](https://img.shields.io/badge/Tests-3909%20passing-brightgreen)](./)
11
+ <p align="center">
12
+ <strong>The open-source coding agent that iterates on your code until it's actually production-ready.</strong>
13
+ </p>
9
14
 
10
- ---
11
-
12
- ## What Makes Coco Different
13
-
14
- Most AI coding assistants generate code and hope for the best. Coco is different:
15
-
16
- 1. **Generates** code with your favorite LLM (Claude, GPT-4, Gemini)
17
- 2. **Measures** quality with real metrics (coverage, security, complexity)
18
- 3. **Analyzes** test failures to find root causes
19
- 4. **Fixes** issues with targeted changes
20
- 5. **Repeats** until quality reaches 85+ (senior engineer level)
21
-
22
- All autonomous. All verifiable. All open source.
23
-
24
- ---
25
-
26
- ## The Problem with AI Code Generation
27
-
28
- Current AI assistants:
29
- - Generate code that looks good but fails in production
30
- - Don't run tests or validate output
31
- - Make you iterate manually
32
- - Can't coordinate complex tasks
33
-
34
- **Result**: You spend hours debugging AI-generated code.
35
-
36
- ---
37
-
38
- ## How Coco Solves It
39
-
40
- ### 1. Real Quality Measurement
41
-
42
- Coco measures 12 dimensions of code quality:
43
- - **Test Coverage**: Runs your tests with c8/v8 instrumentation (not estimated)
44
- - **Security**: Scans for vulnerabilities with npm audit + OWASP checks
45
- - **Complexity**: Calculates cyclomatic complexity from AST
46
- - **Correctness**: Validates tests pass + builds succeed
47
- - **Maintainability**: Real metrics from code analysis
48
- - ... and 7 more
49
-
50
- **No fake scores. No hardcoded values. Real metrics.**
51
-
52
- Current state: **58.3% real measurements** (up from 0%), with 41.7% still using safe defaults.
53
-
54
- ### 2. Smart Iteration Loop
55
-
56
- When tests fail, Coco:
57
- - Parses stack traces to find the error location
58
- - Reads surrounding code for context
59
- - Diagnoses root cause (not just symptoms)
60
- - Generates targeted fix (not rewriting entire file)
61
- - Re-validates and repeats if needed
62
-
63
- **Target**: 70%+ of failures fixed in first iteration.
64
-
65
- ### 3. Multi-Agent Coordination
66
-
67
- Complex tasks are decomposed and executed by specialized agents:
68
- - **Researcher**: Explores codebase, finds patterns
69
- - **Coder**: Writes production code
70
- - **Tester**: Generates comprehensive tests
71
- - **Reviewer**: Identifies issues
72
- - **Optimizer**: Reduces complexity
73
-
74
- Agents work in parallel where possible, coordinate when needed.
75
-
76
- ### 4. AST-Aware Validation
77
-
78
- Before saving any file:
79
- - Parses AST to validate syntax
80
- - Checks TypeScript semantics
81
- - Analyzes imports
82
- - Verifies build succeeds
83
-
84
- **Result**: Zero broken builds from AI edits.
85
-
86
- ### 5. Production Hardening
87
-
88
- - **Error Recovery**: Auto-recovers from 8 error types (syntax, timeout, dependencies, etc.)
89
- - **Checkpoint/Resume**: Ctrl+C saves state, resume anytime
90
- - **Resource Limits**: Prevents runaway costs with configurable quotas
91
- - **Streaming Output**: Real-time feedback as code generates
15
+ <p align="center">
16
+ <em>Generate β†’ Test β†’ Measure β†’ Fix β†’ Repeat β€” autonomously.</em>
17
+ </p>
92
18
 
93
19
  ---
94
20
 
95
- ## Architecture
96
-
97
- ### COCO Methodology (4 Phases)
21
+ ## Why Coco?
98
22
 
99
- 1. **Converge**: Gather requirements, create specification
100
- 2. **Orchestrate**: Design architecture, create task backlog
101
- 3. **Complete**: Execute tasks with quality iteration
102
- 4. **Output**: Generate CI/CD, docs, deployment config
23
+ Most AI coding tools generate code and hand it to you. If something breaks β€” tests fail, types don't match, a security issue slips in β€” that's your problem.
103
24
 
104
- ### Quality Iteration Loop
25
+ Coco takes a different approach. After generating code, it **runs your tests, measures quality across 12 dimensions, diagnoses what's wrong, and fixes it** β€” in a loop, autonomously β€” until the code actually meets a quality bar you define.
105
26
 
106
27
  ```
107
- Generate Code β†’ Validate AST β†’ Run Tests β†’ Analyze Failures
108
- ↑ ↓
109
- ←────────── Generate Targeted Fixes β†β”€β”€β”€β”€β”€β”€β”€β”˜
28
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
29
+ β”‚ Generate β”‚ ──► β”‚ Test β”‚ ──► β”‚ Measure β”‚ ──► β”‚ Fix β”‚
30
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
31
+ β”‚
32
+ Score < 85? β”‚ ──► Loop back
33
+ Score β‰₯ 85? β”‚ ──► Done βœ…
110
34
  ```
111
35
 
112
- Stops when:
113
- - Quality β‰₯ 85/100 (minimum)
114
- - Score stable for 2+ iterations
115
- - Tests all passing
116
- - Or max 10 iterations reached
117
-
118
- ### Real Analyzers
119
-
120
- | Analyzer | What It Measures | Data Source |
121
- |----------|------------------|-------------|
122
- | Coverage | Lines, branches, functions, statements | c8/v8 instrumentation |
123
- | Security | Vulnerabilities, dangerous patterns | npm audit + static analysis |
124
- | Complexity | Cyclomatic complexity, maintainability | AST traversal |
125
- | Duplication | Code similarity, redundancy | Token-based comparison |
126
- | Build | Compilation success | tsc/build execution |
127
- | Import | Missing dependencies, circular deps | AST + package.json |
36
+ This is the **Quality Convergence Loop** β€” Coco's core differentiator.
128
37
 
129
38
  ---
130
39
 
131
40
  ## Quick Start
132
41
 
133
- ### Installation
134
-
135
- ```bash
136
- npm install -g corbat-coco
137
- ```
138
-
139
- ### Configuration
140
-
141
42
  ```bash
142
- coco init
43
+ npm install -g @corbat-tech/coco
44
+ coco # Opens interactive REPL β€” guided setup on first run
143
45
  ```
144
46
 
145
- Follow prompts to configure:
146
- - AI Provider (Anthropic, OpenAI, Google)
147
- - API Key
148
- - Project preferences
149
-
150
- ### Basic Usage
151
-
152
- ```bash
153
- coco "Build a REST API with JWT authentication"
154
- ```
155
-
156
- That's it. Coco will:
157
- 1. Ask clarifying questions
158
- 2. Design architecture
159
- 3. Generate code + tests
160
- 4. Iterate until quality β‰₯ 85
161
- 5. Generate CI/CD + docs
162
-
163
- ### Resume Interrupted Session
47
+ That's it. Coco walks you through provider configuration on first launch.
164
48
 
165
49
  ```bash
166
- coco resume
167
- ```
168
-
169
- ### Check Quality of Existing Code
170
-
171
- ```bash
172
- coco quality ./src
50
+ # Or use it directly:
51
+ coco "Add a REST API endpoint for user authentication with tests"
173
52
  ```
174
53
 
175
54
  ---
176
55
 
177
- ## Real Results
56
+ ## What Coco Does Well
178
57
 
179
- ### Week 1 Achievements βœ…
58
+ ### Quality Convergence Loop
180
59
 
181
- **Goal**: Replace fake metrics with real measurements
60
+ Coco doesn't just generate code β€” it iterates until quality converges:
182
61
 
183
- **Results**:
184
- - Hardcoded metrics: 100% β†’ **41.7%** βœ…
185
- - New analyzers: **4** (coverage, security, complexity, duplication)
186
- - New tests: **62** (all passing)
187
- - E2E tests: **6** (full pipeline validation)
62
+ | Iteration | Score | What happened |
63
+ |:---------:|:-----:|---------------|
64
+ | 1 | 52 | Code generated β€” 3 tests failing, no error handling |
65
+ | 2 | 71 | Tests fixed, security vulnerability found |
66
+ | 3 | 84 | Security patched, coverage improved to 82% |
67
+ | 4 | 91 | All green β€” quality converged βœ… |
188
68
 
189
- **Before**:
190
- ```javascript
191
- // All hardcoded 😱
192
- dimensions: {
193
- testCoverage: 80, // Fake
194
- security: 100, // Fake
195
- complexity: 90, // Fake
196
- // ... all fake
197
- }
198
- ```
69
+ The loop is configurable: target score, max iterations, convergence threshold, security requirements. You control the bar.
199
70
 
200
- **After**:
201
- ```typescript
202
- // Real measurements βœ…
203
- const coverage = await this.coverageAnalyzer.analyze(files);
204
- const security = await this.securityScanner.scan(files);
205
- const complexity = await this.complexityAnalyzer.analyze(files);
206
-
207
- dimensions: {
208
- testCoverage: coverage.lines.percentage, // REAL
209
- security: security.score, // REAL
210
- complexity: complexity.score, // REAL
211
- // ... 7 more real metrics
212
- }
213
- ```
71
+ ### 12-Dimension Quality Scoring
214
72
 
215
- ### Benchmark Results
73
+ Every iteration measures your code across 12 dimensions using real static analysis:
216
74
 
217
- Running Coco on itself (corbat-coco codebase):
75
+ | Dimension | How it's measured |
76
+ |-----------|-------------------|
77
+ | Test Coverage | c8/v8 instrumentation |
78
+ | Security | Pattern matching + optional Snyk |
79
+ | Complexity | Cyclomatic complexity via AST parsing |
80
+ | Duplication | Line-based similarity detection |
81
+ | Correctness | Test pass rate + build verification |
82
+ | Style | oxlint / eslint / biome integration |
83
+ | Documentation | JSDoc coverage analysis |
84
+ | Readability | AST: naming quality, function length, nesting |
85
+ | Maintainability | AST: file size, coupling, function count |
86
+ | Test Quality | Assertion density, edge case coverage |
87
+ | Completeness | Export density + test file coverage |
88
+ | Robustness | Error handling pattern detection |
218
89
 
219
- ```
220
- ⏱️ Duration: 19.8s
221
- πŸ“Š Overall Score: 60/100
222
- πŸ“ˆ Real Metrics: 7/12 (58.3%)
223
- πŸ›‘οΈ Security: 0 critical issues
224
- πŸ“ Complexity: 100/100 (low)
225
- πŸ”„ Duplication: 72.5/100 (27.5% duplication)
226
- πŸ“„ Issues Found: 311
227
- πŸ’‘ Suggestions: 3
228
- ```
229
-
230
- **Validation**: βœ… Target met (≀42% hardcoded)
231
-
232
- ---
233
-
234
- ## Development Roadmap
90
+ > **Transparency note**: 7 dimensions use instrumented measurements. 5 use heuristic-based static analysis. We label which is which β€” no black boxes.
235
91
 
236
- ### Phase 1: Foundation βœ… (Weeks 1-4) - COMPLETE
92
+ ### Multi-Provider Support
237
93
 
238
- - [x] Real quality scoring system
239
- - [x] AST-aware generation pipeline
240
- - [x] Smart iteration loop
241
- - [x] Test failure analyzer
242
- - [x] Build verifier
243
- - [x] Import analyzer
94
+ Bring your own API keys. Coco works with:
244
95
 
245
- **Current Score**: ~7.0/10
96
+ | Provider | Auth | Models |
97
+ |----------|------|--------|
98
+ | **Anthropic** | API key / OAuth PKCE | Claude Opus, Sonnet, Haiku |
99
+ | **OpenAI** | API key | GPT-4o, o1, o3 |
100
+ | **Google** | API key / gcloud ADC | Gemini Pro, Flash |
101
+ | **Ollama** | Local | Any local model |
102
+ | **LM Studio** | Local | Any GGUF model |
103
+ | **Moonshot** | API key | Kimi models |
246
104
 
247
- ### Phase 2: Intelligence (Weeks 5-8) - IN PROGRESS
105
+ ### Multi-Agent Architecture
248
106
 
249
- - [x] Agent execution engine
250
- - [x] Parallel agent coordinator
251
- - [ ] Agent communication protocol
252
- - [ ] Semantic code search
253
- - [ ] Codebase knowledge graph
254
- - [ ] Smart task decomposition
255
- - [ ] Adaptive planning
256
-
257
- **Target Score**: 8.5/10
258
-
259
- ### Phase 3: Excellence (Weeks 9-12) - IN PROGRESS
260
-
261
- - [x] Error recovery system
262
- - [x] Progress tracking & interruption
263
- - [ ] Resource limits & quotas
264
- - [ ] Multi-language AST support
265
- - [ ] Framework detection
266
- - [ ] Interactive dashboard
267
- - [ ] Streaming output
268
- - [ ] Performance optimization
269
-
270
- **Target Score**: 9.0+/10
271
-
272
- ---
107
+ Six specialized agents with weighted-scoring routing:
273
108
 
274
- ## Honest Comparison with Alternatives
109
+ - **Researcher** β€” Explores, analyzes, maps the codebase
110
+ - **Coder** β€” Writes and edits code (default route)
111
+ - **Tester** β€” Generates tests, improves coverage
112
+ - **Reviewer** β€” Code review, quality auditing
113
+ - **Optimizer** β€” Refactoring and performance
114
+ - **Planner** β€” Architecture design, task decomposition
275
115
 
276
- | Feature | Cursor | Aider | Cody | Devin | **Coco** |
277
- |---------|--------|-------|------|-------|----------|
278
- | IDE Integration | βœ… | ❌ | βœ… | ❌ | πŸ”„ (planned Q2) |
279
- | Real Quality Metrics | ❌ | ❌ | ❌ | βœ… | βœ… (58% real) |
280
- | Root Cause Analysis | ❌ | ❌ | ❌ | βœ… | βœ… |
281
- | Multi-Agent | ❌ | ❌ | ❌ | βœ… | βœ… |
282
- | AST Validation | ❌ | ❌ | ❌ | βœ… | βœ… |
283
- | Error Recovery | ❌ | ❌ | ❌ | βœ… | βœ… |
284
- | Checkpoint/Resume | ❌ | ❌ | ❌ | βœ… | βœ… |
285
- | Open Source | ❌ | βœ… | ❌ | ❌ | βœ… |
286
- | Price | $20/mo | Free | $9/mo | $500/mo | **Free** |
116
+ Coco picks the right agent for each task automatically. When confidence is low, it defaults to the coder β€” no guessing games.
287
117
 
288
- **Verdict**: Coco offers Devin-level autonomy at Aider's price (free).
118
+ ### Interactive REPL
289
119
 
290
- ---
120
+ A terminal-first experience with:
291
121
 
292
- ## Current Limitations
122
+ - **Ghost-text completion** β€” Tab to accept inline suggestions
123
+ - **Slash commands** β€” `/coco`, `/plan`, `/build`, `/diff`, `/commit`, `/help`
124
+ - **Image paste** β€” `Ctrl+V` to paste screenshots for visual context
125
+ - **Intent recognition** β€” Natural language mapped to commands
126
+ - **Context management** β€” Automatic compaction when context grows large
293
127
 
294
- We believe in honesty:
128
+ ### Production Hardening
295
129
 
296
- - **Languages**: Best with TypeScript/JavaScript. Python/Go/Rust support is experimental.
297
- - **Metrics**: 58.3% real, 41.7% use safe defaults (improving to 100% real by Week 4)
298
- - **IDE Integration**: CLI-first. VS Code extension coming Q2 2026.
299
- - **Learning Curve**: More complex than Copilot. Power tool, not autocomplete.
300
- - **Cost**: Uses your LLM API keys. ~$2-5 per project with Claude.
301
- - **Speed**: Iteration takes time. Not for quick edits (use Cursor for that).
302
- - **Multi-Agent**: Implemented but not yet battle-tested at scale.
130
+ - **Error recovery** with typed error strategies and exponential backoff
131
+ - **Checkpoint/Resume** β€” `Ctrl+C` saves state, `coco resume` picks up where you left off
132
+ - **AST validation** β€” Syntax-checks generated code before saving
133
+ - **Convergence analysis** β€” Detects oscillation, diminishing returns, and stuck patterns
134
+ - **Path sandboxing** β€” Tools can only access files within the project
303
135
 
304
136
  ---
305
137
 
306
- ## Technical Details
307
-
308
- ### Stack
309
-
310
- - **Language**: TypeScript (ESM, strict mode)
311
- - **Runtime**: Node.js 22+
312
- - **Package Manager**: pnpm
313
- - **Testing**: Vitest (3,909 tests)
314
- - **Linting**: oxlint (fast, minimal config)
315
- - **Formatting**: oxfmt
316
- - **Build**: tsup (fast ESM bundler)
138
+ ## COCO Methodology
317
139
 
318
- ### Project Structure
140
+ Four phases, each with a dedicated executor:
319
141
 
320
142
  ```
321
- corbat-coco/
322
- β”œβ”€β”€ src/
323
- β”‚ β”œβ”€β”€ agents/ # Multi-agent coordination
324
- β”‚ β”œβ”€β”€ cli/ # CLI commands
325
- β”‚ β”œβ”€β”€ orchestrator/ # Central coordinator
326
- β”‚ β”œβ”€β”€ phases/ # COCO phases (4 phases)
327
- β”‚ β”œβ”€β”€ quality/ # Quality analyzers
328
- β”‚ β”‚ └── analyzers/ # Coverage, security, complexity, etc.
329
- β”‚ β”œβ”€β”€ providers/ # LLM providers (Anthropic, OpenAI, Google)
330
- β”‚ β”œβ”€β”€ tools/ # Tool implementations
331
- β”‚ └── types/ # Type definitions
332
- β”œβ”€β”€ test/
333
- β”‚ β”œβ”€β”€ e2e/ # End-to-end tests
334
- β”‚ └── benchmarks/ # Performance benchmarks
335
- └── docs/ # Documentation
143
+ CONVERGE ORCHESTRATE COMPLETE OUTPUT
144
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
145
+ β”‚ Gather β”‚ β”‚ Design β”‚ β”‚ Execute with β”‚ β”‚ Generate β”‚
146
+ β”‚ reqs β”‚ ──► β”‚ architecture │──►│ quality │──►│ CI/CD, β”‚
147
+ β”‚ + spec β”‚ β”‚ + backlog β”‚ β”‚ convergence β”‚ β”‚ docs β”‚
148
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
149
+ ↑ ↓
150
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
151
+ β”‚ Convergence β”‚
152
+ β”‚ Loop β”‚
153
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
336
154
  ```
337
155
 
338
- ### Quality Thresholds
339
-
340
- - **Minimum Score**: 85/100 (senior-level)
341
- - **Target Score**: 95/100 (excellent)
342
- - **Test Coverage**: 80%+ required
343
- - **Security**: 100/100 (zero tolerance)
344
- - **Max Iterations**: 10 per task
345
- - **Convergence**: Delta < 2 between iterations
156
+ 1. **Converge** β€” Understand what needs to be built. Gather requirements, produce a spec.
157
+ 2. **Orchestrate** β€” Design the architecture, decompose into a task backlog.
158
+ 3. **Complete** β€” Execute each task with the quality convergence loop.
159
+ 4. **Output** β€” Generate CI/CD pipelines, documentation, and deployment config.
346
160
 
347
161
  ---
348
162
 
349
- ## Contributing
163
+ ## Use Cases
350
164
 
351
- Coco is open source (MIT). We welcome:
352
- - Bug reports
353
- - Feature requests
354
- - Pull requests
355
- - Documentation improvements
356
- - Real-world usage feedback
165
+ Coco is designed for developers who want AI assistance with **accountability**:
166
+
167
+ - **Feature development** β€” Describe what you want, get tested and reviewed code
168
+ - **Vibe coding** β€” Explore ideas interactively; Coco handles the quality checks
169
+ - **Refactoring** β€” Point at code and say "make this better" β€” Coco iterates until metrics improve
170
+ - **Test generation** β€” Improve coverage with meaningful tests, not boilerplate
171
+ - **Code review** β€” Get multi-dimensional quality feedback on existing code
172
+ - **Learning** β€” See how code quality improves across iterations
357
173
 
358
- See [CONTRIBUTING.md](./CONTRIBUTING.md).
174
+ ---
359
175
 
360
- ### Development
176
+ ## Development
361
177
 
362
178
  ```bash
363
- # Clone repo
364
179
  git clone https://github.com/corbat/corbat-coco
365
180
  cd corbat-coco
366
-
367
- # Install dependencies
368
181
  pnpm install
369
-
370
- # Run in dev mode
371
- pnpm dev
372
-
373
- # Run tests
374
- pnpm test
375
-
376
- # Run quality benchmark
377
- pnpm benchmark
378
-
379
- # Full check (typecheck + lint + test)
380
- pnpm check
182
+ pnpm dev # Run in dev mode (tsx)
183
+ pnpm test # 4,350+ tests via Vitest
184
+ pnpm check # typecheck + lint + test
185
+ pnpm build # Production build (tsup)
381
186
  ```
382
187
 
383
- ---
384
-
385
- ## FAQ
386
-
387
- ### Q: Is Coco production-ready?
388
-
389
- **A**: Partially. The quality scoring system (Week 1) is production-ready and thoroughly tested. Multi-agent coordination (Week 5-8) is implemented but needs more real-world validation. Use for internal projects first.
390
-
391
- ### Q: How does Coco compare to Devin?
392
-
393
- **A**: Similar approach (autonomous iteration, quality metrics, multi-agent), but Coco is:
394
- - **Open source** (vs closed)
395
- - **Bring your own API keys** (vs $500/mo subscription)
396
- - **More transparent** (you can inspect every metric)
397
- - **Earlier stage** (Devin has 2+ years of production usage)
398
-
399
- ### Q: Why are 41.7% of metrics still hardcoded?
400
-
401
- **A**: These are **safe defaults**, not fake metrics:
402
- - `style: 100` when no linter is configured (legitimate default)
403
- - `correctness`, `completeness`, `robustness`, `testQuality`, `documentation` are pending Week 2-4 implementations
404
-
405
- We're committed to reaching **0% hardcoded** by end of Phase 1 (Week 4).
406
-
407
- ### Q: Can I use this with my company's code?
408
-
409
- **A**: Yes, but:
410
- - Code stays on your machine (not sent to third parties)
411
- - LLM calls go to your chosen provider (Anthropic/OpenAI/Google)
412
- - Review generated code before committing
413
- - Start with non-critical projects
414
-
415
- ### Q: Does Coco replace human developers?
188
+ ### Project Structure
416
189
 
417
- **A**: No. Coco is a **force multiplier**, not a replacement:
418
- - Best for boilerplate, CRUD APIs, repetitive tasks
419
- - Requires human review and validation
420
- - Struggles with novel algorithms and complex business logic
421
- - Think "junior developer with infinite patience"
190
+ ```
191
+ src/
192
+ β”œβ”€β”€ agents/ # Multi-agent coordination + weighted routing
193
+ β”œβ”€β”€ cli/ # REPL, commands, input handling, output rendering
194
+ β”œβ”€β”€ orchestrator/ # Phase coordinator + state recovery
195
+ β”œβ”€β”€ phases/ # COCO phases (converge/orchestrate/complete/output)
196
+ β”œβ”€β”€ quality/ # 12 quality analyzers + convergence engine
197
+ β”œβ”€β”€ providers/ # 6 LLM providers + OAuth flows
198
+ β”œβ”€β”€ tools/ # 20+ tool implementations
199
+ β”œβ”€β”€ hooks/ # Lifecycle hooks (safety, lint, format, audit)
200
+ β”œβ”€β”€ mcp/ # MCP server for external integration
201
+ └── config/ # Zod-validated configuration system
202
+ ```
422
203
 
423
- ### Q: What's the roadmap to 9.0/10?
204
+ ### Technology Stack
424
205
 
425
- **A**: See [IMPROVEMENT_ROADMAP_2026.md](./IMPROVEMENT_ROADMAP_2026.md) for the complete 12-week plan.
206
+ | Component | Technology |
207
+ |-----------|-----------|
208
+ | Language | TypeScript (ESM, strict mode) |
209
+ | Runtime | Node.js 22+ |
210
+ | Testing | Vitest (4,350+ tests) |
211
+ | Linting | oxlint |
212
+ | Formatting | oxfmt |
213
+ | Build | tsup |
214
+ | Schema validation | Zod |
426
215
 
427
216
  ---
428
217
 
429
- ## License
218
+ ## Known Limitations
430
219
 
431
- MIT License - see [LICENSE](./LICENSE).
220
+ We'd rather you know upfront:
432
221
 
433
- ---
222
+ - **TypeScript/JavaScript first** β€” Other languages have basic support but fewer analyzers
223
+ - **CLI-only** β€” No IDE extension yet (VS Code integration is planned)
224
+ - **Iteration takes time** β€” The convergence loop adds 2-5 minutes per task. For quick one-line fixes, a simpler tool may be faster
225
+ - **Heuristic analyzers** β€” 5 of 12 quality dimensions use pattern-based heuristics, not deep semantic analysis
226
+ - **LLM-dependent** β€” Output quality depends on the model you connect. Larger models produce better results
227
+ - **Early stage** β€” Actively developed. Not yet battle-tested at large enterprise scale
434
228
 
435
- ## Credits
229
+ ---
436
230
 
437
- **Built with**:
438
- - TypeScript + Node.js
439
- - Anthropic Claude, OpenAI GPT-4, Google Gemini
440
- - Vitest, oxc, tree-sitter, c8
231
+ ## Contributing
441
232
 
442
- **Made with πŸ₯₯ by developers who are tired of debugging AI code.**
233
+ We welcome contributions of all kinds:
443
234
 
444
- ---
445
-
446
- ## Links
235
+ - Bug reports and feature requests
236
+ - New quality analyzers
237
+ - Additional LLM provider integrations
238
+ - Documentation and examples
239
+ - Real-world usage feedback
447
240
 
448
- - **GitHub**: [github.com/corbat/corbat-coco](https://github.com/corbat/corbat-coco)
449
- - **Documentation**: [docs.corbat.dev](https://docs.corbat.dev)
450
- - **Roadmap**: [IMPROVEMENT_ROADMAP_2026.md](./IMPROVEMENT_ROADMAP_2026.md)
451
- - **Week 1 Report**: [WEEK_1_COMPLETE.md](./WEEK_1_COMPLETE.md)
452
- - **Discord**: [discord.gg/corbat](https://discord.gg/corbat) (coming soon)
241
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
453
242
 
454
243
  ---
455
244
 
456
- **Status**: 🚧 Week 1 Complete, Weeks 2-12 In Progress
245
+ ## About
457
246
 
458
- **Next Milestone**: Phase 1 Complete (Week 4) - Target Score 7.5/10
247
+ Corbat-Coco is built by [Corbat](https://corbat.tech), a technology consultancy that believes AI coding tools should be transparent, measurable, and open source.
459
248
 
460
- **Current Score**: ~7.0/10 (honest, verifiable)
249
+ <p align="center">
250
+ <a href="https://github.com/corbat/corbat-coco">GitHub</a> Β· <a href="https://corbat.tech">corbat.tech</a>
251
+ </p>
461
252
 
462
- **Honest motto**: "We're not #1 yet, but we're getting there. One real metric at a time." πŸ₯₯
253
+ <p align="center"><strong>MIT License</strong> Β· Made by developers who measure before they ship. πŸ₯₯</p>