Skip to content

Commit 92a8c16

Browse files
docs: update README for v0.2.0 — workspace manager, intent tracking, cross-repo
Adds documentation for global workspace mode (serve --auto, register/unregister), intent tracking with 11 verification types, cross-repo scanner (14 frameworks), feedback loop, and updated architecture diagram. Updates CLI commands section from 7 to 12 MCP tools. Adds PyPI badge and uvx/pipx install instructions.
1 parent 0447c23 commit 92a8c16

1 file changed

Lines changed: 111 additions & 7 deletions

File tree

README.md

Lines changed: 111 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.11+-blue.svg?style=flat-square" alt="Python 3.11+"></a>
1111
<a href="https://modelcontextprotocol.io/"><img src="https://img.shields.io/badge/MCP-compatible-purple.svg?style=flat-square" alt="MCP"></a>
1212
<a href="#19-languages"><img src="https://img.shields.io/badge/languages-19-orange.svg?style=flat-square" alt="19 Languages"></a>
13+
<a href="https://pypi.org/project/codebase-intel/"><img src="https://img.shields.io/pypi/v/codebase-intel?style=flat-square" alt="PyPI"></a>
1314
</p>
1415

1516
---
@@ -89,7 +90,12 @@ Code → Graph → Agent Code → Graph ───────────
8990
## Quick Start
9091

9192
```bash
92-
pip install codebase-intel
93+
# Install globally (no venv needed)
94+
uvx codebase-intel --help # ephemeral, like npx
95+
# or
96+
pipx install codebase-intel # persistent global install
97+
# or
98+
pip install codebase-intel # traditional
9399

94100
# Initialize on your project
95101
cd your-project
@@ -101,15 +107,19 @@ codebase-intel status
101107
# Mine decisions from git history
102108
codebase-intel mine --save
103109

110+
# Auto-detect code patterns and generate quality contracts
111+
codebase-intel detect-patterns --save
112+
104113
# Run benchmarks (see the before/after)
105114
codebase-intel benchmark
106115

107116
# View live dashboard
108117
codebase-intel dashboard
109118
```
110119

111-
### Connect to Claude Code
120+
### Connect to Claude Code / any MCP client
112121

122+
**Single project:**
113123
```json
114124
{
115125
"mcpServers": {
@@ -121,6 +131,27 @@ codebase-intel dashboard
121131
}
122132
```
123133

134+
**Multiple projects (global mode):**
135+
```bash
136+
# Register repos once from anywhere
137+
codebase-intel register ~/projects/user-service
138+
codebase-intel register /opt/services/payment-api
139+
codebase-intel register /var/repos/notification-service
140+
```
141+
142+
```json
143+
{
144+
"mcpServers": {
145+
"codebase-intel": {
146+
"command": "uvx",
147+
"args": ["codebase-intel", "serve", "--auto"]
148+
}
149+
}
150+
}
151+
```
152+
153+
In `--auto` mode, the MCP server automatically routes each request to the correct project based on file paths in the request. No manual switching — works like `npx @playwright/mcp`.
154+
124155
Now your agent automatically gets relevant context, decisions, and contracts before writing code.
125156

126157
---
@@ -217,17 +248,30 @@ Full tree-sitter parsing via [tree-sitter-language-pack](https://github.com/nico
217248
## CLI Commands
218249
219250
```bash
251+
# Core
220252
codebase-intel init [path] # Initialize — build graph, create configs
221253
codebase-intel analyze [--incremental] # Rebuild or update the code graph
222254
codebase-intel mine [--save] # Mine git history for decision candidates
255+
codebase-intel detect-patterns [--save] # Auto-detect code patterns → quality contracts
223256
codebase-intel drift # Run drift detection
224257
codebase-intel benchmark # Measure token efficiency (before/after)
225258
codebase-intel dashboard # Live efficiency tracking over time
226-
codebase-intel serve # Start MCP server
259+
codebase-intel serve [path] # Start MCP server (single project)
227260
codebase-intel status # Component health check
261+
codebase-intel intent [--verify] # Track and verify delivery goals
262+
263+
# Global workspace (multi-project)
264+
codebase-intel register <path> # Register a project globally
265+
codebase-intel unregister <id> # Remove from global registry
266+
codebase-intel projects # List all registered projects
267+
codebase-intel serve --auto # Start MCP server for ALL registered projects
268+
269+
# Cross-repo (microservices)
270+
codebase-intel crossrepo <paths...> # Scan repos for cross-service dependencies
271+
codebase-intel crossrepo --all # Scan all registered projects
228272
```
229273

230-
## MCP Tools (7 tools)
274+
## MCP Tools (12 tools)
231275

232276
| Tool | What it does |
233277
|---|---|
@@ -238,6 +282,11 @@ codebase-intel status # Component health check
238282
| `check_drift` | Verify context freshness before trusting old decisions. |
239283
| `impact_analysis` | "What breaks if I change this file?" |
240284
| `get_status` | Health check — graph stats, decision count, contract count. |
285+
| `record_feedback` | Record if AI output was accepted/rejected — powers the learning loop. |
286+
| `get_efficiency_report` | Live token savings, acceptance rate, before/after proof. |
287+
| `set_intent` | Capture what the user wants with machine-verifiable acceptance criteria. |
288+
| `check_intent` | Verify if acceptance criteria are actually met before marking done. |
289+
| `list_intents` | Show all tracked intents with completion status. |
241290

242291
---
243292

@@ -257,10 +306,60 @@ cp community-contracts/fastapi.yaml .codebase-intel/contracts/
257306

258307
---
259308

309+
## New in v0.2.0
310+
311+
### Global Workspace — One server, all your projects
312+
313+
No more running a separate MCP server per project. Register your repos once, serve them all:
314+
315+
```bash
316+
codebase-intel register ~/projects/user-service
317+
codebase-intel register /opt/services/payment-api
318+
codebase-intel serve --auto
319+
```
320+
321+
The server auto-routes each request to the correct project based on file paths. LRU cache keeps the 5 most recently used projects loaded — older ones are evicted and reloaded on demand.
322+
323+
### Intent Tracking — "Did you actually build what was requested?"
324+
325+
AI agents say "done" when the code compiles. But did they actually deliver what was asked? Intent tracking captures goals with **machine-verifiable** acceptance criteria:
326+
327+
```bash
328+
# Agent sets intent at task start (via MCP tool set_intent)
329+
# Agent works on the task...
330+
# Before marking done, agent calls check_intent
331+
# System runs automated checks: file_exists, function_exists, grep_match, test_passes...
332+
# Returns: 18/21 criteria met — 3 gaps identified
333+
```
334+
335+
11 verification types: `file_exists`, `file_contains`, `function_exists`, `wired`, `cli_works`, `mcp_tool_exists`, `grep_match`, `grep_no_match`, `test_passes`, `custom`, `manual`.
336+
337+
### Cross-Repo Awareness — Microservice dependency mapping
338+
339+
Scans 14 web frameworks across 10 languages to find exposed endpoints and outbound HTTP calls. Maps which service depends on which endpoint:
340+
341+
```bash
342+
codebase-intel crossrepo --all --impact user-service
343+
344+
# Output:
345+
# CRITICAL: 3 services depend on /api/v1/users/{id}
346+
# → payment-service calls this endpoint [CRITICAL] at src/clients/user.py:42
347+
# → notification-service calls this endpoint at lib/api/users.ts:18
348+
```
349+
350+
Supported: FastAPI, Express, Flask, Django, Spring Boot, Gin, Actix, Rails, Phoenix, Laravel, ASP.NET, Ktor, Vapor, Echo.
351+
352+
### Feedback Loop — Learn from acceptance/rejection
353+
354+
Records whether AI-generated code was accepted, modified, or rejected. Over time, identifies which context patterns lead to better output and which rejection reasons are most common.
355+
260356
## Architecture
261357

262358
```
263-
AI Agent (any) ──→ MCP Server (7 tools)
359+
AI Agent (any) ──→ MCP Server (12 tools)
360+
361+
Workspace Manager ←── Global Registry (~/.codebase-intel/)
362+
(multi-project routing, LRU cache)
264363
265364
Context Orchestrator
266365
(token budgeting, priority, conflicts)
@@ -272,8 +371,13 @@ AI Agent (any) ──→ MCP Server (7 tools)
272371
Drift Detector
273372
(staleness, rot, orphans)
274373
275-
Analytics Tracker
276-
(live efficiency metrics)
374+
┌──────────┼──────────┐
375+
Analytics Feedback Intent
376+
Tracker Loop Tracker
377+
└──────────┼──────────┘
378+
379+
Cross-Repo Scanner
380+
(14 frameworks, 10 languages)
277381
```
278382

279383
---

0 commit comments

Comments
 (0)