policyengine-reform-patterns

Implement PolicyEngine policy reforms using factory patterns and in_effect toggles.

2|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/PolicyEngine/policyengine-skills --skill policyengine-reform-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: policyengine-reform-patterns
Source: https://github.com/PolicyEngine/policyengine-skills/tree/main/skills/technical-patterns/policyengine-reform-patterns-skill
Command: npx skills add https://github.com/PolicyEngine/policyengine-skills --skill policyengine-reform-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PolicyEngine reform patterns provide a standardized, reusable approach to implementing contributed reforms, including the 5-year lookahead mechanism, in_effect toggles, and parameter/variable management inside reform factories.

Core Features & Use Cases

  • Inner factory pattern that defines variables within a closure and returns a Reform class.
  • Outer lookahead wrapper that activates reforms based on in_effect across a 5-year window.
  • Support for parameter modification, nested in_effect sub-features, and comprehensive test patterns for policy proposals.

Quick Start

Import and register a reform from policyengine_us.reforms.states.{st}.{bill_id}, then run the standard tests to validate activation and parameter integration.

Frequently Asked Questions about policyengine-reform-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement PolicyEngine reforms using standardized factory patterns?

PolicyEngine reform patterns use an inner factory pattern defining variables within a closure, returning a Reform class to standardize contributed policy implementations across state and federal levels.

What is the 5-year lookahead wrapper for PolicyEngine policy reforms?

The 5-year lookahead wrapper is an outer function that activates PolicyEngine reforms based on in_effect toggles across a five-year window, ensuring variables and parameter modifications trigger correctly.

How do I register and test contributed policy reforms in PolicyEngine?

Import and register a reform from policyengine_us.reforms.states to validate activation and parameter integration, applying comprehensive test patterns required by the repository conventions.

Does the PolicyEngine reform factory pattern support parameter modification and nested in_effect sub-features?

Yes, the reform factory pattern supports parameter modification workflows, nested in_effect sub-features, and module-level bypass exports to manage varying scopes within policy proposals.

What's the best way to structure variables and documentation for PolicyEngine reform projects?

Standardize structure by defining variables inside an inner closure, applying the 5-year lookahead wrapper, and following repository documentation and test conventions to ensure consistent reform project formatting.

Why does my PolicyEngine reform pattern not work with state and federal scopes?

Reform patterns fail without consistent structure across varying scopes; applying the standardized factory pattern, in_effect toggles, and proper module-level bypass exports ensures compatibility for both state and federal reforms.