diff --git a/.cursor/rules/codebase-intelligence.mdc b/.cursor/rules/codebase-intelligence.mdc new file mode 100644 index 0000000..00502a9 --- /dev/null +++ b/.cursor/rules/codebase-intelligence.mdc @@ -0,0 +1,29 @@ +--- +description: Codebase Intelligence — query the CLI before grep/read for architecture, impact, and risk +alwaysApply: true +--- + + +## Codebase Intelligence + +This repo is analyzed by `codebase-intelligence` — a static-analysis tool that maps +architecture, dependencies, and risk metrics for TypeScript code. + +**Use it BEFORE grep/read when you need to understand structure, impact, or risk.** +It is faster and more accurate than reading files one at a time. + +| When you need to… | Run | +|---|---| +| Understand the codebase | `codebase-intelligence overview .` | +| Find where complexity/risk lives | `codebase-intelligence hotspots .` | +| Blast radius before editing a symbol | `codebase-intelligence impact . ` | +| Who depends on a file | `codebase-intelligence dependents . ` | +| Find unused exports | `codebase-intelligence dead-exports .` | +| Keyword search | `codebase-intelligence search . ` | +| Plan a rename | `codebase-intelligence rename . ` | + +- Add `--json` for machine-readable output (use in automation/subagents). +- No global install? Prefix with `npx codebase-intelligence@latest`. +- Full command list: `codebase-intelligence --help`. +- MCP stdio server: `codebase-intelligence .` + diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..33d41b3 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,24 @@ + +## Codebase Intelligence + +This repo is analyzed by `codebase-intelligence` — a static-analysis tool that maps +architecture, dependencies, and risk metrics for TypeScript code. + +**Use it BEFORE grep/read when you need to understand structure, impact, or risk.** +It is faster and more accurate than reading files one at a time. + +| When you need to… | Run | +|---|---| +| Understand the codebase | `codebase-intelligence overview .` | +| Find where complexity/risk lives | `codebase-intelligence hotspots .` | +| Blast radius before editing a symbol | `codebase-intelligence impact . ` | +| Who depends on a file | `codebase-intelligence dependents . ` | +| Find unused exports | `codebase-intelligence dead-exports .` | +| Keyword search | `codebase-intelligence search . ` | +| Plan a rename | `codebase-intelligence rename . ` | + +- Add `--json` for machine-readable output (use in automation/subagents). +- No global install? Prefix with `npx codebase-intelligence@latest`. +- Full command list: `codebase-intelligence --help`. +- MCP stdio server: `codebase-intelligence .` + diff --git a/AGENTS.md b/AGENTS.md index 708aedd..ecc5625 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -103,3 +103,28 @@ src/ community/index.ts Louvain clustering persistence/index.ts Graph cache (.code-visualizer/) ``` + + +## Codebase Intelligence + +This repo is analyzed by `codebase-intelligence` — a static-analysis tool that maps +architecture, dependencies, and risk metrics for TypeScript code. + +**Use it BEFORE grep/read when you need to understand structure, impact, or risk.** +It is faster and more accurate than reading files one at a time. + +| When you need to… | Run | +|---|---| +| Understand the codebase | `codebase-intelligence overview .` | +| Find where complexity/risk lives | `codebase-intelligence hotspots .` | +| Blast radius before editing a symbol | `codebase-intelligence impact . ` | +| Who depends on a file | `codebase-intelligence dependents . ` | +| Find unused exports | `codebase-intelligence dead-exports .` | +| Keyword search | `codebase-intelligence search . ` | +| Plan a rename | `codebase-intelligence rename . ` | + +- Add `--json` for machine-readable output (use in automation/subagents). +- No global install? Prefix with `npx codebase-intelligence@latest`. +- Full command list: `codebase-intelligence --help`. +- MCP stdio server: `codebase-intelligence .` + diff --git a/CLAUDE.md b/CLAUDE.md index 3b3e262..a7e1155 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -186,3 +186,28 @@ LLM knowledge base for building this tool. Single source of truth per topic: - NEVER create fake/stub graph objects — build them through the real pipeline - NEVER skip tests because "it's just config" - NEVER write tests that pass regardless of implementation (test behavior, not existence) + + +## Codebase Intelligence + +This repo is analyzed by `codebase-intelligence` — a static-analysis tool that maps +architecture, dependencies, and risk metrics for TypeScript code. + +**Use it BEFORE grep/read when you need to understand structure, impact, or risk.** +It is faster and more accurate than reading files one at a time. + +| When you need to… | Run | +|---|---| +| Understand the codebase | `codebase-intelligence overview .` | +| Find where complexity/risk lives | `codebase-intelligence hotspots .` | +| Blast radius before editing a symbol | `codebase-intelligence impact . ` | +| Who depends on a file | `codebase-intelligence dependents . ` | +| Find unused exports | `codebase-intelligence dead-exports .` | +| Keyword search | `codebase-intelligence search . ` | +| Plan a rename | `codebase-intelligence rename . ` | + +- Add `--json` for machine-readable output (use in automation/subagents). +- No global install? Prefix with `npx codebase-intelligence@latest`. +- Full command list: `codebase-intelligence --help`. +- MCP stdio server: `codebase-intelligence .` + diff --git a/CONVENTIONS.md b/CONVENTIONS.md new file mode 100644 index 0000000..33d41b3 --- /dev/null +++ b/CONVENTIONS.md @@ -0,0 +1,24 @@ + +## Codebase Intelligence + +This repo is analyzed by `codebase-intelligence` — a static-analysis tool that maps +architecture, dependencies, and risk metrics for TypeScript code. + +**Use it BEFORE grep/read when you need to understand structure, impact, or risk.** +It is faster and more accurate than reading files one at a time. + +| When you need to… | Run | +|---|---| +| Understand the codebase | `codebase-intelligence overview .` | +| Find where complexity/risk lives | `codebase-intelligence hotspots .` | +| Blast radius before editing a symbol | `codebase-intelligence impact . ` | +| Who depends on a file | `codebase-intelligence dependents . ` | +| Find unused exports | `codebase-intelligence dead-exports .` | +| Keyword search | `codebase-intelligence search . ` | +| Plan a rename | `codebase-intelligence rename . ` | + +- Add `--json` for machine-readable output (use in automation/subagents). +- No global install? Prefix with `npx codebase-intelligence@latest`. +- Full command list: `codebase-intelligence --help`. +- MCP stdio server: `codebase-intelligence .` + diff --git a/GEMINI.md b/GEMINI.md new file mode 100644 index 0000000..33d41b3 --- /dev/null +++ b/GEMINI.md @@ -0,0 +1,24 @@ + +## Codebase Intelligence + +This repo is analyzed by `codebase-intelligence` — a static-analysis tool that maps +architecture, dependencies, and risk metrics for TypeScript code. + +**Use it BEFORE grep/read when you need to understand structure, impact, or risk.** +It is faster and more accurate than reading files one at a time. + +| When you need to… | Run | +|---|---| +| Understand the codebase | `codebase-intelligence overview .` | +| Find where complexity/risk lives | `codebase-intelligence hotspots .` | +| Blast radius before editing a symbol | `codebase-intelligence impact . ` | +| Who depends on a file | `codebase-intelligence dependents . ` | +| Find unused exports | `codebase-intelligence dead-exports .` | +| Keyword search | `codebase-intelligence search . ` | +| Plan a rename | `codebase-intelligence rename . ` | + +- Add `--json` for machine-readable output (use in automation/subagents). +- No global install? Prefix with `npx codebase-intelligence@latest`. +- Full command list: `codebase-intelligence --help`. +- MCP stdio server: `codebase-intelligence .` +