Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/ny-unemployment-insurance.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add New York Unemployment Insurance benefit (ny_ui).
24 changes: 24 additions & 0 deletions lessons/agent-lessons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Agent Lessons Learned

Accumulated from /encode-policy-v2 and /backdate-program runs across all contributors.

## New Lessons from New York UI (2026-04-23)

### PARAMETER
- When a program has multiple divisor paths (e.g., divisor-25 vs. divisor-26), each path may carry its own regulatory floor distinct from the global minimum; encode per-path floors as a separate parameter (e.g., `formula_min_amount`) rather than relying on the global `min_amount` to cover all cases.
- When a parameter's effective date is described as a day-of-week in statute (e.g., "first Monday of October"), compute the actual calendar date rather than assuming a round number; off-by-one-week errors produce incorrect benefit amounts for every claim in the gap period.
- Parameters that serve two distinct regulatory purposes (e.g., WBR ceiling and partial-employment earnings cap) should be split into separate parameter files; using one parameter for both creates silent drift risk when the two values are updated independently by the agency.

### FORMULA
- When a partial benefit calculation is specified as `ceil(max(...))`, the `ceil` is load-bearing: omit it and any odd-number input produces a fractional result rather than a whole dollar. Always match the exact rounding direction (floor vs. ceil) specified in the regulation for each formula step.
- For a variable with three or more mutually exclusive outcomes, use `select()` rather than nested `where()` calls. Nested `where()` has implicit fall-through to the last arm, which can silently assign the wrong outcome to cases that match none of the explicit conditions.
- When wiring a new state benefit variable, add it to the relevant federal aggregator (e.g., `unemployment_compensation`) as an explicit step; omitting this prevents the benefit from flowing into AGI and federal tax calculations.

### REFERENCE
- Before writing any `#page=` anchor for a multi-page PDF, verify which physical page contains the actual parameter value — not the printed page number and not the page implied by the document title. A cover page or diagram can shift every subsequent page number by one.
- When a single PDF URL is copy-pasted as the source for multiple parameters, verify the page anchor independently for each parameter; bulk-copy of the base URL propagates the same wrong anchor to every file simultaneously.
- When a regulatory citation uses section numbers (e.g., §§ 522–523), confirm those sections govern the specific rule encoded, not just adjacent concepts. Statutory definitions and administrative computation rules often live in different sections.

### VARIABLE
- Test cases for rounding-sensitive formulas must include inputs that produce non-integer intermediate values (e.g., odd WBR for a 0.5× calculation). Test cases using only even-divisor inputs will pass both the correct and the buggy (missing ceil/floor) implementations.
- When two parameters are mathematically coupled by construction (e.g., `rate_b = rate_a − 1`), either derive one from the other in the formula or add an explicit comment documenting the coupling and the requirement to update them together; silent coupling is a future maintenance hazard.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: New York sets this minimum weekly benefit rate for divisor-26 formula cases under the Unemployment Insurance program.

values:
2020-01-01: 143

metadata:
unit: currency-USD
period: week
label: New York UI formula minimum weekly benefit rate
reference:
- title: NY Labor Law § 590(5) — Rights to benefits
href: https://www.nysenate.gov/legislation/laws/LAB/590
- title: NYSDOL P832 (Feb 2026), page 2
href: https://dol.ny.gov/system/files/documents/2026/02/p832-how-your-weekly-ui-benefits-are-calculated-2-26.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: New York divides high quarter wages by this amount to compute the weekly benefit rate when high quarter wages are at or below the low threshold under the Unemployment Insurance program.

values:
2020-01-01: 25

metadata:
unit: /1
period: year
label: New York UI low weekly benefit divisor
reference:
- title: NY Labor Law § 590(5) — Rights to benefits
href: https://www.nysenate.gov/legislation/laws/LAB/590
- title: NYSDOL P832 (Feb 2026), page 2
href: https://dol.ny.gov/system/files/documents/2026/02/p832-how-your-weekly-ui-benefits-are-calculated-2-26.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: New York applies the low weekly benefit divisor when high quarter wages are at or below this amount under the Unemployment Insurance program.

values:
2020-01-01: 3_575

metadata:
unit: currency-USD
period: year
label: New York UI low high quarter threshold
reference:
- title: NY Labor Law § 590(5) — Rights to benefits
href: https://www.nysenate.gov/legislation/laws/LAB/590
- title: NYSDOL P832 (Feb 2026), page 2
href: https://dol.ny.gov/system/files/documents/2026/02/p832-how-your-weekly-ui-benefits-are-calculated-2-26.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
description: New York sets this maximum weekly benefit rate under the Unemployment Insurance program.

values:
2020-01-01: 504
2025-10-06: 869

metadata:
unit: currency-USD
period: week
label: New York UI maximum weekly benefit rate
reference:
- title: NY Labor Law § 590 — Rights to benefits
href: https://www.nysenate.gov/legislation/laws/LAB/590
- title: Governor Hochul and Labor Leaders Announce Maximum Weekly Benefit Increase for Unemployed Workers
href: https://www.governor.ny.gov/news/governor-hochul-and-labor-leaders-announce-maximum-weekly-benefit-increase-unemployed-workers
- title: NYSDOL P832 (Feb 2026), page 2
href: https://dol.ny.gov/system/files/documents/2026/02/p832-how-your-weekly-ui-benefits-are-calculated-2-26.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: New York limits the duration of benefits to this many weeks within a benefit year under the Unemployment Insurance program.

values:
2020-01-01: 26

metadata:
unit: week
period: year
label: New York UI maximum benefit weeks
reference:
- title: NY Labor Law § 590 — Rights to benefits
href: https://www.nysenate.gov/legislation/laws/LAB/590
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: New York sets this minimum weekly benefit rate under the Unemployment Insurance program.

values:
2020-01-01: 104
2026-01-01: 140

metadata:
unit: currency-USD
period: week
label: New York UI minimum weekly benefit rate
reference:
- title: NY Labor Law § 590 — Rights to benefits
href: https://www.nysenate.gov/legislation/laws/LAB/590
- title: NYSDOL P832 (Feb 2026), page 2
href: https://dol.ny.gov/system/files/documents/2026/02/p832-how-your-weekly-ui-benefits-are-calculated-2-26.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: New York sets a floor on the partial benefit credit at this amount under the Unemployment Insurance program.

values:
2020-01-01: 100

metadata:
unit: currency-USD
period: week
label: New York UI partial benefit credit minimum
reference:
- title: NY Labor Law § 525 — Partial benefit credit
href: https://www.nysenate.gov/legislation/laws/LAB/525
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: New York sets the partial benefit credit at this share of the weekly benefit rate under the Unemployment Insurance program.

values:
2020-01-01: 0.5

metadata:
unit: /1
period: year
label: New York UI partial benefit credit rate
reference:
- title: NY Labor Law § 525 — Partial benefit credit
href: https://www.nysenate.gov/legislation/laws/LAB/525
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: New York divides high quarter wages by this amount to compute the weekly benefit rate when high quarter wages exceed the low threshold under the Unemployment Insurance program.

values:
2020-01-01: 26

metadata:
unit: /1
period: year
label: New York UI standard weekly benefit divisor
reference:
- title: NY Labor Law § 590(5) — Rights to benefits
href: https://www.nysenate.gov/legislation/laws/LAB/590
- title: NYSDOL P832 (Feb 2026), page 2
href: https://dol.ny.gov/system/files/documents/2026/02/p832-how-your-weekly-ui-benefits-are-calculated-2-26.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: New York applies the averaged two-highest-quarter weekly benefit formula when high quarter wages exceed this amount in a two or three quarter claim under the Unemployment Insurance program.

values:
2020-01-01: 4_000

metadata:
unit: currency-USD
period: year
label: New York UI two or three quarter high quarter threshold
reference:
- title: NY Labor Law § 590(5) — Rights to benefits
href: https://www.nysenate.gov/legislation/laws/LAB/590
- title: NYSDOL P832 (Feb 2026), page 2
href: https://dol.ny.gov/system/files/documents/2026/02/p832-how-your-weekly-ui-benefits-are-calculated-2-26.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: New York requires total base period wages to be at least this multiple of high quarter wages under the Unemployment Insurance program.

values:
2020-01-01: 1.5

metadata:
unit: /1
period: year
label: New York UI base wages multiplier
reference:
- title: NY Labor Law § 527 — Valid original claim
href: https://www.nysenate.gov/legislation/laws/LAB/527
- title: NYSDOL P832 (Feb 2026), page 2
href: https://dol.ny.gov/system/files/documents/2026/02/p832-how-your-weekly-ui-benefits-are-calculated-2-26.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: New York requires other base period quarters to provide at least this share of the high quarter cap when high quarter wages reach the cap under the Unemployment Insurance program.

values:
2020-01-01: 0.5

metadata:
unit: /1
period: year
label: New York UI capped other quarters wages share
reference:
- title: NY Labor Law § 527 — Valid original claim
href: https://www.nysenate.gov/legislation/laws/LAB/527
- title: NYSDOL P832 (Feb 2026), page 2
href: https://dol.ny.gov/system/files/documents/2026/02/p832-how-your-weekly-ui-benefits-are-calculated-2-26.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: New York applies the capped wages test when high quarter wages reach this amount under the Unemployment Insurance program.

values:
2026-01-01: 19_118

metadata:
unit: currency-USD
period: year
label: New York UI high quarter cap
reference:
- title: NY Labor Law § 527 — Valid original claim
href: https://www.nysenate.gov/legislation/laws/LAB/527
- title: NYSDOL P832 (Feb 2026), page 2
href: https://dol.ny.gov/system/files/documents/2026/02/p832-how-your-weekly-ui-benefits-are-calculated-2-26.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: New York requires this minimum amount of wages paid in the high quarter of the base period under the Unemployment Insurance program.

values:
2025-01-01: 3_400
2026-01-05: 3_500

metadata:
unit: currency-USD
period: year
label: New York UI high quarter minimum wages
reference:
- title: NY Labor Law § 527 — Valid original claim
href: https://www.nysenate.gov/legislation/laws/LAB/527
- title: NYSDOL P832 (Feb 2026), page 2
href: https://dol.ny.gov/system/files/documents/2026/02/p832-how-your-weekly-ui-benefits-are-calculated-2-26.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: New York requires wages to have been paid in at least this many calendar quarters of the base period under the Unemployment Insurance program.

values:
2020-01-01: 2

metadata:
unit: int
period: year
label: New York UI quarters required
reference:
- title: NY Labor Law § 527 — Valid original claim
href: https://www.nysenate.gov/legislation/laws/LAB/527
- title: NYSDOL P832 (Feb 2026), page 2
href: https://dol.ny.gov/system/files/documents/2026/02/p832-how-your-weekly-ui-benefits-are-calculated-2-26.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
metadata:
propagate_metadata_to_children: true
economy: false
household: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
description: New York pays this share of the weekly benefit rate based on hours worked in a week under the Unemployment Insurance program.

brackets:
- threshold:
2021-08-16: 0
amount:
2021-08-16: 1.0
- threshold:
2021-08-16: 11
amount:
2021-08-16: 0.75
- threshold:
2021-08-16: 17
amount:
2021-08-16: 0.5
- threshold:
2021-08-16: 22
amount:
2021-08-16: 0.25
- threshold:
2021-08-16: 31
amount:
2021-08-16: 0

metadata:
type: single_amount
threshold_unit: hour
amount_unit: /1
threshold_period: week
period: week
label: New York UI partial benefit hours tier rates
reference:
- title: NY Labor Law § 523 — Total unemployment
href: https://www.nysenate.gov/legislation/laws/LAB/523
- title: NY Labor Law § 522 — Total and partial unemployment
href: https://www.nysenate.gov/legislation/laws/LAB/522
- title: NYSDOL P803 (Oct 2025), Partial Unemployment FAQs
href: https://dol.ny.gov/system/files/documents/2025/10/p803-partial-ui-faqs-10-3-25.pdf#page=1
10 changes: 10 additions & 0 deletions policyengine_us/programs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,16 @@ programs:
variable: ny_drive_clean_rebate
parameter_prefix: gov.states.ny.nyserda.drive_clean

- id: ny_ui
name: NY UI
full_name: New York Unemployment Insurance
category: state_benefits
agency: NYSDOL
status: complete
coverage: "2020-2026"
variable: ny_ui
parameter_prefix: gov.states.ny.dol.unemployment_insurance

- id: tx_fpp_benefit
name: Texas FPP
full_name: Texas Family Planning Program
Expand Down
Loading
Loading