encode-reform

encode-reform is a command for Claude Code from PolicyEngine/policyengine-claude. It costs 19 tokens per session (5,691 once invoked), scanned A, original, MIT.

A command that coordinates several agents to turn a proposed US policy change into a production-ready PolicyEngine implementation. It accepts a state bill or federal reform and can stop after research or skip review.

In plain words
What is it for?
Use it to implement or research tax and benefit reforms such as state bills, federal proposals or policy experiments.
Why use it?
It organizes research, implementation, testing and review for policy changes that would otherwise require coordinating many separate tasks.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to implement or research tax and benefit reforms such as state bills, federal proposals or policy experiments.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/policyengine/policyengine-claude/encode-reform
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/PolicyEngine/policyengine-claude

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for encode-reform

README.md
[![agentmods](https://agentmods.dev/badge/commands/policyengine/policyengine-claude/encode-reform/github.svg)](https://agentmods.dev/commands/policyengine/policyengine-claude/encode-reform)
Your own site
<a href="https://agentmods.dev/commands/policyengine/policyengine-claude/encode-reform"><img src="https://agentmods.dev/badge/commands/policyengine/policyengine-claude/encode-reform/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for encode-reform

Your own site · 80×15
<a href="https://agentmods.dev/commands/policyengine/policyengine-claude/encode-reform"><img src="https://agentmods.dev/badge/commands/policyengine/policyengine-claude/encode-reform.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,691 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.05691
Opus 5.5 $0.00008 $0.02276
Sonnet 5.5 $0.00004 $0.01138
Haiku 4.5 $0.00002 $0.00569

Measured 1mo ago against content hash 7e54701d9f21, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

encode-reform scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- curl -sL {url} -o {PREFIX}-bill.pdf
commands/encode-reform.md · 644 lines

How it starts

The opening of the file, as written. The whole thing — 644 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Implementing Reform: $ARGUMENTS

Coordinate a multi-agent workflow to implement a contributed policy reform (proposed bill, policy experiment, or tax change) as a complete, production-ready reform in PolicyEngine US.

GLOBAL RULE — PDF Page Numbers: Every PDF reference href MUST end with #page=XX (the file page number, NOT the printed page number). The ONLY exception is single-page PDFs. This rule applies to ALL agents in ALL phases.

GLOBAL RULE — Reform Skill: Every implementation agent (rules-engineer, test-creator, validator) MUST load /policyengine-reform-patterns in addition to their standard skills. This teaches the factory function pattern, gov/contrib/ paths, in_effect toggle, reforms: test key, and registration in reforms.py.

Arguments

$ARGUMENTS should contain:

  • State and bill (required) — e.g., MT HB 268, CT SB-100, SC H.4216
  • Or federal reform — e.g., CRFB AGI Surtax, Streamlined EITC
  • Options:
    • --skip-review — skip Phase 4 review-fix loop
    • --research-only — stop after Phase 1, produce impl-spec but don't implement

Examples:

/encode-reform MT HB 268
/encode-reform CT SB-100
/encode-reform SC H.4216 --skip-review
/encode-reform CRFB AGI Surtax
/encode-reform KY HB 13 HB 152

Constants

ST          = state code from $ARGUMENTS (e.g., "mt", "ct", "ky") or org name for federal (e.g., "crfb")
BILL_ID     = bill identifier (e.g., "hb268", "sb100", "h4216", "agi_surtax")
PREFIX      = /tmp/{ST}-{BILL_ID}

Context Window Protection

YOU (the orchestrator) ONLY read SHORT summary files (marked "Short" in the table below). All detailed data flows through disk files between agents. Never read full spec files — delegate that to agents.

Disk File Handoff Table

File Writer Reader Size
{PREFIX}-type-summary.md bill-analyzer Orchestrator Short ≤15
{PREFIX}-bill-analysis.md bill-analyzer consolidator Full
{PREFIX}-bill.pdf bill-analyzer prep-bill-pdf Binary
sources/working_references.md bill-researcher consolidator Full
{PREFIX}-impl-spec.md consolidator rules-engineer, test-creator Full
{PREFIX}-impl-summary.md consolidator Orchestrator Short ≤20
{PREFIX}-checkpoint.md validator Orchestrator Short ≤15
{PREFIX}-test-results.md ci-fixer Orchestrator Short ≤10
{PREFIX}-audit-checkpoint.md quick-auditor Orchestrator Short ≤15
{PREFIX}-checklist.md review-fixer next round fixer Full
{PREFIX}-final-report.md reporter Orchestrator Short ≤25
{PREFIX}-pr-description.md reporter gh pr edit Full

Read the full file on GitHub · 644 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +3 lines 7e54701d9f21
  2. 1mo ago First seen · 641 lines · 19 tokens per session scan A 6d9f96e89a5c

Subscribe to this mod's changes

encode-reform is a command published in the GitHub repository PolicyEngine/policyengine-claude (32 stars, last pushed 2d ago), licensed MIT. It adds 19 tokens to every session and 5,691 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.