← Selected work

Workflow automation · Finance operations · AI-assisted engineering

Stafford: A Monthly Accounting Close Without Guesswork

How do you automate a monthly close when no AI should interpret the numbers?

Company
Stafford
Period
2026
Disciplines
Workflow Automation, Finance Operations, AI-Assisted Engineering, Governance
Chapters
8
4
Tie-out checks on every run
0
Numbers interpreted by generative AI
Pilot
Proof of value, not yet in production
00

The 60-second version

The problem
The reports are rules applied to files the accountants already save.
The scale
4 tie-out checks on every run
My role
Product lead and builder. Owned the requirements, the scope, the accounting-policy boundaries, and every approval decision.
What changed
A deterministic Python engine that reads the Excel trial balances, validates the data, applies approved rules, and produces the balance sheet, the month and year-to-date cash flows, and the rolling trial balance.
The result
Not yet measured. The parallel run on the September close is the proof point, and the results will be added here.
01

The situation

Each month Stafford's accounting team builds consolidated reports for dozens of property entities by hand. They collect a trial balance for each entity, map every account to a cash-flow category, roll balances forward, and assemble the statements in Excel. It is repetitive, it takes skilled accountants' time, and one wrong cell can quietly throw off a whole report.

02

The actual problem

The request was

“Make the monthly close less manual and less error-prone.”

Discovery showed

The reports are rules applied to files the accountants already save. That is an automation problem, not an interpretation problem, so the numbers should come from deterministic code that checks itself, with a person approving anything a rule does not cover.

Automation is often a better fit than AI. Many industries moved past manual work straight to AI strategy without the automation step in between, even when the underlying problem is still a manual, repeatable process. Here AI belongs in building the system, not in the arithmetic.

03

What I learned

  • Worked from the real accounting workflow, sample spreadsheets, business requirements, security rules, and the decisions Stafford has already made.
  • Mapped the inputs and outputs: trial balances per entity per month, the prior-year rolling trial balance, the budget, and the chart of accounts with its cash-flow category table.
  • Defined the accountant's controls: the tool computes a default, and she can override items such as Repair Reserve, Principal Payment, the account mapping, and opening balances, with the calculated value shown next to the override.
  • Designed a parallel run: Stafford closes by hand, the tool runs the same month, and every line is compared.
04

How I framed it

Exhibit

How a Run Is Designed to Work

  1. 01

    Upload

    Property accounting files go in through a secure web portal

  2. 02

    Check

    Expected property and period confirmed, file scanned for malware, history recorded

  3. 03

    Pin

    Approved files and rules fixed to that run so inputs cannot change mid-run

  4. 04

    Reconcile

    A Python engine validates the data, applies approved rules, and produces the Excel outputs

  5. 05

    Review

    Anything no approved rule covers goes to an exception queue with file, worksheet, and cell evidence

  6. 06

    Approve

    An authorized person controls final approval and release

AI cannot invent a value, approve an accounting judgment, or release a package.

What you're looking atThe target workflow. The status table below shows what is built and what is still behind production gates.

Exhibit

How the Build Is Controlled

  1. 01

    Small phase

    One scoped change at a time

  2. 02

    Own branch

    Each phase has its own branch and pull request

  3. 03

    Automated tests

    Interface, accounting engine, database rules, security controls, and the full workflow

  4. 04

    Independent review

    A second AI tool reviews the work and compares it with the source requirements

  5. 05

    Explicit approval

    Nothing is merged, deployed, or applied to the database without it

What you're looking atAI coding tools do the engineering and the testing. The requirements, the scope, the accounting-policy boundaries, and every approval stay with me.

Exhibit

Where Things Stand

  1. 01

    Accounting engine

    Status
    Built, in parallel-run validation
    Notes
    Reads the Excel files, validates, applies approved rules, runs the tie-outs, and produces the reports
  2. 02

    Accountant overrides

    Status
    Built
    Notes
    The calculated default shows next to each override
  3. 03

    Run button on the review site

    Status
    Next
    Notes
    So Stafford can run it without me
  4. 04

    Secure upload portal, malware scan, MFA

    Status
    In build, production gated
    Notes
    Separate authorization, migration, deployment, and verification gates still apply
  5. 05

    September parallel run

    Status
    Results pending
    Notes
    Every line compared against the manual close
What you're looking atPassing tests or finished code is not treated as proof that something is live.
05

What we built

  • 01A deterministic Python engine that reads the Excel trial balances, validates the data, applies approved rules, and produces the balance sheet, the month and year-to-date cash flows, and the rolling trial balance.
  • 02Four tie-outs on every run, with failures that point to the entity, the statement, and the amount.
  • 03A review path: a new account missing from the chart is parked on a review line, missing trial balances are listed, and anything unresolved stops the run or goes to a person.
  • 04Accountant-controlled overrides, with the calculated value shown next to each one.
  • 05Automated tests for the interface, the accounting engine, the database rules, the security controls, and the complete workflow.
  • 06The stack: Next.js, React, and TypeScript for the portal; Supabase for the database, authentication with authenticator-app MFA, and file storage; Vercel for hosting; Python for the engine; and AWS services for file scanning and restricted processing.
06

My role

Product
Owned the requirements, the scope, the accounting-policy boundaries, and every approval decision.
Build
Directed AI coding tools: v0 for the first interface, Codex for much of the detailed engineering and testing, and Claude Code and GitHub Copilot for handoffs and independent code review.
Controls
Required a branch, a pull request, automated tests, review, and explicit approval for every phase.
Validation
Designed the parallel run against Stafford's manual close.
07

The outcome

  • Not yet measured. The parallel run on the September close is the proof point, and the results will be added here.
  • What is already true: the tool checks itself on every run, flags anything unusual instead of guessing, and keeps the accountant in control of the judgment calls.
08

What I'd do differently

I use AI more like a technical team than a chatbot: it challenges the work, finds gaps, and tests failure conditions, while I keep the requirements, the accounting-policy boundaries, and the approvals. And I do not treat passing tests or completed code as proof that something is live.

Contact

Let's get into it.

Ambiguous problem, AI adoption that stalled, an operating model that stopped scaling, a support function that should be a product. That is the conversation I want.