Skip to content

Add partner integration docs (MkDocs Material site)#1492

Closed
hua7450 wants to merge 5 commits into
mainfrom
docs/partner-integration-guide
Closed

Add partner integration docs (MkDocs Material site)#1492
hua7450 wants to merge 5 commits into
mainfrom
docs/partner-integration-guide

Conversation

@hua7450
Copy link
Copy Markdown
Collaborator

@hua7450 hua7450 commented Apr 30, 2026

Summary

Adds a partner-facing documentation site at docs/, built with MkDocs Material, deployed to GitHub Pages on push to main. Six pages covering the request shape, period keys, response format, two cookbook recipes, and a changelog. Designed to look like the Claude API docs — left sidebar nav, code samples with copy buttons, search — branded with PolicyEngine teal and the wordmark logo.

Depends on PR #1490 merging first — the docs describe behavior from that fix (year-keyed inputs on month-defined variables, the warnings array, the new 400 catalog). Merging this docs PR before #1490 would publish docs for behavior that isn't on production yet.

Pages

Page Purpose
Overview What the API is, base URL, end-to-end working curl example
Request format Entities, members, inputs vs outputs (null to compute), entity table
Period keys Year vs month rules, mixed-shape budget split, 400 catalog, warnings array
Response format 200/400/500/404 shapes, output key echoing, error table
Cookbook Two partner recipes — annual hello-world + eligibility-cliff
Changelog Partner-visible API changes, version pinning instructions

Numbers in examples

All SNAP / EITC / CTC figures are computed against policyengine-us 1.634.8 for a CA family of 4:

  • $30k earnings → $3,924.54 SNAP, $7,316 EITC, $4,400 CTC
  • Cliff scenario: $1,500/mo → $276.10 SNAP, $2,000/mo → $0 SNAP, cliff at month 6

Deployment

.github/workflows/docs.yml builds and deploys on every push to main when docs/, mkdocs.yml, or the workflow itself changes. Once PR #1490 ships and this PR merges, the site goes live at:

https://policyengine.github.io/policyengine-household-api/

To enable: Settings → Pages → Source: "GitHub Actions".

Branding

  • PolicyEngine wordmark logo + teal-square favicon copied from policyengine-app-v2
  • Custom CSS overrides in docs/stylesheets/extra.css map Material's tokens to PolicyEngine's design system (teal #319795, Inter, JetBrains Mono, sentence-case)
  • Layout matches Claude API docs proportions: full-width header, left-only sidebar (right TOC hidden), 4rem header bar with vertically centered logo + title + search

Test plan

  • mkdocs build --strict passes locally
  • All 6 pages render with real content (no "Coming soon" stubs)
  • Sidebar shows 8 page links (no per-page anchors cluttering it)
  • Header search and theme toggle on the right edge
  • CI builds the site cleanly on push
  • Preview deploys to GitHub Pages once Pages is enabled in repo settings

Out of scope (future PRs)

  • Reforms guide
  • Axes / scan recipes
  • AI explainer / tracer documentation
  • Custom domain (docs.policyengine.org/household-api or similar)

hua7450 and others added 5 commits April 29, 2026 22:22
Adds the docs site framework with PolicyEngine brand styling (teal
primary, Inter + JetBrains Mono) and the first cookbook recipe
("When does my client lose SNAP this year?") as the tone reference.

Other pages are stubbed pending review of the recipe page.

GitHub Actions workflow deploys to GitHub Pages on push to main when
docs/ or mkdocs.yml change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces illustrative SNAP values in the cliff recipe with figures
computed from policyengine-us 1.634.8 — CA family of 4 earning
\$1,500/mo qualifies for \$276.10 SNAP, the cliff fires at \$2,000/mo.

Removes navigation.tabs from the Material theme features so the entire
navigation lives in the left sidebar (matches Claude API docs).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fills in the previously-stubbed pages:

- Overview: working SNAP example with 200 response, hosted/self-hosted
  endpoints
- Request format: entity table, members, inputs vs outputs, complete
  request returning real EITC/CTC/SNAP figures
- Period keys: year vs month rules, mixed-shape budget split with
  worked $1,581.82/mo example, 400 catalog (malformed key,
  inconsistent full year), warnings array
- Response format: 200/400/500/404 catalog, warnings field semantics
- Cookbook hello-world: annual SNAP recipe matching the cliff recipe
  template
- Changelog: PR #1490 entries, version-pinning instructions, format
  legend

Numbers come from policyengine-us 1.634.8: CA family of 4 with
\$30k earnings receives \$3,924.54 SNAP, \$7,316 EITC, \$4,400 CTC.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Use PolicyEngine white wordmark logo + favicon from policyengine-app-v2
- Drop "PolicyEngine" prefix from site_name (logo already says it) → header reads "POLICY ENGINE | Household API"
- Hide right-side TOC pane (Claude-docs style — left nav only)
- Hide per-page anchor links and redundant section labels in primary nav
- Hide expand/collapse caret next to nested sections (always-expanded)
- Increase header height (4rem) and title size (1.4rem)
- Tighten sidebar item spacing for compact-but-readable layout

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…lors

- Drop centered 61rem grid → header and main content span full viewport
  width (logo at left edge, sidebar against the wall)
- Remove GitHub repo badge from header
- Reorder header right side: [theme toggle] [search] (was [search]
  [theme toggle])
- Force "Household API" topic visible in header title (was hidden by
  Material's auto site-name/page-title swap)
- Vertically center all header items
- Force all heading levels (h1–h6) to use --md-default-fg-color (black)
  instead of Material's default muted gray for h1
- Zero double padding on the Cookbook section container so it aligns
  with peer items in the sidebar

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hua7450 hua7450 closed this Apr 30, 2026
@hua7450 hua7450 deleted the docs/partner-integration-guide branch April 30, 2026 03:21
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