Back to Playbooks

ROI Calculator from CRO Request

Build
~2.5 hours

The CRO asks: "Can you build me an ROI calculator for sales to use?" You have no template. You need to spec it, build it, QA it, and document it — from nothing to a fully functional calculator with Apps Script automation and published documentation.

The Slack Message

RK
CRO11:23 AM

Can you build me an ROI calculator for sales to use in demos? I want it in Google Sheets — inputs, outputs, competitive comparison. We need it by end of week. Reps are asking for it in every deal.

The Prompt

No template exists. Start from scratch in Claude Code.

CRO asks: "Can you build me an ROI calculator for sales to use in demos?"

I have no template. Need to spec it, build it, QA it, document it.

(Planner mode) Spec out full ROI model:
- What inputs does sales need to provide?
- What's our pricing structure?
- What are the value drivers?
- What does competition charge?
- What outputs does the calc produce?

Then:
1. Build the sheet with all tabs, formulas, named ranges
2. Push all sheet data + Apps Script files via Gremlin
3. QA: lint for broken formulas, fix any #REF! or errors
4. Create snapshot for version control
5. Publish full documentation to RevOps portal:
   - What this calculator does
   - How to use it (step by step)
   - Input definitions
   - Where to find it

The Cockpit Vision: Claude Code + Gremlin

This isn't cleanup — it's creation. Claude Code is the brain (spec, design, generate). Gremlin is the hands (sync, lint, repair, publish). Full loop: spec → build → QA → document. That's the GTM engineering cockpit made real.

How Gremlin Handles This

1

Spec (Claude Code)

Planner mode specs the full model: inputs, pricing, value drivers, formulas, outputs

2

Build (Claude Code)

Generate sheet structure with tabs, formulas, named ranges, and Apps Script

3

Sync (Gremlin)

Push sheet config + Apps Script files to Google Sheets

4

QA (Gremlin)

Lint all formulas, fix any #REF! errors, validate edge cases

5

Snapshot (Gremlin)

Version control the sheet for rollback safety

6

Document (Gremlin)

Publish "How to Use" guide to Notion with full input definitions

After you paste this prompt, Claude Code:

"I need to build an ROI calculator from scratch. Let me start by speccing out the full model..."

"What inputs does sales need? Current spend, leads/month, hit rate, team size. Outputs: cost per lead, savings, ROI, payback period..."

Generating roi_model.csv with formulas and roi_schema.yaml for validation

- Tabs: Inputs, Calculations, Summary, Comparison
- 23 formulas with named ranges
- Schema validation rules defined
Running
$ g-gremlin write SHEET_ID --tab "ROI Model" --csv roi_model.csv --formulas
Created "Sales ROI Calculator v1.0" with 23 formulas
Running
$ g-gremlin inspect -s SHEET_ID --structure --output .g_gremlin/profile.json
Inspected structure: 4 tabs, 23 formulas, dependency graph mapped
Running
$ g-gremlin lint SHEET_ID --rules "all" --output lint_report.json
Found 2 #REF! errors in Calculations!B12, B15
Running
$ g-gremlin trace SHEET_ID --cell "Summary!C10" --direction upstream --format mermaid --output roi_deps.md
Traced dependencies: C10 ← Calculations!B12 ← Inputs!C5 (found broken ref)
Running
$ g-gremlin lint SHEET_ID --rules "quoting,dead-refs" --fix
Fixed 2 errors. All formulas validated.
Running
$ g-gremlin schema-validate SHEET_ID --schema roi_schema.yaml --strict
Schema validation passed: all cells match expected types and references
Running
$ g-gremlin snapshot create SHEET_ID --name "roi-calc-v1"
Snapshot saved: .g_gremlin/snapshots/roi-calc-v1.json
Running
$ g-gremlin docs publish --provider notion --template roi_docs.md --data '{"title":"ROI Calculator"}' --external-id roi-doc-1 --apply
Published documentation with inputs, outputs, and usage guide

Done. Calculator ready, schema validated, documentation published.

Output Artifacts

Google Sheet: Sales ROI Calculator

  • Inputs — Customer data entry with validation
  • Calculations — Hidden formula logic
  • Summary — Executive dashboard
  • Apps Script — Dropdown handlers, formatting

Notion Page: How to Use

  • What it does — Purpose and outputs
  • Step by step — How to use in demos
  • Input definitions — What each field means
  • Where to find it — Link to sheet

Also created: QA report (0 errors), version snapshot for rollback, config YAML for future edits

Results

4
Tabs built
23
Formulas created
2
Errors found & fixed
0 errors
QA report

Build time: 2h 15m

vs ~2 days manual (spec, build, test, document separately)

Try This Workflow

Start with the quickstart guide, then build your own calculators and tools.

Playbook: ROI Calculator from CRO Request | Deal Desk | FoundryOps