Default microsimulation skills to policyengine.py#17
Draft
MaxGhenis wants to merge 1 commit into
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
policyengine.py(policyengine.core.Simulation,ensure_datasets,uk_latest/us_latest, andoutput_dataset.data) for population analysis.Microsimulationdefaults.enhanced_frs_2023_24andenhanced_cps_2024sopolicyengine.pyresolves release-pinned data artifacts.Why
The prior guidance mixed the new
policyengine.pyAPI with directpolicyengine_uk/policyengine_uspatterns. 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 --checkMicrosimulationdefaults and raw unpinned HF examples.