سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 19:30 UTC
Plan Office Slice C5 internal approval
davoodmehraban89 committed
Oct 1, 2026 at 00:03 UTC
d7745a658b3c348e4eef8c7973a12a23f4400918
1 file changed
+34
docs/superpowers/plans/2026-09-30-office-slice-c5-internal-approval.md
new
+34
@@ -0,0 +1,34 @@
1
+# Office Slice C5 — Internal Approval / Attestation Lifecycle Plan
2
+
3
+Date: 2026-09-30
4
+
5
+**Goal:** Add a server-authoritative internal correspondence approval lifecycle with immutable request/decision evidence and explicit approver authorization, without misrepresenting it as a qualified digital signature.
6
+
7
+## Scope
8
+- Request approval for a readable registered correspondence from an active member who has Office `approve` capability and can read the letter.
9
+- One active approval request per correspondence at a time.
10
+- Append-only actions: `approval_requested`, then exactly one terminal `approval_approved` or `approval_rejected`.
11
+- A rejected letter may be reworked through the existing controlled correspondence path and submitted in a new approval request; old evidence remains immutable.
12
+- Only the assigned approver may decide the request.
13
+- Server work queue derives pending/approved/rejected and overdue state.
14
+- UI exposes «تأییدات داخلی», request action, approver queue and decision actions.
15
+- Record authenticated user, timestamp, note and session AAL claim as evidence metadata. AAL is evidence only in C5; C5 does not require MFA or claim qualified signature.
16
+
17
+## Security invariants
18
+1. Requester must have active entitlement, `edit` or `refer` capability, and read access to the source correspondence.
19
+2. Approver must be an active member with `approve` capability and independent read access to the source correspondence.
20
+3. Requester cannot assign self as approver.
21
+4. Only assigned approver may approve/reject.
22
+5. Direct client evidence inserts remain blocked by C2 evidence guard.
23
+6. Duplicate active requests and duplicate terminal decisions are rejected.
24
+7. Queue is server-filtered to requester/approver/owner while preserving correspondence access.
25
+8. Internal approval is not a qualified digital signature.
26
+9. All C1-C4, ELI and accounting/Golden gates remain green.
27
+
28
+## Delivery
29
+- [ ] RED: C5 static + Real-DOM tests.
30
+- [ ] GREEN: private definer implementation + public invoker wrappers, production migration and archived SQL.
31
+- [ ] Transactional adversarial production verification with rollback.
32
+- [ ] UI queue/request/decision integration.
33
+- [ ] Full Quality/Real-DOM/Security/Pages.
34
+- [ ] Verification doc, gap register and PROJECT_STATE.