analyze_codebase
Scan a source code directory and produce a cold-start bootstrap report with language distribution, top documentable files, and recommended next steps for onboarding.
Instructions
Analyze a source code directory and return a cold-start bootstrap report. Read-only.
Does not modify source files or the vector index. Runs entirely
server-side using Python ast, regex, and local MiniLM embeddings —
no cloud calls, no token cost.
The report is cached at /data/coldstart-{project}.md after the first
run and returned instantly on subsequent calls. Use force=True only
after significant code changes — not for routine sessions.
Use at the START of work on an unfamiliar codebase instead of reading
dozens of files. Then use the write_*() tools to document the top
files identified in the report. Use classify_documents() for existing
.md files in the project repo.
The path must be accessible inside the Docker container (i.e. mounted
as a volume). It cannot reach paths on the host that are not mounted.
Args:
path: Absolute path to the source directory to scan
force: Regenerate even if a cached report exists (default: False)
project: Target project name (optional)
Returns:
Markdown report (~5–20 KB) with language distribution, category map,
top 20 files ranked by documentability, near-duplicate file pairs,
undocumented directories, and recommended next steps.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| force | No | ||
| project | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |