@davoodmehraban89 / Aram-2 Mirror · read-only / commits / b9b8633
Fork 0

Mirrored from https://github.com/davoodmehraban89/Aram.git

Synced Dec 4, 04:15 UTC

B0: booklet reference + lightweight-process reconciliation

- docs/booklet/BOOKLET_v1.0.md + MANIFEST.json (original PDF SHA-256 anchor; ADR-025) - PROJECT_STATUS.md rewritten to GitHub reality (Phases 0-9 MERGED @46253c9, 319 tests, post-merge CI; stale V1-01/unmerged rows removed; D-08 closed) - 14 root analytical docs git mv -> docs/archive/ (+ index); no new root analytical doc (booklet §0.5) - AGENTS.md <-> §0.5 conflict resolved: handoff cadence per-category, lightweight-process bullets (ADR-026) - docs/discrepancies.json skeleton {row,our_amount,official_amount,cause,evidence,year} (OD-08; B8 populates) - docs/PROJECT_LOG.md + LATEST_HANDOFF.md refreshed (end-of-category) - data/ + samples/ tree hashes unchanged (docs/process only) Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>

davoodmehraban89 committed Dec 3, 2026 at 15:48 UTC b9b86336a1902f9a0be05952a528350cc92483ae
24 files changed +909 -192
AGENTS.md
+3 -2
@@ -38,11 +38,12 @@ Never treat a local file, task summary, or agent report as proof that a branch,
38 Every meaningful PR must:
39
40 - update `PROJECT_STATUS.md` when current state changes;
41 -- append a complete entry to `docs/PROJECT_LOG.md`;
41 +- append a short entry to `docs/PROJECT_LOG.md` (lightweight process, booklet §0.5: code and tests grow, not documentation);
42 +- create no new root-level analytical document; historical root analytical docs live in `docs/archive/` (booklet §0.5; see ADR-026);
43 - add a new ADR instead of silently rewriting an accepted decision;
44 - satisfy `docs/ACCEPTANCE_POLICY.md`;
45 - use `.github/pull_request_template.md`;
45 -- update `docs/handoff/LATEST_HANDOFF.md` after every meaningful completed or rejected step so a successor can resume without chat history;
46 +- update `docs/handoff/LATEST_HANDOFF.md` at the end of each B-category (B0…B12), and on any governance change, so a successor can resume without chat history — not after every commit/step (booklet §0.5 lightweight process; see ADR-026);
47 - keep `docs/handoff/MASTER_RECOVERY_PROMPT.md` stable unless the governance process itself changes;
48 - keep `docs/handoff/CHATGPT_BOOTSTRAP_PROMPT.txt` as the saveable entry point for a successor chat.
49
PROJECT_STATUS.md
+63 -114
@@ -5,154 +5,103 @@
5 ## Repository baseline
6
7 - Repository: [davoodmehraban89/Aram](https://github.com/davoodmehraban89/Aram)
8 -- Accepted branch: source-data-cleanup
9 -- Recorded accepted control event: [PR #18](https://github.com/davoodmehraban89/Aram/pull/18), reviewed head `fcbeb7387218e9ab294318ae462ed59de717fc95`, squash merge [f213d321ff4cd7d3d6fa65ba78dc48f090ee846b](https://github.com/davoodmehraban89/Aram/commit/f213d321ff4cd7d3d6fa65ba78dc48f090ee846b)
10 -- Durable post-merge acceptance record: [PR #19](https://github.com/davoodmehraban89/Aram/pull/19), reviewed head `b9059592409606a0a4f11a71c30778cff158b6b6`, squash merge [77f9f595ccfe67a87b11024ff0f6143629dba438](https://github.com/davoodmehraban89/Aram/commit/77f9f595ccfe67a87b11024ff0f6143629dba438)
11 -- Before starting new work, fetch the live `source-data-cleanup` head; this record intentionally avoids a self-referential current-head claim
8 +- Accepted branch: `source-data-cleanup`
9 +- **Live accepted head: `46253c94405abd065dfc5e8cf080b295cb83cde4`** — squash merge of [PR #96](https://github.com/davoodmehraban89/Aram/pull/96), merged 2026-12-03T15:22:02Z (owner final acceptance).
10 +- **Release tag `v1.0.0`** points to `46253c94405abd065dfc5e8cf080b295cb83cde4` (owner-authorized, created pre-mission). The implementation author does not tag (§19); no further tagging without owner directive.
11 +- Post-merge CI on the accepted head: [Backend CI #47137691800](https://github.com/davoodmehraban89/Aram/actions/runs/47137691800) ✅ and [Frontend CI #47137691857](https://github.com/davoodmehraban89/Aram/actions/runs/47137691857) ✅.
12 - Product objective: a controlled, auditable accounting and financial-statement workflow that preserves canonical source data.
13 +- Authoritative work order: «کتابچهٔ اجرایی تکمیل Aram» v1.0 — version-controlled at [`docs/booklet/BOOKLET_v1.0.md`](docs/booklet/BOOKLET_v1.0.md), integrity anchored by SHA-256 in [`docs/booklet/MANIFEST.json`](docs/booklet/MANIFEST.json) (ADR-025).
14
15 ## Status vocabulary
16
17 | State | Meaning |
18 |---|---|
19 | VERIFIED_AND_MERGED | Present on the accepted branch with Git evidence. |
19 -| VERIFIED_BUT_UNMERGED | Present in a remote commit or PR, but not accepted. |
20 -| PRESENT_BUT_UNVERIFIED | Present, but required tests or evidence are missing. |
21 -| CLAIMED_BUT_NOT_PROVEN | Reported by an actor, with no sufficient GitHub evidence. |
22 -| NOT_IMPLEMENTED | Required capability is absent. |
20 | IN_PROGRESS | Work is in an open PR and is not accepted. |
21 +| NOT_IMPLEMENTED | Required capability is absent. |
22 | BLOCKED | Work cannot proceed until the recorded blocker is resolved. |
23
26 -## Verified state
24 +## Accepted state — booklet Phases 0–9 (all MERGED via PR #96)
25
28 -| Area | State | Evidence / note |
29 -|---|---|---|
30 -| Phase 1B-1 source inventory | VERIFIED_AND_MERGED | [PR #1](https://github.com/davoodmehraban89/Aram/pull/1) |
31 -| Phase 1B-2 audit corrections | VERIFIED_AND_MERGED | [PR #4](https://github.com/davoodmehraban89/Aram/pull/4) |
32 -| Phase 2A backend foundation | VERIFIED_AND_MERGED | [PR #6](https://github.com/davoodmehraban89/Aram/pull/6) |
33 -| One-file model refactor | VERIFIED_AND_MERGED | [PR #8](https://github.com/davoodmehraban89/Aram/pull/8) |
34 -| Project-control foundation | VERIFIED_AND_MERGED | [PR #10](https://github.com/davoodmehraban89/Aram/pull/10) |
35 -| Phase 2B ingestion foundation | VERIFIED_AND_MERGED | [PR #12](https://github.com/davoodmehraban89/Aram/pull/12), squash merge 7b5bd79b760d534dad34b3162f770e838616ebe9 |
36 -| Phase 2B control reconciliation | VERIFIED_AND_MERGED | [PR #13](https://github.com/davoodmehraban89/Aram/pull/13), squash merge 7c7533ee87146dc8fc78b46ebf423be55532c7eb |
37 -| Gate 2A Pilot workbook contract/preflight | VERIFIED_AND_MERGED | [PR #15](https://github.com/davoodmehraban89/Aram/pull/15), reviewed head 74b6a6397a2a2c9199a5c7bcf818bb661b2ebe06, squash merge 4ab54f4a3cf666827fa1ed30c4e43259ea79f2d4, [Backend CI #24](https://github.com/davoodmehraban89/Aram/actions/runs/32712900800) |
38 -| V1-01 safety-gate hardening | IN_PROGRESS | Draft [PR #21](https://github.com/davoodmehraban89/Aram/pull/21) from exact base `b1ddee87d31ee73b3a5aeac8f9953d0a604c206a`; independently reviewed implementation head `700d800dbd9c657f6bd510faafedcbde4847fafd`; CI-verified stabilized candidate `b3dc8b3a18934ffe63f615e4f650248be21a5f9c`; [Backend CI #39](https://github.com/davoodmehraban89/Aram/actions/runs/33015277194) succeeded with 67 tests, migration round-trip, and compile after broadening one reparent-rejection assertion to accept either valid protection message; code, scope, and protected-data boundary remain unchanged; final independent acceptance is pending this durable-document reconciliation |
39 -| Post-Gate-2A control reconciliation | VERIFIED_AND_MERGED | [PR #18](https://github.com/davoodmehraban89/Aram/pull/18), reviewed head `fcbeb7387218e9ab294318ae462ed59de717fc95`, squash merge `f213d321ff4cd7d3d6fa65ba78dc48f090ee846b`; documentation only |
40 -| Durable post-merge acceptance record | VERIFIED_AND_MERGED | [PR #19](https://github.com/davoodmehraban89/Aram/pull/19), reviewed head `b9059592409606a0a4f11a71c30778cff158b6b6`, squash merge `77f9f595ccfe67a87b11024ff0f6143629dba438`; documentation only |
41 -| Role-based project operating model | VERIFIED_AND_MERGED | Permanent responsibilities and current assignments are defined in `docs/handoff/MASTER_RECOVERY_PROMPT.md` and ADR-011; introduced through [PR #20](https://github.com/davoodmehraban89/Aram/pull/20) |
42 -| Parallel V1 prototype | VERIFIED_BUT_UNMERGED | Closed, unmerged [PR #7](https://github.com/davoodmehraban89/Aram/pull/7); reference/recovery source only |
43 -| Superseded Phase 2B candidate | VERIFIED_BUT_UNMERGED | Closed, unmerged [PR #9](https://github.com/davoodmehraban89/Aram/pull/9) |
44 -| Duplicate Gate 2A candidate | VERIFIED_BUT_UNMERGED | [PR #16](https://github.com/davoodmehraban89/Aram/pull/16) closed without merge on 2026-08-25; no content accepted |
45 -| Gate 2B Mapping foundation candidate | VERIFIED_BUT_UNMERGED | [PR #17](https://github.com/davoodmehraban89/Aram/pull/17) closed without merge on 2026-08-25; stale-base reference only; no content accepted |
46 -| Official V1 release | NOT_IMPLEMENTED | No accepted tag, release, retained release artifact, ZIP, or EXE |
47 -| Comprehensive Mapping Excel import/export | NOT_IMPLEMENTED | Mandatory before V1 acceptance |
48 -| Unknown-account queue and mapping carry-forward | NOT_IMPLEMENTED | Mandatory before V1 acceptance |
49 -| Note and sub-note mapping workflow/UI | NOT_IMPLEMENTED | Mandatory before V1 acceptance |
50 -| Minimal Pilot application and reviewable output | NOT_IMPLEMENTED | Required before packaging |
51 -| Reproducible Windows package and clean-environment test | NOT_IMPLEMENTED | Required before V1 acceptance |
52 -
53 -## Accepted product capabilities
54 -
55 -- Read-only source inventory and workbook audit evidence.
56 -- Persistent backend/data-model foundation with fiscal-year mutation controls.
57 -- Metadata-only source registration, structural XLSX inspection, and typed in-memory ledger parsing.
58 -- Governed Pilot workbook v0.1 contract, reproducible blank template generator, and deterministic read-only preflight.
59 -- Approved Pilot template path: samples/Aram_Pilot_Input_and_Mapping_Template_v0.1.xlsx.
60 -- Independently verified template SHA-256: e14a7feb80a216d79ed9cb6dde2b0df3e55317f3da6b26efc77f7118f4702b6f.
61 -
62 -The accepted branch does not include PR #7 desktop/release work, PR #16 alternate Pilot implementation, or PR #17 Mapping implementation. Green CI on an unmerged stale-base PR is not acceptance evidence.
63 -
64 -## Current risks and blockers
65 -
66 -- The accepted branch is not protected by GitHub branch protection.
67 -- The accepted branch still permits direct identity mutation/deletion of approved or locked fiscal years and parent-company deletion; the V1-01 candidate fixes this but is not accepted yet.
68 -- The accepted Pilot preflight can still accept targetless or structurally invalid mappings and can ignore a declared closing-delta mismatch; the V1-01 candidate fixes this but is not accepted yet.
69 -- The accepted root `index.html` is still a disconnected hard-coded prototype; the V1-01 candidate replaces it with an explicit quarantine page.
70 -- PR #17 was closed without merge; its stale-base 12-file diff is reference material only, and its narrative listed only 9 files.
71 -- PR #17 CI was green on its own stale head, but compatibility with accepted Gate 2A was never proven.
72 -- Binary execution, release provenance, and clean Windows verification do not exist.
73 -- Mapping, notes/sub-notes, Pilot UI, and end-to-end user acceptance remain incomplete.
74 -
75 -## Next approved action
76 -
77 -1. Publish this two-file durable-document reconciliation on Draft PR #21; [Backend CI #39](https://github.com/davoodmehraban89/Aram/actions/runs/33015277194) succeeded on stabilized candidate `b3dc8b3a18934ffe63f615e4f650248be21a5f9c` with 67 tests, migration round-trip, and compile.
78 -2. The independent reviewer re-fetches the resulting documentation-only head, confirms that its comparison with `b3dc8b3a18934ffe63f615e4f650248be21a5f9c` changes only `PROJECT_STATUS.md` and `docs/handoff/LATEST_HANDOFF.md`, verifies the final workflow result, then marks the PR ready and squash-merges it.
79 -3. Only after V1-01 is accepted, start the first focused Gate 3 Mapping import/persistence task from the new accepted head.
80 -
81 -## Booklet v1.0 — Phase 0 (execution work order)
82 -
83 -Authoritative work order: «کتابچهٔ اجرایی تکمیل Aram» v1.0 (base head `7dc864fd032f0c4ae4d650d89304a01286a6d914`, PR #21 merge). Branch `arena/094f314c-aram`. Per §17 the agent resolves ambiguities by default + real-data proof + ADR and never queries the owner; the owner's sole role is Phase-9 final acceptance.
84 -
85 -| Debt | State | Evidence |
26 +All Phase 0–9 work below is **VERIFIED_AND_MERGED** on `source-data-cleanup` at head `46253c9` (squash of PR #96). Evidence is the merged head plus post-merge CI; per-commit references are the pre-squash implementation history on `arena/094f314c-aram`.
27 +
28 +| Phase / capability | State | Evidence |
29 |---|---|---|
87 -| D-01 LedgerBalance model | VERIFIED_BUT_UNMERGED | commit `a3c330b`; exact-rial round-trip + aggregation tests |
88 -| D-02 controls in preflight | VERIFIED_BUT_UNMERGED | commit `8f2f902`; C-01..C-04 preflight tests |
89 -| D-03 Rial money column | VERIFIED_BUT_UNMERGED | commit `a3c330b`; BIGINT storage >2^53 via ORM; ADR-012 |
90 -| D-04 numeric code normalization | VERIFIED_BUT_UNMERGED | commit `ac565e9`; integral-numeric exact, leading zeros preserved |
91 -| D-05 Persian header matching | VERIFIED_BUT_UNMERGED | commit `ac565e9`; normalize_fa header matching |
92 -| D-06 source bytes + CSV | VERIFIED_BUT_UNMERGED | commit `a661423`; content-addressed store + CSV encodings/delimiters |
93 -| D-07 immutability + audit + reopen | VERIFIED_BUT_UNMERGED | commit `00ca58e`; raw-SQL locked-year guards, hash chain, ADR-016 |
94 -| D-08 status/log refresh | IN_PROGRESS | this entry |
95 -| D-09 git-history rewrite | BLOCKED | owner-only; requires explicit owner approval (§19) |
96 -| D-10 hierarchy mapping | VERIFIED_BUT_UNMERGED | commit `ac565e9`; ADR-014 (general=kol, subsidiary=حساب) |
97 -| D-11 inspection guards | VERIFIED_BUT_UNMERGED | commit `ac565e9`; max_column None guard |
98 -| D-12 CI quality gates | VERIFIED_BUT_UNMERGED | commit `8412c56`; ruff/mypy/coverage/pip-audit/PG matrix; ADR-017 |
30 +| Phase 0 debts D-01..D-07, D-10..D-12 (LedgerBalance, controls C-01..04, rial money, code/header normalization, source store, immutability+audit+reopen, hierarchy, inspection guards, CI gates) | VERIFIED_AND_MERGED | head `46253c9`; ADR-012/013/014/016/017 |
31 +| Phase 1 statements + drill-down | VERIFIED_AND_MERGED | head `46253c9`; ADR-018 |
32 +| Phase 2 mapping import/export | VERIFIED_AND_MERGED | head `46253c9`; ADR-019 |
33 +| Phase 3 note formula engine (AST, no eval) | VERIFIED_AND_MERGED | head `46253c9`; ADR-020 |
34 +| Phase 4 golden comparison (1403+1404) | VERIFIED_AND_MERGED | head `46253c9`; ADR-021 |
35 +| Phase 5 RTL React workbench + Playwright | VERIFIED_AND_MERGED | head `46253c9`; Frontend CI #47137691857 |
36 +| Phase 6 reviewable outputs (XLSX+JSON, exact rial + lineage) | VERIFIED_AND_MERGED | head `46253c9`; ADR-022 |
37 +| Phase 7 users/audit/reopen/backup (roles, PBKDF2, migration 07) | VERIFIED_AND_MERGED | head `46253c9`; ADR-023 |
38 +| Phase 8 offline desktop packaging (loopback entrypoint + PyInstaller recipe) | VERIFIED_AND_MERGED | head `46253c9`; ADR-024; no binary committed (§19) |
39 +| Phase 9 UAT + release prep (`scripts/uat_real_data.py`) | VERIFIED_AND_MERGED | head `46253c9`; UAT evidence below |
40 +| Review fixes: approve role gate, note/mapping edit/delete endpoints, NotesManager UI, python-multipart ADR | VERIFIED_AND_MERGED | head `46253c9`; `docs/reviews/BOOKLET_COMPLIANCE_REVIEW.md` |
41 +| D-08 status/log refresh | VERIFIED_AND_MERGED (this B0 PR) | this entry |
42 +| D-09 git-history rewrite | BLOCKED | owner-only; requires explicit owner directive (§19); tracked in B12 |
43 +
44 +**Test/quality evidence at the accepted head:** backend **319 tests passed** (full local suite); Backend CI #47137691800 green (SQLite + PostgreSQL migration round-trips, ruff, mypy domain-strict + services, coverage, pip-audit); Frontend CI #47137691857 green (eslint, tsc, vitest, build, Playwright). No canonical `data/` or `samples/` file changed.
45
100 -Phase-0 local evidence: 201 tests passed; ruff clean; mypy domain strict clean; coverage total 92% / domain 97%; pip-audit no known vulnerabilities; SQLite migration up/down/up clean. PostgreSQL migration path is exercised by the CI matrix (no local PG). Real-data evidence (source_1404.xlsx, 252,898 rows): debit-positive C-01 holds 252,892/252,898; Σdebit=Σcredit=10,823,163,409,740,108; OD-01 refuted (T1..T4 concat ≠ حساب), ADR-014 adopted. No canonical `data/` or `samples/` file changed.
46 +### Historical control events (reference)
47
102 -ADRs added: 012 (money scale/rounding), 013 (sign contract), 014 (T1..T4 hierarchy), 016 (reopen/immutability), 017 (CI gates/tooling).
48 +Earlier accepted control events remain part of history: PR #1/#4/#6/#8/#10/#12/#13/#15/#18/#19/#20/#21 (see `docs/PROJECT_LOG.md`). Closed-unmerged candidates PR #7/#9/#16/#17 were never accepted and are reference only. The stale "V1-01 IN_PROGRESS" and "VERIFIED_BUT_UNMERGED" phase rows from prior snapshots are superseded: that work is now merged in PR #96.
49
104 -## Booklet v1.0 — Phases 1–4 + owner priority fixes (execution work order)
50 +## Active mission — booklet-compliance remediation B0…B12
51
106 -Continuation on branch `arena/094f314c-aram` (base `7dc864fd`). Per §17 the agent resolves by default + real-data proof + ADR and never queries the owner.
52 +One focused PR per category, strictly sequential (next only after prior acceptance). Executor only; independent reviewer separate; no "done" without evidence (§19). Ambiguities closed via §17 (default + proof + ADR), never by querying the owner. `data/` + `samples/` read-only with before/after tree-hash evidence per PR.
53
108 -| Phase / item | State | Evidence |
54 +| Category | Scope (summary) | State |
55 |---|---|---|
110 -| Phase 1 statements + drill-down | VERIFIED_BUT_UNMERGED | commit `9c33586`; build_statements BS/IS, drill_down source{filename,file_hash,sheet,row} |
111 -| Phase 2 mapping import/export | VERIFIED_BUT_UNMERGED | commit `cfbd879`; mapping_io Mappings sheet, fail-closed, idempotent |
112 -| Phase 3 note formula engine | VERIFIED_BUT_UNMERGED | commit `9fba3c6`; AST formula (no eval), acct/row/note/sum/abs, cycle detection |
113 -| Phase 4 golden comparison | VERIFIED_BUT_UNMERGED | commit `225a38c`; golden.py header-name columns; 1403+1404 real-data tests pass |
114 -| Fix 1 money/P-02 (ADR-012) | VERIFIED_BUT_UNMERGED | commit `a00b0dc`; 457,074 rows, 0 fractional rial; 7 guard tests |
115 -| Fix 2 raw-row drill-down (D3/P-01) | VERIFIED_BUT_UNMERGED | commit `f7c3b4a`; one LedgerBalance per source row; ledger_aggregate service; migration 20261203_05 round-trip |
116 -| Fix 3 approval gate (D5/C-03) | VERIFIED_BUT_UNMERGED | commit `1844a62`; evaluate_controls explicit; hard ERROR gate; 13 tests |
117 -| Fix 4 tests + CI (D-12/§14) | VERIFIED_BUT_UNMERGED | commits `225a38c`,`be08192`; mypy services gate; frontend eslint/tsc/vitest/Playwright |
118 -| Phase 5 UI + Playwright | VERIFIED_BUT_UNMERGED | commits `fa64baf`,`77fbe70`; RTL workbench (setup/import/mapping/statements/drill-down/approval/admin); eslint/tsc/vitest/build + Playwright gates |
119 -| Phase 6 reviewable outputs | VERIFIED_BUT_UNMERGED | commit `c4c37c0`; statement_export XLSX+JSON with exact rial + lineage; ADR-022 |
120 -| Phase 7 users/audit/reopen/backup | VERIFIED_BUT_UNMERGED | commit `e20572d`; roles+PBKDF2, controlled reopen/lock, verifiable backup; migration 20261203_07; ADR-023 |
121 -| Phase 8 desktop packaging | VERIFIED_BUT_UNMERGED | commit `ffc9888`; desktop entrypoint (127.0.0.1) + PyInstaller recipe; ADR-024; no binary committed (§19) |
122 -| Phase 9 UAT + release prep | VERIFIED_BUT_UNMERGED | `scripts/uat_real_data.py`; real-1404 UAT evidence below; tag v1.0.0 is the owner's post-acceptance action |
123 -
124 -Local evidence at head `dafb559`: backend **308 tests passed**; ruff clean; mypy domain strict + services clean; frontend lint/tsc/vitest/build pass; Playwright smoke + workflow specs valid. Migrations 20261203_05/06/07 up/down/up verified (SQLite). No canonical `data/` or `samples/` file changed.
125 -
126 -### Phase 9 UAT evidence (real source_1404.xlsx, read-only)
56 +| B0 | Booklet version-controlled + manifest; status/log refresh; root analytical docs → `docs/archive/`; AGENTS.md ↔ §0.5 alignment (ADR-026); `docs/discrepancies.json` skeleton | IN_PROGRESS (this PR) |
57 +| B1 | Security fail-closed: pilot API auth+role+audit; login lockout; PBKDF2→Argon2id; no amounts/account names in logs | NOT_IMPLEMENTED |
58 +| B2 | Money/Persian UI: exact-rial formatting, bundled Vazirmatn, negatives/digits/dir, dark/light, Jalali in domain | NOT_IMPLEMENTED |
59 +| B3 | Controls C-05..C-15 wired into run_controls + approval gate; ERROR year unapprovable | NOT_IMPLEMENTED |
60 +| B4 | Data model: ImportRun/CalculationRun/LineageEdge/Adjustment/UnknownAccountQueue/carried_from_year_id/calculation_run_id; migration round-trip | NOT_IMPLEMENTED |
61 +| B5 | Import hardening: formula-cache error, idempotency, perf, destructive tests | NOT_IMPLEMENTED |
62 +| B6 | Mapping studio: suggestions, bulk preview, split validation, Excel diff, carry-forward | NOT_IMPLEMENTED |
63 +| B7 | Outputs: reportlab PDF (Vazirmatn, watermark), XLSX controls sheet, real-number cells, official-from-approved-run | NOT_IMPLEMENTED |
64 +| B8 | Golden 1403 + registry; C-05 automatic; every official difference recorded in `docs/discrepancies.json` | NOT_IMPLEMENTED |
65 +| B9 | CI gates: npm audit, coverage 80/90, mypy --strict services, ruff format, windows build+smoke, OpenAPI contract | NOT_IMPLEMENTED |
66 +| B10 | Encrypted backup (AES-GCM + Argon2 KDF); CI full-restore test | NOT_IMPLEMENTED |
67 +| B11 | Drift/target layout: Pyodide layer out of scope, pilot-pages workflow, single reference UI, api/ + packaging/windows/ | NOT_IMPLEMENTED |
68 +| B12 | Large files: `docs/data_manifest.json` SHA-256 + LFS/external plan; history rewrite BLOCKED absent owner directive | NOT_IMPLEMENTED |
69 +
70 +## Phase 9 UAT evidence (real source_1404.xlsx, read-only)
71
72 `python scripts/uat_real_data.py --year 1404` on a fresh local DB:
73 - Import: **131,280 raw rows** preserved (4 anomalous rows skipped + reported).
74 - Auto-mapping from embedded note numbers: 22 notes, 244 mappings.
75 - Build: BS/IS/CF/EQ persisted; 1 unmapped ordinary account surfaced.
132 -- Golden reconciliation: core balance-sheet notes match official **rial-for-rial**
133 - (÷10⁶ half-up): 10→673,740,637 · 11→242,194 · 12-1→13,386,398 · 12-2→8,310,168 ·
134 - 13→6,839,535 · 14→11,273,650 · 15→19,951,136 (plus zero notes 17-1/17-2). Remaining
135 - BS/IS differences are surfaced as discrepancies (OD-08), never silently corrected.
136 -- Approval gate: correctly **blocks** on real-data control failures (C-01/C-03/C-04) —
137 - fail-loud, no bypass.
76 +- Golden reconciliation: core balance-sheet notes match official **rial-for-rial** (÷10⁶ half-up): 10→673,740,637 · 11→242,194 · 12-1→13,386,398 · 12-2→8,310,168 · 13→6,839,535 · 14→11,273,650 · 15→19,951,136 (plus zero notes 17-1/17-2). Remaining BS/IS differences are surfaced as discrepancies (OD-08), never silently corrected; B8 records them one-by-one in `docs/discrepancies.json`.
77 +- Approval gate: correctly **blocks** on real-data control failures (C-01/C-03/C-04) — fail-loud, no bypass.
78 - Export: XLSX (6.27 MB) + JSON with **158,050 lineage rows** (file/SHA-256/sheet/row).
79 - Backup: created + verified (hashes + audit chain); audit chain valid.
80
141 -ADRs added in this stretch: 021 (golden scale/columns), 022 (outputs), 023 (users/reopen/backup), 024 (desktop packaging).
81 +## Known gaps feeding the B-categories (honest residual risks)
82 +
83 +- `pilot_api.py` exposes 17 unauthenticated routes (B1).
84 +- `frontend/src/lib/format.ts` uses `Number(value)` (float risk) (B2).
85 +- Only controls C-01..C-04 implemented; C-05..C-15 absent (B3).
86 +- ImportRun/CalculationRun/LineageEdge/Adjustment/UnknownAccountQueue/carried_from_year_id/calculation_run_id refs absent (B4).
87 +- `note_engine.acct()` is closing-only; statement_balance-only rows evaluate 0 in notes (B4/B8).
88 +- CI: `npm ci --no-audit`, coverage gate not 80/90, services mypy non-strict (B9).
89 +- Backup unencrypted (B10).
90 +- Pyodide drift (`docs/py` vs `backend/src`), 3 parallel UIs, vendored wheels (B11).
91 +- Windows EXE not built; clean-machine install log + §14 UAT signature pending (Phase 9 release checklist, owner).
92
143 -### Release procedure (owner, after independent review)
93 +## Release procedure (owner)
94
145 -The implementation author does **not** merge or tag (§19). After independent GitHub
146 -review approves PR #96 and it is merged into `source-data-cleanup`, the owner creates
147 -the release tag `v1.0.0` on the accepted head and builds the Windows package from
148 -`packaging/build_desktop.py` (artifact retained in the release, not committed).
95 +The implementation author does **not** merge or tag (§19). Tag `v1.0.0` already exists on `46253c9` (owner-authorized pre-mission). After B0…B11 acceptance, prepare the Phase 9 release checklist here (owner tags, retained artifact, clean-machine install log, §14 UAT signature); do not tag. B12 history rewrite stays BLOCKED absent an explicit owner directive.
96
97 ## Control documents
98
99 - [Project log](docs/PROJECT_LOG.md)
100 - [Decision log](docs/DECISION_LOG.md)
101 - [Acceptance policy](docs/ACCEPTANCE_POLICY.md)
155 -- [Jules task template](docs/JULES_TASK_TEMPLATE.md)
102 +- [Booklet v1.0 (reference)](docs/booklet/BOOKLET_v1.0.md) · [manifest](docs/booklet/MANIFEST.json)
103 +- [Discrepancy registry (skeleton)](docs/discrepancies.json)
104 +- [Archived analytical documents](docs/archive/README.md)
105 - [Master recovery prompt](docs/handoff/MASTER_RECOVERY_PROMPT.md)
106 - [Latest handoff snapshot](docs/handoff/LATEST_HANDOFF.md)
107 - [Saveable ChatGPT bootstrap prompt](docs/handoff/CHATGPT_BOOTSTRAP_PROMPT.txt)
docs/PROJECT_LOG.md
+25
@@ -354,3 +354,28 @@ Each new entry must record: UTC timestamp, actor, task/phase, base branch and SH
354 - Acceptance: IN_PROGRESS; author does not merge or tag
355 - Reviewer: independent reviewer pending
356 - Next action: independent GitHub review of PR #96; owner acceptance, merge, tag v1.0.0, build Windows package
357 +
358 +### 2026-12-03T15:22:02Z — PR #96 merged + tag v1.0.0 (owner acceptance)
359 +
360 +- Actor: owner (final acceptance via one-time waiver of independent review); Arena agent executed merge+tag under that authorization only
361 +- PR #96 MERGED (squash) into `source-data-cleanup` -> head `46253c94405abd065dfc5e8cf080b295cb83cde4`
362 +- Tag `v1.0.0` created on `46253c9` (remote tag object `a17da671ce1fef2415ce56ebec87b69da6ebb603`)
363 +- Post-merge CI: Backend #47137691800 ✅, Frontend #47137691857 ✅ (both on `46253c9`)
364 +- Transfer verified: `git diff --exit-code` working tree vs `origin/source-data-cleanup` = 0 (199 files identical)
365 +- New mission B0…B12 reinstates no-merge/no-tag for the implementation author
366 +
367 +### 2026-12-03T15:45:00Z — B0: booklet reference + lightweight-process reconciliation
368 +
369 +- Actor: Arena agent (implementation); independent reviewer separate
370 +- Mission: booklet-compliance remediation B0…B12, one focused PR per category, sequential
371 +- Base: live `source-data-cleanup@46253c94405abd065dfc5e8cf080b295cb83cde4` (BASE MATCH verified, §0.2); working branch `arena/094f314c-aram` aligned to accepted base via merge (no force-push)
372 +- B0.1 booklet: `docs/booklet/BOOKLET_v1.0.md` (pymupdf extraction, visual-RTL -> logical reorder) + `docs/booklet/MANIFEST.json` (original PDF SHA-256 `7dd508274babd604f74d10b692464ce42f26a88c4a7116cfd861188abd4a2baf`, 745,088 bytes, 14 pages). Original is PDF not docx; binary not committed (§19); ADR-025
373 +- B0.2 status: `PROJECT_STATUS.md` rewritten to GitHub reality (Phases 0–9 VERIFIED_AND_MERGED at `46253c9`, 319 backend tests, post-merge CI links, stale V1-01 IN_PROGRESS / VERIFIED_BUT_UNMERGED rows removed, D-08 closed)
374 +- B0.3 archive: 14 root analytical docs `git mv` -> `docs/archive/` (+ index README); root retains only AGENTS.md + PROJECT_STATUS.md; no new root analytical doc (§0.5)
375 +- B0.4 process: AGENTS.md ↔ §0.5 conflict reported + resolved; handoff cadence changed to per-category (not per-step); lightweight-process bullets added; ADR-026
376 +- B0.5 registry: `docs/discrepancies.json` skeleton `{row, our_amount, official_amount, cause, evidence, year}` (OD-08; populated in B8)
377 +- Protected data: `data/` tree `2ef8a512523f62f0cf84c5009f141be2f8a9cb5f`, `samples/` tree `00aba54b1dc30485ba9b164c8036a7b4bbe9020e` — unchanged before/after (B0 touches docs only)
378 +- Tests: B0 is documentation/process only; no code changed; backend/frontend suites unaffected (319 backend / 11 frontend at accepted head)
379 +- Artifacts/releases: NONE committed
380 +- Acceptance: IN_PROGRESS; author does not merge or tag
381 +- Next action: independent GitHub review of B0 PR; B1 starts only after B0 acceptance
docs/adr/ADR-025-booklet-reference-artifact.md new
+52
@@ -0,0 +1,52 @@
1 +# ADR-025 — Booklet reference artifact (source format + integrity anchor)
2 +
3 +- Status: Accepted (B0)
4 +- Date: 2026-12-03
5 +- Booklet: §0 (this booklet is the product work order), §17 (default + proof + ADR,
6 + never query the owner), §19 (no committed binaries)
7 +
8 +## Context
9 +
10 +Mission item B0.1 asks for the booklet verbatim in `docs/booklet/BOOKLET_v1.0.md`
11 +plus the SHA-256 of the original **docx** in a manifest. The actual source delivered
12 +to the workspace is a **PDF**, not a docx:
13 +
14 +- Original file: «کتابچهٔ اجرایی تکمیل Aram» (PDF, 14 pages).
15 +- SHA-256: `7dd508274babd604f74d10b692464ce42f26a88c4a7116cfd861188abd4a2baf`
16 +- Size: 745,088 bytes.
17 +
18 +No `.docx` exists anywhere in the repository or the workspace. Committing the
19 +original binary is prohibited by §19 (no binaries in Git).
20 +
21 +A first-pass PDF text extraction was RTL-scrambled (Arabic presentation forms in
22 +visual order). Committing that as "verbatim" would misrepresent the source.
23 +
24 +## Decision (§17 default + proof)
25 +
26 +1. **Anchor integrity on the original PDF's SHA-256**, recorded in
27 + `docs/booklet/MANIFEST.json`. The original binary is **not** committed (§19);
28 + the hash is the durable, verifiable reference. The manifest records that the
29 + real source is PDF and that B0.1's docx wording did not match the delivered
30 + artifact.
31 +2. **Provide a readable, version-controlled derived text** in
32 + `docs/booklet/BOOKLET_v1.0.md`, extracted with `pymupdf` and re-ordered per line
33 + from visual RTL to logical reading order (whitespace-token reversal, NFC
34 + normalization). This is a **reading aid**, explicitly labelled as derived; minor
35 + hamza/punctuation artifacts may remain. The authoritative source is the original
36 + file identified by the hash above.
37 +3. **No content is invented or "corrected"** (§19). The derived text is a faithful
38 + extraction, not a paraphrase or reconstruction.
39 +
40 +## Proof
41 +
42 +- `sha256sum` of the original PDF = the hash above (reproducible by any reviewer
43 + who has the original upload).
44 +- `docs/booklet/MANIFEST.json` records format, size, page count, tool, and method.
45 +- Page count 14 matches the original's `Page N of 14` footers.
46 +
47 +## Consequences
48 +
49 +- Reviewers verify the booklet against the original PDF by hash, not by trusting
50 + the derived Markdown byte-for-byte.
51 +- If a docx original is later supplied, add its hash to the manifest as an
52 + additional anchor; do not silently replace the PDF anchor.
docs/adr/ADR-026-lightweight-process-handoff-cadence.md new
+55
@@ -0,0 +1,55 @@
1 +# ADR-026 — Lightweight process & handoff cadence (AGENTS.md ↔ booklet §0.5)
2 +
3 +- Status: Accepted (B0)
4 +- Date: 2026-12-03
5 +- Booklet: §0.5 (lightweight process), §0.1 (booklet is the product work order;
6 + AGENTS.md is process rules; report conflicts), §17 (default + proof + ADR)
7 +
8 +## Context — the conflict (reported, not guessed)
9 +
10 +Booklet §0.5 (verbatim, logical order):
11 +
12 +> «سازی‌سبک فرایند (الزامی): سند تحلیلی جدید در ریشهٔ مخزن ساخته نشود. فایل‌های تحلیلی
13 +> تاریخی ریشه (کاتالوگ‌ها و ماتریس‌ها) در یک PR جداگانه به docs/archive/ منتقل شوند. هر PR
14 +> فقط PROJECT_STATUS.md و یک ورودی کوتاه docs/PROJECT_LOG.md را روزبه‌روز کند. هدف: کد و
15 +> تست رشد کند، نه مستندات.»
16 +
17 +`AGENTS.md` ("Project records") currently requires:
18 +
19 +> "update `docs/handoff/LATEST_HANDOFF.md` after **every meaningful completed or
20 +> rejected step** so a successor can resume without chat history"
21 +
22 +These conflict: §0.5 mandates a lightweight per-PR record (status + a short log
23 +entry only, "code and tests grow, not documentation"), while AGENTS.md mandates a
24 +handoff rewrite after every step. The mission's owner decision resolves it
25 +explicitly: **handoff is updated only at the end of each category (B0…B12), not
26 +after every commit/step.**
27 +
28 +## Decision (§17 default + owner decision embedded in the mission)
29 +
30 +1. Amend `AGENTS.md` so the handoff cadence is **per category**, not per step:
31 + `docs/handoff/LATEST_HANDOFF.md` is refreshed at the **end of each B-category**
32 + (and on any governance change), not after every commit.
33 +2. Keep the lightweight per-PR record required by §0.5: every PR updates
34 + `PROJECT_STATUS.md` and appends a **short** `docs/PROJECT_LOG.md` entry; add an
35 + ADR only when a decision is made. No new root-level analytical documents.
36 +3. Historical root analytical docs are moved to `docs/archive/` (done in this B0
37 + PR via `git mv`, preserving history).
38 +4. `MASTER_RECOVERY_PROMPT.md` and `CHATGPT_BOOTSTRAP_PROMPT.txt` stay stable unless
39 + the governance process itself changes (unchanged rule).
40 +
41 +## Proof
42 +
43 +- §0.5 text quoted above from `docs/booklet/BOOKLET_v1.0.md` (integrity anchored by
44 + ADR-025).
45 +- The owner decision is stated in the mission's B0 item 4 ("handoff update only at
46 + end of each category, not every commit").
47 +- This PR moves 14 root analytical docs to `docs/archive/` and adds no new root
48 + analytical document; root retains only `AGENTS.md` and `PROJECT_STATUS.md`.
49 +
50 +## Consequences
51 +
52 +- Successors resume from the per-category handoff plus `PROJECT_STATUS.md` and the
53 + short log, without a handoff rewrite on every commit.
54 +- The conflict is resolved in the process file itself (AGENTS.md), so future agents
55 + read a consistent rule rather than re-discovering the conflict.
docs/archive/HISTORICAL_DISCREPANCIES.md renamed
docs/archive/MAPPING_ANALYSIS.md renamed
docs/archive/MIGRATION_PLAN.md renamed
docs/archive/NOTE_CATALOG.md renamed
docs/archive/NOTE_TO_SHEET_MATRIX.md renamed
docs/archive/NOTE_TO_STATEMENT_MATRIX.md renamed
docs/archive/PHASE_1B1_VALIDATION.md renamed
docs/archive/PHASE_1B2_VALIDATION.md renamed
docs/archive/PROJECT_AUDIT.md renamed
docs/archive/README.md new
+26
@@ -0,0 +1,26 @@
1 +# Archived analytical documents
2 +
3 +Historical root-level analytical documents (catalogs, matrices, audits, analyses)
4 +moved here in B0 per booklet §0.5 (lightweight process: no new root analytical
5 +documents; code and tests grow, not documentation). Moved with `git mv`, so file
6 +history is preserved. These are reference material, not the live status entry point.
7 +
8 +Live records: [`PROJECT_STATUS.md`](../../PROJECT_STATUS.md),
9 +[`docs/PROJECT_LOG.md`](../PROJECT_LOG.md), [`docs/adr/`](../adr/).
10 +
11 +| Document | Subject |
12 +|---|---|
13 +| HISTORICAL_DISCREPANCIES.md | Historical official-statement discrepancies (starting point for OD-08 / `docs/discrepancies.json`) |
14 +| MAPPING_ANALYSIS.md | Mapping analysis |
15 +| MIGRATION_PLAN.md | Migration plan |
16 +| NOTE_CATALOG.md | Note catalog |
17 +| NOTE_TO_SHEET_MATRIX.md | Note → workbook sheet matrix |
18 +| NOTE_TO_STATEMENT_MATRIX.md | Note → statement matrix |
19 +| PHASE_1B1_VALIDATION.md | Phase 1B-1 validation |
20 +| PHASE_1B2_VALIDATION.md | Phase 1B-2 validation |
21 +| PROJECT_AUDIT.md | Project audit |
22 +| SOURCE_INVENTORY.md | Source inventory |
23 +| SOURCE_LINEAGE_ANALYSIS.md | Source lineage analysis |
24 +| TARGET_ARCHITECTURE.md | Target architecture |
25 +| TARGET_DATA_MODEL.md | Target data model |
26 +| WORKBOOK_SHEET_CATALOG.md | Workbook sheet catalog |
docs/archive/SOURCE_INVENTORY.md renamed
docs/archive/SOURCE_LINEAGE_ANALYSIS.md renamed
docs/archive/TARGET_ARCHITECTURE.md renamed
docs/archive/TARGET_DATA_MODEL.md renamed
docs/archive/WORKBOOK_SHEET_CATALOG.md renamed
docs/booklet/BOOKLET_v1.0.md new
+641
@@ -0,0 +1,641 @@
1 +# کتابچهٔ اجرایی تکمیل Aram — نسخهٔ ۱٫۰ (سند مرجع)
2 +
3 +> **سند مرجعِ version-controlled.** این فایل متنِ استخراج‌شده از PDF اصلیِ کتابچه است
4 +> که به‌ترتیبِ منطقیِ خوانش (RTL) بازچینش شده تا در مخزن قابل‌بازبینی باشد.
5 +>
6 +> - **فایل اصلی:** «کتابچهٔ اجرایی تکمیل Aram» (PDF، 14 صفحه)
7 +> - **SHA-256 فایل اصلی:** `7dd508274babd604f74d10b692464ce42f26a88c4a7116cfd861188abd4a2baf`
8 +> - **روش استخراج:** `pymupdf` + بازچینش واژه‌ها در هر خط از ترتیب بصریِ RTL به منطقی.
9 +> - **لنگرِ یکپارچگی:** هشِ SHA-256 بالا در `MANIFEST.json`. متنِ زیر یک کمک‌خوانشِ
10 +> مشتق است؛ آرتیفکت‌های جزئیِ همزه/نشانه‌گذاری ممکن است وجود داشته باشد. مرجعِ
11 +> قطعی، فایلِ اصلی با هشِ بالاست. هیچ محتوایی جعل یا «اختراع» نشده (§19).
12 +> - فایل اصلی به‌صورت PDF ارسال شد (دستور B0.1 به docx اشاره داشت؛ منبعِ واقعیِ
13 +> موجود PDF است و هشِ همان ثبت شده). اصلِ باینری کامیت نشده (§19)؛ فقط هش.
14 +
15 +---
16 +
17 +## صفحهٔ 1
18 +
19 +ٔکتابچ اجرایی تکمیل Aram
20 +ٔنسخ ۱٫۰ — دستور کار کامل برای های‌ایجنت کدنویسی Code( Claude / Jules / .)Codex :مبنا بررسی
21 +مخزن davoodmehraban89/Aram ، ٔشاخ source-data-cleanup ، head برابر 7dc864fd…
22 +merge( ٔشد #21 .)PR
23 +.۰ ٔنحو استفاده از این کتابچه
24 +.1
25 +این کتابچه دستور کار محصول است و AGENTS.md قواعد .فرایندی در تضاد بین این :دو توقف ،کن
26 +تضاد را دقیق گزارش ،کن حدس .نزن
27 +.2
28 +پیش از هر :کار remote را fetch ،کن PROJECT_STATUS.md و docs/ACCEPTANCE_POLICY.md
29 +را ،بخوان SHA پایه را تأیید .کن اگر با وضعیت واقعی ،نخواند .توقف
30 +.3
31 +کارها فقط به ترتیب فازهای بخش ۱۵ انجام .شود‌می فاز n+1 قبل از پذیرش فاز n شروع .شود‌نمی
32 +.4
33 +هر مقدار ،مالی ٔقاعد ،نگاشت فرمول یا ٔنتیج تست که در دیتای واقعی مخزن نیست »اختراع«
34 +.شود‌نمی اگر چیزی مبهم ،است جای‌به ،حدس طبق بخش ۱۷ قواعد( تصمیم )خودکار تصمیم ،بگیر
35 +شواهدش را در ADR ثبت کن و ادامه بده؛ از مالک سؤال .نکن
36 +سازی‌سبک فرایند :)الزامی( سند تحلیلی جدید در ٔریش مخزن ساخته .نشود های‌فایل .5تحلیلی
37 +تاریخی ریشه ها‌کاتالوگ( و )ها‌ماتریس در یک PR جداگانه به docs/archive/ منتقل .شوند هر PR
38 +فقط PROJECT_STATUS.md و یک ورودی کوتاه docs/PROJECT_LOG.md را روز‌به .کند :هدف کد و
39 +تست رشد ،کند نه .مستندات
40 +.6
41 +پایان هر کار با قالب گزارش بخش ۱۸ و ٔجمل not« review; GitHub independent for Ready
42 +».merged تمام .شود‌می
43 +.۱ ،هدف دامنه و تعریف »شده‌تمام«
44 +:هدف افزار‌نرم لوکال/دسکتاپ برای ٔتهی ،کامل ردیابی‌قابل و ممیزی‌قابل های‌صورت مالی اساسی
45 +وضعیت( مالی ،BS سود و زیان ،IS جریان وجوه نقد ،CF تغییرات حقوق مالکانه )EQ و های‌یادداشت
46 +،توضیحی از روی تراز/لجر ،اصلی بر ٔپای استانداردهای حسابداری .ایران
47 +در :دامنه چند شرکت و چند سال مالی در یک نصب هر( سال ؛)ایزوله ورود لجر ؛xlsx نگاشت حساب به
48 +ردیف/یادداشت صورت؛ موتور ٔمحاسب ها‌یادداشت و ها؛‌صورت های‌کنترل مالی؛ drill-down از عدد نهایی
49 +تا ردیف منبع؛ گردش کار نویس‌پیش ← بازبینی ← تأیید ← قفل؛ خروجی ؛Excel/PDF رابط فارسی
50 +چپ؛‌به‌راست اجرای ًکام آفالین روی .Windows
51 +خارج از دامنه مگر( با تصمیم صریح :)مالک های‌صورت ،تلفیقی محاسبات ،مالیاتی SaaS و
52 +،چندمستأجری ثبت سند ،حسابداری ارتباط آنالین با هر سرویس .بیرونی
53 +تعریف »شده‌تمام« ٔهم( موارد با :)شواهد
54 +14 of 1 Page
55 +
56 +---
57 +
58 +## صفحهٔ 2
59 +
60 +تولیدشده با های‌صورت رسمی IS و BS لجر واقعی سال ۱۴۰۴ ورود شود‌می و های‌صورت D1:
61 +در ٔهم های‌ردیف دار‌جمع ریال به ریال برابرند یا( ها‌اختالف data/official_statements
62 +یک‌به‌یک. در گزارش توجیه )اند‌شده
63 +همین برای ،۱۴۰۳ و پیوستگی سال به سال مانده( پایان ۱۴۰۳ = ابتدای )۱۴۰۴ خودکار کنترل D2:
64 +شود‌می.
65 +drill-down هر عدد در هر صورت و یادداشت تا ردیف لجر منبع ،فایل( ،شیت ٔشمار )ردیف قابل D3:
66 +است.
67 +تواند‌نمی تغییر دهد؛ تست bulk) خام، SQL (API، سال شده‌قفل/تأییدشده را هیچ مسیری D4:
68 +خام. این را ثابت کند‌می SQL خودکار با
69 +ٔهم. های‌کنترل بخش ۷ پیاده و در گزارش خروجی دیده شوند؛‌می کنترل ناموفق مانع تأیید است D5:
70 +و) بدون اینترنت Python ماشین (بدون بازتولیدپذیر است و در محیط تمیز Windows ٔبست نصبی D6:
71 +بدون. خطا اجرا شود‌می
72 +و. ٔآستان پوشش pip-audit e2e، تست pytest، mypy، ruff، سبز با CI D7:
73 +توسط. مالک روی داده واقعی با سناریوهای بخش ۱۴ امضا شده است (UAT) پذیرش کاربری D8:
74 +.۲ وضعیت فعلی و های‌بدهی اجباری فاز( )۰
75 +پیش از هر قابلیت ،جدید موارد زیر باید رفع و با تست ثابت .شوند هر ردیف یک PR کوچک و متمرکز .است
76 +مشکل از( بررسی شناسه)مخزن
77 +الزام رفع
78 +تست پذیرش
79 +هیچ جدولی برای ٔماند D-01ها‌حساب
80 +)opening/debit/credit/closing( وجود
81 +ندارد؛ خروجی ledger_parser جایی
82 +ذخیره شود‌نمی
83 +مدل LedgerBalance
84 +بخش( )۵ و مهاجرت
85 +ورود ٔنمون کوچک و
86 +خواندن دقیق مقادیر
87 +D-02
88 +فقط یکتایی mapping_id را preflight
89 +:سنجد‌می یک حساب تواند‌می دو بار نگاشت
90 +شود شمارش( ؛)مضاعف حساب بدون
91 +نگاشت با مانده غیرصفر و تراز کل جمع(
92 +بدهکار = جمع )بستانکار کنترل شود‌نمی
93 +های‌کنترل C-03، C-02،
94 +C-04 بخش ۷
95 +های‌تست منفی برای
96 +هر سه
97 +Numeric(24,4) روی SQLite D-03فرض‌پیش(
98 +sqlite:/// ) به float ذخیره شود‌می و
99 +مبالغ بزرگ ریالی صدا‌بی گرد شوند‌می
100 +ٔذخیر مبلغ صورت‌به عدد
101 +صحیح دار‌مقیاس بخش(
102 +،۳ )P-02
103 +تست property-
104 +based با
105 +Hypothesis:
106 +round-trip دقیق تا
107 +۱۸ رقم
108 +14 of 2 Page
109 +
110 +---
111 +
112 +## صفحهٔ 3
113 +
114 +مشکل از( بررسی شناسه)مخزن
115 +الزام رفع
116 +تست پذیرش
117 +D-04
118 +ledger_parser کدهای عددی را به int
119 +تبدیل کند‌می و صفر ابتدایی پرد‌می
120 +( →0101 101 ،) در حالی که preflight
121 +همین را ممنوع کرده؛ ارقام عربی/فارسی
122 +پشتیبانی شوند؛‌نمی مقدار float اکسل از
123 +str(float) عبور کند‌می
124 +یک تابع واحد سازی‌نرمال
125 +بخش( ؛)۸ کد عددی خام
126 +→ خطای ،صریح نه تبدیل
127 +صدا‌بی
128 +تست با کد 0101 ،
129 +ارقام ،فارسی float
130 +مثل 0.1+0.2
131 +نام ها‌شیت با »ك/ي« عربی کد‌سخت شده D-05و
132 +سازی‌نرمال ندارد
133 +ٔمقایس هدر/شیت پس از
134 +سازی‌نرمال ،ک/ی
135 +NBSP ZWNJ،
136 +فایل با ک/ی فارسی
137 +پذیرفته شود‌می
138 +D-06
139 +بایت فایل منبع ذخیره ،شود‌نمی فقط SHA-
140 +؛256 .csv مجاز است ولی parser ندارد
141 +ٔذخیر content-
142 +addressed فایل منبع
143 +بخش( ؛)۵ یا CSV کامل
144 +پشتیبانی شود یا از
145 +مجازها حذف شود
146 +ورود دوباره از روی
147 +فایل شده‌ذخیره و
148 +تطابق hash
149 +D-07
150 +قفل سال فقط در before_flush ORM
151 +:است با update bulk و SQL خام دور زده
152 +شود؛‌می برای هر آبجکت کوئری زند‌می
153 +؛)N+1( کاربر و log audit ندارد؛ مسیر
154 +بازگشایی ٔشد‌کنترل سال تأییدشده نیست
155 +تریگرهای سطح ،دیتابیس
156 +log audit ،ای‌زنجیره
157 +گردش کار بازگشایی
158 +بخش( )۱۳
159 +تست با UPDATE
160 +خام که باید شکست
161 +بخورد
162 +PROJECT_STATUS.md گوید‌می V1-01 D-08در
163 +جریان ،است اما head همان #21 merge
164 +است
165 +سازی‌همگام و حذف
166 +های‌ریسک شده‌رفع
167 +بازبینی دستی در PR
168 +دو فایل xlsx حدود ۲۴ و ۳۲ مگابایت D-09در
169 +ٔتاریخچ اند‌گیت
170 +انتقال به LFS Git یا
171 +بیرون مخزن با ثبت hash
172 +در مانیفست؛ بازنویسی
173 +تاریخچه فقط با تأیید
174 +صریح مالک
175 +ٔانداز clone و
176 +مانیفست hash
177 +دو گذاری‌نام برای یک :مراتب‌سلسله D-10لجر
178 +T1..T4 و Pilot
179 +؛general/subsidiary/detail1..4
180 +نگاشت مستند بین ها‌آن نیست
181 +با نگاشت رسمی؛ ADR
182 +تصمیم (باز مالک تأیید کند
183 +OD-01)
184 +تست تبدیل دوطرفه
185 +D-11
186 +worksheet.max_column در حالت read-
187 +only ممکن است None باشد و min()
188 +خطا دهد
189 +محافظت صریح و تست
190 +با فایل بدون dimension
191 +فایل تولیدشده با
192 +ابزار دیگر
193 +14 of 3 Page
194 +
195 +---
196 +
197 +## صفحهٔ 4
198 +
199 +.۳ اصول مذاکره‌غیرقابل
200 +منبع :مقدس ٔداد منبع هرگز ویرایش .شود‌نمی هر تصحیحی ٔالی جدا اصالحیه( با دلیل و )کاربر P-01
201 +،است. نه تغییر مقدار
202 +(،ریال در .جا‌هیچ مبلغ در دیتابیس صورت‌به عدد صحیح دار‌مقیاس float دقت :مالی هیچ P-02
203 +Decimal ذخیره و در پایتون TypeDecorator با ثبت) شود ADR مقیاس از ٔداد واقعی تعیین و در
204 +.است. گرد کردن فقط در یک تابع مرکزی با ٔقاعد شده‌ثبت انجام شود‌می
205 +کدها. :اند‌متن کد یادداشت/حساب هرگز عدد نیست؛ صفر ابتدایی و طول حفظ شود‌می P-03
206 +عبور. کند‌می normalize_fa سازی‌نرمال :جا‌یک ٔهم ورودی متنی فارسی از یک تابع P-04
207 +:قطعیت با ورودی و پیکربندی ،یکسان خروجی بایت‌به‌بایت یکسان است ترتیب( ،پایدار بدون P-05
208 +ها‌ورودی. و ٔنسخ کد را ثبت کند‌می hash وابستگی به .)تصادف/زمان هر اجرای محاسبه
209 +:ردیابی. هر عدد خروجی فهرست های‌ردیف منبع ٔسازند خود را دارد P-06
210 +اجرا. شود‌نمی year_id ایزوالسیون :سال هیچ کوئری یا ای‌محاسبه بدون P-07
211 +اجرای اکسل ارزیابی شوند؛‌نمی فقط /با eval های‌فرمول یادداشت با دستور eval: بدون P-08
212 +گرامر. امن بخش ۶
213 +شکست :بلند کنترل ناموفق یا ورودی نامعتبر یعنی خطای صریح و ،کننده‌متوقف نه هشدار P-09
214 +،گرفتنی‌نادیده. مگر در جدول ها‌کنترل که ًصراحت »هشدار« تعریف شده
215 +:آفالین. هیچ درخواست ای‌شبکه در زمان اجرا؛ ها‌فونت و ٔهم ها‌دارایی داخل بسته P-10
216 +مهاجرت :امن هر مهاجرت رو به جلو و عقب تست شود‌می و روی کپی داده واقعی بدون تغییر P-11
217 +ها‌مجموع. اجرا گردد‌می
218 +تست. قبل از :ادعا کار« »کند‌می فقط با تست و خروجی واقعی اجرا معتبر است P-12
219 +.۴ معماری و های‌تصمیم فنی
220 +:ساختار اند‌بک Alembic + 2 SQLAlchemy + FastAPI + 3.12 ؛Python فرانت TypeScript + React
221 +Vite + با پشتیبانی کامل RTL و فونت Vazirmatn داخل بسته؛ سرویس اند‌بک های‌فایل ایستای فرانت را
222 +هم سرو کند‌می و برنامه با یک ٔاجراکنند (PyInstaller) Windows روی 127.0.0.1 ال ب آید‌می و مرورگر
223 +فرض‌پیش را باز .کند‌می
224 +مشکل از( بررسی شناسه)مخزن
225 +الزام رفع
226 +تست پذیرش
227 +D-12
228 +پوشش، type-check، lint، فاقد CI
229 +است lockfile و Postgres
230 +سبز با ٔهم ها‌گیت بخشCI ۱۴
231 +14 of 4 Page
232 +
233 +---
234 +
235 +## صفحهٔ 5
236 +
237 +:دیتابیس ) foreign_keys=ON (WAL، SQLite برای نصب کاربره؛‌تک مدل و ها‌مهاجرت طوری نوشته
238 +شوند که روی PostgreSQL هم در CI اجرا شوند تا مسیر چندکاربره بسته .نشود هر قابلیتی که فقط روی
239 +یکی کار کند ممنوع .است
240 +:ها‌الیه domain قواعد( خالص و بدون :I/O ،سازی‌نرمال ،پولی ،فرمول )ها‌کنترل ← services ،ورود(
241 +،نگاشت ،محاسبه گردش )کار ← api ← ui . ٔدامن خالص ٪۱۰۰ پذیر‌تست بدون دیتابیس .است
242 +چیدمان مخزن :هدف backend/src/aram_backend/{domain,services,api,db} ،
243 +frontend/ ، packaging/windows/ ، docs/{adr,archive} ، data/ فقط مانیفست و های‌فایل
244 +کوچک؛ های‌فایل بزرگ بیرون مخزن یا .LFS
245 +های اجباری قبل از کدنویسی فاز :مربوط مقیاس و گرد کردن پول؛ قرارداد عالمت ADR/بدهکار(
246 +؛ دستور زبان general..detail4فرمول؛ به T1..T4 ؛ نگاشت closingمراتب‌سلسله )بستانکار و معنای
247 +مدل. بازگشایی سال؛ روش بندی‌بسته
248 +.۵ مدل ٔداد هدف
249 +های‌جدول موجود حفظ .شوند‌می اضافه یا :اصالح
250 +های‌بایت فایل در مخزن پذیر‌آدرس-محتوا روی ،دیسک ،اندازه ،نوع (کلید)، sha256 SourceFile:
251 +به. آن ارجاع دهد‌می SourceDocument زمان.
252 +، source_row ، source_sheet ، source_document_id ، year_id LedgerBalance:
253 +، opening ، account_name (متن)، general…detail4 سطوح ، account_full_code
254 +یکتایی: . entry_type P-02)، (پول closing ، credit ، debit
255 +برای. هر ٔنسخ .ورود تغییر‌غیرقابل پس از ورود ) account_full_code , year_id (
256 +،فایل. تعداد ردیف ،ردشده/پذیرفته/خوانده گزارش ،خطا ،کاربر زمان hash هر: ورود ImportRun:
257 +هدف تواند‌می ردیف صورت یا زیریادداشت/یادداشت باشد؛ وضعیت (تکمیل): MappingRule
258 +:یکتایی برای هر . carried_from_year_id ،بازبین، تاریخ بازبینی Draft/Reviewed/Approved،
259 +فقط یک ٔقاعد فعال مگر تقسیم صریح مبلغی/درصدی که ) account_full_code , year_id (
260 +مجموعش. باید ٪۱۰۰ باشد
261 +های‌حساب. ورود شده که نگاشت ،ندارند با مانده و وضعیت رسیدگی UnknownAccountQueue:
262 +فهرست + calculation_run_id + مقدار شده‌محاسبه (تکمیل): StatementLine / NoteCell
263 +). LineageEdge جدول (ارتباطی LedgerBalance ارجاع به
264 +ها‌ورودی ،لجر( ،نگاشت ،)پیکربندی ٔنسخ ،کد ،زمان ٔنتیج ٔهم .ها‌کنترل hash CalculationRun:
265 +تأییدشده. run خروجی رسمی فقط از یک
266 +ٔاصالحی :ای‌الیه ،حساب ،مبلغ ،دلیل سند ،پشتیبان ،کاربر وضعیت بازبینی؛ هرگز مقدار Adjustment:
267 +منبع. را عوض کند‌نمی
268 +14 of 5 Page
269 +
270 +---
271 +
272 +## صفحهٔ 6
273 +
274 +اصل چهار :چشم Admin. Approver، Reviewer، Preparer، ها‌نقش: Session: Role, User,
275 +تأییدکننده. تواند‌نمی همان کننده‌تهیه باشد پیکربندی‌قابل( برای نصب نفره‌تک با هشدار )شده‌ثبت
276 +و prev_hash (hash)، ،موجودیت مقدار بعد/قبل UTC، ،رویداد ،کاربر زمان AuditLog:
277 +فقط. افزودنی؛ تریگر ویرایش/حذف را رد کند‌می ٔزنجیر). (هش entry_hash
278 +درخواست بازگشایی سال :تأییدشده ،دلیل ،دهنده‌درخواست ،تأییدکننده نتیجه؛ ReopenRequest:
279 +سال. شده‌بازگشایی ٔنسخ جدید سازد‌می و ٔنسخ ٔتأییدشد قبلی ًعین باقی ماند‌می
280 +.۶ موتور محاسبه
281 +خط ٔلول ثابت هر( مرحله تابع خالص و :)تست‌قابل
282 +.1
283 +ورود → LedgerBalance بخش( )۸
284 +.2
285 +سازی‌نرمال و اعتبارسنجی ساختاری )preflight(
286 +.3
287 +اعمال نگاشت :تأییدشده هر حساب ← هدف ردیف( صورت / یادداشت / )زیریادداشت
288 +.4
289 +ٔمحاسب های‌سلول یادداشت ها‌فرمول( + قواعد )سازی‌مرتب
290 +ٔمحاسب های‌ردیف صورت از ها‌یادداشت و های‌حساب .5مستقیم
291 +.6
292 +اجرای ٔهم ها‌کنترل بخش( )۷
293 +ثبت CalculationRun با hash .7ها‌ورودی
294 +های‌فرمول :یادداشت منبع قدیمی ( data/mappings ، های‌ستون فرمول« یادداشت )»فرعی/اصلی
295 +فرمول .دارد ٔوظیف فاز ۳ ابتدا کردن‌فهرست ٔهم الگوهای متمایز فرمول با اسکریپت خواندنی‌فقط و
296 +نوشتن گرامر در یک ADR .است سپس فقط یک زبان کوچک امن ،تفریق/جمع( ارجاع به /یادداشت/حساب
297 +،ردیف شرط ،ساده جمع بر اساس سطح )مراتب‌سلسله پیاده .شود‌می فرمول خارج از گرامر = خطای
298 +صریح با ٔشمار ،ردیف نه .گرفتن‌نادیده هیچ ایeval مجاز نیست .)P-08(
299 +قواعد مالی که باید قبل از کد در ADR نوشته و بر ٔپای شواهد داده طبق بخش ۱۷ نهایی
300 +:شوند
301 +معنی closing و عالمت های‌حساب ماهیت‌بستانکار در( داده ثابت ،شود حدس زده .)نشود
302 +مقیاس نمایش ریال( یا میلیون )ریال و گرد کردن فقط در ٔالی ،خروجی/نمایش با تضمین اینکه جمع
303 +های‌ردیف گردشده با جمع کل شده‌داده‌نمایش سازگار بماند روش( تخصیص اختالف گردکردن مستند
304 +.)شود
305 +ترتیب ها‌ردیف و قواعد سازی‌مرتب ( sorting_rule_id ) صورت‌به ،داده نه .کد
306 +ارقام ای‌مقایسه سال :قبل فقط از ٔنسخ ٔتأییدشد سال قبل خوانده .شود‌می
307 +اگر سال قبل در سامانه ،نیست ورود دستی ارقام« »ای‌مقایسه با منبع و برچسب مشخص نه( ارقام
308 +.)خالی
309 +14 of 6 Page
310 +
311 +---
312 +
313 +## صفحهٔ 7
314 +
315 +.۷ فهرست های‌کنترل مالی )مسدودسازی‌قابل(
316 +هر :کنترل ،کد شدت ( ERROR مانع تأیید / WARN نیازمند توضیح ،)شده‌ثبت ،ورودی ،خروجی پیام ،فارسی
317 +تست مثبت و .منفی
318 +کد
319 +کنترل
320 +شدت
321 +C-01
322 +هر :ردیف = closing − credit − debit + opening
323 +0 طبق( ADR )عالمت
324 +ERROR
325 +ترازERROR :کل جمع بدهکار = جمع ،بستانکار و جمع ها‌مانده C-02صفر
326 +هر حساب با گردش/مانده غیرصفر ًدقیق یک نگاشت C-03فعال
327 +دارد بدون( نگاشت = ،ERROR دو نگاشت = ERROR مگر
328 +تقسیم )٪۱۰۰
329 +ERROR
330 +حساب بدون نگاشت وارد صف های‌حساب ناشناخته C-04شود‌می
331 +و تا تعیین تکلیف مانع تأیید است
332 +ERROR
333 +مانده پایان سال قبل = مانده ابتدای سال C-05جاری
334 +)حساب‌به‌حساب(
335 +ERROR
336 +وضعیتERROR :مالی ها‌دارایی = ها‌بدهی + حقوق C-06مالکانه
337 +جمعERROR هر یادداشت = ردیف متناظر در C-07صورت
338 +سود و زیان خالص IS = تغییر زیان/سود ٔانباشت EQ C-08با(
339 +اصالحات )صریح
340 +ERROR
341 +C-09
342 +ماندهERROR ابتدا + تغییرات = مانده پایان EQ:
343 +C-10
344 +BS) (در خالص تغییر وجه نقد = مانده نقد پایان − ابتدا CF:
345 +ERROR
346 +:مراتب‌سلسله هر کد سطح تر‌پایین والد موجود دارد و C-11جمع
347 +فرزندان = والد اگر( لجر والد )دارد
348 +ERROR
349 +یادداشتERROR بدون نگاشت یا نگاشت به یادداشت C-12ناموجود
350 +تطابق با صورت رسمی ( official_statements ) C-13در
351 +حالت اعتبارسنجی/تست
352 +UI در INFO CI، در ERROR
353 +C-14
354 +تغییرWARN ناگهانی بیش از آستانه نسبت به سال قبل )تحلیلی(
355 +حسابWARN با مانده خالف C-15ماهیت
356 +14 of 7 Page
357 +
358 +---
359 +
360 +## صفحهٔ 8
361 +
362 +.۸ً ورود داده )Import(
363 +ورود :جریانی فایل ۳۰ مگابایتی نباید کل حافظه را .بگیرد خواندن ،read-only درج ای‌دسته مث(
364 +۵۰۰۰ )ردیفی در یک تراکنش با بازگشت کامل در .خطا هدف :عملکرد لجر ۳۲MB در کمتر از ۵ دقیقه
365 +روی ماشین متوسط و کمتر از ۱ گیگابایت RAM تنظیم‌قابل( و ثبت در .)تست
366 +​
367 +چیزی را دوباره سازد؛‌نمی فایل جدید برای همان hash) (همان ورود ٔدوبار همان فایل idempotent:
368 +است. Draft سال = ٔنسخ جدید ورود با( )مقایسه تا وقتی سال
369 +سازی‌نرمال فارسی ( normalize_fa :) ،»ی«←»ي« ،»ک«←»ك« ارقام التین←عربی/فارسی برای
370 +مقادیر ،عددی حذف NBSP و کاراکترهای ،کنترلی ،trim سازی‌یکسان ،فاصله‌نیم حذف .کشیده کد
371 +حساب هرگز سازی‌عددی .شود‌نمی ٔمقایس نام هدر/شیت بعد از .سازی‌نرمال
372 +مقدارٔ :سلول data_only=True فقط وقتی مجاز است که مقدار شده‌کش موجود باشد؛ سلول
373 +فرمولی بدون مقدار کش = خطای .صریح اعداد float اکسل با روش دقیق ( repr ترین‌کوتاه رشت
374 +)round-trip به Decimal روند‌می و اگر بیش از مقیاس مجاز رقم اعشار دارند هشدار/خطا ثبت
375 +.شود‌می
376 +گزارش :خطا خروجی Excel با ٔشمار ،ردیف ،ستون کد خطا و پیام فارسی؛ شمارش کل خطاها
377 +همیشه نمایش داده .شود
378 +​
379 +یا ،جداکننده) همان قواعد ال ب (UTF-8/UTF-8-BOM/Windows-1256، یا کامل پشتیبانی شود CSV:
380 +از. ها‌مجاز حذف .شود کاره‌نیمه ممنوع
381 +.۹ نگاشت Studio( )Mapping و صف های‌حساب ناشناخته
382 +خروج/ورود Excel جامع نگاشت قالب( v0.1 Pilot ،موجود با SHA ،)شده‌ثبت با گزارش تفاوت
383 +.)تغییر/حذف/افزوده(
384 +صف های‌حساب :ناشناخته هر حساب بدون نگاشت با اش؛‌مانده پیشنهاد نگاشت بر اساس پیشوند کد
385 +و نگاشت سال قبل فقط( ،پیشنهاد هرگز تأیید .)خودکار
386 +حمل نگاشت از سال قبل :)carry-forward( کپی صورت‌به Draft با ارجاع به ،منبع نیازمند بازبینی
387 +.دوباره
388 +گردش :کار Reviewed → Draft بازبین( مشخص + )تاریخ → Approved فقط( وقتی اعتبارسنجی
389 +.)Valid
390 +نگاشت تقسیمی یک( حساب به چند )هدف فقط با مجموع ٪۱۰۰ یا مبلغ مساوی با .مانده
391 +،جستجو ،فیلتر ویرایش گروهی با نمایش‌پیش اثر چه( ارقامی تغییر )کند‌می قبل از .اعمال
392 +API ۱۰.
393 +پایه /api/v1 ، خطاها ساختار یکسان ( code , message_fa , details ،) ٔهم ها‌نوشتن نیازمند احراز
394 +هویت و ثبت در .AuditLog
395 +14 of 8 Page
396 +
397 +---
398 +
399 +## صفحهٔ 9
400 +
401 +companies ، fiscal-years +( انتقال :وضعیت approve , lock , reopen-request )
402 +fiscal-years/{id}/sources ،آپلود( ،لیست دانلود با ،)hash imports ،شروع( ،وضعیت
403 +گزارش )خطا
404 +fiscal-years/{id}/ledger ،بندی‌صفحه/جستجو( )drill-down
405 +​
406 +، carry-forward ، unknown-accounts import/export، Draft، در (CRUD mappings
407 +) suggestions
408 +notes و statements خواندنی‌فقط( از آخرین run تأییدشده؛ calculate برای run )جدید
409 +checks ٔنتیج( های‌کنترل ،)run lineage/{cell} فهرست( رکوردهای )منبع
410 +​
411 +restore و backup ، audit-log json)، / pdf / (xlsx exports
412 +​
413 +عنوان‌به. قرارداد؛ تست قرارداد بین فرانت و اند‌بک OpenAPI
414 +.۱۱ٔ رابط کاربری
415 +:قواعد فارسی RTL ،کامل فونت Vazirmatn داخل ،بسته تاریخ شمسی ٔذخیر( ،)میالدی/UTC جداکنند
416 +،هزارگان ٔگزین ارقام ،التین/فارسی اعداد منفی داخل ،پرانتز ها‌حساب و ارقام با dir=ltr در های‌سلول
417 +،عددی کیبورد ،کامل حالت ،روشن/تیره هیچ اتکایی به .اینترنت
418 +:ها‌صفحه داشبورد سال/شرکت با وضعیت و ها؛‌کنترل ورود فایل و گزارش ؛preflight صف های‌حساب
419 +ناشناخته؛ استودیوی نگاشت؛ فهرست و جزئیات ها؛‌یادداشت چهار صورت اصلی با drill-down تا ردیف
420 +لجر؛ مرکز ها‌کنترل و تطبیق؛ ٔمقایس دو سال؛ ٔسابق تغییرات ؛)audit( ها؛‌خروجی تنظیمات و .کاربران
421 +ٔقاعد UX :مهم ٔدکم تأیید« »سال تا وقتی حتی یک کنترل ERROR باز است غیرفعال و علت نمایش داده
422 +شود؛‌می هیچ مسیر دورزدن در UI .نیست
423 +.۱۲ ها‌خروجی
424 +و یک RTL، هر، صورت و یادداشت در یک ،شیت مقادیر عددی واقعی نه( ،)متن فرمت هزارگان Excel:
425 +شیت »ردیابی« هر( سلول ← ٔشمار های‌ردیف لجر .)منبع شیت »ها‌کنترل« با ٔنتیج ٔهم ها‌کنترل و
426 +ها‌ورودی. hash
427 +:چاپ‌قابل فونت ،شده‌جاسازی شکستن صفحه ،درست سرصفحه با نام وضعیت/سال/شرکت PDF
428 +نویس‌پیش(. یا ،)تأییدشده شماره ،صفحه واترمارک »نویس‌پیش« تا قبل از تأیید
429 +کامل. برای بازیابی و تطبیق JSON
430 +تأییدشده run هر خروجی رسمی فقط از . run} نام_{ی‌شناسه :فایل }نوع{_}سال{_}شرکت{
431 +خودش. را در متادیتا دارد hash ساخته شود‌می و
432 +حداقل از نظر PDF (round-trip)؛ دوباره خوانده و با دیتابیس مقایسه شود‌می Excel :تست خروجی
433 +های‌متن. کلیدی و تعداد صفحه بررسی شود‌می
434 +14 of 9 Page
435 +
436 +---
437 +
438 +## صفحهٔ 10
439 +
440 +.۱۳ ،امنیت ممیزی و یکپارچگی
441 +احراز هویت :محلی گذرواژه/کاربر با ،Argon2 قفل بعد از تالش ،ناموفق ها‌نقش
442 +)Preparer/Reviewer/Approver/Admin( و بررسی مجوز در هر endpoint نه( فقط در .)UI سرور
443 +فقط روی 127.0.0.1 . CORS .بسته هیچ راز در .مخزن
444 +قفل سطح :دیتابیس تریگرهای SQLite/PostgreSQL که هر INSERT/UPDATE/DELETE روی
445 +های‌جدول وابسته به ِسا شده‌قفل/تأییدشده را رد ،کنند‌می مستقل از .ORM تست :اجباری UPDATE
446 +خام باید شکست .بخورد شنونده before_flush عنوان‌به ٔالی دوم ماند‌می ولی بدون N+1 وضعیت(
447 +سال بار‌یک کش در .)تراکنش
448 +​
449 +:ای‌زنجیره هر رویداد دارای prev_hash و ؛entry_hash ابزار verify-audit AuditLog
450 +سالمت. زنجیره را بررسی کند؛‌می دستکاری = شکست تأیید
451 +​
452 +تنها راه تغییر سال :تأییدشده درخواست با ،دلیل تأیید نقش التر ،ب ساخت ٔنسخ ReopenRequest:
453 +جدید؛. ٔنسخ قبلی نخورده‌دست
454 +:گیری‌پشتیبان پشتیبان شده‌رمزگذاری از دیتابیس + های‌فایل منبع + مانیفست ،hash با دستور
455 +بازیابی و تست بازیابی در .CI
456 +ٔزنجیر :تأمین lockfile با ،hash pip-audit و audit npm در ،CI های‌نسخه pin .شده
457 +:الگ بدون ثبت نام/مبالغ حساب در های‌الگ عادی؛ سطح debug فقط با ٔگزین .صریح
458 +.۱۴ راهبرد تست و های‌دروازه کیفیت
459 +هرم :تست واحد )دامنه( ← یکپارچگی )DB+سرویس( ← قرارداد e2e ← API Playwright( روی UI
460 +)واقعی ← .عملکرد
461 +های‌تست اجباری :ویژه
462 +طالیی :)Golden( لجر ۱۴۰۴ و ۱۴۰۳ ← ها‌صورت ← ٔمقایس ریال‌به‌ریال با
463 +official_statements . اختالف = ،شکست مگر شده‌ثبت در فهرست های‌اختالف« تاریخی
464 +»شده‌شناخته با دلیل و امضای مالک فایل( HISTORICAL_DISCREPANCIES.md موجود ٔنقط شروع
465 +.)است
466 +​
467 +جمع شده‌نگاشت = جمع منبع برای هر ورودی تصادفی معتبر؛ (Hypothesis): Property-based
468 +idempotent. پول؛ ترتیب ورودی تأثیری بر خروجی ندارد؛ سازی‌نرمال round-trip
469 +:تخریبی SQL خام روی سال ،شده‌قفل فایل فایل/بمب‌ZIP/خراب با ۱۰۰۰ ،شیت کدهای ،تکراری
470 +های‌عالمت ،وارونه سلول فرمول بدون ،کش فایل با »ك/ي« .عربی
471 +:عملکرد ورود لجر ۳۲MB زیر آستانه؛ ٔمحاسب کامل زیر آستانه؛ ٔبودج .حافظه
472 +:مهاجرت upgrade/downgrade و اجرا روی کپی داده واقعی بدون تغییر .ها‌مجموع
473 +قابلیت :بازتولید دو اجرای ،سرهم‌پشت خروجی بایت‌به‌بایت یکسان .)P-05(
474 +14 of 10 Page
475 +
476 +---
477 +
478 +## صفحهٔ 11
479 +
480 +های‌دروازه CI همه( باید سبز :)باشند check ruff ، --check format ruff ، -- mypy
481 +strict روی domain/services ، pytest با پوشش ≥ ٪۹۰ روی دامنه و ≥ ٪۸۰ ،کل مهاجرت روی
482 +SQLite و ،PostgreSQL eslint و --noEmit tsc و vitest برای ،فرانت ،Playwright pip-
483 +audit ، audit npm ، --check diff git ، و ساخت ٔبست Windows روی ٔشاخ .release
484 +.۱۵ ٔنقش راه اجرا به( ترتیب؛ هر فاز با معیار )پذیرش
485 +فاز ۰ — سازی‌پاک و :ها‌بدهی رفع D-01 تا D-12 جز‌به( آنچه مدل فاز ۱ الزم ،)دارد انتقال مستندات
486 +تاریخی به docs/archive/ ، هایADR بخش ۴ با تأیید .مالک :پذیرش CI جدید ،سبز
487 +PROJECT_STATUS.md با head واقعی .خوان‌هم
488 +فاز ۱ — برش عمودی ترین‌مهم( :)فاز یک ،شرکت یک سال :)۱۴۰۴( ورود لجر ← LedgerBalance
489 +← کنترل C-01/C-02 ← نگاشت حتی( )اولیه ← های‌جمع BS و IS ← مقایسه با صورت .رسمی بدون UI زیبا؛
490 +CLI و گزارش متنی کافی .است :پذیرش های‌جمع BS/IS برابر صورت رسمی یا ها‌اختالف کامل فهرست و
491 +توجیه .شده
492 +فاز ۲ — نگاشت :کامل خروج/ورود ،Excel صف ،ناشناخته حمل النه ،س گردش
493 +C-03/C-04/C-12 .Draft/Reviewed/Approved، :پذیرش ٪۱۰۰ های‌حساب لجر ۱۴۰۴ شده‌نگاشت یا در
494 +صف با .وضعیت
495 +فاز ۳ — موتور :ها‌یادداشت گرامر فرمول ،)ADR( های‌سلول ،یادداشت ،زیریادداشت ،سازی‌مرتب C-
496 +.07 :پذیرش هر یادداشت سال ۱۴۰۴ با یادداشت رسمی .برابر
497 +فاز ۴ — چهار صورت و :ها‌تطبیق BS/IS/EQ/CF ،کامل C-05 تا C-13 ،C-11، ٔمقایس دو ،سال سال
498 +.۱۴۰۳ :پذیرش ٔهم ها‌کنترل روی هر دو سال .سبز
499 +فاز ۵ — رابط :کاربری های‌صفحه بخش ۱۱ بر ٔپای drill-down ،API، اپراتور واقعی با .Playwright
500 +:پذیرش سناریوی کامل ورود« تا »تأیید بدون ابزار .جانبی
501 +فاز ۶ — :ها‌خروجی Excel/PDF/JSON بخش .۱۲
502 +فاز ۷ — امنیت و :ممیزی ،ها‌نقش/کاربران تریگرهای ،دیتابیس audit ،ای‌زنجیره ،reopen /پشتیبان
503 +بازیابی بخش( .)۱۳
504 +فاز ۸ — بندی‌بسته :Windows ٔاجراکنند ،مستقل ،نصاب بدون ،اینترنت/Python تست در ماشین
505 +،تمیز SHA-256 و مستند .نصب :پذیرش ثبت الگ/ویدئو نصب و اجرا روی ماشین .تمیز
506 +فاز ۹ — پذیرش کاربری و :انتشار مالک سناریوهای بخش ۱۴ را روی ٔداد واقعی اجرا و امضا کند؛‌می
507 +تگ v1.0.0 و artifact .شده‌داری‌نگه
508 +ٔقاعد ورود به فاز :بعد معیار پذیرش فاز قبل با شواهد CI( ،SHA، خروجی )تست در
509 +PROJECT_STATUS.md ثبت شده .باشد
510 +14 of 11 Page
511 +
512 +---
513 +
514 +## صفحهٔ 12
515 +
516 +.۱۶ ها‌ریسک و پاسخ
517 +.۱۷ قواعد تصمیم خودکار بدون( پرسش از )مالک
518 +مالک ًصریح خواسته ایجنت هیچ سؤالی .نپرسد پس هر ابهام زیر با یک تصمیم فرض‌پیش و یک روش
519 +اثبات بسته شده .است این بخش بر هر عبارت تأیید« »مالک یا تصمیم« »باز در های‌بخش دیگر مقدم .است
520 +روش کار برای هر :مورد )۱ فرض‌پیش را اعمال .کن )۲ با آزمون روی ٔداد واقعی و های‌صورت رسمی
521 +.بسنجش )۳ اگر شواهد با فرض‌پیش ،خواند‌نمی شواهد برنده .است )۴ ،تصمیم شواهد و های‌گزینه ردشده
522 +را در یک ADR ثبت .کن )۵ کار را متوقف .نکن ها‌فرض‌پیش ِحد اند؛‌تأییدنشده اعتبارشان فقط از آزمون
523 +.آید‌می
524 +ریسک
525 +پاسخ
526 +برداری‌فهرست کامل در فاز ؛۳ مورد ناپشتیبانی های‌فرمول= قدیمی خارج از گرامر
527 +تصمیم ،مالک نه حدس
528 +اختالف صورت رسمی با لجر به علت های‌اصالحیه
529 +دستی
530 +ثبت در Adjustment و فهرست های‌اختالف
531 +شده‌شناخته
532 +تست روی داده قبل از هر محاسبه + ابهامADR ماهیت/عالمت ها‌حساب
533 +،جریانی ،ای‌دسته ٔبودج عملکرد در حجمCI و سرعت ورود
534 +وابستگی به یک ابزار/ایجنت
535 +معماری ،استاندارد ،محور‌تست مستندسازی ها‌تصمیم
536 +در ADR
537 +گسترش دامنه
538 +هر مورد خارج از بخش ۱ فقط با ADR و تأیید مالک
539 +کد
540 +تصمیم فرض‌پیش
541 +روش اثبات یا اصالح
542 +سطوح OD-01
543 +T1..T4
544 +سطوح لجر به سطوح Pilot ( general…
545 +detail4 ) به ترتیب نگاشت شوند و
546 +سطوح اضافی تهی بمانند
547 +کد کامل شده‌بازسازی از سطوح باید
548 +برای ٪۱۰۰ ها‌ردیف ًدقیق برابر ستون
549 +»حساب« باشد؛ هر نگاشتی که این را
550 +برقرار کند پذیرفته است
551 +عالمت و OD-02
552 +closing
553 +بدهکار ،مثبت بستانکار ،منفی = closing
554 +credit − debit + opening
555 +هر دو قرارداد عالمت را روی داده بسنج؛
556 +آنی که C-01 را روی ٔهم ها‌ردیف و C-
557 +02 و C-06 را برقرار کند انتخاب
558 +شود‌می
559 +14 of 12 Page
560 +
561 +---
562 +
563 +## صفحهٔ 13
564 +
565 +تنها توقف :مجاز خطر تغییر یا از دست رفتن ٔداد ،منبع یا تضاد مستقیم با AGENTS.md . در این دو حالت
566 +وضعیت را گزارش کن و روی ٔبقی کارهای مستقل ادامه .بده
567 +نقش مالک در تمام این مسیر فقط یکی :است پذیرش نهایی فاز ۹ روی ٔداد .واقعی
568 +.۱۸ قالب گزارش پایان هر کار
569 +و ،لینک فهرست دقیق های‌فایل PR ٔشمار head، کامل SHA remote، ٔپای ،تأییدشده ٔشاخ SHA
570 +، NONE یا artifact/release شواهد Actions، GitHub ،یافته‌تغییر دستورهای تست و ،نتیجه لینک اجرای
571 +GitHub independent for Ready تأیید: عدم تغییر های‌داده ،منبع های‌ریسک ،مانده‌باقی و ٔجمل پایانی
572 +merged. not review;
573 +کد
574 +تصمیم فرض‌پیش
575 +روش اثبات یا اصالح
576 +مقیاس و OD-03
577 +گرد کردن
578 +ذخیره و محاسبه به ریال کامل بدون گرد
579 +کردن؛ نمایش در مقیاس همان صورت
580 +رسمی؛ گرد کردن half-up فقط در
581 +خروجی
582 +مقیاس را از ارقام
583 +official_statements تشخیص
584 +بده؛ اختالف گرد کردن بین ها‌ردیف و
585 +جمع با روش ترین‌بزرگ باقیمانده
586 +تخصیص و ثبت شود
587 +قالب OD-04
588 +ها‌صورتٔ
589 +ًعین ،ها‌سرفصل ترتیب و شمار
590 +های‌یادداشت صورت رسمی؛ استانداردهای
591 +حسابداری ایران
592 +هیچ ردیفی ساخته یا حذف نشود؛ هر
593 +مغایرت قالب با فایل رسمی باگ است
594 +جریان OD-05
595 +وجوه نقد
596 +همان روشی که در صورت رسمی به کار
597 +رفته؛ اگر از ساختار ها‌ردیف معلوم ،نشد
598 +غیرمستقیم
599 +ردیفی که از لجر اشتقاق‌قابل نیست
600 +فقط با Adjustment شده‌ثبت و منبع
601 +وارد شود؛ C-10 باید برقرار باشد
602 +صورت OD-06
603 +تلفیقی
604 +خارج از ؛V1 فقط معماری مانع آن نشود
605 +( company_id )جا‌همه
606 +هیچ قابلیت تلفیقی نساز
607 +OD-07
608 +چندکاربری
609 +نصب‌تک و ماشین‌تک با چند کاربر و نقش V1
610 +؛ دسترسی SQLiteزمان‌هم محلی روی
611 +V1 چندماشینی خارج از
612 +تست مهاجرت و مدل روی
613 +PostgreSQL در CI برای مسیر آینده
614 +اختالف OD-08
615 +تاریخی
616 +هر اختالف با صورت رسمی در
617 +docs/discrepancies.json ثبت شود
618 +،ردیف( مبلغ ،ما مبلغ ،رسمی ،علت )شواهد
619 +اختالف بدون ِعل مستند و بازتولیدپذیر
620 += باگ تا اثبات خالف؛ فهرست نهایی را
621 +مالک بار‌یک در پذیرش نهایی فاز( )۹
622 +امضا ،کند‌می نه حین کار
623 +سایر ها‌ابهام و
624 +Q1–Q7 قبلی
625 +ترین‌کارانه‌محافظه :گزینه آنی که تأیید را
626 +مسدود ،کند‌می نه آنی که اجازه دهد‌می
627 +با های‌گزینه ردشده؛ در صورت ADR
628 +جدید اصالح ADR شواهد ،بهتر تصمیم با
629 +شود
630 +14 of 13 Page
631 +
632 +---
633 +
634 +## صفحهٔ 14
635 +
636 +.۱۹ ها‌ممنوعیت
637 +اختراع مقدار ٔنتیج/فرمول/نگاشت/مالی تست؛ ویرایش های‌داده منبع؛ ادغام PR خود؛ دورزدن کنترل یا
638 +کردن‌غیرفعال تست برای سبزشدن؛ افزودن وابستگی بدون ؛ADR commit فایل باینری ،بزرگ ZIP/EXE
639 +یا رمز؛ استفاده از شبکه در زمان اجرا؛ بازگرداندن کد #7 PR بدون دستور صریح؛ افزودن مستند تحلیلی
640 +جدید در ریشه؛ ادعای تمام« »شد بدون شواهد .بررسی‌قابل
641 +14 of 14 Page
docs/booklet/MANIFEST.json new
+11
@@ -0,0 +1,11 @@
1 +{
2 + "reference": "BOOKLET_v1.0.md",
3 + "original_filename": "کتابچهٔ اجرایی تکمیل Aram.pdf",
4 + "original_format": "PDF",
5 + "original_sha256": "7dd508274babd604f74d10b692464ce42f26a88c4a7116cfd861188abd4a2baf",
6 + "original_size_bytes": 745088,
7 + "page_count": 14,
8 + "extraction_tool": "pymupdf",
9 + "extraction_method": "per-line whitespace-token reversal (visual RTL -> logical reading order)",
10 + "note": "Original binary not committed (§19); SHA-256 is the integrity anchor. Mission B0.1 referenced docx; the actual provided source is PDF."
11 +}
docs/discrepancies.json new
+13
@@ -0,0 +1,13 @@
1 +{
2 + "purpose": "OD-08 / D1: one-by-one record of every difference between an officially produced statement figure and the booklet's official statement, with a cause and evidence. An uncaused difference is a bug. Numbers are never 'corrected' here — only an Adjustment (B4) or a discrepancy record is permitted (booklet §6.7, §12.60, D1/D2).",
3 + "status": "SKELETON (B0). Populated one-by-one in B8 from golden/UAT 1403+1404, including the current 1404 UAT differences.",
4 + "record_schema": {
5 + "row": "Statement/note row identifier as it appears in the official statement (e.g. BS note '12-1', IS line label).",
6 + "our_amount": "Amount our engine produced, exact integer rial (string to preserve >2^53).",
7 + "official_amount": "Official statement amount, exact integer rial (string).",
8 + "cause": "Root-cause explanation. Empty/uncaused => treated as a bug, not an accepted discrepancy.",
9 + "evidence": "Pointer to proof: source file + SHA-256 + sheet + row, calculation_run_id, or ADR/Adjustment reference.",
10 + "year": "Fiscal year (Jalali), e.g. 1403 or 1404."
11 + },
12 + "records": []
13 +}
docs/handoff/LATEST_HANDOFF.md
+20 -76
@@ -2,52 +2,30 @@
2
3 > Durable accepted-state record with persistent role assignments and recovery workflow.
4 > GitHub remote evidence remains authoritative. Always fetch the live branch head and open PRs before acting; recorded SHAs are verified events, not perpetual current-head claims.
5 +> Handoff cadence: refreshed at the end of each B-category (B0…B12) and on governance change, not after every commit (booklet §0.5; ADR-026).
6
7 ## Accepted repository state
8
9 - Repository: davoodmehraban89/Aram
9 -- Canonical branch: source-data-cleanup
10 -- Recorded accepted control event: [PR #18](https://github.com/davoodmehraban89/Aram/pull/18), reviewed head `fcbeb7387218e9ab294318ae462ed59de717fc95`, squash merge `f213d321ff4cd7d3d6fa65ba78dc48f090ee846b` at `2026-08-25T06:46:16Z`.
11 -- Durable post-merge record: [PR #19](https://github.com/davoodmehraban89/Aram/pull/19), reviewed head `b9059592409606a0a4f11a71c30778cff158b6b6`, squash merge `77f9f595ccfe67a87b11024ff0f6143629dba438` at `2026-08-25T06:57:02Z`.
12 -- Earlier accepted work includes PR #1, #4, #6, #8, #10, #12, #13, and #15.
13 -- PR #7, PR #9, PR #16, and PR #17 are closed without merge and contribute no accepted code.
14 -- [Issue #14](https://github.com/davoodmehraban89/Aram/issues/14) is completed. [Issue #11](https://github.com/davoodmehraban89/Aram/issues/11) records Gate 3 as ready for a new focused task definition.
15 -- No user-ready V1 release, tag, ZIP, EXE, or retained release artifact is accepted or proven.
10 +- Canonical branch: `source-data-cleanup`
11 +- **Live accepted head: `46253c94405abd065dfc5e8cf080b295cb83cde4`** — squash merge of [PR #96](https://github.com/davoodmehraban89/Aram/pull/96) at 2026-12-03T15:22:02Z (owner final acceptance).
12 +- **Release tag `v1.0.0`** → `46253c94405abd065dfc5e8cf080b295cb83cde4` (owner-authorized, pre-mission). Author does not tag (§19).
13 +- Post-merge CI on accepted head: [Backend #47137691800](https://github.com/davoodmehraban89/Aram/actions/runs/47137691800) ✅, [Frontend #47137691857](https://github.com/davoodmehraban89/Aram/actions/runs/47137691857) ✅.
14 +- Booklet Phases 0–9 are **VERIFIED_AND_MERGED** at this head (319 backend tests; see `PROJECT_STATUS.md`).
15 +- Earlier accepted control events: PR #1/#4/#6/#8/#10/#12/#13/#15/#18/#19/#20/#21. Closed-unmerged PR #7/#9/#16/#17 contribute no accepted code (reference only).
16 +- Authoritative work order: «کتابچهٔ اجرایی تکمیل Aram» v1.0 at `docs/booklet/BOOKLET_v1.0.md` (SHA-256 anchor in `docs/booklet/MANIFEST.json`, ADR-025).
17
17 -## Accepted Gate 2A evidence
18 +## Active mission — B0…B12 remediation
19
19 -- PR: https://github.com/davoodmehraban89/Aram/pull/15
20 -- Base: `source-data-cleanup@7c7533ee87146dc8fc78b46ebf423be55532c7eb`
21 -- Reviewed PR head: `74b6a6397a2a2c9199a5c7bcf818bb661b2ebe06`
22 -- Squash merge: `4ab54f4a3cf666827fa1ed30c4e43259ea79f2d4`
23 -- Final GitHub Actions: https://github.com/davoodmehraban89/Aram/actions/runs/32712900800
24 -- CI conclusion: success; 52 passed, 1 warning; Alembic upgrade/downgrade and compileall succeeded.
25 -- Accepted capabilities: governed Pilot workbook v0.1 contract, approved blank template, reproducible generator, and deterministic read-only in-memory preflight.
26 -- Template path: `samples/Aram_Pilot_Input_and_Mapping_Template_v0.1.xlsx`
27 -- Independently recomputed SHA-256: `e14a7feb80a216d79ed9cb6dde2b0df3e55317f3da6b26efc77f7118f4702b6f`
28 -- Protected boundary: PR #15 changed no canonical XLSX/PDF, `data/`, database, financial-source, workflow, migration, desktop/release, ZIP, or EXE path.
20 +One focused PR per category, strictly sequential (next only after prior acceptance). Executor only; independent reviewer separate; no "done" without evidence (§19). Ambiguities closed via §17 (default + proof + ADR), never by querying the owner. `data/` + `samples/` read-only with before/after tree-hash evidence per PR. No merge, no tag, no binaries/secrets committed.
21
30 -## Accepted PR #18 control evidence
22 +- **B0 (this PR, IN_PROGRESS):** booklet version-controlled + manifest (ADR-025); `PROJECT_STATUS.md` rewritten to GitHub reality; 14 root analytical docs → `docs/archive/`; AGENTS.md ↔ §0.5 conflict resolved, handoff cadence → per-category (ADR-026); `docs/discrepancies.json` skeleton.
23 +- **B1…B12:** NOT_IMPLEMENTED; see the category table in `PROJECT_STATUS.md` for scope. B12 history rewrite BLOCKED absent explicit owner directive.
24
32 -- Base: `source-data-cleanup@4ab54f4a3cf666827fa1ed30c4e43259ea79f2d4`
33 -- Reviewed head: `fcbeb7387218e9ab294318ae462ed59de717fc95`
34 -- Squash merge: `f213d321ff4cd7d3d6fa65ba78dc48f090ee846b`
35 -- Exact changed files: `PROJECT_STATUS.md`, `docs/PROJECT_LOG.md`, `docs/handoff/LATEST_HANDOFF.md`, `docs/handoff/MASTER_RECOVERY_PROMPT.md`
36 -- Verification: complete remote four-file diff and metadata reviewed; append-only project-log behavior and protected-data boundary confirmed.
37 -- GitHub Actions: none on the reviewed head; documentation-only paths did not trigger Backend CI.
38 -- Artifacts/releases: `NONE`
39 -- Protected boundary: no application code, tests, workflow, migration, dependency, workbook content, financial data, binary, ZIP, EXE, artifact, or release file changed.
40 -- Acceptance authority: Davood explicitly authorized the merge after independent review.
25 +### B0 protected-data evidence
26
42 -## Accepted PR #19 control evidence
43 -
44 -- Base: `source-data-cleanup@f213d321ff4cd7d3d6fa65ba78dc48f090ee846b`
45 -- Reviewed head: `b9059592409606a0a4f11a71c30778cff158b6b6`
46 -- Squash merge: `77f9f595ccfe67a87b11024ff0f6143629dba438`
47 -- Exact changed files: `PROJECT_STATUS.md`, `docs/PROJECT_LOG.md`, `docs/handoff/LATEST_HANDOFF.md`
48 -- Verification: complete remote three-file diff, append-only log, whitespace, protected-data boundary, and post-merge accepted-head state passed.
49 -- GitHub Actions: none on the reviewed head; documentation-only paths did not trigger Backend CI.
50 -- Artifacts/releases: `NONE`
27 +- `data/` tree `2ef8a512523f62f0cf84c5009f141be2f8a9cb5f`, `samples/` tree `00aba54b1dc30485ba9b164c8036a7b4bbe9020e` — unchanged before/after (B0 is docs/process only).
28 +- Working branch `arena/094f314c-aram` aligned to accepted base `46253c9` via merge (no force-push).
29
30 ## Durable role-based operating model
31
@@ -56,55 +34,21 @@
34 - Introduced through: [PR #20](https://github.com/davoodmehraban89/Aram/pull/20)
35 - Davood is Project Owner and the accounting/product authority.
36 - ChatGPT chat is Operational Coordinator: recovery, task scoping, implementation prompts, first-pass review, and copy-ready handoffs.
59 -- Jules is the primary Implementation Agent: exact-base focused implementation, tests, Draft PR, and evidence; it never merges its own PR.
60 -- Codex Work is Senior Technical Supervisor, Independent Reviewer, and Authorized Maintainer: technical sequencing, remote evidence review, conflict resolution, exceptional critical fixes, acceptance decisions, and routine merges under standing delegation.
37 +- Implementation agent (Arena/Jules): exact-base focused implementation, tests, PR, and evidence; never merges its own PR.
38 +- Independent reviewer / authorized maintainer: technical sequencing, remote evidence review, conflict resolution, acceptance decisions, and merges under owner delegation.
39 - GitHub is the evidence source of truth.
40 - Accounting ambiguity, material scope, protected-data changes, releases, destructive actions, credentials, and new external authority remain Davood escalation points.
41 - A repository mismatch pauses only the affected task without edits; it does not halt the project.
42
65 -## Closed superseded work
66 -
67 -- PR #16 was closed without merge on 2026-08-25.
68 -- It duplicated accepted PR #15, used stale base `7c7533ee87146dc8fc78b46ebf423be55532c7eb`, was dirty, and recorded incorrect merge SHA `35d45c3f200672a6ef97f13a84cf7c823ecf1bb8`.
69 -- No file or claim from PR #16 is accepted.
70 -
71 -## Closed Gate 3 / Gate 2B reference
72 -
73 -- PR: https://github.com/davoodmehraban89/Aram/pull/17
74 -- Base: `source-data-cleanup@7c7533ee87146dc8fc78b46ebf423be55532c7eb`
75 -- Head: `4f8648add0e2ed60f01753e979fa3fbe9ccf0f18`
76 -- Final state: closed without merge on 2026-08-25; its code is not accepted.
77 -- GitHub reports 12 changed files although the PR narrative names only 9.
78 -- Backend CI run #31 succeeded with 51 tests on the stale branch head; that does not prove compatibility with accepted Gate 2A.
79 -- Use PR #17 only as reference. Do not reopen, revive, or merge it.
80 -- Comprehensive Mapping Excel import/export, carry-forward, unknown-account queue, note/sub-note mapping, management UI, reproducible Windows packaging, and end-to-end Pilot acceptance remain unimplemented.
81 -
43 ## Governance and release reality
44
45 - GitHub remote evidence outranks this record and every agent report.
46 - The accepted branch is currently unprotected; explicit review discipline is mandatory.
86 -- There are no accepted Git tags or GitHub Releases.
47 +- Tag `v1.0.0` exists on `46253c9` (owner pre-mission authorization); no further tagging without owner directive.
48 - Canonical financial XLSX/PDF and source data remain protected.
49 - Green CI on an unmerged PR is not acceptance evidence.
89 -- No Gate 3 implementation candidate is accepted or active.
90 -
91 -## Active V1-01 safety-gate candidate
92 -
93 -- Verified base: `source-data-cleanup@b1ddee87d31ee73b3a5aeac8f9953d0a604c206a`
94 -- Working branch: `codex/v1-01-safety-gate-hardening`
95 -- Draft PR: [#21](https://github.com/davoodmehraban89/Aram/pull/21)
96 -- Independently reviewed implementation head: `700d800dbd9c657f6bd510faafedcbde4847fafd`.
97 -- Earlier exact-head candidate: `aba10b61c770ce319b1b67d960a4f0a1057e25f6`; [Backend CI #36](https://github.com/davoodmehraban89/Aram/actions/runs/32989551021) succeeded.
98 -- A later documentation-triggered [Backend CI #38](https://github.com/davoodmehraban89/Aram/actions/runs/33015151139) exposed a flaky message-specific reparent assertion: protection fired correctly, but through the equally valid parent-company invariant.
99 -- Stabilized candidate: `b3dc8b3a18934ffe63f615e4f650248be21a5f9c`; the single test assertion now accepts either valid `cannot be mutated` protection message without changing product behavior.
100 -- Latest verified CI: [Backend CI #39](https://github.com/davoodmehraban89/Aram/actions/runs/33015277194), success on `b3dc8b3a18934ffe63f615e4f650248be21a5f9c`; 67 tests passed, migration upgrade/downgrade and compile succeeded.
101 -- Purpose: close the independently reproduced protected-year deletion/mutation and Pilot-preflight false-negative defects before any Mapping/UI expansion.
102 -- Planned changed files: `index.html`, `PROJECT_STATUS.md`, `backend/src/aram_backend/models.py`, `backend/src/aram_backend/pilot_workbook.py`, `backend/tests/test_models.py`, `backend/tests/test_pilot_workbook.py`, `docs/PROJECT_LOG.md`, `docs/handoff/LATEST_HANDOFF.md`.
103 -- Local evidence at preparation: 67 pytest tests passed; isolated Alembic upgrade/downgrade and compileall passed; focused Ruff and mypy checks passed.
104 -- Protected boundary: no canonical financial data, workbook, PDF, database, financial value, binary, ZIP, EXE, tag, or release is in scope.
105 -- Independent-review decision: code, scope, diff, and protected-data boundary passed. CI #38 later revealed only a nondeterministic error-message assertion; CI #39 passed after the one-line assertion stabilization.
106 -- Status: `IN_PROGRESS`; this durable-document reconciliation records the complete CI sequence. The resulting documentation-only head must be re-fetched and compared with `b3dc8b3a18934ffe63f615e4f650248be21a5f9c` before Ready/Squash Merge.
50 +- Windows EXE not built; clean-machine install log + §14 UAT signature pending (Phase 9 release checklist, owner).
51
52 ## Single next action
53
110 -Publish this requested two-document reconciliation on PR #21 and route the resulting documentation-only head back to the independent reviewer. The reviewer must confirm that only `PROJECT_STATUS.md` and `docs/handoff/LATEST_HANDOFF.md` changed after the CI-verified stabilized head `b3dc8b3a18934ffe63f615e4f650248be21a5f9c`, verify the final workflow result, then Ready/Squash Merge. Do not begin Gate 3 Mapping until V1-01 is accepted.
54 +Independent GitHub review of the B0 PR (booklet reference + lightweight-process reconciliation). After B0 acceptance, start B1 (security fail-closed) from the new accepted head. Do not merge or tag; do not begin B1 before B0 acceptance.