Skip to content

feat(cli): add cora trace and cora arch subcommands - #358

Merged
ajianaz merged 1 commit into
developfrom
feat/trace-arch-commands
Jul 22, 2026
Merged

feat(cli): add cora trace and cora arch subcommands#358
ajianaz merged 1 commit into
developfrom
feat/trace-arch-commands

Conversation

@ajianaz

Copy link
Copy Markdown
Collaborator

cora trace + cora arch subcommands

What

Two new CLI commands that leverage the graph database (schema v3) built in Phase 2.

cora trace <symbol>

  • BFS path tracing through the codebase
  • --direction outgoing (default): follows what the symbol calls
  • --direction incoming: follows what calls the symbol
  • --depth N: max hops (default 3)
  • --json: structured output
  • Uses edges table (typed: CALLS, IMPORTS, IMPLEMENTS...) with call_graph fallback

cora arch

  • Architecture overview: modules by symbol count
  • Edge type distribution (CALLS, IMPORTS, etc.)
  • --json: structured output

Testing

  • 3 new unit tests: trace outgoing, trace incoming, arch overview
  • 708 total tests pass, 0 clippy warnings
  • Manual test on cora-code repo: 1695 symbols, 5358 CALLS edges across 109 files

Example

$ cora arch
MODULE SYMBOLS EDGE TYPES
src 1663 7
tests 25 1
EDGE DISTRIBUTION
CALLS 5358
$ cora trace open_global_index --depth 2
depth 1
data_dir::graph_db_path [CALLS] src/index/mod.rs:31
schema::run_migrations [CALLS] src/index/mod.rs:35
depth 2
...

- cora trace <symbol>: BFS path tracing with --direction (outgoing/incoming)
and --depth control. Uses edges table (typed) with call_graph fallback.
- cora arch: Architecture overview showing module symbol counts,
edge type distribution.
- 3 new graph tests (trace outgoing/incoming, arch overview).
- 708 tests pass, 0 clippy warnings.
@ajianaz
ajianaz merged commit fcc085e into developJul 22, 2026
10 checks passed
@ajianaz
ajianaz deleted the feat/trace-arch-commands branch July 22, 2026 15:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@ajianaz