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

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

Synced Dec 4, 04:15 UTC

C0 addendum: booklet 2 appendix revision (owner) + ADR-029

- appendix replaced verbatim: Databan catalog studied by owner (marketing, unverified); positioning = independent pluggable product + Host Integration API; accepted elements 1-10; rejected scope; legal restriction - OD-09 REVISED: pyodbc-first (existing ODBC driver, Windows+SQL Server), python-tds fallback (ADR-027 updated, ADR-029) - ADR-029: positioning, OD-14 capability comparison, element->phase mapping (C4-C9/C11), C11 AI constraints (never generates numbers) - PROJECT_STATUS: C5/C7/C8/C9 scope notes + C11 row + positioning; PROJECT_LOG + handoff updated - BOOKLET_v2.0.md re-anchored: SHA-256 79618ddd...; MANIFEST.json revision history kept - docs-only addendum; code identical to tested C0 tree (backend 319 passed, frontend green); data/ + samples/ unchanged Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>

davoodmehraban89 committed Dec 3, 2026 at 20:08 UTC 78b561218a7ef4e6c0647d7f05cd15f676369660
7 files changed +180 -22
PROJECT_STATUS.md
+8 -6
@@ -49,7 +49,7 @@ Earlier accepted control events remain part of history: PR #1/#4/#6/#8/#10/#12/#
49
50 ## Active mission — booklet 2 course correction + C0…C10 roadmap
51
52 -Booklet 2 v2.0 («اصلاح مسیر و معماری نهایی Aram», [`docs/booklet/BOOKLET_v2.0.md`](docs/booklet/BOOKLET_v2.0.md), ADR-027) **supersedes** the conflicting parts of booklet 1 and the earlier B0…B12 framing; it defines the governing roadmap **C0…C10** below. One focused PR per phase task, ≤ ~1,500 changed lines excluding tests/generated data (الف‌5); PR body must match `git diff --stat` + real head (الف‌4). Executor only; independent reviewer separate; no "done" without evidence (§19). Ambiguities closed via booklet 2 §14 (default + proof + ADR, OD-01..OD-14), never by querying the owner. `data/` + `samples/` read-only with before/after tree-hash evidence per PR. No merge, no tag, no runtime network, no company-specific code (§16).
52 +Booklet 2 v2.0 («اصلاح مسیر و معماری نهایی Aram», [`docs/booklet/BOOKLET_v2.0.md`](docs/booklet/BOOKLET_v2.0.md), ADR-027; appendix revised by owner 2026-12-03 — positioning + Host Integration API + accepted elements, ADR-029) **supersedes** the conflicting parts of booklet 1 and the earlier B0…B12 framing; it defines the governing roadmap **C0…C10 + optional C11** below. Positioning: Aram is an independent, pluggable financial-statement preparation/control/audit engine with a Host Integration API (REST + permissions) for future embedding; government systems (مودیان/IMED/trade), bank-invoice processing, form builder/cartable are rejected scope; messenger bots for financial data prohibited (ADR-029). One focused PR per phase task, ≤ ~1,500 changed lines excluding tests/generated data (الف‌5); PR body must match `git diff --stat` + real head (الف‌4). Executor only; independent reviewer separate; no "done" without evidence (§19). Ambiguities closed via booklet 2 §14 (default + proof + ADR, OD-01..OD-14), never by querying the owner. `data/` + `samples/` read-only with before/after tree-hash evidence per PR. No merge, no tag, no runtime network, no company-specific code (§16).
53
54 | Phase | Scope (summary) | State |
55 |---|---|---|
@@ -58,12 +58,13 @@ Booklet 2 v2.0 («اصلاح مسیر و معماری نهایی Aram», [`docs/
58 | C2 | Mapping + notes (booklet 1 phases 2–3) | NOT_IMPLEMENTED |
59 | C3 | Four statements BS/IS/EQ/CF + all controls C-01..C-15 + two-year comparison + 1403 | NOT_IMPLEMENTED |
60 | C4 | Connector framework + FileConnector: plugin model, manifest, Conformance Suite, Adapter, snapshot + reconciliation | NOT_IMPLEMENTED |
61 -| C5 | DB Connector: SQLite/PostgreSQL then SQL Server (OD-09), test DB in CI, read-only source user | NOT_IMPLEMENTED |
62 -| C6 | Data packs + generalization: template/mapping packs; "second synthetic company" CI proof (ب‌1/ب‌8) | NOT_IMPLEMENTED |
63 -| C7 | Full UI + outputs (booklet 1 phases 5–6 on new model): exact-rial Persian UI, PDF/XLSX | NOT_IMPLEMENTED |
64 -| C8 | Security + audit (booklet 1 phase 7 + ب‌10): pilot API auth, Argon2id, DPAPI vault, encrypted backup, plugin allowlist | NOT_IMPLEMENTED |
65 -| C9 | Packaging + deployment (booklet 1 phase 8 + SBOM/signing): offline Windows, CI gates, large-file manifest | NOT_IMPLEMENTED |
61 +| C5 | DB Connector: SQLite/PostgreSQL then SQL Server (**OD-09 revised: pyodbc-first**, python-tds fallback — ADR-029), test DB in CI, read-only source user | NOT_IMPLEMENTED |
62 +| C6 | Data packs + generalization: template/mapping packs; "second synthetic company" CI proof (ب‌1/ب‌8); document level only after C6 (OD-12) | NOT_IMPLEMENTED |
63 +| C7 | Full UI + outputs (booklet 1 phases 5–6 on new model): exact-rial Persian UI, PDF/XLSX; work center; print templates w/ letterhead + statutory ledgers (روزنامه/کل); Ctrl+K search; group dashboard; Host Integration API surface (ADR-029) | NOT_IMPLEMENTED |
64 +| C8 | Security + audit (booklet 1 phase 7 + ب‌10): pilot API auth, Argon2id, DPAPI vault, encrypted backup, plugin allowlist; multi-layer access (module←company←year←row/field); source-drift detection → «نیازمند بازبینی»; dry-run; nightly document audit C-16+ (optional, post-C6) | NOT_IMPLEMENTED |
65 +| C9 | Packaging + deployment (booklet 1 phase 8 + SBOM/signing): offline Windows, CI gates, large-file manifest; signed updates w/ auto-rollback + in-app backup/restore; Windows drift service | NOT_IMPLEMENTED |
66 | C10 | Acceptance: Shadow Run on a real period of two companies + owner signature | NOT_IMPLEMENTED |
67 +| C11 | AI assistant (optional, OFF by default): understands questions only, **never generates numbers** — figures only from engine + approved CalculationRun with lineage; read-only, local/anonymized, audited (ADR-029) | NOT_IMPLEMENTED (optional) |
68
69 ### C0 progress (بخش الف)
70
@@ -73,6 +74,7 @@ Booklet 2 v2.0 («اصلاح مسیر و معماری نهایی Aram», [`docs/
74 - **الف‌4/الف‌5 (PR honesty/size):** rules added to `AGENTS.md`; this PR body matches the diff.
75 - **الف‌6 (PR triage):** DONE — `docs/PR_TRIAGE.md` (ADOPT #81/#89/#92; CLOSE NO-GO #82/#88; SUPERSEDED #90/#91 + #22–#80 backlog).
76 - **الف‌7 (exit criteria):** CI green at accepted head; `PROJECT_STATUS.md` consistent with head; golden 1404 core notes reconcile rial-for-rial, remaining diffs to be recorded one-by-one in `docs/discrepancies.json` (C1/C3). See residual risks.
77 +- **Appendix revision (owner, 2026-12-03 second message):** Databan catalog studied by owner (marketing, unverified; agent has no site access); positioning + Host Integration API recorded (ADR-029); **OD-09 revised to pyodbc-first** (python-tds fallback); accepted elements mapped to C4–C9/C11; C11 added (optional AI assistant, OFF by default, never generates numbers); rejected scope binding; booklet 2 markdown re-anchored (revision history in `MANIFEST.json`).
78
79 ## Phase 9 UAT evidence (real source_1404.xlsx, read-only)
80
docs/PROJECT_LOG.md
+13
@@ -396,3 +396,16 @@ Each new entry must record: UTC timestamp, actor, task/phase, base branch and SH
396 - Tests: removal touches no backend/frontend code; suites unaffected (319 backend / 11 frontend at accepted head); local re-run recorded in PR.
397 - Artifacts/releases: NONE committed. Acceptance: IN_PROGRESS; author does not merge or tag.
398 - Next: independent review of C0 (PR #97, re-scoped from B0); C1 starts only after C0 acceptance with evidence in PROJECT_STATUS.
399 +
400 +### 2026-12-03T20:20:00Z — C0 addendum: booklet 2 appendix revision (owner) + ADR-029
401 +
402 +- Actor: Arena agent (implementation); trigger: owner re-sent booklet 2 with a rewritten appendix ("این کتابچه اصلاحی رو پیش ببر")
403 +- Appendix now records: Databan catalog (fall 1405) studied by owner — marketing claims, unverified, inspiration only; Databan does NOT prepare financial statements (Aram's gap); positioning = independent pluggable product + Host Integration API (REST + permissions); commercial cooperation out of agent scope
404 +- OD-09 REVISED per owner directive: pyodbc with existing ODBC driver preferred (Windows + SQL Server target); python-tds fallback; 100k-row proof gate unchanged (ADR-027 updated, ADR-029)
405 +- Accepted elements mapped: multi-layer access control (C8), source-drift nightly detection → «نیازمند بازبینی» (C8/C9), nightly document audit C-16+ (optional post-C6, OD-12), work center (C7), dry-run (C4/C8), signed updates + auto-rollback + in-app backup/restore (C9), letterhead print templates + statutory ledgers + Ctrl+K (C7), AI assistant C11 (optional, OFF by default, never generates numbers, engine+CalculationRun lineage only, read-only, local/anonymized, audited), multi-company group dashboard (C6/C7; consolidation next version)
406 +- Rejected scope binding: مودیان/IMED/trade system/bank-invoice+document reader/form builder/cartable; messenger bots for financial data prohibited (notifications without figures only)
407 +- Agent has no access to databansoft.ir (sandbox allowlist); no independent capability claims made; no Databan code/text/design/name/brand copied
408 +- docs/booklet/BOOKLET_v2.0.md appendix replaced verbatim (list numbering normalized, disclosed in header); new SHA-256 79618dddb3de9bde195b8253880593b2900389369150c917d81b97006762823a; MANIFEST.json keeps revision history (initial 9738f804…)
409 +- ADR-029 added (positioning, OD-14 comparison table, element→phase mapping, OD-09 revision, C11 constraints); PROJECT_STATUS roadmap updated (C5/C7/C8/C9 notes + C11 row)
410 +- Protected data: data/ + samples/ trees unchanged (docs-only addendum). Code state identical to C0 commit 6e3fe70 (backend 319 passed / frontend green run on that tree)
411 +- Acceptance: IN_PROGRESS; author does not merge or tag. Next: push C0 (both commits), update PR #97 body to match diff (الف‌4), independent review
docs/adr/ADR-027-booklet-v2-course-correction.md
+20 -10
@@ -20,9 +20,10 @@ GitHub reality is authoritative (AGENTS.md).
20
21 ## Decision
22
23 -### Roadmap: C0…C10 supersedes the B0…B12 framing
23 +### Roadmap: C0…C10 (+ optional C11) supersedes the B0…B12 framing
24
25 -Booklet 2 §13 defines the governing roadmap **C0…C10**. The earlier B0…B12 categories
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;
@@ -33,8 +34,11 @@ match `git diff --stat` and the real head (الف‌4).
34
35 ### Automatic decisions OD-09…OD-14 (booklet 2 §14) adopted
36
36 -- **OD-09** SQL Server driver: default `python-tds` (pure-Python, offline packaging);
37 - `pyodbc` fallback. Proof gate: connection + 100k-row extraction in C5; switch if unstable.
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
@@ -55,16 +59,22 @@ only in `packs/` and the database. An automated grep test enforces this (added w
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
58 -### databansoft.ir appendix — not accessible from this environment
62 +### databansoft.ir appendix — owner-studied catalog (revised 2026-12-03)
63
60 -The sandbox network allowlist permits only github.com / npmjs / pypi hosts; `databansoft.ir`
61 -is **not** reachable. No capability claims are made (the booklet makes none either). The
62 -booklet takes precedence. If access becomes available, only observable capabilities will be
63 -listed and compared against ب‌3..ب‌6 in a follow-up ADR; no code/text/design/brand copied (OD-14).
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
67 -- Booklet 2 verbatim + SHA-256 `9738f8049703ca63ea6eae471538cdadc6328e4f15efaaf87a250315e516e2fc` in `MANIFEST.json`.
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
docs/adr/ADR-029-positioning-host-integration.md new
+101
@@ -0,0 +1,101 @@
1 +# ADR-029 — Positioning vs Databan: Host Integration API, accepted elements, OD-09 revision
2 +
3 +- Status: Accepted (C0)
4 +- Date: 2026-12-03
5 +- Booklet: booklet 2 revised appendix (owner message 2026-12-03, second), ب‌3..ب‌6,
6 + ب‌10, §14 (OD-09, OD-12, OD-14), §16
7 +
8 +## Context
9 +
10 +The owner studied the official Databan catalog (fall 1405 edition) and revised the
11 +booklet-2 appendix. Per the owner: Databan is a smart layer on top of existing
12 +accounting-software ledgers — it reads ledgers directly, runs on the company's own
13 +server (Windows + SQL Server), brings multiple companies into one template, and its
14 +domain is reports, dashboards, alerts, automation, and government systems. **It does
15 +not prepare financial statements.** These are marketing claims from a promotional
16 +document; the agent has not verified them (`databansoft.ir` is unreachable from this
17 +sandbox's network allowlist) and makes no independent capability claims. Inspiration
18 +only; no Databan code, text, design, name, or brand is copied (OD-14, §16, appendix
19 +legal restriction).
20 +
21 +## Decision
22 +
23 +### Positioning (owner decision, recorded)
24 +
25 +Aram is an **independent product with a pluggable core** and a **Host Integration
26 +API** (REST contract + permissions) so it can later be embedded as a module inside a
27 +data platform. Any commercial cooperation with Databan or similar vendors is outside
28 +the agent's scope. The gap Aram fills: the **preparation, control, and audit engine
29 +for financial statements** — which the catalog says Databan does not provide.
30 +
31 +Implementation note: the Host Integration API contract is designed alongside the
32 +plugin API (C4) and exposed with the API surface (C7); it reuses the single
33 +authorization policy (below), never a parallel permission model.
34 +
35 +### OD-14 capability comparison (owner-provided catalog description, unverified)
36 +
37 +| Capability | Databan (per catalog, unverified) | Aram (booklet 2) |
38 +|---|---|---|
39 +| Read accounting-software ledgers directly, no source mutation | Yes | Yes — Connectors + read-only safety (ب‌4/ب‌5, C4/C5) |
40 +| Runs on the company's own server (Windows + SQL Server) | Yes | Yes — offline Windows default; SQL Server source via pyodbc (C5/C9) |
41 +| Multi-company in one template | Yes | Yes — packs + group dashboard (ب‌8, C6/C7); consolidation next version |
42 +| Reports / dashboards / alerts / automation | Yes | Statements, work center, drift alerts, nightly jobs (C7/C8) |
43 +| Government systems (مودیان/IMED/trade) | Yes | **Rejected — out of scope** (appendix) |
44 +| **Financial-statement preparation + controls + audit** | **No** | **Yes — the core product** (C1–C3) |
45 +
46 +### OD-09 revision (owner directive supersedes the §14 default)
47 +
48 +Target environment is Windows + SQL Server with an existing ODBC driver, so
49 +**`pyodbc` is preferred**; `python-tds` (pure-Python) is the fallback for offline
50 +packaging where no ODBC driver exists. Proof gate unchanged: connection test +
51 +100k-row extraction in C5; switch if unstable. (Evidence/directive over default, §14.)
52 +
53 +### Accepted elements → phase mapping (appendix priority order)
54 +
55 +1. **Direct ledger reads without source mutation** → confirms ب‌4/ب‌5 (C4/C5); OD-09 revised above.
56 +2. **Multi-layer access control** (module ← company ← fiscal year ← row/field), one
57 + policy across API, UI, exports, and any AI module → extends ب‌10 (C8).
58 +3. **Source-drift detection**: nightly Windows-service job re-measures source sums +
59 + hash after snapshot approval; added/modified/deleted documents dated in an approved
60 + year ⇒ alert + audit record + year moved to «نیازمند بازبینی» (needs-review);
61 + approved output never changes automatically → C8 (detection) + C9 (Windows service).
62 +4. **Nightly document-level audit** (optional, only with a document-level connector):
63 + unbalanced, probable-duplicate, large-amount, modified/deleted documents; feeds new
64 + controls **C-16+** → after C6 per OD-12; control catalog extension registered in C3.
65 +5. **Work center**: one page for everything awaiting the user (unknown accounts, failed
66 + controls, approval/reopen requests, source drift) → C7.
67 +6. **Dry-run** for every extraction and automated job (result shown, zero effect) → C4/C8.
68 +7. **Signed updates with automatic rollback + in-app backup/restore** → C9 (+ C8 backup).
69 +8. **Print templates with company letterhead** for statements, statutory ledger exports
70 + (روزنامه/کل), supporting tables; global **Ctrl+K** search → C7.
71 +9. **AI assistant — phase C11, optional, OFF by default**: understands questions only,
72 + **never generates numbers**; figures come only from the engine and an approved
73 + CalculationRun with lineage; read-only; local model or anonymization of person/company
74 + names before any external service; every query audited; AI mapping suggestions remain
75 + suggestions with mandatory human approval (ب‌8 unchanged) → C11.
76 +10. **Multi-company** with one template + group dashboard; consolidated statements in a
77 + later version → C6/C7 (consolidation out of V1).
78 +
79 +### Rejected scope (appendix, binding)
80 +
81 +مودیان, IMED, comprehensive trade system, bank-invoice processing and document reading,
82 +generic form builder and cartable. Messenger bots for financial data are **prohibited by
83 +default**; if ever needed, notifications only, **without figures**.
84 +
85 +## Proof
86 +
87 +- Revised appendix verbatim in `docs/booklet/BOOKLET_v2.0.md`, SHA-256
88 + `79618dddb3de9bde195b8253880593b2900389369150c917d81b97006762823a` (revision history in
89 + `MANIFEST.json`).
90 +- Owner directive is the evidence source for the catalog description; agent network
91 + allowlist excludes `databansoft.ir` (no independent verification claimed).
92 +- Roadmap updated in `PROJECT_STATUS.md` (C5/C7/C8/C9 scope notes + C11 row).
93 +
94 +## Consequences
95 +
96 +- C5 connector work starts from pyodbc; the pure-Python fallback stays available for
97 + driverless offline machines (ADR required if the proof gate fails).
98 +- The needs-review year status and C-16+ controls enter the data-model/control design
99 + in C3/C8; no approved output is ever mutated automatically (P-01/D-07 preserved).
100 +- C11 is optional and gated: no number ever originates from an AI model; lineage and
101 + audit are mandatory; default OFF.
docs/booklet/BOOKLET_v2.0.md
+23 -2
@@ -1,7 +1,9 @@
1 # کتابچهٔ ۲ — اصلاح مسیر و معماری نهایی Aram
2
3 > **سند مرجعِ version-controlled (نسخهٔ ۲٫۰).** متنِ زیر عیناً دستور کارِ مالک است که
4 -> در پیام 2026-12-03 ارائه شد. این کتابچه جایگزین بخش‌های متناقض کتابچهٔ ۱ و مکمل بقیهٔ
4 +> در پیام 2026-12-03 ارائه شد (پیوست در پیام دوم همان روز اصلاح شد: مطالعهٔ کاتالوگ
5 +> دیتابان، تصمیم موقعیت‌یابی، عناصر پذیرفته‌شده، اصلاح OD-09، فاز C11). شماره‌گذاری
6 +> فهرست‌ها برای مارک‌داون نرمال شده؛ محتوا بدون تغییر است. این کتابچه جایگزین بخش‌های متناقض کتابچهٔ ۱ و مکمل بقیهٔ
7 > آن است. لنگر یکپارچگی: SHA-256 همین فایل در `MANIFEST.json` (منبع: پیام مالک، بدون فایل اصلی).
8 > مبنا: بررسی PR #96 و مخزن davoodmehraban89/Aram. مالک خواسته است ایجنت **هیچ سؤالی نپرسد**؛
9 > ابهام‌ها با قواعد بخش ۱۴ بسته می‌شوند.
@@ -167,4 +169,23 @@ Aram نباید ابزار یک شرکت (مثلاً انتقال گاز) باش
169
170 ## پیوست — ایدهٔ مرجع: databansoft.ir
171
170 -مالک این سایت را به‌عنوان الهام برای اتصال دیتابیس‌محور معرفی کرده است. نگارندهٔ این کتابچه نتوانست صفحهٔ آن را بارگذاری کند، پس هیچ ادعایی دربارهٔ قابلیت‌های آن نوشته نشده است. اگر خودت به آن دسترسی داری، فقط قابلیت‌های قابل‌مشاهده را فهرست کن و در ADR با بخش‌های ب‌۳ تا ب‌۶ مقایسه کن؛ کد، متن، طراحی و برند آن هرگز کپی نشود. هرجا تفاوتی بود، این کتابچه مقدم است مگر اینکه شواهدی بهتر ارائه شود.
172 +کاتالوگ رسمی دیتابان (ویرایش پاییز ۱۴۰۵) مطالعه شد. این سند تبلیغاتی است؛ ادعاهایش راستی‌آزمایی نشده و فقط **الهام** است. دیتابان لایه‌ای هوشمند روی دفاتر نرم‌افزار حسابداری فعلی است: مستقیم از دفاتر می‌خواند، روی سرور خود شرکت (Windows و SQL Server) اجرا می‌شود، چند شرکت را در یک قالب می‌آورد و حوزه‌اش گزارش، داشبورد، هشدار، خودکارسازی و سامانه‌های دولتی است. **صورت مالی تهیه نمی‌کند.** پس Aram رقیب مستقیم آن نیست؛ جای خالی‌اش همین است: موتور تهیه، کنترل و ممیزی صورت‌های مالی.
173 +
174 +**تصمیم موقعیت‌یابی:** Aram محصول مستقل با هستهٔ افزونه‌پذیر است و یک **Host Integration API** (قرارداد REST + مجوزها) دارد تا بتواند در آینده به‌عنوان ماژول داخل یک پلتفرم داده جا بگیرد. هر همکاری تجاری با دیتابان یا مشابه آن خارج از دامنهٔ ایجنت است.
175 +
176 +**عناصر پذیرفته‌شده (به ترتیب اولویت):**
177 +
178 +1. **خواندن مستقیم از دفاتر نرم‌افزار حسابداری بدون تغییر در آن** (تأیید ب‌۴ و ب‌۵). چون محیط هدف Windows و SQL Server است، OD-09 اصلاح می‌شود: pyodbc با درایور ODBC موجود اولویت دارد و python-tds جایگزین است.
179 +2. **کنترل دسترسی چندلایه:** ماژول ← شرکت ← سال مالی ← ردیف/فیلد، با یک سیاست واحد در API، UI، خروجی‌ها و هر ماژول هوش مصنوعی (افزودن به ب‌۱۰).
180 +3. **تشخیص رانش منبع (Source Drift):** پس از تأیید snapshot، یک کار شبانه (سرویس Windows) مجموع‌ها و hash منبع را دوباره می‌سنجد. اگر سندی با تاریخ سال تأییدشده اضافه، اصلاح یا حذف شده بود: هشدار، ثبت در audit و انتقال سال به وضعیت «نیازمند بازبینی»؛ خروجی تأییدشده هرگز خودکار تغییر نمی‌کند.
181 +4. **حسابرسی شبانهٔ سطح سند** (اختیاری، فقط اگر Connector سطح سند دارد): سند ناتراز، تکراری احتمالی، مبلغ کلان، سند اصلاح/حذف‌شده؛ خروجی آن به کنترل‌های Aram وصل شود (C-16 به بعد).
182 +5. **مرکز کارها:** یک صفحه برای همهٔ موارد منتظر کاربر: حساب‌های ناشناخته، کنترل‌های ناموفق، درخواست‌های تأیید/بازگشایی، رانش منبع.
183 +6. **اجرای آزمایشی (Dry-run)** برای هر استخراج و کار خودکار: نتیجه بدون هیچ اثری نمایش داده شود.
184 +7. **به‌روزرسانی امضاشده با بازگشت خودکار** و پشتیبان/بازیابی داخل برنامه (کتابچهٔ ۱ بخش ۱۳ و فاز C9).
185 +8. **قالب چاپ با سربرگ شرکت** برای صورت‌ها، خروجی دفاتر قانونی (روزنامه و کل) و جدول‌های پشتیبان، و جستجوی سراسری Ctrl+K.
186 +9. **دستیار هوش مصنوعی (فاز C11، اختیاری، پیش‌فرض خاموش):** هوش مصنوعی فقط پرسش را می‌فهمد و **هیچ عددی را تولید نمی‌کند**؛ اعداد فقط از موتور و یک CalculationRun تأییدشده با منبع (lineage) می‌آیند. فقط‌خواندنی، با مدل محلی یا ناشناس‌سازی نام اشخاص و شرکت پیش از ارسال به هر سرویس بیرونی، و ثبت هر پرسش در audit. پیشنهاد نگاشت با هوش مصنوعی هم فقط «پیشنهاد» است و تأیید انسانی الزامی می‌ماند (بدون تغییر ب‌۸).
187 +10. **چندشرکتی** با یک قالب و داشبورد گروه؛ صورت تلفیقی در نسخهٔ بعد.
188 +
189 +**خارج از دامنه (رد شد):** سامانهٔ مودیان، IMED، سامانهٔ جامع تجارت، پردازش صورتحساب بانکی و سندخوان، فرمساز و کارتابل عمومی. بات پیامرسان برای داده مالی پیش‌فرض ممنوع است؛ در صورت نیاز فقط اعلان بدون ارقام.
190 +
191 +**محدودیت حقوقی:** کپی کد، متن، طراحی، نام و برند دیتابان ممنوع است؛ هر قابلیت باید مستقل طراحی و ثبت شود. در تضاد، ب‌۱ تا ب‌۱۲ و بخش ۱۴ مقدم‌اند مگر شواهد بهتری ارائه شود.
docs/booklet/MANIFEST.json
+13 -3
@@ -17,9 +17,19 @@
17 "reference": "BOOKLET_v2.0.md",
18 "source": "Owner message 2026-12-03 (chat text; no original file)",
19 "original_format": "verbatim chat text",
20 - "markdown_sha256": "9738f8049703ca63ea6eae471538cdadc6328e4f15efaaf87a250315e516e2fc",
21 - "markdown_size_bytes": 23389,
22 - "note": "Verbatim owner work order. Supersedes conflicting sections of booklet 1 and supplements the rest. Integrity anchor is the SHA-256 of this markdown. See ADR-027."
20 + "markdown_sha256": "79618dddb3de9bde195b8253880593b2900389369150c917d81b97006762823a",
21 + "markdown_size_bytes": 28045,
22 + "note": "Verbatim owner work order (list numbering normalized for markdown; content unchanged). Supersedes conflicting sections of booklet 1 and supplements the rest. Integrity anchor is the SHA-256 of this markdown. See ADR-027 and ADR-029.",
23 + "revisions": [
24 + {
25 + "markdown_sha256": "9738f8049703ca63ea6eae471538cdadc6328e4f15efaaf87a250315e516e2fc",
26 + "note": "Initial owner message 2026-12-03; appendix: site not loaded by booklet author, no capability claims."
27 + },
28 + {
29 + "markdown_sha256": "79618dddb3de9bde195b8253880593b2900389369150c917d81b97006762823a",
30 + "note": "Owner revision 2026-12-03 (second message): Databan catalog (fall 1405) studied by owner; positioning decision + Host Integration API; accepted elements 1-10; OD-09 revised to pyodbc-first; phase C11 (optional AI assistant, off by default, never generates numbers); rejected-scope list; legal restriction."
31 + }
32 + ]
33 }
34 ]
35 }
docs/handoff/LATEST_HANDOFF.md
+2 -1
@@ -20,7 +20,8 @@
20 Booklet 2 v2.0 (`docs/booklet/BOOKLET_v2.0.md`, ADR-027) supersedes conflicting parts of booklet 1 and the B0…B12 framing; governing roadmap is **C0…C10** (see `PROJECT_STATUS.md`). One focused PR per phase task, ≤ ~1,500 changed lines excl. tests/generated data (الف‌5); PR body matches `git diff --stat` + real head (الف‌4). Executor only; independent reviewer separate; no "done" without evidence (§19). Ambiguities closed via booklet 2 §14 (OD-01..OD-14), never by querying the owner. `data/` + `samples/` read-only with before/after tree-hash evidence per PR. No merge, no tag, no runtime network, no company-specific code (§16).
21
22 - **C0 (this PR, IN_PROGRESS — re-scoped from B0):** الف‌1 browser-edition removal (ADR-028); الف‌2 persistent core verified main path; الف‌3 phase 0/1 + golden 1404 verified merged; الف‌4/5 PR honesty/size + generality + offline rules in AGENTS.md; الف‌6 `docs/PR_TRIAGE.md`; الف‌7 exit criteria; booklet 1+2 references + manifests. B0 deliverables (archive, status rewrite, discrepancy skeleton, ADR-025/026) retained as C0-compatible.
23 -- **C1…C10:** NOT_IMPLEMENTED; see the phase table in `PROJECT_STATUS.md`. C10 = Shadow Run two companies + owner signature. History rewrite / large-file migration BLOCKED absent owner directive (C9).
23 +- **C0 addendum (owner appendix revision, 2026-12-03):** Databan catalog studied by owner (marketing, unverified; no agent site access); positioning = independent pluggable product + Host Integration API; **OD-09 revised pyodbc-first** (python-tds fallback); accepted elements mapped to C4–C9/C11; rejected scope binding (government systems, bank invoices, form builder/cartable, messenger bots for financial data); ADR-029; booklet 2 re-anchored with revision history in MANIFEST.json.
24 +- **C1…C10 (+ optional C11):** NOT_IMPLEMENTED; see the phase table in `PROJECT_STATUS.md`. C10 = Shadow Run two companies + owner signature; C11 = optional AI assistant, OFF by default, never generates numbers (engine + approved CalculationRun lineage only). History rewrite / large-file migration BLOCKED absent owner directive (C9).
25
26 ### C0 protected-data evidence
27