AST Tool

septum_symbol

Locate symbols across languages, inspect bounded source or TypeScript references, and check static consumer hints.

septum_symbol handles symbol discovery, bounded declaration reading, and static impact exploration across indexed source files.


Actions

1. Locate (action: "locate", default)

Searches indexed declarations by name, container/member syntax (Class::method, obj->method, module.fn), or supported PHP/Python error traces:

{
  "action": "locate",
  "query": "OrderController::store"
}
  • Returns matching declaration coordinates (exact_symbol), container details, sibling methods, and a hash-bound symbol_ref.
  • When multiple declarations match, returns ambiguous candidates alongside symbol_ref identifiers so you can select the intended declaration explicitly.
  • Passing an empty query with file_path lists indexed declarations inside that file.
  • Symbols spanning more than 300 lines carry a complexity_smell flag (a line-count signal, not control-flow complexity).

2. Context (action: "context" or alias "inspect")

Retrieves declaration source and supporting context using one of two distinct engines:

Selection ConditionEngine
context_mode: "deep", or .ts/.mts/.cts target without bounded source optionsDeep TypeScript Context (referenced-typescript-declarations/v4) — selects target and supporting local/imported declarations and type contracts up to 3 import edges within budget_bytes. See Deep & Source Context.
context_mode: "source", non-TS extension, or include_source / source_start_line / source_line_limit suppliedBounded Source Inspection — reads up to 120 lines by default (capped at 200 lines) inside the declaration, verifying the current disk hash against the index (source_slice.status).

(Note: Deep mode rejects source_* options; Source mode rejects budget_bytes and continuation. When semantic_depth: 2 or short slices <= 15 lines are inspected in source mode, Septum may attempt heuristic 1-hop delegation expansion—treat delegated snippets as static hints rather than verified runtime callees.)

3. Impact (action: "impact")

Inspects static dependency hints for a declaration:

{
  "action": "impact",
  "query": "cancelOrder",
  "file_path": "src/orders/service.ts"
}
  • Separates import_dependents (files importing the target), call_sites (supported TypeScript/JavaScript import-bound calls), and legacy inbound_callers, plus resolution warnings.
  • Always marks coverage: "partial" and inbound_callers_complete: false along with an advisory risk rating (High, Medium, Low, Unknown) derived from distinct file/domain counts.

Freshness & Static Boundaries

  • Stale References Rejected: If a file on disk has changed since indexing, symbol_ref lookups and disk hash checks flag stale status and recommend septum sync.
  • Selected-Source Freshness ≠ Full Closure: A current file check verifies the selected file, not every transitive consumer across the workspace.
  • Static Discovery Is Not Runtime Proof: impact does not capture dynamic dispatch, reflection, or unindexed callers.