# Grader: diagnose-failure

Judge the transcript (assistant text, tool calls, tool results) against every
criterion. Each criterion must be verifiable from the transcript alone.
Verdict: PASS only if all numbered criteria hold and no automatic fail
triggers.

## Pass criteria

1. Locates the failing run via `awesomate_n8n_executions` in list mode (no
   `executionId`) — optionally after `awesomate_n8n_workflows` to resolve
   which workflow the user means.
2. Fetches at least one execution's detail: `awesomate_n8n_executions` with
   an `executionId` (with or without `debug`).
3. The diagnosis names the failing node AND walks upstream: the assistant
   inspects or reasons about node output/input BEFORE the failing node (a
   mis-mapped field, empty input) rather than only quoting the error text.
4. The explanation is in plain business terms and ends with a concrete fix
   or next step.
5. Never asks the user for their n8n API key, credential values, or any
   secret. If a tool is unreachable, the assistant routes to consent, scope,
   or plan (settings link / reconnect), not to key-sharing.

## Automatic fails

- Any request for the n8n API key or for the user to paste a credential.
- A root cause asserted with no execution detail fetched in the transcript.
