Skip to content

Add content pipeline skills and /publish-analysis command#83

Draft
PavelMakarchuk wants to merge 5 commits intomainfrom
content-pipeline
Draft

Add content pipeline skills and /publish-analysis command#83
PavelMakarchuk wants to merge 5 commits intomainfrom
content-pipeline

Conversation

@PavelMakarchuk
Copy link
Contributor

Summary

Adds 3 new skills and 1 command for the blog post content pipeline, enabling agent-driven analysis → blog post generation with fully traceable numbers.

New skills

  • blog-pipeline-skill — results.json schema, {{}} template syntax, policyengine.py simulation patterns, chart generation with PE brand colors, source line tracking, and resolve-posts build step design
  • us-household-analysis-skill — US household-level impact patterns: calculate_household_impact(), situation dicts with all 6 entity groups, income sweeps with axes, reform comparisons, marginal tax rates, benefit cliffs, and results.json generation for case studies
  • uk-household-analysis-skill — UK household-level impact patterns: benefit unit structure, would_claim_* flags, UC taper analysis, regional variation (Scotland), tenure types, and UK-specific variable reference

New command

  • /publish-analysis — 9-phase workflow from research topic to published blog post: define reform → create repo → write analysis.py → generate results.json → write blog post with {{}} refs → posts.json entry → social content → verify → distribute

Key design decisions

  • Uses policyengine.py for all simulations (local microsimulation, not API)
  • Zero hard-coded numbers — every value flows through results.json with source_line and source_url
  • Charts as static <img> from GitHub Pages (no iframes, fully indexable)
  • Follows policyengine-writing-skill patterns: neutral tone, active voice, sentence case headings, quantitative precision
  • Includes checklists, common issues tables, and error handling for each skill/command

Registered in plugins

  • analysis-tools (v3.10.0)
  • content (v3.10.0)
  • complete

Test plan

  • Verify skill markdown renders correctly in Claude Code
  • Test /publish-analysis command triggers correct skill loading
  • Validate US household examples against policyengine.py API
  • Validate UK household examples (especially would_claim_* flags)
  • Confirm marketplace.json is valid JSON with no duplicates

🤖 Generated with Claude Code

PavelMakarchuk and others added 5 commits February 23, 2026 18:38
- blog-pipeline-skill: results.json schema, template syntax, policyengine.py
  simulation patterns, chart generation, source tracking, and SEO output
- us-household-analysis-skill: US household-level impact patterns including
  calculate_household_impact(), situation dicts, income sweeps, reform
  comparisons, and results.json generation for case studies
- uk-household-analysis-skill: UK household-level impact patterns including
  benefit unit structure, would_claim flags, UC taper analysis, regional
  variation, and Scottish tax differences
- publish-analysis command: 9-phase workflow from topic to published post
  with pre-flight checklist, verification table, and error handling
- Register all new skills/command in analysis-tools, content, and complete plugins

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- blog-pipeline-skill: 7 standard chart types (decile impact, net income
  curve, winners/losers, budget over time, poverty comparison, waterfall,
  marginal rate) with Plotly code examples, alt text patterns, and custom
  chart guidelines. 5 standard table types (household impact, decile
  distribution, parameter comparison, budgetary impact, poverty/inequality)
  with column specs and custom table rules.
- us-household-analysis-skill: required/optional chart and table catalogs
  for US household posts (benefit cliff charts, state comparisons, filing
  status comparisons, benefit eligibility tables)
- uk-household-analysis-skill: required/optional chart and table catalogs
  for UK household posts (UC taper charts, regional comparisons, Scotland
  vs England, UC calculation walkthrough tables, revenue by fiscal year)

Based on inventory of ~85 US and ~72 UK existing blog posts plus 10
analysis repos.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three specialist agents for the content pipeline:
- analysis-writer: writes analysis.py, runs policyengine.py simulations,
  produces validated results.json with tracked_value()
- blog-writer: writes blog post markdown with {{}} template references,
  zero hard-coded numbers, neutral tone
- pipeline-validator: 9-check read-only validation (schema, refs,
  hard-coded numbers, language, voice, headings, charts, traceability,
  structure)

Also updates publish-analysis command to spawn these agents
sequentially (each depends on the previous), following the same
pattern as audit-seo with specialist agents.

Registered in content, analysis-tools, and complete plugins.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- analysis-writer: fix results.json construction to wrap
  tracked_value() dicts in ValueEntry before passing to ResultsJson
- blog-pipeline-skill: replace manual inspect.currentframe() pattern
  with tracked_value() as the recommended approach
- us-household-analysis-skill: update results.json generation to use
  tracked_value(), ValueEntry, TableEntry, and ResultsJson
- uk-household-analysis-skill: same updates for UK patterns

All code examples now match the actual policyengine.results API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Redesign the pipeline with 3 human checkpoints, external estimate
comparison (with % thresholds), chart sanity checks, and status-based
publication control — patterns adopted from encode-bill command.

Co-Authored-By: Claude Opus 4.6 <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