← Back to Pack Library
Jurisdictionslibraryuncertifiedv2026.12.0

us-nj

New Jersey employment and staffing compliance library pack (RFC 0004): Temporary Workers' Bill of Rights assignment notice in the worker's language (N.J.S.A. 34:8D-1 et seq.) and New Jersey Form NJ-W4 withholding certificate.

Verify locally with CLI
Validate schema & rules
pnpm ir check packs/us-nj/pack.json
Run pack scenarios
pnpm ir test packs/us-nj/pack.json
2Requirements
2Concepts
6Scenarios

Requirements (2)

Compliance and operational rules declared in this pack's policies, with authority classification, legal citations, and due/renewal schedules.

New Jersey Temporary Worker Assignment Notice (in worker's language)

nj_temp_worker_notice
statutedocumentnj_notices
Dueemployer: engagement/start_date (on day) · worker: engagement/start_date (on day)
Citations
  • N.J.S.A. 34:8D-1 et seq.

New Jersey Form NJ-W4 — Employee's Withholding Allowance Certificate (confirm)

nj_w4
statutedocumentnj_tax
Dueemployee: engagement/start_date (on day)
Citations
  • NJ Gross Income Tax withholding (confirm)

Concepts (2)

Typed domain facts introduced by this pack that policies evaluate against.

ConceptTypeChoices / Description
engagement/is_temporary_workerboolean

Whether the principal is placed as a temporary worker through a temporary help service firm

principal/preferred_languagestring

Primary language of the principal for statutory assignment notices (e.g. ISO 639-1 code such as en, es)

Scenarios (6)

Executable compliance test cases verified against this pack by pnpm ir test.

nj-temp-w2-applies
as of 2026-12-01

New US W-2 temporary worker placed in New Jersey requires both the Temporary Worker Assignment Notice (in worker's language) and Form NJ-W4.

Given facts
work/location_country=USwork/location_state=NJengagement/classification=w2engagement/is_temporary_worker=trueengagement/start_date=2026-12-07engagement/reviewer=usr_ops_01engagement/employer_id=emp_nj_01principal/preferred_language=es
Expected outcomes
+ nj_temp_worker_notice+ nj_w4nj_temp_worker_notice: availablenj_w4: availablewake_at: 2026-12-08
nj-direct-w2-no-temp-notice
as of 2026-12-01

Direct-hire (non-temporary) W-2 employee in New Jersey requires Form NJ-W4 but not the Temporary Worker Assignment Notice.

Given facts
work/location_country=USwork/location_state=NJengagement/classification=w2engagement/is_temporary_worker=falseengagement/start_date=2026-12-07engagement/reviewer=usr_ops_01engagement/employer_id=emp_nj_01principal/preferred_language=en
Expected outcomes
+ nj_w4− nj_temp_worker_noticenj_w4: availablewake_at: 2026-12-08
non-nj-and-1099-exempt
as of 2026-12-011 step

Temporary W-2 worker in Pennsylvania does not trigger New Jersey requirements, nor does a non-temporary 1099 contractor in New Jersey.

Given facts
work/location_country=USwork/location_state=PAengagement/classification=w2engagement/is_temporary_worker=trueengagement/start_date=2026-12-07engagement/reviewer=usr_ops_01engagement/employer_id=emp_nj_01principal/preferred_language=en
Expected outcomes
− nj_temp_worker_notice− nj_w4
missing-facts-tentative
as of 2026-12-011 step

When engagement/is_temporary_worker, engagement/classification, and principal/preferred_language are unknown in New Jersey, both requirements are tentative and blocked on facts until supplied.

Given facts
work/location_country=USwork/location_state=NJengagement/start_date=2026-12-07engagement/reviewer=usr_ops_01engagement/employer_id=emp_nj_01
Expected outcomes
+ nj_temp_worker_notice+ nj_w4nj_temp_worker_notice: blocked_on_factsnj_w4: blocked_on_facts
due-date-and-missing-start-date
as of 2026-12-012 steps

Missing engagement/start_date blocks both New Jersey requirements until the start date is supplied; both are due on the start date and become overdue the next day.

Given facts
work/location_country=USwork/location_state=NJengagement/classification=w2engagement/is_temporary_worker=trueengagement/reviewer=usr_ops_01engagement/employer_id=emp_nj_01principal/preferred_language=en
Expected outcomes
+ nj_temp_worker_notice+ nj_w4nj_temp_worker_notice: blocked_on_factsnj_w4: blocked_on_facts
nj-w4-rehire-reuse
as of 2026-12-01

Returning temporary W-2 worker in New Jersey for the same employer reuses prior Form NJ-W4 while requiring a fresh Temporary Worker Assignment Notice for the new assignment.

Given facts
work/location_country=USwork/location_state=NJengagement/classification=w2engagement/is_temporary_worker=trueengagement/start_date=2026-12-07engagement/reviewer=usr_ops_01engagement/employer_id=emp_nj_01principal/preferred_language=es
Expected outcomes
+ nj_temp_worker_notice+ nj_w4nj_temp_worker_notice: availablenj_w4: complete

Pack JSON

Show raw packs/us-nj/pack.json
{
  "format": 1,
  "name": "us-nj",
  "version": "2026.12.0",
  "kind": "library",
  "description": "New Jersey employment and staffing compliance library pack (RFC 0004): Temporary Workers' Bill of Rights assignment notice in the worker's language (N.J.S.A. 34:8D-1 et seq.) and New Jersey Form NJ-W4 withholding certificate.",
  "requires": [
    {
      "name": "staffing-core",
      "range": "^2026.12"
    }
  ],
  "concepts": [
    {
      "key": "engagement/is_temporary_worker",
      "type": "boolean",
      "description": "Whether the principal is placed as a temporary worker through a temporary help service firm"
    },
    {
      "key": "principal/preferred_language",
      "type": "string",
      "description": "Primary language of the principal for statutory assignment notices (e.g. ISO 639-1 code such as en, es)"
    }
  ],
  "templates": [
    {
      "key": "us_nj_temp_worker_notice",
      "version": "2026.1.0",
      "title": "New Jersey Temporary Worker Assignment Notice (N.J.S.A. 34:8D-1 et seq.)",
      "roles": [
        {
          "name": "employer",
          "kind": "user",
          "label": "Staffing Firm Representative"
        },
        {
          "name": "worker",
          "kind": "person",
          "label": "Temporary Worker",
          "after": [
            "employer"
          ]
        }
      ],
      "sections": [
        {
          "id": "assignment_terms",
          "role": "employer",
          "title": "Assignment and Wage Disclosures",
          "fields": [
            {
              "id": "staffing_firm_name",
              "type": "text",
              "label": "Legal Name of Temporary Help Service Firm",
              "required": true
            },
            {
              "id": "client_worksite_name",
              "type": "text",
              "label": "Third-Party Client Name and Worksite Address",
              "required": true
            },
            {
              "id": "nature_of_work",
              "type": "text",
              "label": "Nature of Work to Be Performed",
              "required": true
            },
            {
              "id": "wage_rate",
              "type": "text",
              "label": "Wages Offered and Overtime Rate",
              "required": true
            },
            {
              "id": "payday_schedule",
              "type": "text",
              "label": "Regular Payday and Pay Schedule",
              "required": true
            },
            {
              "id": "assignment_schedule",
              "type": "text",
              "label": "Expected Schedule and Duration of Assignment",
              "required": true
            },
            {
              "id": "workers_comp_carrier",
              "type": "text",
              "label": "Workers' Compensation Insurance Carrier",
              "required": true
            }
          ]
        },
        {
          "id": "acknowledgment",
          "role": "worker",
          "title": "Temporary Worker Acknowledgment of Receipt",
          "readable": [
            "assignment_terms"
          ],
          "fields": [
            {
              "id": "received_date",
              "type": "date",
              "label": "Date Received",
              "required": true
            }
          ],
          "signature": {
            "id": "worker_signature",
            "attestation": "I acknowledge receipt of this New Jersey Temporary Worker Assignment Notice pursuant to N.J.S.A. 34:8D-1 et seq.",
            "covers": [
              "assignment_terms",
              "acknowledgment"
            ]
          }
        }
      ]
    },
    {
      "key": "us_nj_temp_worker_notice_bilingual",
      "version": "2026.1.0",
      "title": "New Jersey Temporary Worker Assignment Notice — English and Primary Language (N.J.S.A. 34:8D-1 et seq.)",
      "roles": [
        {
          "name": "employer",
          "kind": "user",
          "label": "Staffing Firm Representative"
        },
        {
          "name": "worker",
          "kind": "person",
          "label": "Temporary Worker",
          "after": [
            "employer"
          ]
        }
      ],
      "sections": [
        {
          "id": "assignment_terms",
          "role": "employer",
          "title": "Assignment and Wage Disclosures (English and Primary Language)",
          "fields": [
            {
              "id": "staffing_firm_name",
              "type": "text",
              "label": "Legal Name of Temporary Help Service Firm",
              "required": true
            },
            {
              "id": "client_worksite_name",
              "type": "text",
              "label": "Third-Party Client Name and Worksite Address",
              "required": true
            },
            {
              "id": "notice_language",
              "type": "text",
              "label": "Worker's Primary Language Provided Alongside English",
              "required": true
            },
            {
              "id": "nature_of_work",
              "type": "text",
              "label": "Nature of Work to Be Performed",
              "required": true
            },
            {
              "id": "wage_rate",
              "type": "text",
              "label": "Wages Offered and Overtime Rate",
              "required": true
            },
            {
              "id": "payday_schedule",
              "type": "text",
              "label": "Regular Payday and Pay Schedule",
              "required": true
            },
            {
              "id": "assignment_schedule",
              "type": "text",
              "label": "Expected Schedule and Duration of Assignment",
              "required": true
            },
            {
              "id": "workers_comp_carrier",
              "type": "text",
              "label": "Workers' Compensation Insurance Carrier",
              "required": true
            }
          ]
        },
        {
          "id": "acknowledgment",
          "role": "worker",
          "title": "Temporary Worker Acknowledgment of Receipt",
          "readable": [
            "assignment_terms"
          ],
          "fields": [
            {
              "id": "received_date",
              "type": "date",
              "label": "Date Received",
              "required": true
            }
          ],
          "signature": {
            "id": "worker_signature",
            "attestation": "I acknowledge receipt of this New Jersey Temporary Worker Assignment Notice in English and my primary language pursuant to N.J.S.A. 34:8D-1 et seq.",
            "covers": [
              "assignment_terms",
              "acknowledgment"
            ]
          }
        }
      ]
    },
    {
      "key": "us_nj_w4",
      "version": "2026.1.0",
      "title": "New Jersey Form NJ-W4 — Employee's Withholding Allowance Certificate",
      "roles": [
        {
          "name": "employee",
          "kind": "person",
          "label": "Employee"
        }
      ],
      "sections": [
        {
          "id": "withholding_certificate",
          "role": "employee",
          "title": "New Jersey Gross Income Tax Withholding Elections",
          "fields": [
            {
              "id": "filing_status",
              "type": "choice",
              "label": "Filing Status",
              "options": [
                "single",
                "married_joint",
                "married_separate",
                "head_of_household",
                "qualifying_surviving_spouse"
              ],
              "required": true
            },
            {
              "id": "total_allowances",
              "type": "text",
              "label": "Total Number of Allowances Claimed",
              "required": true
            },
            {
              "id": "additional_withholding",
              "type": "text",
              "label": "Additional Amount to Withhold Per Pay Period",
              "required": false
            },
            {
              "id": "exempt_claim",
              "type": "choice",
              "label": "Claim Exemption from New Jersey Withholding",
              "options": [
                "no",
                "yes"
              ],
              "required": true
            }
          ],
          "signature": {
            "id": "employee_signature",
            "attestation": "I certify under the penalties of perjury that the withholding allowances claimed on this New Jersey Form NJ-W4 are true and correct.",
            "covers": [
              "withholding_certificate"
            ]
          }
        }
      ]
    }
  ],
  "policies": [
    {
      "key": "us-nj",
      "version": "2026.12.0",
      "facts": {
        "work/location_country": {
          "type": "choice",
          "options": [
            "US",
            "CA",
            "GB",
            "MX",
            "OTHER"
          ]
        },
        "work/location_state": {
          "type": "choice",
          "options": [
            "AL",
            "AK",
            "AZ",
            "AR",
            "CA",
            "CO",
            "CT",
            "DE",
            "DC",
            "FL",
            "GA",
            "HI",
            "ID",
            "IL",
            "IN",
            "IA",
            "KS",
            "KY",
            "LA",
            "ME",
            "MD",
            "MA",
            "MI",
            "MN",
            "MS",
            "MO",
            "MT",
            "NE",
            "NV",
            "NH",
            "NJ",
            "NM",
            "NY",
            "NC",
            "ND",
            "OH",
            "OK",
            "OR",
            "PA",
            "PR",
            "RI",
            "SC",
            "SD",
            "TN",
            "TX",
            "UT",
            "VT",
            "VA",
            "WA",
            "WV",
            "WI",
            "WY"
          ]
        },
        "engagement/classification": {
          "type": "choice",
          "options": [
            "w2",
            "1099"
          ]
        },
        "engagement/is_temporary_worker": {
          "type": "boolean"
        },
        "engagement/start_date": {
          "type": "date"
        },
        "engagement/reviewer": {
          "type": "string"
        },
        "engagement/employer_id": {
          "type": "string"
        },
        "principal/preferred_language": {
          "type": "string"
        }
      },
      "stages": [
        {
          "id": "nj_notices",
          "title": "New Jersey Statutory Notices"
        },
        {
          "id": "nj_tax",
          "title": "New Jersey Tax Withholding"
        }
      ],
      "requirements": {
        "nj_temp_worker_notice": {
          "title": "New Jersey Temporary Worker Assignment Notice (in worker's language)",
          "kind": "document",
          "template": "us_nj_temp_worker_notice",
          "variants": [
            {
              "when": {
                "fact": "principal/preferred_language",
                "operator": "notEqual",
                "value": "en",
                "ignore_case": true
              },
              "template": "us_nj_temp_worker_notice_bilingual"
            }
          ],
          "stage": "nj_notices",
          "parties": {
            "employer": "engagement/reviewer",
            "worker": "subject"
          },
          "due": {
            "employer": {
              "relative_to": "engagement/start_date",
              "days": 0
            },
            "worker": {
              "relative_to": "engagement/start_date",
              "days": 0
            }
          },
          "on_unknown": "wait",
          "cites": [
            "N.J.S.A. 34:8D-1 et seq."
          ],
          "authority": "statute"
        },
        "nj_w4": {
          "title": "New Jersey Form NJ-W4 — Employee's Withholding Allowance Certificate (confirm)",
          "kind": "document",
          "template": "us_nj_w4",
          "stage": "nj_tax",
          "parties": {
            "employee": "subject"
          },
          "due": {
            "employee": {
              "relative_to": "engagement/start_date",
              "days": 0
            }
          },
          "reuse": {
            "same": [
              "engagement/employer_id"
            ],
            "outcome": "satisfies"
          },
          "on_unknown": "wait",
          "cites": [
            "NJ Gross Income Tax withholding (confirm)"
          ],
          "authority": "statute"
        }
      },
      "policies": [
        {
          "id": "us-nj-temp-worker-notice",
          "title": "New Jersey Temporary Worker Assignment Notice for temporary workers placed in New Jersey",
          "when": {
            "all": [
              {
                "fact": "work/location_country",
                "operator": "equal",
                "value": "US"
              },
              {
                "fact": "work/location_state",
                "operator": "equal",
                "value": "NJ"
              },
              {
                "fact": "engagement/is_temporary_worker",
                "operator": "equal",
                "value": true
              }
            ]
          },
          "require": [
            "nj_temp_worker_notice"
          ],
          "optional": false,
          "cites": [
            "N.J.S.A. 34:8D-1 et seq."
          ]
        },
        {
          "id": "us-nj-w4-w2",
          "title": "New Jersey Form NJ-W4 for W-2 employees working in New Jersey",
          "when": {
            "all": [
              {
                "fact": "work/location_country",
                "operator": "equal",
                "value": "US"
              },
              {
                "fact": "work/location_state",
                "operator": "equal",
                "value": "NJ"
              },
              {
                "fact": "engagement/classification",
                "operator": "equal",
                "value": "w2"
              }
            ]
          },
          "require": [
            "nj_w4"
          ],
          "optional": false,
          "cites": [
            "NJ Gross Income Tax withholding (confirm)"
          ]
        }
      ]
    }
  ],
  "scenarios": [
    {
      "name": "nj-temp-w2-applies",
      "description": "New US W-2 temporary worker placed in New Jersey requires both the Temporary Worker Assignment Notice (in worker's language) and Form NJ-W4.",
      "policy_set": "us-nj",
      "as_of": "2026-12-01",
      "facts": {
        "work/location_country": "US",
        "work/location_state": "NJ",
        "engagement/classification": "w2",
        "engagement/is_temporary_worker": true,
        "engagement/start_date": "2026-12-07",
        "engagement/reviewer": "usr_ops_01",
        "engagement/employer_id": "emp_nj_01",
        "principal/preferred_language": "es"
      },
      "expect": {
        "required": [
          "nj_temp_worker_notice",
          "nj_w4"
        ],
        "not_required": [],
        "states": {
          "nj_temp_worker_notice": "available",
          "nj_w4": "available"
        },
        "wake_at": "2026-12-08",
        "missing_facts": []
      }
    },
    {
      "name": "nj-direct-w2-no-temp-notice",
      "description": "Direct-hire (non-temporary) W-2 employee in New Jersey requires Form NJ-W4 but not the Temporary Worker Assignment Notice.",
      "policy_set": "us-nj",
      "as_of": "2026-12-01",
      "facts": {
        "work/location_country": "US",
        "work/location_state": "NJ",
        "engagement/classification": "w2",
        "engagement/is_temporary_worker": false,
        "engagement/start_date": "2026-12-07",
        "engagement/reviewer": "usr_ops_01",
        "engagement/employer_id": "emp_nj_01",
        "principal/preferred_language": "en"
      },
      "expect": {
        "required": [
          "nj_w4"
        ],
        "not_required": [
          "nj_temp_worker_notice"
        ],
        "states": {
          "nj_w4": "available"
        },
        "wake_at": "2026-12-08",
        "missing_facts": []
      }
    },
    {
      "name": "non-nj-and-1099-exempt",
      "description": "Temporary W-2 worker in Pennsylvania does not trigger New Jersey requirements, nor does a non-temporary 1099 contractor in New Jersey.",
      "policy_set": "us-nj",
      "as_of": "2026-12-01",
      "facts": {
        "work/location_country": "US",
        "work/location_state": "PA",
        "engagement/classification": "w2",
        "engagement/is_temporary_worker": true,
        "engagement/start_date": "2026-12-07",
        "engagement/reviewer": "usr_ops_01",
        "engagement/employer_id": "emp_nj_01",
        "principal/preferred_language": "en"
      },
      "expect": {
        "required": [],
        "not_required": [
          "nj_temp_worker_notice",
          "nj_w4"
        ],
        "missing_facts": []
      },
      "steps": [
        {
          "name": "nj-non-temp-1099-contractor",
          "set_facts": {
            "work/location_state": "NJ",
            "engagement/classification": "1099",
            "engagement/is_temporary_worker": false
          },
          "expect": {
            "required": [],
            "not_required": [
              "nj_temp_worker_notice",
              "nj_w4"
            ],
            "missing_facts": []
          }
        }
      ]
    },
    {
      "name": "missing-facts-tentative",
      "description": "When engagement/is_temporary_worker, engagement/classification, and principal/preferred_language are unknown in New Jersey, both requirements are tentative and blocked on facts until supplied.",
      "policy_set": "us-nj",
      "as_of": "2026-12-01",
      "facts": {
        "work/location_country": "US",
        "work/location_state": "NJ",
        "engagement/start_date": "2026-12-07",
        "engagement/reviewer": "usr_ops_01",
        "engagement/employer_id": "emp_nj_01"
      },
      "expect": {
        "required": [
          "nj_temp_worker_notice",
          "nj_w4"
        ],
        "not_required": [],
        "states": {
          "nj_temp_worker_notice": "blocked_on_facts",
          "nj_w4": "blocked_on_facts"
        },
        "missing_facts": [
          "engagement/classification",
          "engagement/is_temporary_worker",
          "principal/preferred_language"
        ]
      },
      "steps": [
        {
          "name": "supply-missing-facts",
          "set_facts": {
            "engagement/classification": "w2",
            "engagement/is_temporary_worker": true,
            "principal/preferred_language": "es"
          },
          "expect": {
            "required": [
              "nj_temp_worker_notice",
              "nj_w4"
            ],
            "not_required": [],
            "states": {
              "nj_temp_worker_notice": "available",
              "nj_w4": "available"
            },
            "missing_facts": []
          }
        }
      ]
    },
    {
      "name": "due-date-and-missing-start-date",
      "description": "Missing engagement/start_date blocks both New Jersey requirements until the start date is supplied; both are due on the start date and become overdue the next day.",
      "policy_set": "us-nj",
      "as_of": "2026-12-01",
      "facts": {
        "work/location_country": "US",
        "work/location_state": "NJ",
        "engagement/classification": "w2",
        "engagement/is_temporary_worker": true,
        "engagement/reviewer": "usr_ops_01",
        "engagement/employer_id": "emp_nj_01",
        "principal/preferred_language": "en"
      },
      "expect": {
        "required": [
          "nj_temp_worker_notice",
          "nj_w4"
        ],
        "not_required": [],
        "states": {
          "nj_temp_worker_notice": "blocked_on_facts",
          "nj_w4": "blocked_on_facts"
        },
        "missing_facts": [
          "engagement/start_date"
        ]
      },
      "steps": [
        {
          "name": "supply-start-date",
          "set_facts": {
            "engagement/start_date": "2026-12-07"
          },
          "expect": {
            "required": [
              "nj_temp_worker_notice",
              "nj_w4"
            ],
            "not_required": [],
            "states": {
              "nj_temp_worker_notice": "available",
              "nj_w4": "available"
            },
            "wake_at": "2026-12-08",
            "missing_facts": []
          }
        },
        {
          "name": "advance-past-due-date",
          "as_of": "2026-12-08",
          "expect": {
            "required": [
              "nj_temp_worker_notice",
              "nj_w4"
            ],
            "not_required": [],
            "states": {
              "nj_temp_worker_notice": "overdue",
              "nj_w4": "overdue"
            },
            "missing_facts": []
          }
        }
      ]
    },
    {
      "name": "nj-w4-rehire-reuse",
      "description": "Returning temporary W-2 worker in New Jersey for the same employer reuses prior Form NJ-W4 while requiring a fresh Temporary Worker Assignment Notice for the new assignment.",
      "policy_set": "us-nj",
      "as_of": "2026-12-01",
      "facts": {
        "work/location_country": "US",
        "work/location_state": "NJ",
        "engagement/classification": "w2",
        "engagement/is_temporary_worker": true,
        "engagement/start_date": "2026-12-07",
        "engagement/reviewer": "usr_ops_01",
        "engagement/employer_id": "emp_nj_01",
        "principal/preferred_language": "es"
      },
      "evidence": [
        {
          "id": "doc_prior_nj_w4",
          "template": "us_nj_w4",
          "template_version": "2026.1.0",
          "status": "completed",
          "completed_at": "2026-06-15",
          "facts": {
            "engagement/employer_id": "emp_nj_01"
          }
        }
      ],
      "expect": {
        "required": [
          "nj_temp_worker_notice",
          "nj_w4"
        ],
        "not_required": [],
        "states": {
          "nj_temp_worker_notice": "available",
          "nj_w4": "complete"
        },
        "missing_facts": []
      }
    }
  ]
}

Forma Lisp

Show Forma Lisp source us-nj.forma
(pack us-nj
  :format 1
  :version "2026.12.0"
  :kind "library"
  :description "New Jersey employment and staffing compliance library pack (RFC 0004): Temporary Workers' Bill of Rights assignment notice in the worker's language (N.J.S.A. 34:8D-1 et seq.) and New Jersey Form NJ-W4 withholding certificate.")

;; ── Pack Dependencies ──────────────────────────────────────────────────────

(require-pack staffing-core :range "^2026.12")

;; ── Concepts ───────────────────────────────────────────────────────────────

(concept "engagement/is_temporary_worker"
  :type "boolean"
  :description "Whether the principal is placed as a temporary worker through a temporary help service firm")

(concept "principal/preferred_language"
  :type "string"
  :description "Primary language of the principal for statutory assignment notices (e.g. ISO 639-1 code such as en, es)")

;; ── Document Templates ─────────────────────────────────────────────────────

(template us_nj_temp_worker_notice
  :version "2026.1.0"
  :title "New Jersey Temporary Worker Assignment Notice (N.J.S.A. 34:8D-1 et seq.)"
  :roles
    [{:name "employer" :kind "user" :label "Staffing Firm Representative"}
     {:name "worker" :kind "person" :label "Temporary Worker" :after ["employer"]}]
  :sections
    [{:id "assignment_terms"
       :role "employer"
       :title "Assignment and Wage Disclosures"
       :fields
        [{:id "staffing_firm_name"
           :type "text"
           :label "Legal Name of Temporary Help Service Firm"
           :required true}
         {:id "client_worksite_name"
           :type "text"
           :label "Third-Party Client Name and Worksite Address"
           :required true}
         {:id "nature_of_work"
           :type "text"
           :label "Nature of Work to Be Performed"
           :required true}
         {:id "wage_rate"
           :type "text"
           :label "Wages Offered and Overtime Rate"
           :required true}
         {:id "payday_schedule"
           :type "text"
           :label "Regular Payday and Pay Schedule"
           :required true}
         {:id "assignment_schedule"
           :type "text"
           :label "Expected Schedule and Duration of Assignment"
           :required true}
         {:id "workers_comp_carrier"
           :type "text"
           :label "Workers' Compensation Insurance Carrier"
           :required true}]}
     {:id "acknowledgment"
       :role "worker"
       :title "Temporary Worker Acknowledgment of Receipt"
       :readable ["assignment_terms"]
       :fields [{:id "received_date" :type "date" :label "Date Received" :required true}]
       :signature
        {:id "worker_signature"
         :attestation "I acknowledge receipt of this New Jersey Temporary Worker Assignment Notice pursuant to N.J.S.A. 34:8D-1 et seq."
         :covers ["assignment_terms" "acknowledgment"]}}])

(template us_nj_temp_worker_notice_bilingual
  :version "2026.1.0"
  :title "New Jersey Temporary Worker Assignment Notice — English and Primary Language (N.J.S.A. 34:8D-1 et seq.)"
  :roles
    [{:name "employer" :kind "user" :label "Staffing Firm Representative"}
     {:name "worker" :kind "person" :label "Temporary Worker" :after ["employer"]}]
  :sections
    [{:id "assignment_terms"
       :role "employer"
       :title "Assignment and Wage Disclosures (English and Primary Language)"
       :fields
        [{:id "staffing_firm_name"
           :type "text"
           :label "Legal Name of Temporary Help Service Firm"
           :required true}
         {:id "client_worksite_name"
           :type "text"
           :label "Third-Party Client Name and Worksite Address"
           :required true}
         {:id "notice_language"
           :type "text"
           :label "Worker's Primary Language Provided Alongside English"
           :required true}
         {:id "nature_of_work"
           :type "text"
           :label "Nature of Work to Be Performed"
           :required true}
         {:id "wage_rate"
           :type "text"
           :label "Wages Offered and Overtime Rate"
           :required true}
         {:id "payday_schedule"
           :type "text"
           :label "Regular Payday and Pay Schedule"
           :required true}
         {:id "assignment_schedule"
           :type "text"
           :label "Expected Schedule and Duration of Assignment"
           :required true}
         {:id "workers_comp_carrier"
           :type "text"
           :label "Workers' Compensation Insurance Carrier"
           :required true}]}
     {:id "acknowledgment"
       :role "worker"
       :title "Temporary Worker Acknowledgment of Receipt"
       :readable ["assignment_terms"]
       :fields [{:id "received_date" :type "date" :label "Date Received" :required true}]
       :signature
        {:id "worker_signature"
         :attestation "I acknowledge receipt of this New Jersey Temporary Worker Assignment Notice in English and my primary language pursuant to N.J.S.A. 34:8D-1 et seq."
         :covers ["assignment_terms" "acknowledgment"]}}])

(template us_nj_w4
  :version "2026.1.0"
  :title "New Jersey Form NJ-W4 — Employee's Withholding Allowance Certificate"
  :roles [{:name "employee" :kind "person" :label "Employee"}]
  :sections
    [{:id "withholding_certificate"
       :role "employee"
       :title "New Jersey Gross Income Tax Withholding Elections"
       :fields
        [{:id "filing_status"
           :type "choice"
           :label "Filing Status"
           :options
            ["single"
             "married_joint"
             "married_separate"
             "head_of_household"
             "qualifying_surviving_spouse"]
           :required true}
         {:id "total_allowances"
           :type "text"
           :label "Total Number of Allowances Claimed"
           :required true}
         {:id "additional_withholding"
           :type "text"
           :label "Additional Amount to Withhold Per Pay Period"
           :required false}
         {:id "exempt_claim"
           :type "choice"
           :label "Claim Exemption from New Jersey Withholding"
           :options ["no" "yes"]
           :required true}]
       :signature
        {:id "employee_signature"
         :attestation "I certify under the penalties of perjury that the withholding allowances claimed on this New Jersey Form NJ-W4 are true and correct."
         :covers ["withholding_certificate"]}}])

;; ── Compliance Policy Sets ─────────────────────────────────────────────────

(policy-set us-nj
  :version "2026.12.0"
  :facts
    {"work/location_country" {:type "choice" :options ["US" "CA" "GB" "MX" "OTHER"]}
     "work/location_state"
      {:type "choice"
       :options
        ["AL"
         "AK"
         "AZ"
         "AR"
         "CA"
         "CO"
         "CT"
         "DE"
         "DC"
         "FL"
         "GA"
         "HI"
         "ID"
         "IL"
         "IN"
         "IA"
         "KS"
         "KY"
         "LA"
         "ME"
         "MD"
         "MA"
         "MI"
         "MN"
         "MS"
         "MO"
         "MT"
         "NE"
         "NV"
         "NH"
         "NJ"
         "NM"
         "NY"
         "NC"
         "ND"
         "OH"
         "OK"
         "OR"
         "PA"
         "PR"
         "RI"
         "SC"
         "SD"
         "TN"
         "TX"
         "UT"
         "VT"
         "VA"
         "WA"
         "WV"
         "WI"
         "WY"]}
     "engagement/classification" {:type "choice" :options ["w2" "1099"]}
     "engagement/is_temporary_worker" {:type "boolean"}
     "engagement/start_date" {:type "date"}
     "engagement/reviewer" {:type "string"}
     "engagement/employer_id" {:type "string"}
     "principal/preferred_language" {:type "string"}}
  :stages
    [{:id "nj_notices" :title "New Jersey Statutory Notices"}
     {:id "nj_tax" :title "New Jersey Tax Withholding"}]
  :requirements
    {:nj_temp_worker_notice
      {:title "New Jersey Temporary Worker Assignment Notice (in worker's language)"
       :kind "document"
       :template "us_nj_temp_worker_notice"
       :variants
        [{:when
            {:fact "principal/preferred_language"
             :operator "notEqual"
             :value "en"
             :ignore_case true}
           :template "us_nj_temp_worker_notice_bilingual"}]
       :stage "nj_notices"
       :parties {:employer "engagement/reviewer" :worker "subject"}
       :due
        {:employer {:relative_to "engagement/start_date" :days 0}
         :worker {:relative_to "engagement/start_date" :days 0}}
       :on_unknown "wait"
       :cites ["N.J.S.A. 34:8D-1 et seq."]
       :authority "statute"}
     :nj_w4
      {:title "New Jersey Form NJ-W4 — Employee's Withholding Allowance Certificate (confirm)"
       :kind "document"
       :template "us_nj_w4"
       :stage "nj_tax"
       :parties {:employee "subject"}
       :due {:employee {:relative_to "engagement/start_date" :days 0}}
       :reuse {:same ["engagement/employer_id"] :outcome "satisfies"}
       :on_unknown "wait"
       :cites ["NJ Gross Income Tax withholding (confirm)"]
       :authority "statute"}}
  :policies
    [{:id "us-nj-temp-worker-notice"
       :title "New Jersey Temporary Worker Assignment Notice for temporary workers placed in New Jersey"
       :when
        {:all
          [{:fact "work/location_country" :operator "equal" :value "US"}
           {:fact "work/location_state" :operator "equal" :value "NJ"}
           {:fact "engagement/is_temporary_worker" :operator "equal" :value true}]}
       :require ["nj_temp_worker_notice"]
       :optional false
       :cites ["N.J.S.A. 34:8D-1 et seq."]}
     {:id "us-nj-w4-w2"
       :title "New Jersey Form NJ-W4 for W-2 employees working in New Jersey"
       :when
        {:all
          [{:fact "work/location_country" :operator "equal" :value "US"}
           {:fact "work/location_state" :operator "equal" :value "NJ"}
           {:fact "engagement/classification" :operator "equal" :value "w2"}]}
       :require ["nj_w4"]
       :optional false
       :cites ["NJ Gross Income Tax withholding (confirm)"]}])

;; ── Declarative Scenarios ──────────────────────────────────────────────────

(scenario nj-temp-w2-applies
  :description "New US W-2 temporary worker placed in New Jersey requires both the Temporary Worker Assignment Notice (in worker's language) and Form NJ-W4."
  :policy-set "us-nj"
  :as-of "2026-12-01"
  :facts
    {"work/location_country" "US"
     "work/location_state" "NJ"
     "engagement/classification" "w2"
     "engagement/is_temporary_worker" true
     "engagement/start_date" "2026-12-07"
     "engagement/reviewer" "usr_ops_01"
     "engagement/employer_id" "emp_nj_01"
     "principal/preferred_language" "es"}
  :expect
    {:required ["nj_temp_worker_notice" "nj_w4"]
     :not_required []
     :states {:nj_temp_worker_notice "available" :nj_w4 "available"}
     :wake_at "2026-12-08"
     :missing_facts []})

(scenario nj-direct-w2-no-temp-notice
  :description "Direct-hire (non-temporary) W-2 employee in New Jersey requires Form NJ-W4 but not the Temporary Worker Assignment Notice."
  :policy-set "us-nj"
  :as-of "2026-12-01"
  :facts
    {"work/location_country" "US"
     "work/location_state" "NJ"
     "engagement/classification" "w2"
     "engagement/is_temporary_worker" false
     "engagement/start_date" "2026-12-07"
     "engagement/reviewer" "usr_ops_01"
     "engagement/employer_id" "emp_nj_01"
     "principal/preferred_language" "en"}
  :expect
    {:required ["nj_w4"]
     :not_required ["nj_temp_worker_notice"]
     :states {:nj_w4 "available"}
     :wake_at "2026-12-08"
     :missing_facts []})

(scenario non-nj-and-1099-exempt
  :description "Temporary W-2 worker in Pennsylvania does not trigger New Jersey requirements, nor does a non-temporary 1099 contractor in New Jersey."
  :policy-set "us-nj"
  :as-of "2026-12-01"
  :facts
    {"work/location_country" "US"
     "work/location_state" "PA"
     "engagement/classification" "w2"
     "engagement/is_temporary_worker" true
     "engagement/start_date" "2026-12-07"
     "engagement/reviewer" "usr_ops_01"
     "engagement/employer_id" "emp_nj_01"
     "principal/preferred_language" "en"}
  :expect {:required [] :not_required ["nj_temp_worker_notice" "nj_w4"] :missing_facts []}
  :steps
    [{:name "nj-non-temp-1099-contractor"
       :set_facts
        {"work/location_state" "NJ"
         "engagement/classification" "1099"
         "engagement/is_temporary_worker" false}
       :expect {:required [] :not_required ["nj_temp_worker_notice" "nj_w4"] :missing_facts []}}])

(scenario missing-facts-tentative
  :description "When engagement/is_temporary_worker, engagement/classification, and principal/preferred_language are unknown in New Jersey, both requirements are tentative and blocked on facts until supplied."
  :policy-set "us-nj"
  :as-of "2026-12-01"
  :facts
    {"work/location_country" "US"
     "work/location_state" "NJ"
     "engagement/start_date" "2026-12-07"
     "engagement/reviewer" "usr_ops_01"
     "engagement/employer_id" "emp_nj_01"}
  :expect
    {:required ["nj_temp_worker_notice" "nj_w4"]
     :not_required []
     :states {:nj_temp_worker_notice "blocked_on_facts" :nj_w4 "blocked_on_facts"}
     :missing_facts
      ["engagement/classification"
       "engagement/is_temporary_worker"
       "principal/preferred_language"]}
  :steps
    [{:name "supply-missing-facts"
       :set_facts
        {"engagement/classification" "w2"
         "engagement/is_temporary_worker" true
         "principal/preferred_language" "es"}
       :expect
        {:required ["nj_temp_worker_notice" "nj_w4"]
         :not_required []
         :states {:nj_temp_worker_notice "available" :nj_w4 "available"}
         :missing_facts []}}])

(scenario due-date-and-missing-start-date
  :description "Missing engagement/start_date blocks both New Jersey requirements until the start date is supplied; both are due on the start date and become overdue the next day."
  :policy-set "us-nj"
  :as-of "2026-12-01"
  :facts
    {"work/location_country" "US"
     "work/location_state" "NJ"
     "engagement/classification" "w2"
     "engagement/is_temporary_worker" true
     "engagement/reviewer" "usr_ops_01"
     "engagement/employer_id" "emp_nj_01"
     "principal/preferred_language" "en"}
  :expect
    {:required ["nj_temp_worker_notice" "nj_w4"]
     :not_required []
     :states {:nj_temp_worker_notice "blocked_on_facts" :nj_w4 "blocked_on_facts"}
     :missing_facts ["engagement/start_date"]}
  :steps
    [{:name "supply-start-date"
       :set_facts {"engagement/start_date" "2026-12-07"}
       :expect
        {:required ["nj_temp_worker_notice" "nj_w4"]
         :not_required []
         :states {:nj_temp_worker_notice "available" :nj_w4 "available"}
         :wake_at "2026-12-08"
         :missing_facts []}}
     {:name "advance-past-due-date"
       :as_of "2026-12-08"
       :expect
        {:required ["nj_temp_worker_notice" "nj_w4"]
         :not_required []
         :states {:nj_temp_worker_notice "overdue" :nj_w4 "overdue"}
         :missing_facts []}}])

(scenario nj-w4-rehire-reuse
  :description "Returning temporary W-2 worker in New Jersey for the same employer reuses prior Form NJ-W4 while requiring a fresh Temporary Worker Assignment Notice for the new assignment."
  :policy-set "us-nj"
  :as-of "2026-12-01"
  :facts
    {"work/location_country" "US"
     "work/location_state" "NJ"
     "engagement/classification" "w2"
     "engagement/is_temporary_worker" true
     "engagement/start_date" "2026-12-07"
     "engagement/reviewer" "usr_ops_01"
     "engagement/employer_id" "emp_nj_01"
     "principal/preferred_language" "es"}
  :evidence
    [{:id "doc_prior_nj_w4"
       :template "us_nj_w4"
       :template_version "2026.1.0"
       :status "completed"
       :completed_at "2026-06-15"
       :facts {"engagement/employer_id" "emp_nj_01"}}]
  :expect
    {:required ["nj_temp_worker_notice" "nj_w4"]
     :not_required []
     :states {:nj_temp_worker_notice "available" :nj_w4 "complete"}
     :missing_facts []})