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.
npx agentmods add commands/policyengine/policyengine-claude/implement-structuralgit clone --depth 1 https://github.com/PolicyEngine/policyengine-claudeWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00048 | $0.01023 |
| Opus 5 | $0.00024 | $0.00511 |
| Sonnet 5 | $0.00010 | $0.00205 |
| Haiku 4.5 | $0.00005 | $0.00102 |
Grade A, and why
implement-structural scanned grade A with 0 findings 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 2d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Implement structural: $ARGUMENTS
When /analyze-policy classifies a reform as STRUCTURAL, the pipeline
stops with a backlog issue. This command picks that issue up and implements
the model extension, so the original analysis can re-run and publish.
Arguments
$ARGUMENTS should contain ONE of:
- A structural backlog issue —
policyengine-us#9051or the issue URL - A structural-backlog report path —
/tmp/<id>-structural-backlog.md - The archived structural analysis —
analyses/<date>-<id>-structural.md
Options:
--draft— open the PR as draft--no-rerun— skip recording the pending re-run command
Phase 1 — Read the spec and choose the mode
Read the backlog issue/report. It carries the classifier's findings: which parameters/variables are missing, the empirical verification, and the size estimate. Then choose:
- Enacted law → BASELINE change. The statute is current law; the model
is simply behind. Edit
policyengine_us/parameters/...(and variables if needed) directly — e.g. HI SB3125/Act 24: append bracket[12]@ 13% to the fivegov.states.hi.tax.income.rates.*scales, inert before 2027-01-01. NEVER implement enacted law undergov/contrib/. - Proposal → CONTRIB reform. Not yet law; implement as a
gov/contrib/factory reform with anin_effecttoggle — delegate to/encode-reform, which owns that pattern, and stop here.
Phase 2 — Implement (baseline mode)
Invoke the structural-implementer agent — it owns this whole phase
(statute verification, baseline edits, inertness + boundary tests, draft
PR). Its non-negotiables include re-deriving the spec from the ENROLLED
statute: backlog issues can be materially wrong (HI SB3125's issue said
"append one bracket"; the act replaced the whole rate table). For complex
multi-variable changes it may in turn use the country-models agents:
rules-engineer— the parameter-schema change (exact YAML edits, statutory references on every value: bill section + effective date, and inert defaults for periods before the effective date — a new bracket's pre-effective threshold is.infor its rate matches the bracket below, whichever the surrounding schema convention uses) AND any variable/formula changes. A pure bracket append usually needs no formula edit; verify the rate scale is consumed generically before assuming.test-creator— boundary tests proving: (a) pre-effective years are bit-identical to the old schema (the inertness test), (b) the new structure binds correctly in the effective year at, just below, and above each new threshold, per filing status.- Load
policyengine-standards: changelog entry, formatting (make format), naming conventions.
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.
- 2d ago First seen · 87 lines · 48 tokens per session scan A 400dbef2a4c1
implement-structural is a command published in the GitHub repository PolicyEngine/policyengine-claude (31 stars, last pushed 7d ago), licensed MIT. It adds 48 tokens to every session and 1,023 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
advisor
Advisory gate for triage or plan decisions. Spawns a second-opinion agent that challenges assumptions, surfaces risks, and proposes alternatives before the decision commits. Based on Anthropic advisor tool pattern.
guide
You are a triage agent who continuously prioritizes loom:issue issues by applying loom:urgent to the top 3 priorities.
pm-review
Review local git diff with reasoning + snippets; cross-check; dispose findings into the rules library.
new
Creates a new item in a module that supports the new capability.
card
Open one self-contained OverClick card.
linear-bulk
Apply the same change to many Linear issues at once. Dry-run by default.