Skip to content

Add data validation improvements to country-models agents#125

Merged
MaxGhenis merged 1 commit intomainfrom
improve-data-validation
Mar 14, 2026
Merged

Add data validation improvements to country-models agents#125
MaxGhenis merged 1 commit intomainfrom
improve-data-validation

Conversation

@MaxGhenis
Copy link
Contributor

Summary

Based on real errors found in policyengine-us#7726 (SNAP utility allowances), adds validation improvements to three agents:

  • rules-engineer: YAML structural integrity checks, breakdown metadata validation, multi-source cross-referencing
  • implementation-validator: New Phase 0 (run before semantic checks) for YAML structure, breakdown mismatches, duplicate keys, non-standard effective dates
  • test-creator: Sub-region/breakdown test coverage requirements

Errors these prevent

Error Agent fix
WY value orphaned after metadata: block rules-engineer + validator Phase 0
breakdown: [state_code] when keys are AK_C, NY_NYC rules-engineer + validator Phase 0
Incorrect IN values (wrong effective dates) rules-engineer cross-referencing
Missing AK/NY sub-region tests test-creator coverage requirement

Test plan

  • Plugin validates with claude --plugin-dir
  • Changelog fragment present

🤖 Generated with Claude Code

Based on real errors found in policyengine-us#7726 (SNAP utility allowances):

- rules-engineer: Add YAML structural integrity checks (no orphaned values
  after metadata block), breakdown metadata correctness validation, and
  multi-source cross-referencing requirements for parameter values
- implementation-validator: Add Phase 0 (YAML structural integrity) before
  semantic checks, covering orphaned metadata values, breakdown mismatches,
  duplicate keys, and non-standard effective dates
- test-creator: Require sub-region/breakdown coverage in tests (one test
  per region plus default/fallback case)

These address: WY value orphaned after metadata, wrong breakdown variable
(state_code vs snap_utility_region), incorrect IN effective dates, and
missing AK/NY sub-region tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MaxGhenis MaxGhenis merged commit 841b7e9 into main Mar 14, 2026
2 checks passed
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