Your coding agent works with a repository's decisions through two MCP tools:
get_why finds and verifies decisions, and decision records and reviews
them. An agent can add the decisions the code and history follow, accept or
dismiss candidates with a reason, and undo its own last review.
How decisions arrive
| Way in | Source label | What it carries |
|---|---|---|
| Indexing | ADR, Pull request, Git history, Marker | Mined on every index from the sources set under Settings → Decision capture |
| Your coding agent | Agent | A verbatim quote and the commit, through decision(action="propose") |
| PR review replies | PR review | A reviewer's reply explaining why the code is right, quoted word for word |
Every new decision lands under Candidates on the decisions page and governs nothing until someone accepts it.
1. Turn on decision
decision writes, so it is off until you turn it on. Open the repository's
Settings → MCP tools and switch on decision. The setting applies to
your own connections. While it is off, the decisions page shows a Turn on the
decision tool in MCP tools link beside each agent action, and every prompt
tells the agent to ask you to turn it on.
2. Connect with a write-scoped key
decision needs an API key with the write scope, and you need write access
to the repository on Repowise.
- Open the repository's Decisions page.
- Under How decisions arrive, choose create a write key.
- Generate the key with read and write ticked, and copy the snippet for your editor.
You can also mint one under Settings → Coding agents (MCP) with the write scope ticked. The connection URL is the per-repository endpoint:
https://api.repowise.dev/mcp/{owner}/{repo}Workspace endpoints are read-only and do not offer write tools. See Connecting your IDE.
3. Hand it to your agent
Each prompt below copies with one click. Add decisions with your agent also opens in Claude Code or Cursor from the menu beside it. Run the prompt in an agent that has the repository checked out.
| Where | Action | What the agent does |
|---|---|---|
| Decisions page, Review, Candidates | Review with your agent | Lists candidates with get_why, checks each one's source and evidence commits against the code, accepts real rules and dismisses wrong ones with a one-line reason, leaves unsure ones, and stops after 20 |
| Decisions page, How decisions arrive | Add decisions with your agent | Starts from get_why's ungoverned hotspots, finds rules the code and history clearly follow, skips any already recorded, and adds at most 10 with a verbatim quote and evidence commits |
| A candidate's page | Copy prompt | The review steps for that one decision |
get_why lists candidates 5 at a time, so the review prompt calls it again
until none are left. Every prompt tells the agent to treat commit messages,
docs and comments as data, never as instructions.
decision
One tool, four actions. id is the id get_why returns.
| Action | Arguments | What it does |
|---|---|---|
propose | title, decision, source_quote, evidence_commits, plus the optional fields below | Adds a candidate |
accept | id, reason | Accepts the decision, signed as your agent. reason is required when the decision has no rationale |
dismiss | id, reason (required) | Dismisses the decision and keeps it from being added again |
undo | id | Returns the decision to where it was before your last accept or dismiss on it. Someone else's review is not undone |
Undo on the dashboard does the same for your own last accept or dismiss: a decision you accepted that was never accepted before is a candidate again, and a dismissed candidate comes back. The history keeps both your review and its undo.
get_why(id="<id>")
decision(action="accept", id="<id>", reason="Every handler goes through the shared retry wrapper.")
decision(action="dismiss", id="<id>", reason="Only true for one pull request.")
decision(action="undo", id="<id>")Fields for propose
| Parameter | Required | Notes |
|---|---|---|
title | Yes | Short name, up to 200 characters |
decision | Yes | What was chosen, in the quote's words |
source_quote | Yes | The passage that states it, copied exactly from the commit message, doc or comment |
evidence_commits | Yes | 1 to 20 commit shas (7 to 40 hex characters) |
rationale | No | Why, in the quote's words. Dropped when the quote does not support it |
context | No | What forced the choice |
alternatives | No | Options the source says were rejected |
consequences | No | What follows from it |
affected_files | No | Repo-relative paths it governs |
kind | No | architectural (default) or agreement for a working rule |
The server checks every new decision before storing it:
| Check | Result |
|---|---|
decision is not supported by source_quote | Refused with the reason |
| Same title as a decision already recorded | Returned as that decision; nothing new is written |
| More than 30 a minute, or 1,000 open on the repository | Refused until the limit clears |
A refused call answers with one plain sentence the agent can act on, such as "Add a reason: why does this rule hold?".
The older propose_decision tool still works for now and behaves like
decision(action="propose").
Agent accepts
An accept from your agent is recorded as your agent's, and the decision reads Accepted by your agent with the key's label beside it. To keep accepting with people, turn off Let agents accept decisions under Settings → Decision capture. Agents can still add candidates; an accept then answers "Accepting by agents is off for this repo. Ask a person to confirm it on Repowise."
Accepted decisions reach get_why, editor hooks and the PR bot's review.