Mirrored from https://github.com/davoodmehraban89/Aram.git
Synced Dec 4, 13:00 UTC
source-data-cleanup
add-index-html-10623938925177053894
arena/094f314c-aram
arena/2d4eda07-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 | # ADR-027 — Booklet 2 adoption: course correction + general-platform architecture |
| 2 | |
| 3 | - Status: Accepted (C0) |
| 4 | - Date: 2026-12-03 |
| 5 | - Booklet: booklet 2 (all sections); booklet 1 §17 (OD-01..OD-08 remain valid), §18, §19 |
| 6 | |
| 7 | ## Context |
| 8 | |
| 9 | The owner delivered booklet 2 v2.0 («اصلاح مسیر و معماری نهایی Aram»), verbatim at |
| 10 | `docs/booklet/BOOKLET_v2.0.md` (SHA-256 anchor in `MANIFEST.json`). It supersedes the |
| 11 | conflicting parts of booklet 1 and supplements the rest, and asks the agent to never |
| 12 | query the owner (ambiguities closed via booklet 2 §14). |
| 13 | |
| 14 | **Base reconciliation (honesty, الف4):** booklet 2 cites "PR #96 (head 2fce09d)" — the |
| 15 | pilot/browser-edition head. The live accepted head is `46253c94405abd065dfc5e8cf080b295cb83cde4` |
| 16 | (squash merge of PR #96, phases 0–9). The browser-edition files booklet 2 targets are |
| 17 | present in **both** heads, so the course correction applies to the current tree. The |
| 18 | §0.2 base check passes (live head = `46253c9`). The stale head label is recorded here; |
| 19 | GitHub reality is authoritative (AGENTS.md). |
| 20 | |
| 21 | ## Decision |
| 22 | |
| 23 | ### Roadmap: C0…C10 (+ optional C11) supersedes the B0…B12 framing |
| 24 | |
| 25 | Booklet 2 §13 defines the governing roadmap **C0…C10**; the revised appendix adds |
| 26 | **C11** (optional AI assistant, off by default, never generates numbers — ADR-029). The earlier B0…B12 categories |
| 27 | are folded into it (B0 groundwork → C0; B1 security → C8; B2 money/UI → C7; B3 controls |
| 28 | → C3; B4 data model → C1/C4; B5 import → C4; B6 mapping → C2/C6; B7 outputs → C7; |
| 29 | B8 golden/registry → C1/C3; B9 CI → C9; B10 backup → C8; B11 drift/layout → C0/C4; |
| 30 | B12 large files → C9). B0's deliverables (booklet reference, archive, status rewrite, |
| 31 | discrepancy skeleton, process ADRs) are C0-compatible and retained. One focused PR per |
| 32 | phase task, ≤ ~1,500 changed lines excluding tests/generated data (الف5); PR body must |
| 33 | match `git diff --stat` and the real head (الف4). |
| 34 | |
| 35 | ### Automatic decisions OD-09…OD-14 (booklet 2 §14) adopted |
| 36 | |
| 37 | - **OD-09** SQL Server driver: **REVISED by the owner's appendix (2026-12-03): |
| 38 | `pyodbc` with the existing ODBC driver is preferred** (target environment is |
| 39 | Windows + SQL Server); `python-tds` (pure-Python) is the fallback for offline |
| 40 | packaging where no ODBC driver exists. Proof gate unchanged: connection + |
| 41 | 100k-row extraction in C5; switch if unstable. See ADR-029. |
| 42 | - **OD-10** adapter language: YAML validated by JSON Schema; round-trip test + precise |
| 43 | Persian error messages (C4). |
| 44 | - **OD-11** plugin execution: separate process for Connectors; if it blocks Windows |
| 45 | packaging, same-process with restricted permissions + a new ADR (C4/C9). |
| 46 | - **OD-12** data level: trial-balance default; document-level optional, only after C6 and |
| 47 | only if a note cannot be computed without document detail. |
| 48 | - **OD-13** concurrency: single local install for V1; multi-user server out of scope; |
| 49 | PostgreSQL exercised in CI for the future path. |
| 50 | - **OD-14** similar tools: inspiration only; no code/brand/content copied; capability |
| 51 | comparison recorded in an ADR. |
| 52 | - Other ambiguities: most conservative option (the one that blocks approval) + ADR with |
| 53 | rejected options. |
| 54 | |
| 55 | ### Generality rule (ب1, non-negotiable) |
| 56 | |
| 57 | No company name, account code, heading, or industry constant in source code; these live |
| 58 | only in `packs/` and the database. An automated grep test enforces this (added with the |
| 59 | packs work in C6; the rule is recorded now and in `AGENTS.md`). Company/industry-specific |
| 60 | content (including the current transmission-company pack) is **data**, never a code default. |
| 61 | |
| 62 | ### databansoft.ir appendix — owner-studied catalog (revised 2026-12-03) |
| 63 | |
| 64 | The agent cannot reach `databansoft.ir` from this sandbox (allowlist: github.com / |
| 65 | npmjs / pypi hosts). The **owner** studied the official Databan catalog (fall 1405 |
| 66 | edition) and revised the appendix in a second message: it is a marketing document, |
| 67 | its claims are unverified, and it is inspiration only. The positioning decision |
| 68 | (independent product + Host Integration API), the OD-14 capability comparison, the |
| 69 | accepted elements (priority order), the OD-09 revision, phase C11 (optional AI |
| 70 | assistant), and the rejected scope are recorded in **ADR-029**. No Databan |
| 71 | code/text/design/name/brand is copied. |
| 72 | |
| 73 | ## Proof |
| 74 | |
| 75 | - Booklet 2 verbatim in `MANIFEST.json` with revision history: initial SHA-256 |
| 76 | `9738f8049703ca63ea6eae471538cdadc6328e4f15efaaf87a250315e516e2fc`; current (revised |
| 77 | appendix) SHA-256 `79618dddb3de9bde195b8253880593b2900389369150c917d81b97006762823a`. |
| 78 | - Live head verified `46253c9`; browser files present (`webapp/`, `docs/{app.js,index.html,bridge.py,styles.css,py,vendor}`, `scripts/build_webapp.py`, `.github/workflows/pilot-pages.yml`). |
| 79 | - Persistent core is the main path: `domain/{controls,money,hierarchy,formula,normalization}.py` + `statement_api`/`admin_api` on `LedgerBalance`; golden tests `test_golden.py`, `test_domain_controls.py`, `test_approval_gate.py` present (الف2/الف3). |
| 80 | |
| 81 | ## Consequences |
| 82 | |
| 83 | - C0 (this PR) executes الف1 (browser removal, ADR-028), الف6 (`docs/PR_TRIAGE.md`), |
| 84 | الف4/الف5 (process rules in `AGENTS.md`), and records الف2/الف3/الف7 status. |
| 85 | - Subsequent phases follow C1…C10 with evidence recorded in `PROJECT_STATUS.md` before |
| 86 | advancing. No merge, no tag, no runtime network, no company-specific code (§16). |