Skip to content
Back to skills

2568 Ecosystem 1ef0a4f5

ASecurity

Complete dependency graph of the PolicyEngine platform (40+ repositories).

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
developmentjavascripttypescriptpythongojavasqlreactnextjsfastapiflask

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2568-ecosystem_1ef0a4f5 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2568 Ecosystem 1ef0a4f5?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2568 Ecosystem 1ef0a4f5
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2568-ecosystem-1ef0a4f5/badge)](https://www.skillsdirectory.com/skills/tools-only-2568-ecosystem-1ef0a4f5)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# PolicyEngine Ecosystem Map

Complete dependency graph of the PolicyEngine platform (40+ repositories).

## Version Status

| Repository | Status | Notes |
|------------|--------|-------|
| policyengine-api | βœ… Current | Production Flask API |
| policyengine-api-v2 | 🚧 Active | Monorepo with 3 microservices (ports 8081-8083) |
| policyengine-app | βœ… Current | Production React app |
| policyengine-app-v2 | 🚧 Active | Next.js/Mantine rewrite with new design tokens |
| synthimpute | ❌ Archived | Replaced by microimpute + microcalibrate |

## Layer 0: Low-Level Utilities

### L0 (PyTorch Regularization)
**Repository:** PolicyEngine/L0
**Purpose:** L0 regularization for neural network sparsification and intelligent sampling
**Used by:** microcalibrate, policyengine-us-data
**Dependencies:** torch, numpy

**Key features:**
- Hard Concrete Distribution for differentiable L0 norm
- Sparse neural network layers (L0Linear, L0Conv2d)
- Intelligent sampling gates for calibration
- Temperature scheduling

**Use cases:**
- Household selection in survey calibration
- Sample sparsification to reduce dataset size
- Feature selection in ML models

## Layer 1: Core Infrastructure

### policyengine-core (Simulation Engine)
**Repository:** PolicyEngine/policyengine-core
**Purpose:** Microsimulation engine (OpenFisca fork)
**Used by:** All country models, API, data packages
**Dependencies:** numpy, pytest, yaml

**Provides:**
- Variable and parameter infrastructure
- Entity system (Person, Household, TaxUnit, etc.)
- Simulation engine
- Formula evaluation and caching
- Period handling
- Reform application

## Layer 2: Country Models

All depend on: policyengine-core

### policyengine-us
**Status:** βœ… Current
**Dependencies:** policyengine-core
**Models:** Federal and all 50 state tax/benefit systems

### policyengine-uk
**Status:** βœ… Current
**Dependencies:** policyengine-core
**Models:** UK tax, National Insurance, Universal Credit, etc.

### policyengine-canada
**Status:** βœ… Current
**Dependencies:** policyengine-core
**Models:** Canadian federal and provincial systems

### policyengine-il (Israel)
**Status:** βœ… Current
**Dependencies:** policyengine-core

### policyengine-ng (Nigeria)
**Status:** βœ… Current
**Dependencies:** policyengine-core

### Others (Inactive/Beta)
- policyengine-au (Australia)
- policyengine-ie (Ireland)
- policyengine-nz (New Zealand)
- policyengine-sg (Singapore)

## Layer 3: Data Utilities

### microdf
**Repository:** PolicyEngine/microdf
**Purpose:** Weighted pandas DataFrames for survey analysis
**Used by:** policyengine-api, policyengine-us-data, analysis repos
**Dependencies:** pandas, numpy

**Provides:**
- MicroDataFrame (weighted DataFrame)
- MicroSeries (weighted Series)
- Gini coefficient
- Poverty calculations
- Top share calculations

### microimpute
**Repository:** PolicyEngine/microimpute
**Purpose:** ML-based variable imputation
**Used by:** policyengine-us-data
**Dependencies:** numpy, pandas, scikit-learn, quantile-forest, optuna, statsmodels

**Methods:**
- Linear regression
- Random forest
- Quantile forest
- XGBoost
- Comparison and benchmarking

### microcalibrate
**Repository:** PolicyEngine/microcalibrate
**Purpose:** Survey weight calibration to population targets
**Used by:** policyengine-us-data
**Dependencies:** torch, numpy, pandas, L0, optuna

**Features:**
- Weight adjustment to match targets
- L0 regularization for sparsity
- Automatic hyperparameter tuning
- Robustness evaluation
- Interactive dashboard at microcalibrate.vercel.app

## Layer 4: Enhanced Data

### policyengine-us-data
**Repository:** PolicyEngine/policyengine-us-data
**Purpose:** Enhanced CPS microdata for US simulations
**Dependencies:** policyengine-us, policyengine-core, microdf, microimpute

**Process:**
1. Load raw CPS data
2. Impute missing variables (microimpute)
3. Calibrate weights (microcalibrate with L0)
4. Validate against benchmarks
5. Package for distribution

### policyengine-uk-data
**Repository:** PolicyEngine/policyengine-uk-data
**Purpose:** Enhanced FRS data for UK simulations
**Dependencies:** policyengine-uk, policyengine-core, microdf

## Layer 5: Services

### policyengine-api (v1 - Current Production)
**Repository:** PolicyEngine/policyengine-api
**Purpose:** Flask REST API for calculations
**Status:** βœ… Production
**Dependencies:**
- All country models (us, uk, canada, il, ng)
- policyengine-core
- policyengine (Python client)
- microdf
- flask, redis, rq
- anthropic, openai (AI features)
- streamlit (internal tools)

**Endpoints:**
- POST /us/calculate - Household calculations
- GET /us/economy/{reform}/{baseline} - Population impacts
- GET /us/policy/{id} - Policy metadata
- GET /us/parameters, /us/variables - Metadata

### policyengine-api-v2 (v2 - Active Development)
**Repository:** PolicyEngine/policyengine-api-v2
**Purpose:** Next-generation API (monorepo, microservices)
**Status:** 🚧 Active development

**Services:**
- api-full (port 8081): Main API with household calculations
- api-simulation (port 8082): Economic simulation engine
- api-tagger (port 8083): Deployment management

**Technology:**
- Docker + Docker Compose
- Supabase (PostgreSQL)
- Python 3.13+
- uv package manager
- OpenAPI spec generation
- Auto-generated Python clients

### policyengine-household-api
**Repository:** PolicyEngine/policyengine-household-api
**Purpose:** Specialized Flask API for household-level calculations
**Status:** βœ… Current

**Features:**
- Runs `calculate` endpoint over household objects
- Lightweight alternative to full policyengine-api
- JSON responses with `status` and `message` fields
- Docker Compose support for local development

**Technology:**
- Flask
- Docker + Docker Compose
- GitHub Actions for CI/CD

**Note:** Does not support branched operations. Use policyengine-api for full policy analysis features.

### policyengine.py (Python Client)
**Repository:** PolicyEngine/policyengine.py
**Purpose:** Python client for programmatic API access
**Status:** βœ… Current
**Dependencies:** sqlalchemy, sqlmodel, pandas, microdf, rich
**Optional:** policyengine-us, policyengine-uk (for local simulation)

**Usage:**
```python
from policyengine import Simulation
sim = Simulation(situation=household, country_id="us")
```

## Layer 6: User Interfaces

### policyengine-app (v1 - Current Production)
**Repository:** PolicyEngine/policyengine-app
**Purpose:** React web application
**Status:** βœ… Production at policyengine.org

**Technology:**
- React 18
- React Router v6
- Plotly.js
- Ant Design
- axios

**Colors:**
- Teal: #39C6C0
- Blue: #2C6496

### policyengine-app-v2 (v2 - Active Development)
**Repository:** PolicyEngine/policyengine-app-v2
**Purpose:** Next-generation app
**Status:** 🚧 Active development

**Technology:**
- Next.js (vs Create React App)
- Mantine (vs Ant Design)
- TypeScript
- Vite

**Design tokens:**
- Primary (teal): #319795 (slightly different from v1)
- Blue: #026AA2 (different from v1)
- Complete 50-900 color scales

## Layer 7: Application Layer

### Calculators
- **givecalc** - Charitable giving calculator (Streamlit)
- **salt-amt-calculator** - SALT and AMT calculator
- **ctc-calculator** - Child Tax Credit calculator
- Others...

**Common dependencies:**
- policyengine-us (or policyengine.py)
- streamlit
- plotly
- pandas

**Branding:**
- Use teal (#319795) as primary brand color
- Inter for charts and UI; Roboto Serif only for long-form prose
- PolicyEngine logo
- .streamlit/config.toml theme

### Analysis Repositories
- **crfb-tob-impacts** - Policy impact analyses
- **newsletters** - Data-driven newsletters
- **2024-election-dashboard** - Policy comparisons
- **marginal-child** - Specialized analyses
- Others...

**Common dependencies:**
- policyengine-us (or policyengine.py)
- microdf (for inequality/poverty)
- pandas, numpy
- plotly
- jupyter (notebooks)

### Dashboards
Interactive policy exploration tools

## Complete Dependency Graph

```
L0 (regularization)
β”œβ”€β”€ microcalibrate
    └── policyengine-us-data

microimpute (imputation)
└── policyengine-us-data

microdf (weighted DataFrames)
β”œβ”€β”€ policyengine-api
β”œβ”€β”€ policyengine-us-data
β”œβ”€β”€ policyengine.py
└── analysis repos

policyengine-core (engine)
β”œβ”€β”€ policyengine-us
β”œβ”€β”€ policyengine-uk
β”œβ”€β”€ policyengine-canada
β”œβ”€β”€ policyengine-il
β”œβ”€β”€ policyengine-ng
└── policyengine-us-data

Country models
β”œβ”€β”€ policyengine-api (uses all countries)
β”œβ”€β”€ policyengine-api-v2 (uses all countries)
└── policyengine.py (optional, per country)

policyengine-us-data
└── policyengine-us (uses enhanced data)

policyengine-api
β”œβ”€β”€ policyengine-app (calls API)
└── policyengine.py (wraps API)

policyengine-app
└── End users

Analysis repos
β”œβ”€β”€ Use policyengine-us directly, OR
└── Use policyengine.py (API wrapper)
```

## Technology Stack by Layer

| Layer | Primary Tech | Package Manager | Testing | Deployment |
|-------|-------------|-----------------|---------|------------|
| L0 | PyTorch | pip/uv | pytest | PyPI |
| Core | Python 3.10-3.13 | pip/uv | pytest | PyPI |
| Country models | Python 3.10-3.13 | pip/uv | pytest | PyPI |
| Data utilities | Python 3.13 | pip/uv | pytest | PyPI |
| API v1 | Flask, Python 3.11+ | pip | pytest | Google App Engine |
| API v2 | FastAPI, Python 3.13+ | uv | pytest | Docker, GCP Cloud Run |
| App v1 | React 18 | npm | Jest | Netlify |
| App v2 | Next.js, TypeScript | npm | Vitest | TBD |
| Calculators | Streamlit | pip/uv | pytest | Streamlit Cloud |
| Analysis | Jupyter, Python | pip/uv | pytest | GitHub |

## Key Transitions

### API v1 β†’ v2

**Status:** Both active, v2 in development

**Changes:**
- Monorepo structure (3 microservices)
- Docker + Supabase (vs App Engine + Cloud SQL)
- uv package manager (vs pip)
- OpenAPI spec generation
- Auto-generated clients

### App v1 β†’ v2

**Status:** Both active, v2 in development

**Changes:**
- Next.js (vs Create React App)
- Mantine (vs Ant Design)
- TypeScript (vs JavaScript)
- New design tokens (#319795 vs #39C6C0)
- Vite (vs webpack)

### Data: synthimpute β†’ microimpute + microcalibrate

**Status:** βœ… Migrated

**Changes:**
- synthimpute archived
- microimpute for imputation
- microcalibrate for calibration
- Both use modern ML (optuna for hyperparameter tuning)
- microcalibrate uses L0 regularization

## Package Dependencies Summary

### Core Packages (Stable)
- policyengine-core
- policyengine-us, policyengine-uk, etc.
- microdf

### Data Packages (Current)
- βœ… microimpute (imputation)
- βœ… microcalibrate (calibration)
- βœ… L0 (regularization)
- ❌ synthimpute (archived)

### Services (Dual Version)
- βœ… policyengine-api (v1, production)
- 🚧 policyengine-api-v2 (v2, development)
- βœ… policyengine.py (client, stable)

### Interfaces (Dual Version)
- βœ… policyengine-app (v1, production)
- 🚧 policyengine-app-v2 (v2, development)

## Skills Coverage Analysis

### Well Covered βœ…
- policyengine-core βœ…
- policyengine-us βœ…
- policyengine-api βœ… (v1)
- policyengine-app βœ… (v1)
- microdf βœ…
- Analysis patterns βœ…

### Needs Skills πŸ†•
- policyengine-api-v2 (monorepo, microservices)
- policyengine-app-v2 (Next.js, Mantine, TypeScript)
- microimpute (ML imputation)
- microcalibrate (survey calibration)
- L0 (regularization)
- policyengine-us-data (data pipeline)
- policyengine.py (Python client) βœ… (basic, could enhance)

### Country-Specific πŸ”œ
- policyengine-uk-skill
- policyengine-canada-skill

## Recommendations

### Immediate Updates
1. βœ… Update ecosystem references (synthimpute β†’ microimpute + microcalibrate)
2. πŸ†• Add note about v1/v2 status in relevant skills
3. πŸ†• Create data ecosystem skills (microimpute, microcalibrate, L0)
4. πŸ†• Note API v2 and App v2 as "coming soon" with architecture differences

### Future Skills
- policyengine-api-v2-skill (when closer to production)
- policyengine-app-v2-skill (when closer to production)
- policyengine-us-data-skill (data pipeline)

### Documentation Priority
1. **High:** Current production stack (core, us, api v1, app v1, microdf)
2. **Medium:** Data ecosystem (microimpute, microcalibrate, L0)
3. **Low:** v2 services (document patterns as they stabilize)

## Complete Repository List

### Core Infrastructure (6)
- policyengine-core ⭐
- policyengine-api ⭐
- policyengine-api-v2 🚧
- policyengine-household-api ⭐
- policyengine-app ⭐
- policyengine-app-v2 🚧

### Country Models (9)
- policyengine-us ⭐
- policyengine-uk ⭐
- policyengine-canada ⭐
- policyengine-il
- policyengine-ng
- policyengine-au
- policyengine-ie
- policyengine-nz
- policyengine-sg

### Data Packages (6)
- policyengine-us-data ⭐
- policyengine-uk-data ⭐
- microdf ⭐
- microimpute ⭐
- microcalibrate ⭐
- L0 ⭐

### Clients and Tools (3)
- policyengine.py ⭐
- policyengine-chat
- policyengine-gpt

### Analysis Repositories (10+)
- crfb-tob-impacts
- newsletters
- 2024-election-dashboard
- marginal-child
- analysis-notebooks
- And many more...

### Calculators (5+)
- givecalc
- salt-amt-calculator
- ctc-calculator
- And others...

### Utility Packages (3)
- policyengine-profiler
- policyengine-taxsim
- policyengine-social

⭐ = Has active development, should have skill coverage
🚧 = In development, document as patterns stabilize

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.