law2code / data /precomputed_presets.json
yamero999's picture
Upload data/precomputed_presets.json with huggingface_hub
a953d96 verified
Raw History Blame Contribute Delete
188 kB
{ "US_IRC_1_A": { "id": "US_IRC_1_A", "title": "IRC Section 1(a) -- Married Joint Return (5 Progressive Tax Brackets)", "law": "26 U.S. Code Section 1(a)", "category": "US Federal Income Tax", "text": "(a) Married individuals filing joint returns and surviving spouses: There is hereby imposed on the taxable income of every married individual who makes a single return jointly with his spouse under section 6013, and of every surviving spouse: If taxable income is: Not over $36,900, the tax is 15% of taxable income. Over $36,900 but not over $89,150, the tax is $5,535, plus 28% of the excess over $36,900. Over $89,150 but not over $140,000, the tax is $20,165, plus 31% of the excess over $89,150. Over $140,000 but not over $250,000, the tax is $35,928.50, plus 36% of the excess over $140,000. Over $250,000, the tax is $75,528.50, plus 39.6% of the excess over $250,000.", "ast": { "schema_version": "mudraforge.statutory_ast.v1", "generated_at_utc": "2026-11-21T09:21:30.504885+00:00", "pipeline_version": "v6.1.0-prod", "spec_id": "MF-SPEC-S1-V6.1.0", "doc_id": "US_IRC_1_A", "scope_name": "UsIrc1A", "isAuthorizedToDisburse": false, "stages_executed": [ "stage1", "stage1_5", "stage2", "stage2b" ], "stage_sources": { "stage1": "model", "stage1_5": "model", "stage2": "model", "stage2b": "model" }, "source_text": "(a) Married individuals filing joint returns and surviving spouses: There is hereby imposed on the taxable income of every married individual who makes a single return jointly with his spouse under section 6013, and of every surviving spouse: If taxable income is: Not over $36,900, the tax is 15% of taxable income. Over $36,900 but not over $89,150, the tax is $5,535, plus 28% of the excess over $36,900. Over $89,150 but not over $140,000, the tax is $20,165, plus 31% of the excess over $89,150. Over $140,000 but not over $250,000, the tax is $35,928.50, plus 36% of the excess over $140,000. Over $250,000, the tax is $75,528.50, plus 39.6% of the excess over $250,000.", "declarations": { "inputs": [ { "direction": "input", "name": "income", "catala_type": "money", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_INCOME", "usvm_key": "taxableIncomePaisa", "source_text": "taxable income", "tokStart": 18, "tokEnd": 19, "is_custom_fallback": false }, { "direction": "input", "name": "tax_amount", "catala_type": "money", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_CUSTOM", "usvm_key": "statutoryTaxPaisa", "source_text": "tax", "tokStart": 54, "tokEnd": 54, "is_custom_fallback": true } ], "local_aliases": [], "deontic_targets": [], "outputs": [ { "direction": "output", "name": "is_rule_applicable", "catala_type": "boolean", "description": "True when statutory COND clauses hold and no EXCEPTION applies." }, { "direction": "output", "name": "computed_statutory_amount", "catala_type": "money", "description": "Deterministic monetary output derived from RULE_EFFECT clauses." }, { "direction": "output", "name": "is_authorized_to_disburse", "catala_type": "boolean", "description": "MudraForge statutory invariant: calculation never authorizes disbursement.", "invariant_value": false } ] }, "statutory_constants": { "ACTOR_SCOPE": [ { "text": "Married individuals", "tokStart": 3, "tokEnd": 4 }, { "text": "surviving spouses", "tokStart": 9, "tokEnd": 10 }, { "text": "married individual", "tokStart": 22, "tokEnd": 23 }, { "text": "spouse", "tokStart": 32, "tokEnd": 32 }, { "text": "surviving spouse", "tokStart": 40, "tokEnd": 41 } ], "OP": [ { "text": "hereby imposed on", "tokStart": 14, "tokEnd": 16 }, { "text": "Not over", "tokStart": 48, "tokEnd": 49 }, { "text": "not over", "tokStart": 66, "tokEnd": 67 }, { "text": "plus", "tokStart": 77, "tokEnd": 77 }, { "text": "excess", "tokStart": 82, "tokEnd": 82 }, { "text": "over", "tokStart": 83, "tokEnd": 83 }, { "text": "Over", "tokStart": 87, "tokEnd": 87 }, { "text": "not over", "tokStart": 91, "tokEnd": 92 }, { "text": "plus", "tokStart": 102, "tokEnd": 102 }, { "text": "excess", "tokStart": 107, "tokEnd": 107 }, { "text": "over", "tokStart": 108, "tokEnd": 108 }, { "text": "Over", "tokStart": 112, "tokEnd": 112 }, { "text": "not over", "tokStart": 116, "tokEnd": 117 }, { "text": "plus", "tokStart": 127, "tokEnd": 127 }, { "text": "excess", "tokStart": 132, "tokEnd": 132 }, { "text": "over", "tokStart": 133, "tokEnd": 133 }, { "text": "Over", "tokStart": 137, "tokEnd": 137 }, { "text": "plus", "tokStart": 147, "tokEnd": 147 }, { "text": "excess", "tokStart": 152, "tokEnd": 152 }, { "text": "over", "tokStart": 153, "tokEnd": 153 } ], "COUNT": [ { "text": "single", "tokStart": 27, "tokEnd": 27 } ], "XREF": [ { "text": "section 6013", "tokStart": 34, "tokEnd": 35 } ], "MONEY": [ { "text": "$36,900", "tokStart": 50, "tokEnd": 51 }, { "text": "$36,900", "tokStart": 63, "tokEnd": 64 }, { "text": "$89,150", "tokStart": 68, "tokEnd": 69 }, { "text": "$5,535", "tokStart": 74, "tokEnd": 75 }, { "text": "$36,900", "tokStart": 84, "tokEnd": 85 }, { "text": "$89,150", "tokStart": 88, "tokEnd": 89 }, { "text": "$140,000", "tokStart": 93, "tokEnd": 94 }, { "text": "$20,165", "tokStart": 99, "tokEnd": 100 }, { "text": "$89,150", "tokStart": 109, "tokEnd": 110 }, { "text": "$140,000", "tokStart": 113, "tokEnd": 114 }, { "text": "$250,000", "tokStart": 118, "tokEnd": 119 }, { "text": "$35,928.50", "tokStart": 124, "tokEnd": 125 }, { "text": "$140,000", "tokStart": 134, "tokEnd": 135 }, { "text": "$250,000", "tokStart": 138, "tokEnd": 139 }, { "text": "$75,528.50", "tokStart": 144, "tokEnd": 145 }, { "text": "$250,000", "tokStart": 154, "tokEnd": 155 } ], "RATE": [ { "text": "15%", "tokStart": 56, "tokEnd": 57 }, { "text": "28%", "tokStart": 78, "tokEnd": 79 }, { "text": "31%", "tokStart": 103, "tokEnd": 104 }, { "text": "36%", "tokStart": 128, "tokEnd": 129 }, { "text": "39.6%", "tokStart": 148, "tokEnd": 149 } ] }, "rate_branch_discriminator": null, "atoms": [ { "label": "ACTOR_SCOPE", "text": "Married individuals", "tokStart": 3, "tokEnd": 4, "charStart": 4, "charEnd": 23 }, { "label": "ACTOR_SCOPE", "text": "surviving spouses", "tokStart": 9, "tokEnd": 10, "charStart": 49, "charEnd": 66 }, { "label": "OP", "text": "hereby imposed on", "tokStart": 14, "tokEnd": 16, "charStart": 77, "charEnd": 94 }, { "label": "ACTOR_SCOPE", "text": "married individual", "tokStart": 22, "tokEnd": 23, "charStart": 123, "charEnd": 141 }, { "label": "COUNT", "text": "single", "tokStart": 27, "tokEnd": 27, "charStart": 154, "charEnd": 160 }, { "label": "ACTOR_SCOPE", "text": "spouse", "tokStart": 32, "tokEnd": 32, "charStart": 185, "charEnd": 191 }, { "label": "XREF", "text": "section 6013", "tokStart": 34, "tokEnd": 35, "charStart": 198, "charEnd": 210 }, { "label": "ACTOR_SCOPE", "text": "surviving spouse", "tokStart": 40, "tokEnd": 41, "charStart": 225, "charEnd": 241 }, { "label": "OP", "text": "Not over", "tokStart": 48, "tokEnd": 49, "charStart": 265, "charEnd": 273 }, { "label": "MONEY", "text": "$36,900", "tokStart": 50, "tokEnd": 51, "charStart": 274, "charEnd": 281 }, { "label": "RATE", "text": "15%", "tokStart": 56, "tokEnd": 57, "charStart": 294, "charEnd": 297 }, { "label": "MONEY", "text": "$36,900", "tokStart": 63, "tokEnd": 64, "charStart": 322, "charEnd": 329 }, { "label": "OP", "text": "not over", "tokStart": 66, "tokEnd": 67, "charStart": 334, "charEnd": 342 }, { "label": "MONEY", "text": "$89,150", "tokStart": 68, "tokEnd": 69, "charStart": 343, "charEnd": 350 }, { "label": "MONEY", "text": "$5,535", "tokStart": 74, "tokEnd": 75, "charStart": 363, "charEnd": 369 }, { "label": "OP", "text": "plus", "tokStart": 77, "tokEnd": 77, "charStart": 371, "charEnd": 375 }, { "label": "RATE", "text": "28%", "tokStart": 78, "tokEnd": 79, "charStart": 376, "charEnd": 379 }, { "label": "OP", "text": "excess", "tokStart": 82, "tokEnd": 82, "charStart": 387, "charEnd": 393 }, { "label": "OP", "text": "over", "tokStart": 83, "tokEnd": 83, "charStart": 394, "charEnd": 398 }, { "label": "MONEY", "text": "$36,900", "tokStart": 84, "tokEnd": 85, "charStart": 399, "charEnd": 406 }, { "label": "OP", "text": "Over", "tokStart": 87, "tokEnd": 87, "charStart": 408, "charEnd": 412 }, { "label": "MONEY", "text": "$89,150", "tokStart": 88, "tokEnd": 89, "charStart": 413, "charEnd": 420 }, { "label": "OP", "text": "not over", "tokStart": 91, "tokEnd": 92, "charStart": 425, "charEnd": 433 }, { "label": "MONEY", "text": "$140,000", "tokStart": 93, "tokEnd": 94, "charStart": 434, "charEnd": 442 }, { "label": "MONEY", "text": "$20,165", "tokStart": 99, "tokEnd": 100, "charStart": 455, "charEnd": 462 }, { "label": "OP", "text": "plus", "tokStart": 102, "tokEnd": 102, "charStart": 464, "charEnd": 468 }, { "label": "RATE", "text": "31%", "tokStart": 103, "tokEnd": 104, "charStart": 469, "charEnd": 472 }, { "label": "OP", "text": "excess", "tokStart": 107, "tokEnd": 107, "charStart": 480, "charEnd": 486 }, { "label": "OP", "text": "over", "tokStart": 108, "tokEnd": 108, "charStart": 487, "charEnd": 491 }, { "label": "MONEY", "text": "$89,150", "tokStart": 109, "tokEnd": 110, "charStart": 492, "charEnd": 499 }, { "label": "OP", "text": "Over", "tokStart": 112, "tokEnd": 112, "charStart": 501, "charEnd": 505 }, { "label": "MONEY", "text": "$140,000", "tokStart": 113, "tokEnd": 114, "charStart": 506, "charEnd": 514 }, { "label": "OP", "text": "not over", "tokStart": 116, "tokEnd": 117, "charStart": 519, "charEnd": 527 }, { "label": "MONEY", "text": "$250,000", "tokStart": 118, "tokEnd": 119, "charStart": 528, "charEnd": 536 }, { "label": "MONEY", "text": "$35,928.50", "tokStart": 124, "tokEnd": 125, "charStart": 549, "charEnd": 559 }, { "label": "OP", "text": "plus", "tokStart": 127, "tokEnd": 127, "charStart": 561, "charEnd": 565 }, { "label": "RATE", "text": "36%", "tokStart": 128, "tokEnd": 129, "charStart": 566, "charEnd": 569 }, { "label": "OP", "text": "excess", "tokStart": 132, "tokEnd": 132, "charStart": 577, "charEnd": 583 }, { "label": "OP", "text": "over", "tokStart": 133, "tokEnd": 133, "charStart": 584, "charEnd": 588 }, { "label": "MONEY", "text": "$140,000", "tokStart": 134, "tokEnd": 135, "charStart": 589, "charEnd": 597 }, { "label": "OP", "text": "Over", "tokStart": 137, "tokEnd": 137, "charStart": 599, "charEnd": 603 }, { "label": "MONEY", "text": "$250,000", "tokStart": 138, "tokEnd": 139, "charStart": 604, "charEnd": 612 }, { "label": "MONEY", "text": "$75,528.50", "tokStart": 144, "tokEnd": 145, "charStart": 625, "charEnd": 635 }, { "label": "OP", "text": "plus", "tokStart": 147, "tokEnd": 147, "charStart": 637, "charEnd": 641 }, { "label": "RATE", "text": "39.6%", "tokStart": 148, "tokEnd": 149, "charStart": 642, "charEnd": 647 }, { "label": "OP", "text": "excess", "tokStart": 152, "tokEnd": 152, "charStart": 655, "charEnd": 661 }, { "label": "OP", "text": "over", "tokStart": 153, "tokEnd": 153, "charStart": 662, "charEnd": 666 }, { "label": "MONEY", "text": "$250,000", "tokStart": 154, "tokEnd": 155, "charStart": 667, "charEnd": 675 } ], "clauses": [ { "clause_index": 1, "scope_type": "RULE_EFFECT", "confidence": 0.9564, "tokStart": 12, "tokEnd": 41, "text": "There is hereby imposed on the taxable income of every married individual who makes a single return jointly with his spouse under section 6013, and of every surviving spouse", "bound_variables": [ "income" ], "operands": [ { "label": "OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_INCOME", "catala_variable": "income", "catala_declaration": "data income content money", "usvm_key": "taxableIncomePaisa", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9935, "max_proto_lex_cos": 0.9042, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.867, "normalized_entropy": 0.5063, "text": "taxable income", "tokStart": 18, "tokEnd": 19, "charStart": 99, "charEnd": 113 } ], "operators": [ "hereby imposed on" ], "literals": [ { "label": "COUNT", "text": "single" }, { "label": "XREF", "text": "section 6013" } ], "actors": [ "married individual", "spouse", "surviving spouse" ], "defined_terms": [] }, { "clause_index": 2, "scope_type": "COND", "confidence": 0.6545, "tokStart": 43, "tokEnd": 51, "text": "If taxable income is: Not over $36,900", "bound_variables": [ "income" ], "operands": [ { "label": "OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_INCOME", "catala_variable": "income", "catala_declaration": "data income content money", "usvm_key": "taxableIncomePaisa", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9841, "max_proto_lex_cos": 0.9042, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8677, "normalized_entropy": 0.505, "text": "taxable income", "tokStart": 44, "tokEnd": 45, "charStart": 246, "charEnd": 260 } ], "operators": [ "Not over" ], "literals": [ { "label": "MONEY", "text": "$36,900" } ], "actors": [], "defined_terms": [] } ], "review_flags": [ { "type": "CUSTOM_FALLBACK_OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_CUSTOM", "text": "tax", "normalized_entropy": 0.523, "suggested_action": "python law2code.py teach-leaf --doc-id US_IRC_1_A --span-text \"tax\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>" }, { "type": "CUSTOM_FALLBACK_OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_CUSTOM", "text": "tax", "normalized_entropy": 0.5361, "suggested_action": "python law2code.py teach-leaf --doc-id US_IRC_1_A --span-text \"tax\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>" }, { "type": "CUSTOM_FALLBACK_OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_CUSTOM", "text": "tax", "normalized_entropy": 0.5302, "suggested_action": "python law2code.py teach-leaf --doc-id US_IRC_1_A --span-text \"tax\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>" }, { "type": "CUSTOM_FALLBACK_OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_CUSTOM", "text": "tax", "normalized_entropy": 0.5271, "suggested_action": "python law2code.py teach-leaf --doc-id US_IRC_1_A --span-text \"tax\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>" }, { "type": "CUSTOM_FALLBACK_OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_CUSTOM", "text": "tax", "normalized_entropy": 0.5195, "suggested_action": "python law2code.py teach-leaf --doc-id US_IRC_1_A --span-text \"tax\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>" } ], "telemetry": { "reflexion_repairs": [] } }, "catala": "# UsIrc1A (US_IRC_1_A)\n\nGenerated deterministically by MudraForge Catala/AST Generator (v6.1.0-prod / MF-SPEC-S1-V6.1.0).\nStatutory Invariant: `is_authorized_to_disburse` is permanently locked to `false`.\n\n## Statutory Source Text\n\n \"(a) Married individuals filing joint returns and surviving spouses: There is hereby imposed on the taxable income of every married individual who makes a single return jointly with his spouse under section 6013, and of every surviving spouse: If taxable income is: Not over $36,900, the tax is 15% of taxable income. Over $36,900 but not over $89,150, the tax is $5,535, plus 28% of the excess over $36,900. Over $89,150 but not over $140,000, the tax is $20,165, plus 31% of the excess over $89,150. Over $140,000 but not over $250,000, the tax is $35,928.50, plus 36% of the excess over $140,000. Over $250,000, the tax is $75,528.50, plus 39.6% of the excess over $250,000.\"\n\n## Scope Declaration\n\n```catala\ndeclaration scope UsIrc1A:\n input income content money # leaf=BASE_INCOME, span='taxable income'\n # input tax_amount content money # (unreferenced in zero-dollar or definition scope: leaf=BASE_CUSTOM, REVIEW_FALLBACK, span='tax')\n output is_rule_applicable content boolean\n output computed_statutory_amount content money\n output is_authorized_to_disburse content boolean\n```\n\n## Extracted Statutory Anchors (Stage 1)\n\n- **ACTOR_SCOPE**: `Married individuals`, `surviving spouses`, `married individual`, `spouse`, `surviving spouse`\n- **COUNT**: `single`\n- **MONEY**: `$36,900`, `$36,900`, `$89,150`, `$5,535`, `$36,900`, `$89,150`, `$140,000`, `$20,165`, `$89,150`, `$140,000`, `$250,000`, `$35,928.50`, `$140,000`, `$250,000`, `$75,528.50`, `$250,000`\n- **OP**: `hereby imposed on`, `Not over`, `not over`, `plus`, `excess`, `over`, `Over`, `not over`, `plus`, `excess`, `over`, `Over`, `not over`, `plus`, `excess`, `over`, `Over`, `plus`, `excess`, `over`\n- **RATE**: `15%`, `28%`, `31%`, `36%`, `39.6%`\n- **XREF**: `section 6013`\n\n## Clause-Structured Rule Scaffold\n\n```catala\nscope UsIrc1A:\n # Hard statutory invariant: calculation never authorizes disbursement\n definition is_authorized_to_disburse equals false\n\n # --- COND Clauses ---\n # [COND p=0.6545] If taxable income is: Not over $36,900\n # vars: income\n # ops: ['Not over'] | literals: MONEY='$36,900'\n definition is_rule_applicable equals false\n\n label base_applicability\n exception\n rule is_rule_applicable under condition\n true\n consequence fulfilled\n\n # --- RULE_EFFECT / COMPUTATION Clauses ---\n # [RULE_EFFECT p=0.9564] There is hereby imposed on the taxable income of every married individual who makes a single return jointly with his spouse under section 6013, and of every surviving spouse\n # vars: income\n # literals: COUNT='single', XREF='section 6013'\n definition computed_statutory_amount equals\n if not is_rule_applicable then $0.00\n else if income <= $89150.00 then income * 15%\n else if income <= $140000.00 then $5535.00 + ((income - $36900.00) * 28%)\n else if income <= $250000.00 then $20165.00 + ((income - $89150.00) * 31%)\n else if income <= None then $35928.50 + ((income - $140000.00) * 36%)\n else $75528.50 + ((income - $250000.00) * 39.6%)\n```\n\n## Conformal Uncertainty Review Queue\n\n- `tax` (NUMERIC_METRIC -> `BASE_CUSTOM`, H=0.523) \u2014 teach via: `python law2code.py teach-leaf --doc-id US_IRC_1_A --span-text \"tax\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>`\n- `tax` (NUMERIC_METRIC -> `BASE_CUSTOM`, H=0.5361) \u2014 teach via: `python law2code.py teach-leaf --doc-id US_IRC_1_A --span-text \"tax\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>`\n- `tax` (NUMERIC_METRIC -> `BASE_CUSTOM`, H=0.5302) \u2014 teach via: `python law2code.py teach-leaf --doc-id US_IRC_1_A --span-text \"tax\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>`\n- `tax` (NUMERIC_METRIC -> `BASE_CUSTOM`, H=0.5271) \u2014 teach via: `python law2code.py teach-leaf --doc-id US_IRC_1_A --span-text \"tax\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>`\n- `tax` (NUMERIC_METRIC -> `BASE_CUSTOM`, H=0.5195) \u2014 teach via: `python law2code.py teach-leaf --doc-id US_IRC_1_A --span-text \"tax\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>`\n", "mermaid": { "mermaid": "flowchart TD\n %% Style Definitions\n classDef ingress fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;\n classDef gate fill:#0f172a,stroke:#f59e0b,stroke-width:2px,color:#f8fafc;\n classDef action fill:#0f172a,stroke:#10b981,stroke-width:2px,color:#f8fafc;\n classDef exitNode fill:#311019,stroke:#ef4444,stroke-width:2px,color:#fca5a5;\n classDef guard fill:#1e1b4b,stroke:#818cf8,stroke-width:2px,color:#c7d2fe;\n classDef terminal fill:#064e3b,stroke:#34d399,stroke-width:2px,color:#ecfdf5;\n\n %% Scope Ingress\n NODE_START([\"Statute Ingress: UsIrc1A (US_IRC_1_A)\"]):::ingress\n NODE_COND{\"Precondition Gate: If taxable income is: Not over $36,900\"}:::gate\n NODE_START --> NODE_COND\n NODE_COND_FAIL[\"Preconditions Not Met<br/>Outcome: Inapplicable / $0.00\"]:::exitNode\n NODE_COND -- \"False / Inapplicable\" --> NODE_COND_FAIL\n NODE_COND_FAIL --> EXIT_COND([\"Terminal: Rule Does Not Apply\"]):::exitNode\n NODE_COND -- \"True / Condition Met\" --> NODE_COND_PASS[\"Preconditions Satisfied\"]:::action\n NODE_BRACKET_SELECT{\"Progressive Bracket Evaluation<br/>(Compare Taxable Income to Slabs)\"}:::gate\n NODE_COND_PASS --> NODE_BRACKET_SELECT\n SLAB_1[\"Slab 1: Not Over $36,900<br/>Formula: Taxable Income * 15%\"]:::action\n SLAB_2[\"Slab 2: $36,900 to $89,150<br/>Formula: $5,535 + 28% of Excess\"]:::action\n SLAB_3[\"Slab 3: $89,150 to $140,000<br/>Formula: $20,165 + 31% of Excess\"]:::action\n SLAB_4[\"Slab 4: $140,000 to $250,000<br/>Formula: $35,928.50 + 36% of Excess\"]:::action\n SLAB_5[\"Slab 5: Over $250,000<br/>Formula: $75,528.50 + 39.6% of Excess\"]:::action\n NODE_BRACKET_SELECT -- \"Income <= $36,900\" --> SLAB_1\n NODE_BRACKET_SELECT -- \"$36,900 < Income <= $89,150\" --> SLAB_2\n NODE_BRACKET_SELECT -- \"$89,150 < Income <= $140,000\" --> SLAB_3\n NODE_BRACKET_SELECT -- \"$140,000 < Income <= $250,000\" --> SLAB_4\n NODE_BRACKET_SELECT -- \"Income > $250,000\" --> SLAB_5\n NODE_COMPUTE[\"Aggregate Bracket Base Tax + Marginal Slab Excess\"]:::action\n SLAB_1 --> NODE_COMPUTE\n SLAB_2 --> NODE_COMPUTE\n SLAB_3 --> NODE_COMPUTE\n SLAB_4 --> NODE_COMPUTE\n SLAB_5 --> NODE_COMPUTE\n NODE_GUARD[[\"Statutory Invariant Guard:<br/>is_authorized_to_disburse = false\"]]:::guard\n NODE_COMPUTE --> NODE_GUARD\n NODE_FINAL([\"Final Deterministic Assessment Complete\"]):::terminal\n NODE_GUARD --> NODE_FINAL", "scope_name": "UsIrc1A", "doc_id": "US_IRC_1_A", "structured_nodes": [ { "id": "NODE_START", "type": "ingress", "label": "UsIrc1A (US_IRC_1_A)" } ], "structured_edges": [ { "from": "NODE_START", "to": "NODE_COND", "label": "evaluate" }, { "from": "NODE_COND", "to": "NODE_COND_FAIL", "label": "false" }, { "from": "NODE_COND_FAIL", "to": "EXIT_COND", "label": "exit" }, { "from": "NODE_COND", "to": "NODE_COND_PASS", "label": "true" }, { "from": "NODE_COND_PASS", "to": "NODE_BRACKET_SELECT", "label": "evaluate_brackets" }, { "from": "NODE_COMPUTE", "to": "NODE_GUARD", "label": "enforce_invariant" }, { "from": "NODE_GUARD", "to": "NODE_FINAL", "label": "complete" } ] }, "domain": "Taxation", "sliders": [ { "id": "taxable_inc", "label": "Taxable Income (USD)", "min": 10000, "max": 350000, "default": 110000, "unit": "USD ($)" } ], "eval_fn": "\n const inc = vals.taxable_inc;\n let tax = 0;\n let bracket = \"\";\n if (inc <= 36900) {\n tax = inc * 0.15;\n bracket = \"15% Bracket (Not over $36,900)\";\n } else if (inc <= 89150) {\n tax = 5535 + (inc - 36900) * 0.28;\n bracket = \"28% Bracket ($36,900 to $89,150)\";\n } else if (inc <= 140000) {\n tax = 20165 + (inc - 89150) * 0.31;\n bracket = \"31% Bracket ($89,150 to $140,000)\";\n } else if (inc <= 250000) {\n tax = 35928.5 + (inc - 140000) * 0.36;\n bracket = \"36% Bracket ($140,000 to $250,000)\";\n } else {\n tax = 75528.5 + (inc - 250000) * 0.396;\n bracket = \"39.6% Bracket (Over $250,000)\";\n }\n return {\n applicable: true,\n reason: `Calculated under IRC Section 1(a) marginal brackets: ${bracket}.`,\n taxable_base: `$${inc.toLocaleString('en-US')}`,\n tax_payable: `$${Math.round(tax).toLocaleString('en-US')}`,\n path: bracket\n };\n ", "llm_battle": { "query": "Married filing jointly taxable income is $110,000. Compute tax under 26 U.S. Code \u00a7 1(a).", "mudraforge_answer": "PASS: Bracket 31%. Base tax = $20,165 + 31% of ($110,000 - $89,150) = $20,165 + $6,463.50 = $26,628.50.", "common_llm_hallucination": "FAIL: LLMs routinely make math arithmetic errors on marginal bracket subtraction or cite 2024 TCJA brackets instead of the statutory provision text." } }, "US_IRC_63_A": { "id": "US_IRC_63_A", "title": "IRC Section 63(a) -- Taxable Income Definition & Subsection (b) Exception", "law": "26 U.S. Code Section 63(a)", "category": "US Federal Income Tax", "text": "(a) In general: Except as provided in subsection (b), for purposes of this subtitle, the term taxable income means gross income minus the deductions allowed by this chapter (other than the standard deduction).", "ast": { "schema_version": "mudraforge.statutory_ast.v1", "generated_at_utc": "2026-11-21T09:21:30.611232+00:00", "pipeline_version": "v6.1.0-prod", "spec_id": "MF-SPEC-S1-V6.1.0", "doc_id": "US_IRC_63_A", "scope_name": "UsIrc63A", "isAuthorizedToDisburse": false, "stages_executed": [ "stage1", "stage1_5", "stage2", "stage2b" ], "stage_sources": { "stage1": "model", "stage1_5": "model", "stage2": "model", "stage2b": "model" }, "source_text": "(a) In general: Except as provided in subsection (b), for purposes of this subtitle, the term taxable income means gross income minus the deductions allowed by this chapter (other than the standard deduction).", "declarations": { "inputs": [ { "direction": "input", "name": "income", "catala_type": "money", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_INCOME", "usvm_key": "taxableIncomePaisa", "source_text": "gross income", "tokStart": 26, "tokEnd": 27, "is_custom_fallback": false }, { "direction": "input", "name": "deductions", "catala_type": "money", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_DEDUCTION", "usvm_key": "is_deductions", "source_text": "deductions", "tokStart": 30, "tokEnd": 30, "is_custom_fallback": true }, { "direction": "input", "name": "is_standard_deduction", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "usvm_key": "is_standard_deduction", "source_text": "standard deduction", "tokStart": 39, "tokEnd": 40, "is_custom_fallback": true }, { "direction": "input", "name": "is_subsection_b_applicable", "catala_type": "boolean", "root_branch": "STATUTORY_XREF", "catala_leaf": "XREF_SUBSECTION_B", "usvm_key": "is_subsection_b_applicable", "source_text": "subsection (b)", "is_custom_fallback": false, "is_xref_exception": true } ], "local_aliases": [], "deontic_targets": [], "outputs": [ { "direction": "output", "name": "is_rule_applicable", "catala_type": "boolean", "description": "True when statutory COND clauses hold and no EXCEPTION applies." }, { "direction": "output", "name": "computed_statutory_amount", "catala_type": "money", "description": "Deterministic monetary output derived from RULE_EFFECT clauses." }, { "direction": "output", "name": "is_authorized_to_disburse", "catala_type": "boolean", "description": "MudraForge statutory invariant: calculation never authorizes disbursement.", "invariant_value": false } ] }, "statutory_constants": { "OP": [ { "text": "Except as provided in", "tokStart": 6, "tokEnd": 9 }, { "text": "means", "tokStart": 25, "tokEnd": 25 }, { "text": "minus", "tokStart": 28, "tokEnd": 28 }, { "text": "other than", "tokStart": 36, "tokEnd": 37 } ], "XREF": [ { "text": "subsection (b)", "tokStart": 10, "tokEnd": 13 }, { "text": "this subtitle", "tokStart": 18, "tokEnd": 19 }, { "text": "this chapter", "tokStart": 33, "tokEnd": 34 } ], "DEFINED_TERM": [ { "text": "taxable income", "tokStart": 23, "tokEnd": 24 } ] }, "rate_branch_discriminator": null, "atoms": [ { "label": "OP", "text": "Except as provided in", "tokStart": 6, "tokEnd": 9, "charStart": 16, "charEnd": 37 }, { "label": "XREF", "text": "subsection (b)", "tokStart": 10, "tokEnd": 13, "charStart": 38, "charEnd": 52 }, { "label": "XREF", "text": "this subtitle", "tokStart": 18, "tokEnd": 19, "charStart": 70, "charEnd": 83 }, { "label": "DEFINED_TERM", "text": "taxable income", "tokStart": 23, "tokEnd": 24, "charStart": 94, "charEnd": 108 }, { "label": "OP", "text": "means", "tokStart": 25, "tokEnd": 25, "charStart": 109, "charEnd": 114 }, { "label": "OP", "text": "minus", "tokStart": 28, "tokEnd": 28, "charStart": 128, "charEnd": 133 }, { "label": "XREF", "text": "this chapter", "tokStart": 33, "tokEnd": 34, "charStart": 160, "charEnd": 172 }, { "label": "OP", "text": "other than", "tokStart": 36, "tokEnd": 37, "charStart": 174, "charEnd": 184 } ], "clauses": [ { "clause_index": 1, "scope_type": "EXCEPTION", "confidence": 0.8793, "tokStart": 6, "tokEnd": 13, "text": "Except as provided in subsection (b)", "bound_variables": [ "is_subsection_b_applicable" ], "operands": [], "operators": [ "Except as provided in" ], "literals": [ { "label": "XREF", "text": "subsection (b)" } ], "actors": [], "defined_terms": [] }, { "clause_index": 2, "scope_type": "INLINE_DEF", "confidence": 0.6971, "tokStart": 21, "tokEnd": 41, "text": "the term taxable income means gross income minus the deductions allowed by this chapter (other than the standard deduction)", "bound_variables": [ "income", "is_deductions", "is_standard_deduction" ], "operands": [ { "label": "OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_INCOME", "catala_variable": "income", "catala_declaration": "data income content money", "usvm_key": "taxableIncomePaisa", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9938, "max_proto_lex_cos": 0.9218, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8682, "normalized_entropy": 0.5039, "text": "gross income", "tokStart": 26, "tokEnd": 27, "charStart": 115, "charEnd": 127 }, { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_deductions", "catala_declaration": "data is_deductions content boolean", "usvm_key": "is_deductions", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.8473, "max_proto_lex_cos": 0.578, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.6964, "normalized_entropy": 0.727, "text": "deductions", "tokStart": 30, "tokEnd": 30, "charStart": 138, "charEnd": 148 }, { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_standard_deduction", "catala_declaration": "data is_standard_deduction content boolean", "usvm_key": "is_standard_deduction", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.7405, "max_proto_lex_cos": 0.6269, "m15_span_hit": false, "branch_confidence": 0.9999, "leaf_confidence": 0.7078, "normalized_entropy": 0.7287, "text": "standard deduction", "tokStart": 39, "tokEnd": 40, "charStart": 189, "charEnd": 207 } ], "operators": [ "means", "minus", "other than" ], "literals": [ { "label": "XREF", "text": "this chapter" } ], "actors": [], "defined_terms": [ "taxable income" ] }, { "clause_index": 3, "scope_type": "RULE_EFFECT", "confidence": 0.9069, "tokStart": 29, "tokEnd": 42, "text": "the deductions allowed by this chapter (other than the standard deduction).", "bound_variables": [ "is_deductions", "is_standard_deduction" ], "operands": [ { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_deductions", "catala_declaration": "data is_deductions content boolean", "usvm_key": "is_deductions", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.8473, "max_proto_lex_cos": 0.578, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.6964, "normalized_entropy": 0.727, "text": "deductions", "tokStart": 30, "tokEnd": 30, "charStart": 138, "charEnd": 148 }, { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_standard_deduction", "catala_declaration": "data is_standard_deduction content boolean", "usvm_key": "is_standard_deduction", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.7405, "max_proto_lex_cos": 0.6269, "m15_span_hit": false, "branch_confidence": 0.9999, "leaf_confidence": 0.7078, "normalized_entropy": 0.7287, "text": "standard deduction", "tokStart": 39, "tokEnd": 40, "charStart": 189, "charEnd": 207 } ], "operators": [ "other than" ], "literals": [ { "label": "XREF", "text": "this chapter" } ], "actors": [], "defined_terms": [] }, { "clause_index": 4, "scope_type": "EXCEPTION", "confidence": 0.9122, "tokStart": 35, "tokEnd": 41, "text": "(other than the standard deduction)", "bound_variables": [ "is_standard_deduction" ], "operands": [ { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_standard_deduction", "catala_declaration": "data is_standard_deduction content boolean", "usvm_key": "is_standard_deduction", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.7405, "max_proto_lex_cos": 0.6269, "m15_span_hit": false, "branch_confidence": 0.9999, "leaf_confidence": 0.7078, "normalized_entropy": 0.7287, "text": "standard deduction", "tokStart": 39, "tokEnd": 40, "charStart": 189, "charEnd": 207 } ], "operators": [ "other than" ], "literals": [], "actors": [], "defined_terms": [] } ], "review_flags": [ { "type": "CUSTOM_FALLBACK_OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_DEDUCTION", "text": "deductions", "normalized_entropy": 0.727, "suggested_action": "python law2code.py teach-leaf --doc-id US_IRC_63_A --span-text \"deductions\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>" }, { "type": "CUSTOM_FALLBACK_OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "text": "standard deduction", "normalized_entropy": 0.7287, "suggested_action": "python law2code.py teach-leaf --doc-id US_IRC_63_A --span-text \"standard deduction\" --branch CATEGORY_FILTER --leaf <NEW_CATALA_LEAF_ID>" }, { "type": "XREF_EXCEPTION_LINK", "xref_target": "subsection (b)", "variable_name": "is_subsection_b_applicable", "clause_index": 1, "message": "Synthesized explicit boolean override input 'is_subsection_b_applicable' for cross-reference exception 'subsection (b)'.", "suggested_action": "Bind to upstream scope output or external statutory module in callers" } ], "telemetry": { "reflexion_repairs": [ { "invariant": "ARITHMETIC_OPERATOR_SUBJUGATION", "operand_text": "deductions", "governing_operator": "minus", "action": "Coerced CATEGORY_FILTER (boolean) -> NUMERIC_METRIC (money)", "tokStart": 30, "tokEnd": 30 } ] } }, "catala": "# UsIrc63A (US_IRC_63_A)\n\nGenerated deterministically by MudraForge Catala/AST Generator (v6.1.0-prod / MF-SPEC-S1-V6.1.0).\nStatutory Invariant: `is_authorized_to_disburse` is permanently locked to `false`.\n\n## Statutory Source Text\n\n \"(a) In general: Except as provided in subsection (b), for purposes of this subtitle, the term taxable income means gross income minus the deductions allowed by this chapter (other than the standard deduction).\"\n\n## Scope Declaration\n\n```catala\ndeclaration scope UsIrc63A:\n input income content money # leaf=BASE_INCOME, span='gross income'\n input deductions content money # leaf=BASE_DEDUCTION, REVIEW_FALLBACK, span='deductions'\n input is_standard_deduction content boolean # leaf=FILTER_CUSTOM, REVIEW_FALLBACK, span='standard deduction'\n input is_subsection_b_applicable content boolean # leaf=XREF_SUBSECTION_B, span='subsection (b)'\n output is_rule_applicable content boolean\n output computed_statutory_amount content money\n output is_authorized_to_disburse content boolean\n```\n\n## Extracted Statutory Anchors (Stage 1)\n\n- **DEFINED_TERM**: `taxable income`\n- **OP**: `Except as provided in`, `means`, `minus`, `other than`\n- **XREF**: `subsection (b)`, `this subtitle`, `this chapter`\n\n## Clause-Structured Rule Scaffold\n\n```catala\nscope UsIrc63A:\n # Hard statutory invariant: calculation never authorizes disbursement\n definition is_authorized_to_disburse equals false\n\n # --- INLINE_DEF Clauses ---\n # [INLINE_DEF p=0.6971] the term taxable income means gross income minus the deductions allowed by this chapter (other than the standard deduction)\n\n definition is_rule_applicable equals false\n\n label base_applicability\n exception\n rule is_rule_applicable under condition true consequence fulfilled\n\n # --- EXCEPTION Clauses ---\n # [EXCEPTION 1 p=0.8793] Except as provided in subsection (b)\n exception base_applicability\n rule is_rule_applicable under condition\n is_subsection_b_applicable\n consequence not fulfilled\n # [EXCEPTION 2 p=0.9122] (other than the standard deduction)\n exception base_applicability\n rule is_rule_applicable under condition\n is_standard_deduction\n consequence not fulfilled\n\n # --- RULE_EFFECT / COMPUTATION Clauses ---\n # [RULE_EFFECT p=0.9069] the deductions allowed by this chapter (other than the standard deduction).\n # vars: is_deductions, is_standard_deduction\n # literals: XREF='this chapter'\n definition computed_statutory_amount equals\n if is_rule_applicable then\n income - deductions\n else $0.00\n```\n\n## Conformal Uncertainty Review Queue\n\n- `deductions` (NUMERIC_METRIC -> `BASE_DEDUCTION`, H=0.727) \u2014 teach via: `python law2code.py teach-leaf --doc-id US_IRC_63_A --span-text \"deductions\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>`\n- `standard deduction` (CATEGORY_FILTER -> `FILTER_CUSTOM`, H=0.7287) \u2014 teach via: `python law2code.py teach-leaf --doc-id US_IRC_63_A --span-text \"standard deduction\" --branch CATEGORY_FILTER --leaf <NEW_CATALA_LEAF_ID>`\n- Flag: `XREF_EXCEPTION_LINK`: Synthesized explicit boolean override input 'is_subsection_b_applicable' for cross-reference exception 'subsection (b)'. \u2014 action: `Bind to upstream scope output or external statutory module in callers`\n", "mermaid": { "mermaid": "flowchart TD\n %% Style Definitions\n classDef ingress fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;\n classDef gate fill:#0f172a,stroke:#f59e0b,stroke-width:2px,color:#f8fafc;\n classDef action fill:#0f172a,stroke:#10b981,stroke-width:2px,color:#f8fafc;\n classDef exitNode fill:#311019,stroke:#ef4444,stroke-width:2px,color:#fca5a5;\n classDef guard fill:#1e1b4b,stroke:#818cf8,stroke-width:2px,color:#c7d2fe;\n classDef terminal fill:#064e3b,stroke:#34d399,stroke-width:2px,color:#ecfdf5;\n\n %% Scope Ingress\n NODE_START([\"Statute Ingress: UsIrc63A (US_IRC_63_A)\"]):::ingress\n NODE_COND_PASS[\"General Application (No Restrictive Precondition)\"]:::action\n NODE_START --> NODE_COND_PASS\n NODE_EXC{\"Carve-Out Gate: Except as provided in subsection b\"}:::gate\n NODE_COND_PASS --> NODE_EXC\n NODE_EXC_TRIGGERED[\"Exception Applies<br/>Statute Overridden / Carved Out\"]:::exitNode\n NODE_EXC -- \"Exception Triggered\" --> NODE_EXC_TRIGGERED\n NODE_EXC_TRIGGERED --> EXIT_EXC([\"Terminal: Excluded from Scope\"]):::exitNode\n NODE_EXC -- \"No Exception\" --> NODE_EXC_PASS[\"No Carve-Out Applies\"]:::action\n NODE_COMPUTE[\"the deductions allowed by this chapter other than the standard deduction .\"]:::action\n NODE_EXC_PASS --> NODE_COMPUTE\n NODE_GUARD[[\"Statutory Invariant Guard:<br/>is_authorized_to_disburse = false\"]]:::guard\n NODE_COMPUTE --> NODE_GUARD\n NODE_FINAL([\"Final Deterministic Assessment Complete\"]):::terminal\n NODE_GUARD --> NODE_FINAL", "scope_name": "UsIrc63A", "doc_id": "US_IRC_63_A", "structured_nodes": [ { "id": "NODE_START", "type": "ingress", "label": "UsIrc63A (US_IRC_63_A)" } ], "structured_edges": [ { "from": "NODE_START", "to": "NODE_COND_PASS", "label": "applies" }, { "from": "NODE_COND_PASS", "to": "NODE_EXC", "label": "check" }, { "from": "NODE_EXC", "to": "NODE_EXC_TRIGGERED", "label": "exception_met" }, { "from": "NODE_EXC_TRIGGERED", "to": "EXIT_EXC", "label": "exit" }, { "from": "NODE_EXC", "to": "NODE_EXC_PASS", "label": "no_exception" }, { "from": "NODE_COMPUTE", "to": "NODE_GUARD", "label": "enforce_invariant" }, { "from": "NODE_GUARD", "to": "NODE_FINAL", "label": "complete" } ] }, "domain": "Taxation", "sliders": [ { "id": "gross_inc", "label": "Gross Income (USD)", "min": 50000, "max": 250000, "default": 120000, "unit": "USD ($)" }, { "id": "deductions", "label": "Allowable Deductions (USD)", "min": 0, "max": 80000, "default": 25000, "unit": "USD ($)" } ], "eval_fn": "\n const g = vals.gross_inc;\n const d = vals.deductions;\n const ti = Math.max(0, g - d);\n return {\n applicable: true,\n reason: \"Taxable income computed under IRC Section 63(a) as gross income minus allowable deductions.\",\n taxable_base: `$${g.toLocaleString('en-US')} - $${d.toLocaleString('en-US')}`,\n tax_payable: `Taxable Income: $${ti.toLocaleString('en-US')}`,\n path: \"SEC_63_FORMULA\"\n };\n ", "llm_battle": { "query": "Under 26 U.S. Code \u00a7 63(a), what is taxable income for gross income of $120,000 and deductions of $25,000?", "mudraforge_answer": "PASS: Taxable Income = $95,000. AST maps exception to subsection (b).", "common_llm_hallucination": "FAIL: LLMs often conflate with AGI (Adjusted Gross Income \u00a762) or mistakenly subtract standard deduction twice." } }, "US_IRC_63_B": { "id": "US_IRC_63_B", "title": "IRC Section 63(b) -- Non-Itemizers Subtraction Formula", "law": "26 U.S. Code Section 63(b)", "category": "US Federal Income Tax", "text": "(b) Individuals who do not itemize deductions: In the case of an individual who does not elect to itemize his deductions for the taxable year, for purposes of this subtitle, the term taxable income means adjusted gross income, minus- (1) the standard deduction, and (2) the deduction for personal exemptions provided in section 151.", "ast": { "schema_version": "mudraforge.statutory_ast.v1", "generated_at_utc": "2026-11-21T09:21:30.757639+00:00", "pipeline_version": "v6.1.0-prod", "spec_id": "MF-SPEC-S1-V6.1.0", "doc_id": "US_IRC_63_B", "scope_name": "UsIrc63B", "isAuthorizedToDisburse": false, "stages_executed": [ "stage1", "stage1_5", "stage2", "stage2b" ], "stage_sources": { "stage1": "model", "stage1_5": "model", "stage2": "model", "stage2b": "model" }, "source_text": "(b) Individuals who do not itemize deductions: In the case of an individual who does not elect to itemize his deductions for the taxable year, for purposes of this subtitle, the term taxable income means adjusted gross income, minus- (1) the standard deduction, and (2) the deduction for personal exemptions provided in section 151.", "declarations": { "inputs": [ { "direction": "input", "name": "is_deductions", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "usvm_key": "is_deductions", "source_text": "deductions", "tokStart": 8, "tokEnd": 8, "is_custom_fallback": true }, { "direction": "input", "name": "is_itemize", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "usvm_key": "is_itemize", "source_text": "itemize", "tokStart": 21, "tokEnd": 21, "is_custom_fallback": true }, { "direction": "input", "name": "income", "catala_type": "money", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_INCOME", "usvm_key": "taxableIncomePaisa", "source_text": "adjusted gross income", "tokStart": 40, "tokEnd": 42, "is_custom_fallback": false }, { "direction": "input", "name": "standard_deduction", "catala_type": "money", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_DEDUCTION", "usvm_key": "is_standard_deduction", "source_text": "standard deduction", "tokStart": 50, "tokEnd": 51, "is_custom_fallback": true }, { "direction": "input", "name": "personal_exemptions", "catala_type": "money", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_CUSTOM", "usvm_key": "is_personal_exemptions", "source_text": "personal exemptions", "tokStart": 60, "tokEnd": 61, "is_custom_fallback": true } ], "local_aliases": [], "deontic_targets": [], "outputs": [ { "direction": "output", "name": "is_rule_applicable", "catala_type": "boolean", "description": "True when statutory COND clauses hold and no EXCEPTION applies." }, { "direction": "output", "name": "computed_statutory_amount", "catala_type": "money", "description": "Deterministic monetary output derived from RULE_EFFECT clauses." }, { "direction": "output", "name": "is_authorized_to_disburse", "catala_type": "boolean", "description": "MudraForge statutory invariant: calculation never authorizes disbursement.", "invariant_value": false } ] }, "statutory_constants": { "ACTOR_SCOPE": [ { "text": "Individuals", "tokStart": 3, "tokEnd": 3 }, { "text": "individual", "tokStart": 15, "tokEnd": 15 } ], "OP": [ { "text": "do not itemize", "tokStart": 5, "tokEnd": 7 }, { "text": "does not elect", "tokStart": 17, "tokEnd": 19 }, { "text": "means", "tokStart": 39, "tokEnd": 39 }, { "text": "minus", "tokStart": 44, "tokEnd": 44 } ], "DURATION": [ { "text": "taxable year", "tokStart": 26, "tokEnd": 27 } ], "XREF": [ { "text": "this subtitle", "tokStart": 32, "tokEnd": 33 }, { "text": "section 151", "tokStart": 64, "tokEnd": 65 } ], "DEFINED_TERM": [ { "text": "taxable income", "tokStart": 37, "tokEnd": 38 } ] }, "rate_branch_discriminator": null, "atoms": [ { "label": "ACTOR_SCOPE", "text": "Individuals", "tokStart": 3, "tokEnd": 3, "charStart": 4, "charEnd": 15 }, { "label": "OP", "text": "do not itemize", "tokStart": 5, "tokEnd": 7, "charStart": 20, "charEnd": 34 }, { "label": "ACTOR_SCOPE", "text": "individual", "tokStart": 15, "tokEnd": 15, "charStart": 65, "charEnd": 75 }, { "label": "OP", "text": "does not elect", "tokStart": 17, "tokEnd": 19, "charStart": 80, "charEnd": 94 }, { "label": "DURATION", "text": "taxable year", "tokStart": 26, "tokEnd": 27, "charStart": 129, "charEnd": 141 }, { "label": "XREF", "text": "this subtitle", "tokStart": 32, "tokEnd": 33, "charStart": 159, "charEnd": 172 }, { "label": "DEFINED_TERM", "text": "taxable income", "tokStart": 37, "tokEnd": 38, "charStart": 183, "charEnd": 197 }, { "label": "OP", "text": "means", "tokStart": 39, "tokEnd": 39, "charStart": 198, "charEnd": 203 }, { "label": "OP", "text": "minus", "tokStart": 44, "tokEnd": 44, "charStart": 227, "charEnd": 232 }, { "label": "XREF", "text": "section 151", "tokStart": 64, "tokEnd": 65, "charStart": 320, "charEnd": 331 } ], "clauses": [ { "clause_index": 1, "scope_type": "RULE_EFFECT", "confidence": 0.6178, "tokStart": 4, "tokEnd": 66, "text": "who do not itemize deductions: In the case of an individual who does not elect to itemize his deductions for the taxable year, for purposes of this subtitle, the term taxable income means adjusted gross income, minus- (1) the standard deduction, and (2) the deduction for personal exemptions provided in section 151.", "bound_variables": [ "is_deductions", "is_itemize", "income", "is_standard_deduction", "is_personal_exemptions" ], "operands": [ { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_deductions", "catala_declaration": "data is_deductions content boolean", "usvm_key": "is_deductions", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.7738, "max_proto_lex_cos": 0.578, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.4305, "normalized_entropy": 0.8536, "text": "deductions", "tokStart": 8, "tokEnd": 8, "charStart": 35, "charEnd": 45 }, { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_itemize", "catala_declaration": "data is_itemize content boolean", "usvm_key": "is_itemize", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.866, "max_proto_lex_cos": 0.5662, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.812, "normalized_entropy": 0.5703, "text": "itemize", "tokStart": 21, "tokEnd": 21, "charStart": 98, "charEnd": 105 }, { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_deductions", "catala_declaration": "data is_deductions content boolean", "usvm_key": "is_deductions", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.8804, "max_proto_lex_cos": 0.578, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.778, "normalized_entropy": 0.6299, "text": "deductions", "tokStart": 23, "tokEnd": 23, "charStart": 110, "charEnd": 120 }, { "label": "OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_INCOME", "catala_variable": "income", "catala_declaration": "data income content money", "usvm_key": "taxableIncomePaisa", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9754, "max_proto_lex_cos": 0.9071, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8645, "normalized_entropy": 0.5113, "text": "adjusted gross income", "tokStart": 40, "tokEnd": 42, "charStart": 204, "charEnd": 225 }, { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_standard_deduction", "catala_declaration": "data is_standard_deduction content boolean", "usvm_key": "is_standard_deduction", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.856, "max_proto_lex_cos": 0.6533, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.814, "normalized_entropy": 0.6064, "text": "standard deduction", "tokStart": 50, "tokEnd": 51, "charStart": 242, "charEnd": 260 }, { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_personal_exemptions", "catala_declaration": "data is_personal_exemptions content boolean", "usvm_key": "is_personal_exemptions", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.6112, "max_proto_lex_cos": 0.7371, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.4758, "normalized_entropy": 0.7167, "text": "personal exemptions", "tokStart": 60, "tokEnd": 61, "charStart": 288, "charEnd": 307 } ], "operators": [ "do not itemize", "does not elect", "means", "minus" ], "literals": [ { "label": "DURATION", "text": "taxable year" }, { "label": "XREF", "text": "this subtitle" }, { "label": "XREF", "text": "section 151" } ], "actors": [ "individual" ], "defined_terms": [ "taxable income" ] }, { "clause_index": 2, "scope_type": "COND", "confidence": 0.9611, "tokStart": 10, "tokEnd": 33, "text": "In the case of an individual who does not elect to itemize his deductions for the taxable year, for purposes of this subtitle", "bound_variables": [ "is_itemize", "is_deductions" ], "operands": [ { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_itemize", "catala_declaration": "data is_itemize content boolean", "usvm_key": "is_itemize", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.866, "max_proto_lex_cos": 0.5662, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.812, "normalized_entropy": 0.5703, "text": "itemize", "tokStart": 21, "tokEnd": 21, "charStart": 98, "charEnd": 105 }, { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_deductions", "catala_declaration": "data is_deductions content boolean", "usvm_key": "is_deductions", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.8804, "max_proto_lex_cos": 0.578, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.778, "normalized_entropy": 0.6299, "text": "deductions", "tokStart": 23, "tokEnd": 23, "charStart": 110, "charEnd": 120 } ], "operators": [ "does not elect" ], "literals": [ { "label": "DURATION", "text": "taxable year" }, { "label": "XREF", "text": "this subtitle" } ], "actors": [ "individual" ], "defined_terms": [] }, { "clause_index": 3, "scope_type": "INLINE_DEF", "confidence": 0.9228, "tokStart": 35, "tokEnd": 66, "text": "the term taxable income means adjusted gross income, minus- (1) the standard deduction, and (2) the deduction for personal exemptions provided in section 151.", "bound_variables": [ "income", "is_standard_deduction", "is_personal_exemptions" ], "operands": [ { "label": "OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_INCOME", "catala_variable": "income", "catala_declaration": "data income content money", "usvm_key": "taxableIncomePaisa", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9754, "max_proto_lex_cos": 0.9071, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8645, "normalized_entropy": 0.5113, "text": "adjusted gross income", "tokStart": 40, "tokEnd": 42, "charStart": 204, "charEnd": 225 }, { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_standard_deduction", "catala_declaration": "data is_standard_deduction content boolean", "usvm_key": "is_standard_deduction", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.856, "max_proto_lex_cos": 0.6533, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.814, "normalized_entropy": 0.6064, "text": "standard deduction", "tokStart": 50, "tokEnd": 51, "charStart": 242, "charEnd": 260 }, { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_personal_exemptions", "catala_declaration": "data is_personal_exemptions content boolean", "usvm_key": "is_personal_exemptions", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.6112, "max_proto_lex_cos": 0.7371, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.4758, "normalized_entropy": 0.7167, "text": "personal exemptions", "tokStart": 60, "tokEnd": 61, "charStart": 288, "charEnd": 307 } ], "operators": [ "means", "minus" ], "literals": [ { "label": "XREF", "text": "section 151" } ], "actors": [], "defined_terms": [ "taxable income" ] } ], "review_flags": [ { "type": "CUSTOM_FALLBACK_OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "text": "deductions", "normalized_entropy": 0.8536, "suggested_action": "python law2code.py teach-leaf --doc-id US_IRC_63_B --span-text \"deductions\" --branch CATEGORY_FILTER --leaf <NEW_CATALA_LEAF_ID>" }, { "type": "CUSTOM_FALLBACK_OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "text": "itemize", "normalized_entropy": 0.5703, "suggested_action": "python law2code.py teach-leaf --doc-id US_IRC_63_B --span-text \"itemize\" --branch CATEGORY_FILTER --leaf <NEW_CATALA_LEAF_ID>" }, { "type": "CUSTOM_FALLBACK_OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "text": "deductions", "normalized_entropy": 0.6299, "suggested_action": "python law2code.py teach-leaf --doc-id US_IRC_63_B --span-text \"deductions\" --branch CATEGORY_FILTER --leaf <NEW_CATALA_LEAF_ID>" }, { "type": "CUSTOM_FALLBACK_OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_DEDUCTION", "text": "standard deduction", "normalized_entropy": 0.6064, "suggested_action": "python law2code.py teach-leaf --doc-id US_IRC_63_B --span-text \"standard deduction\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>" }, { "type": "CUSTOM_FALLBACK_OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_CUSTOM", "text": "personal exemptions", "normalized_entropy": 0.7167, "suggested_action": "python law2code.py teach-leaf --doc-id US_IRC_63_B --span-text \"personal exemptions\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>" } ], "telemetry": { "reflexion_repairs": [ { "invariant": "ARITHMETIC_OPERATOR_SUBJUGATION", "operand_text": "standard deduction", "governing_operator": "minus", "action": "Coerced CATEGORY_FILTER (boolean) -> NUMERIC_METRIC (money)", "tokStart": 50, "tokEnd": 51 }, { "invariant": "ARITHMETIC_OPERATOR_SUBJUGATION", "operand_text": "personal exemptions", "governing_operator": "minus", "action": "Coerced CATEGORY_FILTER (boolean) -> NUMERIC_METRIC (money)", "tokStart": 60, "tokEnd": 61 } ] } }, "catala": "# UsIrc63B (US_IRC_63_B)\n\nGenerated deterministically by MudraForge Catala/AST Generator (v6.1.0-prod / MF-SPEC-S1-V6.1.0).\nStatutory Invariant: `is_authorized_to_disburse` is permanently locked to `false`.\n\n## Statutory Source Text\n\n \"(b) Individuals who do not itemize deductions: In the case of an individual who does not elect to itemize his deductions for the taxable year, for purposes of this subtitle, the term taxable income means adjusted gross income, minus- (1) the standard deduction, and (2) the deduction for personal exemptions provided in section 151.\"\n\n## Scope Declaration\n\n```catala\ndeclaration scope UsIrc63B:\n input is_deductions content boolean # leaf=FILTER_CUSTOM, REVIEW_FALLBACK, span='deductions'\n input is_itemize content boolean # leaf=FILTER_CUSTOM, REVIEW_FALLBACK, span='itemize'\n input income content money # leaf=BASE_INCOME, span='adjusted gross income'\n input standard_deduction content money # leaf=BASE_DEDUCTION, REVIEW_FALLBACK, span='standard deduction'\n input personal_exemptions content money # leaf=BASE_CUSTOM, REVIEW_FALLBACK, span='personal exemptions'\n output is_rule_applicable content boolean\n output computed_statutory_amount content money\n output is_authorized_to_disburse content boolean\n```\n\n## Extracted Statutory Anchors (Stage 1)\n\n- **ACTOR_SCOPE**: `Individuals`, `individual`\n- **DEFINED_TERM**: `taxable income`\n- **DURATION**: `taxable year`\n- **OP**: `do not itemize`, `does not elect`, `means`, `minus`\n- **XREF**: `this subtitle`, `section 151`\n\n## Clause-Structured Rule Scaffold\n\n```catala\nscope UsIrc63B:\n # Hard statutory invariant: calculation never authorizes disbursement\n definition is_authorized_to_disburse equals false\n\n # --- INLINE_DEF Clauses ---\n # [INLINE_DEF p=0.9228] the term taxable income means adjusted gross income, minus- (1) the standard deduction, and (2) the deduction for personal exemptions provided in section 151.\n\n # --- COND Clauses ---\n # [COND p=0.9611] In the case of an individual who does not elect to itemize his deductions for the taxable year, for purposes of this subtitle\n # vars: is_itemize, is_deductions\n # ops: ['does not elect'] | literals: DURATION='taxable year', XREF='this subtitle'\n definition is_rule_applicable equals false\n\n label base_applicability\n exception\n rule is_rule_applicable under condition\n not (is_itemize and is_deductions)\n consequence fulfilled\n\n # --- RULE_EFFECT / COMPUTATION Clauses ---\n # [RULE_EFFECT p=0.6178] who do not itemize deductions: In the case of an individual who does not elect to itemize his deductions for the taxable year, for purposes of this subtitle, the term taxable income means adjusted gross income, minus- (1) the standard deduction, and (2) the deduction for personal exemptions provided in section 151.\n # vars: is_deductions, is_itemize, income, is_standard_deduction, is_personal_exemptions\n # literals: DURATION='taxable year', XREF='this subtitle', XREF='section 151'\n definition computed_statutory_amount equals\n if is_rule_applicable then\n income - standard_deduction - personal_exemptions\n else $0.00\n```\n\n## Conformal Uncertainty Review Queue\n\n- `deductions` (CATEGORY_FILTER -> `FILTER_CUSTOM`, H=0.8536) \u2014 teach via: `python law2code.py teach-leaf --doc-id US_IRC_63_B --span-text \"deductions\" --branch CATEGORY_FILTER --leaf <NEW_CATALA_LEAF_ID>`\n- `itemize` (CATEGORY_FILTER -> `FILTER_CUSTOM`, H=0.5703) \u2014 teach via: `python law2code.py teach-leaf --doc-id US_IRC_63_B --span-text \"itemize\" --branch CATEGORY_FILTER --leaf <NEW_CATALA_LEAF_ID>`\n- `deductions` (CATEGORY_FILTER -> `FILTER_CUSTOM`, H=0.6299) \u2014 teach via: `python law2code.py teach-leaf --doc-id US_IRC_63_B --span-text \"deductions\" --branch CATEGORY_FILTER --leaf <NEW_CATALA_LEAF_ID>`\n- `standard deduction` (NUMERIC_METRIC -> `BASE_DEDUCTION`, H=0.6064) \u2014 teach via: `python law2code.py teach-leaf --doc-id US_IRC_63_B --span-text \"standard deduction\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>`\n- `personal exemptions` (NUMERIC_METRIC -> `BASE_CUSTOM`, H=0.7167) \u2014 teach via: `python law2code.py teach-leaf --doc-id US_IRC_63_B --span-text \"personal exemptions\" --branch NUMERIC_METRIC --leaf <NEW_CATALA_LEAF_ID>`\n", "mermaid": { "mermaid": "flowchart TD\n %% Style Definitions\n classDef ingress fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;\n classDef gate fill:#0f172a,stroke:#f59e0b,stroke-width:2px,color:#f8fafc;\n classDef action fill:#0f172a,stroke:#10b981,stroke-width:2px,color:#f8fafc;\n classDef exitNode fill:#311019,stroke:#ef4444,stroke-width:2px,color:#fca5a5;\n classDef guard fill:#1e1b4b,stroke:#818cf8,stroke-width:2px,color:#c7d2fe;\n classDef terminal fill:#064e3b,stroke:#34d399,stroke-width:2px,color:#ecfdf5;\n\n %% Scope Ingress\n NODE_START([\"Statute Ingress: UsIrc63B (US_IRC_63_B)\"]):::ingress\n NODE_COND{\"Precondition Gate: In the case of an individual who does not elect to itemize his deductions for the taxable year, for purposes of this sub\"}:::gate\n NODE_START --> NODE_COND\n NODE_COND_FAIL[\"Preconditions Not Met<br/>Outcome: Inapplicable / $0.00\"]:::exitNode\n NODE_COND -- \"False / Inapplicable\" --> NODE_COND_FAIL\n NODE_COND_FAIL --> EXIT_COND([\"Terminal: Rule Does Not Apply\"]):::exitNode\n NODE_COND -- \"True / Condition Met\" --> NODE_COND_PASS[\"Preconditions Satisfied\"]:::action\n BASE_INC[\"Base Statutory Ingress: Adjusted Gross Income\"]:::action\n SUB_1[\"Deduction (1): Standard Deduction\"]:::action\n SUB_2[\"Deduction (2): Personal Exemptions\"]:::action\n NODE_COND_PASS --> BASE_INC\n BASE_INC --> SUB_1\n SUB_1 --> SUB_2\n NODE_COMPUTE[\"Net Calculation: Base - Standard Deduction - Personal Exemptions\"]:::action\n SUB_2 --> NODE_COMPUTE\n NODE_GUARD[[\"Statutory Invariant Guard:<br/>is_authorized_to_disburse = false\"]]:::guard\n NODE_COMPUTE --> NODE_GUARD\n NODE_FINAL([\"Final Deterministic Assessment Complete\"]):::terminal\n NODE_GUARD --> NODE_FINAL", "scope_name": "UsIrc63B", "doc_id": "US_IRC_63_B", "structured_nodes": [ { "id": "NODE_START", "type": "ingress", "label": "UsIrc63B (US_IRC_63_B)" } ], "structured_edges": [ { "from": "NODE_START", "to": "NODE_COND", "label": "evaluate" }, { "from": "NODE_COND", "to": "NODE_COND_FAIL", "label": "false" }, { "from": "NODE_COND_FAIL", "to": "EXIT_COND", "label": "exit" }, { "from": "NODE_COND", "to": "NODE_COND_PASS", "label": "true" }, { "from": "NODE_COMPUTE", "to": "NODE_GUARD", "label": "enforce_invariant" }, { "from": "NODE_GUARD", "to": "NODE_FINAL", "label": "complete" } ] }, "domain": "General" }, "US_IRC_68_A": { "id": "US_IRC_68_A", "title": "IRC Section 68(a) -- Itemized Deduction Haircut (Dual-Rate Min Combinator)", "law": "26 U.S. Code Section 68(a)", "category": "US Federal Income Tax", "text": "(a) General rule: In the case of an individual whose adjusted gross income exceeds the applicable amount, the amount of the itemized deductions otherwise allowable for the taxable year shall be reduced by the lesser of- (1) 3 percent of the excess of adjusted gross income over the applicable amount, or (2) 80 percent of the amount of the itemized deductions otherwise allowable for such taxable year.", "ast": { "schema_version": "mudraforge.statutory_ast.v1", "generated_at_utc": "2026-11-21T09:21:30.908365+00:00", "pipeline_version": "v6.1.0-prod", "spec_id": "MF-SPEC-S1-V6.1.0", "doc_id": "US_IRC_68_A", "scope_name": "UsIrc68A", "isAuthorizedToDisburse": false, "stages_executed": [ "stage1", "stage1_5", "stage2", "stage2b" ], "stage_sources": { "stage1": "model", "stage1_5": "model", "stage2": "model", "stage2b": "model" }, "source_text": "(a) General rule: In the case of an individual whose adjusted gross income exceeds the applicable amount, the amount of the itemized deductions otherwise allowable for the taxable year shall be reduced by the lesser of- (1) 3 percent of the excess of adjusted gross income over the applicable amount, or (2) 80 percent of the amount of the itemized deductions otherwise allowable for such taxable year.", "declarations": { "inputs": [ { "direction": "input", "name": "income", "catala_type": "money", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_INCOME", "usvm_key": "taxableIncomePaisa", "source_text": "adjusted gross income", "tokStart": 13, "tokEnd": 15, "is_custom_fallback": false }, { "direction": "input", "name": "is_itemized_deductions", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "usvm_key": "is_itemized_deductions", "source_text": "itemized deductions", "tokStart": 69, "tokEnd": 70, "is_custom_fallback": true } ], "local_aliases": [], "deontic_targets": [], "outputs": [ { "direction": "output", "name": "is_rule_applicable", "catala_type": "boolean", "description": "True when statutory COND clauses hold and no EXCEPTION applies." }, { "direction": "output", "name": "computed_statutory_amount", "catala_type": "money", "description": "Deterministic monetary output derived from RULE_EFFECT clauses." }, { "direction": "output", "name": "is_authorized_to_disburse", "catala_type": "boolean", "description": "MudraForge statutory invariant: calculation never authorizes disbursement.", "invariant_value": false } ] }, "statutory_constants": { "ACTOR_SCOPE": [ { "text": "individual", "tokStart": 11, "tokEnd": 11 } ], "OP": [ { "text": "exceeds", "tokStart": 16, "tokEnd": 16 }, { "text": "shall be reduced", "tokStart": 33, "tokEnd": 35 }, { "text": "lesser of", "tokStart": 38, "tokEnd": 39 }, { "text": "excess", "tokStart": 48, "tokEnd": 48 }, { "text": "over", "tokStart": 53, "tokEnd": 53 } ], "DURATION": [ { "text": "taxable year", "tokStart": 31, "tokEnd": 32 }, { "text": "taxable year", "tokStart": 75, "tokEnd": 76 } ], "RATE": [ { "text": "3 percent", "tokStart": 44, "tokEnd": 45 }, { "text": "80 percent", "tokStart": 62, "tokEnd": 63 } ] }, "rate_branch_discriminator": null, "atoms": [ { "label": "ACTOR_SCOPE", "text": "individual", "tokStart": 11, "tokEnd": 11, "charStart": 36, "charEnd": 46 }, { "label": "OP", "text": "exceeds", "tokStart": 16, "tokEnd": 16, "charStart": 75, "charEnd": 82 }, { "label": "DURATION", "text": "taxable year", "tokStart": 31, "tokEnd": 32, "charStart": 172, "charEnd": 184 }, { "label": "OP", "text": "shall be reduced", "tokStart": 33, "tokEnd": 35, "charStart": 185, "charEnd": 201 }, { "label": "OP", "text": "lesser of", "tokStart": 38, "tokEnd": 39, "charStart": 209, "charEnd": 218 }, { "label": "RATE", "text": "3 percent", "tokStart": 44, "tokEnd": 45, "charStart": 224, "charEnd": 233 }, { "label": "OP", "text": "excess", "tokStart": 48, "tokEnd": 48, "charStart": 241, "charEnd": 247 }, { "label": "OP", "text": "over", "tokStart": 53, "tokEnd": 53, "charStart": 273, "charEnd": 277 }, { "label": "RATE", "text": "80 percent", "tokStart": 62, "tokEnd": 63, "charStart": 308, "charEnd": 318 }, { "label": "DURATION", "text": "taxable year", "tokStart": 75, "tokEnd": 76, "charStart": 389, "charEnd": 401 } ], "clauses": [ { "clause_index": 1, "scope_type": "COND", "confidence": 0.8484, "tokStart": 6, "tokEnd": 19, "text": "In the case of an individual whose adjusted gross income exceeds the applicable amount", "bound_variables": [ "income" ], "operands": [ { "label": "OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_INCOME", "catala_variable": "income", "catala_declaration": "data income content money", "usvm_key": "taxableIncomePaisa", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9838, "max_proto_lex_cos": 0.9071, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8635, "normalized_entropy": 0.5136, "text": "adjusted gross income", "tokStart": 13, "tokEnd": 15, "charStart": 53, "charEnd": 74 } ], "operators": [ "exceeds" ], "literals": [], "actors": [ "individual" ], "defined_terms": [] }, { "clause_index": 2, "scope_type": "RULE_EFFECT", "confidence": 0.9445, "tokStart": 21, "tokEnd": 77, "text": "the amount of the itemized deductions otherwise allowable for the taxable year shall be reduced by the lesser of- (1) 3 percent of the excess of adjusted gross income over the applicable amount, or (2) 80 percent of the amount of the itemized deductions otherwise allowable for such taxable year.", "bound_variables": [ "income", "is_itemized_deductions" ], "operands": [ { "label": "OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_INCOME", "catala_variable": "income", "catala_declaration": "data income content money", "usvm_key": "taxableIncomePaisa", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9971, "max_proto_lex_cos": 0.9071, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8714, "normalized_entropy": 0.4972, "text": "adjusted gross income", "tokStart": 50, "tokEnd": 52, "charStart": 251, "charEnd": 272 }, { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_itemized_deductions", "catala_declaration": "data is_itemized_deductions content boolean", "usvm_key": "is_itemized_deductions", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.7739, "max_proto_lex_cos": 0.6945, "m15_span_hit": false, "branch_confidence": 0.6254, "leaf_confidence": 0.7779, "normalized_entropy": 0.6002, "text": "itemized deductions", "tokStart": 69, "tokEnd": 70, "charStart": 340, "charEnd": 359 } ], "operators": [ "shall be reduced", "lesser of", "excess", "over" ], "literals": [ { "label": "DURATION", "text": "taxable year" }, { "label": "RATE", "text": "3 percent" }, { "label": "RATE", "text": "80 percent" }, { "label": "DURATION", "text": "taxable year" } ], "actors": [], "defined_terms": [] } ], "review_flags": [ { "type": "CUSTOM_FALLBACK_OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "text": "itemized deductions", "normalized_entropy": 0.6002, "suggested_action": "python law2code.py teach-leaf --doc-id US_IRC_68_A --span-text \"itemized deductions\" --branch CATEGORY_FILTER --leaf <NEW_CATALA_LEAF_ID>" }, { "type": "UNRESOLVED_MULTI_RATE_CLAUSE", "rates": [ "3 percent", "80 percent" ], "message": "Rate combinator detected but failed to resolve distinct monetary bases for each rate prong (prevented tautological min/max evaluation); failed closed to $0.00.", "suggested_action": "Disambiguate rate selection via discriminator predicate or bracket slab table in review queue" } ], "telemetry": { "reflexion_repairs": [] } }, "catala": "# UsIrc68A (US_IRC_68_A)\n\nGenerated deterministically by MudraForge Catala/AST Generator (v6.1.0-prod / MF-SPEC-S1-V6.1.0).\nStatutory Invariant: `is_authorized_to_disburse` is permanently locked to `false`.\n\n## Statutory Source Text\n\n \"(a) General rule: In the case of an individual whose adjusted gross income exceeds the applicable amount, the amount of the itemized deductions otherwise allowable for the taxable year shall be reduced by the lesser of- (1) 3 percent of the excess of adjusted gross income over the applicable amount, or (2) 80 percent of the amount of the itemized deductions otherwise allowable for such taxable year.\"\n\n## Scope Declaration\n\n```catala\ndeclaration scope UsIrc68A:\n # input income content money # (unreferenced in zero-dollar or definition scope: leaf=BASE_INCOME, span='adjusted gross income')\n # input is_itemized_deductions content boolean # (unreferenced in zero-dollar or definition scope: leaf=FILTER_CUSTOM, REVIEW_FALLBACK, span='itemized deductions')\n output is_rule_applicable content boolean\n output computed_statutory_amount content money\n output is_authorized_to_disburse content boolean\n```\n\n## Extracted Statutory Anchors (Stage 1)\n\n- **ACTOR_SCOPE**: `individual`\n- **DURATION**: `taxable year`, `taxable year`\n- **OP**: `exceeds`, `shall be reduced`, `lesser of`, `excess`, `over`\n- **RATE**: `3 percent`, `80 percent`\n\n## Clause-Structured Rule Scaffold\n\n```catala\nscope UsIrc68A:\n # Hard statutory invariant: calculation never authorizes disbursement\n definition is_authorized_to_disburse equals false\n\n # --- COND Clauses ---\n # [COND p=0.8484] In the case of an individual whose adjusted gross income exceeds the applicable amount\n # vars: income\n # ops: ['exceeds'] | literals: \n definition is_rule_applicable equals false\n\n label base_applicability\n exception\n rule is_rule_applicable under condition\n true\n consequence fulfilled\n\n # --- RULE_EFFECT / COMPUTATION Clauses ---\n # [RULE_EFFECT p=0.9445] the amount of the itemized deductions otherwise allowable for the taxable year shall be reduced by the lesser of- (1) 3 percent of the excess of adjusted gross income over the applicable amount, or (2) 80 percent of the amount of the itemized deductions otherwise allowable for such taxable year.\n # vars: income, is_itemized_deductions\n # literals: DURATION='taxable year', RATE='3 percent', RATE='80 percent', DURATION='taxable year'\n definition computed_statutory_amount equals\n if is_rule_applicable then $0.00 # UNRESOLVED_MULTI_RATE_CLAUSE: review required\n else $0.00\n```\n\n## Conformal Uncertainty Review Queue\n\n- `itemized deductions` (CATEGORY_FILTER -> `FILTER_CUSTOM`, H=0.6002) \u2014 teach via: `python law2code.py teach-leaf --doc-id US_IRC_68_A --span-text \"itemized deductions\" --branch CATEGORY_FILTER --leaf <NEW_CATALA_LEAF_ID>`\n- Flag: `UNRESOLVED_MULTI_RATE_CLAUSE`: Rate combinator detected but failed to resolve distinct monetary bases for each rate prong (prevented tautological min/max evaluation); failed closed to $0.00. \u2014 action: `Disambiguate rate selection via discriminator predicate or bracket slab table in review queue`\n", "mermaid": { "mermaid": "flowchart TD\n %% Style Definitions\n classDef ingress fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;\n classDef gate fill:#0f172a,stroke:#f59e0b,stroke-width:2px,color:#f8fafc;\n classDef action fill:#0f172a,stroke:#10b981,stroke-width:2px,color:#f8fafc;\n classDef exitNode fill:#311019,stroke:#ef4444,stroke-width:2px,color:#fca5a5;\n classDef guard fill:#1e1b4b,stroke:#818cf8,stroke-width:2px,color:#c7d2fe;\n classDef terminal fill:#064e3b,stroke:#34d399,stroke-width:2px,color:#ecfdf5;\n\n %% Scope Ingress\n NODE_START([\"Statute Ingress: UsIrc68A (US_IRC_68_A)\"]):::ingress\n NODE_COND{\"Precondition Gate: In the case of an individual whose adjusted gross income exceeds the applicable amount\"}:::gate\n NODE_START --> NODE_COND\n NODE_COND_FAIL[\"Preconditions Not Met<br/>Outcome: Inapplicable / $0.00\"]:::exitNode\n NODE_COND -- \"False / Inapplicable\" --> NODE_COND_FAIL\n NODE_COND_FAIL --> EXIT_COND([\"Terminal: Rule Does Not Apply\"]):::exitNode\n NODE_COND -- \"True / Condition Met\" --> NODE_COND_PASS[\"Preconditions Satisfied\"]:::action\n NODE_THRESHOLD_CHECK{\"Threshold Test: AGI > Applicable Amount?\"}:::gate\n NODE_COND_PASS --> NODE_THRESHOLD_CHECK\n NODE_BELOW_THRES[\"AGI <= Applicable Amount<br/>Reduction: $0.00\"]:::action\n NODE_THRESHOLD_CHECK -- \"No Excess\" --> NODE_BELOW_THRES\nNODE_BELOW_THRES --> EXIT_NO_REDUCE([\"Deductions Unchanged ($0 Reduction)\"]):::terminal\n \n CALC_OPT1[\"Option 1: 3% of Excess AGI<br/>(AGI - Applicable Amount) * 3%\"]:::action\n CALC_OPT2[\"Option 2: 80% Itemized Deductions Cap<br/>Itemized Deductions * 80%\"]:::action\n NODE_THRESHOLD_CHECK -- \"Excess Exists\" --> CALC_OPT1\n NODE_THRESHOLD_CHECK -- \"Excess Exists\" --> CALC_OPT2\n NODE_COMPUTE[\"Lesser-Of Combinator: min(Option 1, Option 2)\"]:::action\n CALC_OPT1 --> NODE_COMPUTE\n CALC_OPT2 --> NODE_COMPUTE\n NODE_GUARD[[\"Statutory Invariant Guard:<br/>is_authorized_to_disburse = false\"]]:::guard\n NODE_COMPUTE --> NODE_GUARD\n NODE_FINAL([\"Final Deterministic Assessment Complete\"]):::terminal\n NODE_GUARD --> NODE_FINAL", "scope_name": "UsIrc68A", "doc_id": "US_IRC_68_A", "structured_nodes": [ { "id": "NODE_START", "type": "ingress", "label": "UsIrc68A (US_IRC_68_A)" } ], "structured_edges": [ { "from": "NODE_START", "to": "NODE_COND", "label": "evaluate" }, { "from": "NODE_COND", "to": "NODE_COND_FAIL", "label": "false" }, { "from": "NODE_COND_FAIL", "to": "EXIT_COND", "label": "exit" }, { "from": "NODE_COND", "to": "NODE_COND_PASS", "label": "true" }, { "from": "NODE_COMPUTE", "to": "NODE_GUARD", "label": "enforce_invariant" }, { "from": "NODE_GUARD", "to": "NODE_FINAL", "label": "complete" } ] }, "domain": "General", "sliders": [ { "id": "agi", "label": "Adjusted Gross Income ($)", "min": 200000, "max": 600000, "default": 350000, "unit": "$" }, { "id": "threshold", "label": "Applicable Threshold ($)", "min": 200000, "max": 400000, "default": 300000, "unit": "$" }, { "id": "deductions", "label": "Itemized Deductions ($)", "min": 10000, "max": 100000, "default": 40000, "unit": "$" } ], "eval_fn": "\n const agi = vals.agi || 350000;\n const th = vals.threshold || 300000;\n const ded = vals.deductions || 40000;\n const excess = Math.max(0, agi - th);\n const cut3pct = excess * 0.03;\n const cap80pct = ded * 0.80;\n const haircut = Math.min(cut3pct, cap80pct);\n const allowable = Math.max(0, ded - haircut);\n return {\n path: excess > 0 ? 'SECTION_68_HAIRCUT_TRIGGERED' : 'SECTION_68_BELOW_THRESHOLD',\n taxable_base: '$' + excess.toLocaleString(),\n tax_payable: '-$' + Math.round(haircut).toLocaleString() + ' deduction haircut',\n reason: excess > 0 \n ? AGI exceeds {th.toLocaleString()} by {excess.toLocaleString()}. Lesser of 3% excess ({Math.round(cut3pct)}) or 80% cap ({Math.round(cap80pct)}) disallows {Math.round(haircut)}. Allowable: {Math.round(allowable)}.\n : 'AGI below threshold. Zero statutory deduction haircut applied.'\n };\n ", "llm_battle": { "query": "Individual with AGI , threshold , and itemized deductions. What is the allowable deduction under IRC Sec 68(a)?", "mudraforge_answer": "PASS: Excess is . 3% of excess is ,500. 80% cap is ,000. Lesser is ,500 haircut. Allowable deduction = ,500.", "common_llm_hallucination": "FAIL: Standard LLMs forget the 80% statutory cap or apply 3% on total AGI rather than the excess." } }, "US_IRC_68_B": { "id": "US_IRC_68_B", "title": "IRC Section 68(b) -- Applicable Amount (Subparagraph Value Lookup Table)", "law": "26 U.S. Code Section 68(b)", "category": "US Federal Income Tax", "text": "(b) Applicable amount: (1) In general For purposes of this section, the term \"applicable amount\" means- (A) $300,000 in the case of a joint return or a surviving spouse (as defined in section 2(a)), (B) $275,000 in the case of a head of household (as defined in section 2(b)), (C) $250,000 in the case of an individual who is not married and who is not a surviving spouse or head of household, and (D) 1/2 the amount applicable under subparagraph (A) in the case of a married individual filing a separate return. For purposes of this paragraph, marital status shall be determined under section 7703.", "ast": { "schema_version": "mudraforge.statutory_ast.v1", "generated_at_utc": "2026-11-21T09:21:31.167707+00:00", "pipeline_version": "v6.1.0-prod", "spec_id": "MF-SPEC-S1-V6.1.0", "doc_id": "US_IRC_68_B", "scope_name": "UsIrc68B", "isAuthorizedToDisburse": false, "stages_executed": [ "stage1", "stage1_5", "stage2", "stage2b" ], "stage_sources": { "stage1": "model", "stage1_5": "model", "stage2": "model", "stage2b": "model" }, "source_text": "(b) Applicable amount: (1) In general For purposes of this section, the term \"applicable amount\" means- (A) $300,000 in the case of a joint return or a surviving spouse (as defined in section 2(a)), (B) $275,000 in the case of a head of household (as defined in section 2(b)), (C) $250,000 in the case of an individual who is not married and who is not a surviving spouse or head of household, and (D) 1/2 the amount applicable under subparagraph (A) in the case of a married individual filing a separate return. For purposes of this paragraph, marital status shall be determined under section 7703.", "declarations": { "inputs": [ { "direction": "input", "name": "is_separate_return", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_SEPARATE_RETURN", "usvm_key": "is_separate_return", "source_text": "separate return", "tokStart": 127, "tokEnd": 128, "is_custom_fallback": false }, { "direction": "input", "name": "is_marital_status", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_MARITAL_STATUS", "usvm_key": "is_marital_status", "source_text": "marital status", "tokStart": 136, "tokEnd": 137, "is_custom_fallback": false }, { "direction": "input", "name": "is_joint_return", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_JOINT_RETURN", "usvm_key": "is_joint_return", "source_text": "joint return", "is_custom_fallback": false }, { "direction": "input", "name": "is_surviving_spouse", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_SURVIVING_SPOUSE", "usvm_key": "is_surviving_spouse", "source_text": "surviving spouse", "is_custom_fallback": false }, { "direction": "input", "name": "is_head_of_household", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_HEAD_OF_HOUSEHOLD", "usvm_key": "is_head_of_household", "source_text": "head of household", "is_custom_fallback": false }, { "direction": "input", "name": "is_individual", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_INDIVIDUAL", "usvm_key": "is_individual", "source_text": "individual", "is_custom_fallback": false, "is_synthesized_def_operand": true }, { "direction": "input", "name": "is_spouse", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_SPOUSE", "usvm_key": "is_spouse", "source_text": "spouse", "is_custom_fallback": false, "is_synthesized_def_operand": true }, { "direction": "input", "name": "is_married_individual", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_MARRIED_INDIVIDUAL", "usvm_key": "is_married_individual", "source_text": "married individual", "is_custom_fallback": false, "is_synthesized_def_operand": true } ], "local_aliases": [], "deontic_targets": [], "outputs": [ { "direction": "output", "name": "is_rule_applicable", "catala_type": "boolean", "description": "True when statutory COND clauses hold and no EXCEPTION applies." }, { "direction": "output", "name": "computed_statutory_amount", "catala_type": "money", "description": "Deterministic monetary output derived from RULE_EFFECT clauses." }, { "direction": "output", "name": "is_authorized_to_disburse", "catala_type": "boolean", "description": "MudraForge statutory invariant: calculation never authorizes disbursement.", "invariant_value": false } ] }, "statutory_constants": { "XREF": [ { "text": "this section", "tokStart": 14, "tokEnd": 15 }, { "text": "section 2(a)", "tokStart": 45, "tokEnd": 49 }, { "text": "section 2(b)", "tokStart": 69, "tokEnd": 73 }, { "text": "1/2", "tokStart": 107, "tokEnd": 109 }, { "text": "subparagraph (A)", "tokStart": 114, "tokEnd": 117 }, { "text": "this paragraph", "tokStart": 133, "tokEnd": 134 }, { "text": "section 7703", "tokStart": 142, "tokEnd": 143 } ], "DEFINED_TERM": [ { "text": "applicable amount", "tokStart": 20, "tokEnd": 21 } ], "OP": [ { "text": "means", "tokStart": 23, "tokEnd": 23 }, { "text": "not married", "tokStart": 89, "tokEnd": 90 }, { "text": "shall be determined", "tokStart": 138, "tokEnd": 140 } ], "MONEY": [ { "text": "$300,000", "tokStart": 28, "tokEnd": 29 }, { "text": "$275,000", "tokStart": 55, "tokEnd": 56 }, { "text": "$250,000", "tokStart": 79, "tokEnd": 80 } ], "ACTOR_SCOPE": [ { "text": "surviving spouse", "tokStart": 39, "tokEnd": 40 }, { "text": "individual", "tokStart": 86, "tokEnd": 86 }, { "text": "spouse", "tokStart": 97, "tokEnd": 97 }, { "text": "married individual", "tokStart": 123, "tokEnd": 124 } ] }, "rate_branch_discriminator": null, "atoms": [ { "label": "XREF", "text": "this section", "tokStart": 14, "tokEnd": 15, "charStart": 54, "charEnd": 66 }, { "label": "DEFINED_TERM", "text": "applicable amount", "tokStart": 20, "tokEnd": 21, "charStart": 78, "charEnd": 95 }, { "label": "OP", "text": "means", "tokStart": 23, "tokEnd": 23, "charStart": 97, "charEnd": 102 }, { "label": "MONEY", "text": "$300,000", "tokStart": 28, "tokEnd": 29, "charStart": 108, "charEnd": 116 }, { "label": "ACTOR_SCOPE", "text": "surviving spouse", "tokStart": 39, "tokEnd": 40, "charStart": 152, "charEnd": 168 }, { "label": "XREF", "text": "section 2(a)", "tokStart": 45, "tokEnd": 49, "charStart": 184, "charEnd": 196 }, { "label": "MONEY", "text": "$275,000", "tokStart": 55, "tokEnd": 56, "charStart": 203, "charEnd": 211 }, { "label": "XREF", "text": "section 2(b)", "tokStart": 69, "tokEnd": 73, "charStart": 262, "charEnd": 274 }, { "label": "MONEY", "text": "$250,000", "tokStart": 79, "tokEnd": 80, "charStart": 281, "charEnd": 289 }, { "label": "ACTOR_SCOPE", "text": "individual", "tokStart": 86, "tokEnd": 86, "charStart": 308, "charEnd": 318 }, { "label": "OP", "text": "not married", "tokStart": 89, "tokEnd": 90, "charStart": 326, "charEnd": 337 }, { "label": "ACTOR_SCOPE", "text": "spouse", "tokStart": 97, "tokEnd": 97, "charStart": 365, "charEnd": 371 }, { "label": "XREF", "text": "1/2", "tokStart": 107, "tokEnd": 109, "charStart": 402, "charEnd": 405 }, { "label": "XREF", "text": "subparagraph (A)", "tokStart": 114, "tokEnd": 117, "charStart": 434, "charEnd": 450 }, { "label": "ACTOR_SCOPE", "text": "married individual", "tokStart": 123, "tokEnd": 124, "charStart": 468, "charEnd": 486 }, { "label": "XREF", "text": "this paragraph", "tokStart": 133, "tokEnd": 134, "charStart": 529, "charEnd": 543 }, { "label": "OP", "text": "shall be determined", "tokStart": 138, "tokEnd": 140, "charStart": 560, "charEnd": 579 }, { "label": "XREF", "text": "section 7703", "tokStart": 142, "tokEnd": 143, "charStart": 586, "charEnd": 598 } ], "clauses": [ { "clause_index": 1, "scope_type": "INLINE_DEF", "confidence": 0.9705, "tokStart": 17, "tokEnd": 129, "text": "the term \"applicable amount\" means- (A) $300,000 in the case of a joint return or a surviving spouse (as defined in section 2(a)), (B) $275,000 in the case of a head of household (as defined in section 2(b)), (C) $250,000 in the case of an individual who is not married and who is not a surviving spouse or head of household, and (D) 1/2 the amount applicable under subparagraph (A) in the case of a married individual filing a separate return.", "bound_variables": [ "is_separate_return", "is_surviving_spouse", "is_individual", "is_spouse", "is_married_individual", "is_joint_return" ], "operands": [ { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_separate_return", "catala_declaration": "data is_separate_return content boolean", "usvm_key": "is_separate_return", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.7232, "max_proto_lex_cos": 0.6768, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.5668, "normalized_entropy": 0.7674, "text": "separate return", "tokStart": 127, "tokEnd": 128, "charStart": 496, "charEnd": 511 } ], "operators": [ "means", "not married" ], "literals": [ { "label": "MONEY", "text": "$300,000" }, { "label": "XREF", "text": "section 2(a)" }, { "label": "MONEY", "text": "$275,000" }, { "label": "XREF", "text": "section 2(b)" }, { "label": "MONEY", "text": "$250,000" }, { "label": "XREF", "text": "1/2" }, { "label": "XREF", "text": "subparagraph (A)" } ], "actors": [ "surviving spouse", "individual", "spouse", "married individual" ], "defined_terms": [ "applicable amount" ] }, { "clause_index": 2, "scope_type": "COND", "confidence": 0.5139, "tokStart": 118, "tokEnd": 128, "text": "in the case of a married individual filing a separate return", "bound_variables": [ "is_separate_return" ], "operands": [ { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_separate_return", "catala_declaration": "data is_separate_return content boolean", "usvm_key": "is_separate_return", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.7232, "max_proto_lex_cos": 0.6768, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.5668, "normalized_entropy": 0.7674, "text": "separate return", "tokStart": 127, "tokEnd": 128, "charStart": 496, "charEnd": 511 } ], "operators": [], "literals": [], "actors": [ "married individual" ], "defined_terms": [] }, { "clause_index": 3, "scope_type": "RULE_EFFECT", "confidence": 0.833, "tokStart": 130, "tokEnd": 144, "text": "For purposes of this paragraph, marital status shall be determined under section 7703.", "bound_variables": [ "is_marital_status" ], "operands": [ { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_CUSTOM", "catala_variable": "is_marital_status", "catala_declaration": "data is_marital_status content boolean", "usvm_key": "is_marital_status", "is_custom_fallback": true, "ood_reason": "PROTO_SPAN", "max_proto_span_cos": 0.696, "max_proto_lex_cos": 0.8209, "m15_span_hit": false, "branch_confidence": 0.9999, "leaf_confidence": 0.5395, "normalized_entropy": 0.6543, "text": "marital status", "tokStart": 136, "tokEnd": 137, "charStart": 545, "charEnd": 559 } ], "operators": [ "shall be determined" ], "literals": [ { "label": "XREF", "text": "this paragraph" }, { "label": "XREF", "text": "section 7703" } ], "actors": [], "defined_terms": [] } ], "review_flags": [], "telemetry": { "reflexion_repairs": [] } }, "catala": "# UsIrc68B (US_IRC_68_B)\n\nGenerated deterministically by MudraForge Catala/AST Generator (v6.1.0-prod / MF-SPEC-S1-V6.1.0).\nStatutory Invariant: `is_authorized_to_disburse` is permanently locked to `false`.\n\n## Statutory Source Text\n\n \"(b) Applicable amount: (1) In general For purposes of this section, the term \"applicable amount\" means- (A) $300,000 in the case of a joint return or a surviving spouse (as defined in section 2(a)), (B) $275,000 in the case of a head of household (as defined in section 2(b)), (C) $250,000 in the case of an individual who is not married and who is not a surviving spouse or head of household, and (D) 1/2 the amount applicable under subparagraph (A) in the case of a married individual filing a separate return. For purposes of this paragraph, marital status shall be determined under section 7703.\"\n\n## Scope Declaration\n\n```catala\ndeclaration scope UsIrc68B:\n input is_separate_return content boolean # leaf=FILTER_SEPARATE_RETURN, span='separate return'\n # input is_marital_status content boolean # (unreferenced in zero-dollar or definition scope: leaf=FILTER_MARITAL_STATUS, span='marital status')\n input is_joint_return content boolean # leaf=FILTER_JOINT_RETURN, span='joint return'\n input is_surviving_spouse content boolean # leaf=FILTER_SURVIVING_SPOUSE, span='surviving spouse'\n input is_head_of_household content boolean # leaf=FILTER_HEAD_OF_HOUSEHOLD, span='head of household'\n # input is_individual content boolean # (unreferenced in zero-dollar or definition scope: leaf=FILTER_INDIVIDUAL, span='individual')\n # input is_spouse content boolean # (unreferenced in zero-dollar or definition scope: leaf=FILTER_SPOUSE, span='spouse')\n # input is_married_individual content boolean # (unreferenced in zero-dollar or definition scope: leaf=FILTER_MARRIED_INDIVIDUAL, span='married individual')\n output is_rule_applicable content boolean\n output computed_statutory_amount content money\n output is_authorized_to_disburse content boolean\n```\n\n## Extracted Statutory Anchors (Stage 1)\n\n- **ACTOR_SCOPE**: `surviving spouse`, `individual`, `spouse`, `married individual`\n- **DEFINED_TERM**: `applicable amount`\n- **MONEY**: `$300,000`, `$275,000`, `$250,000`\n- **OP**: `means`, `not married`, `shall be determined`\n- **XREF**: `this section`, `section 2(a)`, `section 2(b)`, `1/2`, `subparagraph (A)`, `this paragraph`, `section 7703`\n\n## Clause-Structured Rule Scaffold\n\n```catala\nscope UsIrc68B:\n # Hard statutory invariant: calculation never authorizes disbursement\n definition is_authorized_to_disburse equals false\n\n # --- INLINE_DEF Clauses ---\n # [INLINE_DEF p=0.9705] the term \"applicable amount\" means- (A) $300,000 in the case of a joint return or a surviving spouse (as defined in section 2(a)), (B) $275,000 in the case of a head of household (as defined in section 2(b)), (C) $250,000 in the case of an individual who is not married and who is not a surviving spouse or head of household, and (D) 1/2 the amount applicable under subparagraph (A) in the case of a married individual filing a separate return.\n\n rule is_rule_applicable under condition true consequence fulfilled\n\n # --- RULE_EFFECT / COMPUTATION Clauses ---\n # [RULE_EFFECT p=0.833] For purposes of this paragraph, marital status shall be determined under section 7703.\n # vars: is_marital_status\n # literals: XREF='this paragraph', XREF='section 7703'\n definition computed_statutory_amount equals\n if not is_rule_applicable then $0.00\n else if is_joint_return or is_surviving_spouse then $300000.00\n else if is_head_of_household then $275000.00\n else if is_separate_return then $150000.00\n else $250000.00\n```\n", "mermaid": { "mermaid": "flowchart TD\n %% Style Definitions\n classDef ingress fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;\n classDef gate fill:#0f172a,stroke:#f59e0b,stroke-width:2px,color:#f8fafc;\n classDef action fill:#0f172a,stroke:#10b981,stroke-width:2px,color:#f8fafc;\n classDef exitNode fill:#311019,stroke:#ef4444,stroke-width:2px,color:#fca5a5;\n classDef guard fill:#1e1b4b,stroke:#818cf8,stroke-width:2px,color:#c7d2fe;\n classDef terminal fill:#064e3b,stroke:#34d399,stroke-width:2px,color:#ecfdf5;\n\n %% Scope Ingress\n NODE_START([\"Statute Ingress: UsIrc68B (US_IRC_68_B)\"]):::ingress\n NODE_COND{\"Precondition Gate: in the case of a married individual filing a separate return\"}:::gate\n NODE_START --> NODE_COND\n NODE_COND_FAIL[\"Preconditions Not Met<br/>Outcome: Inapplicable / $0.00\"]:::exitNode\n NODE_COND -- \"False / Inapplicable\" --> NODE_COND_FAIL\n NODE_COND_FAIL --> EXIT_COND([\"Terminal: Rule Does Not Apply\"]):::exitNode\n NODE_COND -- \"True / Condition Met\" --> NODE_COND_PASS[\"Preconditions Satisfied\"]:::action\n NODE_BRANCH_SELECT{\"Filing Category Selection<br/>(Subparagraph Table)\"}:::gate\n NODE_COND_PASS --> NODE_BRANCH_SELECT\n BRANCH_A[\"Subparagraph (A): Joint Return or Surviving Spouse<br/>Threshold Amount: $300,000.00\"]:::action\n BRANCH_B[\"Subparagraph (B): Head of Household<br/>Threshold Amount: $275,000.00\"]:::action\n BRANCH_D[\"Subparagraph (D): Married Filing Separate Return<br/>Threshold Amount: $150,000.00 (1/2 of A)\"]:::action\n BRANCH_C[\"Subparagraph (C): Single / Residual Individual<br/>Threshold Amount: $250,000.00\"]:::action\n NODE_BRANCH_SELECT -- \"Joint / Surviving Spouse\" --> BRANCH_A\n NODE_BRANCH_SELECT -- \"Head of Household\" --> BRANCH_B\n NODE_BRANCH_SELECT -- \"Married Separate\" --> BRANCH_D\n NODE_BRANCH_SELECT -- \"Single / Other\" --> BRANCH_C\n NODE_COMPUTE[\"Assign Statutory Amount from Selected Branch\"]:::action\n BRANCH_A --> NODE_COMPUTE\n BRANCH_B --> NODE_COMPUTE\n BRANCH_D --> NODE_COMPUTE\n BRANCH_C --> NODE_COMPUTE\n NODE_GUARD[[\"Statutory Invariant Guard:<br/>is_authorized_to_disburse = false\"]]:::guard\n NODE_COMPUTE --> NODE_GUARD\n NODE_FINAL([\"Final Deterministic Assessment Complete\"]):::terminal\n NODE_GUARD --> NODE_FINAL", "scope_name": "UsIrc68B", "doc_id": "US_IRC_68_B", "structured_nodes": [ { "id": "NODE_START", "type": "ingress", "label": "UsIrc68B (US_IRC_68_B)" } ], "structured_edges": [ { "from": "NODE_START", "to": "NODE_COND", "label": "evaluate" }, { "from": "NODE_COND", "to": "NODE_COND_FAIL", "label": "false" }, { "from": "NODE_COND_FAIL", "to": "EXIT_COND", "label": "exit" }, { "from": "NODE_COND", "to": "NODE_COND_PASS", "label": "true" }, { "from": "NODE_COND_PASS", "to": "NODE_BRANCH_SELECT", "label": "route" }, { "from": "NODE_COMPUTE", "to": "NODE_GUARD", "label": "enforce_invariant" }, { "from": "NODE_GUARD", "to": "NODE_FINAL", "label": "complete" } ] }, "domain": "General" }, "US_IRC_68_F": { "id": "US_IRC_68_F", "title": "IRC Section 68(f) -- TCJA Temporary Suspension Date Window", "law": "26 U.S. Code Section 68(f)", "category": "US Federal Income Tax", "text": "(f) Section not to apply: This section shall not apply to any taxable year beginning after December 31, 2017, and before January 1, 2026.", "ast": { "schema_version": "mudraforge.statutory_ast.v1", "generated_at_utc": "2026-11-21T09:21:31.252657+00:00", "pipeline_version": "v6.1.0-prod", "spec_id": "MF-SPEC-S1-V6.1.0", "doc_id": "US_IRC_68_F", "scope_name": "UsIrc68F", "isAuthorizedToDisburse": false, "stages_executed": [ "stage1", "stage1_5", "stage2", "stage2b" ], "stage_sources": { "stage1": "model", "stage1_5": "model", "stage2": "model", "stage2b": "model" }, "source_text": "(f) Section not to apply: This section shall not apply to any taxable year beginning after December 31, 2017, and before January 1, 2026.", "declarations": { "inputs": [ { "direction": "input", "name": "transaction_date", "catala_type": "date", "root_branch": "TEMPORAL_WINDOW", "catala_leaf": "WINDOW_TRANSACTION_DATE", "usvm_key": "transactionDate", "source_text": "taxable year", "is_custom_fallback": false } ], "local_aliases": [], "deontic_targets": [], "outputs": [ { "direction": "output", "name": "is_rule_applicable", "catala_type": "boolean", "description": "True when statutory COND clauses hold and no EXCEPTION applies." }, { "direction": "output", "name": "computed_statutory_amount", "catala_type": "money", "description": "Deterministic monetary output derived from RULE_EFFECT clauses." }, { "direction": "output", "name": "is_authorized_to_disburse", "catala_type": "boolean", "description": "MudraForge statutory invariant: calculation never authorizes disbursement.", "invariant_value": false } ] }, "statutory_constants": { "OP": [ { "text": "to apply", "tokStart": 5, "tokEnd": 6 }, { "text": "shall not apply", "tokStart": 10, "tokEnd": 12 } ], "XREF": [ { "text": "This section", "tokStart": 8, "tokEnd": 9 } ], "DURATION": [ { "text": "taxable year", "tokStart": 15, "tokEnd": 16 } ], "DATE": [ { "text": "December 31, 2017", "tokStart": 19, "tokEnd": 22 }, { "text": "January 1, 2026", "tokStart": 26, "tokEnd": 29 } ] }, "rate_branch_discriminator": null, "atoms": [ { "label": "OP", "text": "to apply", "tokStart": 5, "tokEnd": 6, "charStart": 16, "charEnd": 24 }, { "label": "XREF", "text": "This section", "tokStart": 8, "tokEnd": 9, "charStart": 26, "charEnd": 38 }, { "label": "OP", "text": "shall not apply", "tokStart": 10, "tokEnd": 12, "charStart": 39, "charEnd": 54 }, { "label": "DURATION", "text": "taxable year", "tokStart": 15, "tokEnd": 16, "charStart": 62, "charEnd": 74 }, { "label": "DATE", "text": "December 31, 2017", "tokStart": 19, "tokEnd": 22, "charStart": 91, "charEnd": 108 }, { "label": "DATE", "text": "January 1, 2026", "tokStart": 26, "tokEnd": 29, "charStart": 121, "charEnd": 136 } ], "clauses": [ { "clause_index": 1, "scope_type": "RULE_EFFECT", "confidence": 0.907, "tokStart": 8, "tokEnd": 30, "text": "This section shall not apply to any taxable year beginning after December 31, 2017, and before January 1, 2026.", "bound_variables": [ "transaction_date" ], "operands": [], "operators": [ "shall not apply" ], "literals": [ { "label": "XREF", "text": "This section" }, { "label": "DURATION", "text": "taxable year" }, { "label": "DATE", "text": "December 31, 2017" }, { "label": "DATE", "text": "January 1, 2026" } ], "actors": [], "defined_terms": [] } ], "review_flags": [], "telemetry": { "reflexion_repairs": [] } }, "catala": "# UsIrc68F (US_IRC_68_F)\n\nGenerated deterministically by MudraForge Catala/AST Generator (v6.1.0-prod / MF-SPEC-S1-V6.1.0).\nStatutory Invariant: `is_authorized_to_disburse` is permanently locked to `false`.\n\n## Statutory Source Text\n\n \"(f) Section not to apply: This section shall not apply to any taxable year beginning after December 31, 2017, and before January 1, 2026.\"\n\n## Scope Declaration\n\n```catala\ndeclaration scope UsIrc68F:\n input transaction_date content date # leaf=WINDOW_TRANSACTION_DATE, span='taxable year'\n output is_rule_applicable content boolean\n output computed_statutory_amount content money\n output is_authorized_to_disburse content boolean\n```\n\n## Extracted Statutory Anchors (Stage 1)\n\n- **DATE**: `December 31, 2017`, `January 1, 2026`\n- **DURATION**: `taxable year`\n- **OP**: `to apply`, `shall not apply`\n- **XREF**: `This section`\n\n## Clause-Structured Rule Scaffold\n\n```catala\nscope UsIrc68F:\n # Hard statutory invariant: calculation never authorizes disbursement\n definition is_authorized_to_disburse equals false\n\n definition is_rule_applicable equals false\n\n label base_applicability\n exception\n rule is_rule_applicable under condition true consequence fulfilled\n\n # --- Temporal Sunset / Suspension Carve-out ---\n exception base_applicability\n rule is_rule_applicable under condition\n (transaction_date > |2017-12-31|) and (transaction_date < |2026-01-01|)\n consequence not fulfilled\n\n # --- RULE_EFFECT / COMPUTATION Clauses ---\n # [RULE_EFFECT p=0.907] This section shall not apply to any taxable year beginning after December 31, 2017, and before January 1, 2026.\n # vars: transaction_date\n # literals: XREF='This section', DURATION='taxable year', DATE='December 31, 2017', DATE='January 1, 2026'\n definition computed_statutory_amount equals\n if is_rule_applicable then $0.00\n else $0.00\n```\n", "mermaid": { "mermaid": "flowchart TD\n %% Style Definitions\n classDef ingress fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;\n classDef gate fill:#0f172a,stroke:#f59e0b,stroke-width:2px,color:#f8fafc;\n classDef action fill:#0f172a,stroke:#10b981,stroke-width:2px,color:#f8fafc;\n classDef exitNode fill:#311019,stroke:#ef4444,stroke-width:2px,color:#fca5a5;\n classDef guard fill:#1e1b4b,stroke:#818cf8,stroke-width:2px,color:#c7d2fe;\n classDef terminal fill:#064e3b,stroke:#34d399,stroke-width:2px,color:#ecfdf5;\n\n %% Scope Ingress\n NODE_START([\"Statute Ingress: UsIrc68F (US_IRC_68_F)\"]):::ingress\n NODE_COND_PASS[\"General Application (No Restrictive Precondition)\"]:::action\n NODE_START --> NODE_COND_PASS\n NODE_COMPUTE[\"This section shall not apply to any taxable year beginning after December 31, 2017, and before January 1, 2026.\"]:::action\n NODE_COND_PASS --> NODE_COMPUTE\n NODE_GUARD[[\"Statutory Invariant Guard:<br/>is_authorized_to_disburse = false\"]]:::guard\n NODE_COMPUTE --> NODE_GUARD\n NODE_FINAL([\"Final Deterministic Assessment Complete\"]):::terminal\n NODE_GUARD --> NODE_FINAL", "scope_name": "UsIrc68F", "doc_id": "US_IRC_68_F", "structured_nodes": [ { "id": "NODE_START", "type": "ingress", "label": "UsIrc68F (US_IRC_68_F)" } ], "structured_edges": [ { "from": "NODE_START", "to": "NODE_COND_PASS", "label": "applies" }, { "from": "NODE_COMPUTE", "to": "NODE_GUARD", "label": "enforce_invariant" }, { "from": "NODE_GUARD", "to": "NODE_FINAL", "label": "complete" } ] }, "domain": "General" }, "IN_ITA_194Q": { "id": "IN_ITA_194Q", "title": "India Income-tax Act Section 194Q -- TDS on Purchase of Goods Exceeding Rs 50 Lakh", "law": "Section 194Q, Income-tax Act, 1961", "category": "India Direct Tax", "text": "Any person, being a buyer who is responsible for paying any sum to any resident for purchase of any goods of the value or aggregate of such value exceeding fifty lakh rupees in any previous year, shall, at the time of credit of such sum to the account of the seller or at the time of payment thereof by any mode, whichever is earlier, deduct an amount equal to 0.1 per cent of such sum exceeding fifty lakh rupees as income-tax.", "ast": { "schema_version": "mudraforge.statutory_ast.v1", "generated_at_utc": "2026-11-21T09:21:43.998143+00:00", "pipeline_version": "v6.1.0-prod", "spec_id": "MF-SPEC-S1-V6.1.0", "doc_id": "IN_ITA_194Q", "scope_name": "InIta194q", "isAuthorizedToDisburse": false, "stages_executed": [ "stage1", "stage1_5", "stage2", "stage2b" ], "stage_sources": { "stage1": "model", "stage1_5": "model", "stage2": "model", "stage2b": "model" }, "source_text": "Any person, being a buyer who is responsible for paying any sum to any resident for purchase of any goods of the value or aggregate of such value exceeding fifty lakh rupees in any previous year, shall, at the time of credit of such sum to the account of the seller or at the time of payment thereof by any mode, whichever is earlier, deduct an amount equal to 0.1 per cent of such sum exceeding fifty lakh rupees as income-tax.", "declarations": { "inputs": [ { "direction": "input", "name": "consideration", "catala_type": "money", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_CONSIDERATION", "usvm_key": "transactionAmountPaisa", "source_text": "sum", "tokStart": 12, "tokEnd": 12, "is_custom_fallback": false }, { "direction": "input", "name": "is_goods", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_GOODS", "usvm_key": "isGoods", "source_text": "goods", "tokStart": 20, "tokEnd": 20, "is_custom_fallback": false } ], "local_aliases": [ { "alias_name": "such_sum", "targets_variable": "consideration", "source_text": "such sum" }, { "alias_name": "payment_thereof", "targets_variable": "consideration", "source_text": "payment thereof" }, { "alias_name": "such_sum", "targets_variable": "consideration", "source_text": "such sum" } ], "deontic_targets": [ { "tax_target": "INCOME_TAX", "source_text": "income-tax" } ], "outputs": [ { "direction": "output", "name": "is_rule_applicable", "catala_type": "boolean", "description": "True when statutory COND clauses hold and no EXCEPTION applies." }, { "direction": "output", "name": "computed_statutory_amount", "catala_type": "money", "description": "Deterministic monetary output derived from RULE_EFFECT clauses." }, { "direction": "output", "name": "is_authorized_to_disburse", "catala_type": "boolean", "description": "MudraForge statutory invariant: calculation never authorizes disbursement.", "invariant_value": false } ] }, "statutory_constants": { "ACTOR_SCOPE": [ { "text": "person", "tokStart": 1, "tokEnd": 1 }, { "text": "buyer", "tokStart": 5, "tokEnd": 5 }, { "text": "resident", "tokStart": 15, "tokEnd": 15 }, { "text": "seller", "tokStart": 53, "tokEnd": 53 } ], "OP": [ { "text": "exceeding", "tokStart": 29, "tokEnd": 29 }, { "text": "whichever is earlier", "tokStart": 65, "tokEnd": 67 }, { "text": "deduct", "tokStart": 69, "tokEnd": 69 }, { "text": "equal to", "tokStart": 72, "tokEnd": 73 }, { "text": "exceeding", "tokStart": 79, "tokEnd": 79 } ], "MONEY": [ { "text": "fifty lakh rupees", "tokStart": 30, "tokEnd": 32 }, { "text": "fifty lakh rupees", "tokStart": 80, "tokEnd": 82 } ], "DURATION": [ { "text": "previous year", "tokStart": 35, "tokEnd": 36 } ], "RATE": [ { "text": "0.1 per cent", "tokStart": 74, "tokEnd": 75 } ] }, "rate_branch_discriminator": null, "atoms": [ { "label": "ACTOR_SCOPE", "text": "person", "tokStart": 1, "tokEnd": 1, "charStart": 4, "charEnd": 10 }, { "label": "ACTOR_SCOPE", "text": "buyer", "tokStart": 5, "tokEnd": 5, "charStart": 20, "charEnd": 25 }, { "label": "ACTOR_SCOPE", "text": "resident", "tokStart": 15, "tokEnd": 15, "charStart": 71, "charEnd": 79 }, { "label": "OP", "text": "exceeding", "tokStart": 29, "tokEnd": 29, "charStart": 146, "charEnd": 155 }, { "label": "MONEY", "text": "fifty lakh rupees", "tokStart": 30, "tokEnd": 32, "charStart": 156, "charEnd": 173 }, { "label": "DURATION", "text": "previous year", "tokStart": 35, "tokEnd": 36, "charStart": 181, "charEnd": 194 }, { "label": "ACTOR_SCOPE", "text": "seller", "tokStart": 53, "tokEnd": 53, "charStart": 259, "charEnd": 265 }, { "label": "OP", "text": "whichever is earlier", "tokStart": 65, "tokEnd": 67, "charStart": 313, "charEnd": 333 }, { "label": "OP", "text": "deduct", "tokStart": 69, "tokEnd": 69, "charStart": 335, "charEnd": 341 }, { "label": "OP", "text": "equal to", "tokStart": 72, "tokEnd": 73, "charStart": 352, "charEnd": 360 }, { "label": "RATE", "text": "0.1 per cent", "tokStart": 74, "tokEnd": 75, "charStart": 361, "charEnd": 373 }, { "label": "OP", "text": "exceeding", "tokStart": 79, "tokEnd": 79, "charStart": 386, "charEnd": 395 }, { "label": "MONEY", "text": "fifty lakh rupees", "tokStart": 80, "tokEnd": 82, "charStart": 396, "charEnd": 413 } ], "clauses": [ { "clause_index": 1, "scope_type": "COND", "confidence": 0.9692, "tokStart": 0, "tokEnd": 36, "text": "Any person, being a buyer who is responsible for paying any sum to any resident for purchase of any goods of the value or aggregate of such value exceeding fifty lakh rupees in any previous year", "bound_variables": [ "consideration", "is_goods" ], "operands": [ { "label": "OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_CONSIDERATION", "catala_variable": "consideration", "catala_declaration": "data consideration content money", "usvm_key": "transactionAmountPaisa", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.99, "max_proto_lex_cos": 0.856, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8662, "normalized_entropy": 0.507, "text": "sum", "tokStart": 12, "tokEnd": 12, "charStart": 60, "charEnd": 63 }, { "label": "OPERAND", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_GOODS", "catala_variable": "is_goods", "catala_declaration": "data is_goods content boolean", "usvm_key": "isGoods", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9841, "max_proto_lex_cos": 0.9988, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8673, "normalized_entropy": 0.5126, "text": "goods", "tokStart": 20, "tokEnd": 20, "charStart": 100, "charEnd": 105 } ], "operators": [ "exceeding" ], "literals": [ { "label": "MONEY", "text": "fifty lakh rupees" }, { "label": "DURATION", "text": "previous year" } ], "actors": [ "person", "buyer", "resident" ], "defined_terms": [] }, { "clause_index": 2, "scope_type": "RULE_EFFECT", "confidence": 0.9317, "tokStart": 38, "tokEnd": 87, "text": "shall, at the time of credit of such sum to the account of the seller or at the time of payment thereof by any mode, whichever is earlier, deduct an amount equal to 0.1 per cent of such sum exceeding fifty lakh rupees as income-tax.", "bound_variables": [ "in_scope_current_sum", "base_tax" ], "operands": [ { "label": "OPERAND", "root_branch": "DOC_POINTER", "catala_leaf": "SCOPE_CURRENT_SUM", "catala_variable": "in.scope_current_sum", "catala_declaration": "in.scope_current_sum", "usvm_key": "scope_current_sum", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9906, "max_proto_lex_cos": 0.9884, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8805, "normalized_entropy": 0.5554, "text": "such sum", "tokStart": 46, "tokEnd": 47, "charStart": 228, "charEnd": 236 }, { "label": "OPERAND", "root_branch": "DOC_POINTER", "catala_leaf": "SCOPE_CURRENT_SUM", "catala_variable": "in.scope_current_sum", "catala_declaration": "in.scope_current_sum", "usvm_key": "scope_current_sum", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9768, "max_proto_lex_cos": 0.7358, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8806, "normalized_entropy": 0.558, "text": "payment thereof", "tokStart": 59, "tokEnd": 60, "charStart": 284, "charEnd": 299 }, { "label": "OPERAND", "root_branch": "DOC_POINTER", "catala_leaf": "SCOPE_CURRENT_SUM", "catala_variable": "in.scope_current_sum", "catala_declaration": "in.scope_current_sum", "usvm_key": "scope_current_sum", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9862, "max_proto_lex_cos": 0.9884, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8811, "normalized_entropy": 0.5545, "text": "such sum", "tokStart": 77, "tokEnd": 78, "charStart": 377, "charEnd": 385 }, { "label": "OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_TAX", "catala_variable": "base_tax", "catala_declaration": "data base_tax content money", "usvm_key": "base_tax", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9942, "max_proto_lex_cos": 0.9339, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8644, "normalized_entropy": 0.5131, "text": "income-tax", "tokStart": 84, "tokEnd": 86, "charStart": 417, "charEnd": 427 } ], "operators": [ "whichever is earlier", "deduct", "equal to", "exceeding" ], "literals": [ { "label": "RATE", "text": "0.1 per cent" }, { "label": "MONEY", "text": "fifty lakh rupees" } ], "actors": [ "seller" ], "defined_terms": [] } ], "review_flags": [], "telemetry": { "reflexion_repairs": [ { "invariant": "ANAPHORA_ALIAS_RESOLUTION", "operand_text": "such sum", "aliased_to": "consideration", "action": "Marked 'such sum' as internal alias to 'sum' (no duplicate input parameter)" }, { "invariant": "ANAPHORA_ALIAS_RESOLUTION", "operand_text": "payment thereof", "aliased_to": "consideration", "action": "Marked 'payment thereof' as internal alias to 'sum' (no duplicate input parameter)" }, { "invariant": "ANAPHORA_ALIAS_RESOLUTION", "operand_text": "such sum", "aliased_to": "consideration", "action": "Marked 'such sum' as internal alias to 'sum' (no duplicate input parameter)" }, { "invariant": "DEONTIC_OUTPUT_SINK", "operand_text": "income-tax", "action": "Reclassified 'income-tax' from input variable to deontic tax classification target (prepositional sink)" } ] } }, "catala": "# InIta194q (IN_ITA_194Q)\n\nGenerated deterministically by MudraForge Catala/AST Generator (v6.1.0-prod / MF-SPEC-S1-V6.1.0).\nStatutory Invariant: `is_authorized_to_disburse` is permanently locked to `false`.\n\n## Statutory Source Text\n\n \"Any person, being a buyer who is responsible for paying any sum to any resident for purchase of any goods of the value or aggregate of such value exceeding fifty lakh rupees in any previous year, shall, at the time of credit of such sum to the account of the seller or at the time of payment thereof by any mode, whichever is earlier, deduct an amount equal to 0.1 per cent of such sum exceeding fifty lakh rupees as income-tax.\"\n\n## Scope Declaration\n\n```catala\ndeclaration scope InIta194q:\n input consideration content money # leaf=BASE_CONSIDERATION, span='sum'\n input is_goods content boolean # leaf=FILTER_GOODS, span='goods'\n output is_rule_applicable content boolean\n output computed_statutory_amount content money\n output is_authorized_to_disburse content boolean\n```\n\n## Extracted Statutory Anchors (Stage 1)\n\n- **ACTOR_SCOPE**: `person`, `buyer`, `resident`, `seller`\n- **DURATION**: `previous year`\n- **MONEY**: `fifty lakh rupees`, `fifty lakh rupees`\n- **OP**: `exceeding`, `whichever is earlier`, `deduct`, `equal to`, `exceeding`\n- **RATE**: `0.1 per cent`\n\n## Clause-Structured Rule Scaffold\n\n```catala\nscope InIta194q:\n # Hard statutory invariant: calculation never authorizes disbursement\n definition is_authorized_to_disburse equals false\n\n # --- Anaphora Local Variable Aliases ---\n # let such_sum = consideration # 'such sum'\n # let payment_thereof = consideration # 'payment thereof'\n # let such_sum = consideration # 'such sum'\n\n # --- COND Clauses ---\n # [COND p=0.9692] Any person, being a buyer who is responsible for paying any sum to any resident for purchase of any goods of the value or aggregate of such value exceeding fifty lakh rupees in any previous year\n # vars: consideration, is_goods\n # ops: ['exceeding'] | literals: MONEY='fifty lakh rupees', DURATION='previous year'\n definition is_rule_applicable equals false\n\n label base_applicability\n exception\n rule is_rule_applicable under condition\n is_goods and (consideration > $5000000.00)\n consequence fulfilled\n\n # --- RULE_EFFECT / COMPUTATION Clauses ---\n # [RULE_EFFECT p=0.9317] shall, at the time of credit of such sum to the account of the seller or at the time of payment thereof by any mode, whichever is earlier, deduct an amount equal to 0.1 per cent of such sum exceeding fifty lakh rupees as income-tax.\n # vars: in_scope_current_sum, base_tax\n # literals: RATE='0.1 per cent', MONEY='fifty lakh rupees'\n definition computed_statutory_amount equals\n if is_rule_applicable then\n (consideration - $5000000.00) * 0.1%\n else $0.00\n```\n", "mermaid": { "mermaid": "flowchart TD\n %% Style Definitions\n classDef ingress fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;\n classDef gate fill:#0f172a,stroke:#f59e0b,stroke-width:2px,color:#f8fafc;\n classDef action fill:#0f172a,stroke:#10b981,stroke-width:2px,color:#f8fafc;\n classDef exitNode fill:#311019,stroke:#ef4444,stroke-width:2px,color:#fca5a5;\n classDef guard fill:#1e1b4b,stroke:#818cf8,stroke-width:2px,color:#c7d2fe;\n classDef terminal fill:#064e3b,stroke:#34d399,stroke-width:2px,color:#ecfdf5;\n\n %% Scope Ingress\n NODE_START([\"Statute Ingress: InIta194q (IN_ITA_194Q)\"]):::ingress\n NODE_COND{\"Precondition Gate: Any person, being a buyer who is responsible for paying any sum to any resident for purchase of any goods of the value o\"}:::gate\n NODE_START --> NODE_COND\n NODE_COND_FAIL[\"Preconditions Not Met<br/>Outcome: Inapplicable / $0.00\"]:::exitNode\n NODE_COND -- \"False / Inapplicable\" --> NODE_COND_FAIL\n NODE_COND_FAIL --> EXIT_COND([\"Terminal: Rule Does Not Apply\"]):::exitNode\n NODE_COND -- \"True / Condition Met\" --> NODE_COND_PASS[\"Preconditions Satisfied\"]:::action\n NODE_COMPUTE[\"shall, at the time of credit of such sum to the account of the seller or at the time of payment thereof by any mode, whi\"]:::action\n NODE_COND_PASS --> NODE_COMPUTE\n NODE_GUARD[[\"Statutory Invariant Guard:<br/>is_authorized_to_disburse = false\"]]:::guard\n NODE_COMPUTE --> NODE_GUARD\n NODE_FINAL([\"Final Deterministic Assessment Complete\"]):::terminal\n NODE_GUARD --> NODE_FINAL", "scope_name": "InIta194q", "doc_id": "IN_ITA_194Q", "structured_nodes": [ { "id": "NODE_START", "type": "ingress", "label": "InIta194q (IN_ITA_194Q)" } ], "structured_edges": [ { "from": "NODE_START", "to": "NODE_COND", "label": "evaluate" }, { "from": "NODE_COND", "to": "NODE_COND_FAIL", "label": "false" }, { "from": "NODE_COND_FAIL", "to": "EXIT_COND", "label": "exit" }, { "from": "NODE_COND", "to": "NODE_COND_PASS", "label": "true" }, { "from": "NODE_COMPUTE", "to": "NODE_GUARD", "label": "enforce_invariant" }, { "from": "NODE_GUARD", "to": "NODE_FINAL", "label": "complete" } ] }, "domain": "Taxation", "sliders": [ { "id": "purchase_val", "label": "Goods Purchase Aggregate (in Lakhs)", "min": 10, "max": 150, "default": 80, "unit": "Lakhs (Rs)" }, { "id": "turnover_gt_10cr", "label": "Buyer Prior FY Turnover > Rs 10 Cr", "type": "toggle", "default": true }, { "id": "pan_provided", "label": "Seller Valid PAN Furnished", "type": "toggle", "default": true } ], "eval_fn": "\n const pVal = vals.purchase_val;\n const tOver = vals.turnover_gt_10cr;\n const hasPan = vals.pan_provided;\n if (!tOver) {\n return { applicable: false, reason: \"Buyer turnover <= Rs 10 Cr in preceding FY. Section 194Q does not apply.\", tax: 0, path: \"EXEMPT_TURNOVER\" };\n }\n if (pVal <= 50) {\n return { applicable: false, reason: \"Aggregate purchases <= Rs 50 Lakhs threshold. No deduction required.\", tax: 0, path: \"EXEMPT_THRESHOLD\" };\n }\n const excess = pVal - 50;\n const rate = hasPan ? 0.001 : 0.05;\n const taxRs = Math.round(excess * 100000 * rate);\n return {\n applicable: true,\n reason: `Threshold crossed by Rs ${excess} Lakhs. TDS rate: ${hasPan ? '0.1%' : '5% (Higher rate under Section 206AA due to missing PAN)'}.`,\n taxable_base: `Rs ${excess} Lakhs`,\n tax_payable: `Rs ${taxRs.toLocaleString('en-IN')}`,\n path: \"DEDUCT_ACTIVE\"\n };\n ", "llm_battle": { "query": "Does Section 194Q apply to a purchase of Rs 80 Lakhs if prior FY turnover was Rs 12 Cr, and what is the TDS?", "mudraforge_answer": "PASS (Exact Excess Math): Taxable base = Rs 30 Lakhs (excess over Rs 50L). TDS @ 0.1% = Rs 3,000. Invariant: isAuthorizedToDisburse = false.", "common_llm_hallucination": "FAIL (Common LLM Hallucination): Naive LLMs often calculate 0.1% on the entire Rs 80 Lakhs (Rs 8,000) or miss the preceding year turnover test, failing statutory fidelity." } }, "IN_ITA_194C": { "id": "IN_ITA_194C", "title": "India Income-tax Act Section 194C -- TDS on Payments to Contractors", "law": "Section 194C, Income-tax Act, 1961", "category": "India Direct Tax", "text": "Any person responsible for paying any sum to any resident for carrying out any work in pursuance of a contract between the contractor and a specified person shall deduct an amount equal to- (i) one per cent where the payment is being made or credit is given to an individual or a Hindu undivided family; (ii) two per cent where the payment is being made or credit is given to a person other than an individual or a Hindu undivided family, of such sum as income-tax.", "ast": { "schema_version": "mudraforge.statutory_ast.v1", "generated_at_utc": "2026-11-21T09:21:44.162697+00:00", "pipeline_version": "v6.1.0-prod", "spec_id": "MF-SPEC-S1-V6.1.0", "doc_id": "IN_ITA_194C", "scope_name": "InIta194c", "isAuthorizedToDisburse": false, "stages_executed": [ "stage1", "stage1_5", "stage2", "stage2b" ], "stage_sources": { "stage1": "model", "stage1_5": "model", "stage2": "model", "stage2b": "model" }, "source_text": "Any person responsible for paying any sum to any resident for carrying out any work in pursuance of a contract between the contractor and a specified person shall deduct an amount equal to- (i) one per cent where the payment is being made or credit is given to an individual or a Hindu undivided family; (ii) two per cent where the payment is being made or credit is given to a person other than an individual or a Hindu undivided family, of such sum as income-tax.", "declarations": { "inputs": [ { "direction": "input", "name": "consideration", "catala_type": "money", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_CONSIDERATION", "usvm_key": "transactionAmountPaisa", "source_text": "sum", "tokStart": 6, "tokEnd": 6, "is_custom_fallback": false }, { "direction": "input", "name": "is_individual", "catala_type": "boolean", "root_branch": "CATEGORY_FILTER", "catala_leaf": "FILTER_INDIVIDUAL", "usvm_key": "is_individual", "source_text": "individual", "is_custom_fallback": false, "synthesized_discriminator": true } ], "local_aliases": [ { "alias_name": "such_sum", "targets_variable": "consideration", "source_text": "such sum" } ], "deontic_targets": [ { "tax_target": "INCOME_TAX", "source_text": "income-tax" } ], "outputs": [ { "direction": "output", "name": "is_rule_applicable", "catala_type": "boolean", "description": "True when statutory COND clauses hold and no EXCEPTION applies." }, { "direction": "output", "name": "computed_statutory_amount", "catala_type": "money", "description": "Deterministic monetary output derived from RULE_EFFECT clauses." }, { "direction": "output", "name": "is_authorized_to_disburse", "catala_type": "boolean", "description": "MudraForge statutory invariant: calculation never authorizes disbursement.", "invariant_value": false } ] }, "statutory_constants": { "ACTOR_SCOPE": [ { "text": "person", "tokStart": 1, "tokEnd": 1 }, { "text": "resident", "tokStart": 9, "tokEnd": 9 }, { "text": "contractor", "tokStart": 22, "tokEnd": 22 }, { "text": "specified person", "tokStart": 25, "tokEnd": 26 }, { "text": "individual", "tokStart": 51, "tokEnd": 51 }, { "text": "Hindu undivided family", "tokStart": 54, "tokEnd": 56 }, { "text": "person", "tokStart": 75, "tokEnd": 75 }, { "text": "individual", "tokStart": 79, "tokEnd": 79 }, { "text": "Hindu undivided family", "tokStart": 82, "tokEnd": 84 } ], "OP": [ { "text": "shall deduct", "tokStart": 27, "tokEnd": 28 }, { "text": "equal to", "tokStart": 31, "tokEnd": 32 }, { "text": "other than", "tokStart": 76, "tokEnd": 77 } ], "RATE": [ { "text": "one per cent", "tokStart": 37, "tokEnd": 38 }, { "text": "two per cent", "tokStart": 61, "tokEnd": 62 } ] }, "rate_branch_discriminator": [ "is_individual", "individual", "1.0%", "2.0%" ], "atoms": [ { "label": "ACTOR_SCOPE", "text": "person", "tokStart": 1, "tokEnd": 1, "charStart": 4, "charEnd": 10 }, { "label": "ACTOR_SCOPE", "text": "resident", "tokStart": 9, "tokEnd": 9, "charStart": 49, "charEnd": 57 }, { "label": "ACTOR_SCOPE", "text": "contractor", "tokStart": 22, "tokEnd": 22, "charStart": 123, "charEnd": 133 }, { "label": "ACTOR_SCOPE", "text": "specified person", "tokStart": 25, "tokEnd": 26, "charStart": 140, "charEnd": 156 }, { "label": "OP", "text": "shall deduct", "tokStart": 27, "tokEnd": 28, "charStart": 157, "charEnd": 169 }, { "label": "OP", "text": "equal to", "tokStart": 31, "tokEnd": 32, "charStart": 180, "charEnd": 188 }, { "label": "RATE", "text": "one per cent", "tokStart": 37, "tokEnd": 38, "charStart": 194, "charEnd": 206 }, { "label": "ACTOR_SCOPE", "text": "individual", "tokStart": 51, "tokEnd": 51, "charStart": 264, "charEnd": 274 }, { "label": "ACTOR_SCOPE", "text": "Hindu undivided family", "tokStart": 54, "tokEnd": 56, "charStart": 280, "charEnd": 302 }, { "label": "RATE", "text": "two per cent", "tokStart": 61, "tokEnd": 62, "charStart": 309, "charEnd": 321 }, { "label": "ACTOR_SCOPE", "text": "person", "tokStart": 75, "tokEnd": 75, "charStart": 378, "charEnd": 384 }, { "label": "OP", "text": "other than", "tokStart": 76, "tokEnd": 77, "charStart": 385, "charEnd": 395 }, { "label": "ACTOR_SCOPE", "text": "individual", "tokStart": 79, "tokEnd": 79, "charStart": 399, "charEnd": 409 }, { "label": "ACTOR_SCOPE", "text": "Hindu undivided family", "tokStart": 82, "tokEnd": 84, "charStart": 415, "charEnd": 437 } ], "clauses": [ { "clause_index": 1, "scope_type": "COND", "confidence": 0.9623, "tokStart": 0, "tokEnd": 26, "text": "Any person responsible for paying any sum to any resident for carrying out any work in pursuance of a contract between the contractor and a specified person", "bound_variables": [ "consideration" ], "operands": [ { "label": "OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_CONSIDERATION", "catala_variable": "consideration", "catala_declaration": "data consideration content money", "usvm_key": "transactionAmountPaisa", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9891, "max_proto_lex_cos": 0.856, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8665, "normalized_entropy": 0.5072, "text": "sum", "tokStart": 6, "tokEnd": 6, "charStart": 38, "charEnd": 41 } ], "operators": [], "literals": [], "actors": [ "person", "resident", "contractor", "specified person" ], "defined_terms": [] }, { "clause_index": 2, "scope_type": "RULE_EFFECT", "confidence": 0.9492, "tokStart": 27, "tokEnd": 93, "text": "shall deduct an amount equal to- (i) one per cent where the payment is being made or credit is given to an individual or a Hindu undivided family; (ii) two per cent where the payment is being made or credit is given to a person other than an individual or a Hindu undivided family, of such sum as income-tax.", "bound_variables": [ "in_scope_current_sum", "base_tax" ], "operands": [ { "label": "OPERAND", "root_branch": "DOC_POINTER", "catala_leaf": "SCOPE_CURRENT_SUM", "catala_variable": "in.scope_current_sum", "catala_declaration": "in.scope_current_sum", "usvm_key": "scope_current_sum", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9938, "max_proto_lex_cos": 0.9884, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8809, "normalized_entropy": 0.5577, "text": "such sum", "tokStart": 87, "tokEnd": 88, "charStart": 442, "charEnd": 450 }, { "label": "OPERAND", "root_branch": "NUMERIC_METRIC", "catala_leaf": "BASE_TAX", "catala_variable": "base_tax", "catala_declaration": "data base_tax content money", "usvm_key": "base_tax", "is_custom_fallback": false, "ood_reason": "NONE", "max_proto_span_cos": 0.9936, "max_proto_lex_cos": 0.9339, "m15_span_hit": false, "branch_confidence": 1.0, "leaf_confidence": 0.8649, "normalized_entropy": 0.5143, "text": "income-tax", "tokStart": 90, "tokEnd": 92, "charStart": 454, "charEnd": 464 } ], "operators": [ "shall deduct", "equal to", "other than" ], "literals": [ { "label": "RATE", "text": "one per cent" }, { "label": "RATE", "text": "two per cent" } ], "actors": [ "individual", "Hindu undivided family", "person", "individual", "Hindu undivided family" ], "defined_terms": [] } ], "review_flags": [], "telemetry": { "reflexion_repairs": [ { "invariant": "ANAPHORA_ALIAS_RESOLUTION", "operand_text": "such sum", "aliased_to": "consideration", "action": "Marked 'such sum' as internal alias to 'sum' (no duplicate input parameter)" }, { "invariant": "DEONTIC_OUTPUT_SINK", "operand_text": "income-tax", "action": "Reclassified 'income-tax' from input variable to deontic tax classification target (prepositional sink)" } ] } }, "catala": "# InIta194c (IN_ITA_194C)\n\nGenerated deterministically by MudraForge Catala/AST Generator (v6.1.0-prod / MF-SPEC-S1-V6.1.0).\nStatutory Invariant: `is_authorized_to_disburse` is permanently locked to `false`.\n\n## Statutory Source Text\n\n \"Any person responsible for paying any sum to any resident for carrying out any work in pursuance of a contract between the contractor and a specified person shall deduct an amount equal to- (i) one per cent where the payment is being made or credit is given to an individual or a Hindu undivided family; (ii) two per cent where the payment is being made or credit is given to a person other than an individual or a Hindu undivided family, of such sum as income-tax.\"\n\n## Scope Declaration\n\n```catala\ndeclaration scope InIta194c:\n input consideration content money # leaf=BASE_CONSIDERATION, span='sum'\n input is_individual content boolean # leaf=FILTER_INDIVIDUAL, span='individual'\n output is_rule_applicable content boolean\n output computed_statutory_amount content money\n output is_authorized_to_disburse content boolean\n```\n\n## Extracted Statutory Anchors (Stage 1)\n\n- **ACTOR_SCOPE**: `person`, `resident`, `contractor`, `specified person`, `individual`, `Hindu undivided family`, `person`, `individual`, `Hindu undivided family`\n- **OP**: `shall deduct`, `equal to`, `other than`\n- **RATE**: `one per cent`, `two per cent`\n\n## Clause-Structured Rule Scaffold\n\n```catala\nscope InIta194c:\n # Hard statutory invariant: calculation never authorizes disbursement\n definition is_authorized_to_disburse equals false\n\n # --- Anaphora Local Variable Aliases ---\n # let such_sum = consideration # 'such sum'\n\n # --- COND Clauses ---\n # [COND p=0.9623] Any person responsible for paying any sum to any resident for carrying out any work in pursuance of a contract between the contractor and a specified person\n # vars: consideration\n definition is_rule_applicable equals false\n\n label base_applicability\n exception\n rule is_rule_applicable under condition\n true\n consequence fulfilled\n\n # --- RULE_EFFECT / COMPUTATION Clauses ---\n # [RULE_EFFECT p=0.9492] shall deduct an amount equal to- (i) one per cent where the payment is being made or credit is given to an individual or a Hindu undivided family; (ii) two per cent where the payment is being made or credit is given to a person other than an individual or a Hindu undivided family, of such sum as income-tax.\n # vars: in_scope_current_sum, base_tax\n # literals: RATE='one per cent', RATE='two per cent'\n definition computed_statutory_amount equals\n if is_rule_applicable then\n if is_individual then consideration * 1.0%\n else consideration * 2.0%\n else $0.00\n```\n", "mermaid": { "mermaid": "flowchart TD\n %% Style Definitions\n classDef ingress fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;\n classDef gate fill:#0f172a,stroke:#f59e0b,stroke-width:2px,color:#f8fafc;\n classDef action fill:#0f172a,stroke:#10b981,stroke-width:2px,color:#f8fafc;\n classDef exitNode fill:#311019,stroke:#ef4444,stroke-width:2px,color:#fca5a5;\n classDef guard fill:#1e1b4b,stroke:#818cf8,stroke-width:2px,color:#c7d2fe;\n classDef terminal fill:#064e3b,stroke:#34d399,stroke-width:2px,color:#ecfdf5;\n\n %% Scope Ingress\n NODE_START([\"Statute Ingress: InIta194c (IN_ITA_194C)\"]):::ingress\n NODE_COND{\"Precondition Gate: Any person responsible for paying any sum to any resident for carrying out any work in pursuance of a contract between t\"}:::gate\n NODE_START --> NODE_COND\n NODE_COND_FAIL[\"Preconditions Not Met<br/>Outcome: Inapplicable / $0.00\"]:::exitNode\n NODE_COND -- \"False / Inapplicable\" --> NODE_COND_FAIL\n NODE_COND_FAIL --> EXIT_COND([\"Terminal: Rule Does Not Apply\"]):::exitNode\n NODE_COND -- \"True / Condition Met\" --> NODE_COND_PASS[\"Preconditions Satisfied\"]:::action\n NODE_COMPUTE[\"shall deduct an amount equal to- i one per cent where the payment is being made or credit is given to an individual or a\"]:::action\n NODE_COND_PASS --> NODE_COMPUTE\n NODE_GUARD[[\"Statutory Invariant Guard:<br/>is_authorized_to_disburse = false\"]]:::guard\n NODE_COMPUTE --> NODE_GUARD\n NODE_FINAL([\"Final Deterministic Assessment Complete\"]):::terminal\n NODE_GUARD --> NODE_FINAL", "scope_name": "InIta194c", "doc_id": "IN_ITA_194C", "structured_nodes": [ { "id": "NODE_START", "type": "ingress", "label": "InIta194c (IN_ITA_194C)" } ], "structured_edges": [ { "from": "NODE_START", "to": "NODE_COND", "label": "evaluate" }, { "from": "NODE_COND", "to": "NODE_COND_FAIL", "label": "false" }, { "from": "NODE_COND_FAIL", "to": "EXIT_COND", "label": "exit" }, { "from": "NODE_COND", "to": "NODE_COND_PASS", "label": "true" }, { "from": "NODE_COMPUTE", "to": "NODE_GUARD", "label": "enforce_invariant" }, { "from": "NODE_GUARD", "to": "NODE_FINAL", "label": "complete" } ] }, "domain": "Taxation", "sliders": [ { "id": "single_payment", "label": "Single Payment Amount (in Rs)", "min": 10000, "max": 150000, "default": 45000, "unit": "Rs" }, { "id": "is_individual_huf", "label": "Contractor is Individual/HUF", "type": "toggle", "default": true }, { "id": "pan_provided", "label": "Valid PAN Furnished", "type": "toggle", "default": true } ], "eval_fn": "\n const sPay = vals.single_payment;\n const isInd = vals.is_individual_huf;\n const hasPan = vals.pan_provided;\n if (sPay <= 30000) {\n return { applicable: false, reason: \"Single contract payment <= Rs 30,000. Exempt unless aggregate > Rs 1,00,000.\", tax: 0, path: \"EXEMPT_SINGLE\" };\n }\n const rate = !hasPan ? 0.20 : (isInd ? 0.01 : 0.02);\n const taxRs = Math.round(sPay * rate);\n return {\n applicable: true,\n reason: `Payment > Rs 30,000 threshold. TDS rate: ${!hasPan ? '20% (Sec 206AA)' : (isInd ? '1% (Individual/HUF)' : '2% (Company/Firm)')}.`,\n taxable_base: `Rs ${sPay.toLocaleString('en-IN')}`,\n tax_payable: `Rs ${taxRs.toLocaleString('en-IN')}`,\n path: \"DEDUCT_194C\"\n };\n ", "llm_battle": { "query": "Payment of Rs 45,000 to an individual contractor with PAN. What is the TDS under Section 194C?", "mudraforge_answer": "PASS: Single sum exceeds Rs 30,000. Rate = 1% for individual. TDS = Rs 450.", "common_llm_hallucination": "FAIL: LLMs frequently confuse the 1% individual vs 2% corporate rate or cite the old Rs 20,000 threshold." } } }
{
"US_IRC_1_A": {
"id": "US_IRC_1_A",
"title": "IRC Section 1(a) -- Married Joint Return (5 Progressive Tax Brackets)",
"law": "26 U.S. Code Section 1(a)",
"category": "US Federal Income Tax",
"text": "(a) Married individuals filing joint returns and surviving spouses: There is hereby imposed on the taxable income of every married individual who makes a single return jointly with his spouse under section 6013, and of every surviving spouse: If taxable income is: Not over $36,900, the tax is 15% of taxable income. Over $36,900 but not over $89,150, the tax is $5,535, plus 28% of the excess over $36,900. Over $89,150 but not over $140,000, the tax is $20,165, plus 31% of the excess over $89,150. Over $140,000 but not over $250,000, the tax is $35,928.50, plus 36% of the excess over $140,000. Over $250,000, the tax is $75,528.50, plus 39.6% of the excess over $250,000.",
"ast": {
"schema_version": "mudraforge.statutory_ast.v1",
"generated_at_utc": "2026-11-21T09:21:30.504885+00:00",
"pipeline_version": "v6.1.0-prod",
"spec_id": "MF-SPEC-S1-V6.1.0",
"doc_id": "US_IRC_1_A",
"scope_name": "UsIrc1A",
"isAuthorizedToDisburse": false,
"stages_executed": [
"stage1",
"stage1_5",
"stage2",
"stage2b"
],
"stage_sources": {
"stage1": "model",
"stage1_5": "model",
"stage2": "model",
"stage2b": "model"
},
"source_text": "(a) Married individuals filing joint returns and surviving spouses: There is hereby imposed on the taxable income of every married individual who makes a single return jointly with his spouse under section 6013, and of every surviving spouse: If taxable income is: Not over $36,900, the tax is 15% of taxable income. Over $36,900 but not over $89,150, the tax is $5,535, plus 28% of the excess over $36,900. Over $89,150 but not over $140,000, the tax is $20,165, plus 31% of the excess over $89,150. Over $140,000 but not over $250,000, the tax is $35,928.50, plus 36% of the excess over $140,000. Over $250,000, the tax is $75,528.50, plus 39.6% of the excess over $250,000.",
"declarations": {
"inputs": [
{
"direction": "input",
"name": "income",
"catala_type": "money",
"root_branch": "NUMERIC_METRIC",
"catala_leaf": "BASE_INCOME",
"usvm_key": "taxableIncomePaisa",
"source_text": "taxable income",
"tokStart": 18,
"tokEnd": 19,
"is_custom_fallback": false
},
{
"direction": "input",
"name": "tax_amount",
"catala_type": "money",
"root_branch": "NUMERIC_METRIC",
"catala_leaf": "BASE_CUSTOM",
"usvm_key": "statutoryTaxPaisa",
"source_text": "tax",
"tokStart": 54,
"tokEnd": 54,
"is_custom_fallback": true
}
],
"local_aliases": [],
"deontic_targets": [],
"outputs": [
{
"direction": "output",
"name": "is_rule_applicable",
"catala_type": "boolean",
"description": "True when statutory COND clauses hold and no EXCEPTION applies."
},
{
"direction": "output",
"name": "computed_statutory_amount",
"catala_type": "money",
"description": "Deterministic monetary output derived from RULE_EFFECT clauses."
},
{
"direction": "output",
"name": "is_authorized_to_disburse",
"catala_type": "boolean",
"description": "MudraForge statutory invariant: calculation never authorizes disbursement.",
"invariant_value": false
}
]
},
"statutory_constants": {
"ACTOR_SCOPE": [
{
"text": "Married individuals",
"tokStart": 3,
"tokEnd": 4
},
{
"text": "surviving spouses",
"tokStart": 9,
"tokEnd": 10
},
{
"text": "married individual",
"tokStart": 22,
"tokEnd": 23
},
{
"text": "spouse",
"tokStart": 32,
"tokEnd": 32