Skip to content

Edit context resolves literal clues and returns matched source - #1332

Merged
zlareb1 merged 6 commits into
mainfrom
experiment/loom-edit-evidence
Nov 24, 2026
Merged

zlareb1 merged 6 commits into
mainfrom
experiment/loom-edit-evidence

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Changelog category

  • Improvement

Changelog entry

code.edit_context accepts literal clues in a known file and returns the matching implementation, indexed tests, and linked lessons in one call.

Why

An agent can know the file and the text it needs without knowing the declaration's name. A scoped edit lookup can locate that declaration and gather its evidence together. Matches across a large type return the verified member bodies.

Scope and risk

The lookup uses the existing scoped grep and symbol readers. It filters the candidate scan to the requested file. It verifies retained source at the match revision, including after an incremental index, and returns candidate locations when the evidence is ambiguous or incomplete. Named declarations retain their full source. Lessons for several matched members preserve each link's freshness.

Compatibility, rollout and rollback

  • Wire adds the optional clues input to code.edit_context.
  • Operator steps are none.
  • A revert removes the input and lookup without leaving stored rows.

Tests

Ruff formatting, lint, SDK and reference generation, and git diff --check passed. A private index replay verified exact source, test excerpts, candidate handling, and revision matching on both Tree-sitter and SCIP. The callback replay returned six matching method bodies totaling 6,987 characters and one test excerpt. The replay also verified a body-only reindex, a path with a space beside a matching name prefix, and distinct freshness on links from one lesson. The integration cases cover file scope, ambiguity, and member selection.

AI assistance in the code

  • AI-generated with Codex. Inspected the request, scoped reads, and output in the real index replay.

Checklist

  • Generated SDK and reference files updated.
  • Commits are signed off.

A file-scoped match can locate the edit target and retrieve its tests and linked lessons in the same request. Keep source pointers when the matches do not identify one scope.

Signed-off-by: Lareb Zafar <[email protected]>
Use verified member spans for code and tests when file clues match several members. Keep full bodies available for a named type and deduplicate lessons by their identity.

Signed-off-by: Lareb Zafar <[email protected]>
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 24, 2026 7:31pm UTC
loom-telemetry Ready Ready Preview Nov 24, 2026 7:31pm UTC

Request Review

@zlareb1
zlareb1 merged commit f34efc2 into main Nov 24, 2026
72 of 78 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.

1 participant