Run the merit cycle inside a 3.5% pool, with a workbook managers can't break

The HRIS export, bands and merit matrix into a manager workbook where only Proposed % can be edited, a headcount plan that reconciles to HRIS with 14 checks at zero, and a five-slide exec deck, in just over five minutes.

Who
A People team's LangGraph agent, on OpenAI gpt-6.1-sol
Runs in
LangGraph
Hands over
.pptx2027-merit-executive-briefing.pptx.xlsx2027-merit-headcount-managers.xlsx
5 slides + 15 sheetsin 2 files, opened in Office
23 turns, 5 minone agent run in LangGraph on gpt-6.1-sol, unedited

The ask

We're kicking off the 2027 merit cycle. Sam and Ravi's requirements are in hr_note.md; the HRIS export, comp bands, merit matrix and open reqs are in this folder. Build the merit and headcount workbook for managers (only the Proposed % column editable) and the five-slide exec deck. Spruce theme. The headcount must reconcile to the HRIS export.

A People team's LangGraph agent, on OpenAI gpt-6.1-sol

Every year the merit cycle starts with an HRIS export, a merit matrix and a pool of 3.5% of base pay, and ends with 40 managers editing copies of one spreadsheet. Formulas get overwritten, headcount drifts from the HRIS, and nobody is sure the plan still fits the pool. This year Leadership also wants to see who is paid below 0.85 of their band midpoint, and what next year's payroll looks like with open reqs.

This run is a LangGraph agent, built the way the docs show with artiwright's Python package, on OpenAI's gpt-6.1-sol. It gets the request, the paths of the files and the notes, and nothing else.

What they handed over

Made-up data in the shape of a real export. Download it and try the ask yourself.

What came out

2027-merit-executive-briefing.pptxPowerPoint · 5 slides · 47 KB
Download
2027-merit-headcount-managers.xlsxExcel · 15 sheets · 176 KB
Download

Screenshots exported by PowerPoint and Excel.

What the agent noticed

It kept a diagnostic a diagnostic

Bringing the 34 people below 0.85 up to 0.85 would cost $148,150 before merit, and 22 of them stay below 0.85 after the proposed merit. The deck shows that as a $148K gap that is "diagnostic, not approved spend", and the workbook leaves it out of payroll.

It found the department over its pool

The matrix guideline spends $1.63M of the $1.77M pool, leaving $142K. But Finance's guideline comes to 3.7% of its base, $5,338 over its allocation. The first slide says so, and the timeline has People review departmental exceptions in November.

It tested the one editable column

The agent changed one employee's Proposed % from 3% to 10%. Merit spend rose $9,177, all 14 checks stayed at zero, and it put the 3% back. All 420 HRIS employees and their $50.7M of base pay reconcile.

Build it yourself

We're kicking off the 2027 merit cycle. Sam and Ravi's requirements are in hr_note.md; the HRIS export, comp bands, merit matrix and open reqs are in this folder. Build the merit and headcount workbook for managers (only the Proposed % column editable) and the five-slide exec deck. Spruce theme. The headcount must reconcile to the HRIS export.

Set Artiwright up in your app first: Quickstart for AI apps, Google ADK, LangGraph, Node.js.

Inside the workbook

15 sheets, laid out by the agent. In its words, sheet by sheet:

  1. The Read me sheet
    Read me

    What managers can edit, and every planning assumption: everyone in the September 30 export is eligible, no attrition, base salary only, hires costed from their full start month.

  2. The Summary sheet
    Summary

    Each department's headcount, eligible base, 3.5% pool, proposed spend and what's left: $1,632,814 proposed against a $1,774,780 pool, with Finance $5,338 over. A native chart of spend against pool.

  3. The Merit sheet
    Merit

    All 420 employees with band, compa-ratio, guideline merit and new base. The sheet is protected; only Proposed % is unlocked, and it accepts 0% to 10%. It starts at the matrix guideline.

  4. The Equity review sheet
    Equity review

    The 34 people below 0.85 compa-ratio, filtered live from Merit, with the gap to 0.85 and their compa-ratio after proposed merit.

Show all 11 sheets
  1. The Band position sheet
    Band position

    By department, who sits below the band minimum (28), within the band (392) or above the maximum (none), with a native chart.

  2. The Headcount sheet
    Headcount

    420 today plus 34 reqs: 454 at year end and $55.22M of 2027 base payroll, with payroll if hires slip one, two or three months.

  3. The Sensitivity sheet
    Sensitivity

    2027 payroll with merit 0.5 points lower or higher, against hires on time or one to three months late.

  4. The Checks sheet
    Checks

    14 reconciliations against the HRIS export: rows, base pay, employee IDs, department headcount, payroll, bands, ratings and valid proposals. The count of failed checks is zero.

  5. The Assumptions sheet
    Assumptions

    The pool rate, the 0.85 threshold, the matrix boundaries, the 10% cap and the slip months, as named cells the formulas use.

  6. Active employees, Bands, Matrix, Open reqs

    The four inputs, imported as tables. Open reqs adds each hire's 2027 cost on time and slipped.

  7. Chart data, Executive snapshot

    The figures behind the charts, and the values the deck shows, as the slides round them.

How it got thereSee all 31 calls the agent made, what lint found and the finalize report

The run

One real session in LangGraph (gpt-6.1-sol), with only Artiwright's tools and the paths of the files above. Nothing below is edited: every call the agent made, what came back, and the renders it looked at.

  1. artiwright_help
    {
      "query": "skill spreadsheets",
      "search": "",
      "maxChars": 18000
    }
    ---
    name: artiwright-spreadsheets
    description: Build native Excel workbooks (.xlsx) with Artiwright - live formulas that compute as you write them, tables, number formats, conditional formats, data validation and native charts, then render, lint and publish a checked file. Use when a user asks for a spreadsheet, workbook, financial or operating model, budget, tracker, dashboard or data "as Excel".
    ---
    
    # Artiwright spreadsheets
    
    You build workbooks as code against a live document. Formulas compute as you write them, so you
    can read results back, check them, and look at the sheet as an image before you publish.
    Everything you make stays native and editable in Excel: real formulas (not pasted values), tables,
    number formats, conditional formats, validation dropdowns and charts linked to the cells.
    
    ## The loop
    
    1. **Plan the sheets.** Inputs (assumptions the user can change) → calculations → outputs
       (summary, charts). Decide the rows, columns and units before writing. Never invent numbers:
       ask, or label an assumption clearly as one.
    2. **Build** a sheet or a whole section per call: values, then formulas, then formats.
    3. **Look.** Render each sheet (`artiwright_render`) and read key results back (`return` a range,
       or `artiwright_inspect` with kind `formula`).
    4. **Check** with lint: formula errors, cycles, `####` columns, numbers stored as text, typed-in
       numbers in formulas. Fix everything in one call, then look again.
    5. **Publish** with finalize, stating requirements: the sheets, tables and charts that must exist
       and key cells with the values they must hold (`{ cell: "Checks!B2", equals: 0 }`).
    
    ## Work in few calls
    
    Every call resends the whole conversation, so a workbook made in 4 calls costs a fraction of one
    made in 25. When the user gives the data, this is usually enough:
    
    1. **One `artiwright_run` that builds every sheet**: rename `Sheet1`, write inputs, formulas,
       formats, tables, rules and charts, and `return` the key result cells to read them back.
    2. **`artiwright_lint`**. If it reports problems, fix them all in **one** run.
    3. **`artiwright_finalize`** with requirements (sheets, tables, charts, key cell values).
    
    - Don't probe the API with small runs: the calls on this page are enough. Use `help` only for
      something it doesn't show (`help("range.format")`, `help("functions")`).
    - One formula fills a range adjusted per row: `sheet
    …
  2. I’ll build the manager workbook with only Proposed % unlocked, reconcile headcount to the HRIS export, and use the workbook’s results for the five-slide exec deck. I’ll label any planning assumptions the files don’t specify.

  3. artiwright_openhris_active_2026-09-30.xlsx
    {
      "session": "merit-cycle",
      "document": "workbook",
      "path": "./work/hris_active_2026-09-30.xlsx",
      "content": "",
      "template": false
    }
    {
      "ok": true,
      "document": "workbook",
      "sheets": [
        {
          "name": "Active employees",
          "used": "A1:I421",
          "tables": [],
          "top": [
            [
              "Employee ID",
              "Name",
              "Department",
              "Level",
              "Location",
              "Hire date",
              "Base salary",
              "Rating"
            ],
            [
              "E1001",
              "Amara Varga",
              "Engineering",
              "M3",
              "Austin",
              45792,
              131100,
              3
            ],
            [
              "E1002",
              "Noah Weber",
              "Marketing",
              "M4",
              "Austin",
              44221,
              161700,
              4
            ],
            [
              "E1003",
              "Ruth Moreau",
              "Sales",
              "P3",
              "Toronto",
              44076,
              116000,
              3
            ],
            [
              "E1004",
              "Isla Kowalski",
              "Sales",
              "P3",
              "Denver",
              44658,
              106500,
              3
            ],
            [
              "E1005",
              "Noah Mbeki",
              "People",
              "P2",
              "Denver",
              43819,
              80400,
              4
            ]
          ]
        }
      ],
      "names": [],
      "next": "Inspect the workbook (artiwright_inspect), change cells with workbook.sheets.get(name).range(…), then lint and finalize."
    }
  4. artiwright_help
    {
      "query": "sheet.protect, range.protection, skill presentations",
      "search": "",
      "maxChars": 20000
    }
    sheet.protect: sheet.protect(input: ProtectInput?): this
    Protects the sheet: locked cells (all, unless formatted with `locked: false`) can't be changed in Excel. `sheet.protect({ password: "plan", allow: ["sort", "autoFilter"] })`.
    
    Examples:
      sheet.protect({ password: "plan", allow: ["sort", "autoFilter"] })
    
    Nothing is called "range.protection". Closest entries (ask help(path) for one):
      spreadsheets  Workbooks: Workbook.create(), sheets, ranges, formulas, formats, tables, rules, charts.
      workbook  An Excel workbook: `const wb = Workbook.create(); const s = wb.sheets.add("Model");` then `s.range("A1").values = [["Month", "Revenue"], ["Jan", 120]]` and `await wb.save("model.xlsx")`.
      workbook.names.add  Names a cell, range or value for formulas: `wb.names.add("Growth", "Inputs!$B$2")`, then `=B2*(1+Growth)`.
      workbook.trace  Where a number comes from: the cell's formula and value, and the cells, ranges and names it reads, followed `depth` levels down (default 3): `wb.trace("Summary!B2")`.
      sheet.spills  Arrays that formulas spilled into neighbouring cells: their anchor and the range filled.
      sheet.range  A rectangle of cells: "A1:C3", "B2", "A:C" or "2:5".
      sheet.usedRange  The smallest range holding every cell with content or a format, or undefined for an empty sheet.
      sheet.mergedRanges  Merged ranges.
      sheet.dataTables  The what-if data tables on the sheet (whole table ranges and input cells).
      sheet.unprotect  Removes the sheet's protection.
    
    ---
    name: artiwright-presentations
    description: Build native, editable PowerPoint decks (.pptx) with Artiwright - plan the story, compose slides from layout recipes with real charts and tables, render and lint them, fix problems by anchor, and publish a checked file. Use when a user asks for a presentation, deck, slides, a QBR, a pitch, or a report "as PowerPoint".
    ---
    
    # Artiwright presentations
    
    You build decks as code against a live document, look at what you built, fix it, and publish a file
    that has been checked. Every object has an anchor (`sl_…` slides, `sh_…` shapes, `ch_…` charts,
    `tb_…` tables, `im_…` pictures) that stays the same across calls, so you can point at exactly what
    to change.
    
    ## The loop
    
    1. **Plan.** Who is the audience and what should they conclude? Write one message per slide. A slide
       that reports a finding gets a headline sentence with the claim ("Enterprise drove 48% of new
    …
  5. artiwright_importcomp_bands.csv
    {
      "session": "merit-cycle",
      "document": "workbook",
      "path": "./work/comp_bands.csv",
      "content": "",
      "sheet": "Bands",
      "at": "A1",
      "replace": false,
      "table": "Bands",
      "dates": "iso",
      "theme": "spruce"
    }
    {
      "ok": true,
      "value": {
        "sheet": "Bands",
        "range": "A1:E9",
        "rows": 8,
        "columns": [
          "Level",
          "Title",
          "Min",
          "Midpoint",
          "Max"
        ],
        "firstRows": [
          [
            "P1",
            "Associate",
            62000,
            74000,
            86000
          ],
          [
            "P2",
            "Professional",
            78000,
            94000,
            110000
          ],
          [
            "P3",
            "Senior",
            98000,
            118000,
            138000
          ]
        ],
        "table": "Bands"
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Active employees",
        "Bands"
      ],
      "version": 1,
      "lint": {
        "errors": 0,
        "warnings": 28
      },
      "next": "Use the table in formulas, e.g. =SUM(Bands[column]); import the next file the same way."
    }
  6. artiwright_importmerit_matrix.csv
    {
      "session": "merit-cycle",
      "document": "workbook",
      "path": "./work/merit_matrix.csv",
      "content": "",
      "sheet": "Matrix",
      "at": "A1",
      "replace": false,
      "table": "Matrix",
      "dates": "iso",
      "theme": "spruce"
    }
    {
      "ok": true,
      "value": {
        "sheet": "Matrix",
        "range": "A1:D6",
        "rows": 5,
        "columns": [
          "Rating",
          "Below 0.90 compa-ratio",
          "0.90 to 1.10",
          "Above 1.10"
        ],
        "firstRows": [
          [
            5,
            0.065,
            0.055,
            0.04
          ],
          [
            4,
            0.05,
            0.04,
            0.03
          ],
          [
            3,
            0.035,
            0.03,
            0.02
          ]
        ],
        "table": "Matrix"
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Active employees",
        "Bands",
        "Matrix"
      ],
      "version": 2,
      "lint": {
        "errors": 0,
        "warnings": 28
      },
      "next": "Use the table in formulas, e.g. =SUM(Matrix[column]); import the next file the same way."
    }
  7. artiwright_importopen_reqs_2027.csv
    {
      "session": "merit-cycle",
      "document": "workbook",
      "path": "./work/open_reqs_2027.csv",
      "content": "",
      "sheet": "Open reqs",
      "at": "A1",
      "replace": false,
      "table": "OpenReqs",
      "dates": "iso",
      "theme": "spruce"
    }
    {
      "ok": true,
      "value": {
        "sheet": "Open reqs",
        "range": "A1:F35",
        "rows": 34,
        "columns": [
          "Req ID",
          "Department",
          "Level",
          "Planned start",
          "Budgeted salary",
          "Status"
        ],
        "firstRows": [
          [
            "REQ-2701",
            "Operations",
            "M4",
            46478,
            170000,
            "Open"
          ],
          [
            "REQ-2702",
            "Engineering",
            "P3",
            46600,
            113000,
            "Interviewing"
          ],
          [
            "REQ-2703",
            "Engineering",
            "P4",
            46478,
            146000,
            "Offer out"
          ]
        ],
        "table": "OpenReqs"
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Active employees",
        "Bands",
        "Matrix",
        "Open reqs"
      ],
      "version": 3,
      "lint": {
        "errors": 0,
        "warnings": 29
      },
      "next": "Use the table in formulas, e.g. =SUM(OpenReqs[column]); import the next file the same way."
    }
  8. artiwright_run
    const s=workbook.sheets.get('Active employees'); const rows=s.range('A1:I421').values; return {headers:rows[0],count:rows.length-1,departments:[...new Set(rows.slice(1).map(r=>r[2]))].sort(),status:[...new Set(rows.slice(1).map(r=>r[8]))],base:rows.slice(1).reduce((a,r)=>a+r[6],0),matrix:workbook.sheets.get('Matrix').range('A1:D6').values,bands:workbook.sheets.get('Bands').range('A1:E9').values,reqs:workbook.sheets.get('Open reqs').range('A1:F35').values};
    {
      "ok": true,
      "value": {
        "headers": [
          "Employee ID",
          "Name",
          "Department",
          "Level",
          "Location",
          "Hire date",
          "Base salary",
          "Rating",
          "Manager ID"
        ],
        "count": 420,
        "departments": [
          "Customer Success",
          "Engineering",
          "Finance",
          "Marketing",
          "Operations",
          "People",
          "Product",
          "Sales"
        ],
        "status": [
          "E1021",
          "E1016",
          "E1003",
          "E1031",
          "E1020",
          "E1009",
          "E1025",
          "E1010",
          "E1028",
          "E1002",
          "E1037",
          "E1022",
          "E1035",
          "E1034",
          "E1026",
          "E1006",
          "E1029",
          "E1027",
          "E1007",
          "E1019",
          "E1014",
          "E1023",
          "E1015",
          "E1036",
          "E1013",
          "E1033",
          "E1004",
          "E1030",
          "E1017",
          "E1012",
          "E1018",
          "E1005",
          "E1038",
          "E1008",
          "E1040",
          "E1001",
          "E1039",
          "E1032",
          "E1024",
          "E1011"
        ],
        "base": 50708000,
        "matrix": [
          [
            "Rating",
            "Below 0.90 compa-ratio",
            "0.90 to 1.10",
            "Above 1.10"
          ],
          [
            5,
            0.065,
            0.055,
            0.04
          ],
          [
            4,
            0.05,
            0.04,
            0.03
          ],
          [
            3,
            0.035,
            0.03,
            0.02
          ],
          [
            2,
            0.015,
            0.01,
            0
          ],
          [
            1,
            0,
            0,
            0
          ]
        ],
        "bands": [
          [
            "Level",
            "Title",
            "Min",
            "Midpoint",
            "Max"
          ],
          [
            "P1",
            "Associate",
            62000,
            74000,
            86000
          ],
          [
            "P2",
            "Professional",
            78000,
            94000,
            110000
          ],
          [
            "P3",
            "Senior",
            98000,
            118000,
            138000
          ],
          [
            "P4",
            "Staff",
            124000,
            148000,
            172000
          ],
          [
            "P5",
            "Principal",
            152000,
            182000,
            212000
          ],
          [
            "M3",
            "Manager",
            120000,
            145000,
            170000
          ],
          [
            "M4",
            "Senior manager",
            145000,
            175000,
            205000
          ],
          [
            "M5",
            "Director",
            175000,
            2120
    …
  9. artiwright_help
    {
      "query": "workbook.theme, range.format, sheet.validations.add, sheet.charts.add",
      "search": "",
      "maxChars": 8500
    }
    workbook.theme: workbook.theme: Theme
    Theme colors and fonts (the same as a deck's): `wb.theme.set({ colors: { accent1: "#2346C8" } })`.
    
    range.format: range.format(input: CellFormatInput): this
    Applies a look to every cell (merged with what the cells have): `range.format({ bold: true, fill: "accent1" })`, or `range.format = { … }`.
    
    CellFormatInput:
      numberFormat?: string  An Excel number format code, or a shortcut: "integer", "percent", "currency", "millions", "date", …
      font?: string  Font family; default the theme's body font.
      fontSize?: number  Font size in points.
      bold?: boolean
      italic?: boolean
      underline?: boolean | "single" | "double" | "singleAccounting" | "doubleAccounting"
      strike?: boolean
      color?: string  Text color.
      fill?: string  Background color (a solid fill).
      align? (left | center | right | fill | justify | centerAcross | distributed)
      valign? (top | middle | bottom | justify | distributed)
      wrap?: boolean
      indent?: number
      rotation?: number  Degrees, -90 to 90.
      shrinkToFit?: boolean
      border?: string  All four edges of every cell: "thin", "medium slate-400", or "none".
      borderTop?: string
      borderBottom?: string
      borderLeft?: string
      borderRight?: string
      locked?: boolean  Unlocked cells stay editable when the sheet is protected.
    
    Examples:
      range.format({ bold: true, fill: "accent1" })
    
    sheet.validations.add: sheet.validations.add(ranges: string | string[], rule: ValidationInput): Worksheet
    Limits what can be typed in cells: `add("E2:E20", { type: "list", values: ["Low", "High"] })`, `add("B2:B20", { type: "decimal", min: 0, max: 1, error: "Use a rate from 0 to 1." })`.
    
    ValidationInput:
      type (list | whole | decimal | date | time | textLength | custom)
      values?: Array<string | number>  list: the allowed items.
      source?: string  list: cells holding the items, e.g. "Lists!$A$2:$A$6".
      operator?: CompareOperator  Number, date, time and length rules (default "between" when min and max are given).
      min?: number | Date | string
      max?: number | Date | string
      value?: number | Date | string
      formula?: string  custom: a formula true for allowed values, e.g. "=ISNUMBER(B2)".
      allowBlank?: boolean
      dropdown?: boolean  list: show the in-cell dropdown (default true).
      prompt?: string | { title?: string; text: string }
      error?: string | { title?: string; text: string; style?: "stop" | "warning" | "information" }
    
    …
  10. artiwright_runerror
    workbook.theme.use('spruce');
    const raw=workbook.sheets.get('Active employees');const src=raw.range('A1:I421').values;const bands=workbook.sheets.get('Bands').range('A2:E9').values;const matrix=workbook.sheets.get('Matrix').range('A2:D6').values;const depts=[...new Set(src.slice(1).map(r=>r[2]))].sort();
    const intro=workbook.sheets.add('Read me');const a=workbook.sheets.add('Assumptions');const m=workbook.sheets.add('Merit');const sum=workbook.sheets.add('Summary');const hc=workbook.sheets.add('Headcount');const sens=workbook.sheets.add('Sensitivity');const eq=workbook.sheets.add('Equity review');const bv=workbook.sheets.add('Band position');const ck=workbook.sheets.add('Checks');
    a.range('A1:B18').values=[['2027 merit assumptions','Value'],['Pool rate',0.035],['Equity compa threshold',0.85],['Low matrix boundary',0.9],['High matrix boundary',1.1],['Maximum proposed rate',0.1],['Months per year',12],['Plan year',2027],['First month',1],['Zero',0],['One',1],['Money decimals',2],['HRIS date','2026-09-30'],['Effective date','2027-01-01'],['Scenario merit change (percentage points)',0.005],['One month delay',1],['Two month delay',2],['Three month delay',3]];
    for(const [name,cell] of Object.entries({PoolRate:'B2',EquityThreshold:'B3',LowBoundary:'B4',HighBoundary:'B5',MaxProposed:'B6',Months:'B7',PlanYear:'B8',FirstMonth:'B9',Zero:'B10',One:'B11',MoneyDecimals:'B12',MeritStep:'B15'}))workbook.names.add(name,`Assumptions!$${cell[0]}$${cell.slice(1)}`);
    a.range('B2').numberFormat='percent1';a.range('B6').numberFormat='percent1';a.range('B15').numberFormat='percent1';
    intro.range('A1:F1').merge();intro.range('A1').values=[['2027 merit and headcount planning']];
    const notes=[['Manager action','Edit blue Proposed % cells on Merit only; enter 0% to 10%.'],['Starting proposal','Proposed % is seeded from the merit matrix; it is not approval.'],['Scope','All 420 rows in the September 30 HRIS export are eligible; no tenure proration.'],['Pool','3.5% of all eligible base salaries. Department allocations use the same 3.5%.'],['Equity','Flag current compa-ratio strictly below 0.85. Equity gap is diagnostic, not added to payroll.'],['Headcount assumption','All current staff remain for the full year; every listed open requisition is filled.'],['Cost scope','Base salary only. Excludes bonus, benefits, payroll taxes, attrition and unlisted hires.'],['New-hire proration','Full start month is included. New hires receive no additional merit award in 2027.'],['Sensitivity','Locked scenarios: hires delayed 0–3 months; proposed merit shifted ±0.5 percentage points, capped at 0–10%.'],['Security','All sheets protected; only Merit Proposed % unlocked. Sheet protection is not access control.'],['Confidentiality','Contains company-wide employee compensation; distribute only to authorized recipients.'],['Timing','January 1, 2027 effective date is fixed. Other cycle milestones are proposed, pending approval.'],['Sources','HRIS active 2026-09-30; comp_bands.csv; merit_matrix.csv; open_reqs_2027.csv; hr_note.md.']];
    intro.range('A3:B15').values=notes;intro.merge('B3:F3');for(let r=4;r<=15;r++)intro.merge(`B${r}:F${r}`);intro.range('A3:F15').format({wrap:true});intro.setColumnWidth('A',175).setColumnWidth('B:F',145);
    m.range('A1:U1').values=[['Employee ID','Name','Department','Level','Location','Hire date','Base salary','Rating','Manager ID','Band min','Band midpoint','Band max','Compa-ratio','Guideline %','Proposed %','Merit increase','New base','Equity review','Gap to 0.85','Band position','ID source count']];
    m.range('A2:I421').formulas="='Active employees'!A2";
    for(const [col,formula] of Object.entries({J:'=XLOOKUP(D2,Bands!$A$2:$A$9,Bands!$C$2:$C$9)',K:'=XLOOKUP(D2,Bands!$A$2:$A$9,Bands!$D$2:$D$9)',L:'=XLOOKUP(D2,Bands!$A$2:$A$9,Bands!$E$2:$E$9)',M:'=G2/K2',N:'=IF(M2<LowBoundary,XLOOKUP(H2,Matrix!$A$2:$A$6,Matrix!$B$2:$B$6),IF(M2<=HighBoundary,XLOOKUP(H2,Matrix!$A$2:$A$6,Matrix!$C$2:$C$6),XLOOKUP(H2,Matrix!$A$2:$A$6,Matrix!$D$2:$D$6)))',P:'=ROUND(G2*O2,MoneyDecimals)',Q:'=G2+P2',R:'=IF(M2<EquityThreshold,"REVIEW","")',S:'=MAX(Zero,EquityThreshold*K2-G2)',T:'=IF(G2<J2,"Below minimum",IF(G2>L2,"Above maximum","Within band"))',U:"=COUNTIF('Active employees'!$A$2:$A$421,A2)"}))m.range(`${col}2:${col}421`).formulas=formula;
    m.range('O2:O421').values=src.slice(1).map(r=>{let b=bands.find(b=>b[0]===r[3]);let c=r[6]/b[3];let mat=matrix.find(t=>t[0]===r[7]);return [mat[c<0.9?1:c<=1.1?2:3]];});
    m.range('O2:O421').format({locked:false,fill:'blue-50',color:'blue-700',numberFormat:'percent1'});m.validations.add('O2:O421',{type:'decimal',min:0,max:0.1,allowBlank:false,error:{title:'Invalid merit rate',text:'Enter a percentage from 0% to 10%.',style:'stop'}});m.tables.add('A1:U421',{name:'MeritPlan'});m.range('G2:G421').numberFormat='currency0';m.range('J2:L421').numberFormat='currency0';m.range('P2:Q421').numberFormat='currency';m.range('S2:S421').numberFormat='currency';m.range('F2:F421').numberFormat='date';m.range('M2:M421').numberFormat='0.00"x"';m.range('N2:O421').numberFormat='percent1';m.conditionalFormats.add('M2:M421',{type:'cellIs',operator:'lessThan',value:0.85,format:{fill:'red-50',color:'red-700'}});m.freeze(1,2);
    const req=workbook.sheets.get('Open reqs');req.range('G1:P1').values=[['Start month','2027 cost','Cost slip 1m','Cost slip 2m','Cost slip 3m','EOY hire','EOY slip 1m','EOY slip 2m','EOY slip 3m','Plan start index']];req.range('P2:P35').formulas='=(YEAR(D2)-PlanYear)*Months+MONTH(D2)';req.range('G2:G35').formulas='=MONTH(D2)';for(let i=0;i<4;i++){let cost=['H','I','J','K'][i],end=['L','M','N','O'][i],delay=i===0?'Zero':`Assumptions!$B$${15+i}`;req.range(`${cost}2:${cost}35`).formulas=`=E2*MAX(Zero,Months-MAX(FirstMonth,P2+${delay})+One)/Months`;req.range(`${end}2:${end}35`).formulas=`=IF(P2+${delay}<=Months,One,Zero)`;}req.range('D2:D35').numberFormat='date';req.range('E2:E35').numberFormat='currency0';req.range('H2:K35').numberFormat='currency';
    sum.merge('A1:I1');sum.range('A1').values=[['2027 merit spend and pool by department']];sum.range('A3:I3').values=[['Department','Active HC','Eligible base','Pool at 3.5%','Proposed spend','Pool remaining','Weighted rate','Equity reviews','2027 base payroll']];sum.range('A4:A11').values=depts.map(d=>[d]);for(const [col,f] of Object.entries({B:'=COUNTIF(Merit!$C$2:$C$421,A4)',C:'=SUMIF(Merit!$C$2:$C$421,A4,Merit!$G$2:$G$421)',D:'=C4*PoolRate',E:'=SUMIF(Merit!$C$2:$C$421,A4,Merit!$P$2:$P$421)',F:'=D4-E4',G:'=E4/C4',H:'=COUNTIFS(Merit!$C$2:$C$421,A4,Merit!$R$2:$R$421,"REVIEW")',I:'=Headcount!F4'}))sum.range(`${col}4:${col}11`).formulas=f;
    sum.range('A12').values=[['Total']];for(const col of ['B','C','D','E','F','H','I'])sum.range(`${col}12`).formulas=`=SUM(${col}4:${col}11)`;sum.range('G12').formulas='=E12/C12';sum.range('C4:F12').numberFormat='currency0';sum.range('I4:I12').numberFormat='currency0';sum.range('G4:G12').numberFormat='percent1';sum.charts.add('column',{data:'Chart data!A1:C9',at:'A15',to:'I31',title:'Proposed merit spend versus allocated pool',axes:{y:{numberFormat:'$#,##0,"K"'}}});sum.range('A13:I13').merge();sum.range('A13').values=[['Positive pool remaining = unspent budget. Equity adjustments are not included.']];
    hc.merge('A1:M1');hc.range('A1').values=[['2027 headcount and base payroll plan']];hc.range('A3:M3').values=[['Department','Starting HC','Open reqs','Year-end HC','Current team payroll','Total payroll','Hires payroll','Total slip 1m','Total slip 2m','Total slip 3m','EOY slip 1m','EOY slip 2m','EOY slip 3m']];hc.range('A4:A11').values=depts.map(d=>[d]);for(const [c,f] of Object.entries({B:'=COUNTIF(Merit!$C$2:$C$421,A4)',C:'=COUNTIF(\'Open reqs\'!$B$2:$B$35,A4)',D:'=B4+SUMIF(\'Open reqs\'!$B$2:$B$35,A4,\'Open reqs\'!$L$2:$L$35)',E:'=SUMIF(Merit!$C$2:$C$421,A4,Merit!$Q$2:$Q$421)',F:'=E4+G4',G:'=SUMIF(\'Open reqs\'!$B$2:$B$35,A4,\'Open reqs\'!$H$2:$H$35)',H:'=E4+SUMIF(\'Open reqs\'!$B$2:$B$35,A4,\'Open reqs\'!$I$2:$I$35)',I:'=E4+SUMIF(\'Open reqs\'!$B$2:$B$35,A4,\'Open reqs\'!$J$2:$J$35)',J:'=E4+SUMIF(\'Open reqs\'!$B$2:$B$35,A4,\'Open reqs\'!$K$2:$K$35)',K:'=B4+SUMIF(\'Open reqs\'!$B$2:$B$35,A4,\'Open reqs\'!$M$2:$M$35)',L:'=B4+SUMIF(\'Open reqs\'!$B$2:$B$35,A4,\'Open reqs\'!$N$2:$N$35)',M:'=B4+SUMIF(\'Open reqs\'!$B$2:$B$35,A4,\'Open reqs\'!$O$2:$O$35)'}))hc.range(`${c}4:${c}11`).formulas=f;hc.range('A12').values=[['Total']];for(const c of 'BCDEFGHIJKLM')hc.range(`${c}12`).formulas=`=SUM(${c}4:${c}11)`;hc.range('E4:J12').numberFormat='currency0';hc.charts.add('column',{data:'Chart data!E1:G9',at:'A15',to:'M31',title:'Headcount expands with planned open requisitions'});
    const cd=workbook.sheets.add('Chart data');cd.range('A1:C1').values=[['Department','Pool','Proposed spend']];cd.range('E1:G1').values=[['Department','Current HC','Year-end HC']];for(let r=2;r<=9;r++){let sr=r+2;cd.range(`A${r}:C${r}`).values=[[`=Summary!A${sr}`,`=Summary!D${sr}`,`=Summary!E${sr}`]];cd.range(`E${r}:G${r}`).values=[[`=Headcount!A${sr}`,`=Headcount!B${sr}`,`=Headcount!D${sr}`]];}
    sens.merge('A1:F1');sens.range('A1').values=[['2027 payroll sensitivity: merit shift and hiring delay']];sens.range('A3:F3').values=[['Merit shift (pp)','Merit spend','No hire delay','Slip 1 month','Slip 2 months','Slip 3 months']];sens.range('A4:A6').values=[['=-MeritStep'],['=Zero'],['=MeritStep']];for(let r=4;r<=6;r++){sens.range(`B${r}`).formulas=`=SUMPRODUCT(Merit!$G$2:$G$421,IF(Merit!$O$2:$O$421+$A${r}<Zero,Zero,IF(Merit!$O$2:$O$421+$A${r}>MaxProposed,MaxProposed,Merit!$O$2:$O$421+$A${r})))`;for(let i=0;i<4;i++)sens.range(`${['C','D','E','F'][i]}${r}`).formulas=`=SUM(Merit!$G$2:$G$421)+B${r}+SUM('Open reqs'!${['H','I','J','K'][i]}2:${['H','I','J','K'][i]}35)`;}sens.range('A4:A6').numberFormat='0.0%';sens.range('B4:F6').numberFormat='currency0';sens.merge('A8:F8');sens.range('A8').values=[['Shift applies to each proposed rate, bounded at 0–10%; hires retain budgeted salaries.']];sens.merge('A9:F9');sens.range('A9').values=[['Scenario spend uses unrounded awards; base case reconciles to rounded awards to cents.']];sens.conditionalFormats.add('C4:F6',{type:'colorScale',colors:['green-50','white','red-50']});
    eq.merge('A1:H1');eq.range('A1').values=[['Equity review: current compa-ratio below 0.85']];eq.range('A3:H3').values=[['Employee ID','Name','Department','Level','Base salary','Compa-ratio','Gap to 0.85','Post-merit compa']];eq.range('A4').formulas='=FILTER(Merit!A2:D421,Merit!M2:M421<EquityThreshold)';eq.range('E4').formulas='=FILTER(Merit!G2:G421,Merit!M2:M421<EquityThreshold)';eq.range('F4').formulas='=FILTER(Merit!M2:M421,Merit!M2:M421<EquityThreshold)';eq.range('G4').formulas='=FILTER(Merit!S2:S421,Merit!M2:M421<EquityThreshold)';eq.range('H4').formulas='=FILTER(Merit!Q2:Q421/Merit!K2:K421,Merit!M2:M421<EquityThreshold)';eq.range('E4:E423').numberFormat='currency0';eq.range('G4:G423').numberFormat='currency0';eq.range('F4:F423').numberFormat='0.00"x"';eq.range('H4:H423').numberFormat='0.00"x"';
    bv.merge('A1:E1');bv.range('A1').values=[['Current pay relative to salary band']];bv.range('A3:E3').values=[['Department','Below minimum','Within band','Above maximum','Below 0.85 compa']];bv.range('A4:A11').values=depts.map(d=>[d]);for(let c of ['B','C','D'])bv.range(`${c}4:${c}11`).formulas=`=COUNTIFS(Merit!$C$2:$C$421,$A4,Merit!$T$2:$T$421,${c}$3)`;bv.range('E4:E11').formulas='=COUNTIFS(Merit!$C$2:$C$421,A4,Merit!$M$2:$M$421,"<"&EquityThreshold)';bv.range('A12').values=[['Total']];for(const c of 'BCDE')bv.range(`${c}12`).formulas=`=SUM(${c}4:${c}11)`;bv.charts.add('column',{data:'A3:D11',at:'A15',to:'E31',stacked:true,title:'Employees below, within and above their salary band'});
    ck.range('A1:B1').values=[['Reconciliation checks (all must be zero)','Difference']];ck.range('A2:A12').values=[['HRIS rows minus merit rows'],['HRIS base minus merit base'],['Department HC minus HRIS rows'],['Source IDs missing or duplicated in model'],['Model IDs missing or duplicated in source'],['Duplicate source IDs'],['HC plan starting count minus source'],['Year-end count minus current and reqs'],['Payroll minus sum of components'],['Sensitivity base minus plan payroll'],['Invalid proposed percentages']];ck.range('B2:B12').values=[['=COUNTA(\'Active employees\'!A2:A421)-COUNTA(Merit!A2:A421)'],['=ROUND(SUM(\'Active employees\'!G2:G421)-SUM(Merit!G2:G421),MoneyDecimals)'],['=SUM(Summary!B4:B11)-COUNTA(\'Active employees\'!A2:A421)'],['=SUMPRODUCT(--(COUNTIF(Merit!A2:A421,\'Active employees\'!A2:A421)<>One))'],['=COUNTIF(Merit!U2:U421,"<>"&One)'],['=COUNTA(\'Active employees\'!A2:A421)-ROWS(UNIQUE(\'Active employees\'!A2:A421))'],['=Headcount!B12-COUNTA(\'Active employees\'!A2:A421)'],['=Headcount!D12-Headcount!B12-COUNTA(\'Open reqs\'!A2:A35)'],['=ROUND(Headcount!F12-SUM(Merit!Q2:Q421)-SUM(\'Open reqs\'!H2:H35),MoneyDecimals)'],['=ROUND(Sensitivity!C5-Headcount!F12,MoneyDecimals)'],['=COUNTBLANK(Merit!O2:O421)+COUNTIF(Merit!O2:O421,"<"&Zero)+COUNTIF(Merit!O2:O421,">"&MaxProposed)']];
    raw.tables.add('A1:I421',{name:'HRIS'});raw.range('F2:F421').numberFormat='date';raw.range('G2:G421').numberFormat='currency0';workbook.sheets.get('Bands').range('C2:E9').numberFormat='currency0';workbook.sheets.get('Matrix').range('B2:D6').numberFormat='percent1';
    for(const s of workbook.sheets.items){s.showGridLines=false;s.setColumnWidth('A',180);if(s.name!=='Read me')s.setColumnWidth('B:U',135);let ur=s.usedRange;if(ur)ur.format({fontSize:11});let header=['Summary','Headcount','Sensitivity','Equity review','Band position'].includes(s.name)?3:1;s.range(`A${header}:${s.name==='Merit'?'U':s.name==='Headcount'?'M':s.name==='Summary'?'I':s.name==='Equity review'?'H':s.name==='Sensitivity'?'F':s.name==='Band position'?'E':s.name==='Active employees'?'I':s.name==='Open reqs'?'P':s.name==='Bands'?'E':s.name==='Matrix'?'D':'B'}${header}`).format({fill:'accent1',color:'white',bold:true,wrap:true});s.freeze(header);s.protect({password:'Merit2027',allow:['autoFilter','sort']});}
    for(const s of [sum,hc,bv])s.range(`A12:${s===sum?'I':s===hc?'M':'E'}12`).format({fill:'green-50',bold:true,borderTop:'thin'});m.setColumnWidth('B:C',170);ck.setColumnWidth('A',375);a.setColumnWidth('A',335);intro.range('A1:F1').format({fill:'accent1',color:'white',bold:true,fontSize:18});
    return {checks:ck.range('A1:B12').values,summary:sum.range('A3:I12').values,headcount:hc.range('A3:M12').values,sensitivity:sens.range('A3:F6').values,bands:bv.range('A3:E12').values,equityFirst:eq.range('A4:H11').values};
    {
      "ok": false,
      "error": {
        "name": "OptionsError",
        "message": "conditionalFormats.add: operator: \"lessThan\" is not one of >, >=, <, <=, =, !=, between, notBetween"
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Active employees",
        "Bands",
        "Matrix",
        "Open reqs"
      ],
      "version": 3,
      "lint": {
        "errors": 0,
        "warnings": 0
      }
    }
  11. artiwright_run
    workbook.theme.use('spruce');
    const raw=workbook.sheets.get('Active employees'),src=raw.range('A1:I421').values,bands=workbook.sheets.get('Bands').range('A2:E9').values,matrix=workbook.sheets.get('Matrix').range('A2:D6').values,depts=[...new Set(src.slice(1).map(r=>r[2]))].sort();
    const intro=workbook.sheets.add('Read me'),a=workbook.sheets.add('Assumptions'),m=workbook.sheets.add('Merit'),sum=workbook.sheets.add('Summary'),hc=workbook.sheets.add('Headcount'),sens=workbook.sheets.add('Sensitivity'),eq=workbook.sheets.add('Equity review'),bv=workbook.sheets.add('Band position'),ck=workbook.sheets.add('Checks'),cd=workbook.sheets.add('Chart data');
    a.range('A1:B18').values=[['2027 assumptions','Value'],['Pool rate',0.035],['Equity threshold',0.85],['Low matrix boundary',0.9],['High matrix boundary',1.1],['Maximum proposed rate',0.1],['Months per year',12],['Plan year',2027],['First month',1],['Zero',0],['One',1],['Money decimals',2],['HRIS date','2026-09-30'],['Effective date','2027-01-01'],['Scenario merit shift (pp)',0.005],['One month delay',1],['Two month delay',2],['Three month delay',3]];
    for(const [name,cell] of Object.entries({PoolRate:'B2',EquityThreshold:'B3',LowBoundary:'B4',HighBoundary:'B5',MaxProposed:'B6',Months:'B7',PlanYear:'B8',FirstMonth:'B9',Zero:'B10',One:'B11',MoneyDecimals:'B12',MeritStep:'B15'}))workbook.names.add(name,`Assumptions!$${cell[0]}$${cell.slice(1)}`);
    intro.merge('A1:F1');intro.range('A1').values=[['2027 merit and headcount planning']];intro.range('A3:B15').values=[['Manager action','Edit blue Proposed % cells on Merit only; enter 0% to 10%.'],['Starting proposal','Seeded from the merit matrix, not an approved award.'],['Scope','Every row in September 30 HRIS export is eligible; no tenure proration.'],['Pool','3.5% of eligible base; same rate used for departmental allocations.'],['Equity','Flag current compa strictly below 0.85; gap is diagnostic and excluded from payroll.'],['Headcount assumption','Current staff stay all year; every listed requisition is filled. No attrition assumed.'],['Cost scope','Base salary only, excluding bonus, benefits, payroll taxes and unlisted hires.'],['Hire proration','Includes full start month. No additional 2027 merit for new hires.'],['Sensitivity','Hires slip 0–3 months; merit shifts ±0.5 percentage points, capped at 0–10%.'],['Protection','Only Merit Proposed % unlocked. Protection password: Merit2027 (HR administration).'],['Confidentiality','Company-wide compensation: authorized recipients only. Protection is not access control.'],['Timing','January 1, 2027 is fixed; other milestones are proposed and require approval.'],['Sources','hr_note.md; HRIS active 2026-09-30; comp_bands.csv; merit_matrix.csv; open_reqs_2027.csv.']];for(let r=3;r<=15;r++)intro.merge(`B${r}:F${r}`);intro.range('A3:F15').format({wrap:true});
    m.range('A1:U1').values=[['Employee ID','Name','Department','Level','Location','Hire date','Base salary','Rating','Manager ID','Band min','Band midpoint','Band max','Compa-ratio','Guideline %','Proposed %','Merit increase','New base','Equity review','Gap to 0.85','Band position','ID source count']];m.range('A2:I421').formulas="='Active employees'!A2";
    const mf={J:'=XLOOKUP(D2,Bands!$A$2:$A$9,Bands!$C$2:$C$9)',K:'=XLOOKUP(D2,Bands!$A$2:$A$9,Bands!$D$2:$D$9)',L:'=XLOOKUP(D2,Bands!$A$2:$A$9,Bands!$E$2:$E$9)',M:'=G2/K2',N:'=IF(M2<LowBoundary,XLOOKUP(H2,Matrix!$A$2:$A$6,Matrix!$B$2:$B$6),IF(M2<=HighBoundary,XLOOKUP(H2,Matrix!$A$2:$A$6,Matrix!$C$2:$C$6),XLOOKUP(H2,Matrix!$A$2:$A$6,Matrix!$D$2:$D$6)))',P:'=ROUND(G2*O2,MoneyDecimals)',Q:'=G2+P2',R:'=IF(M2<EquityThreshold,"REVIEW","")',S:'=MAX(Zero,EquityThreshold*K2-G2)',T:'=IF(G2<J2,"Below minimum",IF(G2>L2,"Above maximum","Within band"))',U:"=COUNTIF('Active employees'!$A$2:$A$421,A2)"};for(const [c,f] of Object.entries(mf))m.range(`${c}2:${c}421`).formulas=f;
    m.range('O2:O421').values=src.slice(1).map(r=>{const c=r[6]/bands.find(b=>b[0]===r[3])[3];return [matrix.find(t=>t[0]===r[7])[c<0.9?1:c<=1.1?2:3]];});m.range('O2:O421').format({locked:false,fill:'blue-50',color:'blue-700'});m.validations.add('O2:O421',{type:'decimal',min:0,max:0.1,allowBlank:false,error:{title:'Invalid rate',text:'Enter 0% to 10%.',style:'stop'}});m.tables.add('A1:U421',{name:'MeritPlan'});m.conditionalFormats.add('M2:M421',{type:'cellIs',operator:'<',value:0.85,format:{fill:'red-50',color:'red-700'}});
    const req=workbook.sheets.get('Open reqs');req.range('G1:P1').values=[['Start month','2027 cost','Cost slip 1m','Cost slip 2m','Cost slip 3m','EOY hire','EOY slip 1m','EOY slip 2m','EOY slip 3m','Plan start index']];req.range('P2:P35').formulas='=(YEAR(D2)-PlanYear)*Months+MONTH(D2)';req.range('G2:G35').formulas='=MONTH(D2)';for(let i=0;i<4;i++){const delay=i===0?'Zero':`Assumptions!$B$${15+i}`;req.range(`${'HIJK'[i]}2:${'HIJK'[i]}35`).formulas=`=E2*MAX(Zero,Months-MAX(FirstMonth,P2+${delay})+One)/Months`;req.range(`${'LMNO'[i]}2:${'LMNO'[i]}35`).formulas=`=IF(P2+${delay}<=Months,One,Zero)`;}
    sum.merge('A1:I1');sum.range('A1').values=[['2027 merit spend and pool by department']];sum.range('A3:I3').values=[['Department','Active HC','Eligible base','Pool at 3.5%','Proposed spend','Pool remaining','Weighted rate','Equity reviews','2027 base payroll']];sum.range('A4:A11').values=depts.map(d=>[d]);for(const [c,f] of Object.entries({B:'=COUNTIF(Merit!$C$2:$C$421,A4)',C:'=SUMIF(Merit!$C$2:$C$421,A4,Merit!$G$2:$G$421)',D:'=C4*PoolRate',E:'=SUMIF(Merit!$C$2:$C$421,A4,Merit!$P$2:$P$421)',F:'=D4-E4',G:'=E4/C4',H:'=COUNTIFS(Merit!$C$2:$C$421,A4,Merit!$R$2:$R$421,"REVIEW")',I:'=Headcount!F4'}))sum.range(`${c}4:${c}11`).formulas=f;
    hc.merge('A1:M1');hc.range('A1').values=[['2027 headcount and base payroll plan']];hc.range('A3:M3').values=[['Department','Starting HC','Open reqs','Year-end HC','Current team payroll','Total payroll','Hires payroll','Total slip 1m','Total slip 2m','Total slip 3m','EOY slip 1m','EOY slip 2m','EOY slip 3m']];hc.range('A4:A11').values=depts.map(d=>[d]);for(const [c,f] of Object.entries({B:'=COUNTIF(Merit!$C$2:$C$421,A4)',C:"=COUNTIF('Open reqs'!$B$2:$B$35,A4)",D:"=B4+SUMIF('Open reqs'!$B$2:$B$35,A4,'Open reqs'!$L$2:$L$35)",E:'=SUMIF(Merit!$C$2:$C$421,A4,Merit!$Q$2:$Q$421)',F:'=E4+G4',G:"=SUMIF('Open reqs'!$B$2:$B$35,A4,'Open reqs'!$H$2:$H$35)",H:"=E4+SUMIF('Open reqs'!$B$2:$B$35,A4,'Open reqs'!$I$2:$I$35)",I:"=E4+SUMIF('Open reqs'!$B$2:$B$35,A4,'Open reqs'!$J$2:$J$35)",J:"=E4+SUMIF('Open reqs'!$B$2:$B$35,A4,'Open reqs'!$K$2:$K$35)",K:"=B4+SUMIF('Open reqs'!$B$2:$B$35,A4,'Open reqs'!$M$2:$M$35)",L:"=B4+SUMIF('Open reqs'!$B$2:$B$35,A4,'Open reqs'!$N$2:$N$35)",M:"=B4+SUMIF('Open reqs'!$B$2:$B$35,A4,'Open reqs'!$O$2:$O$35)"}))hc.range(`${c}4:${c}11`).formulas=f;
    for(const [s,cols] of [[sum,'BCDEFHI'],[hc,'BCDEFGHIJKLM']]){s.range('A12').values=[['Total']];for(const c of cols)s.range(`${c}12`).formulas=`=SUM(${c}4:${c}11)`;}sum.range('G12').formulas='=E12/C12';sum.merge('A13:I13');sum.range('A13').values=[['Positive pool remaining = unspent budget. Equity adjustments excluded.']];
    cd.range('A1:C1').values=[['Department','Pool','Proposed spend']];cd.range('E1:G1').values=[['Department','Current HC','Year-end HC']];for(let r=2;r<=9;r++){let sr=r+2;cd.range(`A${r}:C${r}`).values=[[`=Summary!A${sr}`,`=Summary!D${sr}`,`=Summary!E${sr}`]];cd.range(`E${r}:G${r}`).values=[[`=Headcount!A${sr}`,`=Headcount!B${sr}`,`=Headcount!D${sr}`]];}
    sum.charts.add('column',{data:'\'Chart data\'!A1:C9',at:'A15',to:'I31',title:'Proposed merit spend versus pool',axes:{y:{numberFormat:'$#,##0,"K"'}}});hc.charts.add('column',{data:'\'Chart data\'!E1:G9',at:'A15',to:'M31',title:'Current versus planned year-end headcount'});
    sens.merge('A1:F1');sens.range('A1').values=[['2027 payroll sensitivity: merit shift and hire delay']];sens.range('A3:F3').values=[['Merit shift (pp)','Merit spend','No hire delay','Slip 1 month','Slip 2 months','Slip 3 months']];sens.range('A4:A6').values=[['=-MeritStep'],['=Zero'],['=MeritStep']];for(let r=4;r<=6;r++){sens.range(`B${r}`).formulas=`=SUMPRODUCT(Merit!$G$2:$G$421,IF(Merit!$O$2:$O$421+$A${r}<Zero,Zero,IF(Merit!$O$2:$O$421+$A${r}>MaxProposed,MaxProposed,Merit!$O$2:$O$421+$A${r})))`;for(let i=0;i<4;i++)sens.range(`${'CDEF'[i]}${r}`).formulas=`=SUM(Merit!$G$2:$G$421)+B${r}+SUM('Open reqs'!${'HIJK'[i]}2:${'HIJK'[i]}35)`;}sens.merge('A8:F8');sens.range('A8').values=[['Merit shifts each proposed rate, bounded at 0–10%; new hires retain budgeted salaries.']];sens.merge('A9:F9');sens.range('A9').values=[['Sensitivity uses unrounded awards; base case agrees with rounded awards to cents.']];sens.conditionalFormats.add('C4:F6',{type:'colorScale',colors:['green-50','white','red-50']});
    eq.merge('A1:H1');eq.range('A1').values=[['Equity review: current compa-ratio below 0.85']];eq.range('A3:H3').values=[['Employee ID','Name','Department','Level','Base salary','Compa-ratio','Gap to 0.85','Post-merit compa']];eq.range('A4').formulas='=FILTER(Merit!A2:D421,Merit!M2:M421<EquityThreshold)';for(const [c,f] of Object.entries({E:'Merit!G2:G421',F:'Merit!M2:M421',G:'Merit!S2:S421',H:'Merit!Q2:Q421/Merit!K2:K421'}))eq.range(`${c}4`).formulas=`=FILTER(${f},Merit!M2:M421<EquityThreshold)`;
    bv.merge('A1:E1');bv.range('A1').values=[['Current salary relative to band']];bv.range('A3:E3').values=[['Department','Below minimum','Within band','Above maximum','Below 0.85 compa']];bv.range('A4:A11').values=depts.map(d=>[d]);for(const c of 'BCD')bv.range(`${c}4:${c}11`).formulas=`=COUNTIFS(Merit!$C$2:$C$421,$A4,Merit!$T$2:$T$421,${c}$3)`;bv.range('E4:E11').formulas='=COUNTIFS(Merit!$C$2:$C$421,A4,Merit!$M$2:$M$421,"<"&EquityThreshold)';bv.range('A12').values=[['Total']];for(const c of 'BCDE')bv.range(`${c}12`).formulas=`=SUM(${c}4:${c}11)`;bv.charts.add('column',{data:'A3:D11',at:'A15',to:'E31',stacked:true,title:'Employees below, within and above salary band'});
    ck.range('A1:B12').values=[['Reconciliation checks (all zero)','Difference'],['HRIS rows minus merit rows',"=COUNTA('Active employees'!A2:A421)-COUNTA(Merit!A2:A421)"],['HRIS base minus merit base',"=ROUND(SUM('Active employees'!G2:G421)-SUM(Merit!G2:G421),MoneyDecimals)"],['Department HC minus HRIS rows',"=SUM(Summary!B4:B11)-COUNTA('Active employees'!A2:A421)"],['Source IDs missing/duplicated in model',"=SUMPRODUCT(--(COUNTIF(Merit!A2:A421,'Active employees'!A2:A421)<>One))"],['Model IDs missing/duplicated in source','=COUNTIF(Merit!U2:U421,"<>"&One)'],['Duplicate source IDs',"=COUNTA('Active employees'!A2:A421)-ROWS(UNIQUE('Active employees'!A2:A421))"],['Plan start HC minus source',"=Headcount!B12-COUNTA('Active employees'!A2:A421)"],['Year-end minus current and reqs',"=Headcount!D12-Headcount!B12-COUNTA('Open reqs'!A2:A35)"],['Payroll minus components',"=ROUND(Headcount!F12-SUM(Merit!Q2:Q421)-SUM('Open reqs'!H2:H35),MoneyDecimals)"],['Sensitivity base minus plan','=ROUND(Sensitivity!C5-Headcount!F12,MoneyDecimals)'],['Invalid proposed percentages','=COUNTBLANK(Merit!O2:O421)+COUNTIF(Merit!O2:O421,"<"&Zero)+COUNTIF(Merit!O2:O421,">"&MaxProposed)']];
    raw.tables.add('A1:I421',{name:'HRIS'});
    const sheetNames=['Active employees','Bands','Matrix','Open reqs','Read me','Assumptions','Merit','Summary','Headcount','Sensitivity','Equity review','Band position','Checks','Chart data'];for(const name of sheetNames){const s=workbook.sheets.get(name);s.showGridLines=false;s.setColumnWidth('A',180).setColumnWidth('B:U',140);s.usedRange.format({fontSize:11});const header=['Summary','Headcount','Sensitivity','Equity review','Band position'].includes(name)?3:1;const last=({Merit:'U',Headcount:'M',Summary:'I','Equity review':'H',Sensitivity:'F','Band position':'E','Active employees':'I','Open reqs':'P',Bands:'E',Matrix:'D','Read me':'F','Chart data':'G'})[name]||'B';s.range(`A${header}:${last}${header}`).format({fill:'accent1',color:'white',bold:true,wrap:true});s.freeze(header);s.protect({password:'Merit2027',allow:['autoFilter','sort']});}
    for(const r of ['B2','B6','B15'])a.range(r).numberFormat='percent1';a.setColumnWidth('A',300);intro.setColumnWidth('A',175).setColumnWidth('B:F',150);intro.range('A1:F1').format({fontSize:18});m.setColumnWidth('B:C',170);m.freeze(1,2);m.range('G2:G421').numberFormat='currency0';m.range('J2:L421').numberFormat='currency0';m.range('P2:Q421').numberFormat='currency';m.range('S2:S421').numberFormat='currency';m.range('F2:F421').numberFormat='date';m.range('M2:M421').numberFormat='0.00"x"';m.range('N2:O421').numberFormat='percent1';req.range('D2:D35').numberFormat='date';req.range('E2:E35').numberFormat='currency0';req.range('H2:K35').numberFormat='currency';raw.range('F2:F421').numberFormat='date';raw.range('G2:G421').numberFormat='currency0';workbook.sheets.get('Bands').range('C2:E9').numberFormat='currency0';workbook.sheets.get('Matrix').range('B2:D6').numberFormat='percent1';sum.range('C4:F12').numberFormat='currency0';sum.range('I4:I12').numberFormat='currency0';sum.range('G4:G12').numberFormat='percent1';hc.range('E4:J12').numberFormat='currency0';sens.range('A4:A6').numberFormat='0.0%';sens.range('B4:F6').numberFormat='currency0';eq.range('E4:E423').numberFormat='currency0';eq.range('G4:G423').numberFormat='currency0';eq.range('F4:F423').numberFormat='0.00"x"';eq.range('H4:H423').numberFormat='0.00"x"';ck.setColumnWidth('A',375);for(const [s,c] of [[sum,'I'],[hc,'M'],[bv,'E']])s.range(`A12:${c}12`).format({fill:'green-50',bold:true,borderTop:'thin'});
    return {checks:ck.range('A1:B12').values,summary:sum.range('A3:I12').values,headcount:hc.range('A3:M12').values,sensitivity:sens.range('A3:F6').values,bands:bv.range('A3:E12').values,equityFirst:eq.range('A4:H11').values};
    {
      "ok": true,
      "value": {
        "checks": [
          [
            "Reconciliation checks (all zero)",
            "Difference"
          ],
          [
            "HRIS rows minus merit rows",
            0
          ],
          [
            "HRIS base minus merit base",
            0
          ],
          [
            "Department HC minus HRIS rows",
            0
          ],
          [
            "Source IDs missing/duplicated in model",
            0
          ],
          [
            "Model IDs missing/duplicated in source",
            0
          ],
          [
            "Duplicate source IDs",
            0
          ],
          [
            "Plan start HC minus source",
            0
          ],
          [
            "Year-end minus current and reqs",
            0
          ],
          [
            "Payroll minus components",
            0
          ],
          [
            "Sensitivity base minus plan",
            0
          ],
          [
            "Invalid proposed percentages",
            0
          ]
        ],
        "summary": [
          [
            "Department",
            "Active HC",
            "Eligible base",
            "Pool at 3.5%",
            "Proposed spend",
            "Pool remaining",
            "Weighted rate",
            "Equity reviews",
            "2027 base payroll"
          ],
          [
            "Customer Success",
            51,
            5909300,
            206825.50000000003,
            191158,
            15667.50000000003,
            0.03234867073934307,
            4,
            6551791.333333333
          ],
          [
            "Engineering",
            146,
            17875400,
            625639.0000000001,
            575035,
            50604.00000000012,
            0.03216907034248185,
            13,
            19841768.333333332
          ],
          [
            "Finance",
            21,
            2471300,
            86495.50000000001,
            91833.5,
            -5337.999999999985,
            0.03715999676283737,
            1,
            2645633.5
          ],
          [
            "Marketing",
            27,
            3567100,
            124848.50000000001,
            112774,
            12074.500000000015,
            0.03161503742535954,
            2,
            3881957.3333333335
          ],
          [
            "Operations",
            32,
            4124600,
            144361,
            131913.5,
            12447.5,
            0.03198213160064006,
            1,
            4560680.166666667
          ],
          [
            "People",
            23,
            2567400,
            89859.00000000001,
            80597,
            9262.000000000015,
            0.03139245929734362,
            5,
            2743580.3333333335
          ],
          [
            "Product",
            31,
            3720500,
          
    …
  12. artiwright_lint
    {
      "session": "merit-cycle",
      "document": "workbook",
      "rules": "",
      "severity": "warn",
      "slide": ""
    }
    {
      "ok": true,
      "errors": 0,
      "warnings": 2,
      "findings": [
        {
          "rule": "number/unformatted",
          "sheet": "Chart data",
          "range": "B2:B9",
          "message": "8 numbers in column B have no number format.",
          "fix": "range.numberFormat = \"#,##0\" (or \"currency\", \"percent1\", \"millions\", …).",
          "severity": "warn"
        },
        {
          "rule": "number/unformatted",
          "sheet": "Chart data",
          "range": "C2:C9",
          "message": "8 numbers in column C have no number format.",
          "fix": "range.numberFormat = \"#,##0\" (or \"currency\", \"percent1\", \"millions\", …).",
          "severity": "warn"
        }
      ]
    }
  13. artiwright_render
    {
      "session": "merit-cycle",
      "document": "workbook",
      "slides": [],
      "sheets": [
        "Read me",
        "Summary",
        "Headcount",
        "Sensitivity",
        "Equity review",
        "Band position",
        "Checks",
        "Merit",
        "Assumptions",
        "Active employees",
        "Bands",
        "Matrix",
        "Open reqs",
        "Chart data"
      ],
      "range": "A1:I16"
    }
    Sheet Read me A1:I16Sheet Summary A1:I16Sheet Headcount A1:I16Sheet Sensitivity A1:I16Sheet Equity review A1:I16Sheet Band position A1:I16
    A render the agent looked atA render the agent looked atA render the agent looked atA render the agent looked atA render the agent looked atA render the agent looked at
  14. The model reconciles to all 420 HRIS employees and $50.708M in base salary. The matrix-seeded proposal totals $1.633M against a $1.775M pool; Finance is $5,338 over its departmental allocation. It also flags 34 people below 0.85 compa-ratio and plans 34 hires, bringing year-end headcount to 454. I’m checking the protected inputs and cost sensitivities next.

  15. artiwright_help
    {
      "query": "sheet.setRowHeight, TableOptions, TitleSlide, slide.charts.add",
      "search": "",
      "maxChars": 11000
    }
    sheet.setRowHeight: sheet.setRowHeight(rows: number | string, px: number): this
    Sets row heights in px: `sheet.setRowHeight(1, 32)`, `sheet.setRowHeight("2:10", 24)`. Rows are 1-based like Excel's.
    
    Examples:
      sheet.setRowHeight(1, 32)
      sheet.setRowHeight("2:10", 24)
    
    TableOptions
      frame: Frame
      name?: string
      alt?: string
      rows: Cell[][]  Rows of cells, HTML-style: a cell with colSpan/rowSpan covers later positions, and the covered positions are left out of later cells in that row or the rows below.
      columns?: Array<number | string>  Column widths in px or fractions ("2fr").
      header?: boolean | number  Number of header rows (default 1).
      style?: TableStylePreset  Default "grid".
      headerFill?: string
      headerColor?: string
      bandFill?: string  Fill for alternating body rows.
      border?: string  Border stroke used by the preset, e.g. "1px solid slate-300".
      textStyle?: string | TextStyle  Style for body cells.
      headerStyle?: string | TextStyle  Style for header cells (merged over textStyle).
      padding?: number | { x: number; y: number }  Cell padding in px: one value or { x, y }.
      rowHeight?: number  Minimum row height in px.
      rowHeights?: number[]  Each row's height in px, overriding rowHeight (compose sets these from the measured text).
      numberAlign?: TextStyle["align"]  Alignment for columns whose body cells are all numbers, header included.
      Also accepted: data → rows, cells → rows, body → rows, colWidths → columns, columnWidths → columns, headerRows → header, position → frame, description → alt, preset → style, fontSize → textStyle.size, cellPadding → padding, margin → padding
    
    recipes.TitleSlide: compose(slide, h(TitleSlide, props))
    Opening slide: large title, subtitle and a date, over an accent rule.
      title: string
      subtitle?: string
      eyebrow?: string
      date?: string
      figures?: Array<{ value: string; label: string }>  Up to four headline figures along the bottom, for a short briefing whose cover also gives the answer: `[{ value: "3.7%", label: "CPI, Sep 2026" }]`.
    
    slide.charts.add: add(type: ChartType, options: ChartOptions): Chart
    Adds a native, editable chart. "column" is vertical bars, "bar" horizontal bars:
    `charts.add("column", { frame, categories: ["Q1", "Q2"], series: [{ name: "ARR", values: [4, 6] }] })`.
    
    ChartType:
      Values: column, bar, line, area, pie, doughnut, scatter, bubble, radar, stock, waterfall, funnel, treemap, 
    …
  16. artiwright_runerror
    const names=['Active employees','Bands','Matrix','Open reqs','Read me','Assumptions','Merit','Summary','Headcount','Sensitivity','Equity review','Band position','Checks','Chart data'];for(const name of names){const s=workbook.sheets.get(name);s.usedRange.format({locked:true});s.setRowHeight(1,34);s.setRowHeight('2:423',24);}const m=workbook.sheets.get('Merit');m.range('O2:O421').format({locked:false});m.setRowHeight(1,42);workbook.sheets.get('Headcount').setRowHeight(3,44);workbook.sheets.get('Summary').setRowHeight(3,38);const ss=workbook.sheets.get('Sensitivity');for(let r=4;r<=6;r++)ss.range(`B${r}`).formulas=`=SUMPRODUCT(ROUND(Merit!$G$2:$G$421*IF(Merit!$O$2:$O$421+$A${r}<Zero,Zero,IF(Merit!$O$2:$O$421+$A${r}>MaxProposed,MaxProposed,Merit!$O$2:$O$421+$A${r})),MoneyDecimals))`;ss.range('A9').values=[['Merit awards rounded to cents in every scenario, consistent with the manager plan.']];workbook.sheets.get('Chart data').range('B2:C9').numberFormat='currency0';
    for(const [name,last] of [['Summary','I'],['Headcount','M'],['Sensitivity','F'],['Equity review','H'],['Band position','E']]){const s=workbook.sheets.get(name);s.range(`A1:${last}1`).format({fill:'accent1',color:'white',bold:true,fontSize:16});}
    workbook.sheets.get('Read me').setRowHeight('3:15',34);const c=workbook.sheets.get('Checks');c.range('A13:A15').values=[['Unmatched employee bands'],['Unmatched ratings'],['Band position totals minus HRIS']];c.range('B13:B15').values=[['=SUMPRODUCT(--(COUNTIF(Bands!A2:A9,Merit!D2:D421)<>One))'],['=SUMPRODUCT(--(COUNTIF(Matrix!A2:A6,Merit!H2:H421)<>One))'],["=SUM('Band position'!B12:D12)-COUNTA('Active employees'!A2:A421)"]];
    const summary=workbook.sheets.get('Summary').range('A4:I12').values,hc=workbook.sheets.get('Headcount').range('A4:M12').values,bands=workbook.sheets.get('Band position').range('A4:E12').values,merit=m.range('A2:U421').values,scen=ss.range('A4:F6').values;const equity=merit.filter(r=>r[12]<0.85).sort((a,b)=>a[12]-b[12]);const total=summary[8],hct=hc[8];const post=equity.filter(r=>r[16]/r[10]<0.85).length,gap=equity.reduce((s,r)=>s+r[18],0);const fmt=n=>'$'+(n/1e6).toFixed(2)+'M';const k=n=>'$'+Math.round(n/1000)+'K';
    const data={departments:summary.map(r=>r[0]).slice(0,8),pool:summary.slice(0,8).map(r=>r[3]),spend:summary.slice(0,8).map(r=>r[4]),bandSeries:{below:bands.slice(0,8).map(r=>r[1]),within:bands.slice(0,8).map(r=>r[2]),above:bands.slice(0,8).map(r=>r[3])},currentHC:hc.slice(0,8).map(r=>r[1]),yearEndHC:hc.slice(0,8).map(r=>r[3]),equity:equity.map(r=>[r[0],r[1],r[2],r[12].toFixed(3)]),metrics:{pool:fmt(total[3]),spend:fmt(total[4]),remaining:k(total[5]),financeOver:k(-summary[2][5]),financeOverExact:'$'+Math.round(-summary[2][5]).toLocaleString('en-US'),rate:(total[6]*100).toFixed(2)+'%',equity:equity.length,postEquity:post,gap:k(gap),belowMin:bands[8][1],withinBand:bands[8][2],aboveMax:bands[8][3],start:hct[1],hires:hct[2],end:hct[3],payroll:fmt(hct[5]),hireCost:fmt(hct[6]),savings1:k(hct[5]-hct[7]),savings2:k(hct[5]-hct[8]),savings3:fmt(hct[5]-hct[9]),higherMeritCost:k(scen[2][2]-scen[1][2]),lowMerit:fmt(scen[0][2]),highMerit:fmt(scen[2][2])}};
    const ds=workbook.sheets.add('Executive snapshot');ds.range('A1:B1').values=[['Metric','Deck display value']];ds.range('A2:B26').values=Object.entries(data.metrics).map(([k,v])=>[k,v]);ds.setColumnWidth('A:B',220);ds.showGridLines=false;ds.range('A1:B1').format({fill:'accent1',color:'white',bold:true});ds.protect({password:'Merit2027'});return {checks:c.range('A2:B15').values,deckData:data};
    {
      "ok": false,
      "error": {
        "name": "ArtiwrightError",
        "message": "range.values: A2:B26 is 25×2 but the values are 23×2. Match the range, or write to its first cell."
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Active employees",
        "Bands",
        "Matrix",
        "Open reqs",
        "Read me",
        "Assumptions",
        "Merit",
        "Summary",
        "Headcount",
        "Sensitivity",
        "Equity review",
        "Band position",
        "Checks",
        "Chart data"
      ],
      "version": 4,
      "lint": {
        "errors": 0,
        "warnings": 0
      }
    }
  17. artiwright_run
    const names=['Active employees','Bands','Matrix','Open reqs','Read me','Assumptions','Merit','Summary','Headcount','Sensitivity','Equity review','Band position','Checks','Chart data'];for(const name of names){const s=workbook.sheets.get(name);s.usedRange.format({locked:true});s.setRowHeight(1,34);s.setRowHeight('2:423',24);}const m=workbook.sheets.get('Merit');m.range('O2:O421').format({locked:false});m.setRowHeight(1,42);workbook.sheets.get('Headcount').setRowHeight(3,44);workbook.sheets.get('Summary').setRowHeight(3,38);const ss=workbook.sheets.get('Sensitivity');for(let r=4;r<=6;r++)ss.range(`B${r}`).formulas=`=SUMPRODUCT(ROUND(Merit!$G$2:$G$421*IF(Merit!$O$2:$O$421+$A${r}<Zero,Zero,IF(Merit!$O$2:$O$421+$A${r}>MaxProposed,MaxProposed,Merit!$O$2:$O$421+$A${r})),MoneyDecimals))`;ss.range('A9').values=[['Awards rounded to cents in every scenario, consistent with the manager plan.']];workbook.sheets.get('Chart data').range('B2:C9').numberFormat='currency0';for(const [name,last] of [['Summary','I'],['Headcount','M'],['Sensitivity','F'],['Equity review','H'],['Band position','E']])workbook.sheets.get(name).range(`A1:${last}1`).format({fill:'accent1',color:'white',bold:true,fontSize:16});workbook.sheets.get('Read me').setRowHeight('3:15',34);
    const c=workbook.sheets.get('Checks');c.range('A13:B15').values=[['Unmatched employee bands','=SUMPRODUCT(--(COUNTIF(Bands!A2:A9,Merit!D2:D421)<>One))'],['Unmatched ratings','=SUMPRODUCT(--(COUNTIF(Matrix!A2:A6,Merit!H2:H421)<>One))'],['Band position totals minus HRIS',"=SUM('Band position'!B12:D12)-COUNTA('Active employees'!A2:A421)"]];
    const summary=workbook.sheets.get('Summary').range('A4:I12').values,hc=workbook.sheets.get('Headcount').range('A4:M12').values,bands=workbook.sheets.get('Band position').range('A4:E12').values,merit=m.range('A2:U421').values,scen=ss.range('A4:F6').values,equity=merit.filter(r=>r[12]<0.85).sort((a,b)=>a[12]-b[12]),total=summary[8],hct=hc[8];const fmt=n=>'$'+(n/1e6).toFixed(2)+'M',k=n=>'$'+Math.round(n/1000)+'K';
    const data={departments:summary.slice(0,8).map(r=>r[0]),pool:summary.slice(0,8).map(r=>r[3]),spend:summary.slice(0,8).map(r=>r[4]),bandSeries:{below:bands.slice(0,8).map(r=>r[1]),within:bands.slice(0,8).map(r=>r[2]),above:bands.slice(0,8).map(r=>r[3])},currentHC:hc.slice(0,8).map(r=>r[1]),yearEndHC:hc.slice(0,8).map(r=>r[3]),equity:equity.map(r=>[r[0],r[1],r[2],r[12].toFixed(3)]),metrics:{pool:fmt(total[3]),spend:fmt(total[4]),remaining:k(total[5]),financeOverExact:'$'+Math.round(-summary[2][5]).toLocaleString('en-US'),rate:(total[6]*100).toFixed(2)+'%',equity:equity.length,postEquity:equity.filter(r=>r[16]/r[10]<0.85).length,gap:k(equity.reduce((s,r)=>s+r[18],0)),belowMin:bands[8][1],withinBand:bands[8][2],aboveMax:bands[8][3],start:hct[1],hires:hct[2],end:hct[3],payroll:fmt(hct[5]),hireCost:fmt(hct[6]),savings1:k(hct[5]-hct[7]),savings2:k(hct[5]-hct[8]),savings3:fmt(hct[5]-hct[9]),higherMeritCost:k(scen[2][2]-scen[1][2]),lowMerit:fmt(scen[0][2]),highMerit:fmt(scen[2][2])}};
    const ds=workbook.sheets.add('Executive snapshot');ds.range('A1:B1').values=[['Metric','Deck display value']];ds.range('A2').values=Object.entries(data.metrics).map(([k,v])=>[k,v]);ds.setColumnWidth('A:B',220);ds.showGridLines=false;ds.range('A1:B1').format({fill:'accent1',color:'white',bold:true});ds.protect({password:'Merit2027'});return {checks:c.range('A2:B15').values,deckData:data};
    {
      "ok": true,
      "value": {
        "checks": [
          [
            "HRIS rows minus merit rows",
            0
          ],
          [
            "HRIS base minus merit base",
            0
          ],
          [
            "Department HC minus HRIS rows",
            0
          ],
          [
            "Source IDs missing/duplicated in model",
            0
          ],
          [
            "Model IDs missing/duplicated in source",
            0
          ],
          [
            "Duplicate source IDs",
            0
          ],
          [
            "Plan start HC minus source",
            0
          ],
          [
            "Year-end minus current and reqs",
            0
          ],
          [
            "Payroll minus components",
            0
          ],
          [
            "Sensitivity base minus plan",
            0
          ],
          [
            "Invalid proposed percentages",
            0
          ],
          [
            "Unmatched employee bands",
            0
          ],
          [
            "Unmatched ratings",
            0
          ],
          [
            "Band position totals minus HRIS",
            0
          ]
        ],
        "deckData": {
          "departments": [
            "Customer Success",
            "Engineering",
            "Finance",
            "Marketing",
            "Operations",
            "People",
            "Product",
            "Sales"
          ],
          "pool": [
            206825.50000000003,
            625639.0000000001,
            86495.50000000001,
            124848.50000000001,
            144361,
            89859.00000000001,
            130217.50000000001,
            366534.00000000006
          ],
          "spend": [
            191158,
            575035,
            91833.5,
            112774,
            131913.5,
            80597,
            113075,
            336428
          ],
          "bandSeries": {
            "below": [
              3,
              10,
              1,
              2,
              0,
              5,
              0,
              7
            ],
            "within": [
              48,
              136,
              20,
              25,
              32,
              18,
              31,
              82
            ],
            "above": [
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0
            ]
          },
          "currentHC": [
            51,
            146,
            21,
            27,
            32,
            23,
            31,
            89
          ],
          "yearEndHC": [
            56,
            161,
            22,
            30,
            35,
            25,
            32,
            93
          ],
          "equity": [
            [
              "E1070",
              "Ben Weber",
              "Sales",
              "0.788"
            ],
        
    …
  18. artiwright_run
    const cats=['Customer Success','Engineering','Finance','Marketing','Operations','People','Product','Sales'];
    const first=deck.slides.add();compose(first,h(TitleSlide,{title:'$1.63M proposed against a $1.77M pool',subtitle:'2027 merit cycle. Matrix-seeded proposals leave $142K available.',eyebrow:'Executive decision briefing',date:'Effective January 1, 2027'}));
    const second=deck.slides.add();compose(second,h(ChartTakeaway,{title:'28 employees are below their band minimum',chart:{type:'bar',categories:cats,series:[{name:'Below minimum',values:[3,10,1,2,0,5,0,7]},{name:'Within band',values:[48,136,20,25,32,18,31,82]}],format:'0'},figure:{value:'392',label:'employees within band'},takeaways:['No employee is above the band maximum.','Band minimum and equity threshold are different tests.','Review low pay alongside performance before approving awards.'],note:'Source: HRIS September 30, 2026 and comp_bands.csv. Current pay, before proposed merit.'}));
    const roster=[['E1070','Ben Weber','Sales','0.788'],['E1025','Hana Garcia','Marketing','0.789'],['E1150','Rosa Weber','People','0.789'],['E1334','Nadia Fujita','Sales','0.790'],['E1316','Yara Yilmaz','Engineering','0.792'],['E1032','Mei Jansen','Customer Success','0.792'],['E1329','Felix Ulloa','Engineering','0.793'],['E1192','Farid Varga','Engineering','0.794'],['E1213','Farid Garcia','Engineering','0.796'],['E1369','Hana Dimitrov','People','0.796'],['E1399','Isla Garcia','Engineering','0.796'],['E1147','Owen Yilmaz','Sales','0.798'],['E1235','Liam Lindqvist','People','0.800'],['E1218','Pablo Ulloa','Sales','0.806'],['E1051','Diego Iyer','Sales','0.808'],['E1280','Dev Kowalski','Sales','0.809'],['E1389','Chloe Xu','Engineering','0.811'],['E1260','Hana Okafor','Engineering','0.811'],['E1130','Sven Zhou','Sales','0.812'],['E1267','Ruth Yilmaz','People','0.815'],['E1401','Yara Zhou','Finance','0.819'],['E1283','Talia Yilmaz','Engineering','0.820'],['E1361','Keiko Sato','Marketing','0.824'],['E1197','Owen Weber','Engineering','0.824'],['E1326','Priya Lindqvist','People','0.825'],['E1030','Olga Nakamura','Engineering','0.826'],['E1350','Olga Nakamura','Customer Success','0.827'],['E1404','Elena Osei','Customer Success','0.829'],['E1410','Leo Mbeki','Engineering','0.834'],['E1047','Hana Moreau','Engineering','0.835'],['E1366','Maya Lindqvist','Sales','0.836'],['E1279','Elena Ulloa','Customer Success','0.840'],['E1108','Isla Dimitrov','Engineering','0.844'],['E1281','Priya Ulloa','Operations','0.847']];
    const third=deck.slides.add({layout:'title-only',title:'34 people need an equity review below 0.85 compa'});third.shapes.add({geometry:'textbox',frame:{x:48,y:110,w:1184,h:42},text:'22 remain below 0.85 after proposed merit. The current $148K gap is diagnostic, not approved spend.',textStyle:{size:20,color:'fg1'}});for(let i=0;i<2;i++)third.tables.add({frame:{x:48+i*604,y:174,w:580,h:450},columns:[72,165,250,93],rows:[['ID','Employee','Department','Compa'],...roster.slice(i*17,i*17+17)],style:'striped',textStyle:{size:16},headerStyle:{size:16,bold:true},padding:{x:6,y:3},rowHeight:25});third.shapes.add({geometry:'textbox',frame:{x:48,y:653,w:1184,h:30},text:'Source: HRIS and compensation bands. Sorted by unrounded current compa-ratio; base salary divided by band midpoint.',textStyle:{size:14,color:'fg2'}});
    const fourth=deck.slides.add();compose(fourth,h(ChartTakeaway,{title:'34 hires bring the plan to 454 people and $55.22M',chart:{type:'column',categories:cats,series:[{name:'Current employees',values:[51,146,21,27,32,23,31,89]},{name:'Planned year-end',values:[56,161,22,30,35,25,32,93]}],format:'0'},figure:{value:'420',label:'starting employees, reconciled to HRIS'},takeaways:['New hires add $2.88M in prorated base payroll.','Hire slips save $342K, $684K or $1.03M.','A 0.5-point merit increase adds $254K.'],note:'Source: Headcount and Sensitivity. Slips are one, two or three months. Full start month included; no attrition, taxes or benefits.'}));
    const fifth=deck.slides.add();compose(fifth,h(Timeline,{title:'Approve the pool, equity approach and cycle milestones',eyebrow:'Proposed milestones, except the fixed effective date',steps:[{date:'October 2026',title:'Managers propose',text:'Review matrix guidelines; submit proposed rates.'},{date:'November 2026',title:'People calibrates',text:'Review equity cases and departmental exceptions.'},{date:'December 2026',title:'Executives approve',text:'Approve final awards, equity funding and hiring plan.'},{date:'January 1, 2027',title:'Awards take effect',text:'Payroll implements approved base salaries.'}]}));return {slides:[first.id,second.id,third.id,fourth.id,fifth.id]};
    {
      "ok": true,
      "value": {
        "slides": [
          "sl_PC0XCX2V",
          "sl_MY8HSBWY",
          "sl_3VYFAEC7",
          "sl_R1P5XPN2",
          "sl_82G51KZ0"
        ]
      },
      "logs": [],
      "created": [
        "sl_PC0XCX2V",
        "sh_X5K1148K",
        "sh_4622AEAW",
        "sh_6EBJ7NVS",
        "sh_JJJRKK27",
        "sh_AJ6X8G9A",
        "sl_MY8HSBWY",
        "sh_9XC67A97",
        "ch_CGJKT5SN",
        "sh_A4VCWQX0",
        "sh_02Y8QB2G",
        "sh_78QC3MKP",
        "sh_A8KXR6B3",
        "sl_3VYFAEC7",
        "sh_XXA6S5TS",
        "sh_9RW6TCZK",
        "tb_P1072SY0",
        "tb_VXHAWM60",
        "sh_ZQB48W9R",
        "sl_R1P5XPN2",
        "sh_SD6PTDHJ",
        "ch_ZAJKWZH3",
        "sh_YY83A5K5",
        "sh_ARZ1NRX3",
        "sh_9QKB771S",
        "sh_WTE4GZXB",
        "sl_82G51KZ0",
        "sh_EY3RWH0W",
        "sh_2VDK8NCE",
        "sh_1AV47WT1",
        "sh_BV3PCT83",
        "sh_ZP5YF7V2",
        "sh_447KASEV",
        "sh_1N8KP9WV",
        "sh_M6Q7YBVB",
        "sh_0TG3BG57",
        "sh_RRF7X8X2",
        "sh_S9P3V1SA",
        "sh_NPVZCVN8",
        "sh_P7N9NK2R",
        "sh_8CQNRR0X",
        "sh_EA8Z8HTE",
        "sh_WQKPP82J",
        "sh_AA9ZMGSQ",
        "sh_MJNR7E8M",
        "sh_N9N5CJHM",
        "sh_HHG9X8W7",
        "sh_FSMR776D",
        "sh_G6DJT07W"
      ],
      "removed": [],
      "slides": 5,
      "version": 1,
      "lint": {
        "errors": 1,
        "warnings": 1
      },
      "theme": {
        "theme": "Spruce",
        "source": "requested"
      }
    }
  19. artiwright_inspect
    {
      "session": "merit-cycle",
      "document": "deck",
      "kind": "text,shape",
      "slide": 1,
      "search": "",
      "target": "",
      "maxChars": 10000,
      "sheet": "",
      "range": ""
    }
    {"kind":"shape","id":"sh_X5K1148K","slide":"sl_PC0XCX2V","name":"accent-rule","bbox":[96,176,96,8],"compose":"column:title-slide/shape[0]:accent-rule","geometry":"rect"}
    {"kind":"text","id":"sh_4622AEAW","slide":"sl_PC0XCX2V","bbox":[96,203,1088,25],"compose":"column:title-slide/text[1]","text":"EXECUTIVE DECISION BRIEFING","chars":27,"lines":1,"fontPx":18}
    {"kind":"text","id":"sh_6EBJ7NVS","slide":"sl_PC0XCX2V","name":"title","bbox":[96,247,1040,193],"compose":"column:title-slide/text[2]:title","text":"$1.63M proposed against a $1.77M pool","chars":37,"lines":2,"fontPx":72}
    {"kind":"text","id":"sh_JJJRKK27","slide":"sl_PC0XCX2V","name":"subtitle","bbox":[96,459,960,40],"compose":"column:title-slide/text[3]:subtitle","text":"2027 merit cycle. Matrix-seeded proposals leave $142K available.","chars":64,"lines":1,"fontPx":30}
    {"kind":"text","id":"sh_AJ6X8G9A","slide":"sl_PC0XCX2V","bbox":[96,518,1088,27],"compose":"column:title-slide/text[4]","text":"Effective January 1, 2027","chars":25,"lines":1,"fontPx":20}
  20. artiwright_lint
    {
      "session": "merit-cycle",
      "document": "deck",
      "rules": "",
      "severity": "warn",
      "slide": ""
    }
    {
      "ok": false,
      "errors": 1,
      "warnings": 1,
      "findings": [
        {
          "rule": "text/overflow",
          "message": "Text in \"title\" runs past the bottom of its box.",
          "evidence": {
            "lines": 2,
            "boxHeight": 139.3,
            "textHeight": 137.5
          },
          "fix": "Shorten the text, make the box taller, or set textBox: { autofit: \"shrink\" }.",
          "severity": "error",
          "slide": "sl_3VYFAEC7",
          "slideIndex": 3,
          "id": "sh_XXA6S5TS"
        },
        {
          "rule": "layout/overlap",
          "message": "Text in \"title\" overlaps the text of \"22 remain below 0.85 after pr…\".",
          "evidence": {
            "with": "sh_9RW6TCZK",
            "overlap": [
              98,
              120,
              824,
              19
            ]
          },
          "fix": "Move one of them, or put them in a stack if the overlap is intended.",
          "severity": "warn",
          "slide": "sl_3VYFAEC7",
          "slideIndex": 3,
          "id": "sh_XXA6S5TS"
        }
      ]
    }
  21. artiwright_lint
    {
      "session": "merit-cycle",
      "document": "workbook",
      "rules": "",
      "severity": "warn",
      "slide": ""
    }
    {
      "ok": true,
      "errors": 0,
      "warnings": 2,
      "findings": [
        {
          "rule": "number/as-text",
          "sheet": "Executive snapshot",
          "range": "B5",
          "message": "Executive snapshot!B5 holds \"$5,338\" as text, so SUM and charts skip it.",
          "fix": "Write the number itself: range(\"B5\").value = 5338.",
          "severity": "warn"
        },
        {
          "rule": "number/as-text",
          "sheet": "Executive snapshot",
          "range": "B6",
          "message": "Executive snapshot!B6 holds \"3.22%\" as text, so SUM and charts skip it.",
          "fix": "Write the number itself: range(\"B6\").value = 0.0322.",
          "severity": "warn"
        }
      ]
    }
  22. artiwright_run
    deck.resolve('sh_X5K1148K').update({frame:{x:64,y:198,w:1152,h:4}});deck.resolve('sh_4622AEAW').update({frame:{x:64,y:24,w:1152,h:28}});deck.resolve('sh_6EBJ7NVS').update({frame:{x:64,y:66,w:1152,h:64},textStyle:{size:48}});deck.resolve('sh_JJJRKK27').update({frame:{x:64,y:142,w:1152,h:40},textStyle:{size:25}});deck.resolve('sh_AJ6X8G9A').setText('Finance is $5,338 over its allocation. Effective January 1, 2027.');deck.resolve('sh_AJ6X8G9A').update({frame:{x:64,y:628,w:1152,h:30},textStyle:{size:20}});const first=deck.resolve('sl_PC0XCX2V');first.charts.add('column',{frame:{x:64,y:224,w:1152,h:378},categories:['Customer Success','Engineering','Finance','Marketing','Operations','People','Product','Sales'],series:[{name:'Pool at 3.5%',values:[206825.50000000003,625639.0000000001,86495.50000000001,124848.50000000001,144361,89859.00000000001,130217.50000000001,366534.00000000006]},{name:'Proposed spend',values:[191158,575035,91833.5,112774,131913.5,80597,113075,336428]}],axes:{y:{min:0,numberFormat:'$#,##0,"K"'}},legend:'bottom',title:'Proposed merit spend and pool by department',style:{size:16}});first.shapes.add({geometry:'textbox',frame:{x:64,y:674,w:1152,h:24},text:'Source: workbook Summary. Pool is 3.5% of all active September 30 base salaries. Equity adjustments excluded.',textStyle:{size:14,color:'fg2'}});deck.resolve('sh_XXA6S5TS').update({frame:{x:48,y:35,w:1184,h:60},textStyle:{size:38}});return {updated:true};
    {
      "ok": true,
      "value": {
        "updated": true
      },
      "logs": [],
      "created": [
        "ch_P9K70SY6",
        "sh_S3Q8GSPH"
      ],
      "removed": [],
      "slides": 5,
      "version": 2,
      "lint": {
        "errors": 1,
        "warnings": 2
      },
      "note": "Read under their right names, so the run went through: charts.add: read numberFormat as format. Use those names next time."
    }
  23. artiwright_render
    {
      "session": "merit-cycle",
      "document": "deck",
      "slides": [],
      "sheets": [],
      "range": ""
    }
    Contact sheet of 5 slides.
    A render the agent looked at
  24. artiwright_lint
    {
      "session": "merit-cycle",
      "document": "deck",
      "rules": "",
      "severity": "warn",
      "slide": ""
    }
    {
      "ok": false,
      "errors": 1,
      "warnings": 2,
      "findings": [
        {
          "rule": "chart/axis-unit",
          "message": "\"ch_P9K70SY6\" plots \"Pool at 3.5%\", but its value axis shows bare numbers, not percentages.",
          "evidence": {
            "series": "Pool at 3.5%",
            "axisFormat": "$#,##0,\"K\""
          },
          "fix": "Give the axis a percent format: axes: { y: { format: '0\"%\"' } } (the quotes print a % sign without scaling the values), or title it with the unit.",
          "severity": "warn",
          "slide": "sl_PC0XCX2V",
          "slideIndex": 1,
          "id": "ch_P9K70SY6"
        },
        {
          "rule": "text/overflow",
          "message": "Text in \"Source: workbook Summary. Poo…\" runs past the bottom of its box.",
          "evidence": {
            "lines": 1,
            "boxHeight": 24,
            "textHeight": 22.8
          },
          "fix": "Shorten the text, make the box taller, or set textBox: { autofit: \"shrink\" }.",
          "severity": "error",
          "slide": "sl_PC0XCX2V",
          "slideIndex": 1,
          "id": "sh_S3Q8GSPH"
        },
        {
          "rule": "deck/cover",
          "severity": "warn",
          "message": "Slide 1 opens on a chart, so the deck has no cover.",
          "slide": "sl_PC0XCX2V",
          "slideIndex": 1,
          "evidence": {
            "opens": "a chart",
            "slides": 5
          },
          "fix": "Open with a cover: TitleSlide with the title, subtitle and date. When the slide count is tight, give it the headline figures (figures: [{ value, label }]) and move this slide's detail to the next one, rather than dropping the cover."
        }
      ]
    }
  25. artiwright_help
    {
      "query": "workbook.sheets.move, Chart.update, ChartOptions.axes",
      "search": "",
      "maxChars": 3500
    }
    workbook.sheets.move: workbook.sheets.move(sheet: Worksheet | string, to: number): void
    Moves a sheet to a position, 0 being first.
    
    chart.update: update(changes: Partial<ChartOptions>): this
    Changes some options and keeps the rest, e.g. new `series` or a `title`. Axes merge axis by
    axis and label or legend objects merge, so `{ axes: { y: { min: 2 } } }` keeps the y format.
    
    ChartOptions:
      frame: Frame
      name?: string
      alt?: string
      categories?: Array<string | number | string[]>  Category labels (not used by scatter and bubble charts).
      series: ChartSeriesInput[]
      title?: string | { text: string; style?: string | TextStyle; overlay?: boolean }
      legend?: | false | LegendPosition | { position?: LegendPosition; overlay?: boolean; style?: string | TextStyle }  Position, false to hide, or options.
      dataLabels?: boolean | DataLabelsInput  Labels on every series.
      stacked?: boolean | "percent"  Column, bar, line and area charts: stack series, or stack to 100%.
      axes?: { x?: AxisInput; y?: AxisInput; y2?: AxisInput }  y2: the secondary value axis on the right, for series with axis: "secondary".
      gap?: number  Space between bar groups, percent of a bar's width (0–500).
      overlap?: number  Bar overlap within a group, percent (-100–100).
      holeSize?: number  Doughnut hole, percent of the diameter (10–90).
      firstSliceAngle?: number  Pie and doughnut rotation in degrees.
      varyColors?: boolean  A different color for every point.
      radarStyle? (marker | filled | lines)
      blanks? (gap | zero | span)  How gaps draw: leave a gap, drop to zero, or connect across.
      style?: string | TextStyle  Default text for the chart: font, size, color.
      background?: string
      border?: string | LineOptions
      plotBackground?: string
      upDownBars?: boolean  Stock charts with four series (open, high, low, close).
      highLowLines?: boolean
      totals?: number[]  Waterfall: indexes of the points that are totals (full bars from zero), e.g. [0, 4].
      connectorLines?: boolean  Waterfall: lines joining the bars (default true).
      parentLabels? (overlapping | banner | none)  Treemap: parent labels (default "overlapping").
      bins?: number | { count?: number; width?: number }  Histogram: the number of bins, or their width (default: automatic).
      threeD?: boolean  Column, bar, line, area and pie charts drawn in 3D.
      split?: { by: "position" | "value" | "percent" | "custom"; value?: number; point
    …
  26. artiwright_run
    const ds=workbook.sheets.get('Executive snapshot');ds.range('B5').values=[['=ROUND(-Summary!F6,Zero)']];ds.range('B5').numberFormat='currency0';ds.range('B6').formulas='=Summary!G12';ds.range('B6').numberFormat='0.00%';workbook.sheets.get('Read me').range('B12').values=[['Only Merit Proposed % is unlocked. HR administers sheet protection; it is not access control.']];const order=['Read me','Summary','Merit','Equity review','Band position','Headcount','Sensitivity','Checks','Assumptions','Active employees','Bands','Matrix','Open reqs','Chart data','Executive snapshot'];order.forEach((s,i)=>workbook.sheets.move(s,i));const m=workbook.sheets.get('Merit'),ss=workbook.sheets.get('Summary'),ck=workbook.sheets.get('Checks'),old=m.range('O2').values[0][0],before=ss.range('E12').values[0][0];m.range('O2').values=[[0.1]];const after=ss.range('E12').values[0][0],testChecks=ck.range('B2:B15').values; m.range('O2').values=[[old]];ck.range('A17:B17').values=[['Total failed reconciliation checks','=COUNTIF(B2:B15,"<>"&Zero)']];ck.range('A17:B17').format({bold:true,fill:'green-50'});return {test:{originalRate:old,testRate:0.1,spendChange:after-before,checksAtTest:testChecks},finalChecks:ck.range('A2:B17').values,base: ss.range('C12:I12').values,headcount:workbook.sheets.get('Headcount').range('B12:M12').values};
    {
      "ok": true,
      "value": {
        "test": {
          "originalRate": 0.03,
          "testRate": 0.1,
          "spendChange": 9177,
          "checksAtTest": [
            [
              0
            ],
            [
              0
            ],
            [
              0
            ],
            [
              0
            ],
            [
              0
            ],
            [
              0
            ],
            [
              0
            ],
            [
              0
            ],
            [
              0
            ],
            [
              0
            ],
            [
              0
            ],
            [
              0
            ],
            [
              0
            ],
            [
              0
            ]
          ]
        },
        "finalChecks": [
          [
            "HRIS rows minus merit rows",
            0
          ],
          [
            "HRIS base minus merit base",
            0
          ],
          [
            "Department HC minus HRIS rows",
            0
          ],
          [
            "Source IDs missing/duplicated in model",
            0
          ],
          [
            "Model IDs missing/duplicated in source",
            0
          ],
          [
            "Duplicate source IDs",
            0
          ],
          [
            "Plan start HC minus source",
            0
          ],
          [
            "Year-end minus current and reqs",
            0
          ],
          [
            "Payroll minus components",
            0
          ],
          [
            "Sensitivity base minus plan",
            0
          ],
          [
            "Invalid proposed percentages",
            0
          ],
          [
            "Unmatched employee bands",
            0
          ],
          [
            "Unmatched ratings",
            0
          ],
          [
            "Band position totals minus HRIS",
            0
          ],
          [
            null,
            null
          ],
          [
            "Total failed reconciliation checks",
            0
          ]
        ],
        "base": [
          [
            50708000,
            1774780,
            1632814,
            141966.00000000026,
            0.0322003234203676,
            34,
            55216230.666666664
          ]
        ],
        "headcount": [
          [
            420,
            34,
            454,
            52340814,
            55216230.666666664,
            2875416.6666666665,
            54874230.666666664,
            54532230.66666667,
            54190230.666666664,
            454,
            454,
            454
          ]
        ]
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Read me",
        "Summary",
        "Merit",
        "Equity review",
        "Band position",
        "Headcount",
        "Sensitivity",
        "Checks",
        "Assumptions",
        "Activ
    …
  27. artiwright_run
    deck.resolve('sh_S3Q8GSPH').update({frame:{x:64,y:672,w:1152,h:34}});deck.resolve('ch_P9K70SY6').update({series:[{name:'Allocated pool',values:[206825.50000000003,625639.0000000001,86495.50000000001,124848.50000000001,144361,89859.00000000001,130217.50000000001,366534.00000000006]},{name:'Proposed spend',values:[191158,575035,91833.5,112774,131913.5,80597,113075,336428]}],axes:{y:{min:0,format:'$#,##0,"K"'}}});return {fixed:true};
    {
      "ok": true,
      "value": {
        "fixed": true
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 5,
      "version": 3,
      "lint": {
        "errors": 0,
        "warnings": 1
      }
    }
  28. artiwright_help
    {
      "query": "workbook.protect",
      "search": "",
      "maxChars": 2000
    }
    Nothing is called "workbook.protect". Closest entries (ask help(path) for one):
      workbook.inspect  Compact records of the workbook: sheets, cell values row by row, formulas with results, tables, charts and names.
      Workbook.create  A new, empty workbook; add sheets with `wb.sheets.add("Name")`.
      spreadsheets  Workbooks: Workbook.create(), sheets, ranges, formulas, formats, tables, rules, charts.
      workbook  An Excel workbook: `const wb = Workbook.create(); const s = wb.sheets.add("Model");` then `s.range("A1").values = [["Month", "Revenue"], ["Jan", 120]]` and `await wb.save("model.xlsx")`.
      workbook.creationId  A unique id for this workbook.
      workbook.theme  Theme colors and fonts (the same as a deck's): `wb.theme.set({ colors: { accent1: "#2346C8" } })`.
      workbook.now  The clock for TODAY() and NOW(); default the real time.
      Workbook.open  Opens an .xlsx (or an .xltx template) to edit it: `const wb = await Workbook.open("plan.xlsx")`.
      workbook.sheets.add  Adds a sheet at the end (or at `index`): `wb.sheets.add("Model")`.
      workbook.sheets.get  A sheet by name (not case-sensitive) or 0-based position.
  29. artiwright_render
    {
      "session": "merit-cycle",
      "document": "deck",
      "slides": [],
      "sheets": [],
      "range": ""
    }
    Contact sheet of 5 slides.
    A render the agent looked at
  30. artiwright_lint
    {
      "session": "merit-cycle",
      "document": "workbook",
      "rules": "",
      "severity": "warn",
      "slide": ""
    }
    {
      "ok": true,
      "errors": 0,
      "warnings": 0,
      "findings": []
    }
  31. artiwright_lint
    {
      "session": "merit-cycle",
      "document": "deck",
      "rules": "",
      "severity": "warn",
      "slide": ""
    }
    {
      "ok": true,
      "errors": 0,
      "warnings": 1,
      "findings": [
        {
          "rule": "deck/cover",
          "severity": "warn",
          "message": "Slide 1 opens on a chart, so the deck has no cover.",
          "slide": "sl_PC0XCX2V",
          "slideIndex": 1,
          "evidence": {
            "opens": "a chart",
            "slides": 5
          },
          "fix": "Open with a cover: TitleSlide with the title, subtitle and date. When the slide count is tight, give it the headline figures (figures: [{ value, label }]) and move this slide's detail to the next one, rather than dropping the cover."
        }
      ]
    }
  32. The workbook passes all 14 reconciliation checks. I also tested a Proposed % change: merit spend and payroll sensitivities recalculated correctly, then I restored the matrix-seeded value.

    The deck includes all 34 flagged employees by name. The cost plan assumes no attrition, includes each hire’s full start month, and excludes benefits and payroll taxes. Cycle dates other than January 1 are labeled as proposed.

  33. artiwright_finalize2027-merit-headcount-managers.xlsx
    {
      "session": "merit-cycle",
      "document": "workbook",
      "file": "2027-merit-headcount-managers.xlsx",
      "requirements": {
        "sheets": [
          "Read me",
          "Summary",
          "Merit",
          "Equity review",
          "Band position",
          "Headcount",
          "Sensitivity",
          "Checks",
          "Assumptions",
          "Active employees",
          "Bands",
          "Matrix",
          "Open reqs"
        ],
        "tables": [
          "HRIS",
          "MeritPlan",
          "Bands",
          "Matrix",
          "OpenReqs"
        ],
        "charts": 3,
        "values": [
          {
            "cell": "Summary!B12",
            "equals": 420,
            "tolerance": 0
          },
          {
            "cell": "Summary!C12",
            "equals": 50708000,
            "tolerance": 0.01
          },
          {
            "cell": "Summary!D12",
            "equals": 1774780,
            "tolerance": 0.01
          },
          {
            "cell": "Summary!E12",
            "equals": 1632814,
            "tolerance": 0.01
          },
          {
            "cell": "Summary!H12",
            "equals": 34,
            "tolerance": 0
          },
          {
            "cell": "Headcount!D12",
            "equals": 454,
            "tolerance": 0
          },
          {
            "cell": "Checks!B17",
            "equals": 0,
            "tolerance": 0
          }
        ],
        "slideCount": 0,
        "nativeCharts": [],
        "nativeTables": [],
        "tableTotals": [],
        "fonts": {
          "allowed": []
        },
        "lint": {
          "block": [
            "error",
            "warn"
          ],
          "waive": []
        }
      }
    }
    {
      "ok": true,
      "blocking": [],
      "warnings": [],
      "checks": [
        {
          "step": 1,
          "code": "path",
          "ok": true
        },
        {
          "step": 2,
          "code": "validate",
          "ok": true
        },
        {
          "step": 3,
          "code": "requirements",
          "ok": true
        },
        {
          "step": 4,
          "code": "lint",
          "ok": true
        },
        {
          "step": 5,
          "code": "publish",
          "ok": true
        }
      ],
      "path": "./sessions/merit-cycle/outputs/2027-merit-headcount-managers.xlsx",
      "sha256": "98a1271a13cb106faf453857a0fc634ff08fb55c886d263135405e797bcf6fdf",
      "bytes": 180075,
      "receiptPath": "./sessions/merit-cycle/.artiwright/receipts/2027-merit-headcount-managers.98a1271a13cb.1794787704686.receipt.json"
    }
  34. artiwright_finalize2027-merit-executive-briefing.pptx
    {
      "session": "merit-cycle",
      "document": "deck",
      "file": "2027-merit-executive-briefing.pptx",
      "requirements": {
        "sheets": [],
        "tables": [],
        "charts": 0,
        "values": [],
        "slideCount": 5,
        "nativeCharts": [
          "sl_PC0XCX2V",
          "sl_MY8HSBWY",
          "sl_R1P5XPN2"
        ],
        "nativeTables": [
          "sl_3VYFAEC7"
        ],
        "tableTotals": [],
        "fonts": {
          "allowed": []
        },
        "lint": {
          "block": [
            "error"
          ],
          "waive": [
            "deck/cover@sl_PC0XCX2V"
          ]
        }
      }
    }
    {
      "ok": true,
      "blocking": [],
      "warnings": [
        {
          "step": 4,
          "code": "numbers/untraced",
          "message": "\"$342K\" on slide 4 is not in the session's workbooks: \"New hires add $2.88M in prorated base payroll. Hire slips save $342K, $684K or $1.03M. A 0.5-point m\". Check it against the workbook.",
          "slide": 4,
          "id": "sh_9QKB771S"
        },
        {
          "step": 4,
          "code": "numbers/untraced",
          "message": "\"$684K\" on slide 4 is not in the session's workbooks: \"New hires add $2.88M in prorated base payroll. Hire slips save $342K, $684K or $1.03M. A 0.5-point m\". Check it against the workbook.",
          "slide": 4,
          "id": "sh_9QKB771S"
        },
        {
          "step": 4,
          "code": "numbers/untraced",
          "message": "\"$254K\" on slide 4 is not in the session's workbooks: \"New hires add $2.88M in prorated base payroll. Hire slips save $342K, $684K or $1.03M. A 0.5-point m\". Check it against the workbook.",
          "slide": 4,
          "id": "sh_9QKB771S"
        },
        {
          "step": 6,
          "code": "lint/deck/cover",
          "rule": "deck/cover",
          "message": "Slide 1 opens on a chart, so the deck has no cover.",
          "slide": 1,
          "evidence": {
            "opens": "a chart",
            "slides": 5
          }
        }
      ],
      "checks": [
        {
          "step": 1,
          "code": "path",
          "ok": true
        },
        {
          "step": 2,
          "code": "size",
          "ok": true
        },
        {
          "step": 2,
          "code": "validate",
          "ok": true
        },
        {
          "step": 3,
          "code": "package",
          "ok": true
        },
        {
          "step": 4,
          "code": "slideCount",
          "ok": true
        },
        {
          "step": 4,
          "code": "nativeCharts",
          "ok": true
        },
        {
          "step": 4,
          "code": "nativeTables",
          "ok": true
        },
        {
          "step": 4,
          "code": "numbers",
          "ok": true
        },
        {
          "step": 5,
          "code": "chartData",
          "ok": true
        },
        {
          "step": 6,
          "code": "lint",
          "ok": true
        },
        {
          "step": 7,
          "code": "reimport",
          "ok": true
        },
        {
          "step": 8,
          "code": "publish",
          "ok": true
        }
      ],
      "path": "./sessions/merit-cycle/outputs/2027-merit-executive-briefing.pptx",
      "sha256": "ab6e8eea46996143a34c9343736fdb02d16fae8af58911f5f16888e100478097",
      "bytes": 48474,
      "manifestPath": "./sessions/merit-cycle/outputs/2027-meri
    …
The agent's last message

Created both files in Spruce:

  • [Manager merit and headcount workbook](sessions/merit-cycle/outputs/2027-merit-headcount-managers.xlsx) — only Proposed % is editable, validated to 0–10%. Includes equity flags, departmental payroll, hiring-delay and merit sensitivities.
  • [Five-slide executive deck](sessions/merit-cycle/outputs/2027-merit-executive-briefing.pptx) — covers spend versus pool, band position, all 34 equity-review employees, headcount and the cycle timeline.

Key results

  • Headcount reconciles exactly to 420 HRIS employees; all 14 checks pass.
  • Proposed merit is $1,632,814 against a $1,774,780 pool.
  • Finance exceeds its departmental allocation by $5,338.
  • The plan adds 34 hires, reaching 454 employees and $55.22M in 2027 base payroll.

Planning assumptions and proposed cycle dates are labeled in the files. Both contain confidential employee compensation.

Lint during the run

A title over its subtitle, numbers saved as text

Lint found two columns with no number format in the workbook, then a slide title running into its subtitle on the equity slide. Next it found $5,338 and 3.22% saved as text, a source note running over its box, and a chart series called "Pool at 3.5%" on a dollar axis. The agent fixed each, and the workbook finalized with nothing to report. The deck saved with warnings. It opens on a chart rather than a cover: the agent put the title and the spend chart together on slide 1 to fit five topics into five slides, and waived that rule. And finalize couldn't find $342K, $684K or $254K in the workbook: they are differences between Sensitivity cells, kept in the workbook only as typed text.

  1. lintworkbook2 × number/unformatted
  2. lintdeck1 × Text overflows its box1 × Text overlaps
  3. lintworkbook2 × Numbers stored as text
  4. lintdeck1 × chart/axis-unit1 × Text overflows its box1 × deck/cover
  5. lintworkbookNo findings
  6. lintdeck1 × deck/cover
  7. finalize2027-merit-headcount-managers.xlsxNo findings
  8. finalize2027-merit-executive-briefing.pptx1 × deck/cover

Finalize report

Nothing is published until these pass. Finalize checks the real file and never overwrites one.

How this example was made: the request above went to a LangGraph agent on gpt-6.1-sol, built with Artiwright's Python package, using agent-runs/framework_run.py. The files are what it finalized, opened in PowerPoint and Excel for the screenshots. Companies, people and figures are made up.