From e352f773707d74246b11cd970a1e80a8917b69c1 Mon Sep 17 00:00:00 2001 From: bntvllnt <32437578+bntvllnt@users.noreply.github.com> Date: Sat, 30 May 2026 13:52:48 +0200 Subject: [PATCH] =?UTF-8?q?chore:=20dogfood=20init=20=E2=80=94=20add=20cod?= =?UTF-8?q?ebase-intelligence=20adoption=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generated by `codebase-intelligence@canary init` (the feature from #34). The repo now instructs its own AI agents to query CI before grep/read. - AGENTS.md, CLAUDE.md: managed instruction block appended - GEMINI.md, CONVENTIONS.md, .cursor/rules/, .github/copilot-instructions.md: new - docs/agent files only — no src change, does not trigger a canary publish --- .cursor/rules/codebase-intelligence.mdc | 29 +++++++++++++++++++++++++ .github/copilot-instructions.md | 24 ++++++++++++++++++++ AGENTS.md | 25 +++++++++++++++++++++ CLAUDE.md | 25 +++++++++++++++++++++ CONVENTIONS.md | 24 ++++++++++++++++++++ GEMINI.md | 24 ++++++++++++++++++++ 6 files changed, 151 insertions(+) create mode 100644 .cursor/rules/codebase-intelligence.mdc create mode 100644 .github/copilot-instructions.md create mode 100644 CONVENTIONS.md create mode 100644 GEMINI.md 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 .` +