Skip to content

Commit 12eff69

Browse files
committed
Remove workspace aliases in favor of namespaces
1 parent b678686 commit 12eff69

72 files changed

Lines changed: 727 additions & 1434 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A local code analysis tool that parses codebases with Tree-sitter and builds a k
44

55
## MCP Server
66

7-
The ccg MCP server registered in `.mcp.json` provides 35 tools:
7+
The ccg MCP server registered in `.mcp.json` provides 33 tools:
88

99
- `parse_project`, `build_or_update_graph`, `run_postprocess`
1010
- `get_postprocess_policy`, `reset_postprocess_policy`
@@ -16,7 +16,6 @@ The ccg MCP server registered in `.mcp.json` provides 35 tools:
1616
- `get_annotation`
1717
- `build_rag_index`, `get_rag_tree`, `get_doc_content`, `search_docs`, `retrieve_docs`
1818
- `upload_file`, `upload_files`, `list_namespaces`, `list_files`, `delete_file`, `delete_namespace`
19-
- `list_workspaces`, `delete_workspace` (deprecated aliases)
2019

2120
`ccg serve` is the local stdio MCP entry point. Self-hosted HTTP mode is provided by
2221
the separate `ccg-server` binary, which serves `/mcp`, `/health`, `/ready`, `/status`,
@@ -35,7 +34,7 @@ Graceful shutdown: SIGINT/SIGTERM propagates context cancellation to in-progress
3534
| `/ccg-analyze` | Code analysis: impact radius, flow tracing, dead code, architecture |
3635
| `/ccg-annotate` | Annotation system: AI annotation workflow and tag reference |
3736
| `/ccg-docs` | Documentation: doc generation, RAG indexing, lint |
38-
| `/ccg-workspace` | Namespace file management: upload, list, delete (`workspace` is a deprecated alias) |
37+
| `/ccg-namespace` | Namespace file management: upload, list, delete |
3938

4039
Skill files are located under `skills/` and are written so coding agents such as Codex and Claude Code
4140
can use them as slash-command style workflows.
@@ -70,7 +69,7 @@ use ccg MCP tools and Agent Skills first.
7069
See the `guide/` directory for detailed documentation:
7170

7271
- [CLI Reference](guide/cli-reference.md) - all commands, flags, and config files
73-
- [MCP Tools](guide/mcp-tools.md) - 35 MCP tools, Agent Skills, AI-Driven Annotation
72+
- [MCP Tools](guide/mcp-tools.md) - 33 MCP tools, Agent Skills, AI-Driven Annotation
7473
- [Annotations](guide/annotations.md) - annotation tags, examples, and search
7574
- [Webhook](guide/webhook.md) - webhook sync, branch filtering, HMAC, graceful shutdown
7675
- [Docker](guide/docker.md) - Docker builds, MCP server, PostgreSQL deployment

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ FROM alpine:3.21
2626
RUN apk add --no-cache ca-certificates git \
2727
&& addgroup -S ccg \
2828
&& adduser -S -G ccg -h /home/ccg ccg \
29-
&& mkdir -p /workspace /repos /home/ccg/.cache /home/ccg/.config/ccg \
30-
&& chown -R ccg:ccg /workspace /repos /home/ccg
29+
&& mkdir -p /repo /repos /home/ccg/.cache /home/ccg/.config/ccg \
30+
&& chown -R ccg:ccg /repo /repos /home/ccg
3131

3232
COPY --from=builder /usr/local/bin/ccg /usr/local/bin/ccg
3333
COPY --from=builder /usr/local/bin/ccg-server /usr/local/bin/ccg-server
3434
COPY --from=wiki-builder /src/web/wiki/dist /usr/share/ccg/wiki
3535

36-
WORKDIR /workspace
36+
WORKDIR /repo
3737
USER ccg
3838
ENV HOME=/home/ccg \
3939
XDG_CACHE_HOME=/home/ccg/.cache \

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# code-context-graph
22

3-
Local code analysis tool that parses codebases via Tree-sitter into a knowledge graph. Supports 12 languages, 35 MCP tools, and custom annotation search.
3+
Local code analysis tool that parses codebases via Tree-sitter into a knowledge graph. Supports 12 languages, 33 MCP tools, and custom annotation search.
44

55
CCG is built primarily for GPT, Claude, Codex, and other LLM-based coding agents. It acts as local or self-hosted context infrastructure: agents can search code by intent, inspect call graphs, trace impact, retrieve docs, and keep responses bounded instead of reading entire repositories into context.
66

@@ -11,7 +11,7 @@ Inspired by [code-review-graph](https://github.com/tirth8205/code-review-graph)
1111
## Features
1212

1313
- **12 languages**: Go, Python, TypeScript, Java, Ruby, JavaScript, C, C++, Rust, Kotlin, PHP, Lua/Luau
14-
- **35 MCP tools**: parse, search, impact analysis, flow tracing, dead code detection, postprocess operations, namespace file management, and more
14+
- **33 MCP tools**: parse, search, impact analysis, flow tracing, dead code detection, postprocess operations, namespace file management, and more
1515
- **RAG-first code exploration**: generated docs + community structure let LLM agents answer natural-language questions before drilling into exact graph nodes
1616
- **Browser Wiki UI**: `ccg-server` can serve generated docs, tree search, PageIndex-style retrieval, Context Tray copying, and an Obsidian-style graph viewer
1717
- **Custom annotations**: `@intent`, `@domainRule`, `@sideEffect`, `@mutates`, `@index` — search code by business context ([details](guide/annotations.md))
@@ -253,7 +253,7 @@ server can also expose `/wiki` when `--wiki-dir` is configured:
253253
```
254254

255255
MCP-capable clients such as Codex or Claude Code can connect and get access to
256-
35 MCP tools. See [MCP Tools Reference](guide/mcp-tools.md) for the full list.
256+
33 MCP tools. See [MCP Tools Reference](guide/mcp-tools.md) for the full list.
257257

258258
## Architecture
259259

@@ -281,7 +281,7 @@ See [Architecture Details](guide/architecture.md) for component breakdown and DB
281281
| [CLI Reference](guide/cli-reference.md) | All commands, flags, and config file (`.ccg.yaml`) |
282282
| [Eval](guide/eval.md) | Parser/search quality evaluation, golden corpus, and metrics |
283283
| [Lint](guide/lint.md) | Detailed `ccg lint` category reference, interpretation guide, and CI usage |
284-
| [MCP Tools](guide/mcp-tools.md) | 35 MCP tools, agent skills, AI-Driven Annotation |
284+
| [MCP Tools](guide/mcp-tools.md) | 33 MCP tools, agent skills, AI-Driven Annotation |
285285
| [Annotations](guide/annotations.md) | Annotation system — tags, examples, search |
286286
| [Webhook](guide/webhook.md) | Webhook sync, branch filtering, HMAC, graceful shutdown |
287287
| [Docker](guide/docker.md) | Docker build, MCP server, Wiki UI, PostgreSQL deployment |

cmd/ccg-server/main.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ func newRootCmd(rt *core.Runtime, serviceVersion string) *cobra.Command {
8686
dbDriver = viper.GetString("db.driver")
8787
dbDSN = viper.GetString("db.dsn")
8888

89-
if cfg.WorkspaceRoot != "" && !cmd.Flags().Changed("namespace-root") {
90-
cfg.NamespaceRoot = cfg.WorkspaceRoot
91-
}
92-
cfg.WorkspaceRoot = cfg.NamespaceRoot
9389
if cfg.MaxFileBytes == 0 {
9490
cfg.MaxFileBytes = viper.GetInt64("parse.max_file_bytes")
9591
}
@@ -135,7 +131,6 @@ func newRootCmd(rt *core.Runtime, serviceVersion string) *cobra.Command {
135131
cmd.Flags().BoolVar(&cfg.Stateless, "stateless", false, "Stateless session management (for multi-instance deployments)")
136132
cmd.Flags().StringVar(&cfg.WikiDir, "wiki-dir", cfg.WikiDir, "Directory containing built Wiki UI assets; enables /wiki when set")
137133
cmd.Flags().StringVar(&cfg.NamespaceRoot, "namespace-root", cfg.NamespaceRoot, "Root directory for file namespaces")
138-
cmd.Flags().StringVar(&cfg.WorkspaceRoot, "workspace-root", "", "Deprecated alias for --namespace-root")
139134

140135
cmd.Flags().IntVar(&cfg.WebhookWorkers, "webhook-workers", cfg.WebhookWorkers, "Number of webhook sync workers")
141136
cmd.Flags().IntVar(&cfg.WebhookMaxTrackedRepos, "webhook-max-tracked-repos", cfg.WebhookMaxTrackedRepos, "Maximum repositories tracked by the webhook sync queue")

cmd/ccg/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ func main() {
6666
NoCache: cfg.NoCache,
6767
OTELEndpoint: cfg.OTELEndpoint,
6868
NamespaceRoot: cfg.NamespaceRoot,
69-
WorkspaceRoot: cfg.WorkspaceRoot,
7069
MaxFileBytes: cfg.MaxFileBytes,
7170
MaxTotalParsedBytes: cfg.MaxTotalParsedBytes,
7271
ServiceVersion: version,

guide/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Context Tray Markdown, or visually explore graph edges.
1717
| [CLI Reference](cli-reference.md) | Full CLI commands, options, and configuration file (`.ccg.yaml`) |
1818
| [Eval](eval.md) | Parser/search quality evaluation, golden corpus, and metrics |
1919
| [Lint](lint.md) | Detailed `ccg lint` category reference, interpretation guide, and CI usage |
20-
| [MCP Tools](mcp-tools.md) | 35 MCP tools, agent skills, RAG-first routing, AI-driven annotation |
20+
| [MCP Tools](mcp-tools.md) | 33 MCP tools, agent skills, RAG-first routing, AI-driven annotation |
2121
| [Annotations](annotations.md) | Custom annotation system — tags, examples, search/RAG quality |
2222
| [Webhook](webhook.md) | GitHub / Gitea webhook sync, branch filtering, graceful shutdown |
2323
| [Docker](docker.md) | Docker image build, MCP server setup, Wiki UI deployment, PostgreSQL integration |

guide/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Golden corpus-based parser accuracy and search quality evaluation framework.
7474

7575
### MCP Server (`internal/mcp/`)
7676

77-
Exposes 35 tools via MCP protocol. The local `ccg serve` command exposes these
77+
Exposes 33 tools via MCP protocol. The local `ccg serve` command exposes these
7878
tools over stdio. The self-hosted `ccg-server` binary exposes the same tool
7979
surface over Streamable HTTP and adds health/status/webhook endpoints.
8080

guide/claude-md-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ get_minimal_context ← always start here (graph state + recommended to
3535

3636
- `search` covers annotations (`@intent`, `@domainRule`, etc.) as well as code
3737
- Narrow the scope with a path: `search(path: "internal/auth")`
38-
- In MSA environments, use the `namespace` parameter on all tools to isolate services (`workspace` remains a deprecated alias)
38+
- In MSA environments, use the `namespace` parameter on all tools to isolate services.
3939
````
4040

4141
---

guide/cli-reference.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ recovery.
141141
| `ccg serve --cache-ttl <dur>` | TTL for MCP serve session cache (default `5m`; use `0` or `--no-cache` to disable) |
142142
| `ccg serve --no-cache` | Disable the in-memory MCP serve session cache |
143143
| `ccg serve --otel-endpoint <url>` | Enable OTLP HTTP trace export to the given full endpoint URL (for example `http://collector:4318/v1/traces`); when unset, CCG still creates SDK spans locally but does not export them |
144-
| `ccg serve --namespace-root <dir>` | Root directory for file namespaces (default `workspaces`) |
145-
| `ccg serve --workspace-root <dir>` | Deprecated alias for `--namespace-root` |
144+
| `ccg serve --namespace-root <dir>` | Root directory for file namespaces (default `namespaces`) |
146145
| `ccg serve --max-file-bytes <bytes>` | Maximum bytes allowed per parsed source file (`0` disables the limit) |
147146
| `ccg serve --max-total-parsed-bytes <bytes>` | Maximum total bytes parsed across source files (`0` disables the limit) |
148147

@@ -156,8 +155,7 @@ HTTP MCP and webhook hosting now live in the dedicated `ccg-server` binary:
156155
| `ccg-server --insecure-http` | Allow non-loopback HTTP binding without a bearer token (testing only) |
157156
| `ccg-server --stateless` | Stateless session mode (multi-instance deployments) |
158157
| `ccg-server --wiki-dir <dir>` | Enable the browser Wiki UI at `/wiki` using a built React dist directory; `/wiki/api/*` uses the same bearer token as `/mcp` |
159-
| `ccg-server --namespace-root <dir>` | Root directory for file namespaces (default `workspaces`) |
160-
| `ccg-server --workspace-root <dir>` | Deprecated alias for `--namespace-root` |
158+
| `ccg-server --namespace-root <dir>` | Root directory for file namespaces (default `namespaces`) |
161159
| `ccg-server --allow-repo <pat>` | Allowed repo patterns for webhook sync (e.g. `org/*`, `org/api:main,develop`) |
162160
| `ccg-server --webhook-secret <s>` | HMAC secret for webhook signature verification |
163161
| `ccg-server --insecure-webhook` | Allow unsigned webhook requests for local testing only |

guide/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ internal/
117117
docs/ — Documentation generation
118118
eval/ — Parser/search quality evaluation (golden corpus, P/R/F1, P@K, MRR, nDCG)
119119
mcpruntime/ — Shared MCP runtime assembly, stdio runner, cache, telemetry
120-
mcp/ — MCP server (35 tools)
120+
mcp/ — MCP server (33 tools)
121121
wikiserver/ — ccg-server Wiki static serving and viewer API
122122
wikiindex/ — Wiki presentation index builder (`wiki-index.json`)
123123
model/ — DB models

0 commit comments

Comments
 (0)