aft icon indicating copy to clipboard operation
aft copied to clipboard

cross projects searches

Open stdweird opened this issue 1 week ago • 1 comments

Description

Assume you are developing 2 projects A and B, where one project A is a dependency of the other B. If both are being developed with aft in the loop, adn while working on project B: will aft find the code of project A if you are working on something that involves project A (trying to properly wire up project A in project B).

Use case

If a dependency is also indexed/searchable by aft, it might ease up the integration of the dependency.

stdweird avatar Nov 23 '26 12:11 stdweird

Yes, this mostly works today.

  • aft_search takes a path to search another project or plain folder on the same machine. While you work in B, the agent can search A with "path": "/path/to/A". If AFT has indexed A before, for example in an earlier session opened there, the search reads that index read-only. Otherwise it runs a bounded text scan of A's folder. Either way, nothing in A is rebuilt or changed.
  • read, grep, aft_outline and aft_zoom also accept paths inside A.
  • If you start OpenCode in a parent folder that contains both repositories, searches cover both of them.
  • With restrict_to_project_root: true in your AFT config, AFT refuses searches outside the current project.

The agent decides when to look outside B, so telling it where A lives ("project A is at ~/src/A") makes it far more likely to search there.

What AFT doesn't do today is find a dependency's source on its own from B's manifest (package.json, Cargo.toml and so on). We've noted that as a feature request.

aft-alfonso[bot] avatar Nov 23 '26 12:11 aft-alfonso[bot]