@mudraforge/statutory 2.13.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +6 -0
- package/package.json +1 -4
- package/src/calculators.js +139 -3
- package/src/constants.js +1 -1
- package/types/index.d.ts +95 -0
- package/conformance/README.md +0 -54
- package/conformance/fixtures/invalid_malformed_temporal_dates.json +0 -10
- package/conformance/fixtures/invalid_missing_effective_period.json +0 -6
- package/conformance/fixtures/invalid_missing_section_code.json +0 -9
- package/conformance/fixtures/valid_circular_frontmatter.md +0 -16
- package/conformance/fixtures/valid_full_section.json +0 -35
- package/conformance/fixtures/valid_minimal_section.json +0 -11
- package/conformance/test_conformance.js +0 -129
- package/docs/ACCOUNTING_ASSURANCE_AUDIT_DOSSIER.md +0 -276
- package/docs/ADESHA_ASSURANCE_OVERVIEW.md +0 -166
- package/docs/ARCHITECTURE.md +0 -773
- package/docs/ARCHITECTURE_DECISIONS.md +0 -158
- package/docs/CASE_01_FORM_TEXT.txt +0 -48
- package/docs/CATALOG.md +0 -1901
- package/docs/CA_PILOT_BENCHMARK_CASES.md +0 -282
- package/docs/CORPUS_QUALITY.md +0 -106
- package/docs/DATA_LICENSING.md +0 -73
- package/docs/DOMAIN_BREADTH_AND_DEPTH_COMPARISON.md +0 -209
- package/docs/ENTERPRISE_GOVERNANCE.md +0 -160
- package/docs/OKF_MAINTENANCE_SOP.md +0 -286
- package/docs/PILOT_EVALUATION_GUIDE.md +0 -215
- package/docs/PROVENANCE.md +0 -33
- package/docs/VERIFICATION.md +0 -106
- package/examples/README.md +0 -56
- package/examples/invoice_deduction_trace.json +0 -149
- package/examples/simulate_end_to_end_trace.js +0 -106
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
# MudraForge Statutory Substrate: Breadth & Depth Analysis
|
|
2
|
-
## Public Package Seed vs. Full Sovereign Operating Engine
|
|
3
|
-
|
|
4
|
-
> **Document Version**: `2.13.0`
|
|
5
|
-
> **Package**: `@mudraforge/statutory` (v2.13.0)
|
|
6
|
-
> **Enterprise Sovereign Engine**: MudraForge Adesha Sovereign Runtime
|
|
7
|
-
> **Specification**: Google Open Knowledge Format (OKF v0.2)
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## 1. Executive Overview
|
|
12
|
-
|
|
13
|
-
This document provides the authoritative architectural matrix comparing the **Breadth** (regulatory domains covered) and **Depth** (granularity, operative provisos, evidence attestation, and mathematical enforcement) between:
|
|
14
|
-
|
|
15
|
-
1. **The Public Package (`@mudraforge/statutory`)**: The lightweight, zero-dependency, offline-capable package of 46 verified provisions across 5 foundational domains with declarative USVM AST execution (`@mudraforge/statutory/usvm`) published for public AI agents and developer workflows.
|
|
16
|
-
2. **The Full Sovereign Engine (Adesha Runtime)**: The private enterprise financial operating substrate governing live Accounts Payable (AP), Treasury, and General Ledger writebacks on the MudraForge Cloudflare Global Anycast Edge.
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## 2. Breadth Matrix: Regulatory Domains
|
|
21
|
-
|
|
22
|
-
This matrix delineates what is **natively bundled in the base package** (zero network calls, completely offline), what is **available to pull immediately via edge sync (`npx @mudraforge/statutory sync`)**, and what is **scheduled for upcoming expansion packs** from the enterprise sovereign engine (Adesha Runtime):
|
|
23
|
-
|
|
24
|
-
| # | Regulatory Domain | Base Package (Offline Clone / No Sync) | Edge Synced (`npx ... sync`) | Future Cloud Expansion (Internal Sovereign Engine) | Availability & Status in Package |
|
|
25
|
-
| :-: | :--- | :--- | :--- | :--- | :---: |
|
|
26
|
-
| **1** | **Direct Tax (TDS / TCS / Corporate)** | Included: 10 core provisions (194Q, 194J, 194C, 194H, 194I, 194R, 206AB, 206C(1H), 115BAA-115JB, Act 2025 Sec 393) + circulars & Form 26Q/16A/10IC | Real-time CBDT circular updates & threshold changes | Section 197 TRACES certificate quota vault, advance challan netting, automated double-entry JVs | **Bundled in Base**<br>*(Active)* |
|
|
27
|
-
| **2** | **MSME & Working Capital** | Included: 4 provisions (Sections 15 & 16, MSMED-7 criteria, MCA Form MSME-1, Sec 22 Schedule III disclosures) | Live quarterly RBI repo rate tables & MSEFC state facilitation rules | Multi-interval monthly compounding calculator (`calculateMultiIntervalMsmeInterest`), Sec 23 Form 3CD addback | **Bundled in Base**<br>*(Active)* |
|
|
28
|
-
| **3** | **Indirect Tax (GST & ITC)** | Included: 9 provisions (CGST 17(5) blocked credit, 8 composite/mixed, 9(3) RCM, 10 composition, 16(2) 180-day rule, 34 credit/debit notes, 51 TDS, IGST 16 LUT, Rule 48(4) IRN) | Real-time GSTR-2B reconciliation updates & notifications | Real-time Rule 48(4) IRN hash verification, Rule 89(5) Inverted Duty Structure (IDS) refund engine | **Bundled in Base**<br>*(Active)* |
|
|
29
|
-
| **4** | **International Tax & FX** | Included: 4 provisions (Section 195 cross-border TDS, Ind AS 21/109 FX revaluation, IRC 901/904 FTC, Transfer Pricing 92C / Rule 10CA) | Foreign vendor DTAA treaty checklists (TRC, No-PE, electronic Form 10F) | Supreme Court *Engineering Analysis* SaaS royalty defense, Form 15CA/CB automated dual-act router | **Bundled in Base**<br>*(Active)* |
|
|
30
|
-
| **5** | **Corporate M&A & Restructuring** | Included: 2 provisions (Section 50B slump sale net worth computation, Section 79 loss carry-forward & continuity) | Section 281 AO clearance NOC & Section 313 successor liability checklist | Section 50B organic undertaking test, Section 281 AO clearance NOC, Section 313 successor liability, CGST 85 going concern | **Bundled in Base**<br>*(Active)* |
|
|
31
|
-
| **6** | **Corporate Governance (MCA)** | Not bundled in base | Companies Act Section 188 threshold guidance | **Full Companies Act 2013 Suite**: Section 188 (RPT audit committee & voting ban), Section 180 (borrowing limits), Section 185/186 (inter-corporate loans), Section 68 (25% buybacks) | **Planned: MCA Expansion Pack** |
|
|
32
|
-
| **7** | **Capital Markets (SEBI LODR)** | Not bundled in base | Regulation 30 materiality guidelines | **SEBI LODR Suite**: Regulation 30 Materiality Triad calculator (2% turnover / 2% net worth / 50% PAT), 24-hr stock exchange disclosure timer, Regulation 23 listed RPTs | **Planned: SEBI Expansion Pack** |
|
|
33
|
-
| **8** | **Financial Reporting (Advanced Ind AS)**| Core Ind AS 21/109 FX revaluation bundled | Baseline Ind AS 115 & 116 accounting summaries | **Full Indian Accounting Standards Suite**: Ind AS 115 (5-step, variable constraint), Ind AS 116 (ROU/lease liability), Ind AS 103 (PPA/goodwill/NCI), Ind AS 12 (DTA/DTL) | **Planned: Ind AS Expansion Pack** |
|
|
34
|
-
| **9** | **Strategic Corporate Tax Planning** | Section 115BAA & Section 79 bundled | Extended tax planning guidance | **Strategic Tax Playbook**: Section 115BAA vs MAT credit cliff, Section 80JJAA 30% employment deduction, Section 68/115BBE cash credit defense | **Planned: Strategic Tax Pack** |
|
|
35
|
-
| **10**| **Customs & Foreign Trade Policy** | Not bundled in base | Customs valuation basics | **Customs & Trade Suite**: Section 65 MOOWR duty deferral, EPCG, Advance Authorization, Section 74 fraud penalties, IGST Section 13(8)(b) intermediary traps | **Planned: Customs Pack** |
|
|
36
|
-
| **11**| **Finance Operations & SOPs** | Not bundled in base | Standard 3-way match guidelines | **Enterprise Treasury Controls**: P2P 3-way match, O2C, 13-week cash forecasting, penny drop validation, maker-checker segregation of duties | **Planned: Finance Ops Pack** |
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## 3. Depth Matrix: Granularity, Invariants & Execution
|
|
41
|
-
|
|
42
|
-
"Depth" measures the progression from declarative metadata to active legal interpretation, external government portal attestation, and deterministic arithmetic calculation:
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
Level 1: Declarative Schema (Section Code, Titles, Baseline Rates)
|
|
46
|
-
↓
|
|
47
|
-
Level 2: Official Provisos & Executive Circulars (CBDT, CBIC, MSME OMs)
|
|
48
|
-
↓
|
|
49
|
-
Level 3: Compliance Return Schemas (Form 26Q, Schedule III, GSTR-2B)
|
|
50
|
-
↓
|
|
51
|
-
Level 4: External Portal Attestation (TRACES Certificates, UDYAM Validations)
|
|
52
|
-
↓
|
|
53
|
-
Level 5: Deterministic Mathematical Execution (Excess Math, Compound Interest, Journal Vouchers)
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Detailed Depth Breakdown by Domain
|
|
57
|
-
|
|
58
|
-
### 1. Direct Tax & Corporate Withholding (TDS / TCS / Corporate Regimes)
|
|
59
|
-
* **Public Starter Seed**:
|
|
60
|
-
- Reaches **Level 3** (with Level 5 Deterministic Calculators for MAT vs 115BAA and 288B tax rounding).
|
|
61
|
-
- **Provisions**: 10 direct tax sections (194Q, 194J, 194C, 194H, 194I, 194R, 206AB, 206C(1H), 115BAA-115JB, and Income-tax Act, 2025 Section 393).
|
|
62
|
-
- **Thresholds**: ₹50 Lakh annual purchase limit, ₹10 Crore prior turnover, ₹30k/₹1L contractor aggregate, ₹2.4L rent threshold.
|
|
63
|
-
- **Rates**: 0.1% goods TDS, 2% FTS rate, 10% professional rate, 1%/2% contractor rate, 2% commission rate (Finance Act 2024), 22% 115BAA corporate rate, 15% MAT rate, 5% Section 206AA non-PAN cap.
|
|
64
|
-
- **Circulars**: CBDT Circular 13/2021, Circular 23/2017, Circular 03/2020, Circular 29/2019, Finance Act 2024/2025 transition memos.
|
|
65
|
-
- **Forms**: Form 26Q quarterly TDS return schema, Form 16A certificate schema, Form 10IC corporate tax election, Vendor PAN / 206AB declaration template.
|
|
66
|
-
* **Full Enterprise Engine (Adesha Runtime)**:
|
|
67
|
-
- Reaches **Level 5**.
|
|
68
|
-
- **Full Statutory Spectrum**: Section 393(1), Table 1 of Income-tax Act, 2025 (Section 392 Rent, 393 Goods, 394 Contractors, 395 Professional/FTS, 397 Non-PAN).
|
|
69
|
-
- **TRACES Lower Deduction Vault**: Automatically ingests, validates, and tracks Section 197 / Section 395 lower withholding certificates; enforces monetary ceilings and tracks consumed quota.
|
|
70
|
-
- **Advance Netting & Challan Reconciliation**: Matches credits against Challan ITNS 281 tax deposits under Rule 30.
|
|
71
|
-
- **Deterministic Output**: Generates balanced double-entry Journal Vouchers (JVs) debiting expense/inventory, debiting GST ITC, crediting TDS Payable, and crediting AP.
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
### 2. MSME & Working Capital (Delayed Payments, Section 43B(h) & Reporting)
|
|
76
|
-
* **Public Starter Seed**:
|
|
77
|
-
- Reaches **Level 3** (with Level 5 Deterministic Calculator for Section 16 MSME compound penal interest at 3x RBI Bank Rate).
|
|
78
|
-
- **Provisions**: MSMED Act, 2006 Sections 15 & 16; MSMED Section 7 criteria; MCA Form MSME-1; MSMED Section 22 corporate balance sheet disclosures; Income-tax Act Section 43B(h).
|
|
79
|
-
- **Timelines**: Strict 15-day (without contract) or maximum 45-day (with written contract) payment clocks.
|
|
80
|
-
- **Rates**: Mandatory compound penal interest at 3x RBI Bank Rate notified by Reserve Bank of India.
|
|
81
|
-
- **Circulars**: Ministry of MSME OM 1/4(1)/2021-P&G/Policy (trader exclusion from delayed payment), Notification S.O. 2119(E) (composite investment & turnover criteria).
|
|
82
|
-
- **Forms**: UDYAM registration verification schema, Udyam composite calculation worksheet, MCA Form MSME-1 half-yearly return schema, Schedule III trade payables aging disclosure table.
|
|
83
|
-
* **Full Enterprise Engine (Adesha Runtime)**:
|
|
84
|
-
- Reaches **Level 5**.
|
|
85
|
-
- **Multi-Interval Compound Interest Calculator** (`calculateMultiIntervalMsmeInterest`): Accurately tracks shifting RBI Bank Rates across multi-quarter delinquencies, compounding on monthly rests.
|
|
86
|
-
- **Section 23 Permanent Disallowance**: Enforces mandatory tax addback in Clause 22 of Tax Audit Form 3CD.
|
|
87
|
-
- **Dispute Interception Engine**: Evaluates formal 15-day defect notifications that legally pause statutory clocks under Section 15.
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
### 3. Indirect Tax (GST, Invoicing & Input Tax Credit)
|
|
92
|
-
* **Public Starter Seed**:
|
|
93
|
-
- Reaches **Level 3** (with Level 5 Deterministic Calculator for Place of Supply & Zero-Rated LUT exports).
|
|
94
|
-
- **Provisions**: 9 GST provisions: CGST Section 17(5) blocked credit, Section 8 composite/mixed supplies, Section 9(3) RCM, Section 10 composition, Section 16(2) 180-day payment rule, Section 34 credit/debit notes, Section 51 TDS, IGST Section 16 LUT export, CGST Rule 48(4) mandatory e-invoicing.
|
|
95
|
-
- **Circulars**: CBIC Circular 172/04/2022-GST (employer obligation exception), Notification 13/2017-CT(R) (RCM services), Notification 14/2020-CT (Rule 48(4) IRN threshold).
|
|
96
|
-
- **Forms**: GSTR-2B Table 4(B) ineligible ITC schema, GSTR-3B Table 4 ITC reversal schema, RCM self-invoice voucher, LUT Form GST RFND-11 export declaration.
|
|
97
|
-
* **Full Enterprise Engine (Adesha Runtime)**:
|
|
98
|
-
- Reaches **Level 5**.
|
|
99
|
-
- **Section 16(2) 4-Condition Invariant Gate**: Concurrently verifies tax invoice possession, physical GRN receipt, GSTR-2B reflection, and supplier tax remittance.
|
|
100
|
-
- **180-Day Rule Reversal**: Calculates mandatory ITC reversals for invoices unpaid past 180 days with exact 18% annual interest under Section 50.
|
|
101
|
-
- **Rule 48(4) IRN Hash Validation**: Real-time e-invoicing authentication with automated exemptions for Special Economic Zone (SEZ) units.
|
|
102
|
-
- **Rule 89(5) Inverted Duty Structure (IDS)**: Mathematical refund computation formula on inputs vs. output supplies.
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
### 4. International Tax, FX Revaluation & Transfer Pricing
|
|
107
|
-
* **Public Starter Seed**:
|
|
108
|
-
- Reaches **Level 3** (with Level 5 Deterministic Calculators for Transfer Pricing ALP Rule 10CA and Ind AS 21/109 FX revaluation).
|
|
109
|
-
- **Provisions**: Section 195 cross-border payments, Ind AS 21 & 109 foreign exchange revaluation & hedge reserves, Transfer Pricing Section 92C & Rule 10CA range concept, US IRC §§ 901 & 904 Foreign Tax Credit.
|
|
110
|
-
- **Forms**: Form 15CA/15CB checklist, Form 3CEB transfer pricing report schema, Form 67 foreign tax credit statement, Ind AS 109 hedge reserve schedule, IRS Schedule K-3.
|
|
111
|
-
* **Full Enterprise Engine (Adesha Runtime)**:
|
|
112
|
-
- Reaches **Level 5** (Full Corporate Financial Reporting & Ind AS Framework).
|
|
113
|
-
- **Ind AS 115 (Revenue from Contracts with Customers)**:
|
|
114
|
-
- 5-step revenue recognition model.
|
|
115
|
-
- Variable consideration constraint (recognition capped at highly probable non-reversal).
|
|
116
|
-
- Significant financing component discounting ($>1\text{ year}$).
|
|
117
|
-
- Relative Standalone Selling Price (SSP) allocation hierarchy.
|
|
118
|
-
- **Ind AS 116 (Leases)**:
|
|
119
|
-
- Right-of-Use (ROU) asset and Lease Liability discounting at incremental borrowing rate.
|
|
120
|
-
- Low-value asset ($<\$5,000$) and short-term ($<12\text{ months}$) exemption handling.
|
|
121
|
-
- Lease modification vs. reassessment state transitions.
|
|
122
|
-
- **Ind AS 103 (Business Combinations)**:
|
|
123
|
-
- Acquisition method and Purchase Price Allocation (PPA).
|
|
124
|
-
- Goodwill vs. Capital Reserve computation; Non-Controlling Interest (NCI) fair value measurement.
|
|
125
|
-
- **Ind AS 109 (Financial Instruments)**:
|
|
126
|
-
- Solely Payments of Principal and Interest (SPPI) contractual cash flow test.
|
|
127
|
-
- Classification into Amortised Cost, FVTOCI, or FVTPL.
|
|
128
|
-
- 3-Stage Expected Credit Loss (ECL) impairment modeling.
|
|
129
|
-
- **Ind AS 12 (Income Taxes)**:
|
|
130
|
-
- Balance sheet temporary difference method for Deferred Tax Assets (DTA) and Deferred Tax Liabilities (DTL).
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
### 5. Corporate Governance & Companies Act, 2013
|
|
135
|
-
* **Public Starter Seed**:
|
|
136
|
-
- [Not seeded in starter package]
|
|
137
|
-
* **Full Enterprise Engine (Adesha Runtime)**:
|
|
138
|
-
- Reaches **Level 5**.
|
|
139
|
-
- **Section 188 (Related Party Transactions)**:
|
|
140
|
-
- Arm's length ordinary course of business evaluation.
|
|
141
|
-
- Audit Committee prior approval, Board consent, and public shareholder ordinary resolution (exceeding 10% consolidated turnover or ₹1,000 Crore).
|
|
142
|
-
- Related party voting exclusion enforcement.
|
|
143
|
-
- **Section 180(1)(c) (Borrowing Limits)**:
|
|
144
|
-
- Mathematical cap: Paid-up Capital + Free Reserves + Securities Premium.
|
|
145
|
-
- **Section 185 & 186 (Loans & Investments)**:
|
|
146
|
-
- 60% of paid-up capital/free reserves or 100% of free reserves statutory limits.
|
|
147
|
-
- **Section 68 (Share Buybacks)**:
|
|
148
|
-
- 25% net worth cap and mandatory $\le 2:1$ post-buyback debt-to-equity ratio test.
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
### 6. Capital Markets & Listing Obligations (SEBI LODR)
|
|
153
|
-
* **Public Starter Seed**:
|
|
154
|
-
- [Not seeded in starter package]
|
|
155
|
-
* **Full Enterprise Engine (Adesha Runtime)**:
|
|
156
|
-
- Reaches **Level 5**.
|
|
157
|
-
- **Regulation 30 (Materiality Triad)**:
|
|
158
|
-
- Deterministic numerical threshold: lowest of:
|
|
159
|
-
1. $2\%$ of consolidated annual turnover
|
|
160
|
-
2. $2\%$ of consolidated net worth
|
|
161
|
-
3. $50\%$ of 3-year average absolute Profit After Tax (PAT)
|
|
162
|
-
- **24-Hour Stock Exchange Disclosure Clock**:
|
|
163
|
-
- Evaluates unexpected tax demands, vendor litigations, or regulatory notices against the triad threshold and triggers mandatory 24-hour disclosure alarms.
|
|
164
|
-
- **Regulation 23 (Listed RPTs)**:
|
|
165
|
-
- Mandatory prior Audit Committee approval with strict disqualification of all related parties from voting.
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
### 7. Cross-Border & Foreign Exchange Management (FEMA)
|
|
170
|
-
* **Public Starter Seed**:
|
|
171
|
-
- Reaches **Level 3**.
|
|
172
|
-
- **Provisions**: US Internal Revenue Code §§ 901 & 904 Foreign Tax Credit limitation baskets (General vs. Passive Category).
|
|
173
|
-
- **Forms**: Indian Form 67 (Rule 128 statement) and US IRS Form 1065 Schedule K-3 dual-reporting schema.
|
|
174
|
-
* **Full Enterprise Engine (Adesha Runtime)**:
|
|
175
|
-
- Reaches **Level 5**.
|
|
176
|
-
- **Supreme Court Jurisprudence**: *Engineering Analysis Centre of Excellence (2021)* classification: automated SaaS and off-the-shelf cloud infrastructure qualify as "Business Profits" under DTAA Article 7 (0% withholding if No Permanent Establishment).
|
|
177
|
-
- **Form 15CA / 15CB vs. Form 145 / 146**: Automated routing based on remittance thresholds and AO orders under Income-tax Act, 2025.
|
|
178
|
-
- **Treaty Conditionality**: Validates Tax Residency Certificates (TRC), No-PE declarations, and electronic Form 10F filings.
|
|
179
|
-
|
|
180
|
-
---
|
|
181
|
-
|
|
182
|
-
### 8. Corporate Mergers, Acquisitions & Successor Liability
|
|
183
|
-
* **Public Starter Seed**:
|
|
184
|
-
- Reaches **Level 3**.
|
|
185
|
-
- **Provisions**: Section 50B (Capital gains on slump sale of undertakings).
|
|
186
|
-
- **Invariants**: Depreciable assets valued at WDV u/s 43(6); revaluations ignored; indexation benefit unavailable u/s 50B(2).
|
|
187
|
-
- **Circulars**: CBDT Notification 68/2021 (Rule 11UAE Fair Market Value formula: $\max(\text{FMV}_1, \text{FMV}_2)$); CBIC Notification 12/2017 Entry 2 (0% GST going concern exemption).
|
|
188
|
-
- **Forms**: Form 3CEA Chartered Accountant audit report schema; Section 281 & Section 313 tax due diligence checklist.
|
|
189
|
-
* **Full Enterprise Engine (Adesha Runtime)**:
|
|
190
|
-
- Reaches **Level 5**.
|
|
191
|
-
- **Slump Sale vs. Itemized Sale (§50B / Act 2025)**:
|
|
192
|
-
- Organic undertaking test (equipment, workforce, operational leases, customer contracts).
|
|
193
|
-
- Prevents accidental collapse into itemized depreciable asset sales (§50).
|
|
194
|
-
- **Section 281 Transfer Voidability**:
|
|
195
|
-
- Intercepts pending tax proceedings and checks Assessing Officer NOC / clearance certificates.
|
|
196
|
-
- **Successor Liability (§313 & CGST §85)**:
|
|
197
|
-
- Joint and several tax liability enforcement on business transfer.
|
|
198
|
-
- **Notification 12/2017 Entry 2**:
|
|
199
|
-
- 0% GST going concern exemption verification.
|
|
200
|
-
- **MAT Credit Protection (§115JAA)**:
|
|
201
|
-
- Flags the non-transferability of seller MAT credit in asset/slump sales.
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## 4. Architectural Summary: Why the Split Exists
|
|
206
|
-
|
|
207
|
-
1. **Lightweight Developer Gateway**: Shipping the starter seed via npm keeps package size small (~2 MB) and enables instantaneous installation for any developer or AI agent.
|
|
208
|
-
2. **Deterministic Security Boundary**: Enterprise financial orchestration, banking CAS leases, and multi-tenant ledger writeback engines remain protected within the MudraForge Adesha Runtime, while declarative statutory ASTs evaluate locally via USVM (`@mudraforge/statutory/usvm`).
|
|
209
|
-
3. **Continuous Expansion via Edge Sync**: New regulatory domains (Ind AS, MCA, SEBI, FEMA) are curated and verified against primary gazette notifications, official CBDT/CBIC executive circulars, and independent programmatic test fixtures, deployed to the edge, and pulled on-demand via `npx @mudraforge/statutory sync`.
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
# MudraForge Adesha: Enterprise Financial Governance Runtime
|
|
2
|
-
*Autonomous Execution Boundaries, Payment Authorization Leases, and Organizational Controls*
|
|
3
|
-
|
|
4
|
-
> **Document Type**: Architecture & Enterprise Governance Specification
|
|
5
|
-
> **Target Audience**: Chief Financial Officers (CFOs), Heads of Finance, Enterprise Security & Risk Teams
|
|
6
|
-
> **Underlying Substrate**: MudraForge Statutory Knowledge Layer (OKF) — [`@mudraforge/statutory`](../README.md)
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## 1. The Autonomous Execution Liability
|
|
11
|
-
|
|
12
|
-
When modern organizations adopt AI agents for finance operations, the primary risk is not that an LLM fails to answer a question. The catastrophic risk is **uncontrolled real-world execution**:
|
|
13
|
-
|
|
14
|
-
- An agent issuing duplicate vendor wires following a network timeout.
|
|
15
|
-
- An agent paying an altered bank account number following an unverified vendor email.
|
|
16
|
-
- An agent writing an unbalanced journal entry into the corporate general ledger.
|
|
17
|
-
|
|
18
|
-
MudraForge Adesha was designed to establish an impenetrable **Execution Boundary** between generative AI assistance and real-world money movement.
|
|
19
|
-
|
|
20
|
-
> **The Core Thesis of Autonomous Finance**:
|
|
21
|
-
> *The dangerous moment in finance AI isn't when the model is wrong. It's when its output becomes a payment instruction.*
|
|
22
|
-
>
|
|
23
|
-
> In marketing, an AI hallucination is a typo. In accounts payable, an unhandled bank timeout can trigger a retry that double-pays a vendor.
|
|
24
|
-
>
|
|
25
|
-
> Hardening the financial runtime for **Adesha, MudraForge's organizational AI**, our principle is simple:
|
|
26
|
-
> **Reasoning can be probabilistic, but financial execution needs deterministic boundaries.**
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## 2. The Three-Tier Architecture & Operational Boundaries
|
|
31
|
-
|
|
32
|
-
To ensure complete clarity for developers, auditors, and enterprise clients, MudraForge establishes three distinct architectural tiers with strict operational boundaries:
|
|
33
|
-
|
|
34
|
-
| Tier | Component | Repository & Distribution | Pricing & License | Operational Status |
|
|
35
|
-
| :--- | :--- | :--- | :--- | :--- |
|
|
36
|
-
| **Tier 1** | **Open-Source Statutory Commons** (`@mudraforge/statutory`) | Public GitHub (`mondeep0123/mudraforge-statutory`) & NPM Registry | **100% Free** (MIT License / CC BY 4.0 Data) | **`CURRENT_PRODUCTION`** (Working offline software) |
|
|
37
|
-
| **Tier 2** | **Hosted Statutory API & Edge Sync** | Cloudflare Global Anycast Edge (`api.mudraforge.in`) | Best-Effort Free Beta (Metered Cloud API) | **`CURRENT_BETA`** (Edge endpoints & caching) |
|
|
38
|
-
| **Tier 3** | **Commercial Adesha Runtime** | Enterprise Private VPC / On-Premise Worker Deployment | Commercial Enterprise SaaS | **`PILOT_STAGE_INTERNAL`** / **`SANDBOX_VALIDATED`** |
|
|
39
|
-
|
|
40
|
-
### Precise Status Classifications across Capabilities
|
|
41
|
-
|
|
42
|
-
To ensure epistemic honesty and prevent conflating tested prototypes with general availability:
|
|
43
|
-
|
|
44
|
-
- **`CURRENT_PRODUCTION` (Working, Publicly Inspectable Software)**:
|
|
45
|
-
- Bundled OKF statutory corpus (46 provisions across 5 legal domains).
|
|
46
|
-
- Universal Statutory Virtual Machine (USVM) declarative AST execution kernel (`@mudraforge/statutory/usvm`).
|
|
47
|
-
- Pure deterministic calculators in `src/calculators.js` (Corporate Tax, LUT Export, TP ALP, Section 79, Ind AS 21/109).
|
|
48
|
-
- Zero-network CLI (`mudraforge-statutory` doctor, crosswalk, diff, verify, browse).
|
|
49
|
-
- Cryptographic SHA-256 Merkle root integrity verifier (`npm run manifest:check`).
|
|
50
|
-
- Native AI Agent Skill (`SKILL.md`) for offline agent runtime inspection.
|
|
51
|
-
|
|
52
|
-
- **`SANDBOX_VALIDATED` (Tested Under Realistic Simulation & Integration Sandboxes)**:
|
|
53
|
-
- Live Zoho Books general ledger balanced double-entry writeback (tested against sandbox and live accounts with readback).
|
|
54
|
-
- RazorpayX corporate banking sandbox payout dispatch (`SETTLEMENT_LIVE_SANDBOX`), HMAC-SHA256 webhook ingestion, and clearinghouse reversal interception.
|
|
55
|
-
- Multi-process lock contention testing verifying single-use lease acquisition across competing OS processes.
|
|
56
|
-
|
|
57
|
-
- **`PILOT_STAGE_INTERNAL` / `PLANNED` (Enterprise Engagements Requiring Partner Onboarding)**:
|
|
58
|
-
- Direct host-to-host bank rail settlement (ICICI / HDFC corporate host-to-host RTGS/NEFT).
|
|
59
|
-
- Multi-region distributed lease coordination across Cloudflare Durable Objects.
|
|
60
|
-
- Hosted Model Context Protocol (MCP) server fleets and live multi-agent tool connectivity (strictly enterprise tier).
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## 3. The Four Pillars of Autonomous Finance Execution
|
|
65
|
-
|
|
66
|
-
1. **Retrieval is Not Verification**: Finding a document or matching keywords is not legal verification. Real accounting requires validating evidence against connected systems of record (including live Zoho Books / SAP ERP readback) and authenticated tenant statutory vaults.
|
|
67
|
-
2. **Safe Tools Do Not Guarantee Safe Workflows**: An AI agent can call individually safe API tools and still coordinate an unauthorized or illegal transaction. Generative models coordinate investigations; deterministic code calculates statutory taxes and enforces ledger invariants (*Rule 11: Agreement with the Engine ≠ Agreement with the Law*).
|
|
68
|
-
3. **Preventing Silent Financial Drift**: Deterministic code computes numbers. RFC 8785 JSON Canonicalization Scheme (JCS) and SHA-256 bind calculation results to a verifiable fingerprint. The hash does not compute—it detects changes between calculation, human authorization, and execution. If the result no longer matches the fingerprint, the workflow halts.
|
|
69
|
-
4. **Testing Payment Boundaries Against Failure**: Single-use CAS leases prevent duplicate payments under concurrent races. Formal TLA+ modeling with the TLC Model Checker explored all 361 reachable states in our configured distributed model with 0 invariant violations and caught 4 injected defects.
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## 4. Seven-Stage End-to-End AP Governance Lifecycle
|
|
74
|
-
|
|
75
|
-
Every financial transaction in MudraForge Adesha passes through seven sequential verification gates before any funds can move or any ledger can mutate:
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
Stage 1: Invoice Ingestion (IRP QR Code / PDF & Vendor Validation)
|
|
79
|
-
↓
|
|
80
|
-
Stage 2: OKF Rule Resolution (Sub-1ms Local Offline Lookup)
|
|
81
|
-
↓
|
|
82
|
-
Stage 3: Deterministic Statutory Computation (Excess Math & GST Unbundling)
|
|
83
|
-
↓
|
|
84
|
-
Stage 4: Cryptographic Payment Authorization Lease (Single-Use Atomic CAS Gate)
|
|
85
|
-
↓
|
|
86
|
-
Stage 5: Human-in-the-Loop Authority Harness (CFO Biometric Passkey / Mobile)
|
|
87
|
-
↓
|
|
88
|
-
Stage 6: Bank Rail Settlement (Host-to-Host Corporate RTGS / Sandbox Rail)
|
|
89
|
-
↓
|
|
90
|
-
Stage 7: General Ledger Balanced Double-Entry Writeback (ERP Equilibrium: ₹0.00 Discrepancy)
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Run this audited 7-stage AP simulation directly in your local terminal:
|
|
94
|
-
```bash
|
|
95
|
-
npm run example:trace
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## 5. Cryptographic Single-Use Payment Authorization Leases
|
|
101
|
-
|
|
102
|
-
In Adesha, banking adapters (such as RazorpayX, Mercury, or host-to-host SFTP connections) operate within a **Zero-Trust Execution Boundary**.
|
|
103
|
-
|
|
104
|
-
An adapter cannot release funds based on an API parameter or natural language prompt. To disburse a wire, an execution path must present an active, unconsumed **Payment Authorization Lease**.
|
|
105
|
-
|
|
106
|
-
### Seven-Fold Parameter Binding
|
|
107
|
-
A payment lease is cryptographically bound to seven immutable parameters:
|
|
108
|
-
1. **Beneficiary Legal Name**: The verified corporate entity name of the vendor.
|
|
109
|
-
2. **Account Number Hash**: SHA-256 digest of the beneficiary bank account.
|
|
110
|
-
3. **IFSC Routing Code**: Verified branch routing code.
|
|
111
|
-
4. **Net Wire Amount**: Exact disbursement amount (paisa-level precision).
|
|
112
|
-
5. **Canonical Result Fingerprint**: SHA-256 hash of the canonical financial record.
|
|
113
|
-
6. **Source Document Hash**: Binary SHA-256 digest of the underlying tax invoice.
|
|
114
|
-
7. **Maker-Checker Clearance**: Digital approval token issued by an authorized human officer.
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
┌────────────────────────────────────────────────────────────────────────┐
|
|
118
|
-
│ SINGLE-USE PAYMENT AUTHORIZATION LEASE │
|
|
119
|
-
├────────────────────────────────────────────────────────────────────────┤
|
|
120
|
-
│ • Status: AUTHORIZED ──► CONSUMED (via Atomic CAS findAndModify) │
|
|
121
|
-
│ • Replay Protection: Second attempt immediately fails with │
|
|
122
|
-
│ LEASE_ALREADY_CONSUMED │
|
|
123
|
-
│ • Time-to-Live (TTL): 5-minute execution window │
|
|
124
|
-
└────────────────────────────────────────────────────────────────────────┘
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## 6. Presentation Consistency Lock & Automated Prose Auditor
|
|
130
|
-
|
|
131
|
-
Generative language models regularly drop trailing zeros or swap figures when drafting summaries for human reviewers.
|
|
132
|
-
|
|
133
|
-
Adesha enforces a **Presentation Consistency Lock**:
|
|
134
|
-
- Before a payment lease can be issued, an automated discrepancy auditor compares the AI-generated prose against the cryptographically sealed canonical result.
|
|
135
|
-
- **Tolerances**:
|
|
136
|
-
- Currency Variance: $> ₹1.00$ triggers an immediate fail-closed halt.
|
|
137
|
-
- Statutory Section Citations: Mismatches (e.g. citing Section 206C(1H) when 194Q applies) are flagged and blocked.
|
|
138
|
-
- Foreign Remittance Confabulation: Domestic vendors cannot have foreign remittance holds hallucinated upon them.
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## 7. OpenSSF Packaging vs. Full Security Assurance
|
|
143
|
-
|
|
144
|
-
In accordance with OpenSSF (Open Source Security Foundation) npm best practices:
|
|
145
|
-
- **Packaging Hygiene**: Zero runtime dependencies, offline-first execution, and `.npmrc` with `ignore-scripts=true` neutralize install-time supply chain attacks.
|
|
146
|
-
- **Cryptographic Non-Tampering**: SHA-256 Merkle root manifests certify byte-level distribution fidelity.
|
|
147
|
-
- **Epistemic Honesty**: These packaging strengths do not replace independent legal counsel, statutory audit certification, or runtime multi-region crash testing. Organizations must evaluate autonomous finance systems against end-to-end integration boundaries.
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## 8. Commercial Engagement & Enterprise Pilots
|
|
152
|
-
|
|
153
|
-
The full Adesha Autonomous Governance Runtime is delivered as a managed enterprise deployment integrated with your corporate ERP (Zoho Books, SAP S/4HANA, NetSuite) and banking partners.
|
|
154
|
-
|
|
155
|
-
To evaluate Adesha in read-only shadow mode against historical accounts payable records, review the [Supervised Shadow Pilot Evaluation Guide](./PILOT_EVALUATION_GUIDE.md).
|
|
156
|
-
|
|
157
|
-
For enterprise architecture discussions, pilot deployments, or API keys:
|
|
158
|
-
- **Email**: [hello@mudraforge.in](mailto:hello@mudraforge.in) or [support@mudraforge.in](mailto:support@mudraforge.in)
|
|
159
|
-
- **Direct Founder Contact**: Mondeep Engti at [mondeepe@gmail.com](mailto:mondeepe@gmail.com)
|
|
160
|
-
- **Website**: [mudraforge.in](https://mudraforge.in)
|