codex/aram-five-statement-integration-20261031
add-index-html-10623938925177053894
arena/094f314c-aram
chatgpt-phase1b2-autopilot
codex/adr-future-connectors-pi-v1
codex/aram-account-note-source-trace-20261031
codex/aram-actions-node24-maintenance-20261031
codex/aram-analyst-review-workbook-20261031
codex/aram-bs-candidate-statement-20261031
codex/aram-cash-flow-direct-candidate-20261031
codex/aram-clean-reference-year-integrity-20261030
codex/aram-cross-statement-controls-20261031
codex/aram-equity-changes-candidate-20261031
codex/aram-five-statement-cli-20261031
codex/aram-five-statement-integration-20261031
codex/aram-five-statement-orchestrator-20261031
codex/aram-gate3-coverage-target-guard-20261030
codex/aram-gate3-hidden-xlsx-guard-20261030
codex/aram-gate3-integration-validation-20261030
codex/aram-gate3-mapping-change-preview-20261030
codex/aram-gate3-stale-note-guard-20261030
codex/aram-income-statement-candidate-20261031
codex/aram-manifest-referential-integrity-20261031
codex/aram-mapping-source-parser-20261101
codex/aram-multidimensional-mapping-20261101
codex/aram-multistatement-mapping-20261031
codex/aram-pipeline-manifest-schema-20261031
codex/aram-readonly-mapping-coverage-20261031
codex/aram-reconciliation-review-gate-20261031
codex/aram-same-flush-fiscal-lock-20261030
codex/aram-synthetic-windows-demo-20261031
codex/aram-trial-balance-diagnostic-20261031
codex/aram-windows-background-detail-search-20261031
codex/aram-windows-detail-review-20261031
codex/aram-windows-five-statement-pilot-20261031
codex/aram-windows-statement-figures-20261031
codex/gate-2a-pilot-workbook
codex/gate-2a-pilot-workbook-6864754244772568979
codex/gate3-authenticated-principal-boundary-20261030
codex/gate3-authored-draft-staging-20261030
codex/gate3-carry-forward-preview-20261023
codex/gate3-draft-staging-audit-20261030
codex/gate3-mapping-batch-freshness-20261030
codex/gate3-mapping-batch-review-20261030
codex/gate3-mapping-core
codex/gate3-mapping-coverage-20261023
codex/gate3-mapping-excel-20261023
codex/gate3-note-mapping-review-20261023
codex/gate3-signed-year-scope-20261030
codex/gate3-unapproved-proposal-storage-20261030
codex/payvast-mapping-discovery-20261023
codex/phase-2a-backend-foundation
codex/phase-2b-post-merge-record
codex/phase-2b-source-registration
codex/phase-2b-source-registration-12955190277775369594
codex/post-gate2a-control-reconciliation
codex/post-pr18-acceptance-record
codex/project-control-foundation
codex/t1-repo-hygiene-20261023
codex/t2-ci-hardening-20261023
codex/t3-explicit-migrations-20261023
codex/t6a-readonly-diagnostics-20261023
codex/v1-01-safety-gate-hardening
codex/v1-year-isolation-followup-20261023
codex/windows-native-pilot-shell-20261030
docs/aram-master-control-plan-20261111
docs/aram-roadmap-dashboard-20261030
docs/financial-statement-reconciliation-1402-1404-20261110
feat/gate3-governed-mapping-20261101
feat/gate3-package9-1-security-20261103
feat/gate3-package9-isolated-20261103
fix/password-unicode-validation-20261111
governance/aram-5-1-3-controls-20261030
governance/role-based-operating-model
jules-1168663913887856558-73b8a885
jules-gate-2b-mapping-workflow-foundation-4137724387867065330
phase-1b1-audit-report-7365389436990903239
phase-2a-backend-foundation-10237597358138521261
phase1b2-postmerge-metadata-fix
refactor/drg-parent-year-id-15088443704684163304
source-data-cleanup
| 1 | # ARAM — direct-method cash flow candidate (NOT OFFICIAL) |
| 2 | |
| 3 | ## Why this needs a different source |
| 4 | |
| 5 | An account-level trial balance only supplies opening balances and aggregate debit/credit turnover. **It does not tell us which cash transaction was operating, investing or financing.** Guessing cash-flow categories from account codes or names would produce a misleading report. |
| 6 | |
| 7 | The direct-method candidate therefore requires a separate, explicitly scoped transaction export made of paired cash/counterpart journal lines. It does not manufacture cash-flow categories from aggregate balances. |
| 8 | |
| 9 | ## Required inputs |
| 10 | |
| 11 | 1. A structurally valid Pilot XLSX containing the selected company's account balances and turnovers. |
| 12 | 2. A local JSON manifest with the same company, fiscal year, currency and unit. |
| 13 | 3. An explicit registry of all cash and cash-equivalent accounts in scope, each with evidence. |
| 14 | 4. A counterpart-account policy assigning each noncash counterpart account to `OPERATING`, `INVESTING` or `FINANCING`, with evidence. |
| 15 | 5. A transaction line for every paired cash posting. Each row contains company/year, unique line ID, voucher/transaction ID, posting date, cash account, counterpart account, cash debit/credit, counterpart debit/credit and evidence reference. |
| 16 | |
| 17 | Each transaction row represents **one cash posting paired to one counterpart posting**. If a voucher has several counterpart lines, split it into separately identified paired rows. The cash side must have exactly one nonzero debit or credit; the counterpart must equal the opposite side. All amounts are exact decimal strings. Every counterpart account must exist in the scoped Pilot account list. |
| 18 | |
| 19 | If the counterpart account is itself in the cash-account registry, the line is an internal cash transfer. Both cash accounts' turnovers are reconciled, and the transfer is excluded from operating/investing/financing totals. Both sides are included in the transparent internal-transfer totals. |
| 20 | |
| 21 | ## Arithmetic and reconciliation |
| 22 | |
| 23 | For every registered cash account, aggregate the cash-side and any cash-counterpart debit/credit from the transaction manifest and compare them exactly to the account's source turnovers: |
| 24 | |
| 25 | ```text |
| 26 | opening_cash + source_debits - source_credits = closing_cash |
| 27 | transaction_debits = source_debits |
| 28 | transaction_credits = source_credits |
| 29 | ``` |
| 30 | |
| 31 | For each external counterpart policy: |
| 32 | - Cash debit is an inflow. |
| 33 | - Cash credit is an outflow. |
| 34 | - The explicit counterpart policy supplies the activity category. |
| 35 | |
| 36 | Each counterpart account receives exactly one activity category in this version. If one counterpart account contains transactions from multiple cash-flow activities, this account-level policy is insufficient: split the source account into more granular subaccounts or add transaction-level approved classification evidence before using a candidate. The registry itself is user-supplied and is not independently authenticated. |
| 37 | |
| 38 | Then: |
| 39 | |
| 40 | ```text |
| 41 | operating_net = operating_inflows - operating_outflows |
| 42 | investing_net = investing_inflows - investing_outflows |
| 43 | financing_net = financing_inflows - financing_outflows |
| 44 | net_change = operating_net + investing_net + financing_net |
| 45 | opening_cash_and_equivalents + net_change = closing_cash_and_equivalents |
| 46 | ``` |
| 47 | |
| 48 | Cash account opening/closing values use the Pilot source's **debit-net signed** convention; no sign multiplier or account-name inference is applied. A source cash-account turnover mismatch, unmatched cash roll-forward, unclassified counterpart, orphan policy, invalid paired posting, or wrong company/year blocks analyst eligibility. |
| 49 | |
| 50 | The manifest's `posting_date` is shape-checked as `YYYY-MM-DD`, month 1–12 and day 1–31, with its year prefix equal to the selected source fiscal-year label. **No Gregorian/Jalali conversion or calendar-date validity proof is performed.** Finance owner must confirm the source date convention. |
| 51 | |
| 52 | ## Local CLI |
| 53 | |
| 54 | For synthetic or explicitly authorized local files: |
| 55 | |
| 56 | ```bash |
| 57 | cd backend |
| 58 | python -m aram_backend.cash_flow_direct_candidate_cli \ |
| 59 | --file ./synthetic_pilot.xlsx \ |
| 60 | --manifest ./synthetic_cash_transactions.json |
| 61 | ``` |
| 62 | |
| 63 | The manifest root contains `schema_version`, `company_code`, `fiscal_year`, `currency`, `unit`, `cash_accounts`, `counterpart_policies` and `transactions`. Every nested object is strict: unknown or duplicate keys fail closed. Cash manifest max size is 20 MiB; max 5,000 cash accounts, 20,000 counterpart policies and 30,000 transaction pairs. The CLI rejects symlink/nonregular/changed files and emits diagnostic JSON to stdout only. Exit 0 is analyst-preview eligibility only; exit 3 is a valid but blocked reconciliation; exit 2 is invalid/unsafe input. |
| 64 | |
| 65 | ## Non-approval and release blockers |
| 66 | |
| 67 | The candidate always marks `cash_account_scope_owner_approved=false`, `transaction_ledger_completeness_verified=false`, `accounting_policy_authorized=false`, `official_financial_statement=false`, `independently_reviewed=false`, `export_authorized=false`, `releasable=false`. Even an eligible preview does not prove that the registry includes every cash equivalent or that the transaction export is complete/authentic. |
| 68 | |
| 69 | Before any official use: |
| 70 | - Confirm completeness of all cash/bank/cash-equivalent accounts and their approved accounting scope. |
| 71 | - Reconcile every paired transaction line to source voucher IDs and immutable source evidence. |
| 72 | - Confirm classification of every counterpart account with the financial owner. |
| 73 | - Review bank overdrafts, restricted cash, foreign currency, noncash transactions, leases, taxes and other applicable cash-flow policy. |
| 74 | - Cross-check closing cash to the balance sheet and net income/working-capital effects to the income statement. |
| 75 | - Obtain authenticated finance-owner signoff and three genuinely independent C1/C2/C3 approvals. |
| 76 | - Build immutable official export and Windows UI only after accounting and security gates pass. |
| 77 | |
| 78 | No real company ledger, bank statement, source export, database, migration, secret or release artifact is included in this public repository. Use synthetic fixtures in the tests. |