Skip to content

Default microsimulation skills to policyengine.py#17

Draft
MaxGhenis wants to merge 1 commit into
mainfrom
codex/default-policyengine-py-skills
Draft

Default microsimulation skills to policyengine.py#17
MaxGhenis wants to merge 1 commit into
mainfrom
codex/default-policyengine-py-skills

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Summary

  • Make the microsimulation skill default to policyengine.py (policyengine.core.Simulation, ensure_datasets, uk_latest/us_latest, and output_dataset.data) for population analysis.
  • Update UK/US, data, district, healthcare, interactive tools, and simulation mechanics guidance to avoid direct country-package Microsimulation defaults.
  • Prefer logical dataset names such as enhanced_frs_2023_24 and enhanced_cps_2024 so policyengine.py resolves release-pinned data artifacts.

Why

The prior guidance mixed the new policyengine.py API with direct policyengine_uk/policyengine_us patterns. That made it easy for agents to use local dirty country-package checkouts or unmanaged Hugging Face data references for population analyses.

Validation

  • git diff --check
  • Searched updated skills for remaining direct country-package Microsimulation defaults and raw unpinned HF examples.

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Superseded by #61, which lands the same migration on the current stack (the certified defaults have since moved past the enhanced_cps_2024/enhanced_frs_2023_24 names this draft targets, to the Populace datasets). Leaving open for its author to close.

MaxGhenis added a commit that referenced this pull request Jul 17, 2026
…ome 23 tested ones (#61)

* Rebuild the skills catalog from scratch: 53 verified-stale skills become 23 tested ones

A five-way audit found the March-May era skills taught a dead stack:
fabricated APIs (a Recharts prop that never existed, a deleted
policyengine.Simulation(situation=...) surface, household-input classes
that raise ImportError), archived-repo dataset recipes
(policyengine-us-data per-state H5s) as the canonical method, and
model-era filler that frontier models no longer need. Nothing executed
the examples, so none of it was caught.

This rebuilds the skills layer around the current stack and makes rot
detectable:

- 23 flat skills (skills/<name>/, category in frontmatter), led by a
  canonical `policyengine` skill (pe.us/uk.calculate_household,
  Simulation + economic_impact_analysis + calculate_budgetary_impact,
  Populace datasets, regional filtering, reform formats, MicroSeries
  discipline). Country/domain/data/frontend knowledge rewritten against
  live code with executed examples; ten pattern skills consolidate into
  policyengine-model-development with per-topic references.
- tests/test_skill_examples.py executes every <!-- verify --> block
  against the released policyengine stack in CI (new job);
  <!-- verify: slow --> marks population-scale examples.
- tests/test_no_stale_references.py bans the exact patterns that rotted
  the old catalog, with <!-- stale-ok --> for deliberate history notes.
- targets/claude gets surgical fixes, not a rewrite: 17 dead or
  model-compensation files deleted; dangling refs fixed
  (parameter-architect, lessons paths, v1-app and us-data destinations,
  Cosilico hooks); the July command family and its two agents wired
  into bundles (they shipped in none, and create-dashboard.yml
  installed a plugin that lacked the command it invokes). Bundles move
  to flat paths at version 4.0.0 with an alignment test.
- Docs regenerated: when-to-use guide, skills README, CONTRIBUTING
  authoring rules, ecosystem manifest, functional tags, Codex routing
  templates, site-stats exporter for the policyengine.org plugin page.

Fixes #28. Supersedes #17.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Restore niceTicks guidance: the prop is real (recharts >=3.8), not fabricated

The audit verified recharts against app-v2's lockfile-pinned 3.7.0 and
concluded niceTicks="snap125" was a hallucinated API. Checking the
published packages shows it landed in recharts 3.8.0 (@SInCE 3.8 on
XAxis/YAxis/PolarRadiusAxis/PolarAngleAxis, options
none/auto/adaptive/snap125) — a PolicyEngine-contributed prop, exactly
as the old recharts skill said. Wrong call: verified against a stale
installed version instead of the ecosystem's current release.

- Drop the niceTicks ban from the anti-rot lint.
- Restore snap125 guidance in the tools and design skills, version-gated
  (>=3.8; app-v2's lockfile still resolves 3.7.0 where the prop is
  silently ignored) with the domain=["auto","auto"] pairing.
- Reword the "fabricated APIs" framing in the READMEs to the accurate
  failure modes (deleted APIs, phantom methods), and record the
  verification-scope lesson in the authoring rules.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant