Skip to content

Commit ef4271e

Browse files
committed
fix(sync): sync command count to 77 after rebase on main (closes #173)
Issue #173: PR #166 was written when main had 70 commands. After rebasing on latest main (which merged orient #165, affected #142, and others), the runtime COMMAND_REGISTRY now reports 77 commands. Ran sync_command_count.py --apply to regenerate all count references: - README.md: 5 substitutions - SKILL-QUICK.md: 5 substitutions - SKILL.md: 2 substitutions - pyproject.toml: 1 substitution - scripts/graph_model.py: 1 substitution - skill.json: 1 substitution Also resolved rebase conflicts in: - scripts/mcp_server.py: merged Phase 1 (staleness) + Phase 4 (worktree) banner methods — both coexist on the MCP server - scripts/sync/__init__.py: merged worktree (Phase 4) + pending (Phase 1) exports into unified __all__ Pre-existing finding (NOT caused by this PR): the 'affected' command (PR #142, already on main) uses -f for --filter, which conflicts with the global --format/-f flag added by codelens.py. This breaks ALL CLI invocations that trigger argparse registration (e.g. 'codelens affected --help'). Flagged for BOS — separate issue needed.
1 parent b70b41b commit ef4271e

6 files changed

Lines changed: 15 additions & 15 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
> **Before an AI writes a new class/id/function, CodeLens must be checked. This is not optional.**
44
5-
CodeLens is an AI-native code intelligence platform that gives AI agents **full visibility** into a codebase before they write any code. It prevents collision, overwrite of existing logic, security vulnerabilities, and dead code through 71 CLI commands, an MCP server with 69 tools (54 static + 15 dynamic), AST-based taint analysis, live CVE/OSV scanning, a plugin system with OWASP Top 10 + Compliance rule packs, a true graph data model (nodes + edges) for structural code queries, and token-efficient `--format compact` output for high-volume agent workflows (issue #17).
5+
CodeLens is an AI-native code intelligence platform that gives AI agents **full visibility** into a codebase before they write any code. It prevents collision, overwrite of existing logic, security vulnerabilities, and dead code through 77 CLI commands, an MCP server with 75 tools (56 static + 19 dynamic), AST-based taint analysis, live CVE/OSV scanning, a plugin system with OWASP Top 10 + Compliance rule packs, a true graph data model (nodes + edges) for structural code queries, and token-efficient `--format compact` output for high-volume agent workflows (issue #17).
66

77
## Features
88

9-
- **71 CLI Commands** — From basic scan/query to AST taint analysis, CVE scanning, plugin management, auto-fix, dashboards, CI/CD quality gates, and `graph-schema` for cheap graph-shape introspection
10-
- **MCP Server (69 Tools)** — Native AI agent integration via Model Context Protocol (JSON-RPC over stdio), 54 statically-defined tools + 15 dynamically discovered, every tool accepts a `format` parameter (`json`/`markdown`/`ai`/`sarif`/`compact`)
9+
- **77 CLI Commands** — From basic scan/query to AST taint analysis, CVE scanning, plugin management, auto-fix, dashboards, CI/CD quality gates, and `graph-schema` for cheap graph-shape introspection
10+
- **MCP Server (75 Tools)** — Native AI agent integration via Model Context Protocol (JSON-RPC over stdio), 56 statically-defined tools + 19 dynamically discovered, every tool accepts a `format` parameter (`json`/`markdown`/`ai`/`sarif`/`compact`)
1111
- **Token-Efficient Compact Output (v8.2, issue #17)**`--format compact` produces single-char-key JSON with abbreviated types, omitted null fields, and relative paths — ~50% smaller than `json` on real trace output. Combined with `--limit`/`--offset` pagination, 5 structural queries now cost <5k tokens (down from 30-80k)
1212
- **AST Taint Engine** — Tree-sitter based taint analysis with return-value propagation, scope hierarchy, and branch condition refinement
1313
- **Live CVE/OSV Scanning** — Real-time vulnerability data from OSV.dev API with SQLite cache, 9 ecosystems (PyPI, npm, crates.io, Go, Maven, NuGet, RubyGems, Pub, Hex)
@@ -225,8 +225,8 @@ codelens/
225225
│ ├── changelog.md # Older changelog (per-version highlights)
226226
│ └── agent-integration.md # AI agent integration guide
227227
├── scripts/
228-
│ ├── codelens.py # CLI entry point (71 commands registered)
229-
│ ├── mcp_server.py # MCP JSON-RPC server (69 tools)
228+
│ ├── codelens.py # CLI entry point (77 commands registered)
229+
│ ├── mcp_server.py # MCP JSON-RPC server (75 tools)
230230
│ ├── registry.py # Registry read/write/build
231231
│ ├── persistent_registry.py # SQLite persistent storage (WAL mode)
232232
│ ├── base_parser.py # Base tree-sitter parser

SKILL-QUICK.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ $CLI list --limit 5 --offset 10 --format compact # → paginated + co
116116
| "Cross-file taint" | `dataflow` | `taint` (taint is single-file, AST-deep) |
117117
| "Auto-fix issues" | `fix` | `check` (check just gates, doesn't fix) |
118118

119-
## All 71 Commands
119+
## All 77 Commands
120120

121121
### Setup & Lifecycle (8+)
122122
`init` · `scan [--incremental] [--max-files N] [--full]` · `registry-validate` · `detect` · `watch [--debounce SECS] [--git-mode] [--interval SECS]` · `git-status` · `migrate` · `serve` · `lsp-status` (issue #33: `codelens --lsp-status` top-level flag is an alias of `codelens lsp-status` — both delegate to `hybrid_engine.get_lsp_status()` and return the identical payload)
@@ -148,19 +148,19 @@ $CLI list --limit 5 --offset 10 --format compact # → paginated + co
148148
### Tooling (1)
149149
`plugin <install|list|search|update|info|validate>`
150150

151-
**Total: 71 commands** (auto-registered via `commands/__init__.py`; rerun `python3 scripts/sync_command_count.py --apply` after adding/removing a command)
151+
**Total: 77 commands** (auto-registered via `commands/__init__.py`; rerun `python3 scripts/sync_command_count.py --apply` after adding/removing a command)
152152

153-
## MCP Server (69 Tools)
153+
## MCP Server (75 Tools)
154154

155155
Start the MCP server for AI agent integration:
156156

157157
```bash
158158
python3 scripts/codelens.py serve
159159
```
160160

161-
Exposes 69 tools as `codelens_<command>` (e.g., `codelens_query`, `codelens_taint`, `codelens_graph_schema`, `codelens_architecture`, `codelens_resolve_types`, `codelens_git_status`):
161+
Exposes 75 tools as `codelens_<command>` (e.g., `codelens_query`, `codelens_taint`, `codelens_graph_schema`, `codelens_architecture`, `codelens_resolve_types`, `codelens_git_status`):
162162
- 50 statically-defined tools (full JSON schemas in `mcp_server.py`)
163-
- 15 dynamically-discovered tools (auto-discovered from `COMMAND_REGISTRY`; long-running `watch` and `serve` are excluded)
163+
- 19 dynamically-discovered tools (auto-discovered from `COMMAND_REGISTRY`; long-running `watch` and `serve` are excluded)
164164
- Every tool accepts a `format` parameter (`json`/`markdown`/`ai`/`sarif`/`compact`). Use `format: "compact"` for token-efficient responses (~50% smaller than `json`).
165165
- `watch` and `serve` itself are excluded (long-running)
166166

SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
name: codelens
33
description: >
4-
CodeLens — AI-Native Code Intelligence. 71 commands for AI-powered code analysis,
4+
CodeLens — AI-Native Code Intelligence. 77 commands for AI-powered code analysis,
55
security auditing, quality scoring, AST-based taint analysis, live CVE scanning,
66
and pre-write safety checks. Supports 28+ languages with tree-sitter + regex
7-
fallback parsing. MCP server exposes 69 tools for AI agent integration.
7+
fallback parsing. MCP server exposes 75 tools for AI agent integration.
88
For quick command reference with validated output schemas, see SKILL-QUICK.md.
99
For version history, see CHANGELOG.md.
1010
---

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "codelens"
77
version = "8.2.0"
8-
description = "Live Codebase Reference Intelligence — 71 commands for AI-powered code analysis, security auditing, and quality scoring"
8+
description = "Live Codebase Reference Intelligence — 77 commands for AI-powered code analysis, security auditing, and quality scoring"
99
readme = "README.md"
1010
license = {text = "MIT"}
1111
requires-python = ">=3.8"

scripts/graph_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- New tables `graph_nodes` and `graph_edges` are additive (prefixed `graph_`
1414
to avoid colliding with any existing table name).
1515
- The flat registry tables and JSON files are untouched.
16-
- All 71 existing CLI commands continue to work unchanged.
16+
- All 77 existing CLI commands continue to work unchanged.
1717
1818
Schema:
1919
graph_nodes(

skill.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "codelens",
33
"version": "8.2.0",
4-
"description": "Live Codebase Reference Intelligence. 71 commands for AI-powered code analysis, security auditing, quality scoring, and pre-write safety checks. Supports 28+ languages with regex+AST hybrid parsing. Must activate before writing/editing/deleting any class, id, or function.",
4+
"description": "Live Codebase Reference Intelligence. 77 commands for AI-powered code analysis, security auditing, quality scoring, and pre-write safety checks. Supports 28+ languages with regex+AST hybrid parsing. Must activate before writing/editing/deleting any class, id, or function.",
55
"author": "codelens",
66
"command_categories": {
77
"setup": [

0 commit comments

Comments
 (0)