Git-native monthly close platform. AI agents perform the mechanical work of a financial close — bank reconciliation, AP sub-ledger matching, P&L variance commentary — with every action recorded as a git commit, every approval as a merged pull request, and a complete audit trail generated automatically.
Financial controls and git workflows are structurally identical:
| Finance Control | Git Equivalent |
|---|---|
| Maker-checker approval | Pull request merge |
| Audit trail | git log |
| Segregation of duties | Branch protection |
| Control documentation | RULES.md |
| Point-in-time snapshot | git tag v2025-01-close |
An agent operating inside a git repo doesn't just comply with financial controls — it is the control framework, by construction. Compliance overhead drops to zero because it's a property of the architecture.
Three AI agents close the books for Meridian Engineering Pty Ltd (January 2025):
| Agent | Task | What It Does |
|---|---|---|
| Atlas | Cash reconciliation | Reconciles 23 bank transactions against the GL, finds the Telstra exception, retrieves the resolution from memory (PR #641, October 2024) |
| Nova | AP sub-ledger reconciliation | Traces every open AP invoice to a GL posting by reference, catches the $5,200 ARUP-7795 cutoff error in 27 seconds |
| Echo | Variance commentary | Computes budget vs. actuals for all P&L lines, generates sourced management commentary — every explanation attributed to data or memory |
All math is verified. The reconciliation balances to the cent. The git history is the complete audit trail.
- Node.js 20+
- Git
- An Anthropic API key
# Install dependencies
npm install
# Copy env file and add your key
cp .env.example .env
# Edit .env: ANTHROPIC_API_KEY=sk-ant-...
# Seed the database
npm run seed
# Verify all math checks pass (10/10)
npm run verify# Open a close cycle
npx gitclose open --entity MER-AU-ENG --period 2025-01
# Run all three agents sequentially (Atlas → Nova → Echo)
npx gitclose run-all
# Check status
npx gitclose status
# Approve a PR
npx gitclose review --pr 1 --action approve --reviewer sarah.martinez
# Finalize — merge, tag, generate summary
npx gitclose finalizenpm run ui:dev
# Open http://localhost:3000Three views:
/— Close Dashboard (task status, PRs, exceptions)/pr/[id]— PR review (workpaper, exceptions with memory match, proposed JEs)/audit— Complete audit trail (read-only)
# First time: run live and record LLM responses
npm run demo:record
# Subsequent runs: replay cached responses deterministically
npx gitclose run-all --replaynpm run demo:reset
# Deletes close-repo/, rebuilds meridian.db, runs all verificationsfinance_agent/
├── agents/
│ ├── atlas-cash-recon/ # agent.yaml, SOUL.md, RULES.md, DUTIES.md, memory/, hooks/, tools/
│ ├── nova-ap-recon/
│ └── echo-variance/
├── db/
│ ├── schema.sql # Full DDL
│ ├── seed.sql # Verified seed data (Meridian Engineering, Jan 2025)
│ └── verify.sql # 10 mathematical verification queries
├── src/
│ ├── cli/ # gitclose CLI (commander)
│ ├── runtime/ # Agent loop, LLM client, hooks, memory, cache
│ ├── tools/ # TypeScript tool implementations (atlas/, nova/, echo/, shared/)
│ ├── git/ # repo.ts, pr.ts, audit.ts
│ └── db/ # connection.ts, queries.ts
├── app/ # Next.js 15 UI
├── scripts/ # seed-db.ts, verify.ts, demo-reset.ts, record-demo.ts
├── tests/ # 16 unit tests, all passing
└── demo/
├── traditional-workflow/ # "James's world" — shared drive chaos for Act 1 of demo
└── narration.md # 25-minute demo script
npm test
# 16 tests, 3 test files — all passingKey tests:
fetch_bank_statementreturns 23 transactions with correct balancesmatch_transactionsmatches BT-023 to JE-2025-0012 via reference (CHK-4891, different dates)match_transactionsdoes NOT match BT-022 (Telstra — no GL counterpart)compute_variancescorrectly handles GL sign convention (revenue = negative in GL, positive in management reports)compare_balancesdetects the $5,200 AP-GL difference
| Component | Status | Notes |
|---|---|---|
| LLM reasoning | Real | Claude Sonnet reads data, matches transactions, reasons about exceptions |
| Git operations | Real | Real commits, branches, merge history, tags |
| Memory lookup | Real | Agent reads MEMORY.md and finds Telstra pattern from October 2024 |
| Hook execution | Real | preToolUse.js enforces materiality and escalation rules |
| Financial data | Simulated | SQLite with Meridian Engineering sample data (23 bank txns, not 23,000) |
| ERP integration | Simulated | Tools query SQLite, not a live NetSuite API |
The architecture is real. The data is simulated. In production, swap SQLite for ERP/bank feed connectors. Everything else stays the same.
| Decision | Choice | Why |
|---|---|---|
| Database | SQLite (better-sqlite3) |
Single-file, portable, no server required |
| LLM | Claude Sonnet (@anthropic-ai/sdk) |
Best structured tool-use for finance tasks |
| Git ops | simple-git |
Clean async API, no native compilation |
| Agent execution | Sequential (Atlas → Nova → Echo) | Simpler, more reliable, easier to demo |
| PR system | JSON files in .gitclose/prs/ |
Self-contained, no Docker dependency |
| Web UI | Next.js 15 + Tailwind CSS | Fast to build, server components for git data |
PROBLEM.md— Why the CFO office has a structural problem no existing tool solvesARCHITECTURE.md— How the system works, from data layer to git layer to UI