Add content pipeline skills and /publish-analysis command#83
Draft
PavelMakarchuk wants to merge 5 commits intomainfrom
Draft
Add content pipeline skills and /publish-analysis command#83PavelMakarchuk wants to merge 5 commits intomainfrom
PavelMakarchuk wants to merge 5 commits intomainfrom
Conversation
- 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>
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
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
{{}}template syntax, policyengine.py simulation patterns, chart generation with PE brand colors, source line tracking, and resolve-posts build step designcalculate_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 studieswould_claim_*flags, UC taper analysis, regional variation (Scotland), tenure types, and UK-specific variable referenceNew command
{{}}refs → posts.json entry → social content → verify → distributeKey design decisions
policyengine.pyfor all simulations (local microsimulation, not API)source_lineandsource_url<img>from GitHub Pages (no iframes, fully indexable)Registered in plugins
Test plan
/publish-analysiscommand triggers correct skill loadingwould_claim_*flags)🤖 Generated with Claude Code