# Grader: datatable-dedupe

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. The table is created (or planned) via
   `awesomate_n8n_datatable_write {action:'create'}` — not an external
   database, spreadsheet, or hand-rolled store.
2. States project co-location: the table must live in the same project as
   the workflow that reads it (created against that workflow / its
   `workflowId`), because datatables resolve PER PROJECT at runtime — a
   table in another project fails at run time even though it exists.
3. The dedupe logic is insert-if-absent: look up the incoming lead's key
   (e.g. email) in the table FIRST and only continue/insert when absent — a
   conditional gate in the workflow, never a blind insert.
4. States the schema caveat: columns are fixed at creation — `add_column`
   is the only later change (no rename, no retype) — so the dedupe key
   column must be chosen up front.
5. Respects the plan gate: datatable writes are Support Plus and above. The
   assistant confirms capability via `awesomate_n8n_context` before writing,
   or states the gating when capability is absent.

## Automatic fails

- A blind insert with no absence check.
- Table creation planned or executed with no mention of project scoping.
- Attempts `awesomate_n8n_datatable_write` after tool results show the plan
  lacks the capability.
