@mudraforge/statutory 2.10.0 → 2.11.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 +60 -0
- package/CONTRIBUTING.md +1 -0
- package/README.md +41 -38
- package/SECURITY.md +2 -2
- package/bin/cli.js +0 -2
- package/docs/ARCHITECTURE.md +8 -8
- package/docs/ARCHITECTURE_DECISIONS.md +3 -3
- package/docs/CATALOG.md +489 -89
- package/docs/CORPUS_QUALITY.md +17 -9
- package/docs/DATA_LICENSING.md +1 -1
- package/docs/DOMAIN_BREADTH_AND_DEPTH_COMPARISON.md +35 -33
- package/docs/OKF_MAINTENANCE_SOP.md +12 -12
- package/docs/PROVENANCE.md +2 -2
- package/docs/VERIFICATION.md +6 -6
- package/okf/corporate_ma_restructuring/tax_clearance_sec281/circulars/cbdt_circular_04_2011_sec281_clearance.md +57 -0
- package/okf/corporate_ma_restructuring/tax_clearance_sec281/forms/form_281_tax_clearance_application.json +42 -0
- package/okf/corporate_ma_restructuring/tax_clearance_sec281/section.json +70 -0
- package/okf/direct_tax/statutory_disallowance_43b/circulars/supreme_court_checkmate_services_2022.md +64 -0
- package/okf/direct_tax/statutory_disallowance_43b/forms/tax_audit_form_3cd_clause_26_schedule.json +71 -0
- package/okf/direct_tax/statutory_disallowance_43b/section.json +77 -0
- package/okf/direct_tax/tds_ecommerce_194o/circulars/cbdt_circular_20_2020_guidelines_194o.md +36 -0
- package/okf/direct_tax/tds_ecommerce_194o/forms/form_26q_ecommerce_schedule.json +75 -0
- package/okf/direct_tax/tds_ecommerce_194o/section.json +65 -0
- package/okf/direct_tax/tds_individual_contract_194m/circulars/finance_act_2024_194m_rate_cut_memo.md +24 -0
- package/okf/direct_tax/tds_individual_contract_194m/forms/form_26qd_contractor_statement.json +64 -0
- package/okf/direct_tax/tds_individual_contract_194m/section.json +58 -0
- package/okf/direct_tax/tds_interest_194a/circulars/cbdt_circular_03_2010_interest_tds.md +28 -0
- package/okf/direct_tax/tds_interest_194a/forms/form_15g_15h_interest_declaration.json +55 -0
- package/okf/direct_tax/tds_interest_194a/forms/form_26q_interest_schedule.json +72 -0
- package/okf/direct_tax/tds_interest_194a/section.json +64 -0
- package/okf/direct_tax/tds_perquisites_194r/forms/form_26q_perquisites_schedule.json +83 -0
- package/okf/direct_tax/tds_perquisites_194r/section.json +1 -1
- package/okf/direct_tax/tds_property_194ia/circulars/cbdt_notification_67_2022_property_tds.md +57 -0
- package/okf/direct_tax/tds_property_194ia/forms/form_26qb_property_tds_challan.json +43 -0
- package/okf/direct_tax/tds_property_194ia/section.json +73 -0
- package/okf/direct_tax/tds_rent_individual_194ib/circulars/finance_act_2024_rent_rate_cut_memo.md +24 -0
- package/okf/direct_tax/tds_rent_individual_194ib/forms/form_26qc_challan_cum_statement.json +74 -0
- package/okf/direct_tax/tds_rent_individual_194ib/section.json +57 -0
- package/okf/indirect_tax_gst/itc_reversal_rule37_37a/circulars/cbic_notification_19_2022_rule37.md +31 -0
- package/okf/indirect_tax_gst/itc_reversal_rule37_37a/forms/gstr_3b_table_4b_reversal.json +81 -0
- package/okf/indirect_tax_gst/itc_reversal_rule37_37a/section.json +64 -0
- package/okf/manifest.json +48 -6
- package/package.json +1 -1
- package/src/calculators.js +5374 -49
- package/src/constants.js +1 -1
- package/src/index.js +198 -1
- package/types/index.d.ts +40 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,66 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [2.11.0] - 2026-10-29
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **Immovable Property Acquisition & Real Estate Withholding (Section 194-IA & Form 26QB)**:
|
|
14
|
+
- *Direct Tax Domain* (`direct_tax/tds_property_194ia`): Section 194-IA TDS on transfer of immovable property other than agricultural land with 1.0% withholding rate on HIGHER of contractual consideration or Stamp Duty Value (SDV) pursuant to Finance Act, 2022.
|
|
15
|
+
- *Incidental Charges Scope*: Full inclusion of club membership fees, car parking allotments, electricity/water facility charges, and maintenance advance payments per Finance Act, 2019 Explanation.
|
|
16
|
+
- *De Minimis Ceiling & Penalty Floor*: Automatic exemption when both consideration and SDV are strictly below ₹50,00,000; mandatory 20% penalty floor under Section 206AA for missing/inoperative PAN.
|
|
17
|
+
- *TAN Exemption & Form 26QB Compliance*: Online PAN-based challan-cum-statement within 30 days of deduction month-end, and Form 16B certificate issuance.
|
|
18
|
+
- *Dual-Act 2025 Transition*: Crosswalked to Section 393(1) Table 4 Item (q) of Income-tax Act, 2025.
|
|
19
|
+
- *Pure Deterministic Calculator*: `evaluateSection194IA(params)` in `src/calculators.js` with programmatic parity on `StatutoryClient.prototype.evaluateSection194IA`.
|
|
20
|
+
- **Corporate M&A & Restructuring Tax Clearance (Section 281 & CBDT Circular 04/2011)**:
|
|
21
|
+
- *Corporate M&A Domain* (`corporate_ma_restructuring/tax_clearance_sec281`): Section 281 transfer voidability risk analysis for asset transfers (land, buildings, plant, machinery, shares, securities) during pending tax proceedings or unserved demand.
|
|
22
|
+
- *Prior Assessing Officer Permission Safe Harbor*: Standard Operating Procedure under CBDT Circular No. 04/2011 for seeking 30-day prior written permission with bank guarantee / alternative security.
|
|
23
|
+
- *Bona Fide Purchaser Safe Harbor*: Adequate consideration and absence of notice evaluation under Section 281(1) Proviso (i) with constructive notice risk detection.
|
|
24
|
+
- *Pure Deterministic Calculator*: `evaluateSection281TaxClearance(params)` in `src/calculators.js` with programmatic parity on `StatutoryClient.prototype.evaluateSection281`.
|
|
25
|
+
- **Statutory Liabilities & Employee Welfare Deductions (Section 43B & Section 36(1)(va) Checkmate Doctrine)**:
|
|
26
|
+
- *Direct Tax Domain* (`direct_tax/statutory_disallowance_43b`): Section 43B actual payment disallowances across clauses (a)-(g) (taxes, employer PF/ESI, bonus, bank interest, leave encashment, railways) with First Proviso relief for payments made on or before Section 139(1) ITR filing due date.
|
|
27
|
+
- *Landmark Supreme Court Checkmate Services Doctrine*: Applied 3-judge bench ruling ((2022) 448 ITR 518 (SC)) read with Explanation 2 to Section 43B and Explanation 5 to Section 36(1)(va). Employee contributions (EPF/ESIC) withheld from payroll are strictly ineligible for Section 43B First Proviso relaxation; late deposits past the respective welfare Act deadline (15th of following month) trigger permanent statutory disallowance under Section 36(1)(va) read with Section 2(24)(x).
|
|
28
|
+
- *Loan Restructuring Invariant*: Explanation 3C & 3D enforcement verifying that conversion of unpaid interest into funded interest term loans or debentures does not constitute actual payment.
|
|
29
|
+
- *Form 3CD Clause 26 & Clause 20(b) Audit Mapping*: Segregation of temporary timing differences (Clause 26 add-back) vs permanent disallowances (Clause 20(b) add-back).
|
|
30
|
+
- *Pure Deterministic Calculator*: `evaluateSection43BStatutoryPayables(params)` in `src/calculators.js` with programmatic parity on `StatutoryClient.prototype.evaluateSection43B`.
|
|
31
|
+
- **Digital Marketplace & E-Commerce Operator Withholding (Section 194O)**:
|
|
32
|
+
- *Direct Tax Domain* (`direct_tax/tds_ecommerce_194o`): Section 194O TDS on payments to e-commerce participants by e-commerce operators, with Finance (No. 2) Act, 2024 rate cut (1.0% pre-October 2024 to 0.1% post-1 October 2024), Individual/HUF de minimis threshold (₹5,00,000 where PAN/Aadhaar furnished), and 5% missing PAN penalty cap under Section 206AA(1) second proviso.
|
|
33
|
+
- *Statutory Precedence Engine*: Absolute statutory override over buyer TDS under Section 194Q and seller TCS under Section 206C(1H).
|
|
34
|
+
- *Pure Deterministic Calculator*: `evaluateSection194O(params)` in `src/calculators.js` with earlier-event temporal crystallization, gross amount inclusion of direct buyer payments, and programmatic parity on `StatutoryClient.prototype.evaluateSection194O`.
|
|
35
|
+
- **100% Complete Accounts Payable (AP) Statutory Cycle (35 Total Sections across 5 Domains)**:
|
|
36
|
+
- *Direct Tax Domain* (`direct_tax/tds_interest_194a`): Section 194A TDS on interest other than interest on securities (commercial borrowings, vendor delayed payments, inter-corporate deposits), ₹5,000 commercial threshold vs ₹40,000/₹50,000 banking threshold, Form 15G/15H NIL deduction, 20% missing PAN floor (Section 206AA / 397), and dual-act transition to Income-tax Act, 2025 Section 393(1) Table 4 Item (i).
|
|
37
|
+
- *Critical MSME Section 16/23 Interaction*: Integrated MSME penal interest withholding under Section 194A alongside mandatory expenditure disallowance and tax add-back under Section 23 of the MSMED Act, 2006.
|
|
38
|
+
- *Indirect Tax GST Domain* (`indirect_tax_gst/itc_reversal_rule37_37a`): Section 16(2) second proviso read with substituted Rule 37 (Notification No. 19/2022-CT) for 180-day vendor non-payment proportional ITC reversal in GSTR-3B Table 4(B)(2) with 18% annual interest under Section 50(1), explicit RCM & Schedule I exemptions, and Section 16(4)-unconstrained re-availment on payment.
|
|
39
|
+
- *Rule 37A Supplier Non-Filing Reversal*: Notification No. 26/2022-CT November 30 post-FY cutoff verification for supplier GSTR-3B non-filing, 18% delayed interest, and interest-free re-availment upon filing.
|
|
40
|
+
- **Business Perquisites & Benefits (Section 194R & CBDT Circulars 12/2022 & 18/2022)**:
|
|
41
|
+
- *Direct Tax Domain* (`direct_tax/tds_perquisites_194r`): Section 194R withholding on business perquisites and dealer incentives exceeding ₹20,000 aggregate in a financial year at 10% standard rate.
|
|
42
|
+
- *Exclusion of Commercial Discounts*: Explicit exclusions for cash discounts, commercial rebates, and bona fide dealer training conferences per CBDT Circular No. 12/2022.
|
|
43
|
+
- *In-Kind Section 194R(1) Proviso Verification*: Payer must verify advance tax (ITNS 281 challan) prior to releasing benefits in kind; unverified release flags an immediate 30% expenditure disallowance under Section 40(a)(ia).
|
|
44
|
+
- *Pure Deterministic Calculator*: `evaluateSection194R(params)` in `src/calculators.js`.
|
|
45
|
+
- **Individual/HUF High-Value Rent (Section 194-IB & Form 26QC)**:
|
|
46
|
+
- *Direct Tax Domain* (`direct_tax/tds_rent_individual_194ib`): Monthly rent exceeding ₹50,000 paid by non-audit individuals/HUFs.
|
|
47
|
+
- *Finance (No. 2) Act, 2024 Rate Cut*: Rationalized from 5.0% to 2.0% effective 1 October 2024.
|
|
48
|
+
- *Section 194-IB(4) Statutory Ceiling*: Section 206AA 20% penalty deduction is strictly capped at the rent payable for the last month of the tenancy.
|
|
49
|
+
- *Pure Deterministic Calculator*: `evaluateSection194IB(params)` in `src/calculators.js`.
|
|
50
|
+
- **Individual/HUF High-Value Contracts & Professional Fees (Section 194M & Form 26QD)**:
|
|
51
|
+
- *Direct Tax Domain* (`direct_tax/tds_individual_contract_194m`): Payments exceeding ₹50 Lakhs aggregate in a financial year.
|
|
52
|
+
- *Finance (No. 2) Act, 2024 Rate Cut*: Rationalized from 5.0% to 2.0% effective 1 October 2024.
|
|
53
|
+
- *Pure Deterministic Calculator*: `evaluateSection194M(params)` in `src/calculators.js`.
|
|
54
|
+
- **Commercial Tier Boundary Specification**:
|
|
55
|
+
- Formal declaration of the completed Public Commons baseline tier in `src/calculators.js`. Hosted enterprise calculation endpoints (Form 3CD full audit schedules, dynamic Section 234B/C interest forecasting, Pillar Two BEPS models) designated as Enterprise API services (`hello@mudraforge.in`).
|
|
56
|
+
- **Pure Zero-Dependency Deterministic Calculators (`src/calculators.js`)**:
|
|
57
|
+
- `evaluateSection194A`: Authoritative withholding calculator with earlier of credit or payment temporal resolution, payee threshold categorization, and MSME Section 23 add-back flags.
|
|
58
|
+
- `calculateItcReversalRule37`: Authoritative 180-day aging, proportional unpaid ITC computation, Section 50(1) interest calculation, and GSTR-3B Table 4(B)(2) mapping.
|
|
59
|
+
- `calculateRule37ASupplierNonFilingReversal`: November 30 post-FY supplier filing evaluation and delayed interest computation.
|
|
60
|
+
- Exposed helper methods on `StatutoryClient` prototype (`client.evaluateSection194A`, `client.calculateItcReversalRule37`, `client.calculateRule37ASupplierNonFilingReversal`, `client.evaluateSection194O`, `client.evaluateSection43B`, `client.evaluateSection281`, `client.evaluateSection194IA`).
|
|
61
|
+
- **TypeScript Declarations (`types/index.d.ts`)**:
|
|
62
|
+
- Full typing support for new calculators and `StatutoryClient` methods.
|
|
63
|
+
- **Authoritative Cryptographic Substrate v2.11.0**:
|
|
64
|
+
- Computed and pinned release Merkle root hash: `sha256-bd351719a8235c44f2bac87cc347423baa8ac3ecb74c0ee63d1fffa9f33dbebe` across 105 files.
|
|
65
|
+
- Validated 135 primary statutory citations with 100% deep semantic integrity.
|
|
66
|
+
- Expanded test suite from 88 to 100 test suites passing (100% reproducible precision).
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
10
70
|
## [2.10.0] - 2026-10-27
|
|
11
71
|
|
|
12
72
|
### Added
|
package/CONTRIBUTING.md
CHANGED
|
@@ -123,6 +123,7 @@ Place your files in the appropriate domain folder under `./okf/`:
|
|
|
123
123
|
- `indirect_tax_gst/`
|
|
124
124
|
- `msme_commercial/`
|
|
125
125
|
- `international_tax/`
|
|
126
|
+
- `corporate_ma_restructuring/`
|
|
126
127
|
|
|
127
128
|
### Step 4: Run the Schema Linter & Validator
|
|
128
129
|
We provide an automated validator that verifies all fields, dates, URLs, and frontmatter:
|
package/README.md
CHANGED
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
} from '@mudraforge/statutory';
|
|
29
29
|
|
|
30
30
|
// 1. Instant offline statutory lookup (sub-1ms, zero network calls, zero API keys)
|
|
31
|
+
// Note: lookupStatute() is async and returns the full temporal envelope: { status, temporalStatus, statute, source }
|
|
31
32
|
const section = await lookupStatute('194Q');
|
|
32
33
|
console.log(section.statute.title);
|
|
33
34
|
// => "Deduction of tax at source on payment of a certain sum for purchase of goods"
|
|
@@ -81,25 +82,34 @@ In enterprise finance, no CFO, audit committee, or enterprise risk officer will
|
|
|
81
82
|
|
|
82
83
|
## Table of Contents
|
|
83
84
|
|
|
84
|
-
- [
|
|
85
|
-
- [
|
|
86
|
-
- [1. Installation via npm](#1-installation-via-npm)
|
|
87
|
-
- [2. Initialize AI Agent Skill](#2-initialize-ai-agent-skill)
|
|
88
|
-
- [3. Direct Programmatic Traversal](#3-direct-programmatic-traversal-zero-dependencies-offline-first)
|
|
85
|
+
- [30-Second Quick Start (100% Offline, Zero Dependencies)](#30-second-quick-start-100-offline-zero-dependencies)
|
|
86
|
+
- [Overview: Why We Open-Source Adesha's Statutory Substrate](#overview-why-we-open-source-adeshas-statutory-substrate)
|
|
89
87
|
- [Supported Application Patterns](#supported-application-patterns)
|
|
90
88
|
- [1. AI Agents & LLM Tooling](#1-ai-agents--llm-tooling)
|
|
91
89
|
- [2. Finance Software & Accounts-Payable Workflows](#2-finance-software--accounts-payable-workflows)
|
|
92
90
|
- [3. Developer Tooling & Audit Verification](#3-developer-tooling--audit-verification)
|
|
93
|
-
- [
|
|
94
|
-
- [
|
|
95
|
-
- [
|
|
96
|
-
- [
|
|
97
|
-
- [
|
|
98
|
-
- [
|
|
99
|
-
- [Edge API Endpoints & Rate Limits](#enterprise-edge-api-endpoints--rate-limits)
|
|
100
|
-
- [Error Semantics & Response Codes](#error-semantics--response-codes)
|
|
91
|
+
- [Separation of Statutory Knowledge from Autonomous Execution](#separation-of-statutory-knowledge-from-autonomous-execution)
|
|
92
|
+
- [Statutory Authority & Epistemic Boundary](#statutory-authority--epistemic-boundary)
|
|
93
|
+
- [Project Identity, Audience & Non-Goals](#project-identity-audience--non-goals)
|
|
94
|
+
- [Published Inventory Metrics](#published-inventory-metrics)
|
|
95
|
+
- [Rationale: Authoritative Knowledge Substrate vs. Probabilistic Web RAG](#rationale-authoritative-knowledge-substrate-vs-probabilistic-web-rag)
|
|
96
|
+
- [Architectural Principle: Separation of Law & Deterministic Computation](#architectural-principle-separation-of-law--deterministic-computation)
|
|
101
97
|
- [System Origin & Validation Baseline](#system-origin--validation-baseline)
|
|
102
|
-
- [
|
|
98
|
+
- [Legal Domains Currently Covered](#legal-domains-currently-covered)
|
|
99
|
+
- [Product Capability Status & Operational Boundaries](#product-capability-status--operational-boundaries)
|
|
100
|
+
- [Architectural Boundaries: Open Substrate vs. Hosted Edge vs. Adesha Platform](#architectural-boundaries-open-substrate-vs-hosted-edge-vs-adesha-platform)
|
|
101
|
+
- [Free OKF Sync and Maintenance Policy](#free-okf-sync-and-maintenance-policy)
|
|
102
|
+
- [Structured OKF Domain Hierarchy (Zero-Token Discovery)](#structured-okf-domain-hierarchy-zero-token-discovery)
|
|
103
|
+
- [Canonical Edge Synchronization (Full Statutory Universe)](#canonical-edge-synchronization-full-statutory-universe)
|
|
104
|
+
- [Agent Skills, CLI Tooling & CI/CD Verification](#agent-skills-cli-tooling--cicd-verification)
|
|
105
|
+
- [1. Initialize AI Agent Skill](#1-initialize-ai-agent-skill)
|
|
106
|
+
- [2. Direct Synchronous Local Read (lookupLocalStatute)](#2-direct-synchronous-local-read-lookuplocalstatute)
|
|
107
|
+
- [3. CLI Verification, Auditing & Pipeline Integration](#3-cli-verification-auditing--pipeline-integration)
|
|
108
|
+
- [Commercial & Enterprise Platform Ecosystem](#commercial--enterprise-platform-ecosystem)
|
|
109
|
+
- [Developer Tooling & Verification Gates](#developer-tooling--verification-gates)
|
|
110
|
+
- [A Note from the Maintainer](#a-note-from-the-maintainer)
|
|
111
|
+
- [Institutional Documentation & Architecture](#institutional-documentation--architecture)
|
|
112
|
+
- [License](#license)
|
|
103
113
|
|
|
104
114
|
---
|
|
105
115
|
|
|
@@ -169,8 +179,8 @@ The repository currently publishes a verified inventory across five regulatory d
|
|
|
169
179
|
- **29 Indexed Core Provisions**: Section 194Q, Section 194J, Section 194C, Section 194I, Section 194H, Section 206C(1H) sunset, Section 393 (Act 2025 crosswalk), Section 115BAA & 115JB (Corporate Tax MAT vs Concessional Regime), CGST Section 16(2) (ITC conditions & 180-day rule), CGST Section 17(5) (blocked credits), IGST Section 16 & Section 2(6) (Zero-Rated Export under LUT), MSMED Act Sections 15 & 16, US IRC §§ 901 & 904, Section 92C & Rule 10CA (Transfer Pricing ALP), Section 79 & Section 32(2) (Loss Carry-Forward & Virmani Doctrine), Section 50B (Slump Sale & Successor Liability), and Ind AS 21 & Ind AS 109 (Foreign Exchange Revaluation).
|
|
170
180
|
- **30 Official Executive Circulars & Memoranda**: CBDT Circular 13/2021, CBDT Circular 23/2017, CBDT Circular 03/2020, CBDT Circular 29/2019, CBDT Circular 09/2020, CBDT Notification 86/2015, Finance Act 2024 Rate Cut Memo, Finance Act 2025 Sunset Memorandum, CBIC Circular 170/02/2022-GST, CBIC Circular 172/04/2022-GST, CBIC Circular 161/17/2021-GST, Ministry of MSME OM 1/4(1)/2021-P&G/Policy, MCA Ind AS 21 Rules, CBDT Notification 68/2021 (Rule 11UAE FMV), CBIC Notification 12/2017 Entry 2.
|
|
171
181
|
- **27 Compliance Form Schemas & Verification Checklists**: Form 26Q quarterly TDS return, Form 16A certificate, Form 10-IC concessional tax election, Form GST RFD-11 LUT declaration, Form 3CEB transfer pricing report, Section 79 continuity schedule, Ind AS 109 hedge reserve schedule, Transporter declaration, GSTR-3B Table 4 reversal/reclaim reconciliation, GSTR-2B Table 4(B) ineligible ITC reconciliation, UDYAM portal registration verification, Companies Act Schedule III corporate balance sheet notes, Form 67 (Rule 128), US IRS Schedule K-3, Form 3CEA CA slump sale report schema, Section 281 & Section 313 M&A tax due diligence checklist, and Vendor PAN / Section 206AB declarations.
|
|
172
|
-
- **7 Zero-Dependency Deterministic Calculators**: Pure, mathematical computation engines for Corporate Tax MAT vs 115BAA, Place of Supply & LUT Export, Transfer Pricing ALP & Rule 10CA
|
|
173
|
-
- **100% Corpus Verification Suite**: Validated with
|
|
182
|
+
- **7 Zero-Dependency Deterministic Calculators**: Pure, mathematical computation engines for: (1) Corporate Tax MAT vs 115BAA (`calculateCorporateTaxMatVsConcessional`), (2) Place of Supply & LUT Export (`evaluatePlaceOfSupplyAndLut`), (3) Transfer Pricing ALP & Rule 10CA (`calculateTransferPricingArmLength`), (4) Section 79 Loss Carry-Forward & Virmani Doctrine (`evaluateSection79LossContinuity`), (5) Ind AS 21 & 109 Forex Revaluation (`calculateForexRevaluationIndAs`), (6) Section 16 MSMED Compound Interest (`calculateMsmeCompoundInterest`), and (7) Section 288B Tax Rounding (`roundTaxSection288B`) — accompanied by 27 core TDS/TCS statutory withholding calculators in `@mudraforge/statutory/calculators`.
|
|
183
|
+
- **100% Corpus Verification Suite**: Validated with 88/88 test suites passing, 108 primary citations with deep semantic integrity, and cryptographically pinned Merkle root.
|
|
174
184
|
|
|
175
185
|
---
|
|
176
186
|
|
|
@@ -211,7 +221,7 @@ It is currently released as a **Public Beta**. The bundled schemas and temporal
|
|
|
211
221
|
## Legal Domains Currently Covered
|
|
212
222
|
|
|
213
223
|
> **Full 11-Domain Roadmap & Lifecycle Matrix**:
|
|
214
|
-
> For the complete architectural matrix comparing the
|
|
224
|
+
> For the complete architectural matrix comparing the 5 starter domains against the full 11-domain sovereign roadmap (including Indian Accounting Standards [Ind AS], MCA Corporate Governance, and SEBI LODR), see [`docs/DOMAIN_BREADTH_AND_DEPTH_COMPARISON.md`](./docs/DOMAIN_BREADTH_AND_DEPTH_COMPARISON.md).
|
|
215
225
|
|
|
216
226
|
The OKF substrate currently indexes and enforces ground truth across five major regulatory domains:
|
|
217
227
|
|
|
@@ -253,14 +263,14 @@ To ensure absolute clarity for developers, finance leaders, prospective pilot cu
|
|
|
253
263
|
|
|
254
264
|
| Subsystem / Capability | Operational Classification | Availability / Access | Current Verification Evidence |
|
|
255
265
|
| :--- | :--- | :--- | :--- |
|
|
256
|
-
| **Bundled OKF Statutory Corpus (29 Provisions across 5 Domains)** | **Public Package** | Shipped in repository & release candidates (`okf/`) |
|
|
266
|
+
| **Bundled OKF Statutory Corpus (29 Provisions across 5 Domains)** | **Public Package** | Shipped in repository & release candidates (`okf/`) | 88/88 test suites passing; deterministic SHA-256 Merkle root |
|
|
257
267
|
| **Zero-Network CLI (`mudraforge-statutory`)** | **Public Package** | Immediate via `npx @mudraforge/statutory` | `bin/cli.js` verified across Windows and Linux |
|
|
258
268
|
| **Vendor-Neutral Conformance Suite** | **Public Package** | Immediate via `conformance/` (`npm run conformance`) | 12/12 fixture tests passing |
|
|
259
269
|
| **Local Query SDK (`src/index.js`)** | **Public Package** | Immediate via `import { lookupStatute }` | Zero runtime dependencies; offline temporal state evaluation |
|
|
260
270
|
| **Synthetic AP Execution Trace (`examples/`)** | **Public Package (Modeled Demo)** | Immediate via `npm run example:trace` | Synthetic invoice trace demonstrating 7-stage lifecycle with modeled fixtures |
|
|
261
271
|
| **Cloudflare Anycast Edge Sync** | **Public Edge Service** | Free Beta via `api.mudraforge.in` | Global edge sync (`npx @mudraforge/statutory sync`) with ETag 304 caching |
|
|
262
272
|
| **Interactive API Documentation** | **Public Edge Service** | Free Beta via `/api/v1/statutory/docs` | OpenAPI 3.1 schema and interactive documentation rendered on Anycast edge |
|
|
263
|
-
| **Deterministic Calculators (7 Pure Functions)** | **Public Package** | Immediate via `@mudraforge/statutory/calculators` | Corporate tax MAT vs
|
|
273
|
+
| **Deterministic Calculators (7 Pure Functions)** | **Public Package** | Immediate via `@mudraforge/statutory/calculators` | Corporate tax MAT vs 115BAA, GST POS/LUT, TP ALP, Section 79, Ind AS 109, Section 16 MSMED, Section 288B (plus 27 TDS/TCS calculators) |
|
|
264
274
|
| **Hosted AP Engine & Cumulative Spend Tracking** | **Enterprise Edge / Internal** | Metered Enterprise API (Selective) | Hosted Section 194Q cumulative spend & Section 16 MSMED interest engine |
|
|
265
275
|
| **Dual-Custody Mobile Approval Harness** | **Enterprise Internal / Pilot** | Enterprise Pilot Proposal | Mobile passkey approval prototype & TLA+ state machine (`specs/`) |
|
|
266
276
|
| **ERP Two-Way Connectors (SAP/Tally/Zoho)** | **Enterprise Internal / Pilot** | Custom Enterprise Pilot Integration | Shadow-mode test connectors; no turnkey plug-ins shipped |
|
|
@@ -281,7 +291,7 @@ To ensure clarity for developers, CAs, and prospective enterprise clients, the o
|
|
|
281
291
|
| **Statutory Knowledge** | Bundled Starter Seed (29 Verified Sections across 5 Domains) | 29 Active Provisions (Roadmap Catalog in expansion) | Full Sovereign Catalog + Custom Private Enterprise Contracts |
|
|
282
292
|
| **Lookup Engine** | Exact code, alias & folder path resolution | System-1 Semantic Intent & Rule Discovery | Multi-tenant RAG & Context Assembler |
|
|
283
293
|
| **Temporal Status** | Offline deterministic evaluation (`computeTemporalStatus`) | Live temporal state machine resolution | In-flight temporal locks across transaction lifecycle |
|
|
284
|
-
| **Deterministic Calculators**| **Included** (7 Zero-dependency pure mathematical calculators exported in `src/calculators.js`) | Hosted calculation endpoint (`POST /calculate`) | Full arithmetic engine with ₹50L excess & 3x RBI interest |
|
|
294
|
+
| **Deterministic Calculators**| **Included** (7 Zero-dependency pure mathematical calculators exported in `src/calculators.js` via `@mudraforge/statutory/calculators`) | Hosted calculation endpoint (`POST /calculate`) | Full arithmetic engine with ₹50L excess & 3x RBI interest |
|
|
285
295
|
| **Payment Authorization** | *Not included* | *Not included* | **Single-Use Cryptographic Payment Leases (TLA+ verified)** |
|
|
286
296
|
| **Banking Execution** | *Not included* | *Not included* | **Host-to-Host Bank Rails (RazorpayX / ICICI / HDFC)** |
|
|
287
297
|
| **ERP Writebacks** | *Not included* | *Not included* | **Balanced double-entry journal writebacks (SAP / Zoho)** |
|
|
@@ -371,7 +381,7 @@ Because the folder hierarchy separates legal domains and provisions cleanly, an
|
|
|
371
381
|
|
|
372
382
|
## Canonical Edge Synchronization (Full Statutory Universe)
|
|
373
383
|
|
|
374
|
-
The package bundles an initial curated baseline snapshot across all
|
|
384
|
+
The package bundles an initial curated baseline snapshot across all five domains. **To pull the complete, continually expanding statutory catalog from the Cloudflare Anycast edge API into your local workspace:**
|
|
375
385
|
|
|
376
386
|
```bash
|
|
377
387
|
# Step 1: Check if newer statutes, circulars, or gazette amendments exist on the edge
|
|
@@ -386,35 +396,28 @@ npx @mudraforge/statutory browse
|
|
|
386
396
|
|
|
387
397
|
---
|
|
388
398
|
|
|
389
|
-
##
|
|
399
|
+
## Agent Skills, CLI Tooling & CI/CD Verification
|
|
390
400
|
|
|
391
|
-
### 1.
|
|
392
|
-
|
|
393
|
-
npm install @mudraforge/statutory
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
### 2. Initialize AI Agent Skill
|
|
397
|
-
Installs `SKILL.md` into your workspace's `.agents/skills/` directory:
|
|
401
|
+
### 1. Initialize AI Agent Skill
|
|
402
|
+
Installs `SKILL.md` into your workspace's `.agents/skills/` directory for Claude Code, Cursor, Antigravity, or Copilot:
|
|
398
403
|
```bash
|
|
399
404
|
npx @mudraforge/statutory init-skill
|
|
400
405
|
```
|
|
401
406
|
|
|
402
|
-
###
|
|
407
|
+
### 2. Direct Synchronous Local Read (lookupLocalStatute)
|
|
403
408
|
```javascript
|
|
404
|
-
import { lookupLocalStatute
|
|
409
|
+
import { lookupLocalStatute } from '@mudraforge/statutory';
|
|
405
410
|
|
|
406
|
-
//
|
|
411
|
+
// Direct synchronous read from local disk (zero network calls, zero async overhead)
|
|
412
|
+
// Note: lookupLocalStatute() returns the unwrapped statute object directly.
|
|
413
|
+
// (Use async lookupStatute() when you need the complete temporal envelope: { status, temporalStatus, statute, source })
|
|
407
414
|
const statute = lookupLocalStatute('194Q');
|
|
408
415
|
console.log(statute.title);
|
|
409
416
|
console.log(statute.keyStatutoryThresholds.taxableBaseScope);
|
|
410
417
|
// => "Tax is deductible strictly on the excess over ₹50 Lakhs, NOT on the aggregate gross turnover."
|
|
411
|
-
|
|
412
|
-
// 2. Check temporal status (detecting legislative sunsets)
|
|
413
|
-
const isActive2024 = await isStatuteActive('206C(1H)', '2024-05-01'); // true
|
|
414
|
-
const isActive2025 = await isStatuteActive('206C(1H)', '2025-06-01'); // false (omitted by Finance Act, 2025)
|
|
415
418
|
```
|
|
416
419
|
|
|
417
|
-
###
|
|
420
|
+
### 3. CLI Verification, Auditing & Pipeline Integration
|
|
418
421
|
|
|
419
422
|
The CLI provides cryptographic provenance checking, offline integrity verification, and machine-readable JSON output for CI/CD audit pipelines:
|
|
420
423
|
|
|
@@ -551,7 +554,7 @@ If you are working on autonomous financial systems or want to discuss the roadma
|
|
|
551
554
|
All deep-dive architectural specifications, governance boundaries, quality reports, and catalogs are organized in the [`docs/`](./docs/) directory:
|
|
552
555
|
|
|
553
556
|
- **[Statutory Knowledge Catalog](./docs/CATALOG.md)**: Full table of all indexed provisions, key thresholds, and return schemas.
|
|
554
|
-
- **[Domain Breadth & Depth Comparison](./docs/DOMAIN_BREADTH_AND_DEPTH_COMPARISON.md)**:
|
|
557
|
+
- **[Domain Breadth & Depth Comparison](./docs/DOMAIN_BREADTH_AND_DEPTH_COMPARISON.md)**: 5-domain starter commons vs. 11-domain edge roadmap.
|
|
555
558
|
- **[Architecture Decisions (ADRs)](./docs/ARCHITECTURE_DECISIONS.md)**: Formal architecture decision records (ADR-0001 through ADR-0006).
|
|
556
559
|
- **[Architecture Specification](./docs/ARCHITECTURE.md)**: Master specification of the Adesha Sovereign Runtime & Statutory Engine.
|
|
557
560
|
- **[Corpus Quality Card](./docs/CORPUS_QUALITY.md)**: Machine-verified citation health, temporal bounds, and dual-act coverage.
|
package/SECURITY.md
CHANGED
|
@@ -12,8 +12,8 @@ Only the current major release series receives active updates and statutory amen
|
|
|
12
12
|
|
|
13
13
|
| Version | Supported | Statutory Epistemic Baseline |
|
|
14
14
|
|---|---|---|
|
|
15
|
-
| `2.
|
|
16
|
-
| `< 2.
|
|
15
|
+
| `2.10.x` | Yes | Finance Act, 2025 & CBDT/CBIC Circulars up to October 2026 |
|
|
16
|
+
| `< 2.10.0` | No | Prior releases (upgrade via `npm install @mudraforge/statutory@latest`) |
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
package/bin/cli.js
CHANGED
|
@@ -932,8 +932,6 @@ Options:
|
|
|
932
932
|
--no-update-check Bypass automated background npm package update checks
|
|
933
933
|
--json, -j Emit clean, machine-parseable JSON to stdout (suppresses banners)
|
|
934
934
|
--offline, -o Bypass outbound network checks (air-gapped / offline environment mode)
|
|
935
|
-
--json, -j Emit clean, machine-parseable JSON to stdout (suppresses banners)
|
|
936
|
-
--offline, -o Bypass outbound network checks (air-gapped / offline environment mode)
|
|
937
935
|
|
|
938
936
|
Exit Code Conventions:
|
|
939
937
|
0 Success / Verification passed
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# MudraForge Statutory Architecture
|
|
2
2
|
## Grounding Financial AI in Deterministic Law & Open Knowledge
|
|
3
3
|
|
|
4
|
-
> **MudraForge Statutory Bundle**: `v2.
|
|
4
|
+
> **MudraForge Statutory Bundle**: `v2.10.0`
|
|
5
5
|
> **Knowledge Specification**: Google Open Knowledge Format (OKF) specification (upstream v0.2)
|
|
6
6
|
> **License**: MIT (Public Knowledge Commons)
|
|
7
7
|
> **Status**: Public Beta
|
|
@@ -592,7 +592,7 @@ Data traveling between tiers is encapsulated within a deterministic verification
|
|
|
592
592
|
|
|
593
593
|
```json
|
|
594
594
|
{
|
|
595
|
-
"protocolVersion": "okf/2.
|
|
595
|
+
"protocolVersion": "okf/2.10.0",
|
|
596
596
|
"domain": "direct_tax",
|
|
597
597
|
"sectionCode": "194Q",
|
|
598
598
|
"manifestDigest": "sha256-4bbe36c3db841b833dd2bebbd6c1c5ed735498e7b20d1221c323ceb211529fe0",
|
|
@@ -614,9 +614,9 @@ Data traveling between tiers is encapsulated within a deterministic verification
|
|
|
614
614
|
### 9.3 Edge Consistency & Eventual Consistency Resolution (Cloudflare KV)
|
|
615
615
|
|
|
616
616
|
Cloudflare Workers KV provides global low-latency reads via eventual consistency across edge nodes. To prevent release skew during regulatory updates:
|
|
617
|
-
1. *Immutable Version Tagging*: All statutory releases are written under unique semver namespaces (`statutory:releases:v2.
|
|
617
|
+
1. *Immutable Version Tagging*: All statutory releases are written under unique semver namespaces (`statutory:releases:v2.10.0:...`).
|
|
618
618
|
2. *Atomic Manifest Flip*: The global pointer `statutory:active_release` is updated only after all 86 files across all domains are fully confirmed across edge replicas.
|
|
619
|
-
3. *Cache-Control Invalidation*: Manifest responses carry strict validation headers (`ETag: "v2.
|
|
619
|
+
3. *Cache-Control Invalidation*: Manifest responses carry strict validation headers (`ETag: "v2.10.0"`, `stale-while-revalidate=600`).
|
|
620
620
|
4. *Local Fallback*: If Tier 2 returns HTTP 5xx or fails DNS resolution, Tier 1 and Tier 3 automatically fall back to the bundled local filesystem snapshot without failing the active business transaction.
|
|
621
621
|
|
|
622
622
|
### 9.4 Architectural Boundaries: The Autonomous Coprocessor vs. Stateless Subsystems
|
|
@@ -733,10 +733,10 @@ To prevent version skew across regions, the edge runtime employs an **Immutable
|
|
|
733
733
|
1. **Immutable Artifact Keys**: Every section schema, circular, and form is stored under an immutable, version-tagged key:
|
|
734
734
|
```
|
|
735
735
|
statutory:releases:<semver>:<domain>:<section_code>
|
|
736
|
-
# Example: statutory:releases:v2.
|
|
736
|
+
# Example: statutory:releases:v2.10.0:direct_tax:194Q
|
|
737
737
|
```
|
|
738
738
|
Once written to KV, the bytes for a specific semver key are permanently immutable.
|
|
739
|
-
2. **Atomic Manifest Pointers**: Releases are indexed by a versioned root manifest (`statutory:manifests:v2.
|
|
739
|
+
2. **Atomic Manifest Pointers**: Releases are indexed by a versioned root manifest (`statutory:manifests:v2.10.0`). The active pointer is switched only after all constituent keys are fully populated.
|
|
740
740
|
3. **Cache Invalidation & ETag Gates**: The manifest endpoint serves HTTP `ETag` validators with short edge TTLs (`Cache-Control: public, max-age=60, s-maxage=300, stale-while-revalidate=600`). This ensures edge caches converge globally within minutes while allowing clients to detect release changes via deterministic SHA-256 root hash comparisons.
|
|
741
741
|
- **Commercial Boundary**: Only the automated, continuously maintained edge update stream, neural discovery search, and deep deterministic calculator engines require an Enterprise API subscription post-beta.
|
|
742
742
|
|
|
@@ -744,7 +744,7 @@ To prevent version skew across regions, the edge runtime employs an **Immutable
|
|
|
744
744
|
|
|
745
745
|
## 12. Related Documents
|
|
746
746
|
|
|
747
|
-
- [`DOMAIN_BREADTH_AND_DEPTH_COMPARISON.md`](./DOMAIN_BREADTH_AND_DEPTH_COMPARISON.md) — Authoritative matrix comparing the
|
|
747
|
+
- [`DOMAIN_BREADTH_AND_DEPTH_COMPARISON.md`](./DOMAIN_BREADTH_AND_DEPTH_COMPARISON.md) — Authoritative matrix comparing the 5 starter domains against the full 11-domain sovereign roadmap.
|
|
748
748
|
- [`VERIFICATION.md`](./VERIFICATION.md) — Formal verification report, TLA+ state machine model, mutation tests, and documented limitations.
|
|
749
749
|
- [`ENTERPRISE_GOVERNANCE.md`](./ENTERPRISE_GOVERNANCE.md) — The Adesha governance architecture: single-use payment leases, Two-Generals banking recovery, and ERP writebacks.
|
|
750
|
-
- [`README.md`](
|
|
750
|
+
- [`README.md`](../README.md) — Quickstart, CLI commands, and installation guide.
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
Developers, AI agents, and enterprise ERP integrations need access to Indian statutory provisions (such as Section 194Q, 194J, 206C(1H), MSMED 15/16, and GST 17(5)). Relying solely on a hosted remote API introduces network latency, availability risks, single-point-of-failure vulnerabilities, and developer friction (requiring API keys for basic lookups).
|
|
13
13
|
|
|
14
14
|
### Decision
|
|
15
|
-
We bundle an offline
|
|
15
|
+
We bundle an offline package of 29 canonical provisions across 5 domains directly within the NPM package filesystem (`okf/`), validated by an immutable SHA-256 Merkle root digest.
|
|
16
16
|
- Lookups in default or `mode: 'local'` execute entirely against local disk with zero network requests.
|
|
17
17
|
- Hosted Cloudflare Anycast edge synchronization is provided on a best-effort basis during beta to discover real-time gazette updates and expanded unbundled provisions.
|
|
18
18
|
- If edge sync is unreachable, callers automatically degrade to the verified local snapshot with an explicit `advisory` signal.
|
|
@@ -69,7 +69,7 @@ We establish three independent, non-interchangeable versioning dimensions:
|
|
|
69
69
|
| :--- | :--- | :--- | :--- |
|
|
70
70
|
| **`okfVersion`** | Knowledge Schema Structure | Incremented only when the JSON schema or metadata fields change (e.g., adding a required field). | `0.2.0` |
|
|
71
71
|
| **`corpusRelease`** | Legal Corpus Snapshot | Incremented when statutory provisions, rates, or circulars are updated or added. | `2026.04.1` |
|
|
72
|
-
| **`version`** (SemVer) | NPM Client SDK & CLI | Standard Semantic Versioning for the JavaScript library, CLI commands, and test runners. | `2.
|
|
72
|
+
| **`version`** (SemVer) | NPM Client SDK & CLI | Standard Semantic Versioning for the JavaScript library, CLI commands, and test runners. | `2.10.0` |
|
|
73
73
|
|
|
74
74
|
---
|
|
75
75
|
|
|
@@ -82,7 +82,7 @@ To maintain institutional credibility, public documentation must never blur the
|
|
|
82
82
|
|
|
83
83
|
| Subsystem / Capability | Architectural Layer | Operational Status | Availability / Access | Verification Evidence |
|
|
84
84
|
| :--- | :--- | :--- | :--- | :--- |
|
|
85
|
-
| **Bundled OKF Statutory Corpus (29 Provisions across 5 Domains)** | Layer 1: Public Package | `PUBLIC_BUNDLED` | Immediate (Local repo & release candidate) |
|
|
85
|
+
| **Bundled OKF Statutory Corpus (29 Provisions across 5 Domains)** | Layer 1: Public Package | `PUBLIC_BUNDLED` | Immediate (Local repo & release candidate) | 88/88 test suites passing; SHA-256 Merkle root verified |
|
|
86
86
|
| **Zero-Network CLI (`mudraforge-statutory`)** | Layer 1: Public Package | `PUBLIC_BUNDLED` | Immediate (Global / NPX) | `bin/cli.js` verified across Windows & Linux |
|
|
87
87
|
| **Vendor-Neutral Conformance Suite** | Layer 1: Public Package | `PUBLIC_BUNDLED` | Immediate (`conformance/`) | 12/12 fixture tests passing |
|
|
88
88
|
| **Local Query SDK (`src/index.js`)** | Layer 1: Public Package | `PUBLIC_BUNDLED` | Immediate (Node.js v18+) | Zero-dependency offline lookup and temporal checks |
|