Update Ladki Bahin Beneficiary Age Limit

Claude Code·Sonnet 5.5·Unknown author·yesterday·2min·1 Checkpoint·9 file changes·+208/-3·9.6K tokens

You are the Niyam encoder. Update this rulebook so it matches a new government document.

The validated change set is in .niyam/changeset.json. It lists each change with its exact source quote, page and clause. The source document is registered in sources/index.yaml as gr-202407031335114330 (date 2024-07-03).

Do this:

  1. Read CLAUDE.md (the rulebook rules), the change set, and the files of the affected scheme(s): mh.ladki_bahin.
  2. Apply every change in the change set, following CLAUDE.md exactly:
    • parameter change: add a new dated value under values: starting 2024-07-03. Never edit or delete older values.
    • condition change: set valid_until on the old condition to the day before 2024-07-03, and add a new condition with the same id and valid_from: 2024-07-03.
    • condition removed: only set valid_until to the day before 2024-07-03.
    • every new value or condition gets source / metadata.reference with doc gr-202407031335114330, page, clause, quote (copied from the change set) and quote_en.
    • if a change needs a new person field, add it to schema/person.yaml with a safe default that keeps existing results unchanged.
  3. Add test citizens to tests/ for every change, dated on or after 2024-07-03: just below, at, and just above each limit, plus one case dated before 2024-07-03 proving the old rule still applies. Each case cites GR 202407031335114330 p.<page> clause <clause> in source.
  4. Add an entry at the top of CHANGELOG.md (English, Hindi, Marathi) linking to the document.
  5. Run python -m niyam_rulebook test and fix problems until it prints 0 failed with no PROBLEM lines.
  6. Do not run git. Do not edit files outside schemes/, parameters/, tests/, sources/, glossary/, schema/ and CHANGELOG.md.

Finish with a short summary of what you changed and the final test result.

yesterday·59.1s

I applied all six changes from GR 202407031335114330, and python -m niyam_rulebook test prints 45 passed, 0 failed with no PROBLEM lines.

Parameters (new values dated 2024-07-03, older values untouched, each with the GR reference):

  • c1: age_max goes from 60 to 65.
  • c2: eligible_marital_statuses now includes unmarried.
  • c4: disqualifying_govt_jobs is now [regular, pensioner].

Conditions in schemes/mh/ladki_bahin.yaml:

  • c5: The old other_scheme_limit now ends 2024-07-02. A new one from 2024-07-03 uses <, so receiving exactly Rs 1,500 disqualifies.
  • c6: farm_land_limit only gets valid_until: 2024-07-02.
  • c3: The new one_unmarried_per_family condition applies only to unmarried women: marital_status != 'unmarried' or not other_unmarried_beneficiary_in_family. The change set's bare not person.other_unmarried_beneficiary_in_family would also have disqualified married women with that flag set. The clause says only one unmarried woman per family, so I scoped it.

Schema: schema/person.yaml already had other_unmarried_beneficiary_in_family with a default of false, so I didn't change it.

Tests: I added 21 cases. Each change has cases dated on or after 2024-07-03 around its limit, plus one dated 2024-07-02 showing the old rule. For example, age 64, 65 and 66, and Rs 1,499, 1,500 and 1,501 from other schemes. The farm land cases are 5, 5.5 and 20 acres, since there is no limit left to test around. Every case cites GR 202407031335114330 p.2 clause <clause>.

CHANGELOG.md: A new entry at the top in English, Hindi and Marathi, linking to the GR.

I didn't model the two ambiguities in the change set: whether the Rs 2.5 lakh limit for contract workers is personal or family income, and what the ration-card income exemption covers. I left the existing income ceiling as it was. I did not run git.