{
  "format": "minctrl.process/v1",
  "graph": {
    "edges": [
      {
        "id": "e0___start____intake",
        "source": "__start__",
        "target": "intake"
      },
      {
        "id": "e1_intake__split-checks",
        "source": "intake",
        "target": "split-checks"
      },
      {
        "id": "e2_split-checks__calc",
        "source": "split-checks",
        "target": "calc"
      },
      {
        "id": "e3_split-checks__screen",
        "source": "split-checks",
        "target": "screen"
      },
      {
        "id": "e4_calc__merge-checks",
        "source": "calc",
        "target": "merge-checks"
      },
      {
        "id": "e5_screen__merge-checks",
        "source": "screen",
        "target": "merge-checks"
      },
      {
        "id": "e6_merge-checks__exceptions",
        "source": "merge-checks",
        "target": "exceptions"
      },
      {
        "id": "e7_exceptions__autoclear",
        "label": "clean — within FLSA / garnishment policy",
        "source": "exceptions",
        "target": "autoclear"
      },
      {
        "id": "e8_exceptions__stage",
        "label": "exceptions — wage-law / garnishment / classification flag",
        "source": "exceptions",
        "target": "stage"
      },
      {
        "id": "e9_autoclear__signoff",
        "source": "autoclear",
        "target": "signoff"
      },
      {
        "id": "e10_stage__signoff",
        "source": "stage",
        "target": "signoff"
      },
      {
        "id": "e11_signoff__calc",
        "label": "rejected — recompute required",
        "source": "signoff",
        "target": "calc"
      },
      {
        "id": "e12_signoff__fund",
        "label": "run approved",
        "source": "signoff",
        "target": "fund"
      },
      {
        "id": "e13_fund__monitor",
        "source": "fund",
        "target": "monitor"
      },
      {
        "id": "e14_monitor__intake",
        "label": "next pay period",
        "source": "monitor",
        "target": "intake"
      }
    ],
    "nodes": [
      {
        "agent": null,
        "confidential": false,
        "gate": null,
        "gateway": null,
        "human": null,
        "id": "__start__",
        "interrupt_before": false,
        "kind": "terminal",
        "label": "Start",
        "position": {
          "x": 0,
          "y": 0
        },
        "reversible": true,
        "sla": null,
        "sla_spec": null,
        "tier": "terminal",
        "tools": []
      },
      {
        "agent": "intake",
        "confidential": false,
        "gate": null,
        "gateway": null,
        "human": null,
        "id": "intake",
        "interrupt_before": false,
        "kind": "agent",
        "label": "Intake the timesheets / hours (worked, overtime, PTO) for the pay period",
        "position": {
          "x": 0,
          "y": 120
        },
        "reversible": true,
        "sla": null,
        "sla_spec": null,
        "tier": "low",
        "tools": [
          "ocr"
        ]
      },
      {
        "agent": null,
        "confidential": false,
        "gate": null,
        "gateway": "parallel",
        "human": null,
        "id": "split-checks",
        "interrupt_before": false,
        "kind": "gateway",
        "label": "Fan out gross-to-net calculation and wage-law screening to run in parallel",
        "position": {
          "x": 0,
          "y": 240
        },
        "reversible": true,
        "sla": null,
        "sla_spec": null,
        "tier": "gateway",
        "tools": []
      },
      {
        "agent": "calculator",
        "confidential": false,
        "gate": null,
        "gateway": null,
        "human": null,
        "id": "calc",
        "interrupt_before": false,
        "kind": "agent",
        "label": "Compute gross-to-net and the payroll tax (withholdings, employer taxes)",
        "position": {
          "x": 0,
          "y": 360
        },
        "reversible": true,
        "sla": null,
        "sla_spec": null,
        "tier": "low",
        "tools": [
          "payroll-calc",
          "tax-engine"
        ]
      },
      {
        "agent": "compliance",
        "confidential": false,
        "gate": null,
        "gateway": null,
        "human": null,
        "id": "screen",
        "interrupt_before": false,
        "kind": "agent",
        "label": "Screen FLSA minimum-wage / overtime, garnishment caps and worker classification",
        "position": {
          "x": 0,
          "y": 480
        },
        "reversible": true,
        "sla": null,
        "sla_spec": null,
        "tier": "low",
        "tools": [
          "payroll-calc"
        ]
      },
      {
        "agent": null,
        "confidential": false,
        "gate": null,
        "gateway": "parallel",
        "human": null,
        "id": "merge-checks",
        "interrupt_before": false,
        "kind": "gateway",
        "label": "Join the calc and the wage-law screen once both have run",
        "position": {
          "x": 0,
          "y": 600
        },
        "reversible": true,
        "sla": null,
        "sla_spec": null,
        "tier": "gateway",
        "tools": []
      },
      {
        "agent": null,
        "confidential": false,
        "gate": null,
        "gateway": "exclusive",
        "human": null,
        "id": "exceptions",
        "interrupt_before": false,
        "kind": "gateway",
        "label": "Payroll exceptions?",
        "position": {
          "x": 0,
          "y": 720
        },
        "reversible": true,
        "sla": null,
        "sla_spec": null,
        "tier": "gateway",
        "tools": []
      },
      {
        "agent": "compliance",
        "confidential": false,
        "gate": null,
        "gateway": null,
        "human": null,
        "id": "autoclear",
        "interrupt_before": false,
        "kind": "agent",
        "label": "Clean run: auto-clear the gross-to-net against policy and draft the funding instruction — a reversible, in-policy preparation",
        "position": {
          "x": 0,
          "y": 840
        },
        "reversible": true,
        "sla": null,
        "sla_spec": null,
        "tier": "low",
        "tools": [
          "payroll-calc"
        ]
      },
      {
        "agent": "calculator",
        "confidential": false,
        "gate": null,
        "gateway": null,
        "human": null,
        "id": "stage",
        "interrupt_before": false,
        "kind": "agent",
        "label": "Exceptions found: stage the exception package (FLSA/garnishment/classification flags, recompute rationale) for the payroll manager",
        "position": {
          "x": 0,
          "y": 960
        },
        "reversible": true,
        "sla": null,
        "sla_spec": null,
        "tier": "medium",
        "tools": [
          "payroll-calc",
          "tax-engine"
        ]
      },
      {
        "agent": null,
        "confidential": false,
        "gate": "gate:payroll-officer-signoff",
        "gateway": null,
        "human": "Payroll manager (CPP) / authorized signer",
        "id": "signoff",
        "interrupt_before": true,
        "kind": "gate",
        "label": "A payroll manager (CPP) approves the run before funds move — or sends it back to recompute",
        "position": {
          "x": 0,
          "y": 1080
        },
        "reversible": false,
        "sla": null,
        "sla_spec": null,
        "tier": "high",
        "tools": []
      },
      {
        "agent": "submit",
        "confidential": false,
        "gate": null,
        "gateway": null,
        "human": null,
        "id": "fund",
        "interrupt_before": false,
        "kind": "agent",
        "label": "Fund net pay via ACH and file the tax deposit / Form 941",
        "position": {
          "x": 0,
          "y": 1200
        },
        "reversible": false,
        "sla": null,
        "sla_spec": null,
        "tier": "high",
        "tools": [
          "ach-funding",
          "payroll-filing"
        ]
      },
      {
        "agent": "monitor",
        "confidential": false,
        "gate": null,
        "gateway": null,
        "human": null,
        "id": "monitor",
        "interrupt_before": false,
        "kind": "agent",
        "label": "Reconcile the run and monitor the ACH settlement and the deposit / 941 status",
        "position": {
          "x": 0,
          "y": 1320
        },
        "reversible": true,
        "sla": null,
        "sla_spec": null,
        "tier": "low",
        "tools": [
          "payroll-filing:check-status"
        ]
      },
      {
        "agent": null,
        "confidential": false,
        "gate": null,
        "gateway": null,
        "human": null,
        "id": "__end__",
        "interrupt_before": false,
        "kind": "terminal",
        "label": "Done",
        "position": {
          "x": 0,
          "y": 1440
        },
        "reversible": true,
        "sla": null,
        "sla_spec": null,
        "tier": "terminal",
        "tools": []
      }
    ]
  },
  "hash": "c75f5c31b8ac6ca5973e18eb73d499f71bf8a15198586bfce76c672adc834ba6",
  "name": "Payroll-processing autopilot",
  "slug": "payroll",
  "source": "example",
  "version": null,
  "violations": []
}
