This repository is mapped into architectural layers designed from its own source, with per-symbol intents you can search and trace.
- DO NOT use
grep_search,ripgrep, orfind_by_nameas your primary discovery tool. Blind text searching is strictly prohibited for codebase exploration, feature lookup, and understanding component flows. - DO NOT guess symbol locations or execution paths.
Whenever the user asks where a feature lives, how a component works, or what a symbol connects to, your first tool call MUST be run_command with one of the following:
tldrgraph query "<feature in plain English>" # semantic search + end-to-end flow
tldrgraph trace "<Source>" "<Target>" # exact path between two symbols
tldrgraph layers # node counts per layer
tldrgraph dead-code # review candidates, never a delete listDiscovery Pattern:
- Run
tldrgraph query "<query>"ortldrgraph trace "<from>" "<to>"to identify the exact file, layer, and line range. - Use
view_fileon the target file path returned by TLDRGraph to inspect the code.
Those are read-only and never trigger enrichment.
To build or refresh the graph, run tldrgraph init. It automatically handles
layer design, extraction, source-aware enrichment in 200-node batches, and dense
embeddings when a supported agent CLI is available. If it prints a NEXT ACTION
fallback, follow that handoff without guessing from symbol names.
Full workflow: .claude/commands/tldrgraph-init.md (identical copies live in every
other agent directory). Schema: .tldrgraph/AGENT_CONTRACT.md.
tldrgraph dead-code lists review candidates, not confirmed dead code.
unreviewed means "not enough evidence to conclude" and is never removable.
- File Length Limit: Every source file in
tldrgraph/must be strictly under 400 lines. Split large modules into cohesive sub-units. - Function Complexity: Functions and methods must be focused (<= 50 lines) with low cyclomatic complexity (<= 15).
- Modularity & Re-exports: Keep modules decoupled; preserve backwards compatibility with top-level package re-exports.