Skip to content

Commit 801ba72

Browse files
authored
Merge pull request #8 from RandomCodeSpace/docs/update-claude-readme-accuracy
docs: update CLAUDE.md and README.md with verified codebase facts
2 parents 5ee939d + d963ab0 commit 801ba72

2 files changed

Lines changed: 52 additions & 27 deletions

File tree

CLAUDE.md

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
- JavaParser 3.28.0 (Java AST analysis)
2222
- ANTLR 4.13.2 (TypeScript/JavaScript, Python, Go, C#, Rust, C++ grammars)
2323
- Picocli 4.7.7 (CLI framework, integrated with Spring Boot)
24-
- Thymeleaf + HTMX (web UI)
24+
- React 18 + TypeScript + Vite 6 + Tailwind CSS (web UI)
2525
- H2 (incremental analysis cache)
2626

2727
## Architecture
@@ -96,10 +96,10 @@ io.github.randomcodespace.iq
9696
|-- grammar/ # ANTLR parser factory + generated parsers
9797
|-- graph/ # GraphStore (Neo4j facade), GraphRepository (SDN, writes only)
9898
|-- health/ # GraphHealthIndicator (Spring Actuator)
99-
|-- mcp/ # McpTools (30 @McpTool methods, read-only)
99+
|-- mcp/ # McpTools (31 @McpTool methods, read-only)
100100
|-- model/ # CodeNode, CodeEdge, NodeKind (32), EdgeKind (27)
101101
|-- query/ # QueryService, StatsService (categorized), TopologyService
102-
|-- web/ # ExplorerController (Thymeleaf web UI)
102+
|-- web/ # Static resource serving (React SPA)
103103
```
104104

105105
## Critical Rules
@@ -144,6 +144,7 @@ io.github.randomcodespace.iq
144144
| `bundle [path]` | Package graph + source into distributable ZIP |
145145
| `cache [action]` | Manage analysis cache |
146146
| `plugins [action]` | List and inspect detectors |
147+
| `topology [path]` | Show service topology map |
147148
| `version` | Show version info |
148149

149150
### Standard Pipeline
@@ -161,25 +162,46 @@ code-iq serve /path/to/repo # needs enrich if using index
161162

162163
## Server Endpoints (all read-only)
163164

164-
### REST API (`/api`)
165+
### REST API (`/api`) -- 34 endpoints
166+
167+
**GraphController** (`/api`):
165168
- `GET /api/stats` -- Rich categorized statistics (graph, languages, frameworks, infra, connections, auth, architecture)
166169
- `GET /api/stats/detailed?category=` -- Single category stats
167170
- `GET /api/kinds` -- Node kinds with counts
168171
- `GET /api/kinds/{kind}` -- Paginated nodes by kind
169-
- `GET /api/nodes`, `GET /api/edges` -- Paginated queries
172+
- `GET /api/nodes` -- Paginated node queries
170173
- `GET /api/nodes/{id}/detail` -- Full node detail with edges
171174
- `GET /api/nodes/{id}/neighbors` -- Neighbor traversal
175+
- `GET /api/edges` -- Paginated edge queries
172176
- `GET /api/ego/{center}` -- Ego subgraph
173-
- `GET /api/query/cycles`, `/shortest-path`, `/consumers/{id}`, `/producers/{id}`, `/callers/{id}`, `/dependencies/{id}`, `/dependents/{id}`
177+
- `GET /api/query/cycles` -- Cycle detection
178+
- `GET /api/query/shortest-path` -- Shortest path between nodes
179+
- `GET /api/query/consumers/{id}`, `/producers/{id}`, `/callers/{id}`, `/dependencies/{id}`, `/dependents/{id}`
174180
- `GET /api/query/dead-code` -- Dead code detection (semantic edge filtering, excludes entry points)
175-
- `GET /api/triage/component?file=`, `/impact/{id}` -- Agentic triage
181+
- `GET /api/triage/component?file=` -- Agentic triage by file
182+
- `GET /api/triage/impact/{id}` -- Impact trace
176183
- `GET /api/search?q=` -- Free-text search
177184
- `GET /api/file?path=` -- Source files (path traversal protected)
178-
- `GET /api/flow/{view}` -- Flow diagrams
179-
- `GET /api/topology` -- Service topology map
180185

181-
### MCP Tools (30, via `@McpTool` annotation)
182-
`get_stats`, `get_detailed_stats`, `query_nodes`, `query_edges`, `get_node_neighbors`, `get_ego_graph`, `find_cycles`, `find_shortest_path`, `find_consumers`, `find_producers`, `find_callers`, `find_dependencies`, `find_dependents`, `find_dead_code`, `generate_flow`, `run_cypher`, `find_component_by_file`, `trace_impact`, `find_related_endpoints`, `search_graph`, `read_file`, `get_topology`, `service_detail`, `service_dependencies`, `service_dependents`, `blast_radius`, `find_path`, `find_bottlenecks`, `find_circular_deps`, `find_dead_services`
186+
**TopologyController** (`/api/topology`):
187+
- `GET /api/topology` -- Service topology map
188+
- `GET /api/topology/services/{name}` -- Service detail
189+
- `GET /api/topology/services/{name}/deps` -- Service dependencies
190+
- `GET /api/topology/services/{name}/dependents` -- Service dependents
191+
- `GET /api/topology/blast-radius/{nodeId}` -- Blast radius analysis
192+
- `GET /api/topology/path` -- Find path between services
193+
- `GET /api/topology/bottlenecks` -- Find bottleneck services
194+
- `GET /api/topology/circular` -- Circular dependency detection
195+
- `GET /api/topology/dead` -- Dead service detection
196+
197+
**FlowController** (`/api/flow`):
198+
- `GET /api/flow` -- List available flow views
199+
- `GET /api/flow/{view}` -- Flow diagram for specific view
200+
- `GET /api/flow/{view}/{nodeId}/children` -- Node children in flow
201+
- `GET /api/flow/{view}/{nodeId}/parent` -- Node parent in flow
202+
203+
### MCP Tools (31, via `@McpTool` annotation)
204+
`get_stats`, `get_detailed_stats`, `query_nodes`, `query_edges`, `get_node_neighbors`, `get_ego_graph`, `find_cycles`, `find_shortest_path`, `find_consumers`, `find_producers`, `find_callers`, `find_dependencies`, `find_dependents`, `find_dead_code`, `generate_flow`, `run_cypher`, `find_component_by_file`, `trace_impact`, `find_related_endpoints`, `search_graph`, `read_file`, `get_topology`, `service_detail`, `service_dependencies`, `service_dependents`, `blast_radius`, `find_path`, `find_bottlenecks`, `find_circular_deps`, `find_dead_services`, `find_node`
183205

184206
## Adding a New Detector
185207

@@ -218,7 +240,7 @@ code-iq serve /path/to/repo # needs enrich if using index
218240
## Testing
219241

220242
```bash
221-
# Run all tests (~1385 tests)
243+
# Run all tests (~1440 tests)
222244
mvn test
223245

224246
# Run a specific test class
@@ -287,7 +309,7 @@ mvn dependency-check:check
287309
| `config/JacksonConfig.java` | Jackson config (FAIL_ON_UNKNOWN_PROPERTIES disabled for MCP compat) |
288310
| `cache/AnalysisCache.java` | H2 incremental cache |
289311
| `api/GraphController.java` | REST API endpoints (read-only) |
290-
| `mcp/McpTools.java` | 30 MCP tool definitions (`@McpTool`, read-only) |
312+
| `mcp/McpTools.java` | 31 MCP tool definitions (`@McpTool`, read-only) |
291313
| `query/QueryService.java` | Graph query operations with Spring caching |
292314
| `query/StatsService.java` | Rich categorized statistics (7 categories) |
293315
| `query/TopologyService.java` | Service topology queries |
@@ -321,6 +343,7 @@ mvn dependency-check:check
321343
- `codeiq.max-radius` -- max ego graph radius (default: 10)
322344
- `codeiq.max-depth` -- max impact trace depth (default: 10)
323345
- `codeiq.batch-size` -- files per H2 flush batch (default: 500)
346+
- `codeiq.neo4j.enabled` -- Neo4j conditional toggle (default: `true`, overridden to `false` in `indexing` profile)
324347
- `spring.ai.mcp.server.protocol` -- MCP protocol (STREAMABLE)
325348

326349
### Project-level overrides (`.osscodeiq.yml`)

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
---
2020

21-
**OSSCodeIQ** scans codebases to build a deterministic knowledge graph of code relationships -- classes, methods, endpoints, entities, dependencies, infrastructure resources, auth patterns, service topology, and more. 97 detectors across 35+ languages, Neo4j Embedded graph database, Spring AI MCP server (31 tools), REST API (32+ endpoints), React web UI, and zero AI dependency.
21+
**OSSCodeIQ** scans codebases to build a deterministic knowledge graph of code relationships -- classes, methods, endpoints, entities, dependencies, infrastructure resources, auth patterns, service topology, and more. 97 detectors across 35+ languages, Neo4j Embedded graph database, Spring AI MCP server (31 tools), REST API (34 endpoints), React web UI, and zero AI dependency.
2222

2323
## Quick Start
2424

@@ -50,18 +50,18 @@ java -jar target/code-iq-*-cli.jar serve /path/to/repo
5050
- **Neo4j Embedded** graph database -- full Cypher query support, no external server needed
5151
- **H2 analysis cache** -- batched streaming for memory-efficient indexing on CI runners
5252
- **Spring AI MCP server** -- 31 tools via streamable HTTP for AI-powered triage
53-
- **REST API** -- 32+ endpoints for programmatic access
54-
- **React UI** -- Dashboard, Topology (Cytoscape.js), Explorer, Flow, MCP Console (Monaco Editor), API Docs
53+
- **REST API** -- 34 endpoints for programmatic access
54+
- **React UI** -- Dashboard, Topology (Cytoscape.js), Explorer, Flow, MCP Console, API Docs (Swagger)
5555
- **Service Topology** -- AppDynamics-style service map with blast radius, circular deps, bottleneck detection
56-
- **CLI with 14 commands** -- analyze, index, enrich, serve, stats, graph, query, find, flow, bundle, cache, plugins, topology, version
56+
- **CLI with 15 commands** -- analyze, index, enrich, serve, stats, graph, query, find, cypher, flow, topology, bundle, cache, plugins, version
5757
- **Virtual threads** (Java 25) -- adaptive parallelism across all available cores
5858
- **Config-driven pipeline** -- `.osscodeiq.yml` to control languages, detectors, parsers, excludes
5959
- **Multi-repo support** -- `--graph` + `--service-name` for shared graph across repositories
6060
- **Flow diagrams** -- interactive Cytoscape.js architecture diagrams (Overview, CI, Deploy, Runtime, Auth views)
6161
- **Bundle & distribute** -- package graph DB + source + interactive HTML into a ZIP
6262
- **100% deterministic** -- same input, same output, every time
6363
- **Incremental analysis** -- H2-backed file hash cache, only re-analyzes changed files
64-
- **1,227 tests** passing
64+
- **1,440 tests** passing
6565

6666
## Three-Command Architecture
6767

@@ -129,6 +129,7 @@ Spring Security, Django Auth, FastAPI Auth, NestJS Guards, Passport/JWT, K8s RBA
129129
| `graph [path]` | Export graph in various formats (JSON, YAML, Mermaid, DOT) |
130130
| `query [path]` | Query graph relationships (consumers, producers, callers, etc.) |
131131
| `find [what] [path]` | Preset queries (endpoints, guards, entities, topics, etc.) |
132+
| `cypher [query]` | Execute raw Cypher queries against Neo4j |
132133
| `topology [path]` | Service topology queries (blast radius, circular deps, bottlenecks) |
133134
| `flow [path]` | Generate architecture flow diagrams |
134135
| `bundle [path]` | Package graph + source into distributable ZIP |
@@ -195,7 +196,7 @@ code-iq serve /path/to/repo
195196
| | |
196197
v v v
197198
REST API MCP React UI
198-
(32+ ep) (31 tools) (6 pages)
199+
(34 ep) (31 tools) (6 pages)
199200
```
200201

201202
## Server
@@ -212,12 +213,12 @@ Modern React 18 + TypeScript + Tailwind CSS interface:
212213
- **Topology** -- Cytoscape.js service dependency map with drill-down
213214
- **Explorer** -- browse by node kind, click to drill into details with edges
214215
- **Flow** -- interactive architecture diagrams (Overview, CI, Deploy, Runtime, Auth)
215-
- **Console** -- Monaco Editor for MCP tool invocation
216+
- **Console** -- MCP Inspector for tool invocation with category filters and JSON response viewer
216217
- **API Docs** -- embedded Swagger/OpenAPI documentation
217218
- Dark/light/system theme toggle
218219

219220
### REST API (`/api`)
220-
32+ endpoints for programmatic access:
221+
34 endpoints for programmatic access:
221222
- `/api/stats`, `/api/stats/detailed?category=` -- graph and categorized statistics
222223
- `/api/kinds`, `/api/kinds/{kind}` -- node kinds with counts, paginated nodes
223224
- `/api/nodes`, `/api/edges` -- paginated queries with `?kind=&limit=&offset=`
@@ -228,17 +229,18 @@ Modern React 18 + TypeScript + Tailwind CSS interface:
228229
- `/api/triage/component?file=`, `/api/triage/impact/{id}` -- agentic triage
229230
- `/api/search?q=` -- free-text graph search
230231
- `/api/file?path=` -- source files (path traversal protected)
231-
- `/api/flow/{view}` -- flow diagrams
232-
- `POST /api/analyze` -- trigger analysis
232+
- `/api/flow`, `/api/flow/{view}`, `/api/flow/{view}/{nodeId}/children`, `/api/flow/{view}/{nodeId}/parent` -- flow diagrams
233+
- `/api/topology/services/{name}/deps`, `/api/topology/services/{name}/dependents` -- service dependencies
234+
- `/api/topology/path` -- find path between services
233235

234236
### MCP Server (`/mcp`)
235237
31 tools via Spring AI streamable HTTP for AI-powered code triage:
236238

237239
**Core (21 tools):**
238-
`get_stats`, `get_detailed_stats`, `query_nodes`, `query_edges`, `get_node_neighbors`, `get_ego_graph`, `find_cycles`, `find_shortest_path`, `find_consumers`, `find_producers`, `find_callers`, `find_dependencies`, `find_dependents`, `generate_flow`, `analyze_codebase`, `run_cypher`, `find_component_by_file`, `trace_impact`, `find_related_endpoints`, `search_graph`, `read_file`
240+
`get_stats`, `get_detailed_stats`, `query_nodes`, `query_edges`, `get_node_neighbors`, `get_ego_graph`, `find_cycles`, `find_shortest_path`, `find_consumers`, `find_producers`, `find_callers`, `find_dependencies`, `find_dependents`, `find_dead_code`, `generate_flow`, `run_cypher`, `find_component_by_file`, `trace_impact`, `find_related_endpoints`, `search_graph`, `read_file`
239241

240242
**Topology (10 tools):**
241-
`get_topology`, `get_service_detail`, `get_service_dependencies`, `get_service_dependents`, `get_blast_radius`, `find_service_path`, `find_bottlenecks`, `find_circular_dependencies`, `find_dead_services`, `find_topology_node`
243+
`get_topology`, `service_detail`, `service_dependencies`, `service_dependents`, `blast_radius`, `find_path`, `find_bottlenecks`, `find_circular_deps`, `find_dead_services`, `find_node`
242244

243245
## Service Topology
244246

@@ -340,7 +342,7 @@ cd code-iq
340342
# Build
341343
mvn clean package
342344

343-
# Run tests (1,227 tests)
345+
# Run tests (1,440 tests)
344346
mvn test
345347

346348
# Analyze this repo
@@ -369,7 +371,7 @@ java -jar target/code-iq-*-cli.jar serve .
369371
| Graph DB | Neo4j Embedded 2026.02.3 (Community Edition) |
370372
| Analysis Cache | H2 (pure Java, virtual thread safe) |
371373
| Cache | Spring Cache (simple in-memory, @Cacheable on query methods) |
372-
| MCP | Spring AI 1.1.4 (streamable HTTP) |
374+
| MCP | Spring AI 2.0.0-M3 (streamable HTTP) |
373375
| Java AST | JavaParser 3.28.0 |
374376
| Multi-lang AST | ANTLR 4.13.2 (10 grammars) |
375377
| CLI | Picocli 4.7.7 |

0 commit comments

Comments
 (0)