Skip to content

Add unreachable reference checkpoint to encode-policy-v2#126

Merged
hua7450 merged 1 commit intoPolicyEngine:mainfrom
hua7450:unreachable-ref-checkpoint
Mar 16, 2026
Merged

Add unreachable reference checkpoint to encode-policy-v2#126
hua7450 merged 1 commit intoPolicyEngine:mainfrom
hua7450:unreachable-ref-checkpoint

Conversation

@hua7450
Copy link
Collaborator

@hua7450 hua7450 commented Mar 16, 2026

Summary

Adds a user checkpoint (Step 0E) to the /encode-policy-v2 command that surfaces references the document-collector could not automatically fetch (403, redirect, timeout). The user can then manually download and provide these files before the consolidation phase begins.

Motivation

During NH CCAP implementation, the document-collector found URLs for the official rate schedule (BCDHSC Form 2533) and cost share table (Form 2532/SR 24-08) but couldn't fetch them — NH DHHS returns 403 for automated requests while working fine in a browser. The agents fell back on the CCDF State Plan and Cornell LII, which had incomplete/outdated data:

  • 24 of 45 rate values were wrong — HT/PT rates assumed FT/2 and FT/4, but actual ratios are ~77.4% and ~38.7%
  • Cost share structure was only partially captured from the State Plan text
  • Exempt center rules (school-age base rate, 72-month age guard) were missing

All of this was only discovered after the user manually downloaded Form 2533 and compared values.

Changes

  1. Step 0E added after document-collector completes (Phase 0D) and before consolidation (Phase 1)
  2. Document-collector prompt updated to report failed fetches in the research summary
  3. User presented with AskUserQuestion listing unreachable URLs with options to download/skip/investigate
  4. If user provides files, they are processed (text extraction + screenshots) and appended to working_references.md before consolidation

Common blocked sources (by state agency)

Agency Blocked Content
NH DHHS Rate schedules (Form 2533), cost share tables (Form 2532), SR announcements, policy manual
Many .gov sites Provider enrollment pages, sliding fee schedules, operational forms

After the document-collector phase, check for references that returned
403/redirect/timeout. Present them to the user for manual download
before proceeding to consolidation. State agency websites (e.g., NH
DHHS) commonly block automated access while working in a browser.

This prevents implementation agents from using incomplete sources —
NH CCAP had 24 of 45 rate values wrong because the official rate
schedule (Form 2533) was inaccessible to automated fetches.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hua7450 hua7450 marked this pull request as ready for review March 16, 2026 20:45
@hua7450 hua7450 merged commit 28bd6e2 into PolicyEngine:main Mar 16, 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