Update Niyam Rulebook for Government Document
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:
- Read CLAUDE.md (the rulebook rules), the change set, and the files of the affected scheme(s): mh.ladki_bahin.
- 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_untilon the old condition to the day before 2024-07-03, and add a new condition with the same id andvalid_from: 2024-07-03. - condition removed: only set
valid_untilto the day before 2024-07-03. - every new value or condition gets
source/metadata.referencewith docgr-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.yamlwith a safe default that keeps existing results unchanged.
- parameter change: add a new dated value under
- 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 citesGR 202407031335114330 p.<page> clause <clause>insource. - Add an entry at the top of CHANGELOG.md (English, Hindi, Marathi) linking to the document.
- Run
python -m niyam_rulebook testand fix problems until it prints0 failedwith no PROBLEM lines. - 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.
I applied all six changes from GR 202407031335114330 to mh.ladki_bahin. python -m niyam_rulebook test prints tests: 47 passed, 0 failed with no PROBLEM lines.
- Maximum age (c1):
age_maxnow has a 2024-07-03 value of 65. - Unmarried women (c2):
eligible_marital_statusesnow includesunmarriedfrom 2024-07-03. - One unmarried woman per family (c3): I added a new condition,
unmarried_one_per_family, valid from 2024-07-03.schema/person.yamlalready hadother_unmarried_beneficiary_in_family, so I added no field. - Contract staff (c4):
disqualifying_govt_jobsis now[regular, pensioner]from 2024-07-03. - Other-scheme limit (c5): I set
valid_until: 2024-07-02on the oldother_scheme_limitcondition. A new one from 2024-07-03 uses<, so receiving exactly Rs 1,500 now disqualifies. - Farm land (c6): I set
valid_until: 2024-07-02onfarm_land_limitand added no replacement.
Every new value and condition cites the GR with page, clause, the original-language quote and the English quote.
I added 22 test cases to tests/mh/ladki_bahin.yaml. They cover each limit (age 64/65/66, other-scheme Rs 1,499/1,500/1,501, farm land 4.5/5/5.5 acres) and the contract-staff cases at and just above Rs 2.5 lakh income. There is also one case dated 2024-07-02 per change showing the old rule still applies.
I added a CHANGELOG entry in English, Hindi and Marathi linking to the GR.
- Contract staff and the Rs 2.5 lakh cap: I read the cap as the existing family income ceiling, so contract staff no longer disqualify at all. The change set flags this as ambiguous, and I did not model the other reading.
- Skipped topics: The change set skipped the ration-card income-certificate exemption and the document, committee and incentive changes, and I left them out.
- Source index:
sources/index.yamlalready listed the GR and the PDF was already insources/mh/, so I left both alone.