Skip to content

Grant eligibility ​

A household applies for a grant: an accessible flow takes the region, the household and its income with evidence, eligibility rules written from the scheme's text decide, and near-limit or incomplete applications go to a caseworker. Pack: examples/policies/grant-eligibility/.

A pattern for expressing a public sector & grants policy, not compliance guidance: the thresholds, lists and fields are placeholders chosen to make the example run; a real policy comes from the business's own rules. It calls no app, so it runs in an empty workspace as it is.

The decision it automates ​

Whether the household is eligible, needs a caseworker, or is not eligible, when the application is submitted.

Data expected ​

  • The applicant as a subject (kind user); nothing is read from its data.
  • The flow's answers under submission: region, householdSize, income and incomeEvidence (files).

Steps and rules ​

StepTypeWhy
collectwait_for_collectionThe grant-application flow.
rulesevaluate_rulesThe grant-eligibility rule set under max_severity: residency and the income limit are block, the rest warn.
routebranchrules.outcome == manual_review opens a case.
reviewcreate_casegrant_caseworker, 10-day SLA.
decideemit_decisionFrom the rules, or the reviewer's decision.

The rule set grant-eligibility (useCase: custom) uses max_severity: a failed block rule rejects, a failed warn rule sends the run to review, and the weights add up to the score.

RuleTypeSeverity, weightFails when
grant_residencycomparisonblock, 100region is not North, South or East
grant_income_limitexpressionblock, 100income is above 15 000 + 7 500 × householdSize
grant_near_limitexpressionwarn, 20income is above 90% of that limit
grant_evidencecomparisonwarn, 30no evidence of income was uploaded

What a reviewer sees ​

A grant_caseworker case with the answers, the evidence and each rule's result, so the refusal or award letter can quote the rule that applied.

How to adapt it ​

Write your scheme's formula as the CEL expressions, add steps for each household member, look applicants up in your registers through an app you build, and add an appeal workflow that a different caseworker reviews.

Run it ​

bash
pnpm policy:import examples/policies/grant-eligibility --publish

The fixture is a household of three earning 34 000 with no evidence: under the limit of 37 500 but within 10% of it, so the near-limit and evidence rules fail, a grant_caseworker case opens, the check approves it and the run completes with a manual approve.

Released under the Apache-2.0 License.