resolve
Resolves any Python identifier form (bare name, FQN, file:line) to its canonical definition-site handle, returning kind and scope.
Instructions
Python: Resolve any identifier form to a canonical Handle.
Accepts bare names, FQN dotted paths, re-exported public paths, file:line coordinates, or file paths. Returns the definition-site canonical handle along with kind and scope ("project" or "external").
Args: identifier: The identifier to resolve. Forms supported: - Bare name: "Config" - FQN: "a.b.c.Config" - Re-exported: "package.Config" (collapses to definition site) - File:line: "src/foo.py:42" - File only: "src/foo.py" project_path: Project root path (default: current directory)
Returns: ResolveResult dict — one of: - Success: {"found": True, "handle": str, "kind": str, "scope": "project"|"external"} - Ambiguous: {"found": True, "ambiguous": True, "candidates": [...]} - Not found: {"found": False, "reason": str}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| identifier | Yes | ||
| project_path | No | . |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||