Skip to content

Writing and design skills: post figures, covers, and grading forecasts - #94

Open
MaxGhenis wants to merge 11 commits into
mainfrom
max/report-guidance-charts-covers-grading
Open

MaxGhenis wants to merge 11 commits into
mainfrom
max/report-guidance-charts-covers-grading

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Adds guidance learned from the 2025 SPM graded prediction post: how posts draw charts and covers, and how a post that grades a forecast should handle the analysis. Three rounds of independent review caught errors in that post's diagnosis, and each rule below comes from one of those catches or from a correction on the post's presentation. The cover rules also draw on the Veterans Day 2026 post, whose first cover, made from this section's original single template, repeated the 2025 SPM covers.

policyengine-writing

New section: Figures, covers and replication in posts

New section: Grading forecasts and explaining misses

  • Grade the registered quantity against published margins, and say when the published change falls short of statistical significance.
  • A rerun that matches the published figure doesn't identify the right inputs.
  • Every rerun runs the full model.
  • Totals come first. Splits depend on the order of the steps, so split each rerun on its own run.
  • CPS population controls change between years, so compare per recipient and hold the age mix fixed.
  • State a pattern as a finding only with its sampling error.
  • Name each rate's definition in full, and label data series as their source does.
  • Get an independent review before publishing.

Writing checklist: five new items covering the above, among them "unlike recent covers" and a crop check.

policyengine-design

The Charts section now says posts use ```chart blocks, not Plotly, and points to the writing skill for the chart types. It explains that ui-kit components that rely on unprefixed utility classes render unstyled on the website, whose Tailwind build uses the tw: prefix. The Plotly house style now covers only notebooks and standalone outputs.

Cover crops

Research cards (ResearchClient.tsx) and the home page's "Expert policy analysis" cards (HomeBlogPreview.tsx) fill their boxes with object-fit: cover, centered. A headless Chromium run on policyengine.org at 22 widths from 320 to 1920 px matched the boxes the code at app-v2 9b2d83e sets. A second run swapped a 1800×840 cover into the home block's two large cards, whose box height follows the layout:

View Box (CSS px) Share of a 2.14:1 cover in view
Research card, 320 px phone 286 × 260 central 51% of the width
Research card, 360 px phone 326 × 260 central 59% of the width
Research card, 375 px phone 341 × 260 central 61% of the width
Research card, 1025 px (filter sidebar appears) 352 × 260 central 63% of the width
Research card, 1408 px and wider 543 × 260 97% of the width
Home large card, 360 to 375 px phone 326 to 341 × 200 central 76% to 80% of the width
Home large card, 600 to 991 px full column width, cover's own height whole cover
Home large card, 992 to 1920 px 466 to 674 × 291 to 344 central 69% to 98% of the width
Home small card, 768 to 991 px 734 to 957 × 180 middle 53% to 40% of the height
Home small card, 1440 px 674 × 180 middle 57% of the height
Article header full column width whole cover

HomeFeaturedResearch.tsx crops to 16:9, but it shows only two apps.json entries (bill-tracker and obbba-households), so the section leaves it out. In the 375 px research card, the graded SPM post's cover keeps about a third of its teal notebook and none of its teal folder. The porch cover keeps the boots, dog tags and mug and most of the cap, but the 1440 px home card trims the tops of its boots. A 1200×630 launch card shows as little as 36% of its height in a 991 px small home card.

Release

The plugin version goes from 4.1.1 to 4.1.2 in targets/claude/marketplace.template.json and every bundles/*.json. This PR opened with a 4.0.3 bump; main has since released 4.1.0 and 4.1.1, and the branch now sits on main at 13436fc. The dashboard manifest picks up the new body lengths and bundle versions, and scripts/build_manifest.py --check passes.

Checks

uv run pytest --ignore=tests/test_skill_examples.py passes 296 tests (1 expected failure), including the anti-rot lint, and the Claude wrapper builds. The companion app-v2 doc update, PolicyEngine/policyengine-app-v2#1236, has merged.

🤖 Generated with Claude Code

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

The "Post dates" note added here (skills/policyengine-writing/SKILL.md, the bullet that says to always add a time of day) is obsolete now that PolicyEngine/policyengine-app-v2#1237 has merged: bare dates show as their own day in every time zone. The corrected note is in #95, stacked on this branch and approved by an Opus 5.5 review. Merge #95 into this branch before merging #94, or merge #95 after #94, when GitHub retargets it to main.

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Heads-up: #107 merged into main (8315e46). It adds a CI job, manifest, that fails when dashboard/src/data/manifest.json differs from a fresh build. This PR changes files the manifest reads, so its next CI run will fail that job until the branch is rebased and the manifest rebuilt. Please don't hand-merge the manifest; run:

git fetch origin && git rebase origin/main
uv run python scripts/build_manifest.py
uv run python scripts/build_manifest.py --check

Then commit the rebuilt manifest. The builder now needs PyYAML, which uv run installs, and it stops on frontmatter that isn't valid YAML.

MaxGhenis and others added 5 commits November 11, 2026 13:27
policyengine-writing gains two sections and four checklist items:
- Figures, covers and replication in posts: ```chart blocks for charts (no
  matplotlib PNGs or Plotly in new posts); newsletter and social chart images
  screenshot from the live post; photographic still-life covers with nothing
  legible, never a chart (with the prompt used for the 2025 SPM posts);
  replication detail in footnotes; posts.json dates with a time of day.
- Grading forecasts and explaining misses: grade the registered quantity with
  published margins; every rerun a full model run; totals first and
  order-dependent splits labelled; per-recipient, age-adjusted survey
  comparisons across CPS population-control changes; sampling error before
  claiming a pattern; exact rate definitions; independent review.

policyengine-design: posts on policyengine.org use ```chart blocks, the website's
tw: Tailwind prefix leaves ui-kit utility classes unstyled there, and the
Plotly house style is for notebooks and standalone outputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in body, grading wording, covers, dates)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…prompt, decomposition orders, cover wording)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis force-pushed the max/report-guidance-charts-covers-grading branch from 53d1dc9 to c14a25c Compare November 11, 2026 18:31
MaxGhenis and others added 6 commits November 11, 2026 14:16
…s crops

The covers guidance prescribed one scene, an oak table by a window in
morning light, and the first Veterans Day 2026 cover drawn from it repeated
the 2025 SPM covers. The guidance keeps the constraints (photographic still
life, teal only in the objects, nothing legible, never a chart, 1800x840
WebP, a 1200x630 typographic card for a launch) and replaces the template
with a rule: choose the setting, camera angle and light from the post's
subject, lay the cover beside the 20 newest posts' covers, and change any
scene that repeats one's setting or composition.

A crops paragraph gives the boxes policyengine.org draws covers in. A
headless measurement at widths from 320 to 1920 px matched the code:
- research cards stand 260 px tall; a 375 px phone shows 341 px, the central
  61% of the width, and screens from 1408 px show 543 px;
- the home page's three small cards stand 180 px tall and show the middle
  57% of the height at 1440 px and 40% to 53% on 768-991 px tablets;
- the article page shows the whole cover.
Covers keep their main objects in the central 60% of the width and the
middle half of the height.

The SPM oak-desk prompt stays as one example, with a note that its
right-two-thirds grouping loses the teal notebook and folder on phones, and
the Veterans Day porch prompt joins it. The checklist adds "and unlike
recent covers" and a crop check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Splits the three longest sentences, gives the prompts the verb where the oak
desk and the edges held it, names the cards that crop, and has the reader
set a launch card's words in the safe zone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main released 4.1.1 while this branch waited; the writing and design
skill changes ship as 4.1.2. The dashboard manifest picks up the new
body lengths and bundle versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
policyengine-app-v2#1237 formats post dates from their calendar fields,
so a bare posts.json date shows as its own day in every time zone. Drop
the advice to always add a time of day; keep dates free of offsets,
which the website's data test rejects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…review nit)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e, large home cards)

- Charts: the website draws `line` charts too (policyengine-app-v2#1462,
  BlogLineChart.tsx); the chart standards live at
  docs/engineering/skills/chart-standards.md. The design skill now points
  to the writing skill for the chart types instead of repeating them.
- Crops: the home block's two large cards, measured with a cover in each,
  show 76-80% of its width on phones, all of it from 600 to 991 px and
  69-98% on desktops. A 360 px phone shows 59% of a cover's width in the
  research card, not 58%.
- Zone: say which screens cut into it, ask for it in the image prompt,
  and give a 1200x630 launch card's words the middle third of its height,
  since the small home cards show as little as 36% of a 1.9:1 card.
- The oak prompt asks for a light oak table, and its right-two-thirds
  grouping falls outside the crop zone; say so.
- Crop a cover centered on the objects, not tightly around them.
- Grading section: active verbs in two bullet leads and one sentence;
  rewrap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis force-pushed the max/report-guidance-charts-covers-grading branch from c14a25c to 456454e Compare November 11, 2026 19:25
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