Inputs
The engine reads only the local profile that the user has explicitly entered: era of service, claimed conditions and ratings, domain engagement flags (healthcare, education, housing, employment, transition), and Intent-to-File status. It never reads PII (no SSN, no claim number, no medical records).
All profile data lives in localStorage. Nothing is sent to a server. The gap-analysis engine runs entirely in the browser at page load.
Rules
Each gap rule is a function (profile) => BenefitFinding | null. A rule returns null when its trigger does not match. Rules cover both within-domain gaps (e.g., a veteran has a rating but no priority-group estimate) and cross-domain gaps (e.g., a 100% rating may unlock CHAMPVA for dependents).
Rules are ordered by domain, then by severity. The output is deduplicated and capped to keep the plan view scannable. Each finding carries its own short rationale so a CVSO can see which rule fired and why.
What the engine does not do
The engine does not predict claim outcomes, does not assign ratings, and does not infer service connection. It surfaces commonly-missed steps based on rules a CVSO would recognize, with citations back to the underlying program rules.
When a profile is empty, the engine surfaces only first-time-user starting points: read the disability overview, find a CVSO, file an Intent to File if filing soon. It does not invent a case.