Financial Statements — Statement Builder
"Build the statements."
When to use
- A trial balance needs to become statements — "build a P&L and balance sheet from this TB".
- A raw transaction export needs rolling up — "here's the ledger dump, make me financials".
- Statements exist but fail internal checks — "my balance sheet is off by 3,412 — find it".
- Someone external asked for financials — "the investor wants Q2 statements by Friday".
- You need a statement-level base before deeper work — flux commentary, audit prep, a close pack.
Workflow
- Ingest with code. Load the pasted table or CSV/XLSX (pandas or equivalent — never mental math on long columns). Standardize columns, normalize debit/credit signs, and confirm the trial balance foots: total debits = total credits. If it does not, stop and report the gap before building anything on top.
- Map to a standard chart. Classify every account — Assets, Liabilities, Equity, Revenue, COGS, Operating expenses, Other income/expense, Tax — with current vs non-current splits for balance sheet lines. Every judgment mapping is recorded as an assumption.
- Build the P&L. Revenue → COGS → gross profit → opex by category → operating income → other items → tax → net income, with subtotals and margins as % of revenue.
- Build the balance sheet. Current and non-current sections; roll period net income into retained earnings; present total assets against total liabilities + equity.
- Build the cash flow (indirect). Start at net income; add back non-cash items (depreciation, amortization, write-offs); adjust for working-capital deltas (AR, inventory, prepaids, AP, accruals); then investing and financing; land on net change in cash.
- Run tie-outs in code, not by eye: (a) balance sheet balances; (b) P&L net income equals net income in the equity roll-forward; (c) cash flow ending cash equals balance sheet cash; (d) every statement subtotal re-foots from the mapped trial balance.
- Scan for anomalies. Contra-normal balances (credit AR, debit revenue), hard swings vs prior period when one is provided, suspicious round numbers, unmapped orphans. Each gets a note and a suggested action.
- Deliver. Fill the output template; when the user wants artifacts, write
statements-<period>.md and/or statements-<period>.xlsx alongside the source data.
Output format
# Financial Statements — <Entity> — <Period>
## Income statement
| Line | Amount | % of revenue |
|------|-------:|-------------:|
| Revenue | | |
| COGS | | |
| **Gross profit** | | |
| Operating expenses (by category) | | |
| **Operating income** | | |
| Other income/(expense) | | |
| Tax | | |
| **Net income** | | |
## Balance sheet
| Line | Amount |
|------|-------:|
| Current assets | |
| Non-current assets | |
| **Total assets** | <A> |
| Current liabilities | |
| Non-current liabilities | |
| Equity (incl. period NI <N>) | |
| **Total liabilities + equity** | <A> |
## Cash flow (indirect)
Operating: NI <N> + non-cash <> + working capital Δ <> = <>
Investing: <> | Financing: <>
Net change in cash <Δ> → Ending cash <C>
## Tie-out checks
- TB foots: Dr <D> = Cr <D> — PASS/FAIL
- Balance sheet balances — PASS/FAIL
- NI → retained earnings — PASS/FAIL
- Ending cash ties across statements — PASS/FAIL
## Mapping & assumptions
- <account> → <category> — <why>
## Anomalies
- <item>: <what looks off> → <suggested action>
Quality bar
Example
Invocation: "Here's tb-2026-06.xlsx — build June financials."
Produced: June P&L, balance sheet, and indirect cash flow with all four tie-outs passing; a 42-account mapping table with 3 judgment calls listed as assumptions; one anomaly — a credit balance in AR flagged as a likely unapplied customer payment, with a proposed reclass entry.
Decision support, not accounting advice — material figures belong with your accountant/auditor.
1---2name: financial-statements3description: Builds a full statement set — P&L, balance sheet, and indirect cash flow — from a trial balance or transaction export, mapping accounts to a standard chart and proving every tie-out in code. Use when the user says 'build a P&L from this trial balance', 'turn this export into financials', 'I need a balance sheet for the board', or 'my statements don't tie'. Works on pasted data or CSV/XLSX files.4---56# Financial Statements — Statement Builder78> "Build the statements."910## When to use1112- A trial balance needs to become statements — "build a P&L and balance sheet from this TB".13- A raw transaction export needs rolling up — "here's the ledger dump, make me financials".14- Statements exist but fail internal checks — "my balance sheet is off by 3,412 — find it".15- Someone external asked for financials — "the investor wants Q2 statements by Friday".16- You need a statement-level base before deeper work — flux commentary, audit prep, a close pack.1718## Workflow19201. **Ingest with code.** Load the pasted table or CSV/XLSX (pandas or equivalent — never mental math on long columns). Standardize columns, normalize debit/credit signs, and confirm the trial balance foots: total debits = total credits. If it does not, stop and report the gap before building anything on top.212. **Map to a standard chart.** Classify every account — Assets, Liabilities, Equity, Revenue, COGS, Operating expenses, Other income/expense, Tax — with current vs non-current splits for balance sheet lines. Every judgment mapping is recorded as an assumption.223. **Build the P&L.** Revenue → COGS → gross profit → opex by category → operating income → other items → tax → net income, with subtotals and margins as % of revenue.234. **Build the balance sheet.** Current and non-current sections; roll period net income into retained earnings; present total assets against total liabilities + equity.245. **Build the cash flow (indirect).** Start at net income; add back non-cash items (depreciation, amortization, write-offs); adjust for working-capital deltas (AR, inventory, prepaids, AP, accruals); then investing and financing; land on net change in cash.256. **Run tie-outs in code, not by eye:** (a) balance sheet balances; (b) P&L net income equals net income in the equity roll-forward; (c) cash flow ending cash equals balance sheet cash; (d) every statement subtotal re-foots from the mapped trial balance.267. **Scan for anomalies.** Contra-normal balances (credit AR, debit revenue), hard swings vs prior period when one is provided, suspicious round numbers, unmapped orphans. Each gets a note and a suggested action.278. **Deliver.** Fill the output template; when the user wants artifacts, write `statements-<period>.md` and/or `statements-<period>.xlsx` alongside the source data.2829## Output format3031```32# Financial Statements — <Entity> — <Period>3334## Income statement35| Line | Amount | % of revenue |36|------|-------:|-------------:|37| Revenue | | |38| COGS | | |39| **Gross profit** | | |40| Operating expenses (by category) | | |41| **Operating income** | | |42| Other income/(expense) | | |43| Tax | | |44| **Net income** | | |4546## Balance sheet47| Line | Amount |48|------|-------:|49| Current assets | |50| Non-current assets | |51| **Total assets** | <A> |52| Current liabilities | |53| Non-current liabilities | |54| Equity (incl. period NI <N>) | |55| **Total liabilities + equity** | <A> |5657## Cash flow (indirect)58Operating: NI <N> + non-cash <> + working capital Δ <> = <>59Investing: <> | Financing: <>60Net change in cash <Δ> → Ending cash <C>6162## Tie-out checks63- TB foots: Dr <D> = Cr <D> — PASS/FAIL64- Balance sheet balances — PASS/FAIL65- NI → retained earnings — PASS/FAIL66- Ending cash ties across statements — PASS/FAIL6768## Mapping & assumptions69- <account> → <category> — <why>7071## Anomalies72- <item>: <what looks off> → <suggested action>73```7475## Quality bar7677- [ ] Every computation runs in code on the actual data; every subtotal re-foots.78- [ ] All four tie-out checks executed with PASS/FAIL shown — no silent passes.79- [ ] Every account mapped; every judgment mapping listed under assumptions.80- [ ] One sign convention, stated once, applied everywhere.81- [ ] Anomalies surfaced with suggested actions, never absorbed into totals.82- [ ] Cash flow reconciles to the actual change in cash — no plug.8384## Example8586**Invocation:** "Here's `tb-2026-06.xlsx` — build June financials."87**Produced:** June P&L, balance sheet, and indirect cash flow with all four tie-outs passing; a 42-account mapping table with 3 judgment calls listed as assumptions; one anomaly — a credit balance in AR flagged as a likely unapplied customer payment, with a proposed reclass entry.8889*Decision support, not accounting advice — material figures belong with your accountant/auditor.*