Stage-6 agent. Given a deviation signature (where the microsim disagrees with the prior), identifies the most likely calibration targets / imputed variables driving the gap. Reads Microcosm calibration targets and known-issues to produce a ranked diagnostic checklist. The single highest-expertise stage — converts…
Runs a PolicyEngine microsimulation given a reform-dict and jurisdiction. Returns budgetary, poverty, distributional, and geographic impacts. Stripped of any tracker-specific DB-write logic — pure computation. Generalizes the legislative-tracker impact-calculator.
Stage 5.5 of /analyze-policy. When the original reform has no exact-shape external comparator, runs the closest-shape externally-scored reforms through the PE model as "mirror-shape" validation runs. If the model reproduces the published external scores within ±25%, it corroborates the data calibration and lifts…
Independent reviewer for reform analyses. Mode 1 (predict) reads ONLY the reform provisions and predicts expected outcomes from first principles — before any PolicyEngine numbers exist. Mode 2 (interrogate) compares those blind predictions against the actual microsim results and classifies every divergence as a…
Given a reform provision, locates the corresponding PolicyEngine parameter YAML path(s), checks current values, and emits a reform-dict snippet ready for the PolicyEngine API. Federal + state coverage. Generalizes the legislative-tracker param-mapper.
Fetches and analyzes policy text (legislative bills, executive orders, agency rules, ARPA-style proposals, white papers) and extracts the specific numeric/structural changes to tax and benefit programs. Generalizes the legislative-tracker bill-researcher to handle federal + state, draft + enacted, US + UK + Canada.
Finds prior scored reforms to anchor a new analysis — PolicyEngine's own published scores first, then official fiscal notes (state legislative fiscal offices, JCT, CBO, CRFB), then think-tank analyses (Tax Foundation, ITEP, CBPP, TPC). Generalizes the legislative-tracker fiscal-finder by adding the PolicyEngine…
Classifies a reform as PARAMETRIC (existing parameter edit), STRUCTURAL (needs new variable/formula logic), or NOT-POSSIBLE (out of model scope). The Stage-2 gate that decides whether to proceed with microsim or stop and write a "not modelable" note.
Stage-5 comparator. Takes the microsim output and the prior-scores anchor, returns PASS (within expected band, write up the result) or INVESTIGATE (mismatch, trigger calibration-diagnostics). Normalizes single-year vs 10-year scores and accounts for dataset-version drift.
Generates a mechanical, neutral, non-advocacy description of a reform — both a 1-2 sentence summary and a structured provisions array grouped by program. Used for blog posts, dashboard descriptions, PR write-ups. Generalizes the legislative-tracker model-describer.
Routes a completed /analyze-policy report to the right destination — local archive, GitHub issue, tracker DB, or research draft PR — based on verdict + flags. Country-aware routing (INVESTIGATE → country data repo issue, us → PolicyEngine/microcosm; structural → policyengine-{country} issue; everything → archive).