Mirrored from https://github.com/davoodmehraban89/Aram.git
Synced Dec 3, 19:30 UTC
docs(statements): define equity changes candidate semantics and accounting acceptance blockers
davoodmehraban89 committed
Oct 31, 2026 at 08:15 UTC
0e1ef30792e21416fab462f8975a86bf8093a55a
1 file changed
+63
docs/EQUITY_CHANGES_CANDIDATE.md
new
+63
@@ -0,0 +1,63 @@
1
+# ARAM — statement of changes in equity candidate (NOT OFFICIAL)
2
+
3
+## Purpose and boundary
4
+
5
+This module builds a **read-only, unsigned equity movement preview** from an authorized Pilot XLSX snapshot, explicit note-closing references and a user-supplied note-level presentation policy. It is not a statutory statement, audited report, accounting approval, posting, or export.
6
+
7
+Each mapped `EQ` note requires one policy containing:
8
+- An equity component (`SHARE_CAPITAL`, `SHARE_PREMIUM`, `RETAINED_EARNINGS`, `REVALUATION_SURPLUS`, `OTHER_RESERVES`, `NONCONTROLLING_INTEREST`, `OTHER_EQUITY`).
9
+- A movement class (`CAPITAL_CONTRIBUTION`, `NET_PROFIT_LOSS`, `DIVIDENDS`, `OTHER_COMPREHENSIVE_INCOME`, `TRANSFER`, `PRIOR_PERIOD_ADJUSTMENT`, `OTHER_MOVEMENT`).
10
+- An explicit debit-net sign multiplier (+1/-1), line label and policy evidence reference.
11
+
12
+No account-code, account-name, or presumed debit/credit sign is inferred. All mapped statements must still pass the upstream note reconciliation; missing or ambiguous mappings block the candidate.
13
+
14
+## Arithmetic
15
+
16
+Under the **explicit source assumption** that opening/closing balances are debit-net signed and debit/credit are nonnegative period turnovers:
17
+
18
+```text
19
+source_movement = debit_turnover - credit_turnover
20
+source_opening + source_movement = source_closing
21
+
22
+presentation_opening = source_opening * sign_multiplier
23
+presentation_movement = source_movement * sign_multiplier
24
+presentation_closing = source_closing * sign_multiplier
25
+
26
+opening_equity + total_movements = closing_equity
27
+```
28
+
29
+All arithmetic is exact Decimal; source rows, account identifiers, note references and policy evidence are retained. The module rejects per-account roll-forward errors, negative turnover, missing note controls, missing/extra policies and wrong company/year.
30
+
31
+**Important granularity constraint:** one policy classifies *all* turnover mapped to one note/subnote as one movement category. If the same account/note contains several transaction types (for example, current-year profit and dividends), split the mappings into separately controlled subnotes or do not use this preview. A single account's debit/credit turnover does not itself prove that a movement is a dividend, profit, contribution or other equity transaction.
32
+
33
+The category `NET_PROFIT_LOSS` is a user-supplied classification and is **not yet automatically cross-checked against the income-statement net result**. No cash-flow, tax, other comprehensive income or statutory disclosure is inferred. Comparative periods, ownership changes, non-controlling interests, retrospective adjustments and transfers require separate accounting policy design.
34
+
35
+The candidate always marks `official_financial_statement=false`, `accounting_policy_authorized=false`, `source_ledger_completeness_verified=false`, `independently_reviewed=false`, `export_authorized=false`, `releasable=false`. Even `eligible_for_analyst_review=true` means only that this limited arithmetic and supplied control data passed.
36
+
37
+## Local-only CLI
38
+
39
+For synthetic or explicitly authorized local files:
40
+
41
+```bash
42
+cd backend
43
+python -m aram_backend.equity_changes_candidate_cli \
44
+ --file ./synthetic_pilot.xlsx \
45
+ --references ./synthetic_note_controls.json \
46
+ --policies ./synthetic_equity_policies.json
47
+```
48
+
49
+Policy JSON root: `schema_version`, `company_code`, `fiscal_year`, `policies`. Each policy has `statement_section`, `note_number`, `subnote_code`, `equity_component`, `movement_category`, `sign_multiplier`, `line_label`, `policy_evidence_ref`. The reference JSON uses the strict note-reconciliation schema.
50
+
51
+Exit 0: limited analyst preview only. Exit 3: blocking accounting/reconciliation findings. Exit 2: invalid or unsafe input. The CLI reads local files and emits diagnostic JSON to stdout only; it creates no workbook, PDF, database write or posting.
52
+
53
+## Acceptance blockers
54
+
55
+- Confirm actual ledger sign and turnover semantics against the source system and approved trial balance.
56
+- Confirm ledger completeness and independently validate every account-to-note mapping.
57
+- Split mixed transaction types to independently controlled subnotes.
58
+- Cross-check profit/loss movements against the income statement and closing equity against the balance sheet.
59
+- Implement authenticated financial-owner approval, three independent C1/C2/C3 reviews, immutable snapshots and official reporting controls.
60
+- Add cash flow statement and the full cross-statement validation layer before release.
61
+- Do not put real company financial data in public GitHub.
62
+
63
+Run `cd backend && pytest -q tests/test_equity_changes_candidate.py tests/test_equity_changes_candidate_cli.py`, full backend CI, reversible migration check and compileall. The upstream PR #60–#64 chain is still draft/unmerged.