Build B-02

Welfare Navigator

A fishing family in Kerala is entitled to schemes nobody has ever put in one place, written in a language the forms half-use, behind a counter that is open when they are at sea.

Status
BUILDING
Year
2026
Domain
Civic tech / Rules engines / Accessibility
Stack
Next.js 16 / React 19 / TypeScript / Zod / Vitest / ExcelJS

Artifact

condition        answer        result
────────────────────────────────────────────
member of board  yes           T
contributions    yes           T
annual income    not answered  U
age band         55-59         T
────────────────────────────────────────────
all(T, T, U, T)                U

  →  NEEDS INFORMATION, not "not eligible"
     the one unanswered question is named,
     and it is the only one left to ask

any(F, F)        →  F   matched nothing
all(T, F, U)     →  F   one hard fail is a fail
all(T, T, T)     →  T   potentially eligible

Three-valued evaluation. An unanswered question is never on its own a rejection.

Signal chain

  1. 01 · Input37 official sourcesActs, gazette notifications, government orders, board scheme pages. Six tier one, thirty-one tier two. Downloadable ones are stored in the repository.
  2. 02 · ProcessingQuoted into a workbookEvery condition carries the exact sentence it came from and a page locator. A rule with no quote fails validation.
  3. 03 · ProcessingRules compiled, audited in CIConditions become all / any trees; an audit job re-checks every numeric threshold against its own quote and fails the build on a mismatch.
  4. 04 · ProcessingThree-valued engine, in the browserEvery condition is true, false or unknown. Unknown reports as "needs information" and never rejects. Answers never leave the tab.
  5. 05 · OutputResult, reason, documents, officeEach scheme shows the condition, the answer and the official quote behind it, then one merged document checklist and the right office for that district.

System architecture

Not documented yet.

Implementation

Welfare information in Kerala is not secret. It is just scattered across thirty-seven documents, several of them PDFs in legacy Malayalam fonts that cannot even be searched. The eligibility is knowable. Finding it is the barrier.

So the app asks about ten to thirteen questions, and only questions that can still change an answer. If no remaining scheme depends on your age, it does not ask your age.

Unknown is not no

Every condition evaluates to true, false or unknown, and unknown is its own outcome. A scheme you have not answered enough questions about shows as needs information, never as a rejection. This sounds like a detail. It is the whole difference between a screening tool and a door being closed on someone who would have qualified.

The same rule holds in reverse: a scheme you miss by one changeable condition (contributions in arrears, say) is shown as not matched, with what it would become if you cleared it, and where to go. Nothing is promised.

Nobody is asked for an exact income

Numeric questions are asked as bands, and the bands are cut at the rules’ own thresholds. If the scheme’s limit is a number, the band boundary is that number, so the answer carries exactly enough information to decide and not one rupee more. There is no name field, no phone field, no Aadhaar field, and no free text anywhere in the flow.

The engine runs in the browser. Answers live in the open tab and nowhere else: not in the URL, not in local storage, not on a server. They clear on close, on Clear, and on idle. The printable document checklist carries scheme names, documents and offices, and none of your answers.

Every number is traceable, and a robot checks

Each condition stores the exact sentence it came from and a page locator. A CI job re-reads every numeric threshold and limit against its own quote and fails the build when they disagree, which means a rule cannot quietly drift away from the document it claims to implement.

A second scheduled job re-reads all thirty-seven sources every week, flags any scheme whose published wording has changed, and proposes the update. Government rules change without telling anyone; this is the part that notices.

Where the model is allowed to be

It may rewrite an official sentence into plainer Malayalam or English. It may not decide eligibility, compute a threshold, or write anything into the rules. The optional helper runs on Chrome’s on-device model or a local Ollama install, so the plain-language rewrite costs nothing and sends nothing anywhere. With it switched off, or offline, the official quotes are still there. They were always the source of truth.

What is not done

All 106 conditions are sourced and quoted, and every one is still waiting on a second person to check it against the document. One scheme has no published application route and says so. Six verified schemes have no published document list and say so. No office has verified coordinates, so the app gives addresses and phone numbers and does not pretend to know which one is nearest.

It is a screening tool. It is not a Government of Kerala service, and it says that on every result.

Measurements

Schemes
3222 fishing, 10 plantation
Conditions
106
Facts asked
41
Official sources
37
Documents catalogued
67
Offices, 14 districts
66
Test profiles
3218 standard, 10 boundary, 3 incomplete, 1 mixed

Source: Counts from the current build, reported by the dataset validator.

Failures and iterations

No iterations logged yet.

Result

No result stated yet.

Current status

BUILDING

All 106 conditions are sourced and quoted, but single-checked. None has been reviewed by a second person yet.

Next step

Not decided yet.

Credits

Hari
Sources, rules, engine, interface
Claude Opus 5
Co-author on commits

Links

guest@hari: ~esc to close