get_why
Reveal why code is shaped the way it is by retrieving decision records and evidence commits, clarifying rationale before refactors or pattern changes.
Instructions
Why this code is shaped this way — decision records + evidence commits.
Call before refactors or pattern divergences. Query modes: a question
("why is auth using JWT?"), a file path (governing decisions + origin
story + alignment score), a question anchored to targets, or no query
(decision health dashboard). Falls back to git archaeology when no
decisions exist for a path — never empty. Evidence-bearing rows carry an
explicit ``provenance`` and self-contained ``evidence_refs``; matching ids
mean shared evidence, not independent corroboration. ``answer_basis`` names
the strongest lane the response rests on (decision, episode, rationale,
archaeology, documentation); only a decision is a ruling, the rest are
evidence to weigh.
Args:
query: question, file/module path, or omit for the dashboard.
targets: optional file paths to anchor the search, or to ask about on
their own when there is no query.
repo: usually omitted.
id: decision or ``ev_...`` evidence id emitted by this or another tool.
reference: structured evidence reference. Its id and repository are
accepted together without caller translation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| repo | No | ||
| query | No | ||
| targets | No | ||
| reference | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |