Coraline Documentation
Coraline is a local-first code intelligence engine that builds a semantic graph of your codebase and exposes high-precision tools over CLI and MCP.
This book is published from the repository and combines practical guides with full reference docs.
What You Can Do With Coraline
- Index and incrementally sync large codebases.
- Query symbols, call graphs, and impact radius.
- Build context for AI workflows.
- Use semantic search with local embeddings.
- Integrate with MCP clients.
Read Next
Start with Getting Started, then move to the CLI Reference and MCP Tools.
Getting Started
Install
Install from crates.io:
cargo install coraline
Initialize and Index
coraline init
coraline index
Optional: Semantic Search Model
coraline model download
coraline embed
By default, embedding runs a freshness check and auto-syncs stale indexed state before generating embeddings.
Start MCP Server
coraline serve --mcp
Next Steps
CLI Reference
Coraline CLI Reference
Coraline is invoked as coraline [COMMAND] [OPTIONS] [PATH].
When [PATH] is omitted, the current working directory is used as the project root.
Commands at a Glance
| Command | Description |
|---|---|
init | Initialize a new project |
index | Full reindex of the project |
sync | Incremental update (git-diff based) |
status | Show project status and paths |
stats | Show index statistics |
query | Search symbols by name |
context | Build AI context for a task |
callers | Find what calls a node |
callees | Find what a node calls |
impact | Analyze change impact radius |
config | Read or update configuration |
hooks | Manage git hooks |
doctor | Run diagnostic checks (config, database, model, embed coverage) |
serve | Start the MCP server |
update | Check for available updates on crates.io |
embed | Generate vector embeddings for indexed nodes |
model | Manage the ONNX embedding model |
migrate | Convert embedding storage between layouts |
audit-docs | Audit documentation accuracy and coverage against the graph |
coraline init [PATH]
Initialize Coraline in a project directory. Creates .coraline/ with a SQLite database, default config.toml, and initial memory templates.
When stdin is a TTY and no model decision flag is given, prompts to download the embedding model (~137 MB) after initialization. Decline to skip — all non-embedding tools remain fully functional and you can download later with coraline model download. Use --embed, --no-embed, or --yes to make the decision non-interactively (see below); if the model is already present on disk, init skips the prompt entirely regardless of flags.
If .coraline/ already exists and --index is passed without --force, init skips the overwrite and runs indexing directly on the existing project.
Options:
| Flag | Description |
|---|---|
-i, --index | Run a full index immediately after initialization |
-f, --force | Overwrite an existing .coraline/ directory without prompting |
--no-hooks | Skip automatic git hook installation |
--embed | Download the embedding model during init (skips the TTY prompt) |
--no-embed | Skip the embedding model entirely — no prompt, no download. Conflicts with --embed and always wins over --yes |
-y, --yes | Non-interactive mode: auto-accept the model download prompt |
Examples:
coraline init # Initialize current directory
coraline init /path/to/my-app # Initialize a specific path
coraline init -i # Initialize, prompt for model, then index
coraline init -i --no-hooks # Initialize and index, skip git hooks
coraline init --force # Wipe and reinitialize existing project
coraline init --embed # Initialize and download the embedding model, no prompt
coraline init --no-embed # Initialize, skip the model entirely, no prompt
coraline init --yes # Initialize non-interactively; auto-downloads the model
Which model is downloaded is controlled by
vectors.modelin config (defaultnomic-embed-text-v1.5), not by aninitflag — seecoraline modelbelow and the[vectors]section in CONFIGURATION.md.
On success, creates:
.coraline/coraline.db— SQLite knowledge graph.coraline/config.toml— Annotated config template.coraline/memories/— Initial memory files.coraline/.gitignore— Excludes local data files from git.git/hooks/post-commit— Auto-sync hook (unless--no-hooks)
coraline index [PATH]
Perform a full reindex of the project. Parses all matching source files, extracts symbols and edges, resolves cross-file references, and stores results in the knowledge graph.
Options:
| Flag | Description |
|---|---|
-f, --force | Force re-parse all files, even unchanged ones |
-q, --quiet | Suppress progress output |
Examples:
coraline index # Index current directory
coraline index /path/to/project # Index a specific path
coraline index -f # Force full re-parse
coraline index -q # Silent (useful in scripts)
coraline sync [PATH]
Perform an incremental update using git-diff to identify changed files. Faster than a full index for routine updates.
Options:
| Flag | Description |
|---|---|
-q, --quiet | Suppress progress output |
Examples:
coraline sync # Sync current directory
coraline sync -q # Silent sync (used by git hook)
coraline status [PATH]
Show the current project status: initialization state, paths to config and database, database size, embedding-model state, and git hook status.
Examples:
coraline status
Sample output:
Coraline Status
Project: /home/user/my-app
Config: /home/user/my-app/.coraline/config.toml
Database: /home/user/my-app/.coraline/coraline.db (1048576 bytes)
Embeddings: model_quantized.onnx (161 MB)
Model: jina-embeddings-v2-base-code
Model dir: /home/user/.config/coraline/models/jina-embeddings-v2-base-code
Git hooks: installed
The Embeddings line shows not present (with a fix hint) when no model file has been downloaded yet for the project's configured model (vectors.model, default nomic-embed-text-v1.5). See coraline model and coraline doctor below.
For deeper diagnostics (every probe with detail + fix hints, deep model-load / inference / embed-coverage checks, machine-readable JSON), use coraline doctor — it's the same probe set that the MCP coraline_status tool runs when called with include_doctor: true.
coraline stats [PATH]
Show index statistics: file count, node count, edge count, and unresolved reference count.
Options:
| Flag | Description |
|---|---|
-j, --json | Output as JSON |
Examples:
coraline stats
coraline stats --json
Sample output:
Coraline Statistics
Files: 128
Nodes: 4201
Edges: 9872
Unresolved refs: 153
coraline query <SEARCH> [PATH]
Search for symbols in the knowledge graph by name. Uses SQLite full-text search (FTS5) for fast, fuzzy matching.
Arguments:
| Argument | Description |
|---|---|
SEARCH | Symbol name or search pattern |
Options:
| Flag | Description |
|---|---|
-p, --path PATH | Project root path |
-l, --limit N | Maximum results (default: 10) |
-k, --kind KIND | Filter by node kind (see below) |
-j, --json | Output as JSON |
Valid KIND values:
file, module, class, struct, interface, trait, protocol, function, method, property, field, variable, constant, enum, enum_member, type_alias, namespace, parameter, import, export, route, component
Examples:
coraline query resolve_unresolved
coraline query "index" --kind function --limit 5
coraline query Auth --json
coraline context <TASK> [PATH]
Build structured context for an AI task description. Searches the graph, traverses relationships, and returns relevant code snippets.
Arguments:
| Argument | Description |
|---|---|
TASK | Natural language task description |
Options:
| Flag | Description |
|---|---|
-p, --path PATH | Project root path |
-n, --max-nodes N | Max graph nodes (default: 50) |
-c, --max-code N | Max code blocks (default: 10) |
--no-code | Omit source code snippets |
-f, --format FMT | markdown (default) or json |
Examples:
coraline context "add authentication middleware"
coraline context "how does indexing work" --format json
coraline context "refactor database layer" --max-nodes 30 --max-code 5
coraline callers <NODE_ID> [PATH]
Find all nodes that call the specified node (incoming calls edges).
Arguments:
| Argument | Description |
|---|---|
NODE_ID | Node ID (from query or stats --json output) |
Options:
| Flag | Description |
|---|---|
-p, --path PATH | Project root path |
-l, --limit N | Maximum results (default: 20) |
-j, --json | Output as JSON |
Examples:
coraline callers abc123
coraline callers abc123 --limit 50 --json
coraline callees <NODE_ID> [PATH]
Find all nodes that the specified node calls (outgoing calls edges).
Same flags as callers.
coraline impact <NODE_ID> [PATH]
Analyze the impact radius of a symbol — what would be affected if it changed. Performs a BFS over incoming edges up to --depth hops.
Arguments:
| Argument | Description |
|---|---|
NODE_ID | Node ID to analyze |
Options:
| Flag | Description |
|---|---|
-p, --path PATH | Project root path |
-d, --depth N | BFS depth (default: 3) |
-j, --json | Output as JSON |
Examples:
coraline impact abc123
coraline impact abc123 --depth 5 --json
coraline config [PATH]
Read or update the project configuration at .coraline/config.toml.
Options:
| Flag | Description |
|---|---|
-p, --path PATH | Project root path |
-j, --json | Print config as JSON |
-s, --section SEC | Print only a section (indexing, context, sync, vectors) |
--set KEY=VALUE | Set a value: section.key=value |
Examples:
coraline config # Print full config (TOML)
coraline config --section context # Print one section
coraline config --json # Print as JSON
coraline config --set context.max_nodes=30 # Update a value
coraline config --set indexing.batch_size=50
coraline config --set vectors.enabled=true
coraline hooks <ACTION> [PATH]
Manage the git post-commit hook that runs coraline sync automatically after each commit.
Actions:
| Action | Description |
|---|---|
install | Install the hook (backs up existing hook) |
remove | Remove the hook (restores backup if present) |
status | Show whether the hook is installed |
Options:
| Flag | Description |
|---|---|
-p, --path PATH | Project root path |
Examples:
coraline hooks install
coraline hooks status
coraline hooks remove
coraline doctor [PATH]
Run diagnostic checks against a project and report pass/fail per check, with a fix hint for anything failing. Exits 0 if every check passed, 1 otherwise — safe to use as a CI gate.
Checks (in order):
| Check | What it verifies |
|---|---|
config | .coraline/config.toml exists and is readable |
database | .coraline/coraline.db opens and returns stats (node/edge/file counts) |
git hooks | The post-commit hook is installed (or the project isn't a git repo, which is fine) |
model file | At least one ONNX variant of the configured model (vectors.model) is present on disk |
model loads (deep only) | The ONNX model actually loads into an inference session |
inference (deep only) | A sample embedding runs through the loaded model successfully |
embed coverage (deep only) | Every indexed node has an embedding for the configured model |
The three deep checks require a build with the embeddings or embeddings-dynamic feature; they're skipped (not failed) on builds without it.
Options:
| Flag | Description |
|---|---|
--quick | Skip the three deep model-load/inference/coverage checks (fast, no ONNX runtime needed) |
--deep | Explicit deep mode — this is already the default; mutually exclusive with --quick |
--json | Print the report as JSON instead of the human-readable ✔/✘ list |
Examples:
coraline doctor # Full diagnostic run (deep checks included)
coraline doctor --quick # Skip slow model checks — good for CI
coraline doctor --json # Machine-readable report
Sample output:
✔ config
✔ database
✔ git hooks
✘ model file
→ Run `coraline model download`.
Sample --json output:
{
"probes": [
{
"name": "config",
"ok": true,
"detail": "/path/.coraline/config.toml (3775 bytes)"
},
{
"name": "database",
"ok": true,
"detail": "/path/.coraline/coraline.db (2 nodes, 1 edges, 1 files)"
},
{ "name": "git hooks", "ok": true, "detail": "installed" },
{
"name": "model file",
"ok": false,
"detail": "no model file for 'nomic-embed-text-v1.5' in ...",
"fix": "Run `coraline model download`."
}
],
"exit_code": 1
}
The same --json shape is exposed by the MCP coraline_status tool when called with include_doctor: true (plus a top-level doctor_needs_attention bool) — see docs/MCP_TOOLS.md for the full MCP tool reference. This means MCP clients don't need a separate coraline doctor invocation; one round-trip via coraline_status returns both the index stats and the full probe report.
coraline serve [PATH]
Start the MCP server. With --mcp, communicates over stdio using the Model Context Protocol.
Options:
| Flag | Description |
|---|---|
-p, --path PATH | Project root path |
--mcp | Start MCP stdio server (required) |
Examples:
coraline serve --mcp
coraline serve --mcp --path /path/to/project
Typically invoked by an MCP client (Claude Desktop, Claude Code, etc.) rather than directly.
coraline audit-docs [PATH]
Audit documentation accuracy and coverage against the code graph. Two checks run over the Markdown files in the project:
- Stale references — an inline code span that looks like a symbol name, but resolves to nothing in the graph.
- Undocumented exports — a public symbol with no matching reference in any indexed documentation.
The audit needs Markdown to be indexed. It is by default, but if your
project excludes **/*.md the audit will report zero doc files.
Options:
| Option | Description |
|---|---|
-p, --path PATH | Project root path |
--no-stale | Hide stale-reference findings |
--no-undocumented | Hide undocumented-export findings |
-l, --limit N | Maximum items per category (default: 50) |
-j, --json | Output raw JSON instead of formatted text |
Examples:
coraline audit-docs
coraline audit-docs --json
coraline audit-docs --no-stale
Output:
Doc audit — 1 file(s), 2 section(s) indexed
Stale references (1 total)
README.md:5 — `nonexistent_symbol` (section: Overview)
Undocumented exports (1 total)
function undocumented — lib.rs line 2
Output (--json):
{
"doc_files_indexed": 1,
"doc_sections_indexed": 2,
"stale_refs": [
{
"column": 21,
"doc_file": "README.md",
"line": 5,
"reference": "nonexistent_symbol",
"section": "Overview"
}
],
"undocumented_exports": [
{
"file": "lib.rs",
"kind": "function",
"line": 2,
"name": "undocumented",
"qualified_name": "lib.rs::undocumented"
}
]
}
coraline update
Check whether a newer version of Coraline is published on crates.io. Compares the running binary version against the latest release and prints upgrade instructions when an update is available.
This command does not need a project — it compares the running binary against crates.io, so it works from anywhere.
Options: None.
Examples:
coraline update
Output (when up to date):
Coraline v0.18.0 — checking for updates...
✓ Coraline v0.18.0 is up to date.
Output (when update available):
Coraline v0.16.0 — checking for updates...
⬆ Update available: v0.17.0 → v0.18.0
To update, run:
cargo install coraline --force
Or visit: https://crates.io/crates/coraline
Environment Variables
| Variable | Description |
|---|---|
CORALINE_LOG | Log level filter (default: coraline=info). Examples: debug, coraline=trace, warn |
Examples:
CORALINE_LOG=debug coraline index
CORALINE_LOG=coraline=trace coraline serve --mcp
Logs are written to .coraline/logs/coraline.log (daily rotating) and to stderr at the configured level.
coraline embed [PATH]
Generate vector embeddings for every currently indexed node using the local ONNX model. Embeddings enable the coraline_semantic_search MCP tool.
embed does not run sync itself — run coraline sync (or coraline index) first if source files have changed since the last index. The coraline_semantic_search MCP tool, by contrast, performs its own lightweight freshness check and incremental sync/re-embed on each call, so MCP clients don't need a manual coraline sync step.
Options:
| Flag | Description |
|---|---|
--download | Download the model automatically before embedding |
--variant FILENAME | ONNX variant to download (default: the configured model's recommended variant) |
--batch-size N | Nodes per progress batch (default: 50) |
-q, --quiet | Suppress progress output |
Examples:
coraline embed # Embed using already-downloaded model
coraline embed --download # Download the configured model then embed
coraline embed --download --variant model_fp16.onnx
Run coraline index first. Uses the model configured by vectors.model (default nomic-embed-text-v1.5), stored in ~/.config/coraline/models/<model>/ — see coraline model list.
coraline model [PATH]
Manage embedding model files. Supports multiple models — run coraline model list to see the registry.
coraline model list
List every embedding model Coraline knows how to download and run, with dimension and description.
coraline model list
coraline model download
Download model files from HuggingFace.
| Flag | Description |
|---|---|
--model NAME | Which supported model to download (default: vectors.model from config.toml) |
--variant FILENAME | ONNX variant to download (default: the model's recommended variant) |
-f, --force | Re-download even if files already exist |
-q, --quiet | Suppress progress output |
Downloads tokenizer.json, tokenizer_config.json, and the chosen ONNX weights into the shared model directory ~/.config/coraline/models/<model>/.
nomic-embed-text-v1.5 variants (smallest to largest):
| Variant | Size | Notes |
|---|---|---|
model_q4f16.onnx | ~111 MB | Q4 + fp16 mixed (smallest) |
model_int8.onnx | ~137 MB | int8 quantized (recommended) |
model_fp16.onnx | ~274 MB | fp16 |
model.onnx | ~547 MB | full f32 |
jina-embeddings-v2-base-code variants:
| Variant | Size | Notes |
|---|---|---|
model_quantized.onnx | ~162 MB | int8 quantized (recommended) |
model_fp16.onnx | ~321 MB | fp16 |
model.onnx | ~642 MB | full f32 |
coraline model download # download vectors.model's default variant
coraline model download --model jina-embeddings-v2-base-code
coraline model status
Show which model files are present in the model directory for the configured (or --model-selected) model.
| Flag | Description |
|---|---|
--model NAME | Which supported model to inspect (default: vectors.model from config.toml) |
coraline model status
coraline model status --model jina-embeddings-v2-base-code
coraline migrate <TARGET> [PATH]
Convert the project's embedding storage between Coraline's two on-disk layouts.
| Layout | Metadata table | Payload table |
|---|---|---|
| v1 | vectors | vectors (.embedding BLOB column) |
| v0 | vectors_meta | vectors_vec (vec0 virtual table) |
The layout is a property of the project, not of the binary that opens it — Coraline detects it at runtime, so a project can be opened by any build.
Arguments:
| Target | Description |
|---|---|
vec-ext | Convert the v1 BLOB vectors table to the sqlite-vec v0 layout |
vec1 | Convert the sqlite-vec v0 layout back to the v1 BLOB vectors table |
Options: None.
Examples:
coraline migrate vec-ext # v1 -> sqlite-vec v0
coraline migrate vec1 # sqlite-vec v0 -> v1
coraline migrate vec-ext /path/to/project
Output:
Migrated embedding storage to the sqlite-vec (v0) layout.
Embedding storage is already on that layout — nothing to do.
The conversion runs in a single transaction: if it fails part-way through, the rollback leaves the project on its original layout with its embeddings intact.
Converting is always an explicit command — it never runs as a side effect of embed or sync, because changing a project's on-disk layout is not something to do behind your back.
Requires a binary built with the vec-ext feature. Without it, the command says so rather than failing obscurely:
$ coraline migrate vec-ext
This binary was built without the `vec-ext` feature, so it cannot convert embedding storage.
Rebuild with `--features vec-ext` and retry.
Supported Languages
Coraline knows 37 languages. 36 of them ship a tree-sitter grammar; Liquid is the exception — it has no grammar and is parsed by hand. All 37 are indexed end to end: declarations, imports, calls, instantiations, inheritance and cross-file references are all resolved into the same semantic knowledge graph.
| Language | Extensions | Indexed |
|---|---|---|
| TypeScript | .ts | ✅ |
| TSX | .tsx | ✅ |
| JavaScript | .js | ✅ |
| JSX | .jsx | ✅ |
| Python | .py | ✅ |
| Go | .go | ✅ |
| Rust | .rs | ✅ |
| Java | .java | ✅ |
| C | .c, .h | ✅ |
| C++ | .cpp, .cc, .cxx, .hpp | ✅ |
| C# | .cs | ✅ |
| PHP | .php | ✅ |
| Ruby | .rb | ✅ |
| Swift | .swift | ✅ |
| Kotlin | .kt, .kts | ✅ |
| Liquid | .liquid | ✅ |
| Blazor | .razor, .cshtml | ✅ |
| Markdown | .md, .markdown | ✅ |
| Perl | .pl, .pm | ✅ |
| Bash | .sh, .bash | ✅ |
| Dart | .dart | ✅ |
| Elixir | .ex, .exs | ✅ |
| Elm | .elm | ✅ |
| Erlang | .erl, .hrl | ✅ |
| Fortran | .f, .for, .f90, .f95, .f03, .f08 | ✅ |
| Groovy | .groovy, .gradle | ✅ |
| Haskell | .hs | ✅ |
| Julia | .jl | ✅ |
| Lua | .lua | ✅ |
| MATLAB | .m | ✅ |
| Nix | .nix | ✅ |
| PowerShell | .ps1, .psm1 | ✅ |
| R | .r, .R | ✅ |
| Scala | .scala, .sc | ✅ |
| TOML | .toml | ✅ |
| YAML | .yml, .yaml | ✅ |
| Zig | .zig | ✅ |
✅ — the language is indexed and its graph is built.
Enabling a language
Every language Coraline knows about is indexed by default — the default
include patterns cover all of their extensions. A language outside
that set, or a project using an extension the default patterns do not
list, has to be enabled in .coraline/config.toml:
{
"include": ["**/*.rs", "**/*.md"],
"exclude": ["**/target/**"]
}
The full list of default patterns is in the Configuration guide.
What is extracted
The graph is the same shape for every language:
- Declarations — functions, methods, classes, structs, interfaces, traits, enums, type aliases, fields, variables and constants.
- Containment — a
containsedge from every declaration to the scope that holds it, so a method knows its class. - Calls — a
callsedge from the caller to the callee, resolved across files when an import or package membership backs the link. - Instantiation — a constructor call produces an
instantiatesedge rather than a plain call. - Inheritance —
extendsandimplementsedges. - Imports — an
importsedge per import statement, which is also what lets a call across a package boundary be resolved rather than guessed from the name.
The per-language mapping from tree-sitter node kinds to graph node kinds
lives in one table per language in
crates/coraline/src/grammar.rs,
and a guard test asserts that every kind the table names actually exists
in the grammar it claims to describe.
Querying
The MCP server exposes the graph directly:
{ "tool": "coraline_search", "arguments": { "name_pattern": "Widget" } }
coraline_search finds symbols by name, coraline_callers and
coraline_callees walk the call graph, coraline_impact reports what a
change breaks, and coraline_context assembles a task-shaped brief from
the graph. See the MCP Tools reference.
MCP Tools
Coraline MCP Tools Reference
Coraline exposes 38 MCP tools when running as an MCP server (coraline serve --mcp).
All tool names are prefixed with coraline_ to avoid collisions with other MCP servers.
Protocol notes:
- Negotiates MCP protocol version
2025-11-25(with compatibility fallback to2024-11-05) - Expects
notifications/initializedafterinitializebefore normal requests tools/listsupports pagination viacursorandnextCursor
coraline_semantic_search is available by default (the embeddings feature ships enabled) but only registered when an ONNX model is present in the shared model directory (~/.config/coraline/models/<model>/, where <model> is vectors.model from config, default nomic-embed-text-v1.5). Run coraline model download then coraline embed to activate it — see coraline model list for every supported model. The remaining 37 tools are typically available; memory-backed tools may be skipped if their initialization fails (e.g. due to filesystem or permission issues).
Quick Reference
| Category | Tool | Description |
|---|---|---|
| Graph | coraline_search | Find symbols by name or pattern |
coraline_callers | Find what calls a symbol | |
coraline_callees | Find what a symbol calls | |
coraline_impact | Analyze change impact radius | |
coraline_dependencies | Outgoing dependency graph from a node | |
coraline_dependents | Incoming dependency graph (what depends on a node) | |
coraline_path | Find a path between two nodes | |
coraline_stats | Detailed graph statistics by language/kind/edge | |
coraline_find_symbol | Find symbols with rich metadata + optional body | |
coraline_get_symbols_overview | List all symbols in a file | |
coraline_find_references | Find all references to a symbol | |
coraline_node | Get full node details and source code | |
coraline_cluster_overview | List Louvain clusters with one representative node per cluster | |
coraline_cluster_members | List nodes that share a given cluster_id | |
coraline_process_for | Return the call-graph trace (entry point + nodes + edges) for the given node | |
| Batch | coraline_batch_get_nodes | Fetch multiple nodes by ID in one call |
coraline_batch_callers | Get callers for multiple symbols in one call | |
coraline_batch_callees | Get callees for multiple symbols in one call | |
| Advanced Search | coraline_search_by_signature | Find symbols by type signature pattern |
coraline_search_by_docstring | Find symbols by documentation/comment content | |
coraline_search_exported_symbols | Search only public/exported symbols | |
coraline_find_by_kind_in_file | Get all symbols of a kind in one file | |
| Context | coraline_context | Build structured context for an AI task |
| Audit | coraline_audit_docs | Audit Markdown docs for stale references and undocumented exports |
| File | coraline_read_file | Read file contents |
coraline_list_dir | List directory contents | |
coraline_find_file | Find files by glob pattern | |
coraline_get_file_nodes | Get all indexed nodes in a file | |
coraline_status | Show project index statistics | |
coraline_sync | Trigger incremental index sync | |
coraline_get_config | Read project configuration | |
coraline_update_config | Update a config value | |
coraline_semantic_search | Vector similarity search (requires model download — see below) | |
| Memory | coraline_write_memory | Write or update a project memory |
coraline_read_memory | Read a project memory | |
coraline_list_memories | List all memories | |
coraline_delete_memory | Delete a memory | |
coraline_edit_memory | Edit memory via literal or regex replace |
Graph Tools
coraline_search
Search for code symbols by name or pattern across the indexed codebase.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | ✅ | — | Symbol name or FTS pattern |
kind | string | — | Filter: function, method, class, struct, interface, trait, module | |
file | string | — | Filter results to this file path (relative or absolute) | |
limit | number | 10 | Maximum results |
Output:
{
"results": [
{
"node": {
"id": "abc123",
"kind": "function",
"name": "resolve_unresolved",
"qualified_name": "coraline::resolution::resolve_unresolved",
"file_path": "/path/to/resolution/mod.rs",
"start_line": 42,
"end_line": 95,
"language": "rust",
"signature": "fn resolve_unresolved(conn: &mut Connection, ...)"
},
"score": 0.92
}
],
"count": 1
}
coraline_callers
Find all functions/methods that call a given symbol (incoming calls edges).
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | — | ID of the target node | |
name | string | — | Symbol name (alternative to node_id) | |
file | string | — | Disambiguate name by file path | |
limit | number | 20 | Maximum callers to return | |
min_confidence | number | 0.0 | Minimum edge resolution confidence in [0.0, 1.0]. Edges below this threshold are filtered out. Direct AST-extracted edges have confidence 1.0; strongly-typed Rust crate:: / super:: / self:: resolutions have confidence 0.95; generic name matches / framework fallbacks have confidence 0.5. Default 0.0 includes every edge. |
Either node_id or name must be provided. When name matches multiple symbols, supply file to disambiguate or the tool returns a listing of candidates.
Output:
{
"callers": [
{
"id": "def456",
"kind": "function",
"name": "index_all",
"qualified_name": "coraline::extraction::index_all",
"file_path": "/path/to/extraction.rs",
"start_line": 120,
"line": 158
}
],
"count": 1
}
coraline_callees
Find all functions/methods that a given symbol calls (outgoing calls edges).
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | — | ID of the source node | |
name | string | — | Symbol name (alternative to node_id) | |
file | string | — | Disambiguate name by file path | |
limit | number | 20 | Maximum callees to return | |
min_confidence | number | 0.0 | Minimum edge resolution confidence in [0.0, 1.0]. Same scale as coraline_callers: 1.0 = direct AST-extracted, 0.95 = strong Rust path, 0.5 = generic / framework fallback. Default 0.0 includes every edge. |
Either node_id or name must be provided.
Output: Same shape as coraline_callers but field is callees.
Precision Notes:
- Call-edge resolution prefers extractor-provided candidate IDs (better locality signal) to avoid false-positive cross-project links in mixed active/legacy workspaces.
- When a call target is ambiguous and no scoped match exists, it is left unresolved (empty) rather than linked to a low-confidence global match.
- Results are ordered deterministically by (line, column, target) to ensure consistency across repeated queries.
coraline_impact
Analyze the impact radius of changing a symbol — finds everything that directly or transitively depends on it, via BFS over incoming calls and references edges.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | — | ID of the node to analyze | |
name | string | — | Symbol name (alternative to node_id) | |
file | string | — | Disambiguate name by file path | |
max_depth | number | 2 | BFS traversal depth | |
max_nodes | number | 50 | Cap on returned nodes |
Either node_id or name must be provided.
Output:
{
"nodes": [ ... ],
"edges": [ ... ],
"stats": {
"node_count": 12,
"edge_count": 15,
"file_count": 4,
"max_depth": 2
}
}
coraline_dependencies
Get the outgoing dependency graph from a node — what does this symbol import, call, or reference, recursively up to a configurable depth?
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | — | ID of the source node | |
name | string | — | Symbol name (alternative to node_id) | |
file | string | — | Disambiguate name by file path | |
max_depth | number | 2 | BFS traversal depth | |
max_nodes | number | 50 | Cap on returned nodes | |
edge_kinds | string[] | all | Edge kinds to follow (e.g. ["calls", "imports"]) |
Either node_id or name must be provided.
Output:
{
"root_id": "abc123",
"nodes": [ ... ],
"edges": [ ... ],
"stats": { "node_count": 8, "edge_count": 10, "file_count": 3, "max_depth": 2 }
}
coraline_dependents
Get the incoming dependency graph — what symbols depend on (call, import, or reference) this node, recursively?
Input: Same as coraline_dependencies (supports node_id or name + file).
Output: Same shape as coraline_dependencies but traversal follows edges in reverse.
coraline_path
Find a path between two nodes in the graph, using BFS over all edge kinds.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
from_id | string | Starting node ID | |
from_name | string | Starting node name (alternative to from_id) | |
from_file | string | Disambiguate from_name by file path | |
to_id | string | Target node ID | |
to_name | string | Target node name (alternative to to_id) | |
to_file | string | Disambiguate to_name by file path |
For each endpoint, either the _id or _name parameter must be provided.
Output:
{
"from_id": "abc123",
"to_id": "def456",
"path_found": true,
"path": ["abc123", "mid789", "def456"],
"length": 3
}
Returns { "path_found": false } if no path exists.
coraline_stats
Return detailed graph statistics: total counts, per-language file breakdown, node kind breakdown, and edge kind breakdown.
Input: None.
Output:
{
"totals": {
"nodes": 1842,
"edges": 4201,
"files": 47,
"unresolved_references": 123,
"vectors": 0
},
"files_by_language": { "rust": 28, "typescript": 14, "toml": 5 },
"nodes_by_kind": {
"function": 412,
"method": 287,
"import": 201,
"struct": 88
},
"edges_by_kind": {
"contains": 1842,
"calls": 987,
"imports": 201,
"exports": 178
}
}
coraline_find_symbol
Find symbols by name pattern with richer metadata than coraline_search, including optional source code body. Good for Foo/__init__-style path patterns.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name_pattern | string | ✅ | — | Symbol name or substring |
kind | string | — | Same kind filter as coraline_search | |
file | string | — | Filter results to this file path | |
include_body | boolean | false | Attach source code body | |
limit | number | 10 | Maximum results |
Output: { "symbols": [...], "count": N } — each symbol includes docstring, is_exported, is_async, is_static, score, and optionally body.
coraline_get_symbols_overview
Get an overview of all symbols in a file, grouped by kind and ordered by line number.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
file_path | string | ✅ | Path to file (relative to project root or absolute) |
Output:
{
"file_path": "src/lib.rs",
"symbol_count": 14,
"by_kind": {
"function": [ ... ],
"struct": [ ... ]
},
"symbols": [ ... ]
}
coraline_find_references
Find all nodes that reference (call, import, extend, implement, etc.) a given symbol.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | — | ID of the target node | |
name | string | — | Symbol name (alternative to node_id) | |
file | string | — | Disambiguate name by file path | |
edge_kind | string | all | Filter: calls, imports, extends, implements, references | |
limit | number | 50 | Maximum references | |
min_confidence | number | 0.0 | Minimum edge resolution confidence in [0.0, 1.0]. Same scale as coraline_callers / coraline_callees: 1.0 = direct AST-extracted, 0.95 = strong Rust path, 0.5 = generic / framework fallback. Default 0.0 includes every edge. |
Either node_id or name must be provided.
Output: { "node_id": "...", "references": [...], "count": N } — each reference includes its edge_kind and the line number of the edge.
coraline_node
Get complete details for a specific node by ID, including its source code body read from disk.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | — | The node ID | |
name | string | — | Symbol name (alternative to node_id) | |
file | string | — | Disambiguate name by file path | |
include_edges | boolean | false | Also return incoming/outgoing edge counts |
Either node_id or name must be provided.
Output: Full node record including body (source lines), visibility, decorators, type_parameters, is_async, is_static, is_abstract, and optionally incoming_edge_count / outgoing_edge_count.
Batch Tools
Fetch results for multiple symbols in one call instead of N round trips — roughly 60% fewer tokens than the equivalent sequence of single-symbol calls.
coraline_batch_get_nodes
Fetch multiple nodes by ID in a single call.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_ids | array of string | ✅ | — | Node IDs to fetch |
include_body | boolean | false | Include source code body for each node | |
output_format | string | "full" | "full" or "compact" (roughly 30% fewer tokens) |
Output: { "nodes": [...], "count": N, "not_found": [...] }
coraline_batch_callers
Get callers for multiple symbols in a single call.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_ids | array of string | ✅ | — | Node IDs to find callers for |
limit_per_node | number | 20 | Maximum callers to return per node |
Output: { "callers": { "<node_id>": [...] }, "node_count": N }
coraline_batch_callees
Get callees for multiple symbols in a single call.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_ids | array of string | ✅ | — | Node IDs to find callees for |
limit_per_node | number | 20 | Maximum callees to return per node |
Output: { "callees": { "<node_id>": [...] }, "node_count": N }
Advanced Search Tools
Specialized lookups over indexed nodes, faster than full-text coraline_search for these specific shapes — also roughly 60% fewer tokens for the matched use case.
coraline_search_by_signature
Find symbols by type signature pattern (case-insensitive substring match) — e.g. functions by return type or parameters.
The signature of a node is its header without its body, whitespace-normalised: pub fn divide(a: i32, b: i32) -> Result<i32, String>. It is recovered from the source at extraction time, per language — see Language Contract in the architecture guide.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
pattern | string | ✅ | — | Signature substring to search for (e.g. "Result<", "async fn", "<T>") |
kind | string | — | Filter: function, method, class, struct, interface, trait | |
limit | number | 20 | Maximum results | |
output_format | string | "full" | "full" or "compact" (roughly 30% fewer tokens) |
coraline_search_by_docstring
Search symbols by documentation/comment content — find code by what it does, not just its name.
The docstring of a node is the documentation attached to its declaration: a /// or //! comment in Rust, a /** … */ or // comment in TypeScript, a docstring in Python, and the equivalent in the other supported languages. It is recovered from the source at extraction time, per language — see Language Contract in the architecture guide.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | ✅ | — | Text to search for in docstrings/comments |
kind | string | — | Filter: function, method, class, struct, interface, trait | |
limit | number | 20 | Maximum results | |
output_format | string | "full" | "full" or "compact" (roughly 30% fewer tokens) |
coraline_search_exported_symbols
Search only public/exported symbols — filters out internal implementation details to browse the public API surface.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | ✅ | — | Symbol name pattern; use "*" to list all |
kind | string | — | Filter: function, method, class, struct, interface, trait, module | |
limit | number | 20 | Maximum results | |
output_format | string | "full" | "full" or "compact" (roughly 30% fewer tokens) |
coraline_find_by_kind_in_file
Get all symbols of a specific kind in one file — fast file-scoped exploration.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file_path | string | ✅ | — | Path to the file (relative to project root) |
kind | string | ✅ | — | function, method, class, struct, interface, trait, module, constant, or variable |
output_format | string | "full" | "full" or "compact" (roughly 30% fewer tokens) |
Context Tool
coraline_context
Build structured context for an AI task description. Searches the graph, traverses relationships, and returns relevant code snippets in Markdown or JSON format.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
task | string | ✅ | — | Natural language task description |
max_nodes | number | 20 | Max graph nodes to include | |
max_code_blocks | number | 5 | Max code block attachments | |
max_code_block_size | number | 1500 | Max chars per code block | |
include_code | boolean | true | Attach source code snippets | |
traversal_depth | number | 1 | Graph traversal depth | |
format | string | "markdown" | "markdown" or "json" |
Output: A Markdown or JSON document containing relevant symbols and code, ready to paste as context for an LLM.
Audit Tool
coraline_audit_docs
Audit Markdown documentation coverage against the indexed code graph.
Detects two classes of issues:
stale_refs: inline code-span symbol references in Markdown that do not resolve to indexed symbolsundocumented_exports: exported code symbols with no inboundreferencesedge from Markdown docs
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
show_undocumented | boolean | true | Include undocumented export results | |
show_stale | boolean | true | Include stale reference results | |
limit | number | 50 | Max items returned per result set |
Output:
{
"summary": {
"doc_files_indexed": 12,
"doc_sections_indexed": 89,
"stale_refs_count": 3,
"undocumented_exports_count": 7
},
"stale_refs": [
{
"reference": "resolve_unresolved",
"doc_file": "docs/ARCHITECTURE.md",
"section": "Resolution",
"line": 42,
"column": 18
}
],
"undocumented_exports": [
{
"name": "audit_docs",
"qualified_name": "coraline::audit::audit_docs",
"kind": "function",
"file": "crates/coraline/src/audit.rs",
"line": 48
}
]
}
File Tools
coraline_read_file
Read the contents of a file within the project.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | ✅ | — | File path (relative to project root or absolute) |
start_line | number | 1 | First line to read (1-indexed, inclusive) | |
limit | number | 200 | Maximum number of lines to return |
coraline_list_dir
List the contents of a directory within the project.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | . | Directory path (relative to project root or absolute). Defaults to project root. |
coraline_get_file_nodes
Get all indexed symbols (nodes) for a specific file.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
file_path | string | ✅ | File path (relative or absolute) |
Output: { "file_path": "...", "nodes": [...], "count": N }
coraline_find_file
Find files by name or glob pattern. Recursively walks the project tree, skipping .git, node_modules, target, and .coraline directories.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
pattern | string | ✅ | — | File name, substring, or glob pattern (*.rs, test_*, [Cc]argo.toml) |
limit | number | 20 | Maximum results |
Output:
{
"pattern": "*.rs",
"files": ["src/lib.rs", "src/db.rs", "src/graph.rs"],
"count": 3
}
coraline_status
Show project index statistics: total files, nodes, edges, and unresolved reference counts. Optionally include the full coraline doctor --json report for self-healing UIs.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
include_doctor | bool | false | When true, also runs coraline doctor probes and returns the full report under doctor_report, plus a top-level doctor_needs_attention bool. | |
deep | bool | false | Only meaningful when include_doctor is true. When true, runs the slower model-load / inference / coverage probes. |
Output (without include_doctor):
{
"project_root": "/abs/path/to/project",
"database": "/abs/path/to/project/.coraline/coraline.db",
"database_size_bytes": 2097152,
"stats": {
"nodes": 4201,
"edges": 9872,
"files": 128,
"unresolved_references": 153
}
}
Output (with include_doctor: true): the same fields above, plus:
{
"doctor_report": {
"probes": [
{ "name": "config", "ok": true, "detail": "...", "fix": null },
{ "name": "database", "ok": true, "detail": "...", "fix": null },
{ "name": "git hooks", "ok": false, "detail": "...", "fix": "..." },
{ "name": "vec_ext", "ok": true, "detail": "...", "fix": null },
{
"name": "model file",
"ok": false,
"detail": "...",
"fix": "Run `coraline model download`..."
}
],
"exit_code": 1
},
"doctor_needs_attention": true
}
doctor_needs_attention is derived from exit_code == 0 (inverted) so a UI can render a single bool to decide whether to surface a "fix this" prompt. The probes array carries the per-check name / ok / detail / fix fields — fix is the human-readable remediation hint (e.g. "Run coraline model download to enable semantic search."). Self-healing UIs should walk probes[].fix to present the user with one actionable suggestion per failing check.
Back-compat: when include_doctor is omitted (or false), the response shape is identical to the prior version — only the four legacy top-level keys appear.
Connection hygiene: the tool opens the SQLite database for the index stats query and drops that handle before invoking coraline doctor, so the WAL writer lock isn't held by both queries simultaneously.
coraline_get_config
Read the current project configuration from .coraline/config.toml.
Input: None.
Output: Full CoralineConfig as JSON with all four sections (indexing, context, sync, vectors).
coraline_update_config
Update a single configuration value using dot-notation path.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | ✅ | Dot-notation path, e.g. context.max_nodes |
value | any | ✅ | New value (type must match the field) |
coraline_sync
Trigger an incremental sync of the index. Detects files added, modified, or removed since the last index run and updates only what changed. Run after editing source files to keep the graph current.
Input: None.
Output:
{
"files_checked": 42,
"files_added": 1,
"files_modified": 3,
"files_removed": 0,
"nodes_updated": 47,
"duration_ms": 380
}
coraline_semantic_search
Search indexed nodes using natural-language vector similarity. Included in the default build; only registered as an MCP tool once an ONNX model is present in the shared model directory (~/.config/coraline/models/<model>/, <model> from vectors.model). To activate:
coraline model download # download the configured model (default nomic-embed-text-v1.5, ~137 MB)
coraline embed # generate embeddings for all indexed nodes
Run coraline model list to see every supported model, including the code-specialised jina-embeddings-v2-base-code.
When this tool is used, Coraline periodically performs a throttled freshness check. If indexed state is stale it runs incremental sync automatically, then refreshes stale/missing embeddings before search. Results and coverage are scoped to whichever model is currently configured — embeddings from a previously-configured model are ignored, not mixed in.
Structured error when the model is missing:
If the ONNX model can't be loaded (not downloaded yet, or tokenizer.json/weights missing), the tool call fails with isError: true and a structured EMBEDDING_MODEL_MISSING envelope in structuredContent, so an agent can branch on code instead of parsing free-form text:
{
"code": "EMBEDDING_MODEL_MISSING",
"message": "Embedding model is not present. Run `coraline model download` to download it.",
"recover": {
"command": "coraline model download",
"docs": "https://github.com/greysquirr3l/coraline#embeddings (debug: load failed: ...)"
}
}
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | ✅ | — | Natural-language description of what you're looking for |
limit | number | 10 | Max results | |
min_similarity | number | 0.3 | Minimum cosine similarity threshold (0–1) |
Output:
{
"query": "how is sync staleness detected",
"freshness": {
"checked": true,
"stale_files_added": 0,
"stale_files_modified": 2,
"stale_files_removed": 0,
"synced": true,
"files_added": 0,
"files_modified": 2,
"files_removed": 0,
"embeddings_refreshed": true,
"embeddings_refreshed_count": 18,
"check_interval_seconds": 30
},
"results": [
{
"id": "abc123",
"name": "resolve_unresolved",
"qualified_name": "coraline::resolution::ReferenceResolver::resolve_unresolved",
"kind": "function",
"file_path": "src/resolution/mod.rs",
"start_line": 42,
"docstring": null,
"signature": "fn resolve_unresolved(...)",
"score": 0.87
}
]
}
Memory Tools
Project memories are Markdown files stored in .coraline/memories/. They persist across sessions and help AI assistants maintain project context.
coraline_write_memory
Write or update a project memory.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Memory name (without .md). E.g. project_overview |
content | string | ✅ | Memory content in Markdown format |
coraline_read_memory
Read a project memory by name.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Memory name (without .md) |
Output: { "name": "...", "content": "..." }
coraline_list_memories
List all available memories for the project.
Input: None.
Output: { "memories": ["project_overview", "architecture_notes", ...], "count": N }
coraline_delete_memory
Delete a project memory.
Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Memory name to delete |
coraline_edit_memory
Edit a memory file by replacing text — either as a literal string match or a regex pattern.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | ✅ | — | Memory name (without .md) |
pattern | string | ✅ | — | Text to find |
replacement | string | ✅ | — | Replacement text |
mode | string | "literal" | "literal" or "regex" |
Cluster & Process Trace Tools
Louvain community detection (coraline_cluster_overview, coraline_cluster_members) and per-node execution-flow traces (coraline_process_for) are computed at index time during the post-extraction passes (run automatically by coraline index and coraline sync). Both column types are nullable — nodes.cluster_id IS NULL and edges.process_id IS NULL mean "not clustered" / "not part of any traced process" respectively. The tools return data only when the post-extraction passes have completed at least once.
coraline_cluster_overview
List Louvain clusters discovered during indexing, ordered by size, with one representative node per cluster.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | number | 50 | Maximum clusters to return |
Output:
{
"clusters": [
{
"cluster_id": 0,
"size": 42,
"sample_node_id": "abc123",
"sample_qualified_name": "coraline::extraction::index_all",
"sample_kind": "function",
"sample_language": "rust"
},
{
"cluster_id": 1,
"size": 17,
"sample_node_id": "def456",
"sample_qualified_name": "coraline::db::query",
"sample_kind": "function",
"sample_language": "rust"
}
],
"count": 2
}
coraline_cluster_members
List all nodes that share the given cluster_id, ordered by qualified_name. Use the output of coraline_cluster_overview to pick a cluster_id.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
cluster_id | number | ✅ | — | Cluster id from coraline_cluster_overview |
limit | number | 200 | Maximum members to return |
Output:
{
"cluster_id": 0,
"nodes": [ ... full node records ... ],
"count": 42
}
coraline_process_for
Return the call-graph trace (entry point + nodes + edges) for the given node. Walks backward through incoming calls edges to find the owning entry point, then DFS forward through the call graph (with cycle protection + depth cap, default 50) to surface every node and edge in the process trace. Returns null when the node isn't reachable from any entry point.
Input:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
node_id | string | ✅ | — | ID of the node to trace |
max_depth | number | 50 | Maximum DFS depth from the entry point |
Output (node reachable):
{
"entry_point": { /* full node record */ },
"depth_reached": 3,
"nodes": [ ... full node records ... ],
"edges": [
{
"source": "abc123",
"target": "def456",
"kind": "calls",
"line": 158,
"column": 4,
"confidence": 1.0,
"process_id": 1
}
]
}
Output (node unreachable): JSON null.
Each edge includes its process_id (matches the entry point's trace ordinal) and confidence (same scale as coraline_callers / coraline_callees).
MCP Client Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"coraline": {
"command": "/path/to/coraline",
"args": ["serve", "--mcp", "--path", "/path/to/your/project"]
}
}
}
Claude Code
Add to .claude/mcp.json in your project workspace:
{
"mcpServers": {
"coraline": {
"command": "coraline",
"args": ["serve", "--mcp"]
}
}
}
When --path is omitted, the working directory is used as the project root.
Configuration
Coraline Configuration Reference
Coraline stores its configuration in .coraline/config.toml within each project. All settings are optional — a missing or empty file uses sensible defaults.
File Locations
| File | Purpose |
|---|---|
.coraline/config.toml | Main user-editable configuration |
.coraline/config.json | Internal runtime config (auto-generated, do not edit) |
.coraline/coraline.db | SQLite knowledge graph (do not edit) |
.coraline/memories/ | Project memory files (Markdown) |
.coraline/logs/ | Daily-rotating log files |
Full Default Configuration
# Coraline project configuration
# All settings are optional — defaults are shown below.
[indexing]
max_file_size = 1048576 # 1 MB — skip files larger than this
batch_size = 100 # Files processed per batch
include_patterns = [
"**/*.rs", "**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx",
"**/*.py", "**/*.go", "**/*.java", "**/*.cs", "**/*.cpp",
"**/*.cc", "**/*.cxx", "**/*.c", "**/*.h", "**/*.hpp",
"**/*.rb", "**/*.php", "**/*.swift",
"**/*.kt", "**/*.kts", "**/*.razor", "**/*.cshtml", "**/*.pl", "**/*.pm",
"**/*.md", "**/*.markdown", "**/*.liquid",
"**/*.f", "**/*.for", "**/*.f90", "**/*.f95", "**/*.f03", "**/*.f08",
"**/*.hs", "**/*.jl", "**/*.lua", "**/*.m", "**/*.r", "**/*.R",
"**/*.scala", "**/*.sc", "**/*.zig", "**/*.dart",
"**/*.groovy", "**/*.gradle", "**/*.ps1", "**/*.psm1", "**/*.nix",
"**/*.erl", "**/*.hrl", "**/*.elm", "**/*.sh", "**/*.bash",
"**/*.ex", "**/*.exs", "**/*.toml", "**/*.yaml", "**/*.yml",
]
exclude_patterns = [
"**/.git/**", "**/target/**", "**/node_modules/**",
"**/dist/**", "**/build/**", "**/.coraline/**",
]
[context]
max_nodes = 20 # Max graph nodes in context output
max_code_blocks = 5 # Max code snippets to attach
max_code_block_size = 1500 # Max chars per code block
traversal_depth = 1 # Graph hops from entry nodes
[sync]
git_hooks_enabled = true # Auto-sync on git commit
watch_mode = false # Watch for file changes (not yet implemented)
debounce_ms = 500 # Watch mode debounce delay
auto_sync_interval_secs = 120 # MCP background sync interval (0 = disabled)
[vectors]
enabled = false # Requires ONNX model (see below)
model = "nomic-embed-text-v1.5" # or "jina-embeddings-v2-base-code"
dimension = 768
batch_size = 32
[indexing] Section
Controls which files are indexed and how.
max_file_size
Files larger than this are skipped during indexing.
- Type: integer (bytes)
- Default:
1048576(1 MB)
[indexing]
max_file_size = 524288 # 512 KB
batch_size
Number of files processed per indexing batch.
- Type: integer
- Default:
100
include_patterns
Glob patterns for files to include. Uses ** for recursive matching.
- Type: array of strings
- Default: Common source file extensions for the most widely used languages
[indexing]
include_patterns = [
"**/*.rs",
"**/*.ts",
"**/*.tsx",
"src/**/*.js",
]
exclude_patterns
Glob patterns for paths to exclude. Matched against the full relative file path.
- Type: array of strings
- Default: Build artifacts, package caches, generated files, IDE directories
[indexing]
exclude_patterns = [
"**/.git/**",
"**/node_modules/**",
"**/target/**",
"**/dist/**",
"tests/fixtures/**", # custom exclusion
]
Tip: The default exclusion list is extensive. You typically only need to add project-specific paths.
Python virtualenvs: The defaults cover
.venv/,venv/,env/, and named venvs matching*_venv/or*-venv/(e.g.cluster_venv/,memory_venv/). If you use a different naming convention, add it explicitly:exclude_patterns = ["**/my_custom_env/**"]
[context] Section
Controls the output of coraline context (CLI) and coraline_context (MCP).
max_nodes
Maximum number of graph nodes to include in a context response.
- Type: integer
- Default:
20
max_code_blocks
Maximum number of source code snippets to attach.
- Type: integer
- Default:
5
max_code_block_size
Maximum characters per code block. Larger bodies are truncated.
- Type: integer
- Default:
1500
traversal_depth
How many graph hops to follow from the initial matching nodes.
- Type: integer
- Default:
1
[context]
max_nodes = 40
max_code_blocks = 10
max_code_block_size = 2000
traversal_depth = 2
[sync] Section
Controls incremental sync behavior and git hook integration.
git_hooks_enabled
Whether coraline init installs a post-commit hook that automatically runs coraline sync after each commit.
- Type: boolean
- Default:
true
Note: This only determines whether
coraline initauto-installs the hook. To manage the hook manually, usecoraline hooks install|remove|status.
watch_mode
Enable file-system watch mode (re-index on changes). Not yet implemented.
- Type: boolean
- Default:
false
debounce_ms
Debounce delay for watch mode in milliseconds.
- Type: integer
- Default:
500
auto_sync_interval_secs
Interval in seconds for the MCP server's background auto-sync thread. The thread periodically checks whether the index is stale and performs an incremental sync when files have changed. When embeddings are enabled and an ONNX model is present, newly-added nodes are automatically embedded after each sync.
- Type: integer (seconds)
- Default:
120(2 minutes) - Set to
0to disable background auto-sync entirely.
[sync]
auto_sync_interval_secs = 60 # check every minute
Note: The first check is delayed by the configured interval to avoid racing with any initial indexing that may still be in progress when the MCP server starts.
[vectors] Section
Controls vector embedding generation for semantic search (coraline embed, the coraline_semantic_search MCP tool). Requires a build with the embeddings or embeddings-dynamic feature.
enabled
Enable vector embedding generation.
- Type: boolean
- Default:
false
model
Which embedding model to use. Run coraline model list to see every supported model with its dimension and description.
- Type: string
- Default:
"nomic-embed-text-v1.5"— general-purpose English text embeddings. - Also supported:
"jina-embeddings-v2-base-code"— code-specialised embeddings, opt-in.
Model files live in a shared directory (~/.config/coraline/models/<model>/, or model_dir below), not per-project — every project on the machine reuses the same downloaded weights for a given model. Run coraline model download (add --model <name> to target a non-default model) to fetch it.
Switching models: changing
modelon a project that already has embeddings does not retroactively re-embed existing nodes. Every read path (coraline_semantic_search,coraline doctor's coverage probe, staleness checks) filters by the configured model, so a switch makes every node look unembedded for the new model until you re-runcoraline embed. This is a real (if usually quick) re-embedding pass, not instant.
dimension
Embedding vector dimension. Must match the selected model — both currently supported models emit 768-dim vectors.
- Type: integer
- Default:
768
batch_size
Number of symbols embedded per batch.
- Type: integer
- Default:
32
model_dir
Override the on-disk model directory. Unset by default — Coraline resolves it from model (~/.config/coraline/models/<model>/).
- Type: string (path), optional
model_file
Pin a specific ONNX filename instead of auto-detecting the best available variant for the configured model.
- Type: string, optional
max_seq_len
Maximum sequence length in tokens fed to the model.
- Type: integer
- Default:
512
CLI Configuration Commands
Read the full config:
coraline config
Read a specific section:
coraline config --section context
coraline config --section indexing
Output as JSON:
coraline config --json
Update a value:
coraline config --set context.max_nodes=30
coraline config --set indexing.batch_size=50
coraline config --set indexing.max_file_size=524288
coraline config --set vectors.enabled=true
The --set flag accepts section.key=value syntax. Values are parsed as JSON when possible (for booleans, numbers, and arrays), otherwise treated as strings.
MCP Configuration Tools
The same operations are available via MCP:
coraline_get_config → returns full config as JSON
coraline_update_config → updates a single key
key: "context.max_nodes"
value: 30
Example: Focused TypeScript Project
[indexing]
include_patterns = [
"src/**/*.ts",
"src/**/*.tsx",
"tests/**/*.ts",
]
exclude_patterns = [
"**/node_modules/**",
"**/dist/**",
"**/.next/**",
"src/**/*.d.ts",
]
[context]
max_nodes = 30
max_code_blocks = 8
traversal_depth = 2
Example: Large Rust Workspace
[indexing]
max_file_size = 2097152 # 2 MB for generated code
batch_size = 200
include_patterns = [
"crates/**/*.rs",
]
exclude_patterns = [
"**/target/**",
"**/.git/**",
]
[context]
max_nodes = 50
traversal_depth = 3
Architecture
Coraline Architecture
Coraline is a local-first code intelligence system that builds a semantic knowledge graph from any codebase. It uses tree-sitter for deterministic AST-based parsing, SQLite for storage and full-text search, and exposes its capabilities via both a CLI and an MCP server.
High-Level Overview

Diagram source: docs/diagrams/high-level-overview.mmd
Source Layout
crates/coraline/src/
├── bin/coraline.rs # CLI entry point (clap)
├── lib.rs # Public API surface
├── types.rs # NodeKind, EdgeKind, all shared types
├── db.rs # SQLite layer + schema + FTS
├── extraction.rs # Tree-sitter parsing + indexing pipeline
├── grammar.rs # Per-language tree-sitter contract (node kinds, fields, inheritance)
├── graph.rs # Graph traversal and subgraph queries
├── clustering.rs # Louvain community detection + process tracing (Phase 5.1)
├── resolution/ # Cross-file reference resolution
│ ├── mod.rs # Core resolver + framework fallback
│ └── frameworks/ # Language/framework-specific resolvers
│ ├── mod.rs # FrameworkResolver trait + registry
│ ├── rust.rs # crate::, super::, self:: resolution
│ ├── react.rs # ./Foo imports, @/ aliases, components
│ ├── blazor.rs # .razor file discovery, .NET types
│ └── laravel.rs # PSR-4, blade views, facades
├── context.rs # Context builder (Markdown/JSON output)
├── vectors.rs # Vector storage + cosine similarity + ONNX model management
├── vec_ext.rs # Optional sqlite-vec integration (Phase 5.3, `--features vec-ext`)
├── memory.rs # Project memory CRUD
├── config.rs # TOML + JSON configuration loading
├── sync.rs # Incremental sync + git hook management
├── logging.rs # Structured logging (tracing)
├── doctor.rs # Self-healing probes (config, db, model, hooks, embed coverage)
├── security.rs # Path/permission guards for MCP file tools
├── audit.rs # Lightweight structured event log for tool invocations
├── update.rs # Self-update helper (cargo install --force flow)
├── mcp.rs # MCP server (JSON-RPC over stdio)
├── utils.rs # Shared utilities
├── db/ # Schema migrations + table-level helpers
└── tools/
├── mod.rs # Tool trait + ToolRegistry
├── graph_tools.rs # search, callers, callees, impact, find_symbol, ...
├── context_tools.rs# coraline_context
├── file_tools.rs # read_file, list_dir, status, config
└── memory_tools.rs # write/read/list/delete/edit memory
Data Model
Nodes
Every extracted symbol is a Node:
#![allow(unused)] fn main() { pub struct Node { pub id: String, // SHA-based deterministic ID pub kind: NodeKind, // function, class, method, struct, ... pub name: String, // unqualified symbol name pub qualified_name: Option<String>, pub file_path: String, // absolute path pub language: String, pub start_line: i64, pub end_line: i64, pub start_column: i64, pub end_column: i64, pub signature: Option<String>, pub docstring: Option<String>, pub visibility: Option<String>, pub is_exported: bool, pub is_async: bool, pub is_static: bool, pub is_abstract: bool, pub decorators: Vec<String>, pub type_parameters: Vec<String>, pub cluster_id: Option<i64>, // Phase 5.1 — Louvain community id; None for unclustered nodes } }
NodeKind values: file, module, class, struct, interface, trait, protocol, function, method, property, field, variable, constant, enum, enum_member, type_alias, namespace, parameter, import, export, route, component
Edges
Relationships between nodes are Edge records:
#![allow(unused)] fn main() { pub struct Edge { pub id: String, pub source: String, // source node ID pub target: String, // target node ID pub kind: EdgeKind, pub line: Option<i64>, // line where the relationship occurs pub metadata: Option<String>, pub confidence: f32, // Phase 5.2 — in [0.0, 1.0], see table below pub process_id: Option<i64>, // Phase 5.1 — execution-flow trace id; None for edges not in any process trace } }
EdgeKind values: contains, calls, imports, exports, extends, implements, references, type_of, returns, instantiates
Every Edge carries a confidence: f32 in [0.0, 1.0]:
1.0— direct AST-extracted (caller wrote the symbol syntactically; no resolution was needed)0.95— strongly-typed Rust path (crate::/super::/self::)0.5— generic name match / framework fallback / heuristic ranker
coraline_callers / coraline_callees / coraline_find_references accept a min_confidence parameter that filters edges below a caller-supplied threshold. Default 0.0 includes every edge; a typical working value is 0.8 to suppress generic matches.
Indexing Pipeline
- Scan — Glob the project tree using
include_patterns/exclude_patterns. - Parse — For each file, spawn the appropriate tree-sitter grammar and walk the AST.
- Extract — Emit
NodeandEdgerecords from the AST visitor. EveryEdgecarries aconfidencefield (see above). - Store — Upsert nodes and edges into SQLite. A file content hash prevents re-parsing unchanged files.
- Resolve — Walk
unresolvedreference edges, attempt name-based resolution in the DB; fall back to framework-specific resolvers for zero-candidate references. Resolved edges are stamped with theirconfidence. - Cluster (Phase 5.1) — Run Louvain community detection over the call graph and write
nodes.cluster_id. Detects "module-like" communities (groups of nodes that call each other more than they call outside the group). - Trace processes (Phase 5.1) — For each exported
Function/Methodwith no incomingcallsedge (an "entry point"), DFS forward through the call graph with cycle protection and a depth cap, writingedges.process_id. Every edge that participates in some process trace gets aprocess_id.
Steps 6 and 7 run as part of every coraline index and coraline sync after extraction succeeds. The columns are nullable — cluster_id IS NULL and process_id IS NULL are normal for nodes/edges that don't participate in any cluster or process trace.
Language Contract
grammar.rs holds one Contract per language: the tree-sitter node kinds
that map to each NodeKind, the field names that carry a callee name and
its receiver, the node kinds that are imports, the node kinds that are
instantiations, and the rules that describe inheritance
(extends / implements).
The contract also declares whether the language's package system is the
directory layout (directory_packages). That is true for the JVM
languages, Python, Go, Swift and PHP, where a shared directory prefix
means the files belong to the same package family. It is false for Rust,
TypeScript and Ruby, where a directory is only organisation — there
src/runtime.rs and src/legacy/api.rs share the src prefix and
nothing else. The resolver's same-package fallback only fires for the
languages that declare it, so a directory layout never links unrelated
symbols by name.
The extractor reads that table instead of matching on grammar-specific
strings inline. crates/coraline/tests/grammar_contract_test.rs asserts
that every kind and field named in a contract exists in the grammar it
claims to describe, so a grammar rename fails a test instead of silently
disabling the language.
Documentation and Signatures
Two Node fields are recovered from a declaration's text rather than
from its shape: docstring (the documentation attached to the
declaration) and signature (the declaration's header, without its
body). docs.rs does the recovery, driven entirely by the contract, so
the grammar-specific knowledge stays declarative:
DocSpec::PrecedingComment— the documentation is the run of comment nodes immediately before the declaration. Rust distinguishes///(documents what follows) from//!(documents the enclosing module) through the grammar'souter/innerfields; the contract names the field that counts. TypeScript'sexport function add(…)parses as anexport_statementaround thefunction_declaration, so the contract lists the wrapper kinds and the comment is looked for before the wrapper.DocSpec::BodyFirstString— the documentation is the first string literal in the declaration's body (Python's docstring).scope_doc— a scope-level comment that documents the file rather than a declaration, such as Rust's//!module docs. These belong to thefilenode.SignatureSpec— where the declaration's body starts. Most grammars expose the body through a field (body_path, possibly a dotted path such as Erlang'sclause.body); others expose it as a plain child (body_kinds, e.g. Kotlin'sfunction_body); and a few wrap the header in a node of its own (header_kinds, e.g. Fortran'smodule_statement), in which case the header node's text is the signature.
The signature text is whitespace-normalised, so a header that spans several lines stays on one line and remains searchable.
Two MCP tools depend on these fields: coraline_search_by_docstring
and coraline_search_by_signature. Both were dead before this module
existed — the columns were written but never populated, so both
answered "no matches" on every project.
Incremental Sync
coraline sync (and the git post-commit hook) uses git diff --name-only HEAD~1 to find changed files, then re-parses only those files. Deleted files have their nodes pruned from the graph.
A file is skipped when its content hash matches the one stored against
it. That hash is salted with extraction::EXTRACTION_VERSION, so a
change to what the extractor produces invalidates the stored hashes
of every file and the next sync re-indexes them. Bumping the version is
the signal that the extractor's output has changed — a new field on a
node, a different signature format, a different node kind for the same
construct.
Reference Resolution
Resolution happens in two passes:
-
Name-based: The
resolution::resolve_unresolvedfunction looks up reference names in the DB using ranked candidate scoring (file proximity, name similarity, kind match).The ranking is a sequence of buckets, strongest first: an import that matches the candidate's file, an import that matches the candidate's package, the same file, the same directory, a candidate whose path names the receiver of a qualified call, the same package, and finally everything else. A reference resolves only when exactly one candidate survives — an ambiguous reference is left unresolved rather than pointed at an arbitrary target.
The receiver of a qualified call (
util.Area()) is recorded on the resolved edge, because the edge is the only thing that outlives the resolution: when the target file is re-indexed the edge becomes an unresolved reference again, and a reference that had lost its receiver could be re-pointed at an unrelated symbol with the same name. -
Framework fallback: When no candidates score above threshold,
framework_fallbackis called. The registeredFrameworkResolverimplementations detect the active framework (by checking forCargo.toml,package.json,artisan,.csproj, etc.) and return candidate file paths. Nodes from those files are then loaded and filtered by the referenced symbol name.
Current framework resolvers:
- RustResolver —
crate::,super::,self::qualified paths →.rsfile mapping - ReactResolver —
./Foorelative imports,@/path aliases, PascalCase component search - BlazorResolver — PascalCase component →
.razorfile, dot-qualified .NET types - LaravelResolver — PSR-4 FQN → PHP file, dot-notation views → blade templates
Tool Architecture
All MCP tools implement the Tool trait:
#![allow(unused)] fn main() { pub trait Tool: Send + Sync { fn name(&self) -> &'static str; fn description(&self) -> &'static str; fn input_schema(&self) -> Value; fn execute(&self, params: Value) -> ToolResult; } }
Tools are registered in a ToolRegistry, which:
- Dispatches
tools/callMCP requests by name - Automatically generates
tools/listresponses from registered metadata - Can be used outside MCP (CLI, library API, tests)
Database Schema
The SQLite database (.coraline/coraline.db) has these tables:
| Table | Purpose |
|---|---|
nodes | All indexed symbols with full metadata, plus a nullable cluster_id (Phase 5.1, Louvain community id) |
edges | Directed relationships between nodes, plus a confidence REAL (Phase 5.2, in [0.0, 1.0]) and a nullable process_id (Phase 5.1, execution-flow trace id) |
nodes_fts | FTS5 virtual table for fast name search |
vectors | Optional embeddings storage. embedding BLOB (v1) or vec0 vec0 virtual table (--features vec-ext) |
schema_versions | Additive-migration bookkeeping. Every additive ALTER TABLE bumps a version row here. |
A files table tracks content hashes for incremental sync. An unresolved_refs table holds references that couldn't be resolved during extraction, to be retried on full resolution passes.
Additive migrations
DB schema changes after v1 are additive: each new column is gated by a PRAGMA table_info(<table>) check in db::apply_incremental_migrations and stamped with a row in schema_versions. Existing DBs migrate in place on next coraline init / coraline sync without backfill. The migration order is:
- v2 —
edges.confidence REAL NOT NULL DEFAULT 1.0(Phase 5.2) - v3 —
nodes.cluster_id INTEGER,edges.process_id INTEGER(Phase 5.1)
All migrations are idempotent — the column_exists guard makes re-running safe.
MCP Protocol
The MCP server (coraline serve --mcp) communicates over stdin/stdout using JSON-RPC 2.0, conforming to the Model Context Protocol specification.
Supported MCP methods:
initialize/notifications/initializedtools/list— returns tool descriptors with cursor pagination (cursor/nextCursor)tools/call— dispatches toToolRegistryping
The server is single-threaded and synchronous; each request is fully processed before the next is read.
Logging
Structured logs use the tracing crate:
- Console: stderr at the level set by
CORALINE_LOG(default:info) - File:
.coraline/logs/coraline.logwith daily rotation (kept 7 days)
CORALINE_LOG=debug coraline index # verbose
CORALINE_LOG=warn coraline serve --mcp # quiet
Development
Coraline Development Guide
This document covers building, testing, and contributing to Coraline.
Prerequisites
| Tool | Version | Notes |
|---|---|---|
| Rust | ≥ 1.85 | MSRV — install via rustup |
| Git | any | Required for sync and hooks |
| SQLite | bundled | Included via rusqlite — no separate install needed |
Getting Started
git clone https://github.com/greysquirr3l/coraline.git
cd coraline
# Build (debug)
cargo build --all-features
# Build and install to ~/.cargo/bin
cargo install --path crates/coraline --force
# Verify
coraline --version
Common Commands
# Development build
cargo build --all-features
# Release build
cargo build --release --all-features
# Run all tests
cargo test --all-features
# Run tests with output
cargo test --all-features -- --nocapture
# Run a specific test by name
cargo test resolve_unresolved
# Run a specific integration test file
cargo test --test extraction_test
# Lint (project default clippy baseline)
cargo lint
# Format
cargo fmt
# Check formatting without modifying
cargo fmt -- --check
Project Structure
coraline/
├── Cargo.toml # Workspace manifest
├── deny.toml # cargo-deny license/audit policy
├── crates/
│ ├── coraline/ # Main crate
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── bin/coraline.rs # CLI binary
│ │ └── ... # Library modules
│ └── tree-sitter-blazor/ # Custom Blazor grammar
├── docs/ # Documentation
├── reference_projects/ # Reference implementations (not built)
└── .github/workflows/ # CI/CD pipelines
Tests
Test Overview
| Location | Count | Type |
|---|---|---|
src/tools/mod.rs | 3 | Unit: ToolRegistry |
src/tools/memory_tools.rs | 5 | Unit: MCP memory tools |
src/memory.rs | 11 | Unit: memory CRUD |
src/vectors.rs | 5 | Unit: cosine similarity |
tests/extraction_test.rs | 4 (1 ignored) | Integration: AST parsing |
tests/graph_test.rs | 4 | Integration: graph traversal |
tests/context_test.rs | 5 | Integration: context building |
Current status: 37/37 passing, 1 ignored (test_cross_file_references — import edge extraction not yet implemented).
Running Tests
# All tests
cargo test --all-features 2>&1 | grep "test result"
# Single integration file
cargo test --test graph_test
# Single unit test
cargo test memory::tests::test_write_read
# With output (for debugging)
cargo test test_name -- --nocapture
Test Fixtures
Integration tests use fixtures in crates/coraline/tests/fixtures/:
| Fixture | Purpose |
|---|---|
simple-project/ | Basic TypeScript + Rust extraction |
blazor-app/ | Blazor/Razor component parsing |
mixed-language/ | Multi-language extraction |
Fixtures are small, self-contained codebases checked into the repo.
Adding a New Tree-Sitter Language
A language is indexed in four places, and it is only indexed when all
four agree. A language that misses any one of them parses perfectly and
produces nothing but a file node — no error, no warning, just an
empty graph. That is how eighteen languages sat inert for months
(issue #128), so each step below has a test that fails if it is
missed.
1. The grammar. Add the tree-sitter crate to
crates/coraline/Cargo.toml, the language variant to the Language
enum in types.rs, and the parser binding to language_to_parser in
extraction.rs.
2. The extension. Add the extension to EXTENSION_LANGUAGES in
config.rs. That table is the single source of truth: detect_language
consults it, and the default include patterns are checked against it.
Add the same extension to default_include_patterns in config.rs and
to the config.toml template beside it — the two lists must agree, and
include_patterns_agree_with_the_extension_table in
tests/language_counts_test.rs fails if they do not.
Add the language to is_language_supported in config.rs as well. It
is a separate switch from the patterns, and
default_include_patterns_agree_with_is_language_supported fails if
the two disagree.
3. The contract. Add a LanguageContract to CONTRACTS in
grammar.rs, declaring which grammar node kinds become which graph
node kinds, the call kinds with their callee field, the import kinds
and the heritage rules.
This is the step that matters, and the node kinds have to be read out
of the grammar, never guessed. A wrong guess is not a compile error:
it is a language that silently produces no call, import or inheritance
edges. The module comment at the top of grammar.rs records what that
cost before — Kotlin's interface_declaration and Swift's
function_call_expression do not exist, and both languages were
quietly broken.
Use the probe tool to read the grammar:
cargo run --example grammar_probe -- fortran # node kinds and fields
cargo run --example grammar_probe -- fortran file.f90 # the parse tree
The probe takes any language name Coraline knows — Language::name is
the list — and uses the extractor's own grammar mapping, so it can read
out every language the extractor can parse.
4. The tests. Add the language to the grammar table in
tests/grammar_contract_test.rs so its declared node kinds and callee
fields are checked against the real grammar, add a call-site snippet if
it declares a callee field, and add a fixture and a test in
tests/language_contracts_test.rs that indexes the fixture and asserts
the graph the contract promises.
Then update the counts in tests/language_counts_test.rs — they are
asserted against the README and the book's language table, so they
cannot drift.
Adding a New MCP Tool
-
Implement the
Tooltrait in the appropriatesrc/tools/*.rsfile:#![allow(unused)] fn main() { pub struct MyTool { project_root: PathBuf } impl Tool for MyTool { fn name(&self) -> &'static str { "coraline_my_tool" } fn description(&self) -> &'static str { "..." } fn input_schema(&self) -> Value { json!({ ... }) } fn execute(&self, params: Value) -> ToolResult { ... } } } -
Register in
src/tools/mod.rsinsidecreate_default_registry(...):#![allow(unused)] fn main() { registry.register(Box::new(MyTool::new(project_root.to_path_buf()))); } -
Add unit tests in the same file or
src/tools/mod.rs. -
Document in
docs/MCP_TOOLS.md.
Adding a Framework Resolver
-
Create
src/resolution/frameworks/my_lang.rsimplementingFrameworkResolver:#![allow(unused)] fn main() { pub struct MyLangResolver; impl FrameworkResolver for MyLangResolver { fn name(&self) -> &'static str { "my_lang" } fn detect(&self, project_root: &Path) -> bool { ... } fn resolve_to_paths(&self, ctx: &ResolveContext<'_>) -> Vec<PathBuf> { ... } } } -
Add to
default_resolvers()insrc/resolution/frameworks/mod.rs. -
Add
pub mod my_lang;insrc/resolution/frameworks/mod.rs.
CI/CD
GitHub Actions workflows run on every push and pull request:
| Workflow | Triggers | What it does |
|---|---|---|
ci.yml | push, PR | build, test, clippy, fmt, docs; multi-platform (Linux/macOS/Windows); MSRV check |
release.yml | v* tags | Cross-platform binary builds + GitHub release |
security.yml | daily + dep changes | cargo-audit (vulnerabilities) + cargo-deny (licenses) |
codeql.yml | weekly | CodeQL analysis |
fuzz.yml | daily + fuzz/** or surface changes | cargo-fuzz nightly run against MCP + SQLite targets |
cifuzz.yml | PR + surface changes | ClusterFuzzLite per-PR fuzzing with libFuzzer + AddressSanitizer |
Creating a Release
# Bump version in crates/coraline/Cargo.toml and crates/tree-sitter-blazor/Cargo.toml
# Update CHANGELOG.md
git add -A
git commit -m "chore: release v0.2.0"
git tag v0.2.0
git push origin main --tags
The release.yml workflow builds binaries for Linux x86_64, macOS x86_64/ARM64, and Windows x86_64, then creates a GitHub release with the CHANGELOG content attached.
Code Style
unsafe_code = "deny"via the workspace lint table, which every crate opts into with[lints] workspace = true—unsafeis a compile error, with two documented exceptions (the feature-gatedsqlite-vecregistration insrc/vec_ext.rs, and the standard tree-sitterLanguageFn::from_rawbinding incrates/tree-sitter-blazor)cargo lintmust pass before committingcargo fmtfor formatting (rustfmt defaults)- Keep functions focused; prefer extracting helpers over long function bodies
- Prefer
let Some(x) = opt else { return ...; }over.unwrap()or?in non-Result contexts - Use
tracing::{debug, info, warn, error}for log output — no bareprintln!in library code
See .coraline/memories/style_conventions.md in your project for project-specific conventions.
Useful Dev Workflows
Dogfood Coraline on itself
cd /path/to/coraline
coraline init -i # index itself
coraline query "resolve_unresolved"
coraline context "how does reference resolution work"
Test MCP roundtrip manually
printf '%s\n%s\n%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"test","version":"0.0.1"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| coraline serve --mcp
Check all tests pass after a change
cargo lint && cargo test --all-features 2>&1 | grep "test result"
Run fuzzers locally
Two cargo-fuzz targets live under fuzz/fuzz_targets/. They require the
nightly toolchain because libfuzzer-sys depends on nightly-only features.
# One-time: install cargo-fuzz
cargo install cargo-fuzz --locked
# Run a target for 5 minutes
cargo +nightly fuzz run mcp_request -- -max_total_time=300
cargo +nightly fuzz run db_search -- -max_total_time=300
# Reproduce a crash from CI artifacts
cargo +nightly fuzz run mcp_request fuzz/corpus/mcp_request/crash-<id>
A crash report surfaces as fuzz/artifacts/<target>/crash-<sha1>. Open or
attach the file in a GitHub issue; do not paste the binary contents.
ClusterFuzzLite
.github/workflows/cifuzz.yml runs the same targets on every PR via
ClusterFuzzLite, built on the
upstream base-builder-rust image and configured under .clusterfuzzlite/.
This also satisfies the OpenSSF Scorecard Fuzzing check.
Changelog
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
0.18.0 - 2026-11-06
Added
-
coraline::docsis a new public module. It exposes the declaration-documentation and declaration-signature recovery that the extractor now runs:docstring_for,signature_forandscope_docstring_forreturn a declaration's documentation and its header, given the node and the source it came from.#![allow(unused)] fn main() { let node = /* a Node from the graph */; let doc = coraline::docs::docstring_for(&node, source, Language::Rust); let sig = coraline::docs::signature_for(&node, source, Language::Rust); }
Fixed
-
coraline_search_by_docstringandcoraline_search_by_signaturealways returned no matches. Both tools search thenodes.docstringandnodes.signaturecolumns, but nothing ever wrote to them: the extractor setdocstring: Noneandsignature: Noneon every node it created. The columns existed, the schema was right, the tools were registered — and the query they run wasWHERE docstring LIKE '%…%'against a table where every value wasNULL.Both fields are now recovered from the source. A declaration's docstring is the documentation attached to it: a
///comment in Rust, a/** … */comment in TypeScript, a docstring in Python, and the equivalent in every other supported language. A declaration's signature is its header without its body —pub fn divide(a: i32, b: i32) -> Result<i32, String>.The grammar-specific knowledge lives in the language contract (
crates/coraline/src/grammar.rs), and the recovery itself incrates/coraline/src/docs.rs. The contract test now checks the comment kinds, comment fields, wrapper kinds, body paths and header kinds of every language against the grammar they claim to describe, so a grammar rename fails a test instead of silently emptying the index again.The content hash a file is stored under is now salted with the extraction version. Without the salt, an upgrade that changes what the extractor produces would leave the stored hashes untouched, the incremental sync would skip every unchanged file, and the new fields would never reach an existing project's index — the upgrade would look like it had done nothing until the user forced a full reindex.
#![allow(unused)] fn main() { // Before: every node had `docstring: None, signature: None`. // After: docstring: Some("Divide two numbers".to_string()), signature: Some("pub fn divide(a: i32, b: i32) -> Result<i32, String>".to_string()), }
0.17.1 - 2026-10-28
Fixed
-
coraline updatewas documented but did not exist. TheUpdatevariant was removed from the CLI'sCommandenum by the config-consolidation refactor in June 2026 — collateral damage in a commit whose subject wasfeat(config): consolidate to config.toml.docs/CLI_REFERENCE.mdkept documenting the command, andcrates/coraline/src/update.rswas left behind withcheck_for_update()never called by anything.The command is restored, and its documentation now matches what it actually prints: the previous examples showed an output format the code had never produced.
The root cause was the docs and the binary drifting apart with nothing to notice, so there is now a test that parses every command the CLI reference documents —
coraline updateincluded — which fails if a documented command stops existing.
0.17.0 - 2026-10-28
Added
-
coraline migrate <target>converts a project's embedding storage between the two on-disk layouts. The v0 (sqlite-vec) layout could be produced by the library but there was no command to reach it, so the only way to get a project onto it was to write Rust.coraline migrate vec-ext # v1 BLOB -> sqlite-vec v0 coraline migrate vec1 # sqlite-vec v0 -> v1 BLOBBoth directions are transactional — a failure rolls the whole conversion back and leaves the project on its original layout — and neither ever runs as a side effect of another command, because changing the layout is not something to do behind the user's back.
The command requires a binary built with the
vec-extfeature, and says so rather than failing obscurely:$ coraline migrate vec-ext This binary was built without the `vec-ext` feature, so it cannot convert embedding storage. Rebuild with `--features vec-ext` and retry. -
coraline::vector_layoutis a new public module. It exposes the runtime detection the fix below is built on —VectorLayout::detectreports which of the two layouts a database is on, andVectorLayout::metadata_relationnames the table that holds the metadata for it.
Changed
rusqliteis now 0.41. The bump was mechanical; the API the project uses is unchanged.
Fixed
-
The vector storage layout is detected at runtime instead of at compile time. Coraline has two on-disk layouts for embeddings: the v1 BLOB layout (
vectors, one little-endianf32blob per node) and the sqlite-vec v0 layout (vectors_vec, avec0virtual table, plus avectors_metacompanion). The SQL that reached those tables was selected with#[cfg(feature = "vec-ext")]— a compile-time switch standing in for what is actually a property of the database file.That broke half of the (build × layout) matrix, because a project indexed by one build can be opened by the other:
Build Database What broke default v1 — default v0 coraline_stats:no such table: vectorsvec-ext v1 coraline_stats:no such table: vectorsvec-ext v0 — coraline_statswas the visible symptom (#137): it counted embeddings with a hard-codedSELECT COUNT(*) FROM vectors, so a project on the v0 layout returned no statistics at all — not a partial answer, an error. The same switch picked the wrong SQL forclear_database, the unembedded-node coverage query, and the staleness queries, and avec-extbuild clearing a half-migrated database failed withno such table: vectors_vec.crates/coraline/src/vector_layout.rsnow detects the layout from the open connection, and every vector-related statement resolves the table it needs from that. The two layouts expose identical metadata columns in different tables, so every metadata query is written once and only payload queries need thevec0module.Whether the
vec0module is loaded is also a runtime property:sqlite3_auto_extensiononly fires when a connection is opened, so registering it does nothing for a connection that already exists.enable_extensionnow loads the module onto the connection it was handed, andPRAGMA module_listis used to check for it. -
coraline migrate vec-ext(the v0 → v1 direction) failed on every project. sqlite-vec returns afloat[]column as a raw little-endian BLOB, not as the JSON text that was handed tovec_f32()on the way in. The migration read the column as text, so it died withInvalidColumnTypebefore it could migrate anything. It now decodes both shapes. -
sqlite3_vec_initwas called with the wrong signature. The bridge Coraline registers as a SQLite auto-extension calledsqlite3_vec_init()with no arguments, discarding the connection handle the function uses to register thevec0module, and hardcodedSQLITE_OKso a failed init was invisible. It now uses sqlite-vec's real three-argument signature and propagates the return code and the error message. -
A failed embedding-storage migration destroyed the embeddings it was migrating.
coraline migrate vec-extdropped the v1vectorstable and then wrote the vec0 rows, with no transaction around it. If a write failed — and it can:vec0enforces the declared width, so an embedding whose width does not match the schema'sfloat[768]is rejected — the drop had already been committed, leaving the project with no embeddings at all and needing a full re-embed to recover. Both directions of the migration now run in a single transaction, so a failure rolls the whole thing back and leaves the source layout intact. -
A corrupt
vec0text column could panic the process. The fallback decoder for afloat[]column that holds text rather than the usual little-endian BLOB computed a slice range from the positions of[and]. A string whose]came before its[produced an out-of-order range and panicked. It now parses the delimiters as options and returns nothing for a malformed value, rather than crashing.
0.16.0 - 2026-10-27
Added
-
The last 18 languages are indexed end to end. Bash, Dart, Elixir, Elm, Erlang, Fortran, Groovy, Haskell, Julia, Lua, MATLAB, Nix, PowerShell, R, Scala, TOML, YAML and Zig all had their tree-sitter grammar wired up but no extraction contract, so a file in those languages parsed perfectly and still produced nothing but a
filenode — no declarations, no call edges, no imports, and no symptom beyondcoraline callersreturning nothing.Each now has a contract in
crates/coraline/src/grammar.rsthat maps its grammar's node kinds onto graph nodes. All 37 languages Coraline knows about now produce a graph.The contracts are the interesting part, because each grammar names things differently:
- Elixir and Erlang reuse a single node kind for every construct — a call whose target names it, and a module attribute whose name decides whether it is a module, a record or an import — so their contracts discriminate on the name rather than the kind.
- Scala spreads an import's path over one
pathfield per segment, and names a value in itspatternfield. - Zig names a type by the constant it is bound to rather than by the type node itself.
- Dart keeps a method's name in a signature several levels below the declaration.
- Groovy names a field through its declarator.
- Haskell's applications nest —
f a bisapply(apply(f, a), b)— so the callee is the leftmost function in the chain rather than the text of thefunctionfield. - Julia keeps a declaration's name in a
signatureortype_headchild rather than in a field, and a supertype after the<:operator. - Fortran wraps a declaration and its body in a
module/function/subroutinenode and names it in the nested statement. - Lua names
function M.f()by its last segment. - MATLAB's enumeration members are one
enumnode each. - R names a function by the assignment it is bound to.
- Bash's
sourceis an import; every other command is a call. - TOML and YAML are configuration formats, so a table or a mapping becomes a container node and a key becomes a field.
crates/coraline/tests/language_contracts_test.rsindexes a fixture per language and asserts the graph each contract promises, andgrammar_contract_test.rschecks every declared node kind and callee field against the grammar it claims to describe.
Fixed
-
A language had three different names depending on who asked. The MCP tools reported
javascript, the database storedjava_script, and there was noLanguage::nameto ask in the first place — the tools and the database each had their own hand-written table, and the database's went through serde'ssnake_case, which splitsJavaScriptintojava_script.The visible symptom was that
coraline_searchandcoraline_nodedisagreed about the same node, and a query against the index forWHERE language = 'javascript'missed every JavaScript file in it.There is now one canonical name per language, in
Language::name:typescript,javascript,csharp, and the rest as the documentation has always spelled them. The tools, the database and thegrammar_probeexample all use it, so they cannot disagree again.An index written by an earlier version still reads back correctly — the older
type_script,java_scriptandc_sharpspellings are accepted on the way in, andcoraline_statsreports the canonical name whatever the database happens to hold. -
A zero-arity Elixir function was invisible. The grammar puts a bare identifier in the argument position of
def version dorather than a call, so the name recovery — which handleddef version()anddefmodule Geometry— returned nothing. A module of zero-arity functions produced a module node and no functions at all. The fixture and its test now cover one. -
A PowerShell module file was silently skipped.
**/*.psm1was in the default include patterns while the extension detector only knewps1, so a.psm1file was scanned, found to be an unknown language, and dropped. It contributed afilenode and nothing else, with no error anywhere — the quietest failure there is.The extension → language mapping is now a single table,
config::EXTENSION_LANGUAGES, that the detector consults and the include patterns are checked against, so a pattern cannot name an extension the detector does not recognise. A new test asserts the two agree in both directions.The same drift was the other way round for Fortran: the detector claimed
f03andf08but no include pattern matched them, so those files were never scanned. Both directions are now covered. -
A project initialised from the generated
config.tomldid not index every file the defaults index. The template'sinclude_patternsblock had fallen behinddefault_include_patterns: it was missing**/*.hpp,**/*.cc,**/*.cxxand**/*.kts, so a C++ or Kotlin project initialised from the template never had its headers, its alternative C++ extensions, or its Kotlin script files indexed — while a project initialised before those extensions were added indexed them fine. Nothing reported the difference.Two new tests assert the generated template and the configuration guide list exactly the default include patterns, in both directions, so neither can drift again.
-
docs/DEVELOPMENT.mdnow documents how to add a language, and the four places it has to be added to. The section it replaces was stale — it named a function that no longer exists and an extraction branch the contract-driven extractor does not use — and it omitted the contract itself, which is the step that actually decides whether a language is indexed. It is the step whose absence let eighteen languages sit inert.
0.15.2 - 2026-10-27
Fixed
-
A failed crates.io publish was reported as a success. The two publish steps in
release.ymlpiped cargo's output throughteeand branched on the pipeline's exit status. Withoutpipefailthat status istee's, which is always 0, so the success branch was taken whatever cargo did — including a hard failure such as a bad token. The step went green having published nothing, which is the same failure mode AGENTS.md warns about: check the outcome, never the run status. The publish logic now lives in.github/scripts/publish-crate.sh, which setspipefailand distinguishes three outcomes: published, already published, and failed.publish-crate-test.shcovers all three and fails if thepipefailis dropped.This had never been caught because every prior release published a new version of each crate, so the "already exists" path was never exercised. It is exercised now:
tree-sitter-blazoris unchanged in this release and is already on crates.io at 0.4.2. -
.cshtmland.markdownfiles were silently skipped. Both extensions map to a language in the extension table —.cshtmlto Blazor,.markdownto Markdown — and the book table lists both, but neither was in the default include patterns. A legacy Blazor project using.cshtmlindexed as if it had no files, and a.markdownfile was invisible tocoraline audit-docs. Both patterns are now indefault_include_patterns, in the config template and indocs/CONFIGURATION.md. -
The language counts had no test pinning them. A new
language_counts_testchecks the known-language list, the grammar-backed count, the indexed count and the pending count against the code, and cross-checks the book table's 37 rows againstis_language_supportedso the ✅/⏳ marks cannot drift from the implementation. It also asserts that the default include patterns andis_language_supportedagree, which is what caught the.cshtmland.markdowngaps above.
0.15.1 - 2026-10-27
Fixed
.cshtmland.markdownfiles were silently skipped. Both extensions map to a language in the extension table —.cshtmlto Blazor,.markdownto Markdown — and the book table lists both, but neither was in the default include patterns. A legacy Blazor project using.cshtmlindexed as if it had no files, and a.markdownfile was invisible tocoraline audit-docs. Both patterns are now indefault_include_patterns, in the config template and indocs/CONFIGURATION.md.- The language counts were off by one in two directions. Coraline knows 37 languages, not 36: 36 ship a tree-sitter grammar, and Liquid is the exception — it has no grammar and is parsed by hand. The book table listed 37 rows while the text above it said 36, and both it and the README said 17 unindexed languages when there are 18. The table was right and the prose was wrong on both counts.
- The language counts had no test pinning them. A new
language_counts_testchecks the known-language list, the grammar-backed count, the indexed count and the pending count against the code, and cross-checks the book table's 37 rows againstis_language_supportedso the ✅/⏳ marks cannot drift from the implementation. It also asserts that the default include patterns andis_language_supportedagree, which is what caught the.cshtmland.markdowngaps above. - The workspace declared
unsafe_code = "deny"but no crate opted in, so the lint applied to nothing. Thecoralinebinary target in particular had nodeny(unsafe_code)of its own — the library crate root had one, but a binary is a separate crate root and does not inherit it. All three workspace members now set[lints] workspace = true, sounsafeis a compile error in the library, the binary, the grammar crate and the fuzz targets alike. The two existingunsafesites are unchanged: the feature-gatedsqlite-vecregistration insrc/vec_ext.rsand the standardLanguageFn::from_rawbinding in the Blazor crate, which now carries an explicit#[expect(unsafe_code)]. - The library did not build without the default features.
use crate::utils::f64_to_f32_lossyinsrc/tools/file_tools.rswas not feature-gated, but its only call site is inside a#[cfg(any(feature = "embeddings", feature = "embeddings-dynamic"))]tool. With the embeddings features off — which is how thefuzzcrate depends on it — the import was unused and-D warningsturned that into an error, socargo build -p coraline-fuzzfailed. The import now carries the same gate as its use site. - The README claimed 33 MCP tools; there are 38. The count had
drifted as tools were added. It is now 38, and the tool list is
checked against the live
tools/listresponse. - The README claimed every tool accepts
output_format: "compact". Eight of the 38 do —coraline_search,coraline_callers,coraline_callees,coraline_batch_get_nodes,coraline_search_by_signature,coraline_search_by_docstring,coraline_search_exported_symbolsandcoraline_find_by_kind_in_file. The other 30 do not take the parameter. - The README claimed
output_format: "compact"saves 65% of the tokens. Measured against this repository's own index, it is 29-34% depending on the query. The README now says "roughly 30%". The same figure is repeated in the tool descriptions the MCP server reports to the assistant. - The README's Rust badge said 1.93+; CI tests 1.96.0. The badge now matches the MSRV job.
- The README and the language book page said the 17 unindexed
languages "have their extraction contract in place". They do not.
grammar.rsdeclares 15 contracts, andcontract_formaps TSX onto the TypeScript contract and JSX onto the JavaScript one — so the 17 languages that produce a contract are exactly the 17 indexed languages that have declarations. Liquid and Markdown are indexed but have no contract, because they are markup with no declarations to extract. The 18 unindexed languages have their grammar dependency and nothing else. SECURITY.mdclaimed there is no unsafe code. There are two narrow exceptions, both now documented:src/vec_ext.rsregisters thesqlite-vecextension throughsqlite3_auto_extensionunder a feature-gated#[allow(unsafe_code)], and the tree-sitter Blazor bindings use the standardLanguageFn::from_rawpattern. The policy also said#![forbid(unsafe_code)]; the crates usedeny.SECURITY.mdclaimed Coraline makes no external API calls. It makes one, on request: downloading the embedding model from HuggingFace. The update checker also queries the crates.io API. No source code is ever uploaded.SECURITY.mdclaimed all user inputs are validated. Three file tools —coraline_read_file,coraline_list_dirandcoraline_get_file_nodes— resolve absolute paths as given and allow..in relative paths, so they can reach outside the project root. The MCP server runs with the privileges of the user who started it. The policy now says so instead of implying containment.SECURITY.mdclaimed "minimal dependencies". There are 66 direct dependencies, 35 of which are tree-sitter grammars, and 338 in the resolved graph. The claim is now "dependency review", which is whatcargo denyandcargo auditactually enforce.- The README's tagline said "Symbol-level editing". Coraline is
read-only with respect to source: no MCP tool writes to a source
file. The only things it writes are its own
.coraline/directory and, throughcoraline_write_memory, the Markdown notes in.coraline/memories/. The tagline now says "Symbol-level queries", and the README says so explicitly. coraline audit-docswas missing from the CLI reference. The command was restored in 0.15.0 but never documented, so thedocs/CLI_REFERENCE.mdreference and the book page that includes it did not mention it. It is now documented with its options, its--jsonschema and worked examples.- The
coraline updateoutput examples in the CLI reference showed v0.3.0. They now show a current version.
0.15.0 - 2026-10-26
Changed
-
tree-sitteris now 0.27.1. The bump was blocked bytree-sitter-perl1.1.2, which requiredtree-sitter ^0.26.3as a runtime dependency. Becausetree-sitterdeclareslinks = "tree-sitter", cargo may only place one of them in the dependency graph, so the two could not coexist. -
The Perl grammar is now
ts-parser-perl2.0.0, the maintained grammar from thetree-sitter-perlorganisation. It depends ontree-sitteronly as a dev-dependency, so it works alongside 0.27. The two grammars are different implementations, so the node kinds the extractor keys off changed; see Added below. -
ortis now 2.0.0-rc.15. The pin was held at=2.0.0-rc.11because rc.12 had a VitisAI build regression (pykeio/ort#547), which was fixed upstream one day after rc.12 shipped (pykeio/ort#546) — so rc.13 and later have been clean since July 2026. rc.15 is the current release candidate and fixes over 30 instances of undefined behaviour, which upstream recommends upgrading to as soon as possible.Its API changed in rc.14:
Session::builder()now takes an&Environment, and the builder methods return anort::Error<SessionBuilder>that is notSend + Sync, so the error has to be rendered to a string before it can be wrapped in anio::Error.
Added
- Perl is indexed. Perl had a grammar and a dependency but was
never actually indexed: it was missing from
is_language_supported, from the default include patterns and from thegrammar.rscontract table, so a Perl file produced nothing but afilenode. It now has aLanguageContract— packages become namespaces, subroutines become functions, methods become methods,usebecomes an import, andour @EXPORT_OK = qw(...)becomes a set of export symbols — and it has its first extraction test. - The grammar contract test covers Perl, so the node kinds and field names the extractor relies on are checked against the real grammar.
Fixed
- The README and the language book page overstated the number of languages that work. They claimed 36 languages including Bash, Haskell, Scala and Lua, but only 19 of them produced graph nodes. The remaining 17 have their grammar dependency but no extraction contract; that gap is tracked in #128, and the docs now mark which languages are indexed.
coraline audit-docsreported zero findings on every project. The Markdown doc-structure extractor (extract_markdown_nodes) was dropped by the config.toml consolidation (b079ac5), so a Markdown file produced only afilenode: no heading sections to attribute references to, and nocode_spanreferences to resolve. The audit's two findings — stale references and undocumented exports — had no input to work from, andcoraline_audit_docsreporteddoc_files_indexed: 0on every repository. The extractor is restored: every ATX / setext heading becomes amodulenode and every inline code span that looks like a symbol name becomes aReferencesreference that the resolver can link to real code.- Markdown files were never indexed by default.
**/*.mdwas missing fromdefault_include_patternsand from the generatedconfig.tomltemplate, so even with the extractor restored a project would not have had a Markdown file to audit. It is now included by default.
0.14.0 - 2026-10-25
Added
- Per-language grammar contract (
crates/coraline/src/grammar.rs). Every tree-sitter node kind, field name, import kind, instantiation kind, and inheritance rule the extractor relies on is now declared in one table per language instead of being hard-coded inextraction.rs. The table is public (coraline::grammar) so downstream tooling can inspect it, and it is covered by a guard test that asserts every declared string actually exists in the grammar it claims to describe (crates/coraline/tests/grammar_contract_test.rs). A grammar rename or a typo now fails a test instead of silently disabling an entire language. - Kotlin and Swift are indexed by default.
**/*.kt,**/*.ktsand**/*.swiftwere added to the default include patterns,.ktsmaps to Kotlin, andLanguage::Unknownis no longer treated as a supported language. - Cross-package call, import, instantiation and inheritance edges.
Calls across package boundaries now resolve when backed by an import
or by same-package membership; constructor calls (
Circle(2.0)) produceInstantiatesedges;extends/implementsrelationships produceExtends/Implementsedges. The #43 guard (unscoped calls must not link to global name matches) is preserved. - Per-language multi-package fixture tests
(
crates/coraline/tests/language_fixture_test.rs). Nine fixtures — Kotlin, Java, Swift, Go, Python, Ruby, C#, C/C++ and a TypeScript barrel — each assert declarations, cross-package call edges, import edges and inheritance edges. - Resolver keyset pagination. Unresolved references are walked
forward through the backlog with a keyset cursor (
ORDER BY id) instead of an unorderedLIMIT, so a reference beyond the first page is no longer starved and resolution completes on large repositories. The page size is now a page size, not a cap on the whole pass.
Fixed
- Call edges for languages whose tree-sitter node kinds were
wrong. Several languages lost all call or import edges because the
node kinds and field names used by the extractor did not exist in the
grammar: Swift's
struct_declaration/enum_declaration/extension_declaration(allclass_declaration), Ruby'smethod_call(call, fieldmethod), C/C++'sfunction_definitionfieldname(nested indeclarator), PHP'smember_call_expressionfieldfunction(fieldname), Go'simport_declarationfieldimport_spec(a child kind), Rust'suse_declarationfieldpath(fieldargument), C#'susing_directivefieldqualified_name(the path is a child, and there is nonamefield at all), and Python's repeatednamefields (the path is adotted_name). - Cross-package calls dropped by the resolver.
rank_candidatesonly accepted a candidate that was import-matched, in the same file, or in the same directory — JVM, Go and C# packages live in separate directories, so those calls never resolved. Import paths are now normalised (dotted paths become slash paths, source extensions are stripped), matched at both file and package granularity, and the receiver / qualifier of a qualified call is matched against the local name of an import. - Calls outside a function scope dropped. Property initialisers,
init {}blocks, top-level statements and unnamed arrow functions produced no edges; they are now anchored to the file node. - Local-variable type inference. A qualified call on a local
(
helper.area()wherehelperis aCircle) resolves against the receiver's type, so it matches the type's member rather than an unrelated global of the same name. - Type-scoped member resolution. A qualified call is scoped to the
receiver's type across files, so
Circle.areain another package is found by the type'scontainsedge rather than by name alone. - Resolution no longer stalls on never-resolvable references. References that cannot be resolved (stdlib calls, for instance) are flagged as attempted so they are not retried on every run — and are put back in the queue as soon as the project changes, so a reference that failed once does not silently lose its edge forever.
- Cross-file edges survive a re-index.
edges.sourceandedges.targetboth cascade on node deletion, so deleting a file also dropped the edges that other files had created against it. Those references are now re-queued as unresolved references instead of disappearing. - Project paths are canonical, so Windows resolves like Unix.
A project's relative paths were stored with the platform's separator,
so on Windows they read
src\com\example\util\Formatter.kt. That path matched no import hint, no package comparison and no**/*.ktglob, which is why every cross-package call in a Windows checkout resolved to nothing while the same project on macOS resolved fine. Paths are now stored with/separators on every platform (coraline::paths), and the resolver compares them separator-agnostically. A Windows checkout re-indexes once on the next sync to pick up the new spelling. - The receiver of a qualified call survives a re-index. When the
file that holds a call target is re-indexed, the edge into it is
re-queued as an unresolved reference — but the receiver was dropped
on the way, so
util.Area()came back as a bareAreaand could be re-pointed at an unrelated symbol with the same name. The receiver is now carried on the edge's metadata and restored when the reference is re-queued. - The same-package fallback no longer links unrelated packages. The
fallback treated "shares a directory prefix" as "is the same
package", so in a Rust project
src/runtime.rsandsrc/legacy/api.rscounted as one package and every same-named function in the tree became a candidate — the name-collision false positives of #43, one directory level up. The fallback now applies only to the languages whose package system is the directory layout (the JVM languages, Python, Go, Swift, PHP), and a file that sits in the shared directory is no longer treated as part of the package below it. A qualified call also prefers a candidate whose path names the receiver, which is a stronger signal than tree proximity. - Duplicate edges. The
edgestable has no unique constraint, so two references that resolved to the same target inserted the same edge twice. Resolved edges are now deduplicated before they are written. - A resolver failure is reported by
sync.syncswallowed the resolver's error withlet _ = …, so a failed resolution pass left the index half-built with no message. The error is now collected, logged and returned to the caller (coraline syncprints it, and the MCPsynctool reports it). - A re-exported symbol's call edge points at the declaration. A
TypeScript
export { helper } from './util'produced anExportnode, and the call edge terminated on it instead of on the function it re-exports. The export node is now resolved through to the declaration it stands for. - Rust module imports match
mod.rs.use crate::helper::target;names the modulehelper, which lives insrc/helper/mod.rs, but the comparison tested the normalised path against"/mod.rs"and compared the hint's last segment with itself — so it never matched and every Rust cross-module call fell back to a name search. The module directory is now compared with the segment before the imported symbol. - A Rust local takes its type.
let hooks = SyncManager::new()did not record the type, so the receiver ofhooks.install_hook()was resolved as a variable name rather than as a type, and the call was never matched against the type's member. - TSX, JSX and Blazor are parsed with their own grammars. TSX and JSX were parsed with the plain TypeScript and JavaScript grammars, so every JSX element was a syntax error and the file produced no nodes; Blazor was parsed with the C# grammar, which has no notion of a component. Each now uses its own grammar and its own contract.
0.13.1 - 2026-09-08
Patch release. Re-issue of 0.13.0 plus six bug-fix commits
that landed on the feat/phase5-substrate branch between
0.13.0 and the merge of PR #91. See the v0.13.0 entry below
for the feature additions in this release.
Fixed
- Additive migrations now run on every connection open
(
fix(db): run additive migrations on every db::open_database). Previously, onlycoraline initinvokedapply_incremental_migrations— projects upgraded across a schema-version boundary (e.g. v0.12.0 → v0.13.0) wouldn't pick up the newedges.confidence/nodes.cluster_id/edges.process_idcolumns until they re-rancoraline init, leavingcoraline syncfailing withno such column: cluster_idhalfway through the post-extraction passes. - Extraction honors
pub/pub(crate)/pub(super)(fix(extraction): read declaration visibility from tree-sitter AST). Every Node-construction site inextraction.rswas hardcodingis_exported = false; onlyExport-kind nodes gotis_exported = true. Process-tracing entry-point discovery (Phase 5.1) filters onis_exported = 1, so before this fix every realpub fnwas filtered out andcoraline_process_forreturned empty for every project. - Embed works on a project whose v1
vectorsBLOB table has already been migrated (fix(vec-ext): lazy vec0 schema setup + process-wide auto-extension register). Two changes: (a) aruntime::register_global_init()called frommain()so the sqlite-vec auto-extension is registered before anyConnection::open(so vec0 is available to every subsequent db connection), and (b) an idempotentensure_vec0_schema(conn)that createsvectors_vec+vectors_metaand migrates any existing v1 rows on first call. Bothcoraline embedpaths were failing end-to-end withno such module: vec0/no such table: vectors_metabefore this change. cargo-fuzzbuild underdefault-features = false(fix(ci): unblock cargo-fuzz build under default-features=false). Thepub mod vectors;module inlib.rsis gated behind theembeddings/embeddings-dynamicfeatures, butf64_to_f32_lossy(an IEEE 754 f64→f32 helper) didn't actually need either feature — moved tocrate::utils(always compiled) so fuzz targets and any other default-features=false build path can resolve it. Also backtickedclippy::cast_possible_truncationin the docstring and reordered one import alphabetically for the Format check.clippy::expect_usedandclippy::too_long_first_doc_paragraphpass for the new vec-ext helpers (chore: pass clippy::too_long_first_doc_paragraph + clippy::expect_used).main()now surfacesregister_global_initerrors to stderr and exits 2, rather than calling.expect(...)on aResult. Docstrings onensure_vec0_schemaandregister_global_initwere re-shaped to fit the 25-word opening-paragraph lint.db::clear_databaseis feature-aware (fix(db): make clear_database feature-aware (vec-ext vs BLOB storage)). On a project whose embedding table is the v0vectors_vecvirtual table,coraline index -fnow dropsvectors_meta+vectors_vecinstead of the non-existentvectors. Wrapped in a singleexecute_batchso partial failure still rolls back atomically.
0.13.0 - 2026-09-07
Added
- 5.1 Clustering + process tracing — Louvain community detection over the call graph writes
nodes.cluster_idper indexed node. A forward DFS from exported entry points (functions / methods with no incomingcallsedge) writesedges.process_idfor every edge that participates in a traced process, with cycle protection and a depth cap. Three new MCP tools expose the result:coraline_cluster_overview— list of Louvain clusters with a representative node per cluster.coraline_cluster_members— list all nodes sharing acluster_id.coraline_process_for— given a node id, return the full execution-flow trace (entry point + nodes + edges). Both columns are nullable;cluster_id IS NULLandprocess_id IS NULLmean "not clustered" / "not in any traced process" respectively. Runs as post-extraction passes 6 (Cluster) and 7 (Trace processes) of everycoraline index/coraline sync.
- 5.2 Edge confidence scoring — every
Edgecarriesconfidence: f32in[0.0, 1.0]:1.0direct AST-extracted,0.95strongly-typed Rust path (crate::/super::/self::),0.5generic name match / framework fallback / heuristic ranker.coraline_callers,coraline_callees, andcoraline_find_referencesaccept amin_confidenceparameter (default0.0includes every edge;0.8is a typical working value to suppress generic matches). Schema migration v2 — additive, idempotent on existing DBs. - 5.3 sqlite-vec integration — optional
sqlite-vec = 0.1.9backend behind the newvec-extCargo feature. Auto-extension registration viasqlite3_auto_extensionmakes thevec0virtual table available on every connection. Migration from the v1 BLOB column to thevec0table is in-place; existing DBs remain readable through the legacy path. Thedoctorprobe set andcoraline_status?include_doctor=truereport thevec_extstate. - 5.4 Doctor probe wired into
coraline_status— newinclude_doctor(defaultfalse) anddeep(defaultfalse) parameters on the MCPcoraline_statustool. Withinclude_doctor: true, the response carries the fullcoraline doctor --jsonpayload underdoctor_reportplus a top-level booldoctor_needs_attentionderived fromexit_code == 0, so self-healing UIs can gate a single boolean and walkprobes[].fixfor one actionable remediation hint per failing check. Back-compat: withinclude_doctoromitted, the response shape is identical to the prior version. Two new unit tests pin the contract:status_without_include_doctor_matches_legacy_shapeandstatus_with_include_doctor_returns_full_report_and_needs_attention_flag. - Three new MCP tools —
coraline_cluster_overview,coraline_cluster_members,coraline_process_for(see 5.1). Tool count 35 → 38.
Schema migrations
- v2 —
edges.confidence REAL NOT NULL DEFAULT 1.0. - v3 —
nodes.cluster_id INTEGER,edges.process_id INTEGER.
Both are additive and idempotent: db::apply_incremental_migrations gates on PRAGMA table_info(<table>) and writes a row to schema_versions. Existing DBs migrate in place on next coraline init / coraline sync without backfill.
Documentation
docs/MCP_TOOLS.md/book/src/mcp-tools.md—include_doctor+deeponcoraline_status,doctor_report/doctor_needs_attentionoutput,min_confidenceoncoraline_callers/coraline_callees/coraline_find_references, three new cluster/process tools, tool count 35 → 38.docs/ARCHITECTURE.md/book/src/architecture.md—nodes.cluster_idandedges.confidence/edges.process_idadded to Node/Edge struct definitions; Edge confidence scale table; indexing pipeline expanded with Phase 5.1 steps 6 (Cluster) and 7 (Trace processes); schema table now includesvectors+schema_versions; additive-migrations section (v2, v3); source-layout block refreshed with the new modules (clustering.rs,vec_ext.rs,doctor.rs,security.rs,audit.rs,update.rs,db/); tool descriptor count 20 → 38.docs/CLI_REFERENCE.md/book/src/cli-reference.md— cross-linkcoraline_status↔coraline doctorand document the shareddoctor_reportJSON shape.docs/IMPROVEMENT_PLAN.md— new Phase 5 section.
0.12.0 - 2026-08-19
Added
coraline doctor— new diagnostic subcommand that checks config presence, database health, git hook installation, and embedding-model state, printing a✔/✘report with a remediation hint per failing check.--quickskips the three slow model-load/inference/embed-coverage probes (deep mode is the default);--jsonemits a machine-readable report for CI gating. Exits0only if every check passed.coraline init --embed/--no-embed/--yes— explicit, non-interactive control over the post-init embedding-model download decision, replacing the TTY-only prompt as the sole path.--no-embedalways wins over--yes; the interactive prompt remains the fallback when no flag is given and stdin is a TTY.coraline statusembedding-model line — status output now shows the model file (name + size) or a "not present" hint, plus the resolved model name and directory, socoraline_semantic_searchreadiness is visible without runningdoctor.- Multi-model embedding support —
vectors.modelinconfig.toml(previously present but unused) now actually selects which embedding model Coraline downloads, loads, and stores against. Ships withnomic-embed-text-v1.5(general-purpose, default) andjina-embeddings-v2-base-code(code-specialised, opt-in), both 768-dim. Newcoraline model listshows the registry;coraline model download/statusaccept--model <name>to target a non-default model (defaulting tovectors.modelfrom config). Switching models on a project with existing embeddings requires re-runningcoraline embed— every read path (coraline_semantic_search,doctor's coverage probe, staleness checks) filters by themodelcolumn already present in thevectorstable schema, so a switch is self-healing rather than mixing scores across models. - Structured
EMBEDDING_MODEL_MISSINGMCP error —coraline_semantic_searchfailures from a missing/unloadable model now return a typed error envelope (code,message,recover: { command, docs }) instructuredContentinstead of only free-form text, so an MCP agent can branch oncodeand act onrecover.commanddirectly.
Fixed
- Restored
coraline_audit_docs,coraline_find_file(MCP), andcoraline audit-docs(CLI) — a prior refactor (b079ac5, config.toml consolidation) silently dropped thetools::audit_toolsmodule declaration, theFindFileToolregistration, and theaudit-docsCLI subcommand, while leaving the fully-implemented code and its documentation in place. All three are wired back in;docs/MCP_TOOLS.mdnow lists all 35 actually-registered MCP tools (up from an undercounted 29), including the batch (coraline_batch_*) and advanced-search (coraline_search_by_*,coraline_find_by_kind_in_file) tool groups that were implemented but never documented. Thecoraline_session_security_statuspseudo-tool, documented but removed in the same refactor (itsSessionSecurityStatetracking no longer exists onMcpServer), and the "Background Auto-Sync" background thread, documented but never present in the current dual-eraMcpServer, are removed from the docs rather than restored — both are real feature gaps tracked separately, not doc errors.
0.11.0 - 2026-08-09
Added
- Shared global config and ONNX model directory (#78) —
~/.config/coraline/config.tomland~/.config/coraline/models/<model>/are now the default locations, with the per-project.coraline/paths kept as a one-time migration source viacoraline model migrate. Per-field merge: a local[vectors]section that only setsenabled = truestill inheritsmodel_dirfrom the global config. Generated embeddings and.coraline/coraline.dbremain project-local — the share is the model weights file, not the vectors. - Dual-era MCP server (#56) —
McpServernow serves both the upcoming-draft MCP spec (header-style_metahandshake) and the legacy handshake-based protocol (2025-11-25and earlier, including the2025-06-18revision this codebase originally targeted). Era is detected from the incominginitializerequest shape, not from a pinned protocol version, so the same binary negotiates with both classes of client.mcp/mod.rsandmcp/protocol.rssplit out the era dispatch from the JSON-RPC plumbing;mcp_requestfuzz harness drives dispatch through arbitrary bytes. .github/workflows/security-pr-base.yml—pull_request_targetworker that audits the BASE branch viacargo deny checkon every PR, satisfying the requiredCheck licenses and bansstatus check on PRs that don't modify any dependency manifest. Explicitly checks out${{ github.event.pull_request.base.sha }}and never touches fork code.
Fixed
- MCP server no longer creates
.coraline/before a project is initialized (#71) —McpServerpreviously materialised the project directory as a side-effect of starting up, which broke tooling that distinguished "indexed" from "uninitialised" by directory presence. Initialisation now happens only on an explicitcoraline initor on the first indexing call. tree-sitter-markdownupstream fork swap (#80) —tree-sitter-markdown-fork→tree-sitter-markdown-updatedto pick up maintenance fixes and avoid the unmaintained crate surfacing as acargo auditwarning.
Changed
- CI action pins — folded in 5 open dependabot version PRs:
actions/checkout6.0.3 → 7.0.1 (#76)actions/cache5.0.5 → 6.1.0 (#74; cherry-picked as 7f0b700)github/codeql-action/upload-sarif4.36.2 → 4.37.3 (#75)ossf/scorecard-action2.4.3 → 2.4.4 (#77)softprops/action-gh-release3.0.0 → 3.0.2 (#73) All SHA-pinned substitutions (sed-equivalent). Where this branch was on a pre-bump base (e.g. v6.0.3 checkout, v3.0.0 action-gh-release, v4 in book.yml), the intermediate dependabot step is skipped to land on the dependabot target version directly.
- Cargo dependency —
tree-sitter-erlang0.18.0 → 0.20.0 (#79), skipping 0.19.0 since the branch's base predates that release.
Internal
- Fuzzing harness and CI jobs — new
fuzz/workspace member with twocargo-fuzztargets:mcp_request(drivesMcpServer::handle_messagewith arbitrary bytes through JSON-RPC deserialization and dispatch) anddb_search(drivesdb::search_nodes/find_nodes_by_name/find_exports_by_moduleagainst an in-memory SQLite DB initialised with the production schema, exercisingbuild_fts_query+ FTS5 MATCH parsing).McpServer::handle_messageis nowpubso external harnesses can drive dispatch without going through stdin. .github/workflows/fuzz.yml— nightlycargo fuzz runfor each target with a configurable per-target time budget (default 300s; overridable viaworkflow_dispatchinput). Uploads the corpus as a workflow artifact on success..github/workflows/cifuzz.yml+.clusterfuzzlite/— per-PR ClusterFuzzLite run with libFuzzer + AddressSanitizer on the upstreambase-builder-rustimage. Satisfies the OpenSSF Scorecard Fuzzing check (the cargo-fuzz language probe does not currently recognise Rust, but ClusterFuzzLite is detected).- Pinned all unpinned GitHub Actions in
.github/workflows/— resolved 9 OSSF ScorecardPinned-Dependenciesalerts.dtolnay/rust-toolchain@stable(5 occurrences inci.yml) now points at@29eef336d9b2848a0b548edc03f92a220660cdb8(the same SHA already used inrelease.yml/docs-pages.yml/security.yml, so the toolchain is reproducible across the workspace). The 4 actions inbook.ymlare also SHA-pinned:actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5,peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08(dereferenced from the v2 annotated tag, sincepeaceirisuses annotated tags),actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa, andactions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e. - Scoped workflow permissions to least privilege — resolved 2 OSSF Scorecard
Token-Permissionsalerts (score is 0: topLevel 'contents' permission set to 'write').auto-tag.ymlanddependabot-automerge.ymlnow declarecontents: read/pull-requests: readat workflow-level and only escalate towriteon the specific job that needs it (thetagpush for auto-tag, theauto-mergefor dependabot-automerge). The remainingscore is 0: jobLevel 'contents' permission set to 'write'alert onrelease.yml'sgithub-releasejob is necessary —softprops/action-gh-release(and every alternative —gh release create,ncipollo/release-action) requirescontents: writeto create the release, and the job's other permissions (attestations: write,id-token: write) are required byactions/attest-build-provenancefor SLSA provenance signing. - Disabled
persist-credentialson the auto-tag checkout — mitigates the remainingDangerous-WorkflowScorecard alert by preventing theGITHUB_TOKENfrom being persisted as a git credential when checking out${{ github.event.workflow_run.head_sha }}.cargo metadata --no-deps(the only thing the workflow runs on the checked-out commit) doesn't executebuild.rs, but a future change that did execute the checkout would no longer inherit the token. The alert itself can't be closed while the workflow still usesworkflow_run+head_sha(needed to wait for CI green before tagging); it's gated byhead_branch == 'main'andconclusion == 'success'so the upstream is always a trusted push tomain. - ClusterFuzzLite workflow repaired — the
Build fuzzerscheck had been failing on every push since the workflow was introduced in 49d3e67. Four layered fixes: (a)RUSTUP_TOOLCHAIN=nightlyis now set in.clusterfuzzlite/Dockerfilebecause libsqlite3-sys 0.38'sbuild.rsusescfg_select!(rust-lang/rust#115585), which is unstable in build scripts on stable Rust; (b).clusterfuzzlite/build.shis symlinked to$SRC/build.shso ClusterFuzzLite's compile entrypoint can find it; (c)build.shsearches the cargo workspace target dir layout (target/x86_64-unknown-linux-gnu/release/) in addition to the cargo-fuzz default (fuzz/target/...), because thefuzzcrate is a workspace member and inherits the workspace target dir; (d) thebuildandrunjobs were combined into a singlecifuzzjob so the OUT Docker volume survives on ephemeral GitHub-hosted runners (the volume was gone between jobs, producingOut directory: /github/workspace/build-out does not exist.at run time). enforce_adminsenabled onmainbranch protection — admins can no longer bypass the required status checks (test,clippy,fmt,deny,coverage) or 1 approving review. Resolves OSPS-AC-03.01.fuzz_secondsworkflow_dispatch input validated —.github/workflows/fuzz.ymlnow rejects non-integer or out-of-range values before interpolating into thecargo fuzzshell command ([[ "$FUZZ_TIME" =~ ^[0-9]+$ ]] && [ "$FUZZ_TIME" -le 3600 ]). Resolves OSPS-BR-01.01.- GitHub secret scanning + push protection enabled —
.github/workflows/gitleaks.ymlscans every push and PR withgitleaks/gitleaks-actionpinned to commitf65dee2ef48e96e7a5a2b775b131c3d81b2e73ea(v2.0.8). GitHub native secret scanning and push protection are enabled at the repo level via thesecurity_and_analysisAPI. Resolves OSPS-BR-07.01. - License bundled in release archives —
.github/workflows/release.ymlnow copiesLICENSE-MITandLICENSE-APACHEinto the release directory and includes them in both the Unixtar.gzarchive and the Windowsziparchive alongside thecoralinebinary. Resolves OSPS-LE-03.02. - Manifest SPDX expression updated to
MIT OR Apache-2.0—Cargo.toml,crates/coraline/Cargo.toml,crates/tree-sitter-blazor/Cargo.toml, andfuzz/Cargo.tomlall previously declaredlicense = "MIT", which understated the dual-license intent (bothLICENSE-MITandLICENSE-APACHEexist at the repo root). - License files moved into
LICENSE/directory —LICENSE-MITandLICENSE-APACHEnow live underLICENSE/at the repo root (so the source-code license is maintained in aLICENSE/directory, as the OSPS-LE-03.01 requirement literally specifies). The README license badge target and therelease.ymlarchive steps were updated to point at the new paths; release.yml's relative-path arithmetic for the license copies was also corrected (the previouscp ../../../../LICENSE-MITwalked one directory above the repo root). - OpenSSF Baseline badge added to README — surfaces the bestpractices.dev baseline status next to the existing license and Rust-version badges.
./LICENSE.mdpointer file added — a top-levelLICENSE.mdnow sits alongsideLICENSE-MITandLICENSE-APACHEat the repo root and links to both, so the source-code license is discoverable as a singleLICENSE-named file at the repo root (matching OSPS-LE-03.01's "LICENSE file" reading) without conflicting with the actual license files at the same level.
0.10.2 - 2026-06-18
Changed
coraline syncandcoraline indexnow drive anindicatifbraille spinner from the existingIndexProgresscallback — the line updates in place (⠹ Parsing 42/100 src/foo.rs), giving continuous visual feedback during long parses and resolving phases instead of leaving the terminal looking frozen between file updates. Bar length grows automatically when transitioning between phases (e.g.Scanning→Parsing→Resolving).coraline embednow shows a per-node spinner with the current symbol name — replaces the previous batched\r {i}/{total}counter that updated only everybatch_sizenodes; users now see(Function) load_embedding_modeladvance one node at a time, making it obvious that work is happening on large projects.coraline embedshows an indeterminate spinner during ONNX model load — the multi-second tokenizer/session initialization no longer looks hung; spinner disappears once the model is ready and the per-node counter begins.
Fixed
- Release workflow
aarch64-unknown-linux-muslcross-compile regression —cargo install cross --git https://github.com/cross-rs/cross(no tag) was tracking cross-rs main HEAD, which has been moving fast. The last commit that produced a green aarch64-musl build (v0.9.0, 2026-04-26) wascross-rs/cross@65fe72b0. Two commits later, PR #1778 ("suggest running cargo directly for native targets") started emitting a new warning insidecross::setup(). Combined withcross::shell::should_fail()(which makes warnings fatal in CI), that turned a previously recoverable setup hiccup into the opaqueErrors encountered before cross compilation, aborting.Pinned the install to thev0.2.5tag with--lockedso future cross-rs churn can't silently break the release again, and addedCROSS_DEBUG=1so any future failure prints the underlyingcargo metadatastderr.
Internal
- Extracted
load_embedding_modelandembed_nodeshelpers fromrun_embedto satisfy theclippy::too_many_lineslint cap. - Removed the dead
print_progressandclear_progress_linehelpers frombin/coraline.rs(their job is now done by the spinner bar).
0.10.1 - 2026-06-17
Fixed
- Cross-compile release builds for Linux musl/gnu —
vectors::download_to_fileandvectors::download_modelare now compiled under both theembeddingsandembeddings-dynamicfeatures. The previous gating (#[cfg(feature = "embeddings")]) causedE0425: cannot find function download_modelwhen building with--no-default-features --features embeddings-dynamic, which is the configuration used by thex86_64-unknown-linux-musl,aarch64-unknown-linux-gnu, andaarch64-unknown-linux-muslrelease artifacts.
Changed
- MSRV bumped from 1.93 to 1.96.0 — Required by transitive dependencies (e.g.
libsqlite3-sys 0.38.1uses the now-stabilizedcfg_select!macro). - CI Clippy job inlined — The
cargo lintcall was depending on the.cargo/config.tomllintalias, which is gitignored and therefore not visible to CI. The workflow now runs the full clippy invocation directly.
0.10.0 - 2026-06-17
Added
- Batch query tools (60-90% token savings) — New MCP tools eliminate round-trip overhead for multiple lookups:
coraline_batch_get_nodes— Fetch multiple node details in one call (20 lookups: 1000 tokens → 100 tokens)coraline_batch_callers— Get callers for multiple symbols simultaneouslycoraline_batch_callees— Get callees for multiple symbols simultaneously
- Advanced search tools (60% token savings) — Specialized search tools reduce iterative lookups:
coraline_search_by_signature— Find symbols by type signature patternscoraline_search_by_docstring— Search within docstring/comment contentcoraline_search_exported_symbols— Filter search to public API onlycoraline_find_by_kind_in_file— Get all symbols of a specific kind in a file
- Compact JSON output format (25-65% token savings) — All graph query tools now support
output_formatparameter:full— Verbose JSON with descriptive keys (default for compatibility)compact— Short keys, enums as integers, null fields omitted (350 chars → 120 chars per node)
- Timeout configuration for OpenCode compatibility — MCP server now supports configurable timeouts:
- Default: 120 seconds (2 minutes)
- CLI flag:
coraline serve --mcp --timeout 300000(5 minutes) - Per-tool timeout hints in metadata (ImpactTool: 5min, BuildContextTool: 3min, SyncTool: 10min)
- OpenCode compatible (300s default, 600s max)
- Comprehensive mdbook documentation — New 14-page documentation site with GitHub Pages deployment:
- Getting Started guide (installation, quick start)
- MCP integration for Claude Desktop, Claude Code, and OpenCode
- OpenCode setup guide with timeout configuration and troubleshooting
- CLI reference with all commands and examples
- Configuration reference with all TOML settings
- Language support matrix
- MCP tools reference (33 tools documented)
- Architecture overview
- Performance optimization guide
- Advanced usage and development docs
Changed
- MCP protocol version updated — Upgraded from
2024-11-05to2025-06-18(latest enterprise features) - Configuration consolidation — Coraline now uses only
config.tomlfor all configuration. The legacyconfig.jsonfile has been removed from new projects. Existing projects withconfig.jsonwill be automatically migrated toconfig.toml(with backup) when running index/sync commands, or manually viacoraline config --migrate. - README simplified — Reduced from 540 lines to 133 lines (75% reduction). Essential information retained, detailed docs moved to mdbook.
- Tool count increased — 33 total MCP tools (from 26):
- 19 graph query tools (includes 7 new tools: 3 batch + 4 advanced search)
- 7 file/config tools
- 1 context builder
- 5 memory management tools
- 1 documentation audit tool (optional: +1 semantic search when embeddings enabled)
- Git hooks enhanced — Pre-commit, pre-push, and commit-msg hooks adapted with Coraline-specific checks:
- Pre-commit: cargo fmt, gitleaks (secret detection), cargo audit, cargo deny
- Pre-push: tests, clippy, release build, docs, mdbook build
- Commit-msg: conventional commit format validation
- Installation script:
./scripts/install-hooks.sh
Breaking Changes
config.jsonno longer created —coraline initnow creates onlyconfig.toml. Existing projects are not affected (automatic migration preserves all settings).
Performance
- Token efficiency improvements — Combined optimizations yield 60-95% token savings:
- Batch queries: 90% reduction (20 calls → 1 call)
- Compact output: 65% reduction per node (350 → 120 chars)
- Advanced search: 60% reduction (eliminates follow-up queries)
- Total impact: Projects using batch+compact can reduce typical graph exploration from 5000 tokens to 250 tokens
Developer Experience
- Strict clippy enforcement — Comprehensive linting with all groups enabled (all, pedantic, nursery, cargo, perf)
- Project memory system — Four detailed memory files for persistent development context:
project_overview.md— Architecture, components, technologies, entry pointsstyle_conventions.md— Coding standards, clippy config, best practicescompletion_checklist.md— Feature completion requirementssuggested_commands.md— Development workflow commands
- GitHub Actions workflow — Automated mdbook deployment to GitHub Pages
0.9.0 - 2026-04-25
Added
- MCP production security hardening — new
security.rsmodule with input/output guardrails, pattern-based redaction, prompt-injection detection, and configurable enforcement modes (Off/Monitor/Enforce). SecurityConfiginCoralineConfig— controls session limits (max_tool_calls_per_session,max_guardrail_hits_per_session,max_blocked_calls_per_session), read→write flow policy (enforce_flow_policy), output character cap (max_output_chars), and per-category redaction/pattern lists; surfaced in the default TOML template.- Per-tool risk classification —
classify_tool_risk()labels every registered tool asReadOnlyorWriteLike; used by the flow policy to detect anomalous read→write transitions within a session. - Session security state tracking —
McpServermaintains live counters for tool calls, guardrail hits, blocked calls, and read→write events; resets oninitialize. coraline_session_security_statuspseudo-tool — returns a JSON snapshot of the current session counters against configured limits; useful for monitoring and debugging from the AI client.- Serve-time security warning —
coraline serve --mcpnow emits a warning when the security module is disabled;--require-securityflag exits with code 2 when security is not enabled, allowing hardened deployments to fail fast. - Structured audit log events — every tool dispatch emits a
tracingevent withevent,tool,decision,guardrail_hits,arg_hash(SHA-256), andresult_sizefor SIEM/log-pipeline integration. docs/MCP_PRODUCTION_SECURITY_PLAN.md— full production security checklist and code-level integration map.docs/MCP_TOOLS.mdupdated — tool count raised to 29;coraline_session_security_statusdocumented with full request/response example.
0.8.8 - 2026-04-23
Fixed
- Markdown docs were silently excluded from indexing despite include globs — added
Language::Markdowntois_language_supported, allowing**/*.mdinclude patterns to actually parse/index docs and enablingcoraline_audit_docsto produce real documentation findings.
0.8.7 - 2026-04-23
Fixed
coraline audit-docs --jsonnow respects filtering flags — JSON output now honors--no-staleand--no-undocumentedinstead of always emitting both result arrays.- Canonical
NodeKindserialization in doc audit output — undocumented exportkindvalues are now serialized from the enum representation (snake_case) instead of debug-lowercase formatting, preventing mismatches liketypealiasvstype_alias. - Audit docs JSON schema naming alignment —
docs/MCP_TOOLS.mdexamples now usestale_refs_countandundocumented_exports_count, matching the actual MCP response keys.
Documentation
- Clarified README MCP tool-count wording: 27 standard tools plus optional
coraline_semantic_searchwhen embeddings are available (28 total in that configuration).
0.8.6 - 2026-04-22
Fixed
- Callees/callers query accuracy:
coraline_calleesandcoraline_callersMCP tools now validate call edges against import/crate boundaries before returning results, eliminating false-positive cross-crate links from name collisions (e.g.,heartbeat()in raccoon-agent falsely callingpost()in raccoon-frontend). Validation checks: same-file, same-directory, or explicit import statements; queries fetch 2x limit to maintain result count after filtering. - CLI callees/callers filtering:
coraline calleesandcoraline callersCLI commands now apply the same boundary validation and show "No callees/callers found" when all edges are filtered out.
Added
is_valid_call_edge()database function — validates whether a call edge respects module/crate boundaries before inclusion in query results.
0.8.5 - 2026-04-21
Dependencies
- Bump
indicatif0.17 → 0.18 - Bump
tree-sitter-scala0.25.0 → 0.26.0
CI
- Bump
actions/upload-artifact7.0.0 → 7.0.1 - Bump
github/codeql-action4.35.1 → 4.35.2 - Bump
actions/deploy-pages4.0.5 → 5.0.0 - Bump
dependabot/fetch-metadata2.3.0 → 3.1.0
0.8.4 - 2026-04-20
Fixed
- Call graph precision:
coraline_calleesno longer returns false-positive cross-project edges when multiple paths have the same symbol name. Resolver now prefers extractor-provided candidate IDs (better locality signal) and avoids low-confidence global-name fallback for call edges. - Graph queries (
coraline_callees,coraline_callers) now return deterministic, stable result sets via explicitORDER BY (line, col, target/source)in edge retrieval, improving user trust in output consistency across repeated queries. - Windows test portability: graph precision acceptance tests now normalize path separators in assertions, preventing
src\\api.rsvssrc/api.rsmismatches onwindows-latest.
Added
- Graph precision acceptance tests for call-edge disambiguation in mixed active/legacy workspaces, stale-file deletion edge hygiene, and fallback prevention scenarios.
CI
- Replaced hardcoded Rust toolchain commit hashes with
@stabletag to fix transient CI failures and ensure stable Rust channel alignment with MSRV policy.
0.8.3 - 2026-04-17
Changed
coraline index,coraline sync, andcoraline embednow use a Braille spinner with the current phase/file instead of a progress bar, reducing terminal jitter during indexing and embeddingcoraline embednow displays an explicit model-loading status indicator while ONNX Runtime and tokenizer initialization are in progress
Fixed
- Fixed storing-phase progress accounting in
index_allwhere mixed totals (parsed.len()vsfiles.len()) caused visible progress jumps coraline embednow handles ONNX Runtime initialization panics gracefully and returns actionable loader error guidance instead of a panic backtrace
CI
- Release workflow now supports auto-tag-triggered releases via
workflow_runand shared tag/SHA resolution, avoiding theGITHUB_TOKENtag-push trigger gap
0.8.2 - 2026-04-16
Changed
coraline index,coraline sync, andcoraline embednow display anindicatifprogress bar ({spinner} {phase} [{bar}] {pos}/{len}) instead of raw ANSI escape sequences;--quietsuppresses it entirely
Fixed
- macOS
tree-sitter-blazorarchive warning removed — the build now avoids the unsupported BSDar -Dflag probe that previously emitted noisy warnings during local builds on macOS
CI
- Add Dependabot auto-merge workflow — approved Dependabot PRs with passing CI now merge automatically
0.8.1 - 2026-04-15
CI
- Bump
actions/attest-build-provenancefrom 3.0.0 to 4.1.0 - Bump
actions/cachefrom 5.0.4 to 5.0.5 - Bump
actions/configure-pagesfrom 5.0.0 to 6.0.0 - Bump
softprops/action-gh-releasefrom 2.6.1 to 3.0.0 - Bump
actions/upload-pages-artifactfrom 3.0.1 to 5.0.0 - Pin
ortto=2.0.0-rc.11in Dependabot ignore rules pending resolution of VitisAI build regression in rc.12
Security
- Updated
ureqto 3.3.0,rustlsto 0.23.38,rustls-webpkito 0.103.12 — resolves RUSTSEC-2026-0098 and RUSTSEC-2026-0099 (URI name constraint validation bugs)
0.8.0 - 2026-04-15
Added
- Symbol name disambiguation for MCP graph tools —
coraline_callers,coraline_callees,coraline_impact,coraline_find_references,coraline_node,coraline_dependencies,coraline_dependents, andcoraline_pathnow acceptname(+ optionalfile) as an alternative tonode_id, with clear disambiguation errors when multiple symbols share the same name filefilter on search tools —coraline_searchandcoraline_find_symbolaccept an optionalfileparameter to scope results to a specific file pathcoraline_find_fileMCP tool — glob-based file search (*.rs,test_*,[Cc]argo.toml) that walks the project tree, skipping common build/hidden directories
Fixed
- FTS5 search hardened against special-character queries — search terms are now individually double-quoted before SQLite
MATCHexecution, with embedded quotes escaped; blank/whitespace-only input returns empty results instead of an FTS syntax error. Queries containing/(e.g. file paths),", or other FTS special characters now work correctly - MCP tool dispatch resolves prefixed tool names —
ToolRegistrynow normalizes common client prefixes (mcp_coraline_coraline_*,mcp_coraline_*,mcp_*) before lookup, preventingUnknown toolerrors when MCP clients such as VS Code Copilot automatically prefix registered tool names - Removed
#[allow(clippy::cast_possible_truncation)]suppressions — allu64 as usizecasts in MCP toolexecutefunctions replaced withusize::try_from().ok().unwrap_or(N);f64 as f32inSemanticSearchToolnarrowed to a single line-level allow with justification comment - Fixed silent empty-string return in
resolve_node_id— thelen() == 1branch now returns a properinternal_errorinstead of silently producing an empty node ID if the iterator is unexpectedly exhausted - Release workflow not triggered by auto-tag — tags pushed by
github-actions[bot]viaGITHUB_TOKENdon't firepushevents on other workflows; auto-tag now explicitly triggers the release workflow viaworkflow_dispatch
0.7.0 - 2026-04-13
Added
- MCP background auto-sync — the MCP server now spawns a background thread that periodically checks index freshness and performs incremental sync when files have changed, keeping the knowledge graph current without manual intervention
- Automatic incremental embedding — after each background sync, newly-added nodes are automatically embedded when the
embeddingsfeature is enabled and ONNX model files are present on disk auto_sync_interval_secsconfig — new[sync]setting inconfig.tomlcontrols the background check interval (default: 120 seconds, set to 0 to disable)coraline updateCLI command — checks crates.io for newer published versions and prints upgrade instructionsget_unembedded_nodesdatabase query — efficient LEFT JOIN query to find nodes missing vector embeddings, enabling incremental embedding instead of re-embedding everything- Repository logo asset — added
assets/img/coraline_logo.pngand wired it into the README header for consistent project branding
Changed
ureqis now a non-optional dependency — always available for update checking (previously gated behind theembeddingsfeature)tree-sitter-dartupdated to 0.1.0 — migrated from deprecatedlanguage()function to the newLANGUAGEconstant API
Dependencies
- Consolidated Dependabot PRs (#15–#19) — CI action versions (
actions/checkout@v6,codeql-action@v4,upload-artifact@v7,download-artifact@v8.0.1) were already at target versions; no changes needed - Skipped
ort2.0.0-rc.12 due to upstreamVitisAIbuild regression — remains pinned at=2.0.0-rc.11
Documentation
- README cleanup and docs-site routing — removed emoji-heavy formatting, normalized the logo image tag, and updated primary documentation links to point to the published site at
https://greysquirr3l.github.io/coraline/ - Configuration, MCP, and CLI docs updated — documented
auto_sync_interval_secs, background auto-sync behavior, and thecoraline updatecommand
0.6.0 - 2026-04-09
Added
--skip-syncforcoraline embed— allows explicitly bypassing the pre-embed sync check when you intentionally want to embed the current indexed stateSyncStatuspreflight API (extraction::needs_sync) — lightweight sync-status check now returns detailed added/modified/removed counts for reuse by CLI and MCP flows
Changed
coraline embednow preflights index freshness — embed checks for stale index state and auto-runs incrementalsynconly when needed, with progress output that reports detected and applied changescoraline_semantic_searchnow performs periodic freshness maintenance — MCP semantic search throttles freshness checks and, when stale, auto-syncs the graph and refreshes stale/missing node embeddings before serving results
Documentation
- CLI, MCP, and README docs updated — documented
embed --skip-sync, pre-embed auto-sync behavior, and MCP semantic-search freshness metadata - mdBook docs site added — introduced
docs/book/and a GitHub Pages deployment workflow (docs-pages.yml) to publish documentation on the project GitHub Pages site - Architecture docs visual refresh — replaced ASCII overview with GitHub-native Mermaid diagrams for cleaner rendering and maintenance
0.5.0 - 2026-04-08
Added
- MCP protocol negotiation and compatibility fallback — server now negotiates protocol version with clients, preferring
2025-11-25while retaining compatibility with2024-11-05 tools/listpagination support — cursor-based pagination added viacursorrequest param andnextCursorresponse field
Changed
- MCP lifecycle enforcement tightened — normal operations now require successful
initializefollowed bynotifications/initialized - Tool error semantics aligned with MCP expectations — unknown tool calls return protocol errors; tool execution failures continue returning
isError: trueresults - Tool capability declaration expanded — MCP initialize response now advertises
tools.listChangedcapability (currentlyfalse) - Core dependencies refreshed for 0.5.0 — upgraded key libraries including
toml(1.1),rusqlite(0.39),sha2(0.11),tokenizers(0.22), and multiple tree-sitter parser crates; validated with full workspace tests and clippy - Workflow supply-chain hardening — all CI and CodeQL GitHub Actions are now pinned to immutable commit SHAs to improve OSSF Scorecard
Pinned-Dependenciesposture - Strict lint command is now standardized — added tracked
.cargo/config.tomlalias socargo lintconsistently enforces the project clippy policy in local and CI runs
Fixed
- Tool result schema field casing — MCP tool results now serialize as
isError(camelCase) instead ofis_error - Clippy pedantic compliance in MCP server code — removed no-effect underscore bindings and replaced potential panicking slice/index patterns with safe iterator/object mutation patterns
Documentation
- MCP documentation refreshed across README and docs book — updated protocol/lifecycle notes, pagination behavior, and development examples to reflect current server behavior
0.4.4 - 2026-04-08
Fixed
- Windows cross-platform CI test failure —
parse_project_root_accepts_file_uriunit test now handles Windows file URI format (file:///C:/...) correctly by normalizing the leading slash when present; test is now platform-aware and uses appropriate URIs for each platform
0.4.3 - 2026-04-07
Fixed
- Cross-compilation builds failing on OpenSSL — switched TLS backend from
native-tls(OpenSSL) torustlsfor all HTTP operations; musl and ARM cross-builds no longer require OpenSSL headers or linking - Root cause:
ortdependency had default features enabled which pulled intls-native→ureq/native-tls→openssl-sys; now usesdefault-features = falsewith explicittls-rustls
Changed
embeddingsfeature now uses rustls — pure Rust TLS for model downloads, no system OpenSSL dependencyembeddings-dynamicno longer includes any TLS stack — users supply their own ONNX runtime, no HTTP downloads needed
Security
- Pinned all GitHub Actions to commit SHAs — OSSF Scorecard
PinnedDependenciesIDcompliance - Added Dependabot configuration — automated dependency updates for Cargo and GitHub Actions
0.4.2 - 2026-04-07
Fixed
- MCP tools discovery without explicit
--path—tools/listnow lazily initializes the tool registry when clients call it beforeinitialize, so tools are returned even whencoraline serve --mcpstarts without-p - Safer MCP project-root URI parsing — non-
file://URIs (for example, remote client scheme URIs) are no longer treated as filesystem paths duringinitialize; server falls back to an actual local path when needed - Regression coverage for MCP startup flow — added tests for pre-initialize
tools/listbehavior and URI parsing guards to prevent regressions
0.4.1 - 2026-04-03
Added
- Embedding model prompt on
coraline init— when stdin is a TTY,initnow offers to download the embedding model (~137 MB) immediately after initialization; declined or non-interactive runs print a tip and continue normally with full graph functionality embeddingsis now the default feature —cargo install coralineincludes ONNX/semantic search support out of the box; no--featuresflag required for most users
Fixed
- MCP server no longer ghost-creates
.coraline/—MemoryManagerpreviously calledcreate_dir_all(.coraline/memories/)eagerly on every MCP startup, leaving a stub directory that blockedcoraline initfrom running cleanly; it now returns an error if.coraline/doesn't exist, which the MCP tool registry handles gracefully coraline init -ion an already-initialized project no longer prompts to overwrite — when--indexis present without--force, init detects the existing directory, skips the destructive overwrite, and runs indexing directly; use--forceto explicitly wipe and reinitializecoraline_semantic_searchMCP tool degrades gracefully without a model — when no ONNX model file is present the tool is not registered (all other tools remain available) and a warning is emitted to the project log
0.4.0 - 2026-03-20
Added
- Full multi-language symbol extraction coverage across all supported languages, including previously missing Python internals and broad AST node-kind mappings.
- Expanded import/export resolution across languages for stronger cross-file graph relationships and MCP traversal behavior.
- Broader call-expression detection and callee extraction across language grammars to improve call graph completeness.
Changed
- Cross-language resolution quality improved for callers/callees/impact tooling due to richer import/export and call mapping.
Internal
- Strict lint compliance restored after expansion (
cargo clippy --all-features -- -D warnings). - Release validated with build + full test suite.
0.3.1 - 2026-03-18
Added
embeddings-dynamicfeature flag — alternative toembeddingsthat usesort/load-dynamicinstead ofort/download-binaries, allowing users on systems with older glibc (e.g., Rocky Linux, HPC nodes) to supply their ownlibonnxruntime.sobuilt against their local glibc (#8)- musl static binaries in releases —
x86_64-unknown-linux-muslandaarch64-unknown-linux-musltargets added to the release CI matrix, producing fully static binaries with zero glibc dependency
0.3.0 - 2026-03-07
Added
- Vector math optimizations — cosine similarity and L2 normalization now use fused multiply-add for improved numerical stability
Changed
- Dependencies updated — refreshed core dependencies and applied transitive updates for security and compatibility (tree-sitter, clap, tempfile, syn, and 16+ transitive deps)
Internal
- All tests validated (37/37 passing); property tests ensure numerical accuracy
0.2.3 - 2026-03-01
Fixed
coraline init -ion an already-initialized project — instead of hard-failing, the CLI now prompts "Overwrite? [y/N]" when stdin is a TTY, or prints a clear error with--forceguidance in non-interactive contexts;--force/-fflag added toinitto skip the prompt- UNIQUE constraint failures on minified/single-line files — node IDs now incorporate
start_columnin addition tostart_line, preventing hash collisions for multiple symbols on the same line - Garbled progress output during
index/sync— progress lines now use\r\x1B[K(erase-to-end-of-line) instead of bare\r, andstdoutis flushed after each update to prevent interleaving with log output
Internal
- OSSF Scorecard CI workflow added
- Security audit workflow now also triggers on
deny.tomlchanges cargo fmtstyle pass acrossconfig.rsandresolution/mod.rs
0.2.2 - 2026-02-21
Fixed
- Release pipeline: binary builds failing on
ort-sys—ort,tokenizers, andndarrayare now optional, gated behind anembeddingsfeature flag; default builds no longer require ONNX Runtime prebuilt binaries - Release pipeline:
coraline publishfailing when version already on crates.io — publish steps for bothtree-sitter-blazorandcoralinenow skip gracefully if the version already exists - Release pipeline: build matrix cancelling all jobs on first failure — added
fail-fast: falseso platform builds run independently - Dropped
x86_64-apple-darwinrelease binary — Intel Mac is not a supported target; ONNX Runtime provides no prebuilt binaries for it
0.2.1 - 2026-02-21
Fixed
coraline initblocked by log directory —logging::init()eagerly created.coraline/logs/beforeis_initialized()ran, making every re-init attempt report "already initialized"synccrash on UNIQUE constraint — incremental sync now catches per-file store errors (warn + continue) instead of aborting the entire sync, consistent withindex_allcallers/calleesCLI showing incorrect results — CLI was passing no edge-kind filter, surfacingcontainsedges as false callers; now filters tocallsedges only, consistent with MCP tools- CI
actions/checkout@v6— updated all workflow steps to the current stablev4
0.2.0 - 2026-02-20
Added
- Vector embeddings — full ONNX pipeline using
ort 2.0.0-rc.11and nomic-embed-text-v1.5 (384-dim).coraline embedCLI command andcoraline_semantic_searchMCP tool - 25 MCP tools (26 with embeddings) — complete symbol, graph, file, memory, config, stats, and sync toolset
coraline_stats— detailed graph statistics grouped by language, node kind, and edge kindcoraline_dependencies/coraline_dependents— traversal tools for outgoing/incoming dependenciescoraline_path— find shortest paths between any two nodescoraline_syncMCP tool — trigger incremental sync from an MCP clientcoraline_semantic_search— semantic similarity search over indexed symbolscoraline_find_symbol/coraline_get_symbols_overview/coraline_node/coraline_find_references— symbol-level tools matching Serena's precisioncoraline_read_file/coraline_list_dir/coraline_get_file_nodes— file exploration toolscoraline_get_config/coraline_update_config— TOML config management via MCP- Memory tools —
coraline_write_memory,coraline_read_memory,coraline_list_memories,coraline_delete_memory,coraline_edit_memory(regex + literal modes) - TOML configuration —
.coraline/config.tomlwith sections for indexing, context, sync, and vectors; written as a commented template oncoraline init - Structured logging —
tracingwith daily-rotating file appender to.coraline/logs/coraline.log; level viaCORALINE_LOGenv var - Framework-specific resolvers — Rust, React, Blazor, Laravel
- CLI commands —
callers,callees,impact,config,stats,embed;--jsonflag on all query commands - Criterion benchmark suite — 9 benchmarks across indexing, search, graph traversal, and context building groups (
cargo bench --bench indexing) - CI/CD — GitHub Actions for multiplatform builds (Linux x86_64/ARM64, macOS x86_64/ARM64, Windows x86_64), crates.io publishing, CodeQL scanning, daily dependency auditing
- 28+ language support via tree-sitter: Rust, TypeScript, JavaScript, TSX, JSX, Python, Go, Java, C, C++, C#, PHP, Ruby, Swift, Kotlin, Bash, Dart, Elixir, Elm, Erlang, Fortran, Groovy, Haskell, Julia, Lua, Markdown, MATLAB, Nix, Perl, PowerShell, R, Scala, TOML, YAML, Zig, Blazor
Fixed
- TypeScript import extraction:
import_statementwas wrongly mapped asimport_declarationin tree-sitter AST import_clauselookup: switched fromchild_by_field_name(alwaysNone) to child iteration- Cross-file import edges test:
SELECT *placed integeridat column 0; changed to explicitSELECT source, target - FTS multi-word search: now uses
ORlogic so partial matches are found - Glob pattern matching: completely rewritten using
globsetcrate; prior regex implementation was non-functional - Parallel indexing: CPU-bound parse phase separated from sequential DB writes; SQLite PRAGMA tuning (
synchronous=NORMAL, 64 MB cache, 256 MB mmap)
Changed
- Database filename:
codegraph.db→coraline.db - Project directory:
.codegraph/→.coraline/ - Post-commit git hook updated to check
.coraline/directory
0.1.3 - 2026-02-15
Added
coraline_statsMCP tool — graph statistics by language, node kind, and edge kind- TypeScript import extraction fix
Fixed
- Cross-file import edge detection
0.1.2 - 2026-02-13
Added
- PHP, Swift, Kotlin, Markdown, TOML parser support
- CI/CD infrastructure (GitHub Actions)
.coraline/directory rename from.codegraph/
Fixed
- Critical glob pattern matching bug (rewritten with
globset)
0.1.1 - 2026-02-10
Added
- Memory system with 5 MCP tools
- Tool abstraction layer and registry
- Integration test suite
0.1.0 - 2026-02-07
Added
- Initial release
- Tree-sitter based AST extraction for Rust, TypeScript, JavaScript, Python, Go, Java, C, C++, C#, Ruby
- SQLite graph storage
- MCP server (
coraline serve --mcp) - Basic CLI:
init,index,sync,status,query,context coraline_search,coraline_callers,coraline_callees,coraline_impact,coraline_contextMCP tools- Git post-commit hook integration