Is there a way to add context about a projects file structure?

This would be extremely powerful way to automatically refactor a large source file. For example a prompt might be, “extract this constant into its own file in a manner consistent with other code in the project”.

Ideally, the action would be:

  1. $ touch <path-that-makes-sense/constantsFile>
  2. copy + export the selected code to that file
  3. import the variable from the new file and update references in the working file if required.

Capabilties like this that mix terminal commands + codebase + file strucutre context would be immensely powerful & helpful!