-
Notifications
You must be signed in to change notification settings - Fork 1
Features
CKB (Code Knowledge Backend) gives AI assistants deep understanding of your codebase. This guide organizes all features by what you can accomplish rather than by version or implementation.
Scenario: You just joined a team or opened an unfamiliar repo.
| Task | How CKB Helps |
|---|---|
| "What does this codebase do?" |
ckb arch shows module structure and dependencies |
| "Where's the main entry point?" |
ckb entrypoints lists API handlers, CLI commands, jobs |
| "What are the key concepts?" |
ckb concepts surfaces important domain patterns |
| "Who owns this code?" |
ckb ownership <file> shows CODEOWNERS + recent contributors |
Scenario: You need to rename, move, or delete code without breaking things.
| Task | How CKB Helps |
|---|---|
| "What breaks if I change this?" |
ckb impact <symbol> shows all callers and blast radius |
| "Is this code safe to delete?" |
ckb justify <symbol> gives keep/investigate/remove verdict |
| "What tests should I run?" |
ckb affected-tests finds tests covering your changes |
| "Is my refactor risky?" |
ckb impact diff analyzes uncommitted changes |
Scenario: You're reviewing a PR or preparing one for review.
| Task | How CKB Helps |
|---|---|
| "Who should review this?" |
ckb reviewers suggests reviewers from CODEOWNERS + git history |
| "How risky is this PR?" |
ckb pr-summary gives risk assessment with impact analysis |
| "What's the blast radius?" |
ckb impact diff --base=main shows downstream effects |
Scenario: Your test suite takes 30 minutes but you only changed one file.
| Task | How CKB Helps |
|---|---|
| Run only affected tests |
ckb affected-tests --output=command generates test command |
| Skip if index is fresh |
ckb index --if-stale=24h in CI avoids redundant work |
| Incremental indexing | Only changed files reindexed (Go projects) |
Scenario: You have limited time—what should you fix first?
| Task | How CKB Helps |
|---|---|
| Find highest-risk code |
ckb hotspots shows high-churn + high-complexity files |
| Get quick wins |
ckb audit --quick-wins finds high-impact, low-effort fixes |
| Find dead code |
ckb dead-code identifies unused symbols |
| Find hidden coupling |
ckb coupling <file> shows files that change together |
Scenario: Your docs reference code that no longer exists.
| Task | How CKB Helps |
|---|---|
| Find stale docs |
ckb docs stale --all finds broken symbol references |
| Check coverage |
ckb docs coverage shows what % of code is documented |
| Link docs to code |
ckb docs symbol <name> finds docs mentioning a symbol |
Scenario: You're changing an API used by other services.
| Task | How CKB Helps |
|---|---|
| Find API consumers |
ckb contracts impact <proto> shows who uses your API |
| Search across repos |
ckb federation search-modules <query> searches all repos |
| Aggregate hotspots |
ckb federation hotspots shows volatility across services |
Scenario: You're using Claude, Cursor, or another AI coding tool.
| Task | How CKB Helps |
|---|---|
| Give AI context | CKB provides semantic code understanding via MCP |
| Reduce token usage | Presets expose only needed tools (~2k vs 9k tokens) |
| Keep AI accurate | Index freshness ensures AI sees current code |
CKB's MCP integration means your AI assistant can answer questions like:
- "What will break if I rename UserService?"
- "Find all places that handle authentication"
- "Who should review changes to the payment module?"
Jump to any feature:
| Category | Key Features | Best For |
|---|---|---|
| Code Navigation | Symbol Search · Call Graph · Trace Usage · Entrypoints | Finding and understanding code |
| Impact Analysis | Blast Radius · Change Impact · Affected Tests · Risk Scoring · Hotspots · PR Summary | Safe refactoring and changes |
| Architecture | Module Overview · ADRs · Explain Origin | Understanding system design |
| Ownership | CODEOWNERS · Ownership Drift · Reviewer Suggestions | Code review and accountability |
| Code Quality | Dead Code · Coupling · Justify Symbol · Quick Wins | Technical debt reduction |
| Documentation | Doc-Symbol Linking · Staleness Detection · Coverage | Keeping docs accurate |
| Multi-Repo | Federation · Contracts · Remote Serving | Cross-repo visibility |
| Runtime | Telemetry · Observed Usage · Production Dead Code | Production insights |
| Automation | Daemon · Watch Mode · Webhooks · Incremental Index | CI/CD integration |
| System Health | Enhanced Status · Reindex · Error Codes · Breaking Changes · Compound Tools | Reliability & diagnostics |
The Problem: In large codebases, developers spend 60%+ of their time reading and understanding code. AI assistants make this worse by guessing at code structure, returning text matches instead of semantic results, and missing cross-file relationships.
The Solution: CKB provides semantic code navigation—find any symbol instantly, trace how code flows through your system, and understand what matters without reading every file.
- Onboarding to a new codebase
- Understanding unfamiliar code before modifying it
- Finding all the places that use a particular function
- Tracing how a request flows through your system
- Identifying the main entry points of an application
Find functions, types, interfaces, and variables by name with semantic understanding.
ckb search "Handler" # Find all Handler-related symbols
ckb search "User" --kind=type # Find only typesValue: Unlike grep, this finds semantic matches—UserHandler when you search "Handler", even if "Handler" isn't a substring.
All places a symbol is used across your entire codebase.
ckb refs "internal/api.HandleRequest"Value: Returns semantic references, not text matches. Won't match comments or strings containing the same text.
See who calls a function and what it calls—the backbone of impact analysis.
ckb callgraph "ProcessPayment" --depth=2Value: Understand the dependency chain. If ProcessPayment fails, what else breaks?
How is this symbol reached from system entry points?
ckb trace "sendEmail"Value: Answers "How does a user action eventually trigger this code?" Shows the path from API handlers, CLI commands, or background jobs.
API handlers, CLI commands, scheduled jobs, event handlers.
ckb entrypointsValue: Quickly understand what your application actually does—its public surface area.
The most important symbols and patterns in the codebase.
ckb conceptsValue: Get oriented in an unfamiliar codebase. Surfaces the domain concepts that matter most.
Understand why a file or directory exists.
Value: "What is internal/adapters/ for?" Get architectural context without reading every file.
What files and symbols have been active lately?
Value: Focus on what matters now, not ancient code nobody touches.
CKB uses a backend ladder for queries:
- SCIP — Pre-computed index (fastest, most accurate)
- LSP — Language server (real-time, slightly slower)
- Git — Fallback for basic operations
Hybrid Retrieval (v7.4): Search combines text matching with graph-based ranking (Personalized PageRank) to surface structurally related symbols, achieving 100% recall on benchmarks.
"Find all functions that handle HTTP requests" "Show me the call graph for
ProcessPayment" "What code paths lead tosendEmail?" "List the main entry points in this service" "What are the key domain concepts in this codebase?"
See also: User-Guide#cli-commands, Hybrid-Retrieval
The Problem: Refactoring is risky. A "simple rename" can break production. Developers either avoid changes (accumulating tech debt) or make changes blind (causing incidents).
The Solution: CKB tells you exactly what will break before you change it. Know the blast radius, understand the risk, and make informed decisions.
- Before refactoring any code
- Reviewing pull requests
- Deciding whether to delete "dead" code
- Prioritizing which tech debt to pay down
- Assessing risk of a change
The blast radius of changing a symbol—who depends on it?
ckb impact "UserService.Authenticate"Value: Shows all callers across all modules, with module spread and risk score. A function called from 1 place is safe to change; one called from 47 places across 12 modules needs careful planning.
v7.6 Enhancements:
- Transitive callers: See not just direct callers, but callers-of-callers up to depth 4
- Blast radius summary: Quick metrics—module count, file count, unique callers, risk level
- Confidence scoring: Decreasing confidence at deeper levels (0.85 → 0.75 → 0.65)
| Blast Radius Level | Criteria |
|---|---|
| Low | ≤2 modules AND ≤5 callers |
| Medium | 3-5 modules OR 6-20 callers |
| High | >5 modules OR >20 callers |
Analyze the impact of code changes from git diffs before committing.
# Analyze current working tree changes
ckb impact diff
# Analyze only staged changes
ckb impact diff --staged
# Compare against a different branch
ckb impact diff --base=main
# Deeper transitive analysis
ckb impact diff --depth=3Value: Understand what downstream code might break before you push. Maps changed lines to SCIP symbols and runs impact analysis on each.
Key Features:
- Confidence scoring: 1.0 (exact definition), 0.8 (body change), 0.7 (reference), 0.3 (file-level)
- Aggregated risk: Weighted factors—symbols changed (20%), direct impact (30%), transitive impact (20%), module spread (30%)
-
Staleness detection: Warns when SCIP index is behind HEAD; use
--strictto fail - Recommendations: Actionable suggestions (review, test, split) based on analysis
-
Coverage configuration (v7.5): Configure custom coverage paths in
.ckb/config.json
See: Impact-Analysis for full documentation.
Multi-factor risk scoring based on 8 weighted signals.
ckb audit "internal/payments"
ckb audit --quick-wins # High-impact, low-risk improvementsValue: Prioritize what to fix. Don't refactor randomly—fix the highest-risk code first.
| Factor | Weight | Description |
|---|---|---|
| Complexity | 20% | Cyclomatic/cognitive complexity |
| Test Coverage | 20% | Lack of test coverage |
| Bus Factor | 15% | Single-author code |
| Security | 15% | Handles auth, crypto, PII |
| Staleness | 10% | Not touched in 6+ months |
| Error Rate | 10% | Runtime error frequency |
| Coupling | 5% | High co-change coupling |
| Churn | 5% | Frequent modifications |
High-churn + high-complexity files—where bugs hide.
ckb hotspots
ckb hotspots --trend # Show 30-day trendValue: Research shows hotspots predict future bugs. Fix these first.
What changed in a diff and what might break?
ckb diff-summary HEAD~1..HEADValue: Quick risk assessment of any commit or range of commits.
Pull request analysis with risk assessment and reviewer suggestions.
ckb pr-summary --base=main --head=feature-branchValue: Automated first-pass code review. Catches risky changes before humans review.
Find which tests to run based on your code changes.
ckb affected-tests # Tests for uncommitted changes
ckb affected-tests --format=list # One test per line (for CI)
ckb affected-tests --output=command # Ready-to-run command
ckb affected-tests --strategy=safe # Include transitive tests (default)Value: Dramatically reduce CI time by running only relevant tests. Maps changed symbols to test files via SCIP and coverage data.
Strategies:
| Strategy | Description |
|---|---|
precise |
Only tests directly covering changed lines |
safe |
Include transitive tests (default) |
full |
All tests in affected packages |
See also: Impact-Analysis#affected-tests-v75
Detect signature or contract changes that break callers.
ckb impact "MyAPI" --breakingValue: Find changes that require updating callers—before you merge.
"What will break if I rename
UserService?" "Analyze the risk of this PR" "Which tests should I run for my changes?" "Which files are the most dangerous to change?" "Is it safe to deletelegacyHandler?" "Give me quick wins for reducing technical debt"
See also: User-Guide#ckb-impact, User-Guide#ckb-audit
The Problem: Architecture knowledge lives in people's heads. When they leave, it's lost. New developers can't understand why code is structured the way it is. "Why did we choose Redis?" has no written answer.
The Solution: CKB captures and surfaces architectural knowledge—module boundaries, responsibilities, and decision records (ADRs). Architecture becomes queryable.
- Onboarding new team members
- Understanding why past decisions were made
- Documenting new architectural decisions
- Reviewing module boundaries and responsibilities
- Explaining unfamiliar code to AI assistants
High-level structure showing module dependencies.
ckb archValue: Get a map of the system in seconds. See how modules connect without reading every import statement.
Boundaries, responsibilities, and owners for any module.
ckb modules
ckb modules internal/authValue: Understand what a module is supposed to do, not just what files it contains.
What each module is responsible for.
Value: "What does the internal/events module handle?" Get a concise answer.
Document and query important architectural choices.
# Create an ADR
ckb decisions create \
--title "Use Redis for caching" \
--context "User sessions need fast access" \
--decision "Redis with 1-hour TTL" \
--module internal/cache
# Query ADRs
ckb decisions --search "caching"Value: Architecture decisions survive team changes. "Why Redis?" has a searchable answer. ADRs automatically surface in explain, justify, and impact commands.
Full context for any symbol—origin, evolution, warnings.
ckb explain "LegacyParser"Value: Understand not just what code does, but why it exists and whether it's safe to touch.
Trace history through renames and moves.
ckb origin "CurrentName"Value: "This was called X before, renamed in commit Y by Z for reason W."
"Give me an architecture overview" "What is the
internal/authmodule responsible for?" "Why was Redis chosen for caching?" "Explain whyLegacyParserexists and who added it" "What architectural decisions affect the payment system?"
See also: Configuration#architectural-decision-records, User-Guide#ckb-decisions
The Problem: Code reviews are slow because finding the right reviewer is hard. CODEOWNERS files get stale. The person who "owns" code in CODEOWNERS hasn't touched it in 2 years.
The Solution: CKB combines explicit ownership (CODEOWNERS) with actual git history to find who really owns code and who should review changes.
- Finding the right reviewer for a PR
- Identifying who to ask about unfamiliar code
- Detecting ownership drift (CODEOWNERS vs reality)
- Understanding team boundaries
Who owns this code? Combines CODEOWNERS with git blame.
ckb ownership internal/api/handler.go
ckb ownership --module internal/authValue: Get the real owner, not just what CODEOWNERS says. Time-weighted blame gives higher weight to recent contributors.
When CODEOWNERS doesn't match reality.
ckb ownership-driftValue: Keep CODEOWNERS accurate. Find modules where the listed owner hasn't contributed in months.
Who should review this change?
Built into summarizePr—automatically suggests reviewers based on:
- CODEOWNERS rules
- Recent contributors to affected files
- Module expertise
Value: Stop guessing who should review. Get data-driven suggestions.
Who has been active in this area?
ckb recent internal/paymentsValue: Find the people who actually know this code right now.
CKB combines multiple signals:
- CODEOWNERS — Explicit ownership rules (100% confidence)
- Git Blame — Weighted by recency, filters bot commits
- Commit History — Active contributors in time window
"Who owns the authentication code?" "Who should review changes to
payment/processor.go?" "Has ownership of the API layer changed recently?" "Who has been working on the search module?"
See also: User-Guide#ckb-ownership
The Problem: Technical debt accumulates invisibly. Teams don't know which code is most dangerous. Dead code lingers forever. Refactoring efforts are scattered and unfocused.
The Solution: CKB quantifies code quality—find hotspots, detect dead code, analyze coupling, and prioritize improvements based on data.
- Planning refactoring efforts
- Deciding what to delete
- Finding high-risk code before it causes problems
- Prioritizing tech debt reduction
- Preparing codebase for new developers
Files with high churn AND high complexity—where bugs live.
ckb hotspots
ckb hotspots --trend # 30-day projectionValue: Research shows hotspots predict 70%+ of future defects. Fix these first.
Cyclomatic and cognitive complexity per file.
ckb complexity internal/query/engine.goValue: Find files that are too complex to maintain safely.
Files that change together—hidden dependencies.
ckb coupling internal/query/engine.go --min-correlation=0.5Value: High coupling means changes ripple unexpectedly. These are refactoring candidates.
Code with no references (static) or no runtime calls (with telemetry).
ckb dead-code
ckb dead-code --min-confidence=0.8Value: Delete code safely. Less code = fewer bugs, faster builds, easier onboarding.
Keep, investigate, or remove? A verdict for any symbol.
ckb justify "oldHelper"Returns one of:
- keep — Has references, is entrypoint, or has ADR justifying it
- investigate — Unclear, needs human review
- remove — No references, no runtime usage, safe to delete
Value: Don't guess about dead code. Get a data-driven verdict.
High-impact, low-risk improvements.
ckb audit --quick-winsValue: Get immediate ROI from refactoring. Fix the easy things first.
LLM-optimized codebase export with importance ranking.
ckb export --min-complexity=10 --max-symbols=200Value: Feed your AI assistant the most important symbols, not random files.
"What are the top hotspots in this codebase?" "Is
oldHelperstill used anywhere?" "Which files always change together?" "Give me quick wins for reducing technical debt" "What code can I safely delete?"
See also: User-Guide#ckb-hotspots, User-Guide#ckb-justify, Telemetry
The Problem: Documentation lies. Code changes, docs don't. References to OldClassName stay in docs forever. There's no way to know if docs are accurate.
The Solution: CKB links documentation to code symbols and detects when references become stale. Enforce documentation coverage in CI.
- Maintaining API documentation
- Finding docs that reference specific code
- Detecting outdated documentation
- Enforcing documentation standards in CI
- Keeping READMEs accurate
Connect documentation to code symbols automatically.
ckb docs indexValue: CKB scans your markdown for code references and links them to actual symbols.
Detection methods:
-
Backticks:
UserService.Authenticatein markdown -
Directives:
<!-- ckb:symbol internal.auth.UserService --> - Fenced Code: Parses code blocks in 8 languages
What documentation mentions this code?
ckb docs symbol "Engine.Start"Value: "Is this function documented anywhere?" Get an instant answer.
What code does this document reference?
ckb docs file README.mdValue: See all the code symbols a document claims to document.
Find documentation with broken or renamed symbol references.
ckb docs stale
ckb docs stale README.mdValue: Find docs that lie. If a symbol was renamed, CKB tells you the new name.
Documentation coverage statistics.
ckb docs coverage
ckb docs coverage --fail-under=80 # CI enforcementValue: Track and enforce documentation standards.
"What documentation mentions
Engine.Start?" "Are there any stale references in our README?" "What's our documentation coverage?" "Which symbols are completely undocumented?"
See also: Doc-Symbol-Linking
The Problem: Microservices and monorepos create silos. You can't search across repos. API changes in one repo break consumers in another. There's no cross-repo visibility.
The Solution: CKB federation provides unified search and analysis across multiple repositories. Find symbols, trace contracts, and analyze impact organization-wide.
- Searching across all your microservices
- Understanding API consumers before changing contracts
- Finding hotspots across an entire platform
- Serving indexes to remote teams
- Managing multiple local repositories
Create and manage collections of repositories.
ckb federation create platform --description "Our microservices"
ckb federation add platform --repo-id=api --path=/code/api
ckb federation sync platformValue: Query across all repos as if they were one codebase.
Search modules, ownership, and decisions across all federated repos.
Value: "Find all authentication modules across our microservices"—answered in seconds.
Aggregated hotspots across all repositories.
ckb federation hotspots platformValue: See which repos and files are most volatile across your entire platform.
Find Protocol Buffer and OpenAPI contracts.
ckb contracts list platform| Type | Extensions | Detection |
|---|---|---|
| Protocol Buffers | .proto |
Package, imports, services |
| OpenAPI |
.yaml, .json
|
Paths, servers, version |
Value: Know what APIs exist across your organization.
What breaks if you change an API?
ckb contracts impact platform --repo=api --path=proto/user.protoValue: Before changing a proto, know all consumers—direct and transitive.
Serve indexes over HTTP for remote clients.
ckb serve --index-server --index-config config.tomlValue: Central teams can serve indexes to the entire organization.
Query remote CKB servers alongside local repos.
ckb federation add-remote platform prod --url=https://ckb.company.com
ckb federation search-hybrid platform "Handler"Value: Distributed code intelligence—query across teams without sharing databases.
Register and switch between local repositories.
ckb repo add api /code/api
ckb repo add frontend /code/frontend
ckb mcp --repo=apiValue: Manage multiple projects without changing directories.
"Find all authentication modules across our microservices" "What services consume the User API?" "Show hotspots across all backend repos" "Who should I notify before changing
user.proto?"
See also: Federation, Configuration#index-server-configuration-v73, Authentication
The Problem: Static analysis can't tell you what code actually runs in production. You might delete "dead" code that's actually called by a critical cron job. Impact analysis misses runtime call patterns.
The Solution: CKB integrates with OpenTelemetry to ingest production call data. Know which functions are actually called, how often, and by whom.
- Finding truly dead code (never called in production)
- Enriching impact analysis with production data
- Understanding which code paths are critical
- Validating static analysis with runtime reality
Ingest OTLP metrics from your production systems.
ckb telemetry statusValue: Connect production behavior to code understanding.
Map service names to repositories.
{
"telemetry": {
"serviceMap": {
"api-gateway": "repo-api",
"user-service": "repo-users"
}
}
}Value: CKB knows that calls to "api-gateway" map to the "repo-api" codebase.
Which functions are actually called in production?
ckb telemetry usage --symbol="HandleRequest"Value: See real call counts, not just static analysis guesses.
Find code that's never called in production.
ckb dead-code --source=telemetryValue: Delete with confidence. If telemetry says it's never called, it's really dead.
How much of your code has telemetry coverage?
| Level | Score | Feature Access |
|---|---|---|
| High | ≥ 0.80 | Full: dead code, impact enrichment |
| Medium | ≥ 0.60 | Partial: with warnings |
| Low | ≥ 0.40 | Limited: usage display only |
| Insufficient | < 0.40 | None: telemetry features disabled |
"Is
legacyEndpointactually used in production?" "What's our telemetry coverage?" "Find functions that haven't been called in 30 days" "Which endpoints are most heavily used?"
See also: Telemetry, Configuration#telemetry-v64
The Problem: Manual index updates are forgotten. Stale indexes give wrong answers. PR analysis is manual and inconsistent. There's no automation.
The Solution: CKB runs as a service with automatic updates, scheduled tasks, webhooks, and CI integration.
- Keeping indexes fresh automatically
- Running CKB as an always-on service
- Integrating with CI/CD pipelines
- Automating PR analysis
- Triggering reindexing from webhooks
Run CKB as an always-on service.
ckb daemon start
ckb daemon status
ckb daemon stopValue: Background service with HTTP API, scheduled tasks, and file watching.
Auto-reindex when files change.
ckb mcp --watch # During AI sessions
ckb index --watch # StandaloneValue: Never have a stale index. Changes are detected and indexed automatically.
Trigger reindexing via HTTP.
curl -X POST http://localhost:9120/api/v1/refreshValue: CI/CD can trigger reindexing after each merge.
Cron-style task scheduling.
ckb daemon schedule "0 */6 * * *" "ckb index"Value: Regular maintenance without manual intervention.
Notify external systems on events.
Value: Trigger downstream actions when indexes update, decisions change, etc.
Scoped API tokens for secure access.
ckb token create --name "CI" --scopes write
ckb token revoke ckb_key_xxxValue: Secure multi-tenant access with rate limiting.
Automatic update checking for all installation methods.
╭─────────────────────────────────────────────────────╮
│ Update available: 7.3.0 → 7.4.0 │
│ Run: npm update -g @tastehub/ckb │
╰─────────────────────────────────────────────────────╯
Value: Never miss updates. Shows at command start from 24-hour cache. Disable with CKB_NO_UPDATE_CHECK=1.
ckb doctor detects indexes pointing to repos that no longer exist.
ckb doctor
# ✓ orphaned-indexes: Index cache: 234 MB (12 repos), 2 orphaned
# → ckb cache clean --orphanedValue: Clean up stale index data after moving or deleting projects.
Fast updates—only reindex changed files (Go only).
| Scenario | Full Index | Incremental |
|---|---|---|
| 10,000 files | ~60s | ~2-5s |
| Single file change | ~60s | ~1s |
Value: Keep indexes fresh without waiting minutes for each update.
Automated risk assessment in CI.
- name: Analyze PR
run: |
ckb index
ckb pr-summary --base=main --head=${{ github.head_ref }}Value: Catch risky changes before human review. Automate first-pass analysis.
name: CKB Analysis
on: [pull_request]
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for blame
- name: Install CKB
run: npm install -g @tastehub/ckb
- name: Index
run: ckb index
- name: Analyze PR
run: ckb pr-summary --base=mainSee also: Daemon-Mode, CI-CD-Integration, Incremental-Indexing, Authentication
The Problem: MCP tool definitions consume tokens. Some servers use 50-80k tokens just for tool definitions before you ask a single question.
The Solution: CKB uses presets—load only the tools you need. Start with 14 core tools (~2k tokens) and expand dynamically.
| Preset | Tools | Tokens | Best For |
|---|---|---|---|
core |
14 | ~2k | General development (default) |
review |
19 | ~2k | PR reviews, ownership |
refactor |
19 | ~2k | Refactoring, dead code |
docs |
20 | ~2k | Documentation maintenance |
ops |
25 | ~2k | CKB administration |
federation |
28 | ~3k | Multi-repo work |
full |
81 | ~9k | Everything |
ckb mcp --preset=review
ckb mcp --list-presetsStart with core and let the AI expand mid-session:
{
"name": "expandToolset",
"arguments": {
"preset": "federation",
"reason": "User asked about cross-repository dependencies"
}
}Value: 83% token savings while maintaining full functionality.
See also: Presets, MCP-Integration
CKB operates in three tiers based on available backends:
| Tier | Requirements | Features |
|---|---|---|
| Fast | None | Tree-sitter parsing, basic search |
| Standard | SCIP index | Full cross-references, call graphs |
| Full | SCIP + Telemetry | Runtime usage, dead code detection |
ckb search "Handler" --tier=fast
export CKB_TIER=standard
ckb doctor --tier=standardSee also: User-Guide#analysis-tiers-v72, Practical-Limits
The Problem: When CKB returns incomplete or stale results, it's not always clear why. Is the index outdated? Is a backend unavailable? What should you do to fix it?
The Solution: v8.0 focuses on reliability and error clarity—every response includes health context, and every error includes actionable remediation.
The getStatus tool now provides comprehensive health information:
ckb statusReturns:
-
Backend health tiers:
available,degraded,unavailable - Remediation: Specific steps to fix unavailable backends
- Index freshness: Commits behind, stale detection
- Suggestions: Actionable next steps
Value: Know immediately why results might be incomplete and how to fix it.
Trigger index refresh without restarting CKB:
# Via MCP
{"tool": "reindex", "params": {"scope": "full"}}
# CLI
ckb indexScope options:
-
full— Reindex everything -
incremental— Only changed files (Go only)
Value: Keep indexes fresh during AI sessions without leaving your tool.
All errors include remediation guidance:
{
"code": "INDEX_STALE",
"message": "SCIP index is 5 commits behind HEAD",
"remediation": "Run 'ckb index' or use the reindex MCP tool",
"drilldowns": [{"tool": "getStatus", "reason": "Check full system status"}]
}Key error codes:
| Code | Description |
|---|---|
INDEX_STALE |
Index needs refresh |
BACKEND_UNAVAILABLE |
Backend not available |
AMBIGUOUS_QUERY |
Multiple symbols match |
PARTIAL_RESULT |
Incomplete but usable result |
Value: Never wonder why something failed. Every error tells you what to do.
Compare API versions to detect breaking changes:
ckb compare-api --base=main --head=featureValue: Catch signature changes, removed symbols, and contract breaks before merging.
v8.0 introduces compound tools that aggregate multiple granular queries, reducing AI tool calls by 60-70%:
| Tool | Replaces | Use Case |
|---|---|---|
explore |
explainFile + searchSymbols + getCallGraph + getHotspots | Initial codebase exploration |
understand |
searchSymbols + getSymbol + explainSymbol + findReferences + getCallGraph | Deep-dive into a symbol |
prepareChange |
analyzeImpact + getAffectedTests + analyzeCoupling | Pre-change risk assessment |
batchGet |
Multiple getSymbol calls | Fetch many symbols by ID |
batchSearch |
Multiple searchSymbols calls | Search for multiple patterns |
Example:
// Before: 4 separate tool calls
explainFile({ "filePath": "internal/query" })
searchSymbols({ "query": "Engine" })
getHotspots({ "scope": "internal/query" })
getCallGraph({ "symbolId": "..." })
// After: 1 compound call
explore({ "target": "internal/query", "depth": "standard" })Value: Faster AI workflows, lower token usage, comprehensive responses in single calls.
See also: MCP-Tools#compound-operations-v80, API-Reference#error-codes-v80, MCP-Tools#getStatus, MCP-Tools#reindex
CKB classifies languages into quality tiers:
| Tier | Quality | Languages |
|---|---|---|
| Tier 1 | Full support | Go |
| Tier 2 | Full support, minor edge cases | TypeScript, JavaScript, Python |
| Tier 3 | Basic support, callgraph may be incomplete | Rust, Java, Kotlin, C++, Ruby, Dart |
| Tier 4 | Experimental | C#, PHP |
Key limitations:
- Incremental indexing is Go-only
- TypeScript monorepos may need
--infer-tsconfig - C/C++ requires
compile_commands.json - Python works best with activated virtual environment
ckb doctor --tier standardSee also: Language-Support
CKB provides metadata about result quality.
| Tier | Score | Meaning |
|---|---|---|
| High | ≥ 0.95 | Fresh SCIP data, definitive |
| Medium | 0.70-0.94 | Good data, minor caveats |
| Low | 0.30-0.69 | Stale or incomplete data |
| Speculative | < 0.30 | Cross-repo or heuristic |
Results show which backends contributed:
-
scip— From SCIP index -
git— From git history -
lsp— From language server -
treesitter— From tree-sitter parsing
When results are truncated, CKB suggests follow-up queries:
{
"suggestedNextCalls": [
{
"tool": "findReferences",
"params": {"symbolId": "..."},
"reason": "47 references found, showing 10"
}
]
}See also: API-Reference
CKB is static analysis with optional runtime enrichment. It has known limitations:
| Limitation | Why | Workaround |
|---|---|---|
| Dynamic dispatch | Can't see runtime types | Check implementations manually |
| Generated code | May not be indexed | Regenerate before indexing |
| Cross-repo callers | Indexes one repo at a time | Use federation |
| Runtime behavior | Static analysis only | Use debugger/profiler |
| Code generation | Not CKB's job | Use AI assistant directly |
| Linting/formatting | Not CKB's job | Use ESLint, Prettier, etc. |
See also: Practical-Limits
# 1. Install
npm install -g @tastehub/ckb
# 2. Initialize
cd /your/project
ckb init
# 3. Index
ckb index
# 4. Configure AI tool
ckb setup --tool=claude-code
# 5. Start exploring
ckb arch
ckb search "Handler"
ckb hotspotsSee also: Quick-Start, User-Guide, MCP-Integration