Prove the FY27 sales plan covers the number before kickoff

Reps, 1,439 accounts and a year of bookings into a capacity plan with territory quotas that add up exactly to $120M, a what-if on attainment and hires, and a deck for the CRO.

Who
A RevOps team's LangGraph agent, on OpenAI gpt-5.6-terra
Runs in
LangGraph
Hands over
.pptxCRO_FY27_Capacity_Plan.pptx.xlsxFY27_Capacity_Plan.xlsx
6 slides + 9 sheetsin 2 files, opened in Office
35 turns, 5 minone agent run in LangGraph on gpt-5.6-terra, unedited

The ask

I need the FY27 capacity plan for the CRO before kickoff. The CRM exports (reps, accounts, FY26 bookings and quotas) are here, and the assumptions are in planning_assumptions.md. Work out the quota capacity we need for $96M, what the team carries after ramp and attrition, how many reps to hire, every territory's quota and whether territories are balanced, with a what-if on attainment and hires. Quotas must add up exactly to the capacity we need. Then the CRO deck. Spruce theme.

A RevOps team's LangGraph agent, on OpenAI gpt-5.6-terra

Sales kickoff is in three weeks and the CRO has to sign off the plan before it: the quota capacity a $96M target needs, what the current team carries after ramp and attrition, how many reps to hire, every territory's quota, and whether territories are balanced.

This run is a LangGraph agent, built the way the docs show with artiwright's Python package, on OpenAI's gpt-5.6-terra. It gets the request, the paths of the four CRM exports and the planning assumptions, and nothing else. It imports the exports, builds the plan and the CRO deck, and checks both before saving.

What they handed over

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

What came out

CRO_FY27_Capacity_Plan.pptxPowerPoint · 6 slides · 42 KB
Download
FY27_Capacity_Plan.xlsxExcel · 9 sheets · 120 KB
Download

Screenshots exported by PowerPoint and Excel.

What the agent noticed

Different runs, different hiring answers

This run recommends 18 January hires; a Claude run of the same story recommended 16. Both cover $120M. They differ in how much of a year a January hire carries under the ramp, which is exactly the assumption the CRO should look at.

Build it yourself

I need the FY27 capacity plan for the CRO before kickoff. The CRM exports (reps, accounts, FY26 bookings and quotas) are here, and the assumptions are in planning_assumptions.md. Work out the quota capacity we need for $96M, what the team carries after ramp and attrition, how many reps to hire, every territory's quota and whether territories are balanced, with a what-if on attainment and hires. Quotas must add up exactly to the capacity we need. Then the CRO deck. Spruce theme.

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

Inside the workbook

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

  1. The Inputs sheet
    Inputs

    The target, planning attainment, attrition, the ramp curve and full-year quotas by segment.

  2. The Capacity Plan sheet
    Capacity Plan

    Required capacity ($96M ÷ 80% = $120M), what the current team carries after ramp and attrition, and the hires by segment.

  3. The Territories sheet
    Territories

    Each territory's quota from its share of account potential, adding up exactly to $120M, with a balance flag for territories more than 25% off their segment average.

  4. The What-If sheet
    What-If

    Coverage of the target across planning attainment and number of hires.

Show all 5 sheets
  1. The Checks sheet
    Checks

    Quotas against required capacity, and the reps and accounts against the exports.

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

The run

One real session in LangGraph (gpt-5.6-terra), 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_importreps.csverror
    {
      "session": "territory-quota-plan",
      "document": "FY27 Capacity Plan",
      "path": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/work/reps.csv",
      "content": "",
      "sheet": "Reps Raw",
      "at": "A1",
      "table": "RepsRaw",
      "dates": "mdy",
      "theme": "spruce"
    }
    Invalid document name "FY27 Capacity Plan": use letters, digits, "_", "-" or "." (max 128).
  2. artiwright_importaccounts.csverror
    {
      "session": "territory-quota-plan",
      "document": "FY27 Capacity Plan",
      "path": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/work/accounts.csv",
      "content": "",
      "sheet": "Accounts Raw",
      "at": "A1",
      "table": "AccountsRaw",
      "dates": "mdy",
      "theme": "spruce"
    }
    Invalid document name "FY27 Capacity Plan": use letters, digits, "_", "-" or "." (max 128).
  3. artiwright_importbookings_fy26.csverror
    {
      "session": "territory-quota-plan",
      "document": "FY27 Capacity Plan",
      "path": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/work/bookings_fy26.csv",
      "content": "",
      "sheet": "Bookings Raw",
      "at": "A1",
      "table": "BookingsRaw",
      "dates": "mdy",
      "theme": "spruce"
    }
    Invalid document name "FY27 Capacity Plan": use letters, digits, "_", "-" or "." (max 128).
  4. artiwright_importquotas_fy26.csverror
    {
      "session": "territory-quota-plan",
      "document": "FY27 Capacity Plan",
      "path": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/work/quotas_fy26.csv",
      "content": "",
      "sheet": "Quotas Raw",
      "at": "A1",
      "table": "QuotasRaw",
      "dates": "mdy",
      "theme": "spruce"
    }
    Invalid document name "FY27 Capacity Plan": use letters, digits, "_", "-" or "." (max 128).
  5. artiwright_importreps.csv
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "path": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/work/reps.csv",
      "content": "",
      "sheet": "Reps Raw",
      "at": "A1",
      "table": "RepsRaw",
      "dates": "mdy",
      "theme": "spruce"
    }
    {
      "ok": true,
      "value": {
        "sheet": "Reps Raw",
        "range": "A1:F86",
        "rows": 85,
        "columns": [
          "Rep ID",
          "Name",
          "Segment",
          "Region",
          "Start date",
          "Status"
        ],
        "firstRows": [
          [
            "R-1001",
            "Owen Zeller",
            "Enterprise",
            "NA East",
            45931,
            "Active"
          ],
          [
            "R-1002",
            "Emeka Abara",
            "Enterprise",
            "NA East",
            43908,
            "Active"
          ],
          [
            "R-1003",
            "Clara Thorne",
            "Enterprise",
            "NA East",
            44915,
            "Active"
          ]
        ],
        "table": "RepsRaw"
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Reps Raw"
      ],
      "version": 1,
      "lint": {
        "errors": 25,
        "warnings": 25
      },
      "next": "Use the table in formulas, e.g. =SUM(RepsRaw[column]); import the next file the same way."
    }
  6. artiwright_importaccounts.csv
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "path": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/work/accounts.csv",
      "content": "",
      "sheet": "Accounts Raw",
      "at": "A1",
      "table": "AccountsRaw",
      "dates": "mdy",
      "theme": "spruce"
    }
    {
      "ok": true,
      "value": {
        "sheet": "Accounts Raw",
        "range": "A1:H1440",
        "rows": 1439,
        "columns": [
          "Account ID",
          "Account name",
          "Region",
          "Segment",
          "Industry",
          "Employees",
          "Potential",
          "Owner rep ID"
        ],
        "firstRows": [
          [
            "A-20001",
            "Lumen Capital",
            "NA East",
            "Enterprise",
            "Retail",
            23972,
            303000,
            "R-1001"
          ],
          [
            "A-20002",
            "Redfern Freight",
            "NA East",
            "Enterprise",
            "Technology",
            53744,
            520000,
            "R-1001"
          ],
          [
            "A-20003",
            "Zephyr Systems",
            "NA East",
            "Enterprise",
            "Energy",
            14916,
            298000,
            "R-1001"
          ]
        ],
        "table": "AccountsRaw"
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Accounts Raw"
      ],
      "version": 1,
      "lint": {
        "errors": 0,
        "warnings": 27
      },
      "next": "Use the table in formulas, e.g. =SUM(AccountsRaw[column]); import the next file the same way."
    }
  7. artiwright_importbookings_fy26.csv
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "path": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/work/bookings_fy26.csv",
      "content": "",
      "sheet": "Bookings Raw",
      "at": "A1",
      "table": "BookingsRaw",
      "dates": "mdy",
      "theme": "spruce"
    }
    {
      "ok": true,
      "value": {
        "sheet": "Bookings Raw",
        "range": "A1:E635",
        "rows": 634,
        "columns": [
          "Close date",
          "Opportunity ID",
          "Rep ID",
          "Account ID",
          "Amount"
        ],
        "firstRows": [
          [
            45962,
            "OPP-40112",
            "R-1018",
            "A-20277",
            91700
          ],
          [
            45964,
            "OPP-40282",
            "R-1040",
            "A-20624",
            61000
          ],
          [
            45964,
            "OPP-40551",
            "R-1075",
            "A-21250",
            131700
          ]
        ],
        "table": "BookingsRaw"
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Accounts Raw",
        "Bookings Raw"
      ],
      "version": 2,
      "lint": {
        "errors": 25,
        "warnings": 28
      },
      "next": "Use the table in formulas, e.g. =SUM(BookingsRaw[column]); import the next file the same way."
    }
  8. artiwright_importquotas_fy26.csv
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "path": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/work/quotas_fy26.csv",
      "content": "",
      "sheet": "Quotas Raw",
      "at": "A1",
      "table": "QuotasRaw",
      "dates": "mdy",
      "theme": "spruce"
    }
    {
      "ok": true,
      "value": {
        "sheet": "Quotas Raw",
        "range": "A1:C83",
        "rows": 82,
        "columns": [
          "Rep ID",
          "FY26 quota",
          "Quota months"
        ],
        "firstRows": [
          [
            "R-1001",
            1900000,
            12
          ],
          [
            "R-1002",
            1900000,
            12
          ],
          [
            "R-1003",
            1900000,
            12
          ]
        ],
        "table": "QuotasRaw"
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Accounts Raw",
        "Quotas Raw"
      ],
      "version": 2,
      "lint": {
        "errors": 0,
        "warnings": 28
      },
      "next": "Use the table in formulas, e.g. =SUM(QuotasRaw[column]); import the next file the same way."
    }
  9. artiwright_status
    {
      "session": "territory-quota-plan"
    }
    {
      "id": "territory-quota-plan",
      "createdAt": "2026-10-12T18:30:12.785Z",
      "updatedAt": "2026-10-12T18:30:18.218Z",
      "documents": [
        {
          "name": "FY27_Capacity_Plan",
          "kind": "workbook",
          "sheets": [
            "Accounts Raw",
            "Bookings Raw"
          ],
          "version": 2,
          "canUndo": true,
          "canRedo": false,
          "outputs": [],
          "theme": {
            "name": "Spruce",
            "preset": "spruce"
          }
        }
      ]
    }
  10. artiwright_importreps.csv
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "path": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/work/reps.csv",
      "content": "",
      "sheet": "Reps Raw",
      "at": "A1",
      "table": "RepsRaw",
      "dates": "mdy",
      "theme": "spruce"
    }
    {
      "ok": true,
      "value": {
        "sheet": "Reps Raw",
        "range": "A1:F86",
        "rows": 85,
        "columns": [
          "Rep ID",
          "Name",
          "Segment",
          "Region",
          "Start date",
          "Status"
        ],
        "firstRows": [
          [
            "R-1001",
            "Owen Zeller",
            "Enterprise",
            "NA East",
            45931,
            "Active"
          ],
          [
            "R-1002",
            "Emeka Abara",
            "Enterprise",
            "NA East",
            43908,
            "Active"
          ],
          [
            "R-1003",
            "Clara Thorne",
            "Enterprise",
            "NA East",
            44915,
            "Active"
          ]
        ],
        "table": "RepsRaw"
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Accounts Raw",
        "Bookings Raw",
        "Reps Raw"
      ],
      "version": 3,
      "lint": {
        "errors": 25,
        "warnings": 28
      },
      "next": "Use the table in formulas, e.g. =SUM(RepsRaw[column]); import the next file the same way."
    }
  11. artiwright_importquotas_fy26.csv
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "path": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/work/quotas_fy26.csv",
      "content": "",
      "sheet": "Quotas Raw",
      "at": "A1",
      "table": "QuotasRaw",
      "dates": "mdy",
      "theme": "spruce"
    }
    {
      "ok": true,
      "value": {
        "sheet": "Quotas Raw",
        "range": "A1:C83",
        "rows": 82,
        "columns": [
          "Rep ID",
          "FY26 quota",
          "Quota months"
        ],
        "firstRows": [
          [
            "R-1001",
            1900000,
            12
          ],
          [
            "R-1002",
            1900000,
            12
          ],
          [
            "R-1003",
            1900000,
            12
          ]
        ],
        "table": "QuotasRaw"
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Accounts Raw",
        "Bookings Raw",
        "Reps Raw",
        "Quotas Raw"
      ],
      "version": 4,
      "lint": {
        "errors": 25,
        "warnings": 29
      },
      "next": "Use the table in formulas, e.g. =SUM(QuotasRaw[column]); import the next file the same way."
    }
  12. artiwright_runerror
    const inputs = workbook.sheets.add('Inputs');
    inputs.range('A1:B1').values=[['FY27 Capacity Plan — CRO Inputs','Value']];
    inputs.range('A2:B12').values=[
     ['FY27 new-bookings target',96000000],['Planning attainment',0.80],['Quota capacity required','=B2/B3'],['Annual rep attrition',0.10],['Enterprise full-year quota',2100000],['Mid-market full-year quota',1350000],['Commercial full-year quota',900000],['Signed rep ramp factor (Nov start)',0.7625],['FY27 hire ramp factor (Jan start)',0.6791666667],['Territory balance threshold',0.25],['FY27 start','2026-11-01']
    ];
    inputs.range('A1:B1').format({bold:true,fill:'accent1',color:'white'});
    inputs.range('A2:A12').format({fill:'slate-100',bold:true});
    inputs.range('B2:B12').format({fill:'blue-50',color:'blue-700'});
    inputs.range('B2:B2').numberFormat='currency0';inputs.range('B3:B4').numberFormat='percent0';inputs.range('B5:B7').numberFormat='currency0';inputs.range('B8:B10').numberFormat='percent1';inputs.range('B11').numberFormat='date';
    inputs.setColumnWidth('A',280).setColumnWidth('B',145); inputs.freeze(1);
    workbook.names.add('TargetBookings','Inputs!$B$2').add('PlanAttainment','Inputs!$B$3').add('RequiredQuota','Inputs!$B$4').add('Attrition','Inputs!$B$5').add('EntQuota','Inputs!$B$6').add('MMQuota','Inputs!$B$7').add('CommQuota','Inputs!$B$8').add('SignedRamp','Inputs!$B$9').add('HireRamp','Inputs!$B$10').add('BalanceThreshold','Inputs!$B$11');
    
    const cap=workbook.sheets.add('Capacity Plan');
    cap.range('A1:L1').values=[['Segment','Territory potential','% of potential','FY27 planned quota','Full-year quota / rep','Active reps','Signed reps','Capacity before FY27 hires','Quota gap','Jan hires needed','Capacity from hires','Delivered capacity']];
    cap.range('A2:A4').values=[['Enterprise'],['Mid-market'],['Commercial']];
    cap.range('B2:B4').formulas='=SUMIFS(AccountsRaw[Potential],AccountsRaw[Segment],A2)';
    cap.range('C2:C4').formulas='=B2/SUM($B$2:$B$4)';
    cap.range('D2:D4').formulas='=RequiredQuota*C2';
    cap.range('E2').formulas='=EntQuota';cap.range('E3').formulas='=MMQuota';cap.range('E4').formulas='=CommQuota';
    cap.range('F2:F4').formulas='=COUNTIFS(RepsRaw[Segment],A2,RepsRaw[Status],"Active")';
    cap.range('G2:G4').formulas='=COUNTIFS(RepsRaw[Segment],A2,RepsRaw[Status],"Signed")';
    cap.range('H2:H4').formulas='=(F2*E2*(1-Attrition))+(G2*E2*SignedRamp)';
    cap.range('I2:I4').formulas='=MAX(0,D2-H2)';
    cap.range('J2:J4').formulas='=ROUNDUP(I2/(E2*HireRamp),0)';
    cap.range('K2:K4').formulas='=J2*E2*HireRamp';
    cap.range('L2:L4').formulas='=H2+K2';
    cap.range('A5:L5').values=[['Total','','','=SUM(D2:D4)','','=SUM(F2:F4)','=SUM(G2:G4)','=SUM(H2:H4)','=SUM(I2:I4)','=SUM(J2:J4)','=SUM(K2:K4)','=SUM(L2:L4)']];
    cap.range('A1:L1').format({bold:true,fill:'accent1',color:'white',wrap:true}); cap.range('A5:L5').format({bold:true,fill:'slate-200'});cap.range('B2:B5').numberFormat='currency0';cap.range('C2:C4').numberFormat='percent1';cap.range('D2:E5').numberFormat='currency0';cap.range('H2:I5').numberFormat='currency0';cap.range('K2:L5').numberFormat='currency0';cap.range('F2:G5').numberFormat='integer';cap.range('J2:J5').numberFormat='integer';cap.setColumnWidth('A',125).setColumnWidth('B:D',130).setColumnWidth('E',120).setColumnWidth('F:G',85).setColumnWidth('H:L',135);cap.freeze(1);
    cap.tables.add('A1:L5',{name:'CapacityPlan'});
    
    const terr=workbook.sheets.add('Territories');
    terr.range('A1:S1').values=[['Rep ID','Rep','Segment','Region','Status','Accounts','Territory potential','FY26 bookings','FY26 quota','FY26 attainment','FY27 full-year quota','Ramp factor','Attrition factor','FY27 capacity carried','Allocation weight','FY27 territory quota','Segment avg potential','Potential variance','Balanced?']];
    terr.range('A2:A86').formulas='=RepsRaw[Rep ID]';terr.range('B2:B86').formulas='=RepsRaw[Name]';terr.range('C2:C86').formulas='=RepsRaw[Segment]';terr.range('D2:D86').formulas='=RepsRaw[Region]';terr.range('E2:E86').formulas='=RepsRaw[Status]';
    terr.range('F2:F86').formulas='=COUNTIFS(AccountsRaw[Owner rep ID],A2)';terr.range('G2:G86').formulas='=SUMIFS(AccountsRaw[Potential],AccountsRaw[Owner rep ID],A2)';terr.range('H2:H86').formulas='=SUMIFS(BookingsRaw[Amount],BookingsRaw[Rep ID],A2)';terr.range('I2:I86').formulas='=IFERROR(XLOOKUP(A2,QuotasRaw[Rep ID],QuotasRaw[FY26 quota]),0)';terr.range('J2:J86').formulas='=IFERROR(H2/I2,0)';
    terr.range('K2:K86').formulas='=IF(C2="Enterprise",EntQuota,IF(C2="Mid-market",MMQuota,CommQuota))';terr.range('L2:L86').formulas='=IF(E2="Signed",SignedRamp,1)';terr.range('M2:M86').formulas='=IF(E2="Active",1-Attrition,1)';terr.range('N2:N86').formulas='=K2*L2*M2';terr.range('O2:O86').formulas='=IFERROR(G2/SUMIFS($G$2:$G$86,$C$2:$C$86,C2),0)';terr.range('P2:P86').formulas='=O2*SUMIFS(\'Capacity Plan\'!$D$2:$D$4,\'Capacity Plan\'!$A$2:$A$4,C2)';terr.range('Q2:Q86').formulas='=AVERAGEIFS($G$2:$G$86,$C$2:$C$86,C2,$G$2:$G$86,">0")';terr.range('R2:R86').formulas='=IFERROR(G2/Q2-1,0)';terr.range('S2:S86').formulas='=IF(F2=0,"Unassigned",IF(ABS(R2)>BalanceThreshold,"Flag","Balanced"))';
    terr.range('A1:S1').format({bold:true,fill:'accent1',color:'white',wrap:true});terr.range('A1:S86').format({size:10});terr.range('F2:F86').numberFormat='integer';terr.range('G2:I86').numberFormat='currency0';terr.range('J2:J86').numberFormat='percent1';terr.range('K2:K86').numberFormat='currency0';terr.range('L2:M86').numberFormat='percent1';terr.range('N2:N86').numberFormat='currency0';terr.range('O2:O2').numberFormat='percent1';terr.range('P2:Q86').numberFormat='currency0';terr.range('R2:R86').numberFormat='percent1';
    terr.conditionalFormats.add('S2:S86',{type:'containsText',text:'Flag',format:{fill:'red-50',color:'red-700',bold:true}});terr.conditionalFormats.add('S2:S86',{type:'containsText',text:'Balanced',format:{fill:'green-50',color:'green-700'}});terr.conditionalFormats.add('S2:S86',{type:'containsText',text:'Unassigned',format:{fill:'amber-50',color:'amber-700'}});
    terr.tables.add('A1:S86',{name:'Territories'});terr.setColumnWidth('A',85).setColumnWidth('B',140).setColumnWidth('C:E',100).setColumnWidth('F',65).setColumnWidth('G:P',115).setColumnWidth('Q:R',110).setColumnWidth('S',85);terr.freeze(1,2);
    
    const wi=workbook.sheets.add('What-If');
    wi.range('A1:I1').values=[['FY27 bookings coverage — attainment vs. total Jan hires','','','','','','','','']];wi.merge('A1:I1');wi.range('A1').format({bold:true,fill:'accent1',color:'white',align:'center'});
    wi.range('A3:I3').values=[['Attainment \ Hires',0,5,10,15,20,25,30,35]];wi.range('A4:A8').values=[[0.70],[0.75],[0.80],[0.85],[0.90]];wi.range('B4:I8').formulas='=(\'Capacity Plan\'!$H$5+B$3*(\'Capacity Plan\'!$E$5/3)*HireRamp)*$A4/TargetBookings';
    wi.range('A10:B14').values=[['Baseline hiring view','Value'],['Jan hires required','=\'Capacity Plan\'!J5'],['Base delivered capacity','=\'Capacity Plan\'!L5'],['Capacity vs required','=B13-RequiredQuota'],['At 80% bookings','=B13*PlanAttainment']];
    wi.range('A3:I3').format({bold:true,fill:'slate-200'});wi.range('A4:A8').numberFormat='percent0';wi.range('B4:I8').numberFormat='percent0';wi.conditionalFormats.add('B4:I8',{type:'colorScale',colors:['red-100','amber-100','green-400']});wi.range('A10:B10').format({bold:true,fill:'accent1',color:'white'});wi.range('A11:A14').format({fill:'slate-100',bold:true});wi.range('B11').numberFormat='integer';wi.range('B12:B14').numberFormat='currency0';wi.setColumnWidth('A',175).setColumnWidth('B:I',85);wi.freeze(3,1);
    
    const checks=workbook.sheets.add('Checks');checks.range('A1:B1').values=[['Control','Result']];checks.range('A2:B6').values=[['Required quota','=RequiredQuota'],['Territory quotas','=SUM(Territories[FY27 territory quota])'],['Quota exactness check','=ROUND(B3-B2,2)'],['Delivered capacity less required','=\'Capacity Plan\'!L5-RequiredQuota'],['Flagged / unassigned territories','=COUNTIF(Territories[Balanced?],"Flag")+COUNTIF(Territories[Balanced?],"Unassigned")']];checks.range('A1:B1').format({bold:true,fill:'accent1',color:'white'});checks.range('A2:A6').format({fill:'slate-100',bold:true});checks.range('B2:B5').numberFormat='currency0';checks.range('B6').numberFormat='integer';checks.setColumnWidth('A',245).setColumnWidth('B',145);checks.conditionalFormats.add('B4',{type:'cellIs',operator:'equal',formula:0,format:{fill:'green-50',color:'green-700',bold:true}});checks.freeze(1);
    return {capacity:cap.range('A1:L5'),checks:checks.range('A1:B6'),whatIf:wi.range('A3:I8')};
    {
      "ok": false,
      "error": {
        "name": "OptionsError",
        "message": "conditionalFormats.add:\n  - unknown option \"formula\"\n  - operator: \"equal\" is not one of >, >=, <, <=, =, !=, between, notBetween\n  - value: expected number or string or date, got nothing"
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Accounts Raw",
        "Bookings Raw",
        "Reps Raw",
        "Quotas Raw"
      ],
      "version": 4,
      "lint": {
        "errors": 0,
        "warnings": 0
      }
    }
  13. artiwright_run
    const inputs = workbook.sheets.add('Inputs');
    inputs.range('A1:B1').values=[['FY27 Capacity Plan — CRO Inputs','Value']];
    inputs.range('A2:B12').values=[['FY27 new-bookings target',96000000],['Planning attainment',0.80],['Quota capacity required','=B2/B3'],['Annual rep attrition',0.10],['Enterprise full-year quota',2100000],['Mid-market full-year quota',1350000],['Commercial full-year quota',900000],['Signed rep ramp factor (Nov start)',0.7625],['FY27 hire ramp factor (Jan start)',0.6791666667],['Territory balance threshold',0.25],['FY27 start','2026-11-01']];
    inputs.range('A1:B1').format({bold:true,fill:'accent1',color:'white'});inputs.range('A2:A12').format({fill:'slate-100',bold:true});inputs.range('B2:B12').format({fill:'blue-50',color:'blue-700'});inputs.range('B2').numberFormat='currency0';inputs.range('B3:B4').numberFormat='percent0';inputs.range('B5:B7').numberFormat='currency0';inputs.range('B8:B10').numberFormat='percent1';inputs.range('B11').numberFormat='date';inputs.setColumnWidth('A',280).setColumnWidth('B',145);inputs.freeze(1);
    workbook.names.add('TargetBookings','Inputs!$B$2').add('PlanAttainment','Inputs!$B$3').add('RequiredQuota','Inputs!$B$4').add('Attrition','Inputs!$B$5').add('EntQuota','Inputs!$B$6').add('MMQuota','Inputs!$B$7').add('CommQuota','Inputs!$B$8').add('SignedRamp','Inputs!$B$9').add('HireRamp','Inputs!$B$10').add('BalanceThreshold','Inputs!$B$11');
    const cap=workbook.sheets.add('Capacity Plan');cap.range('A1:L1').values=[['Segment','Territory potential','% of potential','FY27 planned quota','Full-year quota / rep','Active reps','Signed reps','Capacity before FY27 hires','Quota gap','Jan hires needed','Capacity from hires','Delivered capacity']];cap.range('A2:A4').values=[['Enterprise'],['Mid-market'],['Commercial']];cap.range('B2:B4').formulas='=SUMIFS(AccountsRaw[Potential],AccountsRaw[Segment],A2)';cap.range('C2:C4').formulas='=B2/SUM($B$2:$B$4)';cap.range('D2:D4').formulas='=RequiredQuota*C2';cap.range('E2').formulas='=EntQuota';cap.range('E3').formulas='=MMQuota';cap.range('E4').formulas='=CommQuota';cap.range('F2:F4').formulas='=COUNTIFS(RepsRaw[Segment],A2,RepsRaw[Status],"Active")';cap.range('G2:G4').formulas='=COUNTIFS(RepsRaw[Segment],A2,RepsRaw[Status],"Signed")';cap.range('H2:H4').formulas='=(F2*E2*(1-Attrition))+(G2*E2*SignedRamp)';cap.range('I2:I4').formulas='=MAX(0,D2-H2)';cap.range('J2:J4').formulas='=ROUNDUP(I2/(E2*HireRamp),0)';cap.range('K2:K4').formulas='=J2*E2*HireRamp';cap.range('L2:L4').formulas='=H2+K2';cap.range('A5:L5').values=[['Total','','','=SUM(D2:D4)','','=SUM(F2:F4)','=SUM(G2:G4)','=SUM(H2:H4)','=SUM(I2:I4)','=SUM(J2:J4)','=SUM(K2:K4)','=SUM(L2:L4)']];cap.range('A1:L1').format({bold:true,fill:'accent1',color:'white',wrap:true});cap.range('A5:L5').format({bold:true,fill:'slate-200'});cap.range('B2:B5').numberFormat='currency0';cap.range('C2:C4').numberFormat='percent1';cap.range('D2:E5').numberFormat='currency0';cap.range('H2:I5').numberFormat='currency0';cap.range('K2:L5').numberFormat='currency0';cap.range('F2:G5').numberFormat='integer';cap.range('J2:J5').numberFormat='integer';cap.setColumnWidth('A',125).setColumnWidth('B:D',130).setColumnWidth('E',120).setColumnWidth('F:G',85).setColumnWidth('H:L',135);cap.freeze(1);cap.tables.add('A1:L5',{name:'CapacityPlan'});
    const terr=workbook.sheets.add('Territories');terr.range('A1:S1').values=[['Rep ID','Rep','Segment','Region','Status','Accounts','Territory potential','FY26 bookings','FY26 quota','FY26 attainment','FY27 full-year quota','Ramp factor','Attrition factor','FY27 capacity carried','Allocation weight','FY27 territory quota','Segment avg potential','Potential variance','Balanced?']];terr.range('A2:A86').formulas='=INDEX(RepsRaw[Rep ID],ROW()-1)';terr.range('B2:B86').formulas='=INDEX(RepsRaw[Name],ROW()-1)';terr.range('C2:C86').formulas='=INDEX(RepsRaw[Segment],ROW()-1)';terr.range('D2:D86').formulas='=INDEX(RepsRaw[Region],ROW()-1)';terr.range('E2:E86').formulas='=INDEX(RepsRaw[Status],ROW()-1)';terr.range('F2:F86').formulas='=COUNTIFS(AccountsRaw[Owner rep ID],A2)';terr.range('G2:G86').formulas='=SUMIFS(AccountsRaw[Potential],AccountsRaw[Owner rep ID],A2)';terr.range('H2:H86').formulas='=SUMIFS(BookingsRaw[Amount],BookingsRaw[Rep ID],A2)';terr.range('I2:I86').formulas='=IFERROR(XLOOKUP(A2,QuotasRaw[Rep ID],QuotasRaw[FY26 quota]),0)';terr.range('J2:J86').formulas='=IFERROR(H2/I2,0)';terr.range('K2:K86').formulas='=IF(C2="Enterprise",EntQuota,IF(C2="Mid-market",MMQuota,CommQuota))';terr.range('L2:L86').formulas='=IF(E2="Signed",SignedRamp,1)';terr.range('M2:M86').formulas='=IF(E2="Active",1-Attrition,1)';terr.range('N2:N86').formulas='=K2*L2*M2';terr.range('O2:O86').formulas='=IFERROR(G2/SUMIFS($G$2:$G$86,$C$2:$C$86,C2),0)';terr.range('P2:P86').formulas='=O2*SUMIFS(\'Capacity Plan\'!$D$2:$D$4,\'Capacity Plan\'!$A$2:$A$4,C2)';terr.range('Q2:Q86').formulas='=AVERAGEIFS($G$2:$G$86,$C$2:$C$86,C2,$G$2:$G$86,">0")';terr.range('R2:R86').formulas='=IFERROR(G2/Q2-1,0)';terr.range('S2:S86').formulas='=IF(F2=0,"Unassigned",IF(ABS(R2)>BalanceThreshold,"Flag","Balanced"))';terr.range('A1:S1').format({bold:true,fill:'accent1',color:'white',wrap:true});terr.range('A1:S86').format({size:10});terr.range('F2:F86').numberFormat='integer';terr.range('G2:I86').numberFormat='currency0';terr.range('J2:J86').numberFormat='percent1';terr.range('K2:K86').numberFormat='currency0';terr.range('L2:M86').numberFormat='percent1';terr.range('N2:N86').numberFormat='currency0';terr.range('O2:O86').numberFormat='percent1';terr.range('P2:Q86').numberFormat='currency0';terr.range('R2:R86').numberFormat='percent1';terr.conditionalFormats.add('S2:S86',{type:'containsText',text:'Flag',format:{fill:'red-50',color:'red-700',bold:true}});terr.conditionalFormats.add('S2:S86',{type:'containsText',text:'Balanced',format:{fill:'green-50',color:'green-700'}});terr.conditionalFormats.add('S2:S86',{type:'containsText',text:'Unassigned',format:{fill:'amber-50',color:'amber-700'}});terr.tables.add('A1:S86',{name:'Territories'});terr.setColumnWidth('A',85).setColumnWidth('B',140).setColumnWidth('C:E',100).setColumnWidth('F',65).setColumnWidth('G:P',115).setColumnWidth('Q:R',110).setColumnWidth('S',85);terr.freeze(1,2);
    const wi=workbook.sheets.add('What-If');wi.range('A1:I1').values=[['FY27 bookings coverage — attainment vs. total Jan hires','','','','','','','','']];wi.merge('A1:I1');wi.range('A1').format({bold:true,fill:'accent1',color:'white',align:'center'});wi.range('A3:I3').values=[['Attainment \\ Hires',0,5,10,15,20,25,30,35]];wi.range('A4:A8').values=[[0.70],[0.75],[0.80],[0.85],[0.90]];wi.range('B4:I8').formulas='=(\'Capacity Plan\'!$H$5+B$3*(\'Capacity Plan\'!$E$5/3)*HireRamp)*$A4/TargetBookings';wi.range('A10:B14').values=[['Baseline hiring view','Value'],['Jan hires required','=\'Capacity Plan\'!J5'],['Base delivered capacity','=\'Capacity Plan\'!L5'],['Capacity vs required','=B13-RequiredQuota'],['At 80% bookings','=B13*PlanAttainment']];wi.range('A3:I3').format({bold:true,fill:'slate-200'});wi.range('A4:A8').numberFormat='percent0';wi.range('B4:I8').numberFormat='percent0';wi.conditionalFormats.add('B4:I8',{type:'colorScale',colors:['red-100','amber-100','green-400']});wi.range('A10:B10').format({bold:true,fill:'accent1',color:'white'});wi.range('A11:A14').format({fill:'slate-100',bold:true});wi.range('B11').numberFormat='integer';wi.range('B12:B14').numberFormat='currency0';wi.setColumnWidth('A',175).setColumnWidth('B:I',85);wi.freeze(3,1);
    const checks=workbook.sheets.add('Checks');checks.range('A1:B1').values=[['Control','Result']];checks.range('A2:B6').values=[['Required quota','=RequiredQuota'],['Territory quotas','=SUM(Territories[FY27 territory quota])'],['Quota exactness check','=ROUND(B3-B2,2)'],['Delivered capacity less required','=\'Capacity Plan\'!L5-RequiredQuota'],['Flagged / unassigned territories','=COUNTIF(Territories[Balanced?],"Flag")+COUNTIF(Territories[Balanced?],"Unassigned")']];checks.range('A1:B1').format({bold:true,fill:'accent1',color:'white'});checks.range('A2:A6').format({fill:'slate-100',bold:true});checks.range('B2:B5').numberFormat='currency0';checks.range('B6').numberFormat='integer';checks.setColumnWidth('A',245).setColumnWidth('B',145);checks.conditionalFormats.add('B4',{type:'cellIs',operator:'=',value:0,format:{fill:'green-50',color:'green-700',bold:true}});checks.freeze(1);return {capacity:cap.range('A1:L5'),checks:checks.range('A1:B6'),whatIf:wi.range('A3:I8')};
    {
      "ok": true,
      "value": {
        "capacity": {
          "range": "'Capacity Plan'!A1:L5",
          "values": [
            [
              "Segment",
              "Territory potential",
              "% of potential",
              "FY27 planned quota",
              "Full-year quota / rep",
              "Active reps",
              "Signed reps",
              "Capacity before FY27 hires",
              "Quota gap",
              "Jan hires needed",
              "Capacity from hires",
              "Delivered capacity"
            ],
            [
              "Enterprise",
              90796000,
              0.38783146528157464,
              46539775.83378895,
              2100000,
              20,
              0,
              37800000,
              8739775.833788954,
              7,
              9983750.00049,
              47783750.00049
            ],
            [
              "Mid-market",
              86383000,
              0.36898151312192456,
              44277781.574630946,
              1350000,
              32,
              0,
              38880000,
              5397781.574630946,
              6,
              5501250.000270001,
              44381250.00027
            ],
            [
              "Commercial",
              56933000,
              0.24318702159650082,
              29182442.5915801,
              900000,
              30,
              0,
              24300000,
              4882442.5915801,
              8,
              4890000.00024,
              29190000.000239998
            ],
            [
              "Total",
              null,
              null,
              120000000,
              null,
              82,
              0,
              100980000,
              19020000,
              21,
              20375000.001000002,
              121355000.001
            ]
          ]
        },
        "checks": {
          "range": "Checks!A1:B6",
          "values": [
            [
              "Control",
              "Result"
            ],
            [
              "Required quota",
              120000000
            ],
            [
              "Territory quotas",
              119999999.99999997
            ],
            [
              "Quota exactness check",
              0
            ],
            [
              "Delivered capacity less required",
              1355000.001000002
            ],
            [
              "Flagged / unassigned territories",
              18
            ]
          ]
        },
        "whatIf": {
          "range": "'What-If'!A3:I8",
          "values": [
            [
              "Attainment \\ Hires",
              0,
              5,
              10,
              15,
              20,
              25,
              30,
              35
            ],
            [
              0.7,
              0.73631
    …
  14. artiwright_inspect
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "kind": "table,formula",
      "slide": "",
      "search": "",
      "target": "",
      "maxChars": 12000,
      "sheet": "Reps Raw",
      "range": "A1:F86"
    }
    {"kind":"table","sheet":"Reps Raw","name":"RepsRaw","range":"A1:F86","columns":["Rep ID","Name","Segment","Region","Start date","Status"],"totals":false}
  15. artiwright_inspecterror
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "kind": "cell",
      "slide": "",
      "search": "",
      "target": "",
      "maxChars": 12000,
      "sheet": "Reps Raw",
      "range": "A1:F86"
    }
    {
      "ok": false,
      "error": {
        "name": "TokenError",
        "message": "inspect: no kind \"cell\". Kinds: workbook, sheet, cells, formula, table, chart, name."
      }
    }
  16. artiwright_inspect
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "kind": "cells",
      "slide": "",
      "search": "",
      "target": "",
      "maxChars": 12000,
      "sheet": "Reps Raw",
      "range": "A1:F86"
    }
    {"kind":"cells","sheet":"Reps Raw","range":"A1:F1","values":["Rep ID","Name","Segment","Region","Start date","Status"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A2:F2","values":["R-1001","Owen Zeller","Enterprise","NA East",45931,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A3:F3","values":["R-1002","Emeka Abara","Enterprise","NA East",43908,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A4:F4","values":["R-1003","Clara Thorne","Enterprise","NA East",44915,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A5:F5","values":["R-1004","Ravi Brandt","Enterprise","NA East",45487,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A6:F6","values":["R-1005","Sofia Varga","Enterprise","NA East",43793,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A7:F7","values":["R-1006","Ben Brandt","Enterprise","NA East",46077,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A8:F8","values":["R-1007","Emeka Nakamura","Mid-market","NA East",45911,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A9:F9","values":["R-1008","Mateo Duarte","Mid-market","NA East",44067,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A10:F10","values":["R-1009","Farah Galloway","Mid-market","NA East",44766,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A11:F11","values":["R-1010","Jonas Pereira","Mid-market","NA East",46144,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A12:F12","values":["R-1011","Nadia Kovac","Mid-market","NA East",46258,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A13:F13","values":["R-1012","Lena Pereira","Mid-market","NA East",46171,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A14:F14","values":["R-1013","Ivan Whitlock","Mid-market","NA East",45410,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A15:F15","values":["R-1014","Viktor Moreau","Mid-market","NA East",45590,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A16:F16","values":["R-1015","Lucia Lindqvist","Mid-market","NA East",44092,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A17:F17","values":["R-1016","Farah Dunmore","Commercial","NA East",45701,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A18:F18","values":["R-1017","Emeka Yilmaz","Commercial","NA East",45519,"Active"]}
    {"kind":"cells","sheet":"Reps Raw","range":"A19:F19","values":["R-1018","Viktor Eriksen","Commercial","NA East",44545,"Active"]}
    {"ki
    …
  17. artiwright_run
    const inputs=workbook.sheets.get('Inputs');inputs.range('A9').values=[['Pre-start (signed) ramp factor (Nov start)']];
    const cap=workbook.sheets.get('Capacity Plan');cap.range('G2:G4').formulas='=COUNTIFS(RepsRaw[Segment],A2,RepsRaw[Status],"Pre-start")';cap.range('H2:H4').formulas='=(F2*E2*(1-Attrition))+(G2*E2*SignedRamp)';
    const terr=workbook.sheets.get('Territories');terr.range('L2:L86').formulas='=IF(E2="Pre-start",SignedRamp,1)';terr.range('M2:M86').formulas='=IF(E2="Active",1-Attrition,1)';
    const wi=workbook.sheets.get('What-If');wi.range('B4:I8').formulas='=(\'Capacity Plan\'!$H$5+B$3*AVERAGE(\'Capacity Plan\'!$E$2:$E$4)*HireRamp)*$A4/TargetBookings';
    return {capacity:cap.range('A1:L5'),checks:workbook.sheets.get('Checks').range('A1:B6'),whatIf:wi.range('A3:I8')};
    {
      "ok": true,
      "value": {
        "capacity": {
          "range": "'Capacity Plan'!A1:L5",
          "values": [
            [
              "Segment",
              "Territory potential",
              "% of potential",
              "FY27 planned quota",
              "Full-year quota / rep",
              "Active reps",
              "Signed reps",
              "Capacity before FY27 hires",
              "Quota gap",
              "Jan hires needed",
              "Capacity from hires",
              "Delivered capacity"
            ],
            [
              "Enterprise",
              90796000,
              0.38783146528157464,
              46539775.83378895,
              2100000,
              20,
              1,
              39401250,
              7138525.833788954,
              6,
              8557500.00042,
              47958750.000420004
            ],
            [
              "Mid-market",
              86383000,
              0.36898151312192456,
              44277781.574630946,
              1350000,
              32,
              0,
              38880000,
              5397781.574630946,
              6,
              5501250.000270001,
              44381250.00027
            ],
            [
              "Commercial",
              56933000,
              0.24318702159650082,
              29182442.5915801,
              900000,
              30,
              2,
              25672500,
              3509942.5915801004,
              6,
              3667500.00018,
              29340000.00018
            ],
            [
              "Total",
              null,
              null,
              120000000,
              null,
              82,
              3,
              103953750,
              16046250,
              18,
              17726250.00087,
              121680000.00087002
            ]
          ]
        },
        "checks": {
          "range": "Checks!A1:B6",
          "values": [
            [
              "Control",
              "Result"
            ],
            [
              "Required quota",
              120000000
            ],
            [
              "Territory quotas",
              119999999.99999997
            ],
            [
              "Quota exactness check",
              0
            ],
            [
              "Delivered capacity less required",
              1680000.0008700192
            ],
            [
              "Flagged / unassigned territories",
              18
            ]
          ]
        },
        "whatIf": {
          "range": "'What-If'!A3:I8",
          "values": [
            [
              "Attainment \\ Hires",
              0,
              5,
              10,
              15,
              20,
              25,
              30,
              35
            ],
            [
              0.7,
              0.
    …
  18. artiwright_lint
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "rules": "",
      "severity": "warn",
      "slide": ""
    }
    {
      "ok": true,
      "errors": 0,
      "warnings": 0,
      "findings": []
    }
  19. artiwright_render
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "slides": [],
      "sheets": [
        "Inputs",
        "Capacity Plan",
        "What-If",
        "Checks"
      ],
      "range": ""
    }
    Sheet InputsSheet Capacity PlanSheet What-IfSheet Checks
    A render the agent looked atA render the agent looked atA render the agent looked atA render the agent looked at
  20. artiwright_run
    const inputs=workbook.sheets.get('Inputs');inputs.range('B2').format({numberFormat:'$#,##0'});inputs.range('B3').format({numberFormat:'0%'});inputs.range('B4').format({numberFormat:'$#,##0'});inputs.range('B5').format({numberFormat:'0%'});inputs.range('B6:B8').format({numberFormat:'$#,##0'});inputs.range('B9:B11').format({numberFormat:'0.0%'});inputs.range('B12').format({numberFormat:'m/d/yyyy'});
    const cap=workbook.sheets.get('Capacity Plan');cap.range('B2:B5').format({numberFormat:'$#,##0'});cap.range('C2:C4').format({numberFormat:'0.0%'});cap.range('D2:E5').format({numberFormat:'$#,##0'});cap.range('H2:I5').format({numberFormat:'$#,##0'});cap.range('K2:L5').format({numberFormat:'$#,##0'});cap.setColumnWidth('A',130).setColumnWidth('B',140).setColumnWidth('C',105).setColumnWidth('D',145).setColumnWidth('E',125).setColumnWidth('F:G',90).setColumnWidth('H:L',145);
    const terr=workbook.sheets.get('Territories');terr.range('G2:I86').format({numberFormat:'$#,##0'});terr.range('J2:J86').format({numberFormat:'0.0%'});terr.range('K2:K86').format({numberFormat:'$#,##0'});terr.range('L2:M86').format({numberFormat:'0.0%'});terr.range('N2:N86').format({numberFormat:'$#,##0'});terr.range('O2:O86').format({numberFormat:'0.0%'});terr.range('P2:Q86').format({numberFormat:'$#,##0'});terr.range('R2:R86').format({numberFormat:'0.0%'});
    const wi=workbook.sheets.get('What-If');wi.range('A4:A8').format({numberFormat:'0%'});wi.range('B4:I8').format({numberFormat:'0%'});wi.range('B12:B14').formulas=['=\'Capacity Plan\'!L5','=B12-RequiredQuota','=B12*PlanAttainment'];wi.range('B12:B14').format({numberFormat:'$#,##0'});wi.setColumnWidth('A',185).setColumnWidth('B:I',92);
    const checks=workbook.sheets.get('Checks');checks.range('B2:B5').format({numberFormat:'$#,##0'});return {inputs:inputs.range('A1:B12'),whatif:wi.range('A3:I14'),checks:checks.range('A1:B6')};
    {
      "ok": true,
      "value": {
        "inputs": {
          "range": "Inputs!A1:B12",
          "values": [
            [
              "FY27 Capacity Plan — CRO Inputs",
              "Value"
            ],
            [
              "FY27 new-bookings target",
              96000000
            ],
            [
              "Planning attainment",
              0.8
            ],
            [
              "Quota capacity required",
              120000000
            ],
            [
              "Annual rep attrition",
              0.1
            ],
            [
              "Enterprise full-year quota",
              2100000
            ],
            [
              "Mid-market full-year quota",
              1350000
            ],
            [
              "Commercial full-year quota",
              900000
            ],
            [
              "Pre-start (signed) ramp factor (Nov start)",
              0.7625
            ],
            [
              "FY27 hire ramp factor (Jan start)",
              0.6791666667
            ],
            [
              "Territory balance threshold",
              0.25
            ],
            [
              "FY27 start",
              "2026-11-01"
            ]
          ]
        },
        "whatif": {
          "range": "'What-If'!A3:I14",
          "values": [
            [
              "Attainment \\ Hires",
              0,
              5,
              10,
              15,
              20,
              25,
              30,
              35
            ],
            [
              0.7,
              0.75799609375,
              0.7938999565989843,
              0.8298038194479688,
              0.865707682296953,
              0.9016115451459374,
              0.9375154079949218,
              0.9734192708439062,
              1.0093231336928907
            ],
            [
              0.75,
              0.812138671875,
              0.8506070963560546,
              0.8890755208371094,
              0.927543945318164,
              0.9660123697992188,
              1.0044807942802734,
              1.042949218761328,
              1.081417643242383
            ],
            [
              0.8,
              0.86628125,
              0.907314236113125,
              0.9483472222262501,
              0.9893802083393751,
              1.0304131944525,
              1.071446180565625,
              1.1124791666787501,
              1.153512152791875
            ],
            [
              0.85,
              0.920423828125,
              0.9640213758701952,
              1.0076189236153905,
              1.051216471360586,
              1.0948140191057811,
              1.1384115668509764,
              1.182009114596172,
              1.2256066623413673
            ],
            [
              0.9,
              0.9745664062
    …
  21. artiwright_lint
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "rules": "",
      "severity": "error",
      "slide": ""
    }
    {
      "ok": true,
      "errors": 0,
      "warnings": 0,
      "findings": []
    }
  22. artiwright_render
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "slides": [],
      "sheets": [
        "Inputs",
        "Capacity Plan",
        "What-If",
        "Checks"
      ],
      "range": ""
    }
    Sheet InputsSheet Capacity PlanSheet What-IfSheet Checks
    A render the agent looked atA render the agent looked atA render the agent looked atA render the agent looked at
  23. artiwright_run
    const cap=workbook.sheets.get('Capacity Plan');cap.range('E1:L1').values=[['FY27 quota / rep','Active','Pre-start','Pre-hire capacity','Quota gap','Jan hires needed','Capacity from hires','Delivered capacity']];
    const wi=workbook.sheets.get('What-If');wi.setColumnWidth('B',165);
    const checks=workbook.sheets.get('Checks');checks.range('A7:B10').values=[['FY26 bookings','=SUM(BookingsRaw[Amount])'],['FY26 quota','=SUM(QuotasRaw[FY26 quota])'],['FY26 attainment','=B7/B8'],['Flagged territories','=COUNTIF(Territories[Balanced?],"Flag")']];checks.range('A7:A10').format({fill:'slate-100',bold:true});checks.range('B7:B8').format({numberFormat:'$#,##0'});checks.range('B9').format({numberFormat:'0.0%'});checks.range('B10').format({numberFormat:'0'});return {capacity:cap.range('A1:L5'),checks:checks.range('A1:B10')};
    {
      "ok": true,
      "value": {
        "capacity": {
          "range": "'Capacity Plan'!A1:L5",
          "values": [
            [
              "Segment",
              "Territory potential",
              "% of potential",
              "FY27 planned quota",
              "FY27 quota / rep",
              "Active",
              "Pre-start",
              "Pre-hire capacity",
              "Quota gap",
              "Jan hires needed",
              "Capacity from hires",
              "Delivered capacity"
            ],
            [
              "Enterprise",
              90796000,
              0.38783146528157464,
              46539775.83378895,
              2100000,
              20,
              1,
              39401250,
              7138525.833788954,
              6,
              8557500.00042,
              47958750.000420004
            ],
            [
              "Mid-market",
              86383000,
              0.36898151312192456,
              44277781.574630946,
              1350000,
              32,
              0,
              38880000,
              5397781.574630946,
              6,
              5501250.000270001,
              44381250.00027
            ],
            [
              "Commercial",
              56933000,
              0.24318702159650082,
              29182442.5915801,
              900000,
              30,
              2,
              25672500,
              3509942.5915801004,
              6,
              3667500.00018,
              29340000.00018
            ],
            [
              "Total",
              null,
              null,
              120000000,
              null,
              82,
              3,
              103953750,
              16046250,
              18,
              17726250.00087,
              121680000.00087002
            ]
          ]
        },
        "checks": {
          "range": "Checks!A1:B10",
          "values": [
            [
              "Control",
              "Result"
            ],
            [
              "Required quota",
              120000000
            ],
            [
              "Territory quotas",
              119999999.99999997
            ],
            [
              "Quota exactness check",
              0
            ],
            [
              "Delivered capacity less required",
              1680000.0008700192
            ],
            [
              "Flagged / unassigned territories",
              18
            ],
            [
              "FY26 bookings",
              80992100
            ],
            [
              "FY26 quota",
              95166000
            ],
            [
              "FY26 attainment",
              0.8510613034066788
            ],
            [
              "Flagged territories",
              18
            ]
          ]
        }
      },
      "logs
    …
  24. artiwright_render
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "slides": [],
      "sheets": [
        "Capacity Plan",
        "What-If",
        "Checks"
      ],
      "range": ""
    }
    Sheet Capacity PlanSheet What-IfSheet Checks
    A render the agent looked atA render the agent looked atA render the agent looked at
  25. artiwright_run
    deck.theme.use('spruce');
    const s1=deck.slides.add();compose(s1,h(TitleSlide,{title:'FY27 capacity plan',subtitle:'A $96M new-bookings plan with $120M of quota capacity',meta:'Prepared for CRO kickoff • FY27 begins 1 Nov 2026'}));
    const s2=deck.slides.add();compose(s2,h(KpiCards,{title:'Planning at 80% attainment requires exactly $120M of quota',kpis:[{label:'FY27 bookings target',value:'$96.0M'},{label:'Planning attainment',value:'80%'},{label:'Quota capacity required',value:'$120.0M'},{label:'FY26 actual attainment',value:'85.1%',delta:'$81.0M booked on $95.2M quota',trend:'up'}],note:'Source: FY26 CRM bookings and quota exports; FY27 planning assumptions from RevOps.'}));
    const s3=deck.slides.add();compose(s3,h(ChartTakeaway,{title:'Current team is $16.0M short of the planned quota before FY27 hiring',chart:{type:'column',categories:['Enterprise','Mid-market','Commercial'],series:[{name:'Planned FY27 quota ($M)',values:[46.5397758,44.2777816,29.1824426]},{name:'Pre-hire capacity ($M)',values:[39.40125,38.88,25.6725]},{name:'Delivered capacity w/ plan ($M)',values:[47.95875,44.38125,29.34]}],format:'$0.0M'},takeaways:['Base team: 82 active reps plus 3 pre-start reps carries $104.0M after attrition and ramp.','The gap is $7.1M Enterprise, $5.4M Mid-market, and $3.5M Commercial.','Allocation follows territory potential: 38.8% Enterprise, 36.9% Mid-market, 24.3% Commercial.']}));
    const s4=deck.slides.add();compose(s4,h(KpiCards,{title:'Hire 18 January starts — six in each segment',kpis:[{label:'Enterprise',value:'6 hires',delta:'$8.6M ramped capacity',trend:'up'},{label:'Mid-market',value:'6 hires',delta:'$5.5M ramped capacity',trend:'up'},{label:'Commercial',value:'6 hires',delta:'$3.7M ramped capacity',trend:'up'},{label:'Delivered capacity',value:'$121.7M',delta:'$1.7M above required quota',trend:'up'}],note:'January hires carry 67.9% of full-year quota under the month 0–5 ramp curve. Pre-start reps (Nov start) carry 76.3%.'}));
    const s5=deck.slides.add();compose(s5,h(ComparisonTable,{title:'Coverage crosses the $96M target near 18 hires at the 80% planning rate',columns:['Planning attainment','0 hires','10 hires','15 hires','20 hires'],rows:[['70%','76%','83%','87%','90%'],['75%','81%','89%','93%','97%'],['80%','87%','95%','99%','103%'],['85%','92%','101%','105%','109%'],['90%','97%','107%','111%','116%']],note:'Cells show expected bookings as a % of the $96M target. At the recommended 18 hires and 80% attainment, the plan produces c.101% coverage.'}));
    const s6=deck.slides.add();compose(s6,h(ProcessSteps,{title:'Decisions needed before kickoff',steps:[{title:'Approve capacity',body:'Authorize 18 January hires: 6 Enterprise, 6 Mid-market, 6 Commercial.'},{title:'Lock quota',body:'Adopt the $120.0M territory-quota plan; territory quotas reconcile exactly to required capacity.'},{title:'Rebalance territories',body:'Resolve 18 territories more than ±25% from their segment’s average potential before sales kickoff.'}],note:'Plan sensitivity: fewer than 15 hires leaves coverage below target at 80% attainment; 20 hires creates 103% coverage.'}));
    return deck.slides.map(s=>s.id);
    {
      "ok": true,
      "value": [
        "sl_RF94B5AG",
        "sl_QDYV70MB",
        "sl_5RA8DXTK",
        "sl_J42KZQEE",
        "sl_D1Q3MWVA",
        "sl_1XVZ65NZ"
      ],
      "logs": [],
      "created": [
        "sl_RF94B5AG",
        "sh_16RE28CW",
        "sh_EP8JTVSR",
        "sh_HSJ4YEQV",
        "sl_QDYV70MB",
        "sh_3X30NHV1",
        "sh_H6CTYM1K",
        "sh_QBQBWYCZ",
        "sh_8DEV9TSY",
        "sh_6CT7R6E2",
        "sh_EF6S2P8J",
        "sh_5VFQF7QJ",
        "sh_3XVFGAXT",
        "sh_Z57E10T2",
        "sh_Z3EPPK70",
        "sh_7XCKKQYC",
        "sh_Z0K7MPGN",
        "sh_FHARYRG4",
        "sh_VQH11W60",
        "sh_8RWHVRRX",
        "sl_5RA8DXTK",
        "sh_J2M2K297",
        "sh_MJ053ETR",
        "ch_E7DQDY2E",
        "sh_7KG7VBWC",
        "sh_61XQ2M06",
        "sl_J42KZQEE",
        "sh_JSD89S1H",
        "sh_S73T46D6",
        "sh_5B5Y3889",
        "sh_CXQ34NKE",
        "sh_AKCDQT0F",
        "sh_64YKANKA",
        "sh_QX0A17BD",
        "sh_NWF1JC6R",
        "sh_WXTSZDA3",
        "sh_C37ND55Z",
        "sh_19SSDG1Y",
        "sh_C467XB4V",
        "sh_FA9KE819",
        "sh_9V7S6WTX",
        "sh_VXXH5TKY",
        "sh_7CFB7MBB",
        "sh_496YKG6P",
        "sh_A84V3C0Z",
        "sl_D1Q3MWVA",
        "sh_0FH16TZR",
        "tb_GMN5Z56K",
        "sh_W2271XBV",
        "sl_1XVZ65NZ",
        "sh_4Y1NXHAW",
        "sh_X576GKB9",
        "sh_4254Z5DZ",
        "sh_289FT0DZ",
        "sh_KFGGBA7V",
        "sh_0BFEG5QD",
        "sh_WGYJ5RJ2",
        "sh_S985YQBX",
        "sh_39BVMNP2",
        "sh_2AV5Y59P",
        "sh_PZNYH03X",
        "sh_1KXJ9WN7",
        "sh_D4PJ72EA"
      ],
      "removed": [],
      "slides": 6,
      "version": 1,
      "lint": {
        "errors": 0,
        "warnings": 0
      },
      "theme": {
        "theme": "Spruce",
        "source": "requested"
      }
    }
  26. artiwright_render
    {
      "session": "territory-quota-plan",
      "document": "CRO_FY27_Capacity_Plan",
      "slides": [],
      "sheets": [],
      "range": ""
    }
    Contact sheet of 6 slides.
    A render the agent looked at
  27. artiwright_linterror
    {
      "session": "territory-quota-plan",
      "document": "CRO_FY27_Capacity_Plan",
      "rules": "",
      "severity": "warn",
      "slide": ""
    }
    {
      "ok": false,
      "error": {
        "name": "TokenError",
        "message": "lint: no slide \"\"."
      }
    }
  28. artiwright_inspecterror
    {
      "session": "territory-quota-plan",
      "document": "CRO_FY27_Capacity_Plan",
      "kind": "text",
      "slide": 4,
      "search": "",
      "target": "",
      "maxChars": 12000,
      "sheet": "",
      "range": ""
    }
    {
      "ok": false,
      "error": {
        "name": "TokenError",
        "message": "inspect: no object \"\" in this deck."
      }
    }
  29. artiwright_inspecterror
    {
      "session": "territory-quota-plan",
      "document": "CRO_FY27_Capacity_Plan",
      "kind": "text",
      "slide": "sl_J42KZQEE",
      "search": "",
      "target": "sl_J42KZQEE",
      "maxChars": 12000,
      "sheet": "",
      "range": ""
    }
    {
      "ok": false,
      "error": {
        "name": "TokenError",
        "message": "inspect: \"sl_J42KZQEE\" is filtered out by kind, slide or search; widen them to see its context."
      }
    }
  30. artiwright_inspecterror
    {
      "session": "territory-quota-plan",
      "document": "CRO_FY27_Capacity_Plan",
      "kind": "slide",
      "slide": "4",
      "search": "",
      "target": "",
      "maxChars": 12000,
      "sheet": "",
      "range": ""
    }
    {
      "ok": false,
      "error": {
        "name": "TokenError",
        "message": "inspect: no object \"\" in this deck."
      }
    }
  31. artiwright_run
    deck.slides.remove('sl_J42KZQEE'); const s=deck.slides.add();compose(s,h(KpiCards,{title:'Hire 18 January starts — six in each segment',kpis:[{label:'Enterprise',value:'6 hires',delta:'$8.6M ramped capacity',trend:'up'},{label:'Mid-market',value:'6 hires',delta:'$5.5M ramped capacity',trend:'up'},{label:'Commercial',value:'6 hires',delta:'$3.7M ramped capacity',trend:'up'},{label:'Delivered capacity ($M)',value:'121.7',delta:'$1.7M above required quota',trend:'up'}],note:'January hires carry 67.9% of full-year quota under the month 0–5 ramp curve. Pre-start reps (Nov start) carry 76.3%.'}));deck.slides.move(s.id,3);return s.id;
    {
      "ok": true,
      "value": "sl_7E53EB9B",
      "logs": [],
      "created": [
        "sl_7E53EB9B",
        "sh_8X62TEGN",
        "sh_5S73768S",
        "sh_D8WE3SQX",
        "sh_4GVTRAAH",
        "sh_PJSDKWSE",
        "sh_MMHM7DEA",
        "sh_6JABSB41",
        "sh_JKH067JR",
        "sh_J85YHRPQ",
        "sh_Z57DEKB8",
        "sh_9PN11XQV",
        "sh_XZ0ZB5S3",
        "sh_5EBQKFZF",
        "sh_778HPFBJ",
        "sh_K0F50MP8",
        "sh_2R83D53B",
        "sh_Q42C9E9W",
        "sh_SFQWNSQB"
      ],
      "removed": [
        "sl_J42KZQEE",
        "sh_JSD89S1H",
        "sh_S73T46D6",
        "sh_5B5Y3889",
        "sh_CXQ34NKE",
        "sh_AKCDQT0F",
        "sh_64YKANKA",
        "sh_QX0A17BD",
        "sh_NWF1JC6R",
        "sh_WXTSZDA3",
        "sh_C37ND55Z",
        "sh_19SSDG1Y",
        "sh_C467XB4V",
        "sh_FA9KE819",
        "sh_9V7S6WTX",
        "sh_VXXH5TKY",
        "sh_7CFB7MBB",
        "sh_496YKG6P",
        "sh_A84V3C0Z"
      ],
      "slides": 6,
      "version": 2,
      "lint": {
        "errors": 0,
        "warnings": 0
      }
    }
  32. artiwright_render
    {
      "session": "territory-quota-plan",
      "document": "CRO_FY27_Capacity_Plan",
      "slides": [
        4,
        6
      ],
      "sheets": [],
      "range": ""
    }
    Slide 4Slide 6
    A render the agent looked atA render the agent looked at
  33. artiwright_lint
    {
      "session": "territory-quota-plan",
      "document": "CRO_FY27_Capacity_Plan",
      "rules": "",
      "severity": "warn",
      "slide": "4"
    }
    {
      "ok": true,
      "errors": 0,
      "warnings": 0,
      "findings": []
    }
  34. artiwright_lint
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "rules": "",
      "severity": "warn",
      "slide": ""
    }
    {
      "ok": true,
      "errors": 0,
      "warnings": 0,
      "findings": []
    }
  35. artiwright_run
    deck.slides.remove('sl_1XVZ65NZ');const s=deck.slides.add({layout:'title-and-content',title:'Decisions needed before kickoff',body:['Approve 18 January starts: 6 Enterprise, 6 Mid-market, 6 Commercial.','Lock the $120.0M quota plan; territory quotas reconcile exactly to capacity required.','Commission rebalance of the 18 territories outside ±25% potential variance.','Hold 80% planning attainment; fewer than 15 hires leaves target coverage below 100%.'],notes:'Decision request: approve the 18 January starts, lock the $120M territory quota plan, and have RevOps rebalance the 18 flagged territories before sales kickoff.'});return s.id;
    {
      "ok": true,
      "value": "sl_QA6DGDAD",
      "logs": [],
      "created": [
        "sl_QA6DGDAD",
        "sh_48DDCE70",
        "sh_CR5VK1WM"
      ],
      "removed": [
        "sl_1XVZ65NZ",
        "sh_4Y1NXHAW",
        "sh_X576GKB9",
        "sh_4254Z5DZ",
        "sh_289FT0DZ",
        "sh_KFGGBA7V",
        "sh_0BFEG5QD",
        "sh_WGYJ5RJ2",
        "sh_S985YQBX",
        "sh_39BVMNP2",
        "sh_2AV5Y59P",
        "sh_PZNYH03X",
        "sh_1KXJ9WN7",
        "sh_D4PJ72EA"
      ],
      "slides": 6,
      "version": 3,
      "lint": {
        "errors": 0,
        "warnings": 0
      }
    }
  36. artiwright_render
    {
      "session": "territory-quota-plan",
      "document": "CRO_FY27_Capacity_Plan",
      "slides": [
        6
      ],
      "sheets": [],
      "range": ""
    }
    Slide 6
    A render the agent looked at
  37. artiwright_lint
    {
      "session": "territory-quota-plan",
      "document": "CRO_FY27_Capacity_Plan",
      "rules": "",
      "severity": "warn",
      "slide": "6"
    }
    {
      "ok": true,
      "errors": 0,
      "warnings": 0,
      "findings": []
    }
  38. artiwright_finalizeFY27_Capacity_Plan.xlsxerror
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "file": "FY27_Capacity_Plan.xlsx",
      "requirements": {
        "sheets": [
          "Inputs",
          "Capacity Plan",
          "Territories",
          "What-If",
          "Checks",
          "Reps Raw",
          "Accounts Raw",
          "Bookings Raw",
          "Quotas Raw"
        ],
        "tables": [
          "RepsRaw",
          "AccountsRaw",
          "BookingsRaw",
          "QuotasRaw",
          "CapacityPlan",
          "Territories"
        ],
        "charts": 0,
        "values": [
          {
            "cell": "Checks!B4",
            "equals": 0,
            "tolerance": 0
          },
          {
            "cell": "Inputs!B4",
            "equals": 120000000,
            "tolerance": 0
          },
          {
            "cell": "Capacity Plan!J5",
            "equals": 18,
            "tolerance": 0
          }
        ],
        "slideCount": 0,
        "nativeCharts": [],
        "nativeTables": [],
        "tableTotals": [],
        "fonts": {
          "allowed": []
        },
        "lint": {
          "block": [
            "error",
            "warn"
          ],
          "waive": []
        }
      }
    }
    {
      "ok": false,
      "blocking": [
        {
          "step": 2,
          "code": "export/failed",
          "message": "Table \"CapacityPlan\": the header cell E1 must hold the column name \"Full-year quota / rep\"."
        }
      ],
      "warnings": [],
      "checks": [
        {
          "step": 1,
          "code": "path",
          "ok": true
        },
        {
          "step": 2,
          "code": "export",
          "ok": false
        }
      ],
      "receiptPath": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/sessions/territory-quota-plan/.artiwright/receipts/FY27_Capacity_Plan.failed.1791830054993.receipt.json"
    }
  39. artiwright_finalizeCRO_FY27_Capacity_Plan.pptxerror
    {
      "session": "territory-quota-plan",
      "document": "CRO_FY27_Capacity_Plan",
      "file": "CRO_FY27_Capacity_Plan.pptx",
      "requirements": {
        "sheets": [],
        "tables": [],
        "charts": 0,
        "values": [],
        "slideCount": 6,
        "nativeCharts": [
          "sl_5RA8DXTK"
        ],
        "nativeTables": [],
        "tableTotals": [],
        "fonts": {
          "allowed": []
        },
        "lint": {
          "block": [
            "error",
            "warn"
          ],
          "waive": []
        }
      }
    }
    {
      "ok": false,
      "error": {
        "name": "OptionsError",
        "message": "deck.finalize: requirements.fonts.allowed must be at least 1 items, got an array"
      }
    }
  40. artiwright_run
    const cap=workbook.sheets.get('Capacity Plan');cap.range('E1').values=[['Full-year quota / rep']];return cap.range('A1:L5');
    {
      "ok": true,
      "value": {
        "range": "'Capacity Plan'!A1:L5",
        "values": [
          [
            "Segment",
            "Territory potential",
            "% of potential",
            "FY27 planned quota",
            "Full-year quota / rep",
            "Active",
            "Pre-start",
            "Pre-hire capacity",
            "Quota gap",
            "Jan hires needed",
            "Capacity from hires",
            "Delivered capacity"
          ],
          [
            "Enterprise",
            90796000,
            0.38783146528157464,
            46539775.83378895,
            2100000,
            20,
            1,
            39401250,
            7138525.833788954,
            6,
            8557500.00042,
            47958750.000420004
          ],
          [
            "Mid-market",
            86383000,
            0.36898151312192456,
            44277781.574630946,
            1350000,
            32,
            0,
            38880000,
            5397781.574630946,
            6,
            5501250.000270001,
            44381250.00027
          ],
          [
            "Commercial",
            56933000,
            0.24318702159650082,
            29182442.5915801,
            900000,
            30,
            2,
            25672500,
            3509942.5915801004,
            6,
            3667500.00018,
            29340000.00018
          ],
          [
            "Total",
            null,
            null,
            120000000,
            null,
            82,
            3,
            103953750,
            16046250,
            18,
            17726250.00087,
            121680000.00087002
          ]
        ]
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Accounts Raw",
        "Bookings Raw",
        "Reps Raw",
        "Quotas Raw",
        "Inputs",
        "Capacity Plan",
        "Territories",
        "What-If",
        "Checks"
      ],
      "version": 9,
      "lint": {
        "errors": 25,
        "warnings": 29
      }
    }
  41. artiwright_finalizeFY27_Capacity_Plan.xlsxerror
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "file": "FY27_Capacity_Plan.xlsx",
      "requirements": {
        "sheets": [
          "Inputs",
          "Capacity Plan",
          "Territories",
          "What-If",
          "Checks",
          "Reps Raw",
          "Accounts Raw",
          "Bookings Raw",
          "Quotas Raw"
        ],
        "tables": [
          "RepsRaw",
          "AccountsRaw",
          "BookingsRaw",
          "QuotasRaw",
          "CapacityPlan",
          "Territories"
        ],
        "charts": 0,
        "values": [
          {
            "cell": "Checks!B4",
            "equals": 0,
            "tolerance": 0
          },
          {
            "cell": "Inputs!B4",
            "equals": 120000000,
            "tolerance": 0
          },
          {
            "cell": "Capacity Plan!J5",
            "equals": 18,
            "tolerance": 0
          }
        ],
        "slideCount": 0,
        "nativeCharts": [],
        "nativeTables": [],
        "tableTotals": [],
        "fonts": {
          "allowed": [
            "Aptos",
            "Arial",
            "Calibri"
          ]
        },
        "lint": {
          "block": [
            "error",
            "warn"
          ],
          "waive": []
        }
      }
    }
    {
      "ok": false,
      "blocking": [
        {
          "step": 2,
          "code": "export/failed",
          "message": "Table \"CapacityPlan\": the header cell F1 must hold the column name \"Active reps\"."
        }
      ],
      "warnings": [],
      "checks": [
        {
          "step": 1,
          "code": "path",
          "ok": true
        },
        {
          "step": 2,
          "code": "export",
          "ok": false
        }
      ],
      "receiptPath": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/sessions/territory-quota-plan/.artiwright/receipts/FY27_Capacity_Plan.failed.1791830071309.receipt.json"
    }
  42. artiwright_finalizeCRO_FY27_Capacity_Plan.pptx
    {
      "session": "territory-quota-plan",
      "document": "CRO_FY27_Capacity_Plan",
      "file": "CRO_FY27_Capacity_Plan.pptx",
      "requirements": {
        "sheets": [],
        "tables": [],
        "charts": 0,
        "values": [],
        "slideCount": 6,
        "nativeCharts": [
          "sl_5RA8DXTK"
        ],
        "nativeTables": [],
        "tableTotals": [],
        "fonts": {
          "allowed": [
            "Aptos",
            "Aptos Display",
            "Arial",
            "Calibri"
          ]
        },
        "lint": {
          "block": [
            "error",
            "warn"
          ],
          "waive": []
        }
      }
    }
    {
      "ok": true,
      "blocking": [],
      "warnings": [],
      "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": "tableTotals",
          "ok": true
        },
        {
          "step": 4,
          "code": "fonts",
          "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": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/sessions/territory-quota-plan/outputs/CRO_FY27_Capacity_Plan.pptx",
      "sha256": "c823f2664bf944c4043296482ae666af92475edfeee83ea19237eab75d5236f1",
      "bytes": 43474,
      "manifestPath": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/sessions/territory-quota-plan/outputs/CRO_FY27_Capacity_Plan.pptx.manifest.ndjson",
      "receiptPath": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/sessions/territory-quota-plan/.artiwright/receipts/CRO_FY27_Capacity_Plan.c823f2664bf9.1791830071752.receipt.json"
    }
  43. artiwright_run
    const cap=workbook.sheets.get('Capacity Plan');cap.range('F1:H1').values=[['Active reps','Signed reps','Capacity before FY27 hires']];return cap.range('A1:L5');
    {
      "ok": true,
      "value": {
        "range": "'Capacity Plan'!A1:L5",
        "values": [
          [
            "Segment",
            "Territory potential",
            "% of potential",
            "FY27 planned quota",
            "Full-year quota / rep",
            "Active reps",
            "Signed reps",
            "Capacity before FY27 hires",
            "Quota gap",
            "Jan hires needed",
            "Capacity from hires",
            "Delivered capacity"
          ],
          [
            "Enterprise",
            90796000,
            0.38783146528157464,
            46539775.83378895,
            2100000,
            20,
            1,
            39401250,
            7138525.833788954,
            6,
            8557500.00042,
            47958750.000420004
          ],
          [
            "Mid-market",
            86383000,
            0.36898151312192456,
            44277781.574630946,
            1350000,
            32,
            0,
            38880000,
            5397781.574630946,
            6,
            5501250.000270001,
            44381250.00027
          ],
          [
            "Commercial",
            56933000,
            0.24318702159650082,
            29182442.5915801,
            900000,
            30,
            2,
            25672500,
            3509942.5915801004,
            6,
            3667500.00018,
            29340000.00018
          ],
          [
            "Total",
            null,
            null,
            120000000,
            null,
            82,
            3,
            103953750,
            16046250,
            18,
            17726250.00087,
            121680000.00087002
          ]
        ]
      },
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Accounts Raw",
        "Bookings Raw",
        "Reps Raw",
        "Quotas Raw",
        "Inputs",
        "Capacity Plan",
        "Territories",
        "What-If",
        "Checks"
      ],
      "version": 10,
      "lint": {
        "errors": 25,
        "warnings": 29
      }
    }
  44. artiwright_finalizeFY27_Capacity_Plan.xlsxerror
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "file": "FY27_Capacity_Plan.xlsx",
      "requirements": {
        "sheets": [
          "Inputs",
          "Capacity Plan",
          "Territories",
          "What-If",
          "Checks",
          "Reps Raw",
          "Accounts Raw",
          "Bookings Raw",
          "Quotas Raw"
        ],
        "tables": [
          "RepsRaw",
          "AccountsRaw",
          "BookingsRaw",
          "QuotasRaw",
          "CapacityPlan",
          "Territories"
        ],
        "charts": 0,
        "values": [
          {
            "cell": "Checks!B4",
            "equals": 0,
            "tolerance": 0
          },
          {
            "cell": "Inputs!B4",
            "equals": 120000000,
            "tolerance": 0
          },
          {
            "cell": "Capacity Plan!J5",
            "equals": 18,
            "tolerance": 0
          }
        ],
        "slideCount": 0,
        "nativeCharts": [],
        "nativeTables": [],
        "tableTotals": [],
        "fonts": {
          "allowed": [
            "Aptos",
            "Arial",
            "Calibri"
          ]
        },
        "lint": {
          "block": [
            "error",
            "warn"
          ],
          "waive": []
        }
      }
    }
    {
      "ok": false,
      "blocking": [
        {
          "step": 4,
          "code": "lint/text/clipped",
          "message": "Accounts Raw!A1 is cut off: \"Account ID\" is wider than the column and B1 is not empty.",
          "sheet": "Accounts Raw",
          "range": "A1",
          "rule": "text/clipped"
        },
        {
          "step": 4,
          "code": "lint/text/clipped",
          "message": "Accounts Raw!B1 is cut off: \"Account name\" is wider than the column and C1 is not empty.",
          "sheet": "Accounts Raw",
          "range": "B1",
          "rule": "text/clipped"
        },
        {
          "step": 4,
          "code": "lint/text/clipped",
          "message": "Accounts Raw!D1 is cut off: \"Segment\" is wider than the column and E1 is not empty.",
          "sheet": "Accounts Raw",
          "range": "D1",
          "rule": "text/clipped"
        },
        {
          "step": 4,
          "code": "lint/text/clipped",
          "message": "Accounts Raw!F1 is cut off: \"Employees\" is wider than the column and G1 is not empty.",
          "sheet": "Accounts Raw",
          "range": "F1",
          "rule": "text/clipped"
        },
        {
          "step": 4,
          "code": "lint/text/clipped",
          "message": "Accounts Raw!G1 is cut off: \"Potential\" is wider than the column and H1 is not empty.",
          "sheet": "Accounts Raw",
          "range": "G1",
          "rule": "text/clipped"
        },
        {
          "step": 4,
          "code": "lint/text/clipped",
          "message": "Accounts Raw!B2 is cut off: \"Lumen Capital\" is wider than the column and C2 is not empty.",
          "sheet": "Accounts Raw",
          "range": "B2",
          "rule": "text/clipped"
        },
        {
          "step": 4,
          "code": "lint/text/clipped",
          "message": "Accounts Raw!D2 is cut off: \"Enterprise\" is wider than the column and E2 is not empty.",
          "sheet": "Accounts Raw",
          "range": "D2",
          "rule": "text/clipped"
        },
        {
          "step": 4,
          "code": "lint/text/clipped",
          "message": "Accounts Raw!B3 is cut off: \"Redfern Freight\" is wider than the column and C3 is not empty.",
          "sheet": "Accounts Raw",
          "range": "B3",
          "rule": "text/clipped"
        },
        {
          "step": 4,
          "code": "lint/text/clipped",
          "message": "Accounts Raw!D3 is cut off: \"Enterprise\" is wider than the column and E3 is not empty.",
          "sheet": "Accounts Raw",
          "range": "D3",
          "rule": "text/clipped"
        },
        {
          "step": 4,
          "code": "lint/text/clipped",
          "me
    …
  45. artiwright_run
    const a=workbook.sheets.get('Accounts Raw');a.setColumnWidth('A',90).setColumnWidth('B',190).setColumnWidth('C',90).setColumnWidth('D',100).setColumnWidth('E',130).setColumnWidth('F',90).setColumnWidth('G',105).setColumnWidth('H',115);a.range('F2:F1440').format({numberFormat:'#,##0'});a.range('G2:G1440').format({numberFormat:'$#,##0'});a.freeze(1);
    const b=workbook.sheets.get('Bookings Raw');b.setColumnWidth('A',85).setColumnWidth('B',110).setColumnWidth('C',85).setColumnWidth('D',95).setColumnWidth('E',100);b.range('A2:A635').format({numberFormat:'m/d/yyyy'});b.range('E2:E635').format({numberFormat:'$#,##0'});b.freeze(1);
    const q=workbook.sheets.get('Quotas Raw');q.setColumnWidth('A',90).setColumnWidth('B',115).setColumnWidth('C',95);q.range('B2:B83').format({numberFormat:'$#,##0'});q.range('C2:C83').format({numberFormat:'0'});q.freeze(1);
    const r=workbook.sheets.get('Reps Raw');r.setColumnWidth('A',85).setColumnWidth('B',145).setColumnWidth('C:D',110).setColumnWidth('E',100).setColumnWidth('F',85);r.range('E2:E86').format({numberFormat:'m/d/yyyy'});r.freeze(1);return 'raw sheets formatted';
    {
      "ok": true,
      "value": "raw sheets formatted",
      "logs": [],
      "created": [],
      "removed": [],
      "slides": 0,
      "sheets": [
        "Accounts Raw",
        "Bookings Raw",
        "Reps Raw",
        "Quotas Raw",
        "Inputs",
        "Capacity Plan",
        "Territories",
        "What-If",
        "Checks"
      ],
      "version": 11,
      "lint": {
        "errors": 0,
        "warnings": 0
      }
    }
  46. artiwright_finalizeFY27_Capacity_Plan.xlsx
    {
      "session": "territory-quota-plan",
      "document": "FY27_Capacity_Plan",
      "file": "FY27_Capacity_Plan.xlsx",
      "requirements": {
        "sheets": [
          "Inputs",
          "Capacity Plan",
          "Territories",
          "What-If",
          "Checks",
          "Reps Raw",
          "Accounts Raw",
          "Bookings Raw",
          "Quotas Raw"
        ],
        "tables": [
          "RepsRaw",
          "AccountsRaw",
          "BookingsRaw",
          "QuotasRaw",
          "CapacityPlan",
          "Territories"
        ],
        "charts": 0,
        "values": [
          {
            "cell": "Checks!B4",
            "equals": 0,
            "tolerance": 0
          },
          {
            "cell": "Inputs!B4",
            "equals": 120000000,
            "tolerance": 0
          },
          {
            "cell": "Capacity Plan!J5",
            "equals": 18,
            "tolerance": 0
          }
        ],
        "slideCount": 0,
        "nativeCharts": [],
        "nativeTables": [],
        "tableTotals": [],
        "fonts": {
          "allowed": [
            "Aptos",
            "Arial",
            "Calibri"
          ]
        },
        "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": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/sessions/territory-quota-plan/outputs/FY27_Capacity_Plan.xlsx",
      "sha256": "b49de200f192d9d155a6bd1861c1205d5cf960e9734859775497a631f5371bac",
      "bytes": 122521,
      "receiptPath": "~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/sessions/territory-quota-plan/.artiwright/receipts/FY27_Capacity_Plan.b49de200f192.1791830105515.receipt.json"
    }
The agent's last message

Completed and published both deliverables in the Spruce theme:

  • [FY27 Capacity Plan workbook](sandbox:~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/sessions/territory-quota-plan/outputs/FY27_Capacity_Plan.xlsx)
  • [CRO FY27 Capacity Plan deck](sandbox:~/Documents/Personal/paperwright/out/agent-runs-fw/territory-quota-plan/sessions/territory-quota-plan/outputs/CRO_FY27_Capacity_Plan.pptx)

Key results:

  • $96.0M FY27 bookings target at 80% planning attainment requires $120.0M of quota capacity.
  • Team capacity before FY27 hires: $104.0M, after modeled attrition and ramp.
  • Recommend 18 January hires: 6 Enterprise, 6 Mid-market, 6 Commercial.
  • Delivered modeled capacity: $121.7M, or $1.7M above the required quota capacity.
  • Territory quotas reconcile exactly to $120.0M.
  • 18 territories are flagged as more than ±25% from their segment’s average potential.
  • The workbook includes editable inputs, segment capacity math, territory-level quotas and balance flags, control checks, and an attainment-versus-hires what-if grid.

Lint during the run

Nothing for lint to flag

Lint found nothing on any check this run.

  1. lintFY27_Capacity_PlanNo findings
  2. lintFY27_Capacity_PlanNo findings
  3. lintCRO_FY27_Capacity_PlanNo findings
  4. lintCRO_FY27_Capacity_PlanNo findings
  5. lintFY27_Capacity_PlanNo findings
  6. lintCRO_FY27_Capacity_PlanNo findings
  7. finalizeFY27_Capacity_Plan.xlsxNo findings
  8. finalizeCRO_FY27_Capacity_Plan.pptxNo findings
  9. finalizeFY27_Capacity_Plan.xlsxNo findings
  10. finalizeCRO_FY27_Capacity_Plan.pptxNo findings
  11. finalizeFY27_Capacity_Plan.xlsxNo findings
  12. finalizeFY27_Capacity_Plan.xlsxNo findings

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-5.6-terra, 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.