bilig

Evaluate WorkPaper in a Node service

Use this when the calculation model belongs in code, not in a user-edited Excel file. The evaluator starts from an empty directory, creates a small WorkPaper service, writes one input, reads a dependent formula, serializes the WorkPaper document, restores it, and verifies the same result.

One command

npm create @bilig/workpaper@latest pricing-workpaper && cd pricing-workpaper && npm install && npm run smoke

Expected proof

The starter smoke prints this shape:

{
  "before": {
    "summary": {
      "decision": "review"
    },
    "inputCells": {
      "units": "Inputs!B2",
      "listPrice": "Inputs!B3",
      "discount": "Inputs!B4"
    }
  },
  "edit": {
    "input": {
      "units": 40,
      "discount": 0.05
    },
    "before": {
      "decision": "review"
    },
    "after": {
      "decision": "approved"
    },
    "restored": {
      "decision": "approved"
    },
    "checks": {
      "decisionChanged": true,
      "formulasPersisted": true,
      "restoredMatchesAfter": true,
      "serializedBytes": 1242
    }
  },
  "verified": true
}

The byte count can change by package version. The invariants are decisionChanged, formulasPersisted, restoredMatchesAfter, and verified: true.

What this proves

What this does not prove

This does not prove full XLSX fidelity, desktop Excel behavior, database durability, or a visual spreadsheet editor. Use this path when the service owns the formulas and JSON state. Use the XLSX evaluator when a real .xlsx file is the source of truth.

After the proof