Treasury & Bank Transfer Management System — سامانه مدیریت خزانهداری و حوالههای بانکی
phase-1-implementation
ci/public-windows-bridge-probe-20261017
ci/windows-dispatch-bootstrap-20261016
ci/windows-dual-app-lab-20261016
dev/v7-production-failclosed-20261021
feature/reconciliation-guard-20261013
main
phase-1-foundation
phase-1-implementation
phase-2-treasury-core
phase-3-banking-reconciliation
phase-4-operations-enterprise-ux
phase-5-hardening-release
phase-6-production-platform
phase-7-production-infrastructure-bank-golive
phase-7-sql-readonly-ux-20261015
transfer-exe-to-drive-20261006
| 1 | # TreasuryFlow Repository Operating Rules |
| 2 | |
| 3 | ## Product class |
| 4 | TreasuryFlow handles high-risk financial workflows. Correctness, traceability and safe failure take precedence over convenience. |
| 5 | |
| 6 | ## Source of truth |
| 7 | 1. `docs/specs/PHASE_1_FOUNDATION_SPEC.md` for current foundation invariants. |
| 8 | 2. `docs/ROADMAP.md` for phase boundaries. |
| 9 | 3. ADRs under `docs/adr/` for architectural decisions. |
| 10 | 4. Tests for executable behavior. |
| 11 | |
| 12 | ## Engineering rules |
| 13 | - TypeScript strict mode; avoid `any` at financial/domain boundaries. |
| 14 | - Money is integer IRR at the domain/storage boundary; never floating-point money. |
| 15 | - State transitions are explicit domain operations; UI may not write arbitrary status values. |
| 16 | - Authorization is enforced server-side for every sensitive action. |
| 17 | - No bank submission without an idempotency identity. |
| 18 | - No automatic retry after ambiguous bank outcome. |
| 19 | - No secret, credential, token or private banking material in Git, logs, fixtures or screenshots. |
| 20 | - Migrations are versioned and reviewed. |
| 21 | - External integrations sit behind typed adapters and contract tests. |
| 22 | - Iran-specific bank limits/cutoffs/capabilities are configuration with effective dates. |
| 23 | |
| 24 | ## Delivery rules |
| 25 | - Work on a feature/foundation branch; use PR review before merging to `main` once CI exists. |
| 26 | - Use TDD for domain rules and bug fixes. |
| 27 | - Every completed phase updates project state/handoff documentation. |
| 28 | - Do not claim production readiness from mocks or simulated bank responses. |
| 29 | - Live-bank activation, public production release, destructive data actions and sensitive access changes require explicit release authorization. |
| 30 | |
| 31 | ## Required checks before merge |
| 32 | - format/lint |
| 33 | - typecheck |
| 34 | - unit/integration tests |
| 35 | - build |
| 36 | - security-relevant negative tests for changed financial behavior |
| 37 | |
| 38 | ## Documentation language |
| 39 | Code identifiers and technical contracts are English. User-facing product copy is Persian-first. Architectural documents may be English or Persian but must use stable domain terms. |