Update Sanjay Gandhi Niradhar Monthly Benefit

Claude Code·Haiku 5.5·Unknown author·15h ago·6min·1 Checkpoint·8 file changes·+119·16.8K 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-202307061137387522 (date 2023-07-05).

Do this:

  1. Read CLAUDE.md (the rulebook rules), the change set, and the files of the affected scheme(s): mh.sanjay_gandhi_niradhar.
  2. Apply every change in the change set, following CLAUDE.md exactly:
    • parameter change: add a new dated value under values: starting 2023-07-05. Never edit or delete older values.
    • condition change: set valid_until on the old condition to the day before 2023-07-05, and add a new condition with the same id and valid_from: 2023-07-05.
    • condition removed: only set valid_until to the day before 2023-07-05.
    • every new value or condition gets source / metadata.reference with doc gr-202307061137387522, 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 default that keeps existing results unchanged and never grants extra eligibility or money (a fact that unlocks a higher limit or amount, such as being disabled, defaults to false).
  3. Add test citizens to tests/ for every change, dated on or after 2023-07-05: just below, at, and just above each limit, plus one case dated before 2023-07-05 proving the old rule still applies. Each case cites GR 202307061137387522 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.

15h ago·1m

The rulebook now reflects the 5 July 2023 GR: the monthly amount rises from Rs 1,000 to Rs 1,500 for all beneficiaries, and the widow tiers (1 child, 2+ children) also go to Rs 1,500. python -m niyam_rulebook test ends with tests: 60 passed, 0 failed and no PROBLEM lines.

What changed

  • Parameters: I added a 2023-07-05 value of 1500 to monthly_benefit.yaml, monthly_benefit_widow_one_child.yaml and monthly_benefit_widow_two_or_more_children.yaml. Each carries the GR's page, clause and quotes from the change set. No older values were touched.
  • Scheme: No conditions changed, and no person fields were needed. I added a comment in schemes/mh/sanjay_gandhi_niradhar.yaml noting the 2023 revision.
  • Tests: I added 14 cases to tests/mh/sanjay_gandhi_niradhar.yaml. For each widow tier and the general case, there is one case on 4 July 2023 (old amount), one on 5 July 2023 (new amount), and one later in 2026 where applicable. Each cites GR 202307061137387522 p.1 clause 1.
  • Changelog: I added a top entry in English, Hindi and Marathi, linking to the GR.
  • Not changed: sources/index.yaml already registered this GR, so I left it alone.

Things to check

  • Quotes not verified against the PDF. I could not extract text from sources/mh/202307061137387522.pdf; the image renderer and the shell both failed, so the quotes are copied from the change set as instructed. Someone should confirm them against the PDF before this is relied on.
  • Widows with 3 or more children. The change set treats "2 or more" as one tier, so I encoded Rs 1,500 for 3 children too (one test case). This matches the existing structure, where 3 children already get the 2+ amount. It is an interpretation, not an explicit line in the GR's quote.
  • Shell access. Shell commands needed approval during this run. The test command was approved when I ran it.