{
  "schemaVersion": 1,
  "id": "axiscfo-implementation-examples-2026-10-29",
  "dataNotice": "Synthetic demonstration data.",
  "currency": "USD",
  "moneyUnit": "integer_cents",
  "publicAssetBase": "/assets/implementation-examples/2026-10-29/",
  "financialRules": {
    "amounts": "Money is validated and stored as safe integer cents; aggregate arithmetic uses BigInt and rejects overflow.",
    "margin": "Contribution divided by net revenue; display rounded to the nearest basis point, half away from zero. The exact numerator and denominator are retained.",
    "contribution": "Gross sales less refunds, product cost, fulfillment, platform fees and advertising; excludes fixed overhead, tax, financing and working-capital timing.",
    "duplicates": "Identical business IDs and fields retain the first source row and flag each later source. Conflicting duplicates fail validation.",
    "missing": "A missing source is never silently assumed zero. Variance needs one plan and actual metric for each channel; confirmed zeros require source rows."
  },
  "examples": [
    {
      "id": "payout-reconciliation",
      "route": "/examples/payout-reconciliation/",
      "serviceRoute": "/services/payout-reconciliation-automation/",
      "title": "From payout exports to a bank exception queue",
      "summary": "Match processor payouts to bank credits by explicit reference, retain the refund, exclude a proven duplicate and surface partial, missing, mismatched and late receipts.",
      "inputs": [
        "inputs/payout-reconciliation/config.json",
        "inputs/payout-reconciliation/payouts.csv",
        "inputs/payout-reconciliation/transactions.csv",
        "inputs/payout-reconciliation/bank.csv"
      ],
      "outputs": [
        "outputs/payout-reconciliation/result.json",
        "outputs/payout-reconciliation/payouts.csv",
        "outputs/payout-reconciliation/exceptions.csv",
        "outputs/payout-reconciliation/report.md"
      ],
      "resultPath": "outputs/payout-reconciliation/result.json",
      "expectedPath": "expected/payout-reconciliation.json",
      "period": {
        "start": "2026-09-01",
        "end": "2026-09-30",
        "asOf": "2026-10-03"
      },
      "reviewStatus": "requires_review",
      "claims": {
        "liveAI": false,
        "externalAPI": false,
        "productionConnector": false,
        "humanReviewPerformed": false,
        "clientResults": false
      },
      "kpis": [
        {
          "id": "declared-payouts",
          "label": "Declared payouts",
          "format": "money",
          "valueCents": 492300,
          "sourceIds": [
            "PO-01",
            "PO-02",
            "PO-03",
            "PO-04",
            "PO-05",
            "PO-06",
            "RC-CONFIG"
          ],
          "resultPointer": "/summary/declaredPayoutCents"
        },
        {
          "id": "linked-bank",
          "label": "Linked bank receipts",
          "format": "money",
          "valueCents": 408600,
          "sourceIds": [
            "BK-01",
            "BK-02",
            "BK-03",
            "BK-04",
            "BK-05",
            "BK-06",
            "PO-01",
            "PO-02",
            "PO-03",
            "PO-04",
            "PO-05",
            "PO-06",
            "RC-CONFIG"
          ],
          "resultPointer": "/summary/linkedBankCents"
        },
        {
          "id": "open-payouts",
          "label": "Open payout balance",
          "format": "money",
          "valueCents": 83700,
          "sourceIds": [
            "BK-01",
            "BK-02",
            "BK-03",
            "BK-04",
            "BK-05",
            "BK-06",
            "PO-01",
            "PO-02",
            "PO-03",
            "PO-04",
            "PO-05",
            "PO-06",
            "RC-CONFIG"
          ],
          "resultPointer": "/summary/openPayoutCents"
        },
        {
          "id": "source-difference",
          "label": "Processor / declaration difference",
          "format": "money",
          "valueCents": 500,
          "sourceIds": [
            "PO-01",
            "PO-02",
            "PO-03",
            "PO-04",
            "PO-05",
            "PO-06",
            "RC-CONFIG",
            "TX-01",
            "TX-02",
            "TX-03",
            "TX-04",
            "TX-05",
            "TX-07",
            "TX-08",
            "TX-09",
            "TX-10",
            "TX-11",
            "TX-12",
            "TX-13",
            "TX-14"
          ],
          "resultPointer": "/summary/sourceDifferenceCents"
        },
        {
          "id": "payouts-for-review",
          "label": "Payouts requiring review",
          "format": "count",
          "value": 5,
          "sourceIds": [
            "BK-01",
            "BK-02",
            "BK-03",
            "BK-04",
            "BK-05",
            "BK-06",
            "BK-07",
            "PO-01",
            "PO-02",
            "PO-03",
            "PO-04",
            "PO-05",
            "PO-06",
            "RC-CONFIG",
            "TX-01",
            "TX-02",
            "TX-03",
            "TX-04",
            "TX-05",
            "TX-06",
            "TX-07",
            "TX-08",
            "TX-09",
            "TX-10",
            "TX-11",
            "TX-12",
            "TX-13",
            "TX-14",
            "TX-15"
          ],
          "resultPointer": "/summary/payoutsRequiringReview"
        }
      ],
      "tables": [
        {
          "id": "payout-matches",
          "label": "Payouts and linked bank receipts",
          "columns": [
            {
              "key": "payoutId",
              "label": "Payout",
              "format": "text"
            },
            {
              "key": "status",
              "label": "Amount status",
              "format": "text"
            },
            {
              "key": "timingStatus",
              "label": "Date status",
              "format": "text"
            },
            {
              "key": "expectedCents",
              "label": "Declared",
              "format": "money"
            },
            {
              "key": "transactionNetCents",
              "label": "Processor net",
              "format": "money"
            },
            {
              "key": "bankCents",
              "label": "Bank receipts",
              "format": "money"
            },
            {
              "key": "remainingCents",
              "label": "Open balance",
              "format": "money"
            },
            {
              "key": "sourceIds",
              "label": "Source IDs",
              "format": "text"
            }
          ],
          "rows": [
            {
              "payoutId": "P-1001",
              "status": "matched",
              "timingStatus": "on_time",
              "sentOn": "2026-09-02",
              "expectedArrivalOn": "2026-09-04",
              "bankDates": [
                "2026-09-04"
              ],
              "expectedCents": 97000,
              "transactionNetCents": 97000,
              "bankCents": 97000,
              "remainingCents": 0,
              "sourceDifferenceCents": 0,
              "refundCents": 0,
              "calculationSourceIds": [
                "BK-01",
                "PO-01",
                "RC-CONFIG",
                "TX-01",
                "TX-02"
              ],
              "excludedSourceIds": [],
              "sourceIds": [
                "BK-01",
                "PO-01",
                "RC-CONFIG",
                "TX-01",
                "TX-02"
              ]
            },
            {
              "payoutId": "P-1002",
              "status": "matched",
              "timingStatus": "on_time",
              "sentOn": "2026-09-06",
              "expectedArrivalOn": "2026-09-08",
              "bankDates": [
                "2026-09-08"
              ],
              "expectedCents": 66000,
              "transactionNetCents": 66000,
              "bankCents": 66000,
              "remainingCents": 0,
              "sourceDifferenceCents": 0,
              "refundCents": -10000,
              "calculationSourceIds": [
                "BK-02",
                "PO-02",
                "RC-CONFIG",
                "TX-03",
                "TX-04",
                "TX-05"
              ],
              "excludedSourceIds": [
                "TX-06"
              ],
              "sourceIds": [
                "BK-02",
                "PO-02",
                "RC-CONFIG",
                "TX-03",
                "TX-04",
                "TX-05",
                "TX-06"
              ]
            },
            {
              "payoutId": "P-1003",
              "status": "partial_bank",
              "timingStatus": "on_time",
              "sentOn": "2026-09-10",
              "expectedArrivalOn": "2026-09-14",
              "bankDates": [
                "2026-09-12",
                "2026-09-14"
              ],
              "expectedCents": 145500,
              "transactionNetCents": 145500,
              "bankCents": 120000,
              "remainingCents": 25500,
              "sourceDifferenceCents": 0,
              "refundCents": 0,
              "calculationSourceIds": [
                "BK-03",
                "BK-04",
                "PO-03",
                "RC-CONFIG",
                "TX-07",
                "TX-08"
              ],
              "excludedSourceIds": [],
              "sourceIds": [
                "BK-03",
                "BK-04",
                "PO-03",
                "RC-CONFIG",
                "TX-07",
                "TX-08"
              ]
            },
            {
              "payoutId": "P-1004",
              "status": "source_mismatch",
              "timingStatus": "on_time",
              "sentOn": "2026-09-17",
              "expectedArrivalOn": "2026-09-19",
              "bankDates": [
                "2026-09-19"
              ],
              "expectedCents": 48000,
              "transactionNetCents": 48500,
              "bankCents": 48000,
              "remainingCents": 0,
              "sourceDifferenceCents": 500,
              "refundCents": 0,
              "calculationSourceIds": [
                "BK-05",
                "PO-04",
                "RC-CONFIG",
                "TX-09",
                "TX-10"
              ],
              "excludedSourceIds": [],
              "sourceIds": [
                "BK-05",
                "PO-04",
                "RC-CONFIG",
                "TX-09",
                "TX-10"
              ]
            },
            {
              "payoutId": "P-1005",
              "status": "missing_bank",
              "timingStatus": "overdue",
              "sentOn": "2026-09-23",
              "expectedArrivalOn": "2026-09-25",
              "bankDates": [],
              "expectedCents": 58200,
              "transactionNetCents": 58200,
              "bankCents": 0,
              "remainingCents": 58200,
              "sourceDifferenceCents": 0,
              "refundCents": 0,
              "calculationSourceIds": [
                "PO-05",
                "RC-CONFIG",
                "TX-11",
                "TX-12"
              ],
              "excludedSourceIds": [],
              "sourceIds": [
                "PO-05",
                "RC-CONFIG",
                "TX-11",
                "TX-12"
              ]
            },
            {
              "payoutId": "P-1006",
              "status": "matched",
              "timingStatus": "late",
              "sentOn": "2026-09-30",
              "expectedArrivalOn": "2026-10-02",
              "bankDates": [
                "2026-10-03"
              ],
              "expectedCents": 77600,
              "transactionNetCents": 77600,
              "bankCents": 77600,
              "remainingCents": 0,
              "sourceDifferenceCents": 0,
              "refundCents": 0,
              "calculationSourceIds": [
                "BK-06",
                "PO-06",
                "RC-CONFIG",
                "TX-13",
                "TX-14"
              ],
              "excludedSourceIds": [],
              "sourceIds": [
                "BK-06",
                "PO-06",
                "RC-CONFIG",
                "TX-13",
                "TX-14"
              ]
            }
          ],
          "resultPointer": "/rows"
        },
        {
          "id": "exceptions",
          "label": "Exceptions for review",
          "columns": [
            {
              "key": "code",
              "label": "Exception",
              "format": "text"
            },
            {
              "key": "amountCents",
              "label": "Amount",
              "format": "money"
            },
            {
              "key": "detail",
              "label": "Finding / action",
              "format": "text"
            },
            {
              "key": "sourceIds",
              "label": "Source IDs",
              "format": "text"
            }
          ],
          "rows": [
            {
              "code": "DUPLICATE_TRANSACTION",
              "severity": "review",
              "recordId": "T-1002-S",
              "payoutId": "P-1002",
              "amountCents": 80000,
              "detail": "Identical business record; TX-06 excluded and TX-03 retained.",
              "sourceIds": [
                "TX-03",
                "TX-06"
              ]
            },
            {
              "code": "LATE_BANK_CREDIT",
              "severity": "review",
              "payoutId": "P-1006",
              "amountCents": 77600,
              "detail": "Receipt is booked after expected arrival.",
              "sourceIds": [
                "BK-06",
                "PO-06",
                "RC-CONFIG"
              ]
            },
            {
              "code": "MISSING_BANK_CREDIT",
              "severity": "review",
              "payoutId": "P-1005",
              "amountCents": 58200,
              "detail": "No eligible bank receipt is linked as of the cutoff.",
              "sourceIds": [
                "PO-05",
                "RC-CONFIG",
                "TX-11",
                "TX-12"
              ]
            },
            {
              "code": "PARTIAL_BANK_CREDIT",
              "severity": "review",
              "payoutId": "P-1003",
              "amountCents": 25500,
              "detail": "Linked receipts cover only part of the declared payout.",
              "sourceIds": [
                "BK-03",
                "BK-04",
                "PO-03",
                "RC-CONFIG",
                "TX-07",
                "TX-08"
              ]
            },
            {
              "code": "PAYOUT_SOURCE_MISMATCH",
              "severity": "review",
              "payoutId": "P-1004",
              "amountCents": 500,
              "detail": "Processor net minus declared payout is nonzero; bank equality does not resolve this.",
              "sourceIds": [
                "BK-05",
                "PO-04",
                "RC-CONFIG",
                "TX-09",
                "TX-10"
              ]
            },
            {
              "code": "UNASSIGNED_BANK_CREDIT",
              "severity": "review",
              "recordId": "B-UNKNOWN",
              "amountCents": 25000,
              "detail": "No payout declaration has this exact reference; no amount/date guess was made.",
              "sourceIds": [
                "BK-07"
              ]
            },
            {
              "code": "UNASSIGNED_TRANSACTION",
              "severity": "review",
              "recordId": "T-UNKNOWN",
              "amountCents": 20000,
              "detail": "No payout declaration has this exact reference; investigate the source record.",
              "sourceIds": [
                "TX-15"
              ]
            }
          ],
          "resultPointer": "/exceptions"
        }
      ],
      "workflow": [
        {
          "stage": "Read",
          "detail": "Read the payout declaration, signed processor lines and bank credits."
        },
        {
          "stage": "Structure",
          "detail": "Validate dates, currency, source IDs and integer cents; separate duplicates and excluded records."
        },
        {
          "stage": "Calculate",
          "detail": "Sum signed processor lines and exact-reference bank credits with safe integer arithmetic."
        },
        {
          "stage": "Explain",
          "detail": "Produce a source-linked exception queue with amount and date findings."
        },
        {
          "stage": "Review",
          "detail": "Confirm source completeness, investigate exceptions and approve classifications before operational use."
        }
      ],
      "aiProjectConnection": "This runnable pattern shows the record, structure, calculation, explanation and review stages of an implementation. An AI-assisted project may add extraction or explanation with a configured provider; financial controls remain deterministic.",
      "reviewRequired": [
        "Confirm the duplicate and original source record.",
        "Resolve the processor/declaration discrepancy.",
        "Investigate partial, missing and late receipts plus unassigned references."
      ],
      "commands": {
        "run": "node site/implementation-examples/2026-10-29/run.mjs --example payout-reconciliation --output site/implementation-examples/2026-10-29/outputs/payout-reconciliation",
        "customInputs": "node site/implementation-examples/2026-10-29/run.mjs --example payout-reconciliation --input <source-directory> --output <directory>",
        "test": "node --test site/implementation-examples/2026-10-29/tests/*.test.mjs"
      }
    },
    {
      "id": "variance-reporting",
      "route": "/examples/variance-reporting/",
      "serviceRoute": "/services/financial-reporting-automation/",
      "title": "From monthly source rows to an explained contribution bridge",
      "summary": "Compare September plan and actuals on the same contribution definition, trace every line to a source and explain the complete change through six arithmetic drivers.",
      "inputs": [
        "inputs/variance-reporting/config.json",
        "inputs/variance-reporting/plan.csv",
        "inputs/variance-reporting/revenue.csv",
        "inputs/variance-reporting/costs.csv"
      ],
      "outputs": [
        "outputs/variance-reporting/result.json",
        "outputs/variance-reporting/contribution.csv",
        "outputs/variance-reporting/bridge.csv",
        "outputs/variance-reporting/exceptions.csv",
        "outputs/variance-reporting/report.md"
      ],
      "resultPath": "outputs/variance-reporting/result.json",
      "expectedPath": "expected/variance-reporting.json",
      "period": {
        "start": "2026-09-01",
        "end": "2026-09-30"
      },
      "reviewStatus": "requires_review",
      "claims": {
        "liveAI": false,
        "externalAPI": false,
        "productionConnector": false,
        "humanReviewPerformed": false,
        "clientResults": false
      },
      "kpis": [
        {
          "id": "net-revenue",
          "label": "Actual net revenue",
          "format": "money",
          "valueCents": 1910000,
          "sourceIds": [
            "CT-01",
            "CT-02",
            "CT-03",
            "CT-04",
            "CT-05",
            "CT-06",
            "CT-07",
            "CT-08",
            "PL-01",
            "PL-02",
            "PL-03",
            "PL-04",
            "PL-05",
            "PL-06",
            "PL-07",
            "PL-08",
            "PL-09",
            "PL-10",
            "PL-11",
            "PL-12",
            "RV-01",
            "RV-02",
            "RV-03",
            "RV-04",
            "RV-05",
            "RV-06",
            "VR-CONFIG"
          ],
          "resultPointer": "/summary/actualRevenueCents"
        },
        {
          "id": "actual-contribution",
          "label": "Actual contribution",
          "format": "money",
          "valueCents": 468000,
          "sourceIds": [
            "CT-01",
            "CT-02",
            "CT-03",
            "CT-04",
            "CT-05",
            "CT-06",
            "CT-07",
            "CT-08",
            "PL-01",
            "PL-02",
            "PL-03",
            "PL-04",
            "PL-05",
            "PL-06",
            "PL-07",
            "PL-08",
            "PL-09",
            "PL-10",
            "PL-11",
            "PL-12",
            "RV-01",
            "RV-02",
            "RV-03",
            "RV-04",
            "RV-05",
            "RV-06",
            "VR-CONFIG"
          ],
          "resultPointer": "/summary/actualContributionCents"
        },
        {
          "id": "contribution-variance",
          "label": "Contribution vs plan",
          "format": "money",
          "valueCents": -86000,
          "sourceIds": [
            "CT-01",
            "CT-02",
            "CT-03",
            "CT-04",
            "CT-05",
            "CT-06",
            "CT-07",
            "CT-08",
            "PL-01",
            "PL-02",
            "PL-03",
            "PL-04",
            "PL-05",
            "PL-06",
            "PL-07",
            "PL-08",
            "PL-09",
            "PL-10",
            "PL-11",
            "PL-12",
            "RV-01",
            "RV-02",
            "RV-03",
            "RV-04",
            "RV-05",
            "RV-06",
            "VR-CONFIG"
          ],
          "resultPointer": "/summary/varianceCents"
        },
        {
          "id": "actual-margin",
          "label": "Actual contribution margin",
          "format": "percent",
          "value": 24.5,
          "basisPoints": 2450,
          "ratio": {
            "numeratorCents": 468000,
            "denominatorCents": 1910000
          },
          "sourceIds": [
            "CT-01",
            "CT-02",
            "CT-03",
            "CT-04",
            "CT-05",
            "CT-06",
            "CT-07",
            "CT-08",
            "PL-01",
            "PL-02",
            "PL-03",
            "PL-04",
            "PL-05",
            "PL-06",
            "PL-07",
            "PL-08",
            "PL-09",
            "PL-10",
            "PL-11",
            "PL-12",
            "RV-01",
            "RV-02",
            "RV-03",
            "RV-04",
            "RV-05",
            "RV-06",
            "VR-CONFIG"
          ],
          "resultPointer": "/summary/actualMarginBasisPoints"
        }
      ],
      "tables": [
        {
          "id": "contribution",
          "label": "Contribution by channel",
          "columns": [
            {
              "key": "channel",
              "label": "Channel",
              "format": "text"
            },
            {
              "key": "planRevenueCents",
              "label": "Plan net revenue",
              "format": "money"
            },
            {
              "key": "actualRevenueCents",
              "label": "Actual net revenue",
              "format": "money"
            },
            {
              "key": "planContributionCents",
              "label": "Plan contribution",
              "format": "money"
            },
            {
              "key": "actualContributionCents",
              "label": "Actual contribution",
              "format": "money"
            },
            {
              "key": "varianceCents",
              "label": "Change",
              "format": "money"
            },
            {
              "key": "sourceIds",
              "label": "Source IDs",
              "format": "text"
            }
          ],
          "rows": [
            {
              "channel": "DTC",
              "planRevenueCents": 1140000,
              "actualRevenueCents": 1200000,
              "planCostCents": 786000,
              "actualCostCents": 884000,
              "planContributionCents": 354000,
              "actualContributionCents": 316000,
              "varianceCents": -38000,
              "metrics": [
                {
                  "metric": "gross_sales",
                  "label": "Gross sales",
                  "planCents": 1200000,
                  "actualCents": 1300000,
                  "deltaCents": 100000,
                  "contributionEffectCents": 100000,
                  "planSourceIds": [
                    "PL-01"
                  ],
                  "actualSourceIds": [
                    "RV-01",
                    "RV-02"
                  ],
                  "sourceIds": [
                    "PL-01",
                    "RV-01",
                    "RV-02",
                    "VR-CONFIG"
                  ]
                },
                {
                  "metric": "refunds",
                  "label": "Refunds",
                  "planCents": 60000,
                  "actualCents": 100000,
                  "deltaCents": 40000,
                  "contributionEffectCents": -40000,
                  "planSourceIds": [
                    "PL-02"
                  ],
                  "actualSourceIds": [
                    "RV-03"
                  ],
                  "sourceIds": [
                    "PL-02",
                    "RV-03",
                    "VR-CONFIG"
                  ]
                },
                {
                  "metric": "product_cost",
                  "label": "Product cost",
                  "planCents": 420000,
                  "actualCents": 470000,
                  "deltaCents": 50000,
                  "contributionEffectCents": -50000,
                  "planSourceIds": [
                    "PL-03"
                  ],
                  "actualSourceIds": [
                    "CT-01"
                  ],
                  "sourceIds": [
                    "CT-01",
                    "PL-03",
                    "VR-CONFIG"
                  ]
                },
                {
                  "metric": "fulfillment",
                  "label": "Fulfillment",
                  "planCents": 90000,
                  "actualCents": 100000,
                  "deltaCents": 10000,
                  "contributionEffectCents": -10000,
                  "planSourceIds": [
                    "PL-04"
                  ],
                  "actualSourceIds": [
                    "CT-02"
                  ],
                  "sourceIds": [
                    "CT-02",
                    "PL-04",
                    "VR-CONFIG"
                  ]
                },
                {
                  "metric": "platform_fees",
                  "label": "Platform fees",
                  "planCents": 36000,
                  "actualCents": 39000,
                  "deltaCents": 3000,
                  "contributionEffectCents": -3000,
                  "planSourceIds": [
                    "PL-05"
                  ],
                  "actualSourceIds": [
                    "CT-03"
                  ],
                  "sourceIds": [
                    "CT-03",
                    "PL-05",
                    "VR-CONFIG"
                  ]
                },
                {
                  "metric": "advertising",
                  "label": "Advertising",
                  "planCents": 240000,
                  "actualCents": 275000,
                  "deltaCents": 35000,
                  "contributionEffectCents": -35000,
                  "planSourceIds": [
                    "PL-06"
                  ],
                  "actualSourceIds": [
                    "CT-04"
                  ],
                  "sourceIds": [
                    "CT-04",
                    "PL-06",
                    "VR-CONFIG"
                  ]
                }
              ],
              "sourceIds": [
                "CT-01",
                "CT-02",
                "CT-03",
                "CT-04",
                "PL-01",
                "PL-02",
                "PL-03",
                "PL-04",
                "PL-05",
                "PL-06",
                "RV-01",
                "RV-02",
                "RV-03",
                "VR-CONFIG"
              ]
            },
            {
              "channel": "Marketplace",
              "planRevenueCents": 760000,
              "actualRevenueCents": 710000,
              "planCostCents": 560000,
              "actualCostCents": 558000,
              "planContributionCents": 200000,
              "actualContributionCents": 152000,
              "varianceCents": -48000,
              "metrics": [
                {
                  "metric": "gross_sales",
                  "label": "Gross sales",
                  "planCents": 800000,
                  "actualCents": 740000,
                  "deltaCents": -60000,
                  "contributionEffectCents": -60000,
                  "planSourceIds": [
                    "PL-07"
                  ],
                  "actualSourceIds": [
                    "RV-04",
                    "RV-05"
                  ],
                  "sourceIds": [
                    "PL-07",
                    "RV-04",
                    "RV-05",
                    "VR-CONFIG"
                  ]
                },
                {
                  "metric": "refunds",
                  "label": "Refunds",
                  "planCents": 40000,
                  "actualCents": 30000,
                  "deltaCents": -10000,
                  "contributionEffectCents": 10000,
                  "planSourceIds": [
                    "PL-08"
                  ],
                  "actualSourceIds": [
                    "RV-06"
                  ],
                  "sourceIds": [
                    "PL-08",
                    "RV-06",
                    "VR-CONFIG"
                  ]
                },
                {
                  "metric": "product_cost",
                  "label": "Product cost",
                  "planCents": 280000,
                  "actualCents": 260000,
                  "deltaCents": -20000,
                  "contributionEffectCents": 20000,
                  "planSourceIds": [
                    "PL-09"
                  ],
                  "actualSourceIds": [
                    "CT-05"
                  ],
                  "sourceIds": [
                    "CT-05",
                    "PL-09",
                    "VR-CONFIG"
                  ]
                },
                {
                  "metric": "fulfillment",
                  "label": "Fulfillment",
                  "planCents": 80000,
                  "actualCents": 85000,
                  "deltaCents": 5000,
                  "contributionEffectCents": -5000,
                  "planSourceIds": [
                    "PL-10"
                  ],
                  "actualSourceIds": [
                    "CT-06"
                  ],
                  "sourceIds": [
                    "CT-06",
                    "PL-10",
                    "VR-CONFIG"
                  ]
                },
                {
                  "metric": "platform_fees",
                  "label": "Platform fees",
                  "planCents": 120000,
                  "actualCents": 118000,
                  "deltaCents": -2000,
                  "contributionEffectCents": 2000,
                  "planSourceIds": [
                    "PL-11"
                  ],
                  "actualSourceIds": [
                    "CT-07"
                  ],
                  "sourceIds": [
                    "CT-07",
                    "PL-11",
                    "VR-CONFIG"
                  ]
                },
                {
                  "metric": "advertising",
                  "label": "Advertising",
                  "planCents": 80000,
                  "actualCents": 95000,
                  "deltaCents": 15000,
                  "contributionEffectCents": -15000,
                  "planSourceIds": [
                    "PL-12"
                  ],
                  "actualSourceIds": [
                    "CT-08"
                  ],
                  "sourceIds": [
                    "CT-08",
                    "PL-12",
                    "VR-CONFIG"
                  ]
                }
              ],
              "sourceIds": [
                "CT-05",
                "CT-06",
                "CT-07",
                "CT-08",
                "PL-07",
                "PL-08",
                "PL-09",
                "PL-10",
                "PL-11",
                "PL-12",
                "RV-04",
                "RV-05",
                "RV-06",
                "VR-CONFIG"
              ]
            }
          ],
          "resultPointer": "/rows"
        },
        {
          "id": "variance-bridge",
          "label": "Why contribution changed",
          "columns": [
            {
              "key": "label",
              "label": "Driver",
              "format": "text"
            },
            {
              "key": "planCents",
              "label": "Plan",
              "format": "money"
            },
            {
              "key": "actualCents",
              "label": "Actual",
              "format": "money"
            },
            {
              "key": "effectCents",
              "label": "Contribution effect",
              "format": "money"
            },
            {
              "key": "sourceIds",
              "label": "Source IDs",
              "format": "text"
            }
          ],
          "rows": [
            {
              "metric": "gross_sales",
              "label": "Gross sales",
              "planCents": 2000000,
              "actualCents": 2040000,
              "effectCents": 40000,
              "sourceIds": [
                "PL-01",
                "PL-07",
                "RV-01",
                "RV-02",
                "RV-04",
                "RV-05",
                "VR-CONFIG"
              ]
            },
            {
              "metric": "refunds",
              "label": "Refunds",
              "planCents": 100000,
              "actualCents": 130000,
              "effectCents": -30000,
              "sourceIds": [
                "PL-02",
                "PL-08",
                "RV-03",
                "RV-06",
                "VR-CONFIG"
              ]
            },
            {
              "metric": "product_cost",
              "label": "Product cost",
              "planCents": 700000,
              "actualCents": 730000,
              "effectCents": -30000,
              "sourceIds": [
                "CT-01",
                "CT-05",
                "PL-03",
                "PL-09",
                "VR-CONFIG"
              ]
            },
            {
              "metric": "fulfillment",
              "label": "Fulfillment",
              "planCents": 170000,
              "actualCents": 185000,
              "effectCents": -15000,
              "sourceIds": [
                "CT-02",
                "CT-06",
                "PL-04",
                "PL-10",
                "VR-CONFIG"
              ]
            },
            {
              "metric": "platform_fees",
              "label": "Platform fees",
              "planCents": 156000,
              "actualCents": 157000,
              "effectCents": -1000,
              "sourceIds": [
                "CT-03",
                "CT-07",
                "PL-05",
                "PL-11",
                "VR-CONFIG"
              ]
            },
            {
              "metric": "advertising",
              "label": "Advertising",
              "planCents": 320000,
              "actualCents": 370000,
              "effectCents": -50000,
              "sourceIds": [
                "CT-04",
                "CT-08",
                "PL-06",
                "PL-12",
                "VR-CONFIG"
              ]
            }
          ],
          "resultPointer": "/bridge"
        },
        {
          "id": "exceptions",
          "label": "Period exclusions for review",
          "columns": [
            {
              "key": "code",
              "label": "Exception",
              "format": "text"
            },
            {
              "key": "amountCents",
              "label": "Excluded amount",
              "format": "money"
            },
            {
              "key": "detail",
              "label": "Finding",
              "format": "text"
            },
            {
              "key": "sourceIds",
              "label": "Source IDs",
              "format": "text"
            }
          ],
          "rows": [
            {
              "code": "EXCLUDED_OUTSIDE_PERIOD",
              "severity": "info",
              "recordId": "COST-OCT-A",
              "amountCents": 50000,
              "detail": "Record falls outside the exact plan/actual period and contributes zero to this report.",
              "sourceIds": [
                "CT-09",
                "VR-CONFIG"
              ]
            },
            {
              "code": "EXCLUDED_OUTSIDE_PERIOD",
              "severity": "info",
              "recordId": "ORDER-AUG-1",
              "amountCents": 90000,
              "detail": "Record falls outside the exact plan/actual period and contributes zero to this report.",
              "sourceIds": [
                "RV-07",
                "VR-CONFIG"
              ]
            }
          ],
          "resultPointer": "/exceptions"
        }
      ],
      "workflow": [
        {
          "stage": "Read",
          "detail": "Read the approved period plan, revenue/refund rows and classified cost rows."
        },
        {
          "stage": "Structure",
          "detail": "Validate dates, currency, source IDs and integer cents; separate duplicates and excluded records."
        },
        {
          "stage": "Calculate",
          "detail": "Calculate net revenue, contribution, margins and the six-component bridge with exact cents."
        },
        {
          "stage": "Explain",
          "detail": "Explain the arithmetic effect of each revenue, refund and cost difference."
        },
        {
          "stage": "Review",
          "detail": "Confirm source completeness, investigate exceptions and approve classifications before operational use."
        }
      ],
      "aiProjectConnection": "This runnable pattern shows the record, structure, calculation, explanation and review stages of an implementation. An AI-assisted project may add extraction or explanation with a configured provider; financial controls remain deterministic.",
      "reviewRequired": [
        "Confirm period completeness and account classification.",
        "Approve the contribution definition and excluded source rows.",
        "Review the arithmetic drivers without inferring causation."
      ],
      "commands": {
        "run": "node site/implementation-examples/2026-10-29/run.mjs --example variance-reporting --output site/implementation-examples/2026-10-29/outputs/variance-reporting",
        "customInputs": "node site/implementation-examples/2026-10-29/run.mjs --example variance-reporting --input <source-directory> --output <directory>",
        "test": "node --test site/implementation-examples/2026-10-29/tests/*.test.mjs"
      }
    }
  ],
  "assets": [
    {
      "path": "README.md",
      "label": "README.md",
      "mediaType": "text/markdown",
      "role": "documentation",
      "bytes": 10792,
      "sha256": "379d85a85c3628a25103cc8c4fbb09ccd27019c07b2a641b1f124e2a0cbdb282",
      "downloadPath": "/assets/implementation-examples/2026-10-29/README.md"
    },
    {
      "path": "expected/answer-key.md",
      "label": "expected/answer-key.md",
      "mediaType": "text/markdown",
      "role": "expected",
      "bytes": 4121,
      "sha256": "10f8fd08004af9fbc85cc50533d8367b9f4b67517841d208cc8c85f480d476ad",
      "downloadPath": "/assets/implementation-examples/2026-10-29/expected/answer-key.md"
    },
    {
      "path": "expected/payout-reconciliation.json",
      "label": "expected/payout-reconciliation.json",
      "mediaType": "application/json",
      "role": "expected",
      "bytes": 1852,
      "sha256": "61b3eab6476ffd3167fc80191d6a1ecf636e8d17072e1afbe8e88c127dba55bf",
      "downloadPath": "/assets/implementation-examples/2026-10-29/expected/payout-reconciliation.json"
    },
    {
      "path": "expected/variance-reporting.json",
      "label": "expected/variance-reporting.json",
      "mediaType": "application/json",
      "role": "expected",
      "bytes": 1480,
      "sha256": "918bcea03de45224c9733ddae54adf2c639a1b62e3cb92482c4722f69d9a2ed1",
      "downloadPath": "/assets/implementation-examples/2026-10-29/expected/variance-reporting.json"
    },
    {
      "path": "finance.mjs",
      "label": "finance.mjs",
      "mediaType": "text/javascript",
      "role": "source",
      "bytes": 28717,
      "sha256": "ed293346b23c004eadca688f0fa1b49d051366f54b3525221657632695c9b639",
      "downloadPath": "/assets/implementation-examples/2026-10-29/finance.mjs"
    },
    {
      "path": "index.mjs",
      "label": "index.mjs",
      "mediaType": "text/javascript",
      "role": "source",
      "bytes": 152,
      "sha256": "5b395a79f373ba965f666eec604c4f9fdf49cb96747f4965b3471574869fc082",
      "downloadPath": "/assets/implementation-examples/2026-10-29/index.mjs"
    },
    {
      "path": "inputs/payout-reconciliation/bank.csv",
      "label": "inputs/payout-reconciliation/bank.csv",
      "mediaType": "text/csv",
      "role": "input",
      "bytes": 359,
      "sha256": "03aae63f31b01ee20b0264275e20662541ad20b71435abcf52cf2fdcd74dd4b9",
      "downloadPath": "/assets/implementation-examples/2026-10-29/inputs/payout-reconciliation/bank.csv"
    },
    {
      "path": "inputs/payout-reconciliation/config.json",
      "label": "inputs/payout-reconciliation/config.json",
      "mediaType": "application/json",
      "role": "input",
      "bytes": 139,
      "sha256": "a8151da7e0da127ce162f90e54afb3aec2a7b0afc70d5f106fdd3d1b1ac21899",
      "downloadPath": "/assets/implementation-examples/2026-10-29/inputs/payout-reconciliation/config.json"
    },
    {
      "path": "inputs/payout-reconciliation/payouts.csv",
      "label": "inputs/payout-reconciliation/payouts.csv",
      "mediaType": "text/csv",
      "role": "input",
      "bytes": 343,
      "sha256": "d52781980b26df9e1e2a0e94a8026a6addc502cffd6b0260c01587ac91eb25ac",
      "downloadPath": "/assets/implementation-examples/2026-10-29/inputs/payout-reconciliation/payouts.csv"
    },
    {
      "path": "inputs/payout-reconciliation/transactions.csv",
      "label": "inputs/payout-reconciliation/transactions.csv",
      "mediaType": "text/csv",
      "role": "input",
      "bytes": 861,
      "sha256": "a1768f3f5c19790cfba1b9ad1a0047a378dd46229ebd802df6232f444448846c",
      "downloadPath": "/assets/implementation-examples/2026-10-29/inputs/payout-reconciliation/transactions.csv"
    },
    {
      "path": "inputs/variance-reporting/config.json",
      "label": "inputs/variance-reporting/config.json",
      "mediaType": "application/json",
      "role": "input",
      "bytes": 256,
      "sha256": "557bf17e51fd2b7a732dc206dee37a978ec8cd28e4ef94e7db40e481cc18bc3c",
      "downloadPath": "/assets/implementation-examples/2026-10-29/inputs/variance-reporting/config.json"
    },
    {
      "path": "inputs/variance-reporting/costs.csv",
      "label": "inputs/variance-reporting/costs.csv",
      "mediaType": "text/csv",
      "role": "input",
      "bytes": 591,
      "sha256": "bcd15148fa7a866886673c48a92bf9399978cc73758641a023ee28e935d38938",
      "downloadPath": "/assets/implementation-examples/2026-10-29/inputs/variance-reporting/costs.csv"
    },
    {
      "path": "inputs/variance-reporting/plan.csv",
      "label": "inputs/variance-reporting/plan.csv",
      "mediaType": "text/csv",
      "role": "input",
      "bytes": 912,
      "sha256": "3933bba04765826b550cdab1ca6d605f9b037af8ab792ac0b0b42c5d16fe6c99",
      "downloadPath": "/assets/implementation-examples/2026-10-29/inputs/variance-reporting/plan.csv"
    },
    {
      "path": "inputs/variance-reporting/revenue.csv",
      "label": "inputs/variance-reporting/revenue.csv",
      "mediaType": "text/csv",
      "role": "input",
      "bytes": 438,
      "sha256": "9af676e57b9699d6c574bf066e1091214fe1de826878df928344573e3374b1c8",
      "downloadPath": "/assets/implementation-examples/2026-10-29/inputs/variance-reporting/revenue.csv"
    },
    {
      "path": "interface.json",
      "label": "interface.json",
      "mediaType": "application/json",
      "role": "documentation",
      "bytes": 5998,
      "sha256": "b55316e284698a45499be9be948413ef4f385cd526105b5b0757270e98a1f32a",
      "downloadPath": "/assets/implementation-examples/2026-10-29/interface.json"
    },
    {
      "path": "io.mjs",
      "label": "io.mjs",
      "mediaType": "text/javascript",
      "role": "source",
      "bytes": 14809,
      "sha256": "4da0cc48c6dda9dc932fbc4017cf850a854b78ea2424455d5d0c7557cfd2524a",
      "downloadPath": "/assets/implementation-examples/2026-10-29/io.mjs"
    },
    {
      "path": "manifest.mjs",
      "label": "manifest.mjs",
      "mediaType": "text/javascript",
      "role": "source",
      "bytes": 8157,
      "sha256": "963f62eb82739e7488bc2471030111e4c87b50138f3926da08ac97a3ac0edb3c",
      "downloadPath": "/assets/implementation-examples/2026-10-29/manifest.mjs"
    },
    {
      "path": "outputs/payout-reconciliation/exceptions.csv",
      "label": "outputs/payout-reconciliation/exceptions.csv",
      "mediaType": "text/csv",
      "role": "output",
      "bytes": 976,
      "sha256": "a2aa44062c03b1394f3624782c2114ac551e15a7f3b8281ce97b2f2a650599f3",
      "downloadPath": "/assets/implementation-examples/2026-10-29/outputs/payout-reconciliation/exceptions.csv"
    },
    {
      "path": "outputs/payout-reconciliation/payouts.csv",
      "label": "outputs/payout-reconciliation/payouts.csv",
      "mediaType": "text/csv",
      "role": "output",
      "bytes": 1172,
      "sha256": "1302a6e77fb3cbf21bcebd4b66e2381c0cdbe5d86c00e9a98ef0fea8149e4e61",
      "downloadPath": "/assets/implementation-examples/2026-10-29/outputs/payout-reconciliation/payouts.csv"
    },
    {
      "path": "outputs/payout-reconciliation/report.md",
      "label": "outputs/payout-reconciliation/report.md",
      "mediaType": "text/markdown",
      "role": "output",
      "bytes": 6033,
      "sha256": "3f9dddc9016813ef5d2774447365f54cefc2fd33cd6a6256a57bcd2baf143a16",
      "downloadPath": "/assets/implementation-examples/2026-10-29/outputs/payout-reconciliation/report.md"
    },
    {
      "path": "outputs/payout-reconciliation/result.json",
      "label": "outputs/payout-reconciliation/result.json",
      "mediaType": "application/json",
      "role": "output",
      "bytes": 24881,
      "sha256": "dc45e2f8464c2a8434d23b11e6699648c9e8976c175bdca70b5496e007aef3fe",
      "downloadPath": "/assets/implementation-examples/2026-10-29/outputs/payout-reconciliation/result.json"
    },
    {
      "path": "outputs/variance-reporting/bridge.csv",
      "label": "outputs/variance-reporting/bridge.csv",
      "mediaType": "text/csv",
      "role": "output",
      "bytes": 558,
      "sha256": "6e0fe45d64a06d0572b86d9f3efa38356c59848a92c8c6a02fb9786947688902",
      "downloadPath": "/assets/implementation-examples/2026-10-29/outputs/variance-reporting/bridge.csv"
    },
    {
      "path": "outputs/variance-reporting/contribution.csv",
      "label": "outputs/variance-reporting/contribution.csv",
      "mediaType": "text/csv",
      "role": "output",
      "bytes": 450,
      "sha256": "c5553dc448108e8d4102503b26222c3cf53906d7e4c3771ffa42f62ab7b48eec",
      "downloadPath": "/assets/implementation-examples/2026-10-29/outputs/variance-reporting/contribution.csv"
    },
    {
      "path": "outputs/variance-reporting/exceptions.csv",
      "label": "outputs/variance-reporting/exceptions.csv",
      "mediaType": "text/csv",
      "role": "output",
      "bytes": 366,
      "sha256": "43f0b7198dae04e8b47bac6fb12bae4e7864ac97cba4b94aa0082c7537b314f0",
      "downloadPath": "/assets/implementation-examples/2026-10-29/outputs/variance-reporting/exceptions.csv"
    },
    {
      "path": "outputs/variance-reporting/report.md",
      "label": "outputs/variance-reporting/report.md",
      "mediaType": "text/markdown",
      "role": "output",
      "bytes": 6279,
      "sha256": "62922b502e33484bd9fff6e1fc30c4edd1e6558ff6585ff66891c76f2a33f2b5",
      "downloadPath": "/assets/implementation-examples/2026-10-29/outputs/variance-reporting/report.md"
    },
    {
      "path": "outputs/variance-reporting/result.json",
      "label": "outputs/variance-reporting/result.json",
      "mediaType": "application/json",
      "role": "output",
      "bytes": 32101,
      "sha256": "a7100ff7c212dc58bd0acfe2aa1789a16deb09995065c59546c41e7cd3b38e4e",
      "downloadPath": "/assets/implementation-examples/2026-10-29/outputs/variance-reporting/result.json"
    },
    {
      "path": "refresh-pack.mjs",
      "label": "refresh-pack.mjs",
      "mediaType": "text/javascript",
      "role": "source",
      "bytes": 1883,
      "sha256": "28fadd9746c32c41b2f4d893191859fbc46d3c518bef78256a75d540498446a6",
      "downloadPath": "/assets/implementation-examples/2026-10-29/refresh-pack.mjs"
    },
    {
      "path": "run.mjs",
      "label": "run.mjs",
      "mediaType": "text/javascript",
      "role": "source",
      "bytes": 1495,
      "sha256": "26c8275a3b9ae64c121c64466814330a46de23be00c34aa85f3bbafb67ea1d4f",
      "downloadPath": "/assets/implementation-examples/2026-10-29/run.mjs"
    },
    {
      "path": "tests/atomic-write.test.mjs",
      "label": "tests/atomic-write.test.mjs",
      "mediaType": "text/javascript",
      "role": "test",
      "bytes": 4098,
      "sha256": "db88089d5a8e32c1ddb8b0899e6617a4469234a3a130413eee94bdbeed141938",
      "downloadPath": "/assets/implementation-examples/2026-10-29/tests/atomic-write.test.mjs"
    },
    {
      "path": "tests/finance.test.mjs",
      "label": "tests/finance.test.mjs",
      "mediaType": "text/javascript",
      "role": "test",
      "bytes": 10553,
      "sha256": "37240403c5904e531c6fa4065102fce37629ab7f1606e9d744c7b559d60cf61c",
      "downloadPath": "/assets/implementation-examples/2026-10-29/tests/finance.test.mjs"
    },
    {
      "path": "tests/helpers.mjs",
      "label": "tests/helpers.mjs",
      "mediaType": "text/javascript",
      "role": "test",
      "bytes": 1177,
      "sha256": "b3e07185855a7e5ad8ef04104579b6c1d3b9271adc75d60a65fc4127287e0b84",
      "downloadPath": "/assets/implementation-examples/2026-10-29/tests/helpers.mjs"
    },
    {
      "path": "tests/io.test.mjs",
      "label": "tests/io.test.mjs",
      "mediaType": "text/javascript",
      "role": "test",
      "bytes": 9571,
      "sha256": "a3ef99368f8ad1653e8a630a1cb06bb3a05c233c3c97ca25f5e4b23a60e74617",
      "downloadPath": "/assets/implementation-examples/2026-10-29/tests/io.test.mjs"
    },
    {
      "path": "tests/package.test.mjs",
      "label": "tests/package.test.mjs",
      "mediaType": "text/javascript",
      "role": "test",
      "bytes": 3961,
      "sha256": "d816f45ecdc56811b5e6c2b9df321f769fb7f659d8d56a17258993e709a6c8a1",
      "downloadPath": "/assets/implementation-examples/2026-10-29/tests/package.test.mjs"
    },
    {
      "path": "tests/review.test.mjs",
      "label": "tests/review.test.mjs",
      "mediaType": "text/javascript",
      "role": "test",
      "bytes": 1992,
      "sha256": "57a54cf68caebab6b8326f018428d7fa8d08ca27e088091684ce92ab9d22bb33",
      "downloadPath": "/assets/implementation-examples/2026-10-29/tests/review.test.mjs"
    },
    {
      "path": "verify.mjs",
      "label": "verify.mjs",
      "mediaType": "text/javascript",
      "role": "source",
      "bytes": 5351,
      "sha256": "68ce508e31bdf7834706b9260c8bdd48af2b089d9865844d7f71d5ace4b8d1ba",
      "downloadPath": "/assets/implementation-examples/2026-10-29/verify.mjs"
    }
  ]
}
