Skip to content

Commit cab71a4

Browse files
authored
refactor: rename code-iq → codeiq across the project (#62)
1 parent 4c46a60 commit cab71a4

70 files changed

Lines changed: 194 additions & 794 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ docs/
66
tests/
77
.github/
88
helm/
9-
src/osscodeiq/
9+
src/codeiq/

.github/workflows/ci-java.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3535
run: >
3636
mvn sonar:sonar -B
37-
-Dsonar.projectKey=RandomCodeSpace_code-iq
37+
-Dsonar.projectKey=RandomCodeSpace_codeiq
3838
-Dsonar.organization=randomcodespace
3939
-Dsonar.host.url=https://sonarcloud.io
4040
"-Dsonar.exclusions=**/grammar/**,target/generated-sources/**"

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ target/
2121
Thumbs.db
2222

2323
# Project runtime data
24-
.osscodeiq/
25-
.code-intelligence/
26-
.code_intelligence_cache*/
24+
.codeiq/
2725
*.db
2826
*.db-wal
2927
*.db-shm

CLAUDE.md

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# Code IQ (Java) -- Project Instructions
1+
# codeiq (Java) -- Project Instructions
22

33
## What This Project Is
44

5-
**Code IQ** -- a CLI tool + server that scans codebases to build a deterministic code knowledge graph. No AI, no external APIs -- pure static analysis. 97 detectors, 35+ languages, Neo4j Embedded graph database, Spring AI MCP server, REST API, web UI.
5+
**codeiq** -- a CLI tool + server that scans codebases to build a deterministic code knowledge graph. No AI, no external APIs -- pure static analysis. 97 detectors, 35+ languages, Neo4j Embedded graph database, Spring AI MCP server, REST API, web UI.
66

7-
- **Maven coordinates:** `io.github.randomcodespace.iq:code-iq`
8-
- **CLI command:** `code-iq` (via `java -jar`)
7+
- **Maven coordinates:** `io.github.randomcodespace.iq:code-iq` (artifactId intentionally unchanged)
8+
- **CLI command:** `codeiq` (via `java -jar`; JAR filename remains `code-iq-*-cli.jar`)
99
- **Java package:** `io.github.randomcodespace.iq` (under `src/main/java/`)
10-
- **GitHub repo:** `RandomCodeSpace/code-iq` (branch: `main`)
11-
- **Cache directory on disk:** `.code-intelligence` (H2 analysis cache)
12-
- **Neo4j directory on disk:** `.osscodeiq/graph.db` (enriched graph)
13-
- **Config file:** `.osscodeiq.yml` (project-level overrides)
10+
- **GitHub repo:** `RandomCodeSpace/codeiq` (branch: `main`)
11+
- **Cache directory on disk:** `.codeiq/cache` (H2 analysis cache)
12+
- **Neo4j directory on disk:** `.codeiq/graph/graph.db` (enriched graph)
13+
- **Config file:** `codeiq.yml` (project-level overrides)
1414

1515
## Tech Stack
1616

@@ -30,12 +30,12 @@
3030

3131
```
3232
Developer machine:
33-
code-iq index /repo → H2 cache (.code-intelligence/)
34-
code-iq enrich /repo → Neo4j (.osscodeiq/graph.db)
35-
code-iq bundle /repo → bundle.zip (graph + source snapshot)
33+
codeiq index /repo → H2 cache (.codeiq/cache/)
34+
codeiq enrich /repo → Neo4j (.codeiq/graph/graph.db)
35+
codeiq bundle /repo → bundle.zip (graph + source snapshot)
3636
3737
Remote server (or local):
38-
code-iq serve /repo → read-only API + MCP + UI (from Neo4j)
38+
codeiq serve /repo → read-only API + MCP + UI (from Neo4j)
3939
```
4040

4141
**Key principle:** MCP and API are strictly **read-only**. No data manipulation from the serving layer. Analysis happens only via CLI (`index`/`enrich`). The remote server may not have source code access (bundle deployment model).
@@ -164,13 +164,13 @@ io.github.randomcodespace.iq
164164

165165
```bash
166166
# For large codebases (44K+ files):
167-
code-iq index /path/to/repo # ~220s for 44K files, writes to H2
168-
code-iq enrich /path/to/repo # loads H2 → Neo4j with linkers/layers/services
169-
code-iq serve /path/to/repo # read-only server
167+
codeiq index /path/to/repo # ~220s for 44K files, writes to H2
168+
codeiq enrich /path/to/repo # loads H2 → Neo4j with linkers/layers/services
169+
codeiq serve /path/to/repo # read-only server
170170

171171
# For small codebases:
172-
code-iq analyze /path/to/repo # in-memory, all-in-one
173-
code-iq serve /path/to/repo # needs enrich if using index
172+
codeiq analyze /path/to/repo # in-memory, all-in-one
173+
codeiq serve /path/to/repo # needs enrich if using index
174174
```
175175

176176
## Server Endpoints (all read-only)
@@ -380,13 +380,13 @@ camelCase accepted as a deprecated alias for one release). Resolution order
380380
2. `~/.codeiq/config.yml` (user-global)
381381
3. `./codeiq.yml` (project)
382382
4. `CODEIQ_<SECTION>_<KEY>` env vars (e.g. `CODEIQ_SERVING_PORT=9090`)
383-
5. CLI flags on `code-iq <command>`
383+
5. CLI flags on `codeiq <command>`
384384

385385
Validate and introspect with:
386386

387387
```bash
388-
code-iq config validate
389-
code-iq config explain
388+
codeiq config validate
389+
codeiq config explain
390390
```
391391

392392
### Spring-owned keys (stay in `application.yml`)
@@ -404,14 +404,6 @@ have not been migrated into `codeiq.yml`:
404404
`UnifiedConfigBeans` bridges the unified config to the legacy `CodeIqConfig`
405405
bean for code paths that haven't been ported yet.
406406

407-
### `.osscodeiq.yml` deprecation
408-
409-
`.osscodeiq.yml` is deprecated. `ProjectConfigLoader` still loads it for one
410-
release, translates its legacy flat keys into the unified nested shape, and
411-
logs a one-time WARN per canonical path. Rename to `codeiq.yml` and migrate
412-
flat keys into the `project:` / `indexing:` / `serving:` / `mcp:` /
413-
`observability:` / `detectors:` sections.
414-
415407
## Gotchas & Lessons Learned
416408

417409
- **Pipeline is index → enrich → serve**: Don't put analysis/enrichment in serve. Serve is read-only.
@@ -434,7 +426,7 @@ flat keys into the `project:` / `indexing:` / `serving:` / `mcp:` /
434426
- **SnakeYAML parses `on` as Boolean.TRUE**: In YAML files, bare `on` key becomes `Boolean.TRUE`. Use `String.valueOf(key)` comparisons, not `Boolean.TRUE.equals(key)` (SonarCloud S2159).
435427
- **Regex possessive quantifiers**: Use `*+` instead of `*` for nested quantifiers like `([^"\\]*(?:\\.[^"\\]*)*)``([^"\\]*+(?:\\.[^"\\]*+)*+)` to prevent stack overflow (SonarCloud S5998).
436428
- **Parallel agent conflicts**: Don't dispatch multiple agents editing the same files concurrently. Use worktree isolation or sequential execution.
437-
- **SonarCloud project key**: `RandomCodeSpace_code-iq`, org: `randomcodespace`
429+
- **SonarCloud project key**: `RandomCodeSpace_codeiq`, org: `randomcodespace`
438430
- **CI workflow**: Single `ci-java.yml` runs build + SonarCloud analysis. No cross-platform builds needed (JVM).
439431

440432
## Updating This File

README.md

Lines changed: 18 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<p align="center">
2-
<h1 align="center">Code IQ</h1>
2+
<h1 align="center">codeiq</h1>
33
<p align="center">
44
<strong>Deterministic code knowledge graph -- scans codebases to map services, endpoints, entities, infrastructure, auth patterns, and framework usage. No AI, pure static analysis.</strong>
55
</p>
66
</p>
77

88
<p align="center">
99
<a href="https://central.sonatype.com/artifact/io.github.randomcodespace.iq/code-iq"><img src="https://img.shields.io/maven-central/v/io.github.randomcodespace.iq/code-iq?style=flat-square&logo=apachemaven&label=Maven%20Central" alt="Maven Central"></a>
10-
<a href="https://github.com/RandomCodeSpace/code-iq/actions/workflows/ci-java.yml"><img src="https://img.shields.io/github/actions/workflow/status/RandomCodeSpace/code-iq/ci-java.yml?branch=main&style=flat-square&logo=github&label=CI" alt="CI"></a>
10+
<a href="https://github.com/RandomCodeSpace/codeiq/actions/workflows/ci-java.yml"><img src="https://img.shields.io/github/actions/workflow/status/RandomCodeSpace/codeiq/ci-java.yml?branch=main&style=flat-square&logo=github&label=CI" alt="CI"></a>
1111
<a href="https://www.oracle.com/java/technologies/downloads/"><img src="https://img.shields.io/badge/Java-25-orange?style=flat-square&logo=openjdk&logoColor=white" alt="Java 25"></a>
12-
<a href="https://github.com/RandomCodeSpace/code-iq/blob/main/LICENSE"><img src="https://img.shields.io/github/license/RandomCodeSpace/code-iq?style=flat-square&label=License" alt="MIT License"></a>
13-
<a href="https://sonarcloud.io/summary/overall?id=RandomCodeSpace_code-iq"><img src="https://sonarcloud.io/api/project_badges/measure?project=RandomCodeSpace_code-iq&metric=security_rating" alt="Security"></a>
14-
<a href="https://sonarcloud.io/summary/overall?id=RandomCodeSpace_code-iq"><img src="https://sonarcloud.io/api/project_badges/measure?project=RandomCodeSpace_code-iq&metric=reliability_rating" alt="Reliability"></a>
15-
<a href="https://github.com/RandomCodeSpace/code-iq"><img src="https://img.shields.io/badge/detectors-97-brightgreen?style=flat-square&logo=codefactor&logoColor=white" alt="97 Detectors"></a>
16-
<a href="https://github.com/RandomCodeSpace/code-iq"><img src="https://img.shields.io/badge/languages-35%2B-blue?style=flat-square&logo=stackblitz&logoColor=white" alt="35+ Languages"></a>
12+
<a href="https://github.com/RandomCodeSpace/codeiq/blob/main/LICENSE"><img src="https://img.shields.io/github/license/RandomCodeSpace/codeiq?style=flat-square&label=License" alt="MIT License"></a>
13+
<a href="https://sonarcloud.io/summary/overall?id=RandomCodeSpace_codeiq"><img src="https://sonarcloud.io/api/project_badges/measure?project=RandomCodeSpace_codeiq&metric=security_rating" alt="Security"></a>
14+
<a href="https://sonarcloud.io/summary/overall?id=RandomCodeSpace_codeiq"><img src="https://sonarcloud.io/api/project_badges/measure?project=RandomCodeSpace_codeiq&metric=reliability_rating" alt="Reliability"></a>
15+
<a href="https://github.com/RandomCodeSpace/codeiq"><img src="https://img.shields.io/badge/detectors-97-brightgreen?style=flat-square&logo=codefactor&logoColor=white" alt="97 Detectors"></a>
16+
<a href="https://github.com/RandomCodeSpace/codeiq"><img src="https://img.shields.io/badge/languages-35%2B-blue?style=flat-square&logo=stackblitz&logoColor=white" alt="35+ Languages"></a>
1717
</p>
1818

1919
---
@@ -22,8 +22,8 @@
2222

2323
```bash
2424
# Build from source (requires Java 25+, Maven 3.9+)
25-
git clone https://github.com/RandomCodeSpace/code-iq.git
26-
cd code-iq
25+
git clone https://github.com/RandomCodeSpace/codeiq.git
26+
cd codeiq
2727
mvn clean package -DskipTests
2828

2929
# Analyze a codebase
@@ -36,7 +36,7 @@ java -jar target/code-iq-*-cli.jar serve /path/to/repo
3636

3737
## How It Works
3838

39-
Code IQ scans source files using 97 detectors across 35+ languages, builds a knowledge graph of code relationships, and serves it via REST API, MCP server, and React UI.
39+
codeiq scans source files using 97 detectors across 35+ languages, builds a knowledge graph of code relationships, and serves it via REST API, MCP server, and React UI.
4040

4141
```mermaid
4242
graph TD
@@ -157,7 +157,7 @@ java -jar code-iq-*-cli.jar serve /shared
157157

158158
## Configuration
159159

160-
code-iq is configured by a single YAML file at the repo root: **`codeiq.yml`**.
160+
codeiq is configured by a single YAML file at the repo root: **`codeiq.yml`**.
161161
Every field is optional; omitted fields fall back to the in-code defaults
162162
(`ConfigDefaults.builtIn()`). See
163163
[`docs/codeiq.yml.example`](docs/codeiq.yml.example) for the full reference
@@ -172,14 +172,14 @@ are accepted as deprecated aliases for one release and log a WARN on load.
172172
4. Environment variables: `CODEIQ_<SECTION>_<KEY>` (e.g. `CODEIQ_SERVING_PORT=9090`,
173173
`CODEIQ_MCP_AUTH_MODE=bearer`, `CODEIQ_INDEXING_BATCH_SIZE=1000`). Nested
174174
keys are flattened with underscores; values parse as YAML scalars.
175-
5. CLI flags on `code-iq <command>`
175+
5. CLI flags on `codeiq <command>`
176176

177177
### Commands
178178

179179
```bash
180-
code-iq config validate # Validate ./codeiq.yml, exit 1 on error
181-
code-iq config validate -p custom.yml
182-
code-iq config explain # Print each effective value + its source layer
180+
codeiq config validate # Validate ./codeiq.yml, exit 1 on error
181+
codeiq config validate -p custom.yml
182+
codeiq config explain # Print each effective value + its source layer
183183
```
184184

185185
### Minimal example
@@ -191,7 +191,7 @@ project:
191191

192192
indexing:
193193
exclude: ['**/node_modules/**', '**/build/**', '**/dist/**']
194-
cache_dir: .code-iq/cache
194+
cache_dir: .codeiq/cache
195195
batch_size: 500
196196

197197
serving:
@@ -218,38 +218,6 @@ and have not been migrated into `codeiq.yml`. Keep them in
218218
Everything else belongs in `codeiq.yml`. `UnifiedConfigBeans` bridges the
219219
two worlds for values that exist in both.
220220

221-
### Migration from `.osscodeiq.yml`
222-
223-
`.osscodeiq.yml` is deprecated. code-iq still loads it for one release via
224-
`ProjectConfigLoader`, translates its legacy flat keys into the unified
225-
shape, and logs a one-time WARN per path. Rename the file to `codeiq.yml`
226-
and restructure flat keys into the nested sections.
227-
228-
**Before** (`.osscodeiq.yml`, legacy flat schema):
229-
230-
```yaml
231-
languages: [java, typescript, yaml]
232-
exclude:
233-
- '**/node_modules/**'
234-
- '**/build/**'
235-
pipeline:
236-
parallelism: 4
237-
batch-size: 500
238-
batch_size: 500
239-
```
240-
241-
**After** (`codeiq.yml`, unified snake_case schema):
242-
243-
```yaml
244-
indexing:
245-
languages: [java, typescript, yaml]
246-
exclude:
247-
- '**/node_modules/**'
248-
- '**/build/**'
249-
parallelism: 4
250-
batch_size: 500
251-
```
252-
253221
See `docs/codeiq.yml.example` for the full schema.
254222

255223
## Graph Model
@@ -294,8 +262,8 @@ All results are 100% deterministic across runs.
294262
## Development
295263

296264
```bash
297-
git clone https://github.com/RandomCodeSpace/code-iq.git
298-
cd code-iq
265+
git clone https://github.com/RandomCodeSpace/codeiq.git
266+
cd codeiq
299267
mvn clean package # Build + test (3,219 tests)
300268
mvn test # Tests only
301269
```

docs/codeiq.yml.example

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
# `bindAddress`, `pageCacheMb`, `perToolTimeoutMs`, `logFormat`) are accepted
1010
# as deprecated aliases for one release and emit a WARN on load. Do not use
1111
# camelCase in new config.
12-
# - Run `code-iq config validate` to type-check your file, and
13-
# `code-iq config explain` to print every effective value and the layer it
12+
# - Run `codeiq config validate` to type-check your file, and
13+
# `codeiq config explain` to print every effective value and the layer it
1414
# was resolved from.
1515

1616
# ---------------------------------------------------------------------------
@@ -38,7 +38,7 @@ indexing:
3838
- '**/dist/**'
3939
- '**/generated/**'
4040
incremental: true # reuse H2 cache when file hashes match
41-
cache_dir: .code-iq/cache # H2 analysis cache directory
41+
cache_dir: .codeiq/cache # H2 analysis cache directory
4242
parallelism: null # null = auto-detect (Runtime.availableProcessors()); positive int to pin
4343
batch_size: 500 # files per H2 flush batch (default: 500)
4444
max_depth: 10 # max impact-trace depth
@@ -55,7 +55,7 @@ serving:
5555
bind_address: 0.0.0.0 # interface to bind; 127.0.0.1 for localhost-only
5656
read_only: false # must be false in non-prod; CI gate enforces this
5757
neo4j:
58-
dir: .code-iq/graph/graph.db # embedded Neo4j data directory
58+
dir: .codeiq/graph/graph.db # embedded Neo4j data directory
5959
page_cache_mb: 256 # Neo4j page cache (MB)
6060
heap_initial_mb: 256 # JVM -Xms for Neo4j (MB)
6161
heap_max_mb: 1024 # JVM -Xmx for Neo4j (MB)

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
<version>0.1.0-SNAPSHOT</version>
1717
<packaging>jar</packaging>
1818

19-
<name>OSSCodeIQ</name>
19+
<name>codeiq</name>
2020
<description>CLI tool and server that scans codebases to build a deterministic code knowledge graph</description>
21-
<url>https://github.com/RandomCodeSpace/code-iq</url>
21+
<url>https://github.com/RandomCodeSpace/codeiq</url>
2222

2323
<properties>
2424
<java.version>25</java.version>
@@ -220,9 +220,9 @@
220220
</developers>
221221

222222
<scm>
223-
<connection>scm:git:git://github.com/RandomCodeSpace/code-iq.git</connection>
224-
<developerConnection>scm:git:ssh://github.com:RandomCodeSpace/code-iq.git</developerConnection>
225-
<url>https://github.com/RandomCodeSpace/code-iq/tree/main</url>
223+
<connection>scm:git:git://github.com/RandomCodeSpace/codeiq.git</connection>
224+
<developerConnection>scm:git:ssh://github.com:RandomCodeSpace/codeiq.git</developerConnection>
225+
<url>https://github.com/RandomCodeSpace/codeiq/tree/main</url>
226226
</scm>
227227

228228
<build>

scripts/baseline/consolidate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ NODE_V=$(node --version)
2121
NPM_V=$(npm --version)
2222

2323
cat > "$OUT" <<MD
24-
# code-iq Baseline — 2026-04-17
24+
# codeiq Baseline — 2026-04-17
2525
2626
This file is generated by \`scripts/baseline/consolidate.sh\`. Re-run after
2727
updating any capture script. Raw artifacts under \`raw/\` are gitignored.

scripts/baseline/run-pipeline.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717
[[ -d "$SEED" ]] || { echo "Seed $SEED missing. Run scripts/seed-repos.sh first."; exit 1; }
1818

1919
# Clean any prior state in the seed repo.
20-
rm -rf "$SEED/.code-intelligence" "$SEED/.osscodeiq"
20+
rm -rf "$SEED/.codeiq"
2121
# Truncate timings file so re-runs don't append stale entries.
2222
: > "$OUT/timings.txt"
2323

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sonar.projectKey=RandomCodeSpace_code-iq
1+
sonar.projectKey=RandomCodeSpace_codeiq
22
sonar.organization=randomcodespace
33
sonar.sources=src/main/java
44
sonar.tests=src/test/java

0 commit comments

Comments
 (0)