encode-policy-v2
Thin launcher. The canonical workflow—routing, arguments, phases, roles, checkpoints,
artifact contracts, retry budgets, and completion gates—lives in
references/workflow.md. Read it completely before acting and
follow it exactly; do not redefine or compress its behavior here.
Treat the text after $encode-policy-v2 as raw workflow arguments:
$encode-policy-v2 STATE PROGRAM [--skip-review] [--research-only] [--600dpi]
[--resume] [--from-phase N] [--full-validation] [--local]
[--sources MANIFEST] [--source-budget MINUTES]
Mandatory gates that no surface may skip:
- Load model-development in each model worker's own context and verify its load evidence
under the canonical loading contract before accepting work; missing skills block it.
- Route purely parametric changes to
encode-reform unless the user chooses to continue.
- Make no GitHub write before the user-approved scope decision exists.
- Read all relevant rules and visually inspect tables, scans or ambiguous PDF evidence;
share validated originals and extracts with the independent review.
- Do not push through a red structural or quick-audit gate, or silently push failing tests.
- Workers never delegate; brief both owners from one shared contract block, and treat the
coordinator's single bounded test invocation as the run of record.
- In local mode, make no GitHub writes or pushes; preserve the implementation worktree.
- Keep new PRs draft and complete follow-up review after any review-fix round.
- Maximum two reviews: a second, incremental review follows repairs to confirmed
criticals from the first. Stop after round 2 with any remaining blockers reported.
- Do not finish before the Phase 7 summary and canonical completion contract are satisfied.
Surface adapters:
- Claude Code: also read
references/claude-launcher.md, which maps canonical
roles and abstract operations to Claude Code mechanics.
- Codex: use the delegation mapping below.
Codex delegation mapping, when subagent use is available and authorized:
- The coordinator handles research, requirements, coverage/validation, Git and reporting;
it may read code and full evidence directly. No summary-only read restriction.
- Use persistent workers for the two substantive roles: implementer (parameters and
variables together) and test-author. Pass exact owned paths, concrete worktree/run
values, approved scope, artifact contracts and the needed skill references.
- Each Codex worker resolves
policyengine-model-development from its own available
skills catalog and reads that entrypoint using its catalog-specified access mechanism,
then its task references. Include the canonical loading contract in the prompt; a
repository path alone does not demonstrate runtime skill availability. Do not assume
the parent session's skill load supplies the worker's context.
- Test-source analysis can overlap implementation; final tests use the published variable
contract. Reuse owners for repairs. Workers never stage, commit, push or independently
sync/format the shared environment. They do their own work without helper or nested
agents, run at most one bounded self-check of their owned tests, and report a
CONTRACT MISMATCH instead of relocating cases; the coordinator runs the tests of record.
- Run review-program in a fresh review coordinator context with its canonical local or
published arguments, raw source manifest, captured head and scope. Require that
coordinator's own model-development load. Leave capacity for its reviewers and consume
its completed decision directly for repair routing, without a second review by the encoder.
- Use only supported runtime capabilities. When delegation is unavailable, perform the
implementation roles directly while preserving independent review context and gates.
1---2name: encode-policy-v23description: Use when the user invokes $encode-policy-v2 or asks Codex or Claude Code to implement a new PolicyEngine-US state benefit program or a new structural program component from official rules. Covers existing-program routing, source collection and selective PDF inspection, user-approved scope, implementation, tests, validation, draft PR preparation, and independent review-fix rounds.4---56# encode-policy-v278Thin launcher. The canonical workflow—routing, arguments, phases, roles, checkpoints,9artifact contracts, retry budgets, and completion gates—lives in10[references/workflow.md](references/workflow.md). Read it completely before acting and11follow it exactly; do not redefine or compress its behavior here.1213Treat the text after `$encode-policy-v2` as raw workflow arguments:1415```text16$encode-policy-v2 STATE PROGRAM [--skip-review] [--research-only] [--600dpi]17 [--resume] [--from-phase N] [--full-validation] [--local]18 [--sources MANIFEST] [--source-budget MINUTES]19```2021Mandatory gates that no surface may skip:2223- Load model-development in each model worker's own context and verify its load evidence24 under the canonical loading contract before accepting work; missing skills block it.25- Route purely parametric changes to `encode-reform` unless the user chooses to continue.26- Make no GitHub write before the user-approved scope decision exists.27- Read all relevant rules and visually inspect tables, scans or ambiguous PDF evidence;28 share validated originals and extracts with the independent review.29- Do not push through a red structural or quick-audit gate, or silently push failing tests.30- Workers never delegate; brief both owners from one shared contract block, and treat the31 coordinator's single bounded test invocation as the run of record.32- In local mode, make no GitHub writes or pushes; preserve the implementation worktree.33- Keep new PRs draft and complete follow-up review after any review-fix round.34- Maximum two reviews: a second, incremental review follows repairs to confirmed35 criticals from the first. Stop after round 2 with any remaining blockers reported.36- Do not finish before the Phase 7 summary and canonical completion contract are satisfied.3738Surface adapters:3940- **Claude Code**: also read41 [references/claude-launcher.md](references/claude-launcher.md), which maps canonical42 roles and abstract operations to Claude Code mechanics.43- **Codex**: use the delegation mapping below.4445Codex delegation mapping, when subagent use is available and authorized:4647- The coordinator handles research, requirements, coverage/validation, Git and reporting;48 it may read code and full evidence directly. No summary-only read restriction.49- Use persistent workers for the two substantive roles: implementer (parameters and50 variables together) and test-author. Pass exact owned paths, concrete worktree/run51 values, approved scope, artifact contracts and the needed skill references.52- Each Codex worker resolves `policyengine-model-development` from its own available53 skills catalog and reads that entrypoint using its catalog-specified access mechanism,54 then its task references. Include the canonical loading contract in the prompt; a55 repository path alone does not demonstrate runtime skill availability. Do not assume56 the parent session's skill load supplies the worker's context.57- Test-source analysis can overlap implementation; final tests use the published variable58 contract. Reuse owners for repairs. Workers never stage, commit, push or independently59 sync/format the shared environment. They do their own work without helper or nested60 agents, run at most one bounded self-check of their owned tests, and report a61 `CONTRACT MISMATCH` instead of relocating cases; the coordinator runs the tests of record.62- Run review-program in a fresh review coordinator context with its canonical local or63 published arguments, raw source manifest, captured head and scope. Require that64 coordinator's own model-development load. Leave capacity for its reviewers and consume65 its completed decision directly for repair routing, without a second review by the encoder.66- Use only supported runtime capabilities. When delegation is unavailable, perform the67 implementation roles directly while preserving independent review context and gates.