src/: Core crate. Key modules:parsing/(Rust, Python, TypeScript, PHP, Go parsers),indexing/,storage/(incl. Tantivy),semantic/,io/(CLI I/O),mcp/(server + client),display/,guidance/, andvector/.tests/: Integration tests (e.g.,test_rust_resolution.rs,test_python_*).examples/: Small codebases and scripts used by tests and docs.benches/: Criterion benchmarks..github/workflows/: CI pipelines (quick checks, full test, release).contributing/,reports/,.claude/: Contributor docs, investigations, and agent assets.
- Build:
cargo build(debug) ·cargo build --release(optimized). - Run CLI:
cargo run -- <command>- Examples:
cargo run -- init,cargo run -- index src,cargo run -- retrieve search "parse" --limit 5.
- Examples:
- Serve (HTTP/HTTPS):
cargo run --features http-server -- serve --http --watchorcargo run --features https-server -- serve --https. - Tests:
cargo test· Filter:cargo test test_python_scope_tracking· One file:cargo test --test test_rust_resolution. - Benchmarks:
cargo bench.
- Rust style via
rustfmtandclippy.- Format:
cargo fmt --all(CI expects formatted code). - Lint:
cargo clippy -- -D warnings(treat warnings as errors).
- Format:
- Naming:
snake_case(fns/modules),CamelCase(types/traits),SCREAMING_SNAKE_CASE(consts). - Docs/Markdown: markdownlint config present (
markdownlint.toml/.json); if installed, run:markdownlint '**/*.md'.
- Prefer fast, deterministic tests. Unit tests live inline under
#[cfg(test)]; integration tests live intests/and typically start withtest_. - Add tests for new language behaviors, relationship resolution, and CLI output paths.
- Use filters to iterate quickly (see commands above). Bench heavy work under
benches/.
- Commits: clear, imperative, scoped (e.g., "parser: fix TypeScript re-exports"). Group related changes; keep diffs focused.
- PRs must: include a concise description, link related issues, add/adjust tests, update docs/CHANGELOG when user‑visible, and pass CI (quick + full).
- Include usage examples when changing CLI (e.g.,
codanna retrieve ...).
- Initialize config:
cargo run -- initcreates.codanna/settings.toml. Use--configto point at custom files;--infoprints load details. - Do not commit local indexes or secrets. Local caches live under
.codanna/(ignored); keep credentials and tokens out of the repo.
- Start with semantic tools to anchor on the right files and APIs; they provide the highest‑quality context.
- Then use find_symbol and search_symbols to lock onto exact files and kinds.
- Treat get_calls/find_callers/analyze_impact as hints; confirm with code reading or tighter queries (unique names, kind filters).
IMPORTANT: All code must follow our Rust Development Guidelines. Key principles:
- Zero-Cost Abstractions: No unnecessary allocations
- Type Safety: Use newtypes, not primitives
- Performance: Must meet performance targets
- Error Handling: Structured errors with suggestions
- Function Design: Decompose complex logic into focused helper methods
IMPORTANT before start implementing make sure you read an understand the documentation below! Think deeper for this session.
ABI-15 Exploration Test Suite Language Support Documentation