Tracking issue for docs/weighted-module-design.md, the decision record for replacing policyengine.py's microdf dependency with an internal policyengine.weighted module: pure numpy estimator kernels (shared with microcosm.frame.accounting), weights as an ordinary <entity>_weight column, and a closed df.weighted(...) accessor that exposes only weighted operations.
Context: the September 2026 review of microdf (PolicyEngine/microdf#315, #333) found that a pandas subclass cannot fail closed, and #527 found outputs/inequality.py reimplementing Gini and top shares with a different tie rule from microdf. microcosm-frame already declares itself microdf's successor.
The note fixes the three-layer design, pins every estimator definition against a named reference, and stages the migration: Stage 1 (module lands, inequality.py, decile_grouping.py and labor_supply_response.py move onto it), Stage 2 (MicroDataFrame leaves the public data model; major version), Stage 3 (engine return types; a separate decision).
Tracking issue for
docs/weighted-module-design.md, the decision record for replacing policyengine.py's microdf dependency with an internalpolicyengine.weightedmodule: pure numpy estimator kernels (shared withmicrocosm.frame.accounting), weights as an ordinary<entity>_weightcolumn, and a closeddf.weighted(...)accessor that exposes only weighted operations.Context: the September 2026 review of microdf (PolicyEngine/microdf#315, #333) found that a pandas subclass cannot fail closed, and #527 found
outputs/inequality.pyreimplementing Gini and top shares with a different tie rule from microdf. microcosm-frame already declares itself microdf's successor.The note fixes the three-layer design, pins every estimator definition against a named reference, and stages the migration: Stage 1 (module lands,
inequality.py,decile_grouping.pyandlabor_supply_response.pymove onto it), Stage 2 (MicroDataFrameleaves the public data model; major version), Stage 3 (engine return types; a separate decision).