@mudraforge/statutory 2.12.1 → 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 +32 -0
- package/README.md +19 -0
- package/okf/corporate_ma_restructuring/business_combinations_indas_103/ast.json +20 -0
- package/okf/corporate_ma_restructuring/impairment_of_assets_indas_36/ast.json +20 -0
- package/okf/corporate_ma_restructuring/loss_carryforward_sec79/ast.json +33 -0
- package/okf/corporate_ma_restructuring/share_based_payments_indas_102/ast.json +20 -0
- package/okf/corporate_ma_restructuring/slump_sale_50b/ast.json +21 -0
- package/okf/corporate_ma_restructuring/tax_clearance_sec281/ast.json +21 -0
- package/okf/direct_tax/corporate_tax_115baa_115jb/ast.json +23 -0
- package/okf/direct_tax/income_taxes_deferred_tax_indas_12/ast.json +20 -0
- package/okf/direct_tax/special_rates_non_filer_206ab/ast.json +26 -0
- package/okf/direct_tax/statutory_disallowance_43b/ast.json +35 -0
- package/okf/direct_tax/tcs_goods_206c_1h/ast.json +69 -0
- package/okf/direct_tax/tds_commission_194h/ast.json +60 -0
- package/okf/direct_tax/tds_contractor_194c/ast.json +71 -0
- package/okf/direct_tax/tds_ecommerce_194o/ast.json +48 -0
- package/okf/direct_tax/tds_goods_194q/ast.json +71 -0
- package/okf/direct_tax/tds_goods_393/ast.json +59 -0
- package/okf/direct_tax/tds_individual_contract_194m/ast.json +59 -0
- package/okf/direct_tax/tds_interest_194a/ast.json +59 -0
- package/okf/direct_tax/tds_perquisites_194r/ast.json +47 -0
- package/okf/direct_tax/tds_property_194ia/ast.json +70 -0
- package/okf/direct_tax/tds_rent_194i/ast.json +60 -0
- package/okf/direct_tax/tds_rent_individual_194ib/ast.json +59 -0
- package/okf/direct_tax/tds_services_194j/ast.json +60 -0
- package/okf/indirect_tax_gst/blocked_itc_17_5/ast.json +26 -0
- package/okf/indirect_tax_gst/common_itc_reversal_rule42_43/ast.json +26 -0
- package/okf/indirect_tax_gst/composite_mixed_supplies_sec8/ast.json +21 -0
- package/okf/indirect_tax_gst/composition_levy_sec10/ast.json +23 -0
- package/okf/indirect_tax_gst/credit_debit_notes_sec34/ast.json +21 -0
- package/okf/indirect_tax_gst/e_invoicing_rule48_4/ast.json +20 -0
- package/okf/indirect_tax_gst/export_services_lut_sec16/ast.json +20 -0
- package/okf/indirect_tax_gst/gst_tds_sec51/ast.json +23 -0
- package/okf/indirect_tax_gst/itc_eligibility_16_2/ast.json +20 -0
- package/okf/indirect_tax_gst/itc_reversal_rule37_37a/ast.json +45 -0
- package/okf/indirect_tax_gst/rcm_liability_sec9_3/ast.json +26 -0
- package/okf/international_tax/cross_border_remittance_195/ast.json +39 -0
- package/okf/international_tax/financial_instruments_ecl_indas_109/ast.json +24 -0
- package/okf/international_tax/foreign_exchange_indas_21_109/ast.json +20 -0
- package/okf/international_tax/foreign_tax_credit_irc_901_904/ast.json +20 -0
- package/okf/international_tax/transfer_pricing_alp_92c/ast.json +25 -0
- package/okf/manifest.json +49 -3
- package/okf/msme_commercial/delayed_payments_15_16/ast.json +38 -0
- package/okf/msme_commercial/enterprise_classification_sec7/ast.json +25 -0
- package/okf/msme_commercial/lease_accounting_indas_116/ast.json +20 -0
- package/okf/msme_commercial/mca_msme_1_filing/ast.json +20 -0
- package/okf/msme_commercial/provisions_contingencies_indas_37/ast.json +20 -0
- package/okf/msme_commercial/revenue_recognition_indas_115/ast.json +20 -0
- package/okf/msme_commercial/statutory_disclosures_sec22/ast.json +21 -0
- package/package.json +16 -4
- package/src/calculators.js +139 -3
- package/src/constants.js +1 -1
- package/src/index.js +16 -2
- package/src/payroll.js +506 -0
- package/src/usvm/evaluation_vm.js +504 -0
- package/src/usvm/index.js +65 -0
- package/src/usvm/math_rational.js +165 -0
- package/src/usvm/rules/sec_115baa_115jb_mat.json +23 -0
- package/src/usvm/rules/sec_192_salary_tds.json +23 -0
- package/src/usvm/rules/sec_194a_interest.json +59 -0
- package/src/usvm/rules/sec_194c_contractors.json +71 -0
- package/src/usvm/rules/sec_194h_commission.json +60 -0
- package/src/usvm/rules/sec_194i_rent.json +60 -0
- package/src/usvm/rules/sec_194ia_property.json +70 -0
- package/src/usvm/rules/sec_194ib_rent_ind.json +59 -0
- package/src/usvm/rules/sec_194j_services.json +60 -0
- package/src/usvm/rules/sec_194m_contract_ind.json +59 -0
- package/src/usvm/rules/sec_194o_ecommerce.json +48 -0
- package/src/usvm/rules/sec_194q_goods.json +71 -0
- package/src/usvm/rules/sec_194r_perquisites.json +47 -0
- package/src/usvm/rules/sec_195_cross_border.json +39 -0
- package/src/usvm/rules/sec_206ab_non_filer.json +26 -0
- package/src/usvm/rules/sec_206c1h_tcs.json +69 -0
- package/src/usvm/rules/sec_281_tax_clearance.json +21 -0
- package/src/usvm/rules/sec_393_goods.json +59 -0
- package/src/usvm/rules/sec_43bh_disallowance.json +35 -0
- package/src/usvm/rules/sec_50b_slump_sale.json +21 -0
- package/src/usvm/rules/sec_79_loss_continuity.json +33 -0
- package/src/usvm/rules/sec_92c_transfer_pricing.json +25 -0
- package/src/usvm/rules/sec_ftc_dtaa_relief.json +20 -0
- package/src/usvm/rules/sec_gst_blocked_itc_17_5.json +26 -0
- package/src/usvm/rules/sec_gst_composite_mixed_8.json +21 -0
- package/src/usvm/rules/sec_gst_composition_levy_10.json +23 -0
- package/src/usvm/rules/sec_gst_credit_debit_notes_34.json +21 -0
- package/src/usvm/rules/sec_gst_einvoicing_rule48_4.json +20 -0
- package/src/usvm/rules/sec_gst_ewaybill_rule138.json +21 -0
- package/src/usvm/rules/sec_gst_export_lut_16.json +20 -0
- package/src/usvm/rules/sec_gst_itc_eligibility_16_2.json +20 -0
- package/src/usvm/rules/sec_gst_itc_reversal_rule37_37a.json +45 -0
- package/src/usvm/rules/sec_gst_rcm_liability_9_3.json +26 -0
- package/src/usvm/rules/sec_gst_rule42_43_apportionment.json +26 -0
- package/src/usvm/rules/sec_gst_tds_sec51.json +23 -0
- package/src/usvm/rules/sec_indas102_esop.json +20 -0
- package/src/usvm/rules/sec_indas103_mna.json +20 -0
- package/src/usvm/rules/sec_indas109_ecl.json +24 -0
- package/src/usvm/rules/sec_indas115_revenue.json +20 -0
- package/src/usvm/rules/sec_indas116_leases.json +20 -0
- package/src/usvm/rules/sec_indas12_deferred_tax.json +20 -0
- package/src/usvm/rules/sec_indas21_fx_reval.json +20 -0
- package/src/usvm/rules/sec_indas36_impairment.json +20 -0
- package/src/usvm/rules/sec_indas37_provisions.json +20 -0
- package/src/usvm/rules/sec_msme_classification_sec7.json +25 -0
- package/src/usvm/rules/sec_msme_delayed_payments_15_16.json +38 -0
- package/src/usvm/rules/sec_msme_disclosures_sec22.json +21 -0
- package/src/usvm/rules/sec_msme_mca_form_1.json +20 -0
- package/src/usvm/schemas/statutory_ast_schema.js +203 -0
- package/src/usvm/usvm_domain_evaluators.js +1021 -0
- package/types/index.d.ts +134 -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 -750
- package/docs/ARCHITECTURE_DECISIONS.md +0 -138
- 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 -159
- package/docs/OKF_MAINTENANCE_SOP.md +0 -286
- package/docs/PILOT_EVALUATION_GUIDE.md +0 -214
- 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,138 +0,0 @@
|
|
|
1
|
-
# MudraForge Statutory Knowledge Substrate — Architecture Decision Records (ADRs)
|
|
2
|
-
|
|
3
|
-
> **Standard**: Lightweight ADR Format inspired by Michael Nygard & OpenSSF Project Governance
|
|
4
|
-
> **Package**: `@mudraforge/statutory`
|
|
5
|
-
> **Status**: Institutional Normative Standard
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## ADR-0001: Offline-First Bundled Commons vs. Hosted Cloudflare Edge Sync
|
|
10
|
-
|
|
11
|
-
### Context
|
|
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
|
-
|
|
14
|
-
### Decision
|
|
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
|
-
- Lookups in default or `mode: 'local'` execute entirely against local disk with zero network requests.
|
|
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
|
-
- If edge sync is unreachable, callers automatically degrade to the verified local snapshot with an explicit `advisory` signal.
|
|
19
|
-
|
|
20
|
-
### Consequences
|
|
21
|
-
- **Positive**: Zero-network local evaluation works reliably in offline environments, test runners, and air-gapped CI/CD pipelines.
|
|
22
|
-
- **Trade-off**: Bundled snapshots reflect the law at release time. Consumers must run `checkUpdates()` or check gazette notices for recent legislative amendments.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## ADR-0002: Decoupling Deterministic Statutory Calculators from Declarative OKF Data Models
|
|
27
|
-
|
|
28
|
-
### Context
|
|
29
|
-
Large Language Models (LLMs) frequently hallucinate complex statutory threshold arithmetic (e.g. calculating Section 194Q TDS on the full ₹80 Lakhs invoice instead of the excess over ₹50 Lakhs, or failing to compound MSMED interest at 3x RBI bank rate).
|
|
30
|
-
|
|
31
|
-
### Decision
|
|
32
|
-
We strictly decouple the declarative knowledge format (OKF v0.2 JSON schemas and Markdown circulars) from arithmetic calculation engines:
|
|
33
|
-
1. The open-source `@mudraforge/statutory` package defines declarative schemas, thresholds, rate schedules, and temporal validity bounds.
|
|
34
|
-
2. Exact statutory calculations are executed either by deterministic client functions or the paid MudraForge Cloudflare Worker engine.
|
|
35
|
-
3. Neither LLM text generation nor probabilistic prompts are ever permitted to compute statutory tax liability or interest.
|
|
36
|
-
|
|
37
|
-
### Consequences
|
|
38
|
-
- **Positive**: Prevents catastrophic financial calculation drift and prompt injection risks.
|
|
39
|
-
- **Trade-off**: The open-source package serves as a structured reference and validator; enterprise high-volume calculation is gated behind the deterministic calculation engine.
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## ADR-0003: Commercial Boundary of Adesha Sovereign Payment Execution
|
|
44
|
-
|
|
45
|
-
### Context
|
|
46
|
-
Open-sourcing tax knowledge creates technical trust, but enterprise organizations require governed execution to automate corporate accounts payable, treasury operations, and bank rail payouts without risk.
|
|
47
|
-
|
|
48
|
-
### Decision
|
|
49
|
-
We formalize a strict 4-layer operational boundary:
|
|
50
|
-
1. **Layer 1: Open Statutory Knowledge (Open Source / MIT & CC BY 4.0)**: Machine-readable OKF schemas, circular frontmatter, CLI, and offline validator.
|
|
51
|
-
2. **Layer 2: Hosted Knowledge Services (Free Beta / Metered API)**: Cloudflare Anycast edge synchronization, remote manifest checking, and catalog expansions.
|
|
52
|
-
3. **Layer 3: Statutory Deduction Engine (Commercial Paid)**: Entity fact-matching, cross-provision conflict resolution, and deterministic statutory arithmetic.
|
|
53
|
-
4. **Layer 4: Adesha Sovereign Runtime (Enterprise Commercial)**: Human-in-the-Loop mobile authorization harness, TLA+-verified single-use payment leases, two-way ERP sync (SAP/Tally), and corporate banking rails.
|
|
54
|
-
|
|
55
|
-
### Consequences
|
|
56
|
-
- **Positive**: Clear division of responsibilities; open-source users have an unencumbered, fully functional tax commons, while commercial clients obtain bank-grade execution safety.
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## ADR-0004: Tripartite Versioning Specification
|
|
61
|
-
|
|
62
|
-
### Context
|
|
63
|
-
Confusing package software updates with legal statutory amendments leads to silent downstream breakages. A statutory amendment does not necessarily change software APIs, and an SDK performance patch does not alter the law.
|
|
64
|
-
|
|
65
|
-
### Decision
|
|
66
|
-
We establish three independent, non-interchangeable versioning dimensions:
|
|
67
|
-
|
|
68
|
-
| Version Identifier | Target Governed | Lifecycle & Increment Rules | Example |
|
|
69
|
-
| :--- | :--- | :--- | :--- |
|
|
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
|
-
| **`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.10.0` |
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## ADR-0005: Formal Product Capability Status Register
|
|
77
|
-
|
|
78
|
-
### Context
|
|
79
|
-
To maintain institutional credibility, public documentation must never blur the line between currently published capabilities, planned features, and proprietary enterprise software.
|
|
80
|
-
|
|
81
|
-
### Status Register
|
|
82
|
-
|
|
83
|
-
| Subsystem / Capability | Architectural Layer | Operational Status | Availability / Access | Verification Evidence |
|
|
84
|
-
| :--- | :--- | :--- | :--- | :--- |
|
|
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
|
-
| **Zero-Network CLI (`mudraforge-statutory`)** | Layer 1: Public Package | `PUBLIC_BUNDLED` | Immediate (Global / NPX) | `bin/cli.js` verified across Windows & Linux |
|
|
87
|
-
| **Vendor-Neutral Conformance Suite** | Layer 1: Public Package | `PUBLIC_BUNDLED` | Immediate (`conformance/`) | 12/12 fixture tests passing |
|
|
88
|
-
| **Local Query SDK (`src/index.js`)** | Layer 1: Public Package | `PUBLIC_BUNDLED` | Immediate (Node.js v18+) | Zero-dependency offline lookup and temporal checks |
|
|
89
|
-
| **Synthetic AP Execution Trace (`examples/`)** | Layer 1: Public Package | `PUBLIC_DEMO_SYNTHETIC` | Immediate (`npm run example:trace`) | Modeled 7-stage lifecycle with synthetic test fixtures |
|
|
90
|
-
| **Cloudflare Anycast Edge Sync** | Layer 2: Public Edge Service | `PUBLIC_EDGE_SYNC` | Free Beta (`api.mudraforge.in`) | Cloudflare Edge Worker manifest & bundle endpoints |
|
|
91
|
-
| **Interactive API Documentation** | Layer 2: Public Edge Service | `PUBLIC_EDGE_SYNC` | Free Beta (`/api/v1/statutory/docs`) | OpenAPI 3.1 schema rendered live on Anycast edge |
|
|
92
|
-
| **Deterministic Calculators (7 Pure Functions)** | Layer 1: Public Package | `PUBLIC_BUNDLED` | Immediate (`@mudraforge/statutory/calculators`) | Corporate tax MAT vs concessional, GST POS/LUT, TP ALP, Section 79, Ind AS 109, Section 288B |
|
|
93
|
-
| **Hosted AP Engine & Cumulative Spend Tracking** | Layer 3: Enterprise Internal | `PILOT_STAGE_INTERNAL` | Metered Enterprise API (Selective) | Hosted cumulative Section 194Q thresholding & Section 16 MSMED interest |
|
|
94
|
-
| **Dual-Custody Mobile Approval Harness** | Layer 4: Adesha Runtime | `INTERNAL_PROTOTYPE` | Enterprise License / Pilot Proposal | Mobile passkey approval prototype & TLA+ state machine |
|
|
95
|
-
| **ERP Two-Way Connectors (SAP/Tally/Zoho)** | Layer 4: Adesha Runtime | `INTERNAL_DEVELOPMENT` | Custom Enterprise Pilot | Shadow-mode test connectors; no turnkey plug-ins shipped |
|
|
96
|
-
| **Bank Rail API Adapters (ICICI/HDFC/RazorpayX)**| Layer 4: Adesha Runtime | `INTERNAL_DEVELOPMENT` | Custom Enterprise Pilot | Sandbox banking adapters requiring corporate partner onboarding |
|
|
97
|
-
|
|
98
|
-
> **Critical Operational Distinction**: Items marked `PUBLIC_BUNDLED` and `PUBLIC_EDGE_SYNC` represent inspectable, working software. Items marked `PILOT_STAGE_INTERNAL`, `INTERNAL_PROTOTYPE`, and `INTERNAL_DEVELOPMENT` represent proprietary or developing enterprise capabilities; they are not shipped as generally available consumer software and their execution traces rely on modeled synthetic data.
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## ADR-0006: Declarative Composite Transaction Profiles and Domain Knowledge Graphs
|
|
103
|
-
|
|
104
|
-
### Context
|
|
105
|
-
Commercial lifecycle events (such as corporate acquisitions, slump sales, mergers, and vendor onboarding runs) are not individual statutes. Instead, they represent business transaction archetypes that trigger multiple intersecting statutory regimes across Direct Tax, Indirect Tax (GST), and Corporate Governance (Companies Act).
|
|
106
|
-
|
|
107
|
-
Treating complex transactions as flat, isolated `section.json` files forces consuming developers and AI agents to guess the relationships, execution sequences, and documentary requirements connecting relevant laws. Conversely, hardcoding operational execution logic, linear numbering assumptions, or premature legal verdicts (e.g. declaring a deal void due to a missing certificate without evaluating statutory safe harbors) into declarative formats violates both open knowledge standards and sound statutory jurisprudence.
|
|
108
|
-
|
|
109
|
-
### Decision
|
|
110
|
-
We establish a 3-tier declarative knowledge model for complex multi-statute transactions:
|
|
111
|
-
|
|
112
|
-
1. **Tier 1: Atomic Statutory Provision (`section.json`)**: Authoritative legislative text, official Gazette citations, rates, and temporal validity windows.
|
|
113
|
-
2. **Tier 2: Legal Concept Definition (`concepts/*.md`)**: Substantive interpretation boundaries, statutory conditions, exceptions, safe harbors, and evidence checklists (Markdown with structured YAML frontmatter).
|
|
114
|
-
3. **Tier 3: Composite Transaction Profile (`composites/*.json`)**: Declarative relationship graph connecting relevant concepts and provisions for a specific business transaction archetype.
|
|
115
|
-
|
|
116
|
-
#### Core Architectural Invariants:
|
|
117
|
-
1. **Extension Attribution**: Composite profiles are documented as a versioned **MudraForge OKF Transaction Extension**, keeping them distinct from upstream Google OKF v0.2 core specifications while fully utilizing OKF frontmatter conventions.
|
|
118
|
-
2. **Logical Dependencies vs. Operational Ordering**:
|
|
119
|
-
- `dependsOn` strictly denotes a **logical prerequisite** where a downstream statutory test is contingent on an upstream outcome (e.g. evaluating GST Notification 12/2017 going-concern nil-rate eligibility logically depends on whether the transfer satisfies the Section 50B "undertaking" test).
|
|
120
|
-
- In contrast, operational ordering is not enforced as a rigid constraint; independent checks (such as Section 281 tax proceedings verification and Section 180 corporate approval) remain independently runnable even when another inquiry is pending, unresolved, or awaiting documentation.
|
|
121
|
-
3. **Statutory Safe Harbors over Binary Failure Verdicts**: Profiles declare applicable legal questions, statutory conditions, safe harbors (e.g., bona fide purchaser for value without notice under Section 281), and evidentiary burdens, leaving judicial or executive determinations to runtime evaluation engines.
|
|
122
|
-
4. **Strict Temporal Enactment Distinguishability**: Corresponding provisions under the Income-tax Act, 1961 (such as §281, §170) and the Income-tax Act, 2025 (such as §499, §313 taking effect 1 April 2026) must remain explicitly distinguished by enactment code and effective period.
|
|
123
|
-
5. **Separation of Open Knowledge from Governed Execution**:
|
|
124
|
-
- The open commons (`@mudraforge/statutory`) provides the inspectable, reusable, and testable dependency graph of laws and evidence requirements.
|
|
125
|
-
- The commercial runtime (Adesha) executes deterministic calculations, enforces bank escrow locks, requires CFO biometric authorization, and writes balanced ERP journal entries.
|
|
126
|
-
6. **Normative Scope & Independent Legal Validation**:
|
|
127
|
-
- An Architecture Decision Record defines structural design invariants and data contracts; it does not substitute for independent legal certification of specific transaction scenarios. All composite profiles and legal-version mappings must be validated against independent legal ground truth in dedicated scenario test suites before promotion to stable status.
|
|
128
|
-
|
|
129
|
-
#### Prototype Implementation Requirements (feature/composite-transaction-profiles):
|
|
130
|
-
Prior to merging any composite transaction prototype into `main`, the implementation must satisfy four strict verification gates:
|
|
131
|
-
1. **Precise Graph Semantics & Acyclicity**: Formally define `dependsOn`, `parallelIndependentChecks`, and `conditionalDownstreamChecks`. Implement automated DAG validation that rejects circular dependencies and cleanly halts downstream evaluation when an upstream prerequisite is `UNKNOWN` or `UNRESOLVED`.
|
|
132
|
-
2. **Temporal & Provenance Continuity**: Every statutory reference in a profile must carry an unambiguous enactment code, provision identifier, official Gazette source URL, and `effectivePeriod`. Cross-regime profiles must evaluate against an explicit `asOfDate` rather than silently blending provisions from different legislative eras.
|
|
133
|
-
3. **Four-State Epistemic Uncertainty Model**: Inquiries must be evaluated against an explicit four-state epistemic model (`SATISFIED`, `NOT_SATISFIED`, `UNKNOWN` / `EVIDENCE_PENDING`, and `NOT_APPLICABLE`). Missing documentation or unverified assertions must remain `UNKNOWN` rather than prematurely collapsing into negative legal conclusions.
|
|
134
|
-
4. **Independent Open-Source Usability (Zero Vendor Lock-in)**: A third-party developer or external AI agent must be able to load a composite profile, validate its schema, traverse its dependency graph, and inspect its evidence checklists locally and offline using only `@mudraforge/statutory`, with zero dependency on the proprietary Adesha runtime, API keys, or remote servers.
|
|
135
|
-
|
|
136
|
-
### Consequences
|
|
137
|
-
- **Positive**: Makes complex statutory relationships discoverable and machine-readable for AI agents without compromising open-source format purity or disclosing proprietary execution code.
|
|
138
|
-
- **Lifecycle Management**: Implemented as an experimental prototype on a dedicated feature branch (`feature/composite-transaction-profiles`) and subjected to independent legal scenario benchmarking prior to promotion into public release `v2.5.0`. Release `v2.4.0` remains focused on the verified atomic statutory corpus.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
INWARD INVOICE SLIP (TAX INVOICE)
|
|
2
|
-
--------------------------------------------------------------------------------
|
|
3
|
-
Supplier: Precision Castings Pvt. Ltd. | GSTIN: 27AAACP1234F1ZV (Maharashtra)
|
|
4
|
-
PAN : AAACP1234F (Company) | MSME : UDYAM-MH-03-0019842 (Micro Mfr)
|
|
5
|
-
Inv No : PCPL/25-26/0541 | Date : 01-May-2025 (GRN: 01-May-2025)
|
|
6
|
-
Terms : PO-2025-0892 (Net 60 Days) | Supply: HSN 732599 (Valve Castings)
|
|
7
|
-
Basic : ₹20,00,000.00 | IGST 18%: ₹3,60,000.00
|
|
8
|
-
Total : ₹23,60,000.00 | Place of Supply: Gujarat (Interstate)
|
|
9
|
-
|
|
10
|
-
BUYER ERP CONTEXT (Zenith Engineering Pvt. Ltd.)
|
|
11
|
-
--------------------------------------------------------------------------------
|
|
12
|
-
Prior FY Turnover : ₹18.50 Crore (Exceeds ₹10 Cr 194Q Gate)
|
|
13
|
-
YTD Purchases : ₹45,00,000.00 prior to this bill (Excl. GST, on credit)
|
|
14
|
-
PAN Status : Active & Operative
|
|
15
|
-
|
|
16
|
-
MUDRAFORGE ENGINE OUTPUT (STATUTORY DETERMINATION)
|
|
17
|
-
--------------------------------------------------------------------------------
|
|
18
|
-
1. Section 194Q TDS:
|
|
19
|
-
- Taxable Base : ₹15,00,000 (Excess over ₹50L; GST excluded per Cir 13/2021)
|
|
20
|
-
- TDS Rate : 0.1% (Standard operative PAN rate)
|
|
21
|
-
- TDS Amount : ₹1,500.00 (Exceeds ₹50L base; satisfies Section 288B multiple-of-10 rounding)
|
|
22
|
-
|
|
23
|
-
2. MSMED Act Sec 15 & Sec 43B(h):
|
|
24
|
-
- Status : Micro Manufacturer (NIC 24311)
|
|
25
|
-
- Credit Term : 60-day term is void; capped at 45 days from GRN (01-May-2025)
|
|
26
|
-
- Cutoff Date : 15-June-2025 (To avoid Sec 16 interest & 43B(h) disallowance)
|
|
27
|
-
|
|
28
|
-
3. General Ledger Posting:
|
|
29
|
-
- Dr. Expense ₹20,00,000 | Dr. IGST ₹3,60,000
|
|
30
|
-
- Cr. TDS Payable ₹1,500 | Cr. Vendor AP ₹23,58,500
|
|
31
|
-
|
|
32
|
-
SPREADSHEET COMPLIANCE FORMULAS
|
|
33
|
-
--------------------------------------------------------------------------------
|
|
34
|
-
1. TDS WITHHOLDING (Section 194Q):
|
|
35
|
-
• Standard Excel (Generic All-in-One):
|
|
36
|
-
=IF(AND(BuyerTurnoverCr > 10, TxnDate >= DATE(2021,7,1)), ROUND((MAX(0, (PriorSpend + IF(IsAdvance, GrossAmt, GrossAmt - GstAmt)) - 5000000) - MAX(0, PriorSpend - 5000000)) * IF(HasOperativePAN, 0.1%, 5.0%), -1), 0)
|
|
37
|
-
|
|
38
|
-
• Standard Excel (Case 01 Values):
|
|
39
|
-
=IF(AND(18.5 > 10, DATE(2025,5,1) >= DATE(2021,7,1)), ROUND((MAX(0, (4500000 + IF(FALSE, 2360000, 2360000 - 360000)) - 5000000) - MAX(0, 4500000 - 5000000)) * IF(TRUE, 0.1%, 5.0%), -1), 0)
|
|
40
|
-
|
|
41
|
-
• MudraForge Add-in:
|
|
42
|
-
=MF.TDS("194Q", 2360000, 4500000, TRUE, "2025-05-01", 18.5, 360000, FALSE)
|
|
43
|
-
-> Result : ₹1,500.00
|
|
44
|
-
|
|
45
|
-
2. STATUTORY DUE DATE (MSMED Act Section 15 & Section 43B(h)):
|
|
46
|
-
• Standard Excel : =DeliveryDate + MIN(AgreedContractDays, 45)
|
|
47
|
-
• MudraForge : =MF.MSME.DUEDATE("2025-05-01", TRUE, "2025-06-30")
|
|
48
|
-
-> Result : 15-June-2025
|