Note: Looking for Tracy, the frame profiler? That's a different project: wolfpld/tracy
Spec coverage for codebases. Tracks traceability between requirements (in markdown or StrictDoc) and implementations/tests (in source code). Catches spec drift before it becomes a problem.
Specs, implementations, and tests drift apart — code changes without updating specs, specs describe unimplemented features, tests cover different scenarios than requirements specify.
Tracey uses lightweight annotations in source code comments to link specification requirements — written in markdown or StrictDoc (.sdoc) — with the implementing code and tests. This enables:
For the full specification, see docs/spec/tracey.md.
# Pre-built binary (fast, from GitHub Releases)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/bearcove/tracey/releases/latest/download/tracey-installer.sh | sh
# Or build from source (main branch)
cargo install --locked --git https://github.com/bearcove/tracey --branch main tracey
Pre-built binaries are available for aarch64-apple-darwin, aarch64-unknown-linux-gnu, x86_64-unknown-linux-gnu, x86_64-pc-windows-msvc, and aarch64-pc-windows-msvc.
Use the r[req.id] syntax to define requirements in a markdown specification document:
# Channel Management
r[channel.id.allocation]
Channel IDs MUST be allocated sequentially starting from 0.
r[channel.id.parity]
Client-initiated channels MUST use odd IDs, server-initiated channels MUST use even IDs.
The prefix (r in this case) can be any lowercase alphanumeric marker. Tracey infers it from the spec files.
Specs authored in StrictDoc (.sdoc) are loaded the same way — see Writing Specs for the syntax. Pick whichever format fits your project; they don't mix per spec.
Add references in source code comments using PREFIX[VERB REQ]:
// r[impl channel.id.allocation]
fn allocate_channel_id(&mut self) -> u32 {
let id = self.next_id;
self.next_id += 1;
id
}
// r[impl channel.id.parity]
fn next_client_channel(&mut self) -> u32 {
// ...
}
// In test files:
// r[verify channel.id.parity]
#[test]
fn client_channels_are_odd() {
// ...
}
Verbs:
| Verb | Meaning |
|---|---|
impl |
This code implements the requirement (default if verb omitted) |
verify |
This code tests/verifies the requirement |
depends |
This code depends on the requirement |
related |
This code is related to the requirement |
Create .config/tracey/config.styx:
specs (
{
name my-spec
include (docs/spec/**/*.md)
impls (
{
name rust
include (src/**/*.rs)
exclude (target/**)
test_include (tests/**/*.rs)
}
)
}
)
Config fields:
| Field | Description |
|---|---|
name |
Display name for the spec or implementation |
include |
Glob patterns for files to scan |
exclude |
Glob patterns for files to skip |
test_include |
Glob patterns for test files (only verify annotations allowed) |
source_url |
Canonical URL for the spec (e.g. a GitHub repository) |
tracey web
# or: tracey web --open (opens browser automatically)
Tracey runs as a persistent daemon per workspace. All interfaces (web dashboard, LSP, MCP, CLI queries) connect to the daemon over a Unix socket using roam RPC.
.tracey/daemon.sock
│
┌──────────────┼──────────────┐
▼ ▼ ▼
HTTP bridge MCP bridge LSP bridge
(dashboard) (stdio) (tower-lsp)
The daemon watches the filesystem, rebuilds on changes (debounced), and auto-exits after 10 minutes of inactivity. All bridges auto-start the daemon if it isn't running.
tracey web)Interactive browser UI with three views:
Supports Cmd+K / Ctrl+K search across all requirements.
tracey lsp)Full language server with:
Install the Zed extension or point any LSP-compatible editor at tracey lsp.
tracey ai)Set up AI assistants in one command:
tracey ai # register MCP + install skill for codex/claude
tracey ai --codex # codex only
tracey ai --claude # claude only
tracey mcp)Exposes tracey as an MCP tool server for AI assistants. Tools include tracey_status, tracey_uncovered, tracey_untested, tracey_stale, tracey_unmapped, tracey_rule, tracey_config, tracey_validate, and more.
tracey query)Same queries available from the terminal:
tracey query status # coverage overview
tracey query uncovered # rules with no impl references
tracey query untested # rules with impl but no verify references
tracey query stale # references pointing to older rule versions
tracey query unmapped # source tree with coverage percentages
tracey query rule auth.login # full details for a specific rule
tracey query validate # check for broken refs, naming issues
tracey query validate --deny warnings # also fail on warnings
tracey query validate exits non-zero on validation errors. Warnings are non-fatal by default, and become fatal only with --deny warnings.
tracey skill install)Bundled skill for Claude Code and Codex that teaches the AI how to add correct tracey annotations. Use this when you want to install or refresh the skill without touching MCP registration:
tracey skill install --claude # install to ~/.claude/skills/tracey
tracey skill install --codex # install to ~/.codex/skills/tracey
tracey pre-commit # fail if rule text changed without a version bump
tracey bump # auto-bump version numbers of changed rules, re-stage
Requirements support version suffixes for tracking spec evolution:
> r[auth.login+3]
> Users MUST authenticate with a valid token.
In code, references include the version they were written against:
// r[impl auth.login+3]
When spec text changes and the version is bumped to +4, tracey reports the +3 reference as stale — the code needs review to confirm it still matches the updated requirement. tracey bump automates the version bumping for staged changes.
Tracey scans comments in: Rust, Swift, TypeScript, TSX, JavaScript, JSX, Go, C, C++, Objective-C, Objective-C++, Java, Kotlin, Scala, Groovy, C#, Zig, PHP.
MIT OR Apache-2.0
$ claude mcp add tracey \
-- python -m otcore.mcp_server <graph>