@mudraforge/statutory 2.5.1 → 2.6.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 CHANGED
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [2.6.0] - 2026-10-25
11
+
12
+ ### Added
13
+ - **100% Complete Corporate Finance AP Corpus (24 Provisions across 5 Core Domains)**:
14
+ - `direct_tax`: Added **Section 194R** (10% TDS on business perquisites & benefits > ₹20k, Circulars 12/2022 & 18/2022) and **Section 206AB** (Higher withholding rate on non-filers: higher of 2× statutory rate or 5%).
15
+ - `indirect_tax_gst`: Added **Section 51** (2% GST TDS on government/PSU contracts > ₹2.5L), **Section 34** (Credit and debit notes statutory adjustments & 30th November cutoff), **Section 10** (Composition scheme: restrictions on tax collection and ITC blockage), and **Rule 48(4)** (Mandatory E-Invoicing & B2B QR code mandate for turnover > ₹5 Cr with Rule 48(5) void invoice penalty).
16
+ - Expanded test coverage from 49 to 55 comprehensive regression suites with 100% pass rate.
17
+ - **Cognitive AI Explanation Toggle**:
18
+ - `POST /api/v1/statutory/calculate` now supports an `explain: true` toggle and rich `mode: 'analysis'` senior legal counsel opinion generated via Google Gemini 2.5 Flash / Workers AI Llama 3.3.
19
+ - Sub-10ms fast path preserved for `mode: 'standard'` and `explain: false` for high-throughput automated ERP batch processing.
20
+ - **Section 194J Category Normalization & Fail-Closed Safety**:
21
+ - Flexible case-insensitive synonym mapping (`'professional'`, `'prof'`, `'ca'`, `'legal'`, `'fts'`, `'technical'`, `'director'`).
22
+ - Unknown service categories strictly reject with HTTP 400 `INVALID_SERVICE_CATEGORY` instead of defaulting silently to 2%.
23
+ - **MSME Wholesale & Retail Trader Exclusion (NIC 45, 46, 47)**:
24
+ - Deterministically enforces Ministry of MSME OM dated 02.07.2021, setting delayed payment interest to ₹0 with `EXEMPT_TRADER_EXCLUSION`.
25
+
26
+ ---
27
+
10
28
  ## [2.5.1] - 2026-10-25
11
29
 
12
30
  ### Fixed
package/README.md CHANGED
@@ -11,6 +11,31 @@
11
11
 
12
12
  ---
13
13
 
14
+ ## 30-Second Quick Start
15
+
16
+ ```bash
17
+ npm install @mudraforge/statutory
18
+ ```
19
+
20
+ ```javascript
21
+ import { MudraStatutoryClient } from '@mudraforge/statutory';
22
+ const client = new MudraStatutoryClient({ apiKey: process.env.MUDRA_API_KEY });
23
+
24
+ // 1. Compute Section 194Q TDS (excess over ₹50L with dual-act temporal routing):
25
+ const tds = await client.calculate({ invoiceAmount: 8000000, priorFyPurchases: 4000000 });
26
+ console.log(tds.taxAmount); // 7000 (0.1% on ₹70L excess)
27
+
28
+ // 2. Compute MSMED 3x RBI compounding interest (monthly rests):
29
+ const interest = await client.calculate({ section: 'MSMED', invoiceAmount: 1000000, dueDate: '2025-01-01', paymentDate: '2025-04-01' });
30
+ console.log(interest.penalInterestAmount); // 41601.37 (20.25% p.a. compound)
31
+
32
+ // 3. Look up statutory rule by phrase or section code:
33
+ const statute = await client.lookup('delayed payment');
34
+ console.log(statute.statute.title); // MSMED statutory payment timelines & compound interest
35
+ ```
36
+
37
+ ---
38
+
14
39
  ### Plain-English Orientation
15
40
 
16
41
  `@mudraforge/statutory` provides an open, machine-readable statutory knowledge layer for Indian and cross-border financial workflows, grounding compliance rules in primary legislation rather than probabilistic LLM guesswork. It serves software developers building financial applications, corporate finance operations teams seeking auditable withholding and delayed-payment rules, and autonomous AI agents requiring deterministic reference boundaries. The statutory commons acts as an open, inspectable reference substrate, while MudraForge's broader Adesha initiative governs downstream transactional execution, human authorization, and enterprise ledger writebacks. Developers can proceed directly to [Installation & Quick Start](#quick-start-free-tier), while finance leaders, controllers, and tax practitioners can inspect the indexed statutes, cumulative thresholds, and executive circulars in [docs/CATALOG.md](./docs/CATALOG.md).