Commit 7581fba
feat: expose all 10 MCP tools via CLI + document them (#42)
* test: decision card output shape and scope-prefixed snippets
* docs: release notes for ranked search and edit decision card
* sanitize docs, one last moment fix
* feat: expose all 10 MCP tools via CLI + document them
- Add handleCliCommand() in src/cli.ts with 8 new subcommands:
search, metadata, status, reindex, style-guide, patterns, refs, cycles
- Each maps 1:1 to existing tool handlers via dispatchTool()
- Create initToolContext() that builds ToolContext from persisted index
- Add required-flag validation (--query for search, --symbol for refs)
- Support --json flag for scripting/piping
- Update src/index.ts routing to send CLI_SUBCOMMANDS to handleCliCommand
- Expand README "CLI Access" → "CLI Reference" with all 9 commands
- Add "CLI Reference" section to docs/capabilities.md with command table
CLI now enables vendor-neutral access for scripting, debugging, and CI.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* refactor: clean up imports and improve error handling
- Removed unused import of Memory from src/index.ts.
- Simplified error message construction in src/core/symbol-references.ts.
- Reorganized risk level calculation in src/tools/search-codebase.ts for clarity and consistency.
- Added a TODO comment for reviewing confidence calculation in src/tools/search-codebase.ts.
* refactor: update risk level calculation in search-codebase.ts
- Renamed riskLevel variable to _riskLevel for clarity.
- Added a TODO comment to review the risk level calculation logic.
- Adjusted risk level assignment based on cycle count and impact candidates.
* refactor: clean up CLI command output and improve error message formatting
- Consolidated console.log statements in src/cli.ts for better readability.
- Enhanced error message formatting in src/core/symbol-references.ts and src/tools/search-codebase.ts for consistency.
- Streamlined conditional object construction in src/tools/search-codebase.ts for clarity.
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>1 parent ac4389d commit 7581fba
File tree
8 files changed
+572
-217
lines changed- docs
- src
- preflight
- tools
8 files changed
+572
-217
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
| 290 | + | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
293 | 295 | | |
294 | 296 | | |
295 | | - | |
296 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
297 | 300 | | |
298 | | - | |
299 | | - | |
| 301 | + | |
| 302 | + | |
300 | 303 | | |
301 | | - | |
302 | | - | |
| 304 | + | |
| 305 | + | |
303 | 306 | | |
304 | | - | |
305 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
306 | 310 | | |
307 | | - | |
308 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
309 | 318 | | |
310 | | - | |
311 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
312 | 333 | | |
313 | 334 | | |
314 | | - | |
| 335 | + | |
315 | 336 | | |
316 | 337 | | |
317 | 338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
5 | 34 | | |
6 | 35 | | |
7 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
0 commit comments