Docs / How verdicts work

How Pinky reaches a verdict

Pinky is not open source. This page is the plain explanation instead: what each hook is handed, how the rules turn that into an answer, and what Pinky does when it cannot answer.

From tool call to answer

  1. 1. Claude Code calls the hook Before a tool runs (and at the other points listed below), Claude Code starts Pinky's hook and hands it the details as structured text. Pinky reads them; it does not watch your screen or your network.
  2. 2. Every rule looks at the same input A rule is a written pattern with examples it must match and examples it must leave alone. Each rule that matches adds a finding with a severity and an action: allow, ask you first, or deny.
  3. 3. The strictest action wins A rule can only add caution, never remove it. If one rule says ask and another says deny, the answer is deny. A rule you wrote yourself cannot weaken one Pinky ships.
  4. 4. Your mode decides what happens In watch mode, the default and the free tier, nothing is stopped: Pinky records what it would have done and shows it on your dashboard. Blocking needs a paid plan and your say-so, rule by rule or all at once.
  5. 5. Claude Code gets one answer The hook hands back allow, ask or deny with a reason in plain words. Ask means Claude Code shows you the reason and waits for your choice.

What each hook sees

Pinky registers one hook per point in a session. Each is handed only what Claude Code passes at that point.

Same input, same answer

Same input, same verdict, every time: no model, no network call and no randomness sits between the input and the answer. Pinky keeps a redacted copy of what each check saw, so a past verdict can be replayed and compared, and a test fails the build if any input to a verdict goes unrecorded.

When Pinky itself goes wrong

Pinky never blocks work because of its own failures. If a hook cannot read its input, hits an error or is handed an event it does not know, it answers allow and writes the error to its local log, so a bug in Pinky costs you a missed check, not a stuck session. pinkyai off --yes turns every hook to allow at once if you ever need it.

Next: Hooks → for what runs at each point, and Rule reference → for every rule category.