Skip to content

ADR-050: symbol-table read tools (get_file_outline, get_symbol_source, changed_symbols) - #94

Merged
ethanblauw-hub merged 6 commits into
masterfrom
feature/adr-050-symbol-tools
Nov 2, 2026
Merged

ethanblauw-hub merged 6 commits into
masterfrom
feature/adr-050-symbol-tools

Conversation

@ethanblauw-hub

Copy link
Copy Markdown
Collaborator

Adds three read-only tools that answer from the symbol table, and never serve code they can't confirm is current. See docs/adr/ADR-050-symbol-table-read-tools.md.

Open questions answered (@EDB, 2026-11-02, "all recommended"):

  1. A class with a changed method is refused, as built.
  2. The server instructions now say: "Call get_file_outline before Reading a whole file, and get_symbol_source for one function (indexed version)." The routing line lost its duplicate "and for the files your branch changed" (both branches already say it), to stay under the 1,000-character instructions budget.
  3. changed_symbols' description notes that files git ignores aren't diffed.
  4. No raw-diff mode.

Status set to accepted. Master (b0619f4) is merged in with no conflicts. It also merges cleanly with ADR-053's branch.

Checks, run locally on CPU (Windows, Python 3.14):

  • flake8 run as CI runs it, pytest --co, conformance_eval --check-baseline, resolution_eval --check-baseline and l5x_fixture_teeth --check all pass.
  • pytest: 971 passed, 2 skipped.
  • MCP Inspector 2.8.0 tools/list --strict: exit 0, 17 tools. Every tool except reindex declares readOnlyHint, the three new ones included. This closes the log's "once ADR-049 merges" item. A bad changed_symbols ref returns isError: true.

🤖 Generated with Claude Code

claude and others added 6 commits October 20, 2026 20:03
Proposed on its branch: answer B-017, B-016 and B-020 from the symbol
table, verify served text against the source the index was built from,
and diff with git against the merge base of a validated ref.

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-050]
has_files, get_file_record, find_file_paths, get_file_symbol_locations
and find_symbol_locations, appended to CodeDB for ADR-050's tools.
Locations are read through symbol_locations so a partial class lists
its part in each file.

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-050 src/db.py]
Three read tools that answer from the symbol table (B-017, B-016,
B-020). Symbol source is read through source.py from what the index was
built from (the indexed commit in git mode) and checked against the
stored text: served in place, served from its new lines when it moved,
or refused when it changed. changed_symbols validates the ref before
git sees it and diffs from the merge base to the indexed side.

test_index_state's registered-tool count moves from 14 to 17.

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-050 src/MCPServer.py]
Add get_file_outline, get_symbol_source and changed_symbols to the tool
lists in src/CLAUDE.md and README.md (17 tools). The ADR's log records
what the adapters store, the block-wise verification it led to, the
Inspector findings, test counts and open questions.

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-050 src/CLAUDE.md]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

[ADR-050 src/CLAUDE.md src/MCPServer.py src/adapters/__init__.py src/blas_threads.py src/call_resolver.py src/core.py src/db.py src/hybrid_retriever.py src/incremental_indexer.py src/iterative_retriever.py src/model_host.py src/redact.py src/scan_policy.py src/source.py src/summarizer.py src/tui/app.py]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

[ADR-050 src/MCPServer.py]
@ethanblauw-hub
ethanblauw-hub merged commit e042159 into master Nov 2, 2026
6 checks passed
Sign up for free to 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.

2 participants