@@ -9,32 +9,32 @@ Local code analysis tool that parses codebases via Tree-sitter into a knowledge
99
1010## Subcommands
1111
12- | Command | Description | Example |
13- | ---------| -------------| ---------|
14- | ` build [dir] ` | Parse directory, build graph + search index | ` ccg build . ` |
15- | ` build --exclude <pat> ` | Exclude files/paths (repeatable) | ` ccg build --exclude vendor ` |
16- | ` build --no-recursive [dir] ` | Only parse top-level directory | ` ccg build --no-recursive . ` |
17- | ` update [dir] ` | Incremental sync (changed files only) | ` ccg update . ` |
18- | ` status ` | Show graph statistics (nodes/edges/files) | ` ccg status ` |
19- | ` search <query> ` | FTS keyword search (includes @annotations ) | ` ccg search "authentication" ` |
20- | ` search --path <prefix> <query> ` | Scoped search by path prefix | ` ccg search --path internal/auth "login" ` |
21- | ` languages ` | List supported languages and extensions | ` ccg languages ` |
22- | ` example [language] ` | Show annotation writing example | ` ccg example go ` |
23- | ` tags ` | Show all annotation tag reference | ` ccg tags ` |
24- | ` serve ` | Start MCP server (stdio by default) | ` ccg serve ` |
25- | ` serve --transport streamable-http ` | Start MCP server over HTTP | ` ccg serve --transport streamable-http ` |
26- | ` serve --http-addr :9090 ` | Custom HTTP listen address | ` ccg serve --http-addr :9090 ` |
27- | ` serve --stateless ` | Stateless session mode | ` ccg serve --stateless ` |
28- | ` serve --allow-repo <pat> ` | Allowed repos for webhook sync (repeatable) | ` ccg serve --allow-repo "org/*" ` |
29- | ` serve --webhook-secret <s> ` | HMAC secret for webhook verification | ` ccg serve --webhook-secret mysecret ` |
30- | ` serve --repo-root <dir> ` | Root dir for cloned repos | ` ccg serve --repo-root /data/repos ` |
12+ | Command | Description | Example |
13+ | ----------------------------------- | ------------------------------------------- | ----------------------------------------- |
14+ | ` build [dir] ` | Parse directory, build graph + search index | ` ccg build . ` |
15+ | ` build --exclude <pat> ` | Exclude files/paths (repeatable) | ` ccg build --exclude vendor ` |
16+ | ` build --no-recursive [dir] ` | Only parse top-level directory | ` ccg build --no-recursive . ` |
17+ | ` update [dir] ` | Incremental sync (changed files only) | ` ccg update . ` |
18+ | ` status ` | Show graph statistics (nodes/edges/files) | ` ccg status ` |
19+ | ` search <query> ` | FTS keyword search (includes @annotations ) | ` ccg search "authentication" ` |
20+ | ` search --path <prefix> <query> ` | Scoped search by path prefix | ` ccg search --path internal/auth "login" ` |
21+ | ` languages ` | List supported languages and extensions | ` ccg languages ` |
22+ | ` example [language] ` | Show annotation writing example | ` ccg example go ` |
23+ | ` tags ` | Show all annotation tag reference | ` ccg tags ` |
24+ | ` serve ` | Start MCP server (stdio by default) | ` ccg serve ` |
25+ | ` serve --transport streamable-http ` | Start MCP server over HTTP | ` ccg serve --transport streamable-http ` |
26+ | ` serve --http-addr :9090 ` | Custom HTTP listen address | ` ccg serve --http-addr :9090 ` |
27+ | ` serve --stateless ` | Stateless session mode | ` ccg serve --stateless ` |
28+ | ` serve --allow-repo <pat> ` | Allowed repos for webhook sync (repeatable) | ` ccg serve --allow-repo "org/*" ` |
29+ | ` serve --webhook-secret <s> ` | HMAC secret for webhook verification | ` ccg serve --webhook-secret mysecret ` |
30+ | ` serve --repo-root <dir> ` | Root dir for cloned repos | ` ccg serve --repo-root /data/repos ` |
3131
3232## Execution
3333
3434Parse the user's input after ` ccg ` and run via Bash:
3535
3636``` bash
37- ./ ccg {subcommand} {args}
37+ ccg {subcommand} {args}
3838```
3939
4040If the binary doesn't exist, build it first:
@@ -65,23 +65,26 @@ Related skills:
6565
6666## MCP Tools (7)
6767
68- | Tool | Description |
69- | ------| -------------|
70- | ` parse_project ` | Parse source files |
71- | ` build_or_update_graph ` | Full/incremental build with postprocessing |
72- | ` run_postprocess ` | Run flows/communities/search rebuild |
73- | ` get_node ` | Get node by qualified name |
74- | ` search ` | Full-text search |
75- | ` query_graph ` | Predefined graph queries (callers, callees, imports, etc.) |
76- | ` list_graph_stats ` | Node/edge/file counts |
68+ | Tool | Description |
69+ | ----------------------- | ---------------------------------------------------------- |
70+ | ` parse_project ` | Parse source files |
71+ | ` build_or_update_graph ` | Full/incremental build with postprocessing |
72+ | ` run_postprocess ` | Run flows/communities/search rebuild |
73+ | ` get_node ` | Get node by qualified name |
74+ | ` search ` | Full-text search |
75+ | ` query_graph ` | Predefined graph queries (callers, callees, imports, etc.) |
76+ | ` list_graph_stats ` | Node/edge/file counts |
7777
7878## Smart Behaviors
7979
8080### Auto-rebuild when stale
81+
8182If ` ccg.db ` doesn't exist or the user asks to analyze the project, run ` ccg build . ` first.
8283
8384### Annotation-aware search
85+
8486When the user asks about business concepts, use FTS search which includes annotation content:
87+
8588- ` @intent ` — function purpose/goal
8689- ` @domainRule ` — business rules
8790- ` @sideEffect ` — side effects
@@ -102,8 +105,8 @@ Go, Python, TypeScript, Java, Ruby, JavaScript, C, C++, Rust, Kotlin, PHP, Lua
102105
103106## HTTP Endpoints (Streamable HTTP mode)
104107
105- | Endpoint | Method | Description |
106- | ----------| --------| -------------|
107- | ` /mcp ` | POST/GET/DELETE | MCP protocol endpoint (session-based) |
108- | ` /health ` | GET | Health check — returns ` {"status":"ok"} ` |
109- | ` /webhook ` | POST | GitHub / Gitea webhook receiver (when ` --allow-repo ` configured). Supports ` X-Hub-Signature-256 ` and ` X-Gitea-Signature ` HMAC verification. |
108+ | Endpoint | Method | Description |
109+ | ---------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
110+ | ` /mcp ` | POST/GET/DELETE | MCP protocol endpoint (session-based) |
111+ | ` /health ` | GET | Health check — returns ` {"status":"ok"} ` |
112+ | ` /webhook ` | POST | GitHub / Gitea webhook receiver (when ` --allow-repo ` configured). Supports ` X-Hub-Signature-256 ` and ` X-Gitea-Signature ` HMAC verification. |
0 commit comments