Adapter over `codemap-py integrate` — audit, plan, source-wire, locally sync, and demonstrate the codemap-py integration with its supported consumers. Trigger with `/codemap-py:integration check|plan|apply|sync|demo [--runtime {claude,codex,both}] ...`. Default (no args) is `check`. Skip for: running a structural query (use `/codemap-py:query-code`); explicit standalone index rebuild (use `/codemap-py:scan-codebase`).
Scan the Python codebase and build a structural JSON index (import graph + blast-radius metrics). TRIGGER when: user asks to build, refresh, or rebuild the codemap index; user mentions stale index, missing symbols, or re-indexing after significant project changes; phrases: "build codemap", "scan codebase", "refresh structural index", "rebuild import graph".
Read local codemap telemetry logs and produce a diagnostic/usage report. Supports date filtering, session filtering, and optional anonymization before sharing. Trigger with `$codemap-py:debrief-coding [--since <YYYY-MM-DD>] [--session <id>] [--anonymize] [--output <path>]` to analyse recent codemap usage, debug query patterns, investigate errors, or prepare a shareable anonymized report of how codemap skills and the CLI are being used.
Adapter over `codemap-py integrate` — audit, plan, source-wire, locally sync, and demonstrate the codemap-py integration with its supported consumers. Trigger with `$codemap-py:integration check|plan|apply|sync|demo [--runtime {claude,codex,both}] ...`. Default (no args) is `check`. Skip for: running a structural query (use `$codemap-py:query-code`); explicit standalone index rebuild (use `$codemap-py:scan-codebase`).
Query the codemap structural index — module deps/rdeps/central/coupled/path, symbol-level source extraction, function call graph (fn-deps, fn-rdeps, fn-central, fn-blast), plus quality/coverage queries. Trigger with `$codemap-py:query-code <subcommand> ...` for: "what depends on", "who calls", "imports of", "dependency graph", "blast radius of", "list central modules". Skip for: rename intent (use `$codemap-py:rename-refs`); simple grep suffices; non-Python repo. Missing/stale index auto-builds — no manual scan-codebase needed.
Atomic rename of Python symbols or modules via the structural index — static callers, import sites, `__all__` re-exports, Sphinx cross-refs; optional deprecated alias (`--deprecate`) or hard-delete (`--remove-if-no-callers`). Trigger with `$codemap-py:rename-refs symbol <old> <new> [flags]` or `$codemap-py:rename-refs module <old_path> <new_path> [--dry-run]` for: "rename X to Y" (function/class/method/ module), "move module X to Y", "update all references to X". Skip for: non-Python; index not built (run `$codemap-py:scan-codebase` first); local-variable rename; grep-only rename wanted; 1:N symbol splits; package directory rename (use `git mv` directly).
Scan the Python codebase and build a structural JSON index (import graph + blast-radius metrics + symbol table). Explicit invocation only via `$codemap-py:scan-codebase [--root <path>] [--incremental]` — never auto-trigger this from conversation reasoning. Use when the index is missing, stale, or after significant project changes.
Identify which tests need rerunning after a code change — traces static call graph (function-level) or import graph (module-level) to find affected test files, then emits a ready-to-run pytest command. Trigger with `$codemap-py:test-impact <module::symbol | module> [--no-mocks]` for: "which tests are affected", "what tests cover this", "test impact of", "what tests to rerun".