claude-ex 1.1.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +203 -22
- package/dist/claude/claudemd.js +94 -31
- package/dist/claude/claudemd.js.map +1 -1
- package/dist/claude/installer.js +66 -1
- package/dist/claude/installer.js.map +1 -1
- package/dist/claude/mcp.js +167 -131
- package/dist/claude/mcp.js.map +1 -1
- package/dist/db/schema.js +64 -13
- package/dist/db/schema.js.map +1 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/indexer/index.js +39 -24
- package/dist/indexer/index.js.map +1 -1
- package/dist/query/engine.d.ts +51 -0
- package/dist/query/engine.js +1013 -134
- package/dist/query/engine.js.map +1 -1
- package/dist/watcher/daemon.js +19 -12
- package/dist/watcher/daemon.js.map +1 -1
- package/package.json +36 -18
package/README.md
CHANGED
|
@@ -21,37 +21,218 @@ That's it. Open Claude Code — the MCP server starts automatically and gives Cl
|
|
|
21
21
|
2. **Computes PageRank** to identify structurally important symbols
|
|
22
22
|
3. **Runs as MCP server** with the SQLite database held open in memory — every query answers in <5ms
|
|
23
23
|
4. **Watches files** for changes and reindexes in <15ms
|
|
24
|
-
5. **
|
|
24
|
+
5. **Generates CLAUDE.md** with a development cycle that Claude follows automatically
|
|
25
|
+
|
|
26
|
+
## What's New in 1.4.0
|
|
27
|
+
|
|
28
|
+
### Performance Overhaul
|
|
29
|
+
|
|
30
|
+
Every query is now faster. The entire engine was rewritten for speed:
|
|
31
|
+
|
|
32
|
+
- **Prepared statement cache** — SQL is compiled once per db connection, not per call. Every MCP tool invocation skips recompilation.
|
|
33
|
+
- **N+1 query elimination** — `getStats` (4 queries → 1), `getModules` (N+1 → 2), `getFileMap` / `getFileMapCompact` (N+1 → 1 via GROUP_CONCAT)
|
|
34
|
+
- **5 new indexes** — `files(path)`, `symbols(file_id, line_start)`, `file_deps(to_file, from_file)`, `symbols(exported, kind)`, `rankings(pagerank DESC)` — eliminates full table scans in hot-path queries
|
|
35
|
+
- **PageRank O(n) per iteration** — dangling node mass is pre-computed instead of O(n^2) inner loop
|
|
36
|
+
- **Import resolution** — uses pre-computed file set (0 `fs.existsSync` calls) instead of 11 syscalls per import
|
|
37
|
+
- **`transparentReview`** — 80 queries → 25 (lightweight code fetch instead of full `getContext` per caller)
|
|
38
|
+
- **Compact JSON** — MCP responses use `JSON.stringify(result)` instead of pretty-printed (30-50% smaller, 2x faster serialization)
|
|
39
|
+
- **Pre-warm on startup** — statement cache + SQLite page cache are warm before the first tool call
|
|
40
|
+
|
|
41
|
+
### Trigram Search
|
|
42
|
+
|
|
43
|
+
Substring and fuzzy matching, similar to Cursor's Instant Grep approach:
|
|
44
|
+
|
|
45
|
+
- New `symbols_trigram` FTS5 table with `tokenize='trigram'` for substring matches on symbol names, qualified names, and signatures
|
|
46
|
+
- **Two-pass search** — FTS5 word-level search first (fast, ranked), trigram fallback if results are sparse
|
|
47
|
+
- **FTS5 prefix index** (`prefix='2 4'`) — 80% faster prefix/autocomplete queries
|
|
48
|
+
- **NEAR phrase queries** — multi-token searches like `"get user"` use `NEAR` operator for better relevance, falling back to `OR` for partial matches
|
|
49
|
+
|
|
50
|
+
### Development Cycle in CLAUDE.md
|
|
51
|
+
|
|
52
|
+
The generated CLAUDE.md now includes a mandatory development cycle that Claude follows for every code change:
|
|
53
|
+
|
|
54
|
+
1. **Understand** — `search_code` → `get_symbol` → `get_callers` → `get_dependents` before touching anything
|
|
55
|
+
2. **Plan** — identify all affected files/symbols, state the plan if >3 files
|
|
56
|
+
3. **Implement** — edit code, update all callers, `reindex_file` after major changes
|
|
57
|
+
4. **Verify** — re-check callers/dependents, run tests and build
|
|
58
|
+
5. **Review** — `review_diff` for graph-aware risk assessment
|
|
59
|
+
|
|
60
|
+
Each step has a gate condition and a quick-reference table mapping steps to tools. Claude won't skip steps.
|
|
61
|
+
|
|
62
|
+
### CLAUDE.md Generator Improvements
|
|
63
|
+
|
|
64
|
+
- **Skip-if-unchanged** — won't rewrite the file if the generated section is identical (no more spurious git diffs)
|
|
65
|
+
- **Marker-safe** — only replaces content between `<!-- claude-ex:start -->` and `<!-- claude-ex:end -->`, preserving all user content before and after
|
|
66
|
+
- **Directive-style MCP docs** — decision guide table tells Claude exactly when to use each tool vs grep
|
|
67
|
+
- **Development cycle** — enforced process section (see above)
|
|
68
|
+
|
|
69
|
+
### Test Suite
|
|
70
|
+
|
|
71
|
+
93 tests across 5 files, runnable via `npm test`:
|
|
72
|
+
|
|
73
|
+
- **`tests/schema.test.ts`** (17) — database creation, tables, indexes, FTS, CRUD operations
|
|
74
|
+
- **`tests/engine.test.ts`** (25) — search, callers, context, impact, stats, file map, type hierarchy, dead exports, package usages
|
|
75
|
+
- **`tests/indexer.test.ts`** (10) — full index, file dependencies, PageRank, re-index, parser integration
|
|
76
|
+
- **`tests/claudemd.test.ts`** (11) — markers, user content preservation, skip-if-unchanged, development cycle
|
|
77
|
+
- **`tests/perf.test.ts`** (18) — performance gates (<50ms per query), data integrity (PageRank sum, no orphans, FTS sync)
|
|
78
|
+
|
|
79
|
+
### Other Improvements
|
|
80
|
+
|
|
81
|
+
- **Batch watcher debounce** — burst of file saves → single reindex batch (300ms window)
|
|
82
|
+
- **Memoized tool list** — MCP `ListTools` response allocated once, not per request
|
|
83
|
+
- **Cached insert statements** — `insertSymbol`, `insertEdge`, `insertPkgDep`, etc. use WeakMap-cached prepared statements
|
|
84
|
+
|
|
85
|
+
## Transparent Review (`transparent_review`)
|
|
86
|
+
|
|
87
|
+
Zero-black-box code review. Instead of dumping JSON metadata, it produces a **readable English narrative** that shows you exactly what changed and why it matters — no interpretation required.
|
|
88
|
+
|
|
89
|
+
### Usage
|
|
90
|
+
|
|
91
|
+
In Claude Code, use the `transparent_review` MCP tool, or from the CLI:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
claude-ex transparent-review Review the last commit
|
|
95
|
+
claude-ex transparent-review staged Review staged changes
|
|
96
|
+
claude-ex transparent-review branch Review current branch vs main (PR review)
|
|
97
|
+
claude-ex transparent-review abc1234 Review a specific commit
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### What you get
|
|
101
|
+
|
|
102
|
+
For every changed symbol, the review shows:
|
|
103
|
+
|
|
104
|
+
1. **Exact before/after code** — the old version is found by name in git history, not by shifted line numbers
|
|
105
|
+
2. **Plain-English description** — "Partially modified. 2 lines added. Added error handling (try/catch). 1 new conditional branch."
|
|
106
|
+
3. **Per-symbol diff snippets** — the actual `+`/`-` lines scoped to that symbol
|
|
107
|
+
4. **Caller impact stories** — which functions in other files call the changed code, their source, and whether they'll break or just see behavior changes
|
|
108
|
+
5. **Blast radius by depth** — direct importers vs 2-3 levels deep, with symbol counts
|
|
109
|
+
6. **Risk assessment** — PageRank importance, cascade risk for widely-used exports, API signature changes, broken imports from deleted files
|
|
110
|
+
|
|
111
|
+
### Example output
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
## What Changed (file by file)
|
|
115
|
+
|
|
116
|
+
### `src/auth/session.ts` — modified
|
|
117
|
+
+12 / -3 lines
|
|
118
|
+
|
|
119
|
+
#### `validateToken` — function (exported)
|
|
120
|
+
|
|
121
|
+
What changed: Partially modified. Signature changed. 1 new parameter(s) added.
|
|
122
|
+
Added error handling (try/catch). 1 new conditional branch.
|
|
123
|
+
|
|
124
|
+
[Before/After code shown inline]
|
|
125
|
+
[Diff snippet for this symbol]
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
## Who Gets Affected
|
|
129
|
+
|
|
130
|
+
2 caller(s) in other files use the changed exports:
|
|
131
|
+
|
|
132
|
+
- **handleRequest** in `src/routes/api.ts`
|
|
133
|
+
calls validateToken. Signature changed, so this caller may need updating.
|
|
134
|
+
[Caller code shown]
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
## Blast Radius
|
|
138
|
+
|
|
139
|
+
3 file(s) could be transitively affected:
|
|
140
|
+
|
|
141
|
+
Direct importers (2 files):
|
|
142
|
+
- `src/routes/api.ts` (8 symbols)
|
|
143
|
+
- `src/middleware/auth.ts` (3 symbols)
|
|
144
|
+
|
|
145
|
+
2 levels deep (1 file):
|
|
146
|
+
- `src/app.ts` (12 symbols)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### How it differs from `review_diff`
|
|
150
|
+
|
|
151
|
+
| `review_diff` | `transparent_review` |
|
|
152
|
+
|---|---|
|
|
153
|
+
| Returns structured JSON | Returns readable markdown narrative |
|
|
154
|
+
| Lists changed symbol names | Shows actual before/after code |
|
|
155
|
+
| Lists affected dependents | Explains *how* each caller is affected |
|
|
156
|
+
| Risk flags as strings | Risk assessment with context and reasoning |
|
|
157
|
+
| You need to interpret the data | You read it and understand what happened |
|
|
158
|
+
|
|
159
|
+
## Code Review (`/review`)
|
|
160
|
+
|
|
161
|
+
Graph-aware code review, inspired by [Greptile](https://www.greptile.com). Uses the symbol graph to understand *what* changed, *who depends on it*, and *what could break* — then Claude writes a full review with that context.
|
|
162
|
+
|
|
163
|
+
### Usage
|
|
164
|
+
|
|
165
|
+
In Claude Code, type:
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
/review Review the last commit
|
|
169
|
+
/review staged Review staged changes
|
|
170
|
+
/review branch Review current branch vs main (PR review)
|
|
171
|
+
/review abc1234 Review a specific commit
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### What it does
|
|
175
|
+
|
|
176
|
+
1. Parses the git diff and maps changed lines to symbols in the code graph
|
|
177
|
+
2. Finds all callers/dependents of changed exported symbols in other files
|
|
178
|
+
3. Computes transitive impact (files N levels deep that could break)
|
|
179
|
+
4. Flags risks: high-PageRank symbols modified, cascading exports, broken imports
|
|
180
|
+
5. Claude uses all this context to write an informed review with:
|
|
181
|
+
- Summary of changes + blast radius
|
|
182
|
+
- Risk assessment
|
|
183
|
+
- File-by-file review with dependency awareness
|
|
184
|
+
- Cross-file concerns
|
|
185
|
+
- Verdict + action items
|
|
25
186
|
|
|
26
187
|
## MCP Tools
|
|
27
188
|
|
|
28
189
|
| Tool | What it does | Speed |
|
|
29
190
|
|------|-------------|-------|
|
|
30
|
-
| `search_code` | Hybrid FTS5 + PageRank search |
|
|
31
|
-
| `get_symbol` | Full context for a symbol |
|
|
32
|
-
| `get_callers` | Who calls this function |
|
|
33
|
-
| `get_dependents` | What breaks if a file changes |
|
|
34
|
-
| `get_dependencies` | What a symbol depends on |
|
|
35
|
-
| `
|
|
191
|
+
| `search_code` | Hybrid FTS5 + trigram + PageRank search | <3ms |
|
|
192
|
+
| `get_symbol` | Full context for a symbol | <4ms |
|
|
193
|
+
| `get_callers` | Who calls this function | <3ms |
|
|
194
|
+
| `get_dependents` | What breaks if a file changes | <5ms |
|
|
195
|
+
| `get_dependencies` | What a symbol depends on | <3ms |
|
|
196
|
+
| `get_file_map` | Every file and its exports | <5ms |
|
|
197
|
+
| `get_file_symbols` | All symbols in a file | <3ms |
|
|
198
|
+
| `find_files` | Find files by glob pattern | <3ms |
|
|
199
|
+
| `find_by_kind` | All classes, interfaces, enums, etc. | <5ms |
|
|
200
|
+
| `get_type_hierarchy` | Subclasses/implementors | <3ms |
|
|
201
|
+
| `find_dead_exports` | Exported symbols nothing imports | <10ms |
|
|
202
|
+
| `get_pkg_usages` | Files importing a given package | <3ms |
|
|
203
|
+
| `get_architecture` | Project overview | <5ms |
|
|
204
|
+
| `reindex_file` | Re-index after edits | <15ms |
|
|
205
|
+
| `review_diff` | Graph-aware diff review (structured JSON) | 10-50ms |
|
|
206
|
+
| `transparent_review` | Zero-black-box review narrative (readable English) | 15-80ms |
|
|
36
207
|
|
|
37
208
|
## CLI Commands
|
|
38
209
|
|
|
39
210
|
```
|
|
40
|
-
claude-ex init [path]
|
|
41
|
-
claude-ex
|
|
42
|
-
claude-ex
|
|
43
|
-
claude-ex
|
|
44
|
-
claude-ex
|
|
45
|
-
claude-ex
|
|
46
|
-
claude-ex
|
|
47
|
-
claude-ex
|
|
48
|
-
claude-ex
|
|
49
|
-
claude-ex
|
|
50
|
-
claude-ex
|
|
51
|
-
claude-ex
|
|
52
|
-
claude-ex
|
|
53
|
-
claude-ex
|
|
54
|
-
claude-ex
|
|
211
|
+
claude-ex init [path] Index + install config + generate docs
|
|
212
|
+
claude-ex transparent-review [target] Zero-black-box review (before/after code, English, blast radius)
|
|
213
|
+
claude-ex review [target] Graph-aware diff review (structured JSON)
|
|
214
|
+
claude-ex search <query> Search symbols
|
|
215
|
+
claude-ex callers <symbol> Find callers
|
|
216
|
+
claude-ex context <symbol> Full symbol context
|
|
217
|
+
claude-ex impact <file> Impact analysis
|
|
218
|
+
claude-ex deps <symbol> Dependencies
|
|
219
|
+
claude-ex rank Top symbols by PageRank
|
|
220
|
+
claude-ex modules Module map
|
|
221
|
+
claude-ex stats Index statistics
|
|
222
|
+
claude-ex brief Project summary (SessionStart hook)
|
|
223
|
+
claude-ex pre-edit <file> Pre-edit context (PreToolUse hook)
|
|
224
|
+
claude-ex post-edit <file> Post-edit reindex (PostToolUse hook)
|
|
225
|
+
claude-ex generate-docs Regenerate CLAUDE.md
|
|
226
|
+
claude-ex mcp Run as MCP server
|
|
227
|
+
claude-ex uninstall Remove all config
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Testing
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
npm test Run all 93 tests
|
|
234
|
+
npm run test:watch Watch mode
|
|
235
|
+
npm run prepush Build + test (pre-push validation)
|
|
55
236
|
```
|
|
56
237
|
|
|
57
238
|
## Supported Languages
|
package/dist/claude/claudemd.js
CHANGED
|
@@ -88,33 +88,89 @@ function generateClaudeMd(rootDir, db) {
|
|
|
88
88
|
lines.push(fileMap);
|
|
89
89
|
lines.push('');
|
|
90
90
|
}
|
|
91
|
+
// MCP tool guidance — directive style so Claude actually uses them
|
|
91
92
|
lines.push('## Codex MCP Tools — USE THESE');
|
|
92
93
|
lines.push('');
|
|
93
94
|
lines.push('This project has a live code index via MCP. **Always prefer these over grep/ripgrep for structural queries.** They are faster, rank-aware, and understand code relationships.');
|
|
94
95
|
lines.push('');
|
|
95
|
-
lines.push('
|
|
96
|
-
lines.push('
|
|
97
|
-
lines.push('
|
|
98
|
-
lines.push('
|
|
99
|
-
lines.push('
|
|
100
|
-
lines.push('
|
|
101
|
-
lines.push('
|
|
102
|
-
lines.push('
|
|
103
|
-
lines.push('
|
|
104
|
-
lines.push('
|
|
105
|
-
lines.push('
|
|
106
|
-
lines.push('
|
|
107
|
-
lines.push('
|
|
108
|
-
lines.push('
|
|
109
|
-
lines.push('
|
|
110
|
-
lines.push('
|
|
111
|
-
lines.push('');
|
|
112
|
-
lines.push('
|
|
113
|
-
lines.push('-
|
|
114
|
-
lines.push('
|
|
115
|
-
lines.push('
|
|
116
|
-
lines.push('-
|
|
117
|
-
lines.push('-
|
|
96
|
+
lines.push('### When to use which tool');
|
|
97
|
+
lines.push('');
|
|
98
|
+
lines.push('**Finding code** — use instead of Grep/Glob:');
|
|
99
|
+
lines.push('- `search_code` — find symbols by name or description (PageRank-ranked). Use this FIRST for any "where is X" or "find X" query.');
|
|
100
|
+
lines.push('- `find_files` — find files by glob pattern (e.g. `**/*.test.ts`). Use instead of shell find/ls.');
|
|
101
|
+
lines.push('- `get_file_map` — full project map with every file and its exports. Use to orient yourself in an unfamiliar codebase.');
|
|
102
|
+
lines.push('');
|
|
103
|
+
lines.push('**Before modifying code** — always check impact:');
|
|
104
|
+
lines.push('- `get_symbol` — full context for a symbol (code, deps, dependents, co-located symbols). Read this before editing any function/class.');
|
|
105
|
+
lines.push('- `get_callers` — all callers of a function. Check before renaming, changing signatures, or deleting.');
|
|
106
|
+
lines.push('- `get_dependents` — all files transitively affected if a file changes. Check before refactoring exports.');
|
|
107
|
+
lines.push('- `get_dependencies` — what a symbol imports/uses.');
|
|
108
|
+
lines.push('');
|
|
109
|
+
lines.push('**Understanding structure:**');
|
|
110
|
+
lines.push('- `get_file_symbols` — all symbols in a file (not just exports).');
|
|
111
|
+
lines.push('- `find_by_kind` — find all classes, interfaces, enums, etc. across the project.');
|
|
112
|
+
lines.push('- `get_type_hierarchy` — subclasses/implementors of a class or interface.');
|
|
113
|
+
lines.push('- `get_pkg_usages` — files that import a given npm package (use before swapping libraries).');
|
|
114
|
+
lines.push('- `get_architecture` — project overview with top symbols and module dependency map.');
|
|
115
|
+
lines.push('');
|
|
116
|
+
lines.push('**Maintenance:**');
|
|
117
|
+
lines.push('- `find_dead_exports` — exported symbols nothing imports (dead code candidates).');
|
|
118
|
+
lines.push('- `reindex_file` — re-index a file after major edits to keep results fresh.');
|
|
119
|
+
lines.push('- `review_diff` — graph-aware diff review: changed symbols, callers, blast radius, risks.');
|
|
120
|
+
lines.push('');
|
|
121
|
+
lines.push('### Decision guide');
|
|
122
|
+
lines.push('');
|
|
123
|
+
lines.push('| You want to... | Use this | Not this |');
|
|
124
|
+
lines.push('|---|---|---|');
|
|
125
|
+
lines.push('| Find a function/class | `search_code` | Grep/ripgrep |');
|
|
126
|
+
lines.push('| Find files by name | `find_files` | shell find/ls/Glob |');
|
|
127
|
+
lines.push('| See what a file exports | `get_file_symbols` | Read entire file |');
|
|
128
|
+
lines.push('| Check who calls X | `get_callers` | Grep for function name |');
|
|
129
|
+
lines.push('| Understand blast radius | `get_dependents` | Manual file tracing |');
|
|
130
|
+
lines.push('| Find a literal string/regex | Grep (built-in) | — |');
|
|
131
|
+
lines.push('');
|
|
132
|
+
// Development cycle — enforce process automatically
|
|
133
|
+
lines.push('## Development Cycle — FOLLOW THIS');
|
|
134
|
+
lines.push('');
|
|
135
|
+
lines.push('For every code change, follow this cycle. Do not skip steps.');
|
|
136
|
+
lines.push('');
|
|
137
|
+
lines.push('### 1. Understand (before touching anything)');
|
|
138
|
+
lines.push('- Run `search_code` or `get_file_map` to locate the relevant code.');
|
|
139
|
+
lines.push('- Run `get_symbol` on every function/class you plan to modify — read its full context, dependencies, and dependents.');
|
|
140
|
+
lines.push('- Run `get_callers` on any function whose signature, behavior, or name will change. Know who depends on it.');
|
|
141
|
+
lines.push('- Run `get_dependents` on any file whose exports will change. Know the blast radius.');
|
|
142
|
+
lines.push('- If unfamiliar with the area, run `get_architecture` to see how modules connect.');
|
|
143
|
+
lines.push('');
|
|
144
|
+
lines.push('### 2. Plan (decide what to change)');
|
|
145
|
+
lines.push('- From step 1, you now know: what the code does, who calls it, and what breaks if it changes.');
|
|
146
|
+
lines.push('- Identify all files and symbols that need updating (not just the primary target — include callers/dependents that must adapt).');
|
|
147
|
+
lines.push('- If the change affects >3 files or an exported API, state the plan before writing code.');
|
|
148
|
+
lines.push('');
|
|
149
|
+
lines.push('### 3. Implement (make the change)');
|
|
150
|
+
lines.push('- Edit the code. Prefer minimal, targeted changes.');
|
|
151
|
+
lines.push('- Update all callers/dependents identified in step 2 — do not leave broken references.');
|
|
152
|
+
lines.push('- After major edits to a file, run `reindex_file` so subsequent queries reflect your changes.');
|
|
153
|
+
lines.push('');
|
|
154
|
+
lines.push('### 4. Verify (confirm nothing broke)');
|
|
155
|
+
lines.push('- Run `get_callers` again on modified symbols — verify every caller still works with the new signature/behavior.');
|
|
156
|
+
lines.push('- Run `get_dependents` on modified files — verify no import is left broken.');
|
|
157
|
+
lines.push('- Run tests if they exist (`npm test`, `pytest`, etc.).');
|
|
158
|
+
lines.push('- If the project has a build step, run it (`npm run build`, `tsc --noEmit`, etc.).');
|
|
159
|
+
lines.push('');
|
|
160
|
+
lines.push('### 5. Review (before committing)');
|
|
161
|
+
lines.push('- Run `review_diff` with target "staged" or "last_commit" to get a graph-aware review of your changes.');
|
|
162
|
+
lines.push('- Check the risk assessment: high-importance symbols modified, cascade risks, broken imports.');
|
|
163
|
+
lines.push('- If risks are flagged, go back to step 4 and address them.');
|
|
164
|
+
lines.push('');
|
|
165
|
+
lines.push('### Quick reference');
|
|
166
|
+
lines.push('');
|
|
167
|
+
lines.push('| Step | Tools | Gate |');
|
|
168
|
+
lines.push('|---|---|---|');
|
|
169
|
+
lines.push('| Understand | `search_code`, `get_symbol`, `get_callers`, `get_dependents` | Know the blast radius |');
|
|
170
|
+
lines.push('| Plan | (your reasoning) | All affected files identified |');
|
|
171
|
+
lines.push('| Implement | Edit + `reindex_file` | Code written |');
|
|
172
|
+
lines.push('| Verify | `get_callers`, `get_dependents`, tests, build | No broken refs, tests pass |');
|
|
173
|
+
lines.push('| Review | `review_diff` | No unaddressed risks |');
|
|
118
174
|
lines.push('');
|
|
119
175
|
lines.push('*Auto-generated by claude-ex. Run `claude-ex generate-docs` to regenerate.*');
|
|
120
176
|
lines.push(MARKER_END);
|
|
@@ -128,21 +184,28 @@ function generateClaudeMd(rootDir, db) {
|
|
|
128
184
|
function writeClaudeMd(rootDir, db) {
|
|
129
185
|
const content = generateClaudeMd(rootDir, db);
|
|
130
186
|
const claudeMdPath = path.join(rootDir, 'CLAUDE.md');
|
|
187
|
+
let updated;
|
|
131
188
|
if (fs.existsSync(claudeMdPath)) {
|
|
132
189
|
const existing = fs.readFileSync(claudeMdPath, 'utf-8');
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
190
|
+
const startIdx = existing.indexOf(MARKER_START);
|
|
191
|
+
const endIdx = existing.indexOf(MARKER_END);
|
|
192
|
+
if (startIdx !== -1 && endIdx !== -1) {
|
|
193
|
+
// Replace only the generated section, preserve everything before/after
|
|
194
|
+
const before = existing.slice(0, startIdx);
|
|
195
|
+
const after = existing.slice(endIdx + MARKER_END.length);
|
|
196
|
+
updated = before + content + after;
|
|
138
197
|
}
|
|
139
198
|
else {
|
|
140
|
-
//
|
|
141
|
-
|
|
199
|
+
// No markers yet — append with a blank line separator
|
|
200
|
+
updated = existing.trimEnd() + '\n\n' + content + '\n';
|
|
142
201
|
}
|
|
202
|
+
// Skip write if nothing changed
|
|
203
|
+
if (updated === existing)
|
|
204
|
+
return;
|
|
143
205
|
}
|
|
144
206
|
else {
|
|
145
|
-
|
|
207
|
+
updated = content + '\n';
|
|
146
208
|
}
|
|
209
|
+
fs.writeFileSync(claudeMdPath, updated);
|
|
147
210
|
}
|
|
148
211
|
//# sourceMappingURL=claudemd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claudemd.js","sourceRoot":"","sources":["../../src/claude/claudemd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,
|
|
1
|
+
{"version":3,"file":"claudemd.js","sourceRoot":"","sources":["../../src/claude/claudemd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,4CAiJC;AAED,sCA6BC;AAzLD,uCAAyB;AACzB,2CAA6B;AAE7B,yCAA4C;AAC5C,4CAAmF;AAEnF,MAAM,YAAY,GAAG,0BAA0B,CAAC;AAChD,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAE5C,SAAgB,gBAAgB,CAAC,OAAe,EAAE,EAAsB;IACpE,MAAM,WAAW,GAAG,CAAC,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE;QAAE,EAAE,GAAG,IAAA,qBAAY,EAAC,OAAO,CAAC,CAAC;IAEpC,IAAI,CAAC;QACD,MAAM,KAAK,GAAG,IAAA,iBAAQ,EAAC,EAAE,CAAC,CAAC;QAC3B,MAAM,UAAU,GAAG,IAAA,gBAAO,EAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QACnC,MAAM,OAAO,GAAG,IAAA,mBAAU,EAAC,EAAE,CAAC,CAAC;QAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAEvC,qBAAqB;QACrB,MAAM,KAAK,GAAG,EAAE,CAAC,OAAO,CAAC;;SAExB,CAAC,CAAC,GAAG,EAAyC,CAAC;QAEhD,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACzB,KAAK,CAAC,IAAI,CAAC,cAAc,OAAO,EAAE,CAAC,CAAC;QACpC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,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,6 +114,13 @@ before swapping a library to find every usage point.
|
|
|
114
114
|
### reindex_file
|
|
115
115
|
Re-index a single file immediately after making major changes.
|
|
116
116
|
|
|
117
|
+
### review_diff
|
|
118
|
+
Gather graph-aware context for reviewing a git diff. Analyzes changed symbols,
|
|
119
|
+
their callers and dependents, cross-file impact, and risk assessment. Use when
|
|
120
|
+
reviewing commits, staged changes, or branch diffs. Returns structured context
|
|
121
|
+
so you can write an informed code review. Targets: "last_commit", "staged",
|
|
122
|
+
"branch", or a commit SHA.
|
|
123
|
+
|
|
117
124
|
## When to prefer MCP tools over grep
|
|
118
125
|
- "What calls processPayment?" → get_callers (not grep — grep misses indirect references)
|
|
119
126
|
- "What breaks if I change auth.ts?" → get_dependents (not grep — grep can't trace transitive deps)
|
|
@@ -128,11 +135,63 @@ Re-index a single file immediately after making major changes.
|
|
|
128
135
|
- "What extends BaseService?" → get_type_hierarchy
|
|
129
136
|
- "Any dead exports?" → find_dead_exports
|
|
130
137
|
- "What uses lodash?" → get_pkg_usages with "lodash"
|
|
138
|
+
- "Review this commit" → review_diff with "last_commit"
|
|
139
|
+
- "Review my staged changes" → review_diff with "staged"
|
|
140
|
+
- "Review this branch/PR" → review_diff with "branch"
|
|
131
141
|
|
|
132
142
|
## When to use grep instead
|
|
133
143
|
- Simple string search: "find all TODOs" → grep
|
|
134
144
|
- Regex patterns: "find all console.log" → grep
|
|
135
145
|
`;
|
|
146
|
+
const REVIEW_SKILL_CONTENT = `---
|
|
147
|
+
name: review
|
|
148
|
+
description: >
|
|
149
|
+
Codebase-aware code review using the code graph. Reviews the last commit,
|
|
150
|
+
staged changes, or branch diff with full dependency and impact analysis.
|
|
151
|
+
Triggers: "review", "/review", "code review", "review this PR", "review changes"
|
|
152
|
+
argument-hint: "[last_commit|staged|branch|<sha>]"
|
|
153
|
+
allowed-tools: mcp__codex__review_diff, mcp__codex__get_symbol, mcp__codex__get_callers, mcp__codex__search_code
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
# Code Review
|
|
157
|
+
|
|
158
|
+
Review the changes using the \`review_diff\` MCP tool with target "$ARGUMENTS" (default: "last_commit" if no argument provided).
|
|
159
|
+
|
|
160
|
+
## Steps
|
|
161
|
+
|
|
162
|
+
1. Call \`review_diff\` with the target to get graph-aware context (changed symbols, callers, impact, risks)
|
|
163
|
+
2. Analyze the structured result carefully
|
|
164
|
+
3. For any high-risk or complex changes, use \`get_symbol\` to read the full code of affected symbols
|
|
165
|
+
4. Write a comprehensive review following the format below
|
|
166
|
+
|
|
167
|
+
## Review Format
|
|
168
|
+
|
|
169
|
+
### Summary
|
|
170
|
+
- One-paragraph overview of what changed and why
|
|
171
|
+
- Files changed, symbols modified, blast radius
|
|
172
|
+
|
|
173
|
+
### Risk Assessment
|
|
174
|
+
- Flag high-importance symbols that were modified (check pagerank)
|
|
175
|
+
- Note exported symbols with many callers that could cascade
|
|
176
|
+
- Warn about deleted files with dependents (broken imports)
|
|
177
|
+
- Highlight large transitive impact
|
|
178
|
+
|
|
179
|
+
### File-by-File Review
|
|
180
|
+
For each changed file with symbols:
|
|
181
|
+
- What symbols changed and their role in the codebase
|
|
182
|
+
- Potential issues: bugs, logic errors, missing edge cases, type safety
|
|
183
|
+
- Whether callers/dependents in other files need updating
|
|
184
|
+
- Code quality: naming, patterns, consistency with codebase conventions
|
|
185
|
+
|
|
186
|
+
### Cross-File Concerns
|
|
187
|
+
- Dependencies that may break from these changes
|
|
188
|
+
- Pattern inconsistencies across the codebase
|
|
189
|
+
- Missing updates in dependent files listed in affectedDependents
|
|
190
|
+
|
|
191
|
+
### Verdict
|
|
192
|
+
- Overall assessment: approve, request changes, or needs discussion
|
|
193
|
+
- Prioritized list of action items if any
|
|
194
|
+
`;
|
|
136
195
|
function install(rootDir, options) {
|
|
137
196
|
const work = options?.work ?? false;
|
|
138
197
|
if (work) {
|
|
@@ -157,8 +216,9 @@ function install(rootDir, options) {
|
|
|
157
216
|
installMcpConfig(rootDir);
|
|
158
217
|
// 3. Create/merge .claude/settings.json
|
|
159
218
|
installHooks(rootDir);
|
|
160
|
-
// 4. Create skill
|
|
219
|
+
// 4. Create skill files
|
|
161
220
|
installSkill(rootDir);
|
|
221
|
+
installReviewSkill(rootDir);
|
|
162
222
|
}
|
|
163
223
|
function addToGitignore(rootDir, entry) {
|
|
164
224
|
const gitignorePath = path.join(rootDir, '.gitignore');
|
|
@@ -269,4 +329,9 @@ function installSkill(rootDir) {
|
|
|
269
329
|
fs.mkdirSync(skillDir, { recursive: true });
|
|
270
330
|
fs.writeFileSync(path.join(skillDir, 'SKILL.md'), SKILL_CONTENT);
|
|
271
331
|
}
|
|
332
|
+
function installReviewSkill(rootDir) {
|
|
333
|
+
const skillDir = path.join(rootDir, '.claude', 'skills', 'review');
|
|
334
|
+
fs.mkdirSync(skillDir, { recursive: true });
|
|
335
|
+
fs.writeFileSync(path.join(skillDir, 'SKILL.md'), REVIEW_SKILL_CONTENT);
|
|
336
|
+
}
|
|
272
337
|
//# sourceMappingURL=installer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.js","sourceRoot":"","sources":["../../src/claude/installer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"installer.js","sourceRoot":"","sources":["../../src/claude/installer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiKA,0BA8BC;AA/LD,uCAAyB;AACzB,2CAA6B;AAE7B,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0GrB,CAAC;AAEF,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD5B,CAAC;AAEF,SAAgB,OAAO,CAAC,OAAe,EAAE,OAA4B;IACjE,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