{
  "kind": "sg.learned.workflow",
  "schemaVersion": 1,
  "title": "Evidence-led Bedbug Resolution",
  "purpose": "A safe, case-independent AI workflow for evaluating, resolving and verifying bedbug infestations, including projects already completed.",
  "domain": "pest-management",
  "requiredInputs": [
    {
      "name": "Problem description",
      "description": "What was observed, when, in which spaces, and what has already been tried.",
      "required": true
    },
    {
      "name": "Locality and property type",
      "description": "Jurisdiction, single or multiple units, occupancy, access restrictions, pets and vulnerable occupants.",
      "required": false
    },
    {
      "name": "Existing evidence",
      "description": "Photographs, specimen identification, inspection reports, previous treatment documents and monitoring history.",
      "required": false
    },
    {
      "name": "Constraints and resources",
      "description": "Budget, urgency, available qualified contractors, disruption limits and explicit permissions.",
      "required": false
    }
  ],
  "stages": [
    {
      "id": "step-1",
      "title": "Recover context and classify intent",
      "action": "Determine whether the person is starting, continuing, or converting a completed case into a reusable method. Inventory only accessible evidence; label user reports separately from verified reports.",
      "outputs": [
        "Case brief",
        "Evidence inventory",
        "Current stage"
      ],
      "checks": [
        "No completed work is reopened when the request is workflow extraction",
        "Source availability and uncertainty are labeled"
      ],
      "decisionRule": "If sources are missing, record gaps and proceed with safe information gathering.",
      "approval": "none",
      "confidence": "inferred",
      "evidence": []
    },
    {
      "id": "step-2",
      "title": "Confirm identification and affected scope",
      "action": "Assess photographs and physical observations cautiously; seek expert identification where necessary. Map likely affected rooms and shared spaces, especially in multi-unit buildings.",
      "outputs": [
        "Identification confidence",
        "Affected-area inventory"
      ],
      "checks": [
        "Bites alone are not treated as proof",
        "Neighboring spaces and occupancy status are considered"
      ],
      "decisionRule": "If identification is uncertain, recommend confirmation before costly treatment.",
      "approval": "as-needed",
      "confidence": "inferred",
      "evidence": []
    },
    {
      "id": "step-3",
      "title": "Review previous actions and possible reinfestation",
      "action": "Reconcile prior inspection findings, methods, dates, safeguards, preparation and recurrence observations. Distinguish plausible causes from demonstrated causes.",
      "outputs": [
        "Intervention timeline",
        "Uncertainty and recurrence register"
      ],
      "checks": [
        "Claims trace to records or are explicitly unverified",
        "No invented failure mechanism"
      ],
      "decisionRule": "If prior work is undocumented, request reports or mark unknown.",
      "approval": "none",
      "confidence": "inferred",
      "evidence": []
    },
    {
      "id": "step-4",
      "title": "Investigate safe legal alternatives and costs",
      "action": "Consult current local public-health guidance, pesticide labels, contractor qualifications and manufacturer documentation. Compare licensed integrated pest management, professional heat and low-risk supportive actions, including disruptions and total costs.",
      "outputs": [
        "Options comparison",
        "Safety and cost assumptions"
      ],
      "checks": [
        "Jurisdiction-specific rules are confirmed",
        "No improvised wiring, unattended high-power heating or off-label chemicals"
      ],
      "decisionRule": "If electrical, chemical or building safety cannot be established, escalate to qualified professionals rather than prescribe a setup.",
      "approval": "none",
      "confidence": "inferred",
      "evidence": []
    },
    {
      "id": "step-5",
      "title": "Choose a route with permission gates",
      "action": "Rank the defensible options by evidence, cost, scope, risk and household or tenant constraints. Identify who can authorize spending, property access, communications and contractor work.",
      "outputs": [
        "Recommendation",
        "Approval and role register"
      ],
      "checks": [
        "No quote or effectiveness probability is invented",
        "Costs and approvals remain provisional until authorized"
      ],
      "decisionRule": "If authorization is missing, prepare alternatives but do not book, buy, send or instruct physical treatment.",
      "approval": "required",
      "confidence": "inferred",
      "evidence": []
    },
    {
      "id": "step-6",
      "title": "Oversee and document authorized field work",
      "action": "Prepare checklists, occupant communications and records for qualified operators. Document what happened, on what date, who performed it, and any deviations; never claim physical work was performed by AI.",
      "outputs": [
        "Implementation log",
        "Safety check record"
      ],
      "checks": [
        "Actual completion supported by records",
        "Professional verifies any complex heating, pesticide or electrical requirements"
      ],
      "decisionRule": "If a field safety concern appears, stop that field action and refer to a qualified person.",
      "approval": "required",
      "confidence": "inferred",
      "evidence": []
    },
    {
      "id": "step-7",
      "title": "Verify resolution and monitor appropriately",
      "action": "Define evidence-based follow-up using inspection and monitoring suitable for occupancy and building type. Distinguish treatment completed, no recent reports, negative monitoring and professional verification.",
      "outputs": [
        "Monitoring record",
        "Resolution status"
      ],
      "checks": [
        "Absence of bites alone is not treated as proof",
        "Vacant-unit monitor limitations are stated"
      ],
      "decisionRule": "When confirmed activity recurs, return to identification and scope; do not reflexively repeat an old treatment.",
      "approval": "as-needed",
      "confidence": "inferred",
      "evidence": []
    },
    {
      "id": "step-8",
      "title": "Close or checkpoint and generalize learnings",
      "action": "Report supported outcomes, actual spending and uncertainty. Close only to the level justified by evidence; publish only a privacy-screened reusable method and a handoff with the next authorized step.",
      "outputs": [
        "Closeout or provisional status",
        "Reusable method",
        "Handoff checkpoint"
      ],
      "checks": [
        "Private case data are excluded",
        "No false independent-clear claim"
      ],
      "decisionRule": "If evidence remains insufficient, label provisionally resolved and record the exact next inspection or decision.",
      "approval": "none",
      "confidence": "inferred",
      "evidence": []
    }
  ],
  "assumptions": [
    "Every new jurisdiction, building and infestation requires its own verification.",
    "Prior outcome reports are not independent efficacy evidence.",
    "Physical extermination, electrical work and chemical application are performed by authorized humans or qualified professionals.",
    "An AI session can research and prepare materials but does not perform unattended physical work or create access permissions."
  ],
  "failureModes": [
    "Bite symptoms misidentified as bedbugs — confirm specimens or obtain professional inspection.",
    "Repeated treatment misses neighboring sources — reassess connected units and shared spaces.",
    "Equipment or pesticide advice becomes unsafe — apply professional, label and electrical safety gates.",
    "A vacant apartment appears negative on passive monitors — use an occupancy-appropriate inspection approach.",
    "A claimed eradication is treated as proven — differentiate reported from independently verified outcome.",
    "An old case is reopened instead of generalized — detect completed-case-to-method intent at intake."
  ],
  "generalizationTest": {
    "differentProject": "A renter in a different jurisdiction supplies one suspected specimen, no prior treatment records and a strict budget.",
    "risks": [
      "Local laws and product availability differ.",
      "No owner authority for multi-unit inspection.",
      "Initial bedbug identification might be wrong.",
      "A generalized workflow cannot replace professional safety assessments."
    ],
    "status": "not_tested"
  },
  "sourceSummary": "Anonymized prior case discussion and generalized decision rules. Personal identities, property details, company names, invoices, communications and original case-specific outcomes are excluded. Transferability has not been independently field-tested.",
  "version": "1.0.0"
}
