{
 "runtime_version": "1.1.2",
 "recorded_at": "2026-09-27T01:17:45+00:00",
 "tables": {
  "invoices": [
   {
    "id": "INV-0001",
    "vendor_id": "V01",
    "amount": "3123.83",
    "status": "paid",
    "issued_on": "2026-04-28",
    "po_number": "PO-4028"
   },
   {
    "id": "INV-0002",
    "vendor_id": "V01",
    "amount": "1996.94",
    "status": "open",
    "issued_on": "2026-08-25",
    "po_number": "PO-4697"
   },
   {
    "id": "INV-0003",
    "vendor_id": "V06",
    "amount": "2193.68",
    "status": "paid",
    "issued_on": "2026-01-24",
    "po_number": "PO-9903"
   },
   {
    "id": "INV-0004",
    "vendor_id": "V02",
    "amount": "3091.21",
    "status": "open",
    "issued_on": "2026-08-23",
    "po_number": "PO-3043"
   },
   {
    "id": "INV-0005",
    "vendor_id": "V03",
    "amount": "1365.89",
    "status": "paid",
    "issued_on": "2026-04-11",
    "po_number": ""
   },
   {
    "id": "INV-0006",
    "vendor_id": "V03",
    "amount": "4764.07",
    "status": "void",
    "issued_on": "2026-09-09",
    "po_number": "PO-1397"
   },
   {
    "id": "INV-0007",
    "vendor_id": "V02",
    "amount": "2966.07",
    "status": "open",
    "issued_on": "2026-07-22",
    "po_number": "PO-3865"
   },
   {
    "id": "INV-0008",
    "vendor_id": "V01",
    "amount": "2932.84",
    "status": "paid",
    "issued_on": "2026-03-13",
    "po_number": "PO-3873"
   },
   {
    "id": "INV-0009",
    "vendor_id": "V02",
    "amount": "476.66",
    "status": "open",
    "issued_on": "2026-06-25",
    "po_number": ""
   },
   {
    "id": "INV-0010",
    "vendor_id": "V01",
    "amount": "2474.31",
    "status": "open",
    "issued_on": "2026-04-09",
    "po_number": "PO-5908"
   },
   {
    "id": "INV-0011",
    "vendor_id": "V01",
    "amount": "3652.68",
    "status": "paid",
    "issued_on": "2026-02-05",
    "po_number": "PO-2685"
   },
   {
    "id": "INV-0012",
    "vendor_id": "V05",
    "amount": "362.28",
    "status": "paid",
    "issued_on": "2026-04-26",
    "po_number": "PO-9495"
   },
   {
    "id": "INV-0013",
    "vendor_id": "V04",
    "amount": "440.74",
    "status": "paid",
    "issued_on": "2026-03-28",
    "po_number": ""
   },
   {
    "id": "INV-0014",
    "vendor_id": "V06",
    "amount": "2606.57",
    "status": "paid",
    "issued_on": "2026-07-15",
    "po_number": "PO-5186"
   },
   {
    "id": "INV-0015",
    "vendor_id": "V05",
    "amount": "2748.83",
    "status": "paid",
    "issued_on": "2026-09-20",
    "po_number": "PO-7964"
   },
   {
    "id": "INV-0016",
    "vendor_id": "V05",
    "amount": "4904.52",
    "status": "void",
    "issued_on": "2026-03-05",
    "po_number": "PO-1136"
   },
   {
    "id": "INV-0017",
    "vendor_id": "V01",
    "amount": "1622.08",
    "status": "open",
    "issued_on": "2026-04-16",
    "po_number": "PO-5025"
   },
   {
    "id": "INV-0018",
    "vendor_id": "V05",
    "amount": "3852.26",
    "status": "paid",
    "issued_on": "2026-01-03",
    "po_number": "PO-5291"
   },
   {
    "id": "INV-0019",
    "vendor_id": "V03",
    "amount": "2685.69",
    "status": "open",
    "issued_on": "2026-08-18",
    "po_number": "PO-7366"
   },
   {
    "id": "INV-0020",
    "vendor_id": "V01",
    "amount": "3113.48",
    "status": "paid",
    "issued_on": "2026-02-16",
    "po_number": "PO-3953"
   },
   {
    "id": "INV-0021",
    "vendor_id": "V01",
    "amount": "3548.89",
    "status": "paid",
    "issued_on": "2026-04-01",
    "po_number": "PO-9333"
   },
   {
    "id": "INV-0022",
    "vendor_id": "V04",
    "amount": "349.64",
    "status": "paid",
    "issued_on": "2026-07-12",
    "po_number": "PO-6897"
   },
   {
    "id": "INV-0023",
    "vendor_id": "V03",
    "amount": "1422.59",
    "status": "open",
    "issued_on": "2026-07-26",
    "po_number": "PO-8198"
   },
   {
    "id": "INV-0024",
    "vendor_id": "V03",
    "amount": "2397.06",
    "status": "open",
    "issued_on": "2026-02-26",
    "po_number": "PO-1143"
   },
   {
    "id": "INV-0025",
    "vendor_id": "V04",
    "amount": "4795.75",
    "status": "paid",
    "issued_on": "2026-08-20",
    "po_number": ""
   },
   {
    "id": "INV-0026",
    "vendor_id": "V05",
    "amount": "2187.53",
    "status": "paid",
    "issued_on": "2026-07-25",
    "po_number": "PO-3056"
   },
   {
    "id": "INV-0027",
    "vendor_id": "V02",
    "amount": "495.06",
    "status": "paid",
    "issued_on": "2026-02-09",
    "po_number": "PO-5644"
   },
   {
    "id": "INV-0028",
    "vendor_id": "V04",
    "amount": "980.82",
    "status": "paid",
    "issued_on": "2026-01-24",
    "po_number": "PO-8618"
   },
   {
    "id": "INV-0029",
    "vendor_id": "V01",
    "amount": "4488.96",
    "status": "paid",
    "issued_on": "2026-09-01",
    "po_number": "PO-7054"
   },
   {
    "id": "INV-0030",
    "vendor_id": "V05",
    "amount": "108.03",
    "status": "paid",
    "issued_on": "2026-02-24",
    "po_number": "PO-1705"
   },
   {
    "id": "INV-0031",
    "vendor_id": "V06",
    "amount": "2098.26",
    "status": "void",
    "issued_on": "2026-07-28",
    "po_number": "PO-9509"
   },
   {
    "id": "INV-0032",
    "vendor_id": "V02",
    "amount": "619.56",
    "status": "open",
    "issued_on": "2026-01-16",
    "po_number": "PO-1434"
   },
   {
    "id": "INV-0033",
    "vendor_id": "V03",
    "amount": "2812.40",
    "status": "paid",
    "issued_on": "2026-03-26",
    "po_number": "PO-2417"
   },
   {
    "id": "INV-0034",
    "vendor_id": "V05",
    "amount": "186.88",
    "status": "paid",
    "issued_on": "2026-08-01",
    "po_number": "PO-4063"
   },
   {
    "id": "INV-0035",
    "vendor_id": "V03",
    "amount": "202.54",
    "status": "open",
    "issued_on": "2026-04-10",
    "po_number": "PO-4208"
   },
   {
    "id": "INV-0036",
    "vendor_id": "V03",
    "amount": "813.24",
    "status": "paid",
    "issued_on": "2026-07-19",
    "po_number": "PO-1868"
   },
   {
    "id": "INV-0037",
    "vendor_id": "V05",
    "amount": "3335.33",
    "status": "paid",
    "issued_on": "2026-04-28",
    "po_number": "PO-2887"
   },
   {
    "id": "INV-0038",
    "vendor_id": "V02",
    "amount": "4123.91",
    "status": "paid",
    "issued_on": "2026-06-01",
    "po_number": "PO-2410"
   },
   {
    "id": "INV-0039",
    "vendor_id": "V04",
    "amount": "2563.44",
    "status": "paid",
    "issued_on": "2026-02-09",
    "po_number": "PO-2787"
   },
   {
    "id": "INV-0040",
    "vendor_id": "V01",
    "amount": "4901.45",
    "status": "open",
    "issued_on": "2026-09-25",
    "po_number": "PO-1506"
   },
   {
    "id": "INV-0041",
    "vendor_id": "V05",
    "amount": "2432.98",
    "status": "paid",
    "issued_on": "2026-08-28",
    "po_number": ""
   },
   {
    "id": "INV-0042",
    "vendor_id": "V04",
    "amount": "2085.06",
    "status": "paid",
    "issued_on": "2026-01-25",
    "po_number": "PO-8164"
   },
   {
    "id": "INV-0043",
    "vendor_id": "V04",
    "amount": "1812.31",
    "status": "void",
    "issued_on": "2026-09-07",
    "po_number": ""
   },
   {
    "id": "INV-0044",
    "vendor_id": "V02",
    "amount": "3785.83",
    "status": "open",
    "issued_on": "2026-05-16",
    "po_number": "PO-4353"
   },
   {
    "id": "INV-0045",
    "vendor_id": "V05",
    "amount": "1370.94",
    "status": "paid",
    "issued_on": "2026-05-12",
    "po_number": "PO-2116"
   },
   {
    "id": "INV-0046",
    "vendor_id": "V01",
    "amount": "4132.77",
    "status": "paid",
    "issued_on": "2026-01-24",
    "po_number": "PO-2762"
   },
   {
    "id": "INV-0047",
    "vendor_id": "V02",
    "amount": "3383.60",
    "status": "paid",
    "issued_on": "2026-05-23",
    "po_number": ""
   },
   {
    "id": "INV-0048",
    "vendor_id": "V01",
    "amount": "320.72",
    "status": "open",
    "issued_on": "2026-08-27",
    "po_number": "PO-3210"
   }
  ],
  "vendors": [
   {
    "id": "V01",
    "name": "Harbor Tool Co",
    "region": "West"
   },
   {
    "id": "V02",
    "name": "Blue Mesa Freight",
    "region": "West"
   },
   {
    "id": "V03",
    "name": "Quill & Ledger",
    "region": "East"
   },
   {
    "id": "V04",
    "name": "Cedar Line Packaging",
    "region": "Central"
   },
   {
    "id": "V05",
    "name": "Northgate Electric",
    "region": "East"
   },
   {
    "id": "V06",
    "name": "Pioneer Office Supply",
    "region": "South"
   }
  ]
 },
 "tools": [
  {
   "file": "demo_invoices_missing_po.json",
   "question": "How many invoices have no PO number?",
   "question_class": "demo:invoices_missing_po",
   "pipeline": [
    {
     "op": "rows"
    },
    {
     "column": "po_number",
     "op": "count_missing"
    }
   ],
   "do_not": [],
   "table": "invoices",
   "kid": "perslis-floor-2026-09",
   "issued_at": "2026-09-26",
   "issued_to": "public demo",
   "review": {
    "by": "Perslis (demo)",
    "at": "2026-09-27T01:13:02+00:00"
   },
   "signature": "9843c4538efd1058…"
  },
  {
   "file": "demo_invoices_per_month.json",
   "question": "How many invoices were issued each month?",
   "question_class": "demo:invoices_per_month",
   "pipeline": [
    {
     "op": "rows"
    },
    {
     "bucket": "month",
     "column": "issued_on",
     "op": "group_by"
    },
    {
     "op": "count"
    }
   ],
   "do_not": [],
   "table": "invoices",
   "kid": "perslis-floor-2026-09",
   "issued_at": "2026-09-26",
   "issued_to": "public demo",
   "review": {
    "by": "Perslis (demo)",
    "at": "2026-09-27T01:13:01+00:00"
   },
   "signature": "d49e847d7c37ae8b…"
  },
  {
   "file": "demo_largest_open_invoice.json",
   "question": "What is our largest open invoice?",
   "question_class": "demo:largest_open_invoice",
   "pipeline": [
    {
     "op": "rows"
    },
    {
     "column": "status",
     "equals": "open",
     "op": "filter"
    },
    {
     "column": "amount",
     "op": "max"
    }
   ],
   "do_not": [],
   "table": "invoices",
   "kid": "perslis-floor-2026-09",
   "issued_at": "2026-09-26",
   "issued_to": "public demo",
   "review": {
    "by": "Perslis (demo)",
    "at": "2026-09-27T01:13:01+00:00"
   },
   "signature": "bdbfa2c26c6d5a9f…"
  },
  {
   "file": "demo_paid_by_region.json",
   "question": "How much have we paid, by vendor region?",
   "question_class": "demo:paid_by_region",
   "pipeline": [
    {
     "op": "rows"
    },
    {
     "column": "status",
     "equals": "paid",
     "op": "filter"
    },
    {
     "on": "vendor_id",
     "op": "join",
     "table": "vendors",
     "to": "id"
    },
    {
     "column": "vendors.region",
     "op": "group_by"
    },
    {
     "column": "amount",
     "op": "sum"
    }
   ],
   "do_not": [],
   "table": "invoices",
   "kid": "perslis-floor-2026-09",
   "issued_at": "2026-09-26",
   "issued_to": "public demo",
   "review": {
    "by": "Perslis (demo)",
    "at": "2026-09-27T01:13:01+00:00"
   },
   "signature": "390512c26ee0cc01…"
  },
  {
   "file": "demo_paid_total.json",
   "question": "What is the total of all paid invoices?",
   "question_class": "demo:paid_total",
   "pipeline": [
    {
     "op": "rows"
    },
    {
     "column": "status",
     "equals": "paid",
     "op": "filter"
    },
    {
     "column": "amount",
     "op": "sum"
    }
   ],
   "do_not": [],
   "table": "invoices",
   "kid": "perslis-floor-2026-09",
   "issued_at": "2026-09-26",
   "issued_to": "public demo",
   "review": {
    "by": "Perslis (demo)",
    "at": "2026-09-27T01:13:01+00:00"
   },
   "signature": "6223c6563e930a51…"
  },
  {
   "file": "demo_top_vendors_by_invoiced.json",
   "question": "Who are our top 3 vendors by total invoiced?",
   "question_class": "demo:top_vendors_by_invoiced",
   "pipeline": [
    {
     "op": "rows"
    },
    {
     "on": "vendor_id",
     "op": "join",
     "table": "vendors",
     "to": "id"
    },
    {
     "column": "vendors.name",
     "op": "group_by"
    },
    {
     "column": "amount",
     "op": "sum"
    },
    {
     "n": 3,
     "op": "top"
    }
   ],
   "do_not": [],
   "table": "invoices",
   "kid": "perslis-floor-2026-09",
   "issued_at": "2026-09-26",
   "issued_to": "public demo",
   "review": {
    "by": "Perslis (demo)",
    "at": "2026-09-27T01:13:01+00:00"
   },
   "signature": "350ece92df6a9e18…"
  }
 ],
 "calls": [
  {
   "question": "How many invoices have no PO number?",
   "description": "Question it was built for: How many invoices have no PO number?. What it computes, exactly: Take every row of invoices; count the rows with no po_number. Runs locally over the 'invoices' data; no model in the loop. Takes no arguments. If this procedure is not exactly what the user asked, do not use it — call report_gap instead.",
   "tool": "derive_demo_invoices_missing_po",
   "arguments": {},
   "result": {
    "status": "DERIVED",
    "tool": "derive_demo_invoices_missing_po",
    "table": "invoices",
    "question_class": "demo:invoices_missing_po",
    "value": 7,
    "model_calls": 0,
    "derivation": "rows -> count_missing(po_number)"
   }
  },
  {
   "question": "How many invoices were issued each month?",
   "description": "Question it was built for: How many invoices were issued each month?. What it computes, exactly: Take every row of invoices; group by month of issued_on; count the rows in each group. Runs locally over the 'invoices' data; no model in the loop. Takes no arguments. If this procedure is not exactly what the user asked, do not use it — call report_gap instead.",
   "tool": "derive_demo_invoices_per_month",
   "arguments": {},
   "result": {
    "status": "DERIVED",
    "tool": "derive_demo_invoices_per_month",
    "table": "invoices",
    "question_class": "demo:invoices_per_month",
    "value": {
     "2026-01": 6,
     "2026-02": 6,
     "2026-03": 4,
     "2026-04": 8,
     "2026-05": 3,
     "2026-06": 2,
     "2026-07": 7,
     "2026-08": 7,
     "2026-09": 5
    },
    "model_calls": 0,
    "derivation": "rows -> group_by(issued_on by month) -> count"
   }
  },
  {
   "question": "What is our largest open invoice?",
   "description": "Question it was built for: What is our largest open invoice?. What it computes, exactly: Take every row of invoices; keep rows where status is 'open'; take the largest amount. Runs locally over the 'invoices' data; no model in the loop. Takes no arguments. If this procedure is not exactly what the user asked, do not use it — call report_gap instead.",
   "tool": "derive_demo_largest_open_invoice",
   "arguments": {},
   "result": {
    "status": "DERIVED",
    "tool": "derive_demo_largest_open_invoice",
    "table": "invoices",
    "question_class": "demo:largest_open_invoice",
    "value": 4901.45,
    "model_calls": 0,
    "derivation": "rows -> filter(status equals 'open') -> max(amount)"
   }
  },
  {
   "question": "How much have we paid, by vendor region?",
   "description": "Question it was built for: How much have we paid, by vendor region?. What it computes, exactly: Take every row of invoices; keep rows where status is 'paid'; look up each row's vendor_id in vendors.id (every row must match, or the tool refuses); group by vendors.region; add up amount in each group (exactly). Runs locally over the 'invoices' data; no model in the loop. Takes no arguments. If this procedure is not exactly what the user asked, do not use it — call report_gap instead.",
   "tool": "derive_demo_paid_by_region",
   "arguments": {},
   "result": {
    "status": "DERIVED",
    "tool": "derive_demo_paid_by_region",
    "table": "invoices",
    "question_class": "demo:paid_by_region",
    "value": {
     "Central": 11215.45,
     "East": 21576.59,
     "South": 4800.25,
     "West": 32996.02
    },
    "model_calls": 0,
    "derivation": "rows -> filter(status equals 'paid') -> join(vendors on vendor_id=id) -> group_by(vendors.region) -> sum(amount)"
   }
  },
  {
   "question": "What is the total of all paid invoices?",
   "description": "Question it was built for: What is the total of all paid invoices?. What it computes, exactly: Take every row of invoices; keep rows where status is 'paid'; add up amount (exactly). Runs locally over the 'invoices' data; no model in the loop. Takes no arguments. If this procedure is not exactly what the user asked, do not use it — call report_gap instead.",
   "tool": "derive_demo_paid_total",
   "arguments": {},
   "result": {
    "status": "DERIVED",
    "tool": "derive_demo_paid_total",
    "table": "invoices",
    "question_class": "demo:paid_total",
    "value": 70588.31,
    "model_calls": 0,
    "derivation": "rows -> filter(status equals 'paid') -> sum(amount)"
   }
  },
  {
   "question": "Who are our top 3 vendors by total invoiced?",
   "description": "Question it was built for: Who are our top 3 vendors by total invoiced?. What it computes, exactly: Take every row of invoices; look up each row's vendor_id in vendors.id (every row must match, or the tool refuses); group by vendors.name; add up amount in each group (exactly); keep the top 3 groups, highest first (groups tied at the cutoff are all kept). Runs locally over the 'invoices' data; no model in the loop. Takes no arguments. If this procedure is not exactly what the user asked, do not use it — call report_gap instead.",
   "tool": "derive_demo_top_vendors_by_invoiced",
   "arguments": {},
   "result": {
    "status": "DERIVED",
    "tool": "derive_demo_top_vendors_by_invoiced",
    "table": "invoices",
    "question_class": "demo:top_vendors_by_invoiced",
    "value": [
     [
      "Harbor Tool Co",
      36308.95
     ],
     [
      "Northgate Electric",
      21489.58
     ],
     [
      "Blue Mesa Freight",
      18941.9
     ]
    ],
    "model_calls": 0,
    "derivation": "rows -> join(vendors on vendor_id=id) -> group_by(vendors.name) -> sum(amount) -> top(3, desc, ties kept)"
   }
  }
 ],
 "breaks": [
  {
   "id": "tamper",
   "title": "Someone edits a signed tool",
   "action": "In demo_paid_total.json, change the filter from 'paid' to 'open'.",
   "command": "python3 floor-serve.py --data demo/data --tools edited-tools --list",
   "output": "refused: demo_paid_total.json: SignatureError: 'demo:paid_total': signature does not match — the spec was edited after admission, or not admitted at all\n\nderive_demo_invoices_missing_po\n    question   : How many invoices have no PO number?\n    computes   : Take every row of invoices; count the rows with no po_number.\n    reviewed by: Perslis (demo)\nderive_demo_invoices_per_month\n    question   : How many invoices were issued each month?\n    computes   : Take every row of invoices; group by month of issued_on; count the rows in each group.\n    reviewed by: Perslis (demo)\nderive_demo_largest_open_invoice\n    question   : What is our largest open invoice?\n    computes   : Take every row of invoices; keep rows where status is 'open'; take the largest amount.\n    reviewed by: Perslis (demo)\nderive_demo_paid_by_region\n    question   : How much have we paid, by vendor region?\n    computes   : Take every row of invoices; keep rows where status is 'paid'; look up each row's vendor_id in vendors.id (every row must match, or the tool refuses); group by vendors.region; add up amount in each group (exactly).\n    reviewed by: Perslis (demo)\nderive_demo_top_vendors_by_invoiced\n    question   : Who are our top 3 vendors by total invoiced?\n    computes   : Take every row of invoices; look up each row's vendor_id in vendors.id (every row must match, or the tool refuses); group by vendors.name; add up amount in each group (exactly); keep the top 3 groups, highest first (groups tied at the cutoff are all kept).\n    reviewed by: Perslis (demo)"
  },
  {
   "id": "na",
   "title": "A number column holds 'N/A'",
   "action": "Append an invoice whose amount is N/A.",
   "call": {
    "tool": "derive_demo_paid_total",
    "arguments": {},
    "result": {
     "status": "REFUSED",
     "tool": "derive_demo_paid_total",
     "table": "invoices",
     "reason": "the data cannot support a checked answer: 1 value(s) in 'amount' are not numbers: 'N/A'"
    }
   }
  },
  {
   "id": "orphan",
   "title": "An invoice points at an unknown vendor",
   "action": "Append a paid invoice for vendor V99, which is not in vendors.csv.",
   "call": {
    "tool": "derive_demo_paid_by_region",
    "arguments": {},
    "result": {
     "status": "REFUSED",
     "tool": "derive_demo_paid_by_region",
     "table": "invoices",
     "reason": "the data cannot support a checked answer: 1 row(s) have no matching vendors.id — this tool refuses rather than silently leaving them out (keys: 'V99')"
    }
   }
  },
  {
   "id": "gap",
   "title": "A question no tool answers",
   "action": "The assistant is asked for the churn rate and calls report_gap.",
   "call": {
    "tool": "report_gap",
    "arguments": {
     "question": "What is our customer churn rate?"
    },
    "result": {
     "status": "RECORDED",
     "note": "saved on this machine only; no tool answers this yet"
    }
   }
  }
 ],
 "gate": [
  {
   "id": "gate_admit",
   "title": "A correct specification is admitted",
   "action": "The spec for “how much have we paid, by vendor region?” goes through the gate.",
   "spec": {
    "question": "How much have we paid, by vendor region?",
    "question_class": "demo:paid_by_region",
    "pipeline": [
     {
      "op": "rows"
     },
     {
      "op": "filter",
      "column": "status",
      "equals": "paid"
     },
     {
      "op": "join",
      "table": "vendors",
      "on": "vendor_id",
      "to": "id"
     },
     {
      "op": "group_by",
      "column": "vendors.region"
     },
     {
      "op": "sum",
      "column": "amount"
     }
    ],
    "do_not": [
     "include open invoices",
     "count a vendor twice"
    ]
   },
   "exit": 0,
   "output": "ADMITTED: demo:paid_by_region\n  [pass] structure\n  [pass] not_already_registered\n  [pass] columns_exist\n  [pass] data_supports_answer\n  [pass] determinism — {'Central': 11215.45, 'East': 21576.59, 'South': 4800.25, 'West': 32996.02} then {'Central': 11215.45, 'East': 21576.59, 'South': 4800.25, 'West': 32996.02}\n  [pass] produces_a_value — derived {'Central': 11215.45, 'East': 21576.59, 'South': 4800.25, 'West': 32996.02}\n  [pass] verifier_accepts_truth\n  [pass] verifier_rejects_wrong\n  [pass] abstains_without_evidence\n  [pass] grounded_in_evidence\n\nproved the procedure 3/3 times\npromoted derive_demo_paid_by_region  ->  {\"Central\": 11215.45, \"East\": 21576.59, \"South\": 4800.25, \"West\": 32996.02}  model_calls=0\nMCP config (authoring side): ./floor/mcp.json\nnext: a person must review it before it can ship —\n  python3 -m symbolic_floor.review --data ./data --out ./floor --reviewer NAME",
   "verdict": "ADMITTED",
   "checks": [
    {
     "name": "structure",
     "ok": true,
     "note": ""
    },
    {
     "name": "not_already_registered",
     "ok": true,
     "note": ""
    },
    {
     "name": "columns_exist",
     "ok": true,
     "note": ""
    },
    {
     "name": "data_supports_answer",
     "ok": true,
     "note": ""
    },
    {
     "name": "determinism",
     "ok": true,
     "note": "{'Central': 11215.45, 'East': 21576.59, 'South': 4800.25, 'West': 32996.02} then {'Central': 11215.45, 'East': 21576.59, 'South': 4800.25, 'West': 32996.02}"
    },
    {
     "name": "produces_a_value",
     "ok": true,
     "note": "derived {'Central': 11215.45, 'East': 21576.59, 'South': 4800.25, 'West': 32996.02}"
    },
    {
     "name": "verifier_accepts_truth",
     "ok": true,
     "note": ""
    },
    {
     "name": "verifier_rejects_wrong",
     "ok": true,
     "note": ""
    },
    {
     "name": "abstains_without_evidence",
     "ok": true,
     "note": ""
    },
    {
     "name": "grounded_in_evidence",
     "ok": true,
     "note": ""
    }
   ]
  },
  {
   "id": "gate_ghost",
   "title": "A specification that names a column the data does not have",
   "action": "The same question, but the pipeline sums a column called amt. There is no such column.",
   "spec": {
    "question": "What is the total of all paid invoices?",
    "question_class": "demo:paid_total_ghost",
    "pipeline": [
     {
      "op": "rows"
     },
     {
      "op": "filter",
      "column": "status",
      "equals": "paid"
     },
     {
      "op": "sum",
      "column": "amt"
     }
    ],
    "do_not": [
     "include open invoices"
    ]
   },
   "exit": 1,
   "output": "REFUSED: demo:paid_total_ghost\n  [pass] structure\n  [pass] not_already_registered\n  [FAIL] columns_exist — pipeline names what the data lacks: [\"no column 'amt'\"]\n\nnothing registered — logged to ./floor/refused.jsonl",
   "verdict": "REFUSED",
   "checks": [
    {
     "name": "structure",
     "ok": true,
     "note": ""
    },
    {
     "name": "not_already_registered",
     "ok": true,
     "note": ""
    },
    {
     "name": "columns_exist",
     "ok": false,
     "note": "pipeline names what the data lacks: [\"no column 'amt'\"]"
    }
   ]
  },
  {
   "id": "gate_na",
   "title": "Data that cannot support an exact answer",
   "action": "The paid-total spec, run over a copy of the data with one invoice whose amount is N/A.",
   "spec": {
    "question": "What is the total of all paid invoices?",
    "question_class": "demo:paid_total",
    "pipeline": [
     {
      "op": "rows"
     },
     {
      "op": "filter",
      "column": "status",
      "equals": "paid"
     },
     {
      "op": "sum",
      "column": "amount"
     }
    ],
    "do_not": [
     "include open invoices"
    ]
   },
   "exit": 1,
   "output": "REFUSED: demo:paid_total\n  [pass] structure\n  [pass] not_already_registered\n  [pass] columns_exist\n  [FAIL] data_supports_answer — 1 value(s) in 'amount' are not numbers: 'N/A'\n\nnothing registered — logged to ./floor/refused.jsonl",
   "verdict": "REFUSED",
   "checks": [
    {
     "name": "structure",
     "ok": true,
     "note": ""
    },
    {
     "name": "not_already_registered",
     "ok": true,
     "note": ""
    },
    {
     "name": "columns_exist",
     "ok": true,
     "note": ""
    },
    {
     "name": "data_supports_answer",
     "ok": false,
     "note": "1 value(s) in 'amount' are not numbers: 'N/A'"
    }
   ]
  },
  {
   "id": "gate_wrong",
   "title": "A specification that is correct as written and wrong for the question",
   "action": "Labelled “total of all paid invoices”, the pipeline keeps status = open. Every mechanical check passes — this is why a person reviews and signs each tool before it ships.",
   "spec": {
    "question": "What is the total of all paid invoices?",
    "question_class": "demo:paid_total_wrong",
    "pipeline": [
     {
      "op": "rows"
     },
     {
      "op": "filter",
      "column": "status",
      "equals": "open"
     },
     {
      "op": "sum",
      "column": "amount"
     }
    ],
    "do_not": [
     "include open invoices"
    ]
   },
   "exit": 0,
   "output": "ADMITTED: demo:paid_total_wrong\n  [pass] structure\n  [pass] not_already_registered\n  [pass] columns_exist\n  [pass] data_supports_answer\n  [pass] determinism — 28962.71 then 28962.71\n  [pass] produces_a_value — derived 28962.71\n  [pass] verifier_accepts_truth\n  [pass] verifier_rejects_wrong\n  [pass] abstains_without_evidence\n  [pass] grounded_in_evidence\n\nproved the procedure 3/3 times\npromoted derive_demo_paid_total_wrong  ->  28962.71  model_calls=0\nMCP config (authoring side): ./floor/mcp.json\nnext: a person must review it before it can ship —\n  python3 -m symbolic_floor.review --data ./data --out ./floor --reviewer NAME",
   "verdict": "ADMITTED",
   "checks": [
    {
     "name": "structure",
     "ok": true,
     "note": ""
    },
    {
     "name": "not_already_registered",
     "ok": true,
     "note": ""
    },
    {
     "name": "columns_exist",
     "ok": true,
     "note": ""
    },
    {
     "name": "data_supports_answer",
     "ok": true,
     "note": ""
    },
    {
     "name": "determinism",
     "ok": true,
     "note": "28962.71 then 28962.71"
    },
    {
     "name": "produces_a_value",
     "ok": true,
     "note": "derived 28962.71"
    },
    {
     "name": "verifier_accepts_truth",
     "ok": true,
     "note": ""
    },
    {
     "name": "verifier_rejects_wrong",
     "ok": true,
     "note": ""
    },
    {
     "name": "abstains_without_evidence",
     "ok": true,
     "note": ""
    },
    {
     "name": "grounded_in_evidence",
     "ok": true,
     "note": ""
    }
   ]
  }
 ],
 "cli": {
  "check": "DERIVED     derive_demo_invoices_missing_po  ->  7\nDERIVED     derive_demo_invoices_per_month  ->  {\"2026-01\": 6, \"2026-02\": 6, \"2026-03\": 4, \"2026-04\": 8, \"2026-05\": 3, \"2026-06\": 2, \"2026-07\": 7, \"2026-08\": 7, \"2026-09\": 5}\nDERIVED     derive_demo_largest_open_invoice  ->  4901.45\nDERIVED     derive_demo_paid_by_region  ->  {\"Central\": 11215.45, \"East\": 21576.59, \"South\": 4800.25, \"West\": 32996.02}\nDERIVED     derive_demo_paid_total  ->  70588.31\nDERIVED     derive_demo_top_vendors_by_invoiced  ->  [[\"Harbor Tool Co\", 36308.95], [\"Northgate Electric\", 21489.58], [\"Blue Mesa Freight\", 18941.9]]",
  "list": "derive_demo_invoices_missing_po\n    question   : How many invoices have no PO number?\n    computes   : Take every row of invoices; count the rows with no po_number.\n    reviewed by: Perslis (demo)\nderive_demo_invoices_per_month\n    question   : How many invoices were issued each month?\n    computes   : Take every row of invoices; group by month of issued_on; count the rows in each group.\n    reviewed by: Perslis (demo)\nderive_demo_largest_open_invoice\n    question   : What is our largest open invoice?\n    computes   : Take every row of invoices; keep rows where status is 'open'; take the largest amount.\n    reviewed by: Perslis (demo)\nderive_demo_paid_by_region\n    question   : How much have we paid, by vendor region?\n    computes   : Take every row of invoices; keep rows where status is 'paid'; look up each row's vendor_id in vendors.id (every row must match, or the tool refuses); group by vendors.region; add up amount in each group (exactly).\n    reviewed by: Perslis (demo)\nderive_demo_paid_total\n    question   : What is the total of all paid invoices?\n    computes   : Take every row of invoices; keep rows where status is 'paid'; add up amount (exactly).\n    reviewed by: Perslis (demo)\nderive_demo_top_vendors_by_invoiced\n    question   : Who are our top 3 vendors by total invoiced?\n    computes   : Take every row of invoices; look up each row's vendor_id in vendors.id (every row must match, or the tool refuses); group by vendors.name; add up amount in each group (exactly); keep the top 3 groups, highest first (groups tied at the cutoff are all kept).\n    reviewed by: Perslis (demo)"
 }
}
