CodeArchy

v0.2.0
io.github.CodeArchy/codearchy Checked 4 hours ago Published 5 hours ago

Your codebase’s architecture for your AI agent: map, search, dependencies, request flows, code.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

overview Architecture overview

The system at a glance: its top-level parts (packages and components) with their keys and summaries, and index stats. Start here.

get_node Describe a node

One node's summary card, children, symbols (for a file) and strongest dependencies either way.

ParameterTypeDescription
key *stringA node key from another tool

neighbors Dependencies of a node

What a node depends on ("out") or what depends on it ("in"), with weights. depth 2 follows one more step.

ParameterTypeDescription
key *string
depthinteger
directionstring

explain_edge Explain a dependency

The file-level dependencies and import sites behind a dependency from one node to another.

ParameterTypeDescription
source *string
target *string

find_flows Entrypoints and flows

Entrypoints (HTTP routes, CLI commands, jobs and listeners, UI routes, main) and what each does. Without id: the entrypoints matching query or kind. With id: that flow traced: the calls in order (each with the step that called it), the parts it passes through, and what it reaches (databases, HTTP APIs, queues). Use it for "what happens when…" questions.

ParameterTypeDescription
idstringA flow id from a previous find_flows call: trace it
kindstring
querystringWords in the route, command or file, e.g. "login" or "POST orders"

find_risks Where the risk is

Where the risk is, from git history and the graph (no guesses). kind "ai": unreviewed AI-written code, raised by recent churn, no test file importing it directly and no active owner. "knowledge": code only one person knows, or whose authors have stopped committing (bus factor). "hotspot": big files that change often. Without key: the riskiest files in scope (default the whole system), each with why and one suggested action. With key: that node's factors and evidence. People are never named.

ParameterTypeDescription
keystringA node key: explain that node's risk instead of listing
kindstringWhich risk (default "ai")
scopestringA node key to look inside (default: the whole system)

read_code Read source lines

Read lines of an indexed source file (1-based, at most 120 lines per call). Use it to confirm details the summaries don't settle.

ParameterTypeDescription
endLine *integer
path *string
startLine *integer