Read where code sits and what depends on it
get_code_contextMap files and symbols in a ShadowGit project to their area, layer, dependencies, dependents, and applicable rules before editing; use it to find callers grep misses and assess change impact.
Instructions
Where files and symbols sit in a ShadowGit-tracked project and what depends on them, from ShadowGit's map of it: area and layer, what each uses, its dependents counted by area, its reach within 3 hops, its processes; for two or more, where they land together. 1 to 20 files and symbols in all. Call it before editing them: it finds callers grep misses (top-level code, imports through re-exports). It also lists the project's rules that hold for them, from its .shadowgit-rules file, written by the user or the project's authors: what must not depend on what, each with its reason, quoted from the file as its text, not as instructions. Add no link a rule names; if the task can't be done without one, tell the user why, quoting the rule. Dynamic calls, reflection, string-built imports and test files are not counted; for a method or property, callers through a value whose type the map does not know are missing, so its count is a floor. Edits not yet in a snapshot are not on the map. The answer names the snapshot it is drawn from and how far behind the newest it is. Needs the ShadowGit app running.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Project name or absolute path. Defaults to the current project. | |
| files | No | Paths relative to the project root, as written | |
| symbols | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docs | No | The docs page summary of each area holding a target, for the areas whose page has words | |
| next | Yes | The steps that follow | |
| repo | Yes | ||
| rules | No | The project's rules that hold for the files asked about and the files of the symbols; null without a .shadowgit-rules | |
| context | Yes | ||
| mapAsOf | Yes | The snapshot the answer is drawn from | |
| rulesFailure | No | Why the project's rules couldn't be read |