Product requirements document
NIYAM: Regulatory Circular to Live Rule Engine
Version 1.0 · November 2026 · Team Dragorithm. A product requirements document for the prototype at niyam-fall-2026.vercel.app/console.
1. Summary
When the Reserve Bank of India issues a circular, every bank it applies to must find it, work out what it means for its own rules and policies, change live systems safely, and prove it later. Today that takes weeks to months of hand-offs between compliance, risk, IT and testing. NIYAM is a team of seven AI agents that turns a circular into a tested, two-person-approved, monitored live rule, rolls it out safely, rolls it back on drift, and traces every alert to the sentence that caused it.
2. Problem
Constant change
Slow and manual
Costly when wrong
Tools stop early
3. Users
Maker
Chief Compliance Officer
Checker
Head of Risk and IT Change
Daily user
Compliance analyst
Daily user
Rule-engine engineer
Reader
Auditor or RBI inspector
First segment: the 1,457 urban co-operative banks and larger NBFCs, which carry the same rules as large banks with very small teams. Next: large banks, as a layer over the engines they already run.
4. Goals and non-goals
Goals
- Circular to signed approval pack in minutes, not months
- Zero rules that do not match the regulation's number, operator and scope
- No production change without two human signatures
- Automatic, logged rollback on abnormal behaviour
- Every alert traceable to its clause, 100% of the time
Non-goals
- Replacing the bank's rule engines; NIYAM writes rules for them
- Removing human judgement from approval
- Legal interpretation of ambiguous regulation; those clauses become manual controls
- Handling real customer data in this prototype
5. User flow
- Choose a bankor define your own
- Load the circularPDF, Word or text
- Runrule-based or Claude
- Watch 7 agentsread, extract, map, draft, test
- Two signaturesmaker and checker
- Releaseshadow, canary, live
- Bank sitelive rollout, Sentinel, Golden Thread
6. Functional requirements
| ID | Requirement | How NIYAM meets it | Status |
|---|---|---|---|
| FR-1 | Accept a regulatory circular as PDF, Word or text | Reader intake: PDF text layer, .docx and plain text, reflowed into numbered paragraphs | Built |
| FR-2 | Read scanned or poor-quality PDFs | OCR, with olmOCR for poor scans, in front of the same Reader | Production design |
| FR-3 | Decide which clauses bind this bank | Reader scopes every clause against the bank's licence type, with a stated reason | Built |
| FR-4 | Extract each obligation with its number, operator and source words | Extractor (rule-based or Claude); a quote must appear word for word in the clause or it is rejected | Built |
| FR-5 | Map obligations to the bank's live rules and internal policies | Mapper walks the knowledge graph: modify, gap (new rule), policy conflict, manual control | Built |
| FR-6 | Draft executable rules, never raw SQL | Author writes a typed rule file on a draft branch; schema and compiler check it; SQL is compiled by code and runs read-only | Built |
| FR-7 | Test every draft against the regulation, not against itself | Validator generates boundary tests from the obligation and objects to the Author over A2A (at most 3 rounds) | Built |
| FR-8 | Show the impact before anyone signs | 90-day backtest, old rule against new, alerts, customers flagged and analyst hours; what-if threshold explorer | Built |
| FR-9 | Require two different people to approve | Maker and checker sign with name, employee ID, reason and a four-point checklist; HMAC tokens bound to the exact file, valid 24 hours | Built |
| FR-10 | Never let AI change production directly | Release verifies both signatures, then shadow (days 1-3), canary 10% (days 4-7), live; feature flags, not code pushes | Built |
| FR-11 | Detect drift and roll back automatically | Sentinel compares daily alerts with the backtest band (mean ± 3 sd); outside it, flag off and git revert | Built |
| FR-12 | Explain any alert to an inspector | Golden Thread: alert, rule version, approvers, obligation, clause, circular, in one query; tamper-evident audit pack | Built |
| FR-13 | Work for any bank, not one | Four sample banks plus a bank the user defines; rules are written against a Bank Semantic Model, so onboarding is mapping | Built |
| FR-14 | Connect to the bank's real rule engines | One MCP adapter per engine (AML, fraud, limits); Neo4j and a warehouse inside the bank's boundary | Production design |
7. Non-functional requirements
Security
Integrity
Auditability
Model independence
Cost
Privacy
Explainability
8. Architecture
Seven agents over A2A
Seven MCP tool servers
Knowledge graph and semantic model
Typed rule language
Stack
Bank sites
9. Success metrics
| Metric | Target | How it is measured |
|---|---|---|
| Circular to signed approval pack | Under 1 hour (today: weeks) | Run timestamps in the console |
| Generated tests passing at approval | 100% | Validator results in every pack |
| Obligations with a verified exact quote | 100%; unverified ones rejected | Extractor span check |
| Extraction precision on labelled clauses | Reported live, failures included | Evaluation endpoint /api/eval (30 hand-labelled clauses, 10 broken rules) |
| Unauthorised production changes | Zero | Release refuses without two valid tokens |
| Time to roll back on drift | Same day, automatic | Sentinel and rollback log |
| Alerts traceable to their clause | 100% | Golden Thread for any alert |
| Pilot: analyst hours saved per change | To be measured | Read-only pilot with one co-operative bank or NBFC |
10. Risks and mitigations
The model misreads a clause or invents a number
“Exceeding” versus “or more” is lost
A signed rule is edited before release
Bad data after go-live
Prompt injection hidden in a circular
Model outage or cost spike
11. Release plan
Now: prototype
0-3 months: read-only pilot
3-6 months: connectors
6-12 months: Master Directions
12-24 months: more regulators
12. How to evaluate the prototype in 3 minutes
- 1Open the console, pick ABC Bank (its circular PDF loads and is read automatically), or add your own bank.
- 2Press Run the pipeline. Watch the seven agents; each card says what it produced and how.
- 3In Two-person approval, sign as maker and checker (names, IDs, reasons, checklist).
- 4Press Release. The bank's own site opens and plays shadow, canary and live, the Sentinel's rollback, and the Golden Thread.
- 5Optional: switch to Claude live to see Claude's calls stream, with tokens and cost, checked by the same gates.
Sources and further reading
- 1.Business Today, 28 Nov 2025244 Master Directions
- 2.RBI Annual Report 2024-25, via Business StandardRBI penalties 2024-25
- 3.CUBE Cost of Compliance Report 2025 (vendor survey)Time to implement a regulatory change
- 4.RBI Report on Trend and Progress of Banking 2024-25Urban co-operative banks
- 5.RBI FREE-AI Committee report, via KPMG IndiaRBI FREE-AI framework
- 6.A2A Protocol specification
- 7.Model Context Protocol specification