policyengine-code-organization

Organize PolicyEngine code with naming conventions and folder structures.

31|6|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/PolicyEngine/policyengine-claude --skill policyengine-code-organization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: policyengine-code-organization
Source: https://github.com/PolicyEngine/policyengine-claude/tree/main/skills/technical-patterns/policyengine-code-organization-skill
Command: npx skills add https://github.com/PolicyEngine/policyengine-claude --skill policyengine-code-organization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides patterns for organizing PolicyEngine code to maximize readability and maintainability as projects scale.

Core Features & Use Cases

  • Folder structure guidance: Flat vs. multi-level organization based on program size.
  • Naming conventions: Consistent prefixing and component placement.
  • Use Case: Organize a medium-sized TANF-like program with clear separation of income, eligibility, and deductions.

Quick Start

Create a root program folder with a flat layout and then expand to a split structure as needed.

Frequently Asked Questions about policyengine-code-organization

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

FAQPage Schema
How do I organize PolicyEngine code for a state benefits program?

Code organization for PolicyEngine establishes naming conventions, folder structures, and file layouts tailored to state and federal programs. Start with a flat structure for smaller programs, then expand to modular or full hierarchical organization as complexity grows, using consistent variable prefixes and component placement to improve maintainability.

What naming conventions should I use for PolicyEngine variables and components?

PolicyEngine naming conventions use standardized prefixes derived from official references, consistent suffixes for variable types, and component placement rules. These patterns ensure clarity across income calculations, eligibility rules, and deductions, making code reviews and refactoring more efficient.

When should I move from a flat to a modular folder structure?

Transition to modular structure as your PolicyEngine program grows beyond a single flat layout. Split income, eligibility, and deduction logic into separate directories when managing medium-sized programs like TANF to reduce cognitive load and scale maintainability.

Can I apply PolicyEngine organization patterns to different state programs?

Yes, PolicyEngine organization patterns adapt to state-specific terminology and program requirements. The folder and naming conventions scale from small federal programs to complex multi-state implementations while maintaining consistent structure and readability.

What's the difference between flat, modular, and full folder structures?

Flat structure keeps all files in one directory for simple programs; modular separates concerns by feature or domain; full structure adds nested layers for large, complex programs. PolicyEngine guidance helps you choose based on program size, team capacity, and long-term maintenance needs.