Financial formula verification

From CarlosCaPe/octorato · View interactive version

Financial formula verification is an AI agent skill from the GitHub repository CarlosCaPe/octorato. Financial Formula Verification for Cloud Cost Documents

How to use this skill

Skill file

Financial Formula Verification for Cloud Cost Documents

What

A mechanical verification process for financial calculations in cloud migration

documents, cost analyses, and technology evaluations. Treats every dollar figure

as a testable assertion that must be independently re-derived from its inputs.

Why

Financial discrepancies in technical documents destroy credibility with leadership

and finance teams. A single wrong number in an executive summary casts doubt on

every other number in the document. These errors are common because:

Verification Protocol

Step 1 - Extract All Financial Assertions

Grep every dollar amount, percentage, and timeline from the document:

# All dollar amounts
grep -oP '\$[\d,.]+[KMB]?\b' document.md | sort | uniq -c | sort -rn

# All percentage values
grep -oP '\d+(\.\d+)?%' document.md | sort | uniq -c | sort -rn

# Break-even or timeline references
grep -oiP '\d+(\.\d+)?\s*(year|month|yr|mo)\b' document.md | sort -u

Step 2 - Identify the Canonical Source

Every financial figure should trace back to ONE authoritative calculation.

Find that calculation (usually in a "Cost Methodology" or "Financial Summary" section)

and treat it as the source of truth.

The document should have a single section where:

Step 3 - Re-derive Every Total

For each stated total, independently multiply:

| Verify | How |

|--------|-----|

| Compute cost | vCores * $/vCore/month = stated total |

| Storage cost | TB * 1024 * $/GB/month = stated total |

| Backup cost | TB * $/GB/month = stated total |

| Grand total | Sum of components = stated total |

| AHB/discount | Compute * (1 - discount%) = stated discounted total |

| Annual savings | (Platform A - Platform B) * 12 = stated annual savings |

| Break-even | Migration cost / annual savings = stated timeline |

Step 4 - Verify Unit Costs Against Official Sources

| Cloud Provider | Where to Verify |

|---------------|-----------------|

| Azure SQL MI | https://azure.microsoft.com/en-us/pricing/details/azure-sql-managed-instance/single/ |

| Azure PG Flex | https://azure.microsoft.com/en-us/pricing/details/postgresql/flexible-server/ |

| Azure Hybrid Benefit | https://learn.microsoft.com/en-us/azure/azure-sql/azure-hybrid-benefit |

| Azure Storage | Pricing page for the specific service (MI storage, PG storage, backup) |

Common pricing traps:

Step 5 - Cross-Section Consistency Check

The same financial metric must show the same value in every section where it appears.

Common locations to cross-check:

| Section | What to Check |

|---------|--------------|

| Executive Summary / "The Question" | List price, AHB price, annual savings range |

| Financial Summary table | All cost components, totals, savings |

| Cost Calculation Methodology | Detailed arithmetic per component |

| Verdict / Recommendation | ROI, break-even, migration cost |

| Quick Reference / Navigation tables | Summary figures must match source sections |

Step 6 - Document Corrections

When a discrepancy is found:

  1. Identify the correct value (from official pricing or correct arithmetic)
  2. List ALL locations where the incorrect value appears
  3. Fix all locations in a single pass (prevent partial fixes)
  4. Add the correction to the revision history
  5. Note: "No technical findings, verdicts, or evidence were modified" if applicable

Checklist - Financial Verification Gate

Anti-Patterns

| Don't | Do |

|-------|-----|

| Trust a $/vCore/hr rate without verifying the tier | Look up the exact SKU on the pricing page |

| Assume "60% AHB discount" because someone said so | Read the Microsoft AHB documentation |

| Use storage "used" for cost calculations | Use storage "provisioned" (that's what gets billed) |

| Fix a number in one section but not others | Grep for the old value and fix every occurrence |

| Round intermediate calculations | Keep precision, round only the final displayed value |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.