|
| 1 | +--- |
| 2 | +description: Triage card for files, modules, or symbols — layer, hotspot, fix history, freshness (relationships, not source bytes). |
| 3 | +allowed-tools: Bash, Read |
| 4 | +--- |
| 5 | + |
| 6 | +# Repowise Context |
| 7 | + |
| 8 | +Pull a triage card for one or more files, modules, or symbols. This is the CLI |
| 9 | +adapter over `get_context`: title, summary, architectural layer, hotspot / |
| 10 | +bug-fix history, doc freshness, and optional relationship blocks. Relationships |
| 11 | +and risk signals — **not** source bytes by default. |
| 12 | + |
| 13 | +## Steps |
| 14 | + |
| 15 | +1. If `.repowise/` doesn't exist: "This repo isn't indexed yet. Run `/repowise:init` first." Stop. |
| 16 | +2. Resolve targets from `$ARGUMENTS`. If empty, ask which file / module / |
| 17 | + `path::Symbol` to inspect. |
| 18 | +3. Run `repowise context` and present each card: layer, stale bit, hotspot, |
| 19 | + summary. Call out fix history when present. |
| 20 | + |
| 21 | +## Choosing the invocation |
| 22 | + |
| 23 | +TARGETS are file paths, module paths, or `path/to/file.py::Symbol` ids. Batch |
| 24 | +them in one call. |
| 25 | + |
| 26 | +- Default triage → `repowise context <targets…>` |
| 27 | +- Opt-in blocks (repeatable) → `--include callers|callees|ownership|metrics|decisions|skeleton|…` |
| 28 | +- Richer card → `repowise context <targets…> --no-compact` |
| 29 | +- Machine-readable / raw payload → `--format json` / `--full` |
| 30 | + |
| 31 | +``` |
| 32 | +repowise context src/api/routes.py src/api/auth.py |
| 33 | +repowise context src/api/routes.py::login --include callers --include metrics |
| 34 | +repowise context src/api/routes.py --include skeleton |
| 35 | +``` |
| 36 | + |
| 37 | +`--include skeleton` adds the body-elided, line-verified file shape. For the |
| 38 | +exact function body, prefer `/repowise:symbol` (or `get_symbol`) with a |
| 39 | +`symbol_id` from the card. |
| 40 | + |
| 41 | +Shared targeting flags (`--path`, `--repo`, `--no-workspace`) work the same as |
| 42 | +the other tool-adapter commands. |
| 43 | + |
| 44 | +## Notes |
| 45 | + |
| 46 | +- Prefer this before opening many files with Read — one call batches cards. |
| 47 | +- A target the index cannot resolve returns an `error` card; report that |
| 48 | + plainly instead of inventing structure. |
| 49 | +- For a synthesised Q&A answer, use `/repowise:ask`. For "why is it shaped |
| 50 | + this way", use `/repowise:why`. |
0 commit comments