Skip to content

Point the agent guide and docs pages at microcosm-fit and microcosm-calibrate - #605

Merged
MaxGhenis merged 3 commits into
masterfrom
docs-old-stack-guidance
Nov 8, 2026
Merged

MaxGhenis merged 3 commits into
masterfrom
docs-old-stack-guidance

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

CLAUDE.md, the README and two docs pages named microimpute, microcalibrate, L0 and the Enhanced CPS as this project's tools. PolicyEngine archived microimpute on 2026-11-08 (PolicyEngine/microimpute#224), and Microcosm's microcosm-fit and microcosm-calibrate succeed those packages, as docs/infrastructure.md and docs/methodology.md already say. This PR brings the four files in line and corrects how docs/infrastructure.md describes microcosm-calibrate's solver.

  • CLAUDE.md, core technical concepts. The model now extends Microcosm instead of the Enhanced CPS. Step 1 names microcosm-fit (RegimeGatedQRF) and notes that the engine imports it as populace.fit; step 3 names microcosm-calibrate. A new line tells agents to build new imputation on microcosm-fit and new calibration on microcosm-calibrate, says the microimpute, microcalibrate and L0 packages belong to PolicyEngine's previous data stack, and points to docs/infrastructure.md. The "Key insight" line about the Enhanced CPS matching JCT and TPC goes.
  • CLAUDE.md, related repositories. One microcosm row replaces the microimpute, microcalibrate, policyengine-us-data and L0 rows.
  • README.md, related projects. A Microcosm link replaces the PolicyEngine-US-Data, Populace, microimpute and microcalibrate links.
  • docs/_static/methodology-interactive.html. The pipeline nodes and detail panels name microcosm-fit and microcosm-calibrate, and their code samples now call those packages' APIs: RegimeGatedQRF(seed=0).fit(...) then .predict(...), and calibrate(base_population, ssa_targets) then .frame. The CPS panel describes Microcosm's U.S. build. The page drops its Enhanced CPS claims and the "7,000+ ECPS calibration targets" card, and its key insight opens with the tools PolicyEngine already has.
  • docs/plans/employer-firm-plan.html. The diagram node, the data table, the workstream text and the target/gate protocol rule name microcosm-fit and microcosm-calibrate. Two Enhanced CPS references now describe the recipe and PolicyEngine's microdata, and the CPS row drops a third, "(the ECPS host)".
  • docs/infrastructure.md. The microcosm-calibrate entry, which the new CLAUDE.md line points to, said "accelerated projected gradient". It now says Adam on log-weights by default, with opt-in L0 sparse selection.

Evidence from code

Claim Where
The engine imports microcosm-fit's QRF as populace.fit this repo's master d31f22c: src/populace_dynamics/engine/forward_earnings.py:981 and src/populace_dynamics/engine/refit.py:780 (from populace.fit.qrf import RegimeGatedQRF); PolicyEngine/populace redirects to PolicyEngine/microcosm
RegimeGatedQRF(...).fit(df, predictors, targets, weights=...), then .predict(df) Microcosm main 3db65154b, packages/microcosm-fit/src/microcosm/fit/qrf.py:1755 (fit; a DataFrame needs explicit weights, :1769-1772), :2349 (predict)
calibrate(frame, targets) returns a CalibrationResult carrying .frame packages/microcosm-calibrate/src/microcosm/calibrate/solve.py:2118-2151 (signature), :283-336 (CalibrationResult, with frame: Frame at :336)
microcosm-calibrate runs Adam on log-weights by default solve.py:2124 (method: str = "adam"), :2164-2175 ("apg" survives only as a deprecated alias for "adam")
microcosm-calibrate applies L0 selection only when the caller sets l0_lambda or target_records, and both default off solve.py:2131-2132 (target_records defaults to None and l0_lambda to 0.0), :2595 (the target_records branch searches l0_lambda)
microcosm-fit runs in Microcosm's U.S. and UK builds packages/microcosm-build/src/microcosm/build/us_runtime/puf_qrf_chain.py:44,219,363 (QRF from microcosm.fit); uk_runtime/was_wealth.py, lcfs_consumption.py, etb_vat.py and etb_services.py call RegimeGatedQRF, and spi_income.py and salary_sacrifice.py load microcosm.fit.QRF
Microcosm's U.S. build calibrates with microcosm-calibrate us_runtime/exact_k_ladder.py:19-29,190,217 (calibrate on the release ladder)
Microcosm ships an MIT license Microcosm LICENSE
The page's nodes still open their panels every showDetail('…') key matches a data-detail attribute and a detail panel, and node --check passes on the page's script

Not in this PR

  • The README's ten remaining populace prose lines (30 to 181). Package rename populace_dynamics → microcosm_dynamics requires a design-binding repin ceremony #373 exempts README prose from the package repin, so a prose pass can rename them.
  • The plan page's other Populace names, since the page records a plan from 2026-07-14.
  • docs/adr/0003-employer-firm-extension.md:200, which names microcalibrate in the rule this PR rewrites on the plan page. ADR 0003 changes only by joint PR between workstreams A and B.
  • docs/infrastructure.md:311-336, which shows a policyengine-us-data/ tree as this project's code layout.
  • paper/paper.qmd:454, which cites @ghenis2024 beside @policyengine2026 for PolicyEngine's open cross-sectional microdata. The paper cites @microcosm2026 for Microcosm's frame at line 365.
  • reviews/ feedback records, which keep their wording.
  • The ghenis2024 citation key at CLAUDE.md:46, which cites the 2024 Enhanced CPS launch post.

🤖 Generated with Claude Code

…alibrate

CLAUDE.md, the README's related projects, the interactive methodology
page and the employer-firm plan named microimpute, microcalibrate, L0
and the Enhanced CPS as this project's tools. Microcosm's microcosm-fit
and microcosm-calibrate succeed them, as docs/infrastructure.md already
says, so these files now name those packages and call their APIs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
social-security-model Ready Ready Preview Nov 8, 2026 8:19pm UTC

Request Review

CLAUDE.md now names microimpute, microcalibrate and L0 as packages and
lists Microcosm's shards as examples. docs/infrastructure.md, which the
guide points to, now says microcosm-calibrate runs Adam on log-weights
by default. The methodology page gives the RegimeGatedQRF sentence a
verb, says microcosm-fit runs in Microcosm's U.S. and UK builds, types
the calibrate sample's input and opens its key insight with the tools
PolicyEngine already has. The plan page recasts the recipe, the
tax-records sentence and the target/gate rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The panel's title and import line already name microcosm-fit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review November 8, 2026 21:43
@MaxGhenis
MaxGhenis merged commit 331ae7d into master Nov 8, 2026
12 checks passed
@MaxGhenis
MaxGhenis deleted the docs-old-stack-guidance branch November 8, 2026 21:44

This branch was successfully deployed

1 active deployment
Preview — 09d5d9b1 Deployed Nov 8, 2026 by vercel[bot]
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