سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 22:00 UTC
Plan Office Slice C2 actionable referrals
davoodmehraban89 committed
Sep 30, 2026 at 18:53 UTC
8538918d33c7c408dfcc4132a8c013bfe9ed5812
1 file changed
+32
docs/superpowers/plans/2026-09-30-office-slice-c2-actionable-referrals-sla.md
new
+32
@@ -0,0 +1,32 @@
1
+# Office Slice C2 — Actionable Referrals + SLA Work Queue Plan
2
+
3
+Date: 2026-09-30
4
+
5
+**Goal:** Turn the existing immutable referral event into a secure, actionable work lifecycle with target authorization, append-only acknowledgement/completion evidence and an SLA-aware shared work queue.
6
+
7
+## Scope
8
+- Harden referral creation so a sender cannot refer a letter to a member who is not authorized to read that correspondence.
9
+- Preserve referrals as immutable events; never mutate the original referral to represent workflow progress.
10
+- Add append-only referral actions (`acknowledged`, `completed`) as correspondence audit evidence.
11
+- Add a server-authoritative queue RPC that returns only referrals the caller may legitimately see (sender, target, or organization owner) with derived state and overdue status.
12
+- Add a real Office “ارجاعات و پیگیری” work surface and action buttons.
13
+- Keep templates/editor, signatures/approval, related-letter graph, OCR and external adapters out of C2.
14
+
15
+## Security invariants
16
+1. Effective access remains entitlement ∩ active membership/capability ∩ record scope ∩ confidentiality.
17
+2. Referral target eligibility is checked server-side against the source correspondence, not trusted from the UI.
18
+3. A referral recipient is bound to an active organization member and user.
19
+4. Only the referral target may acknowledge/complete it; organization ownership does not impersonate the recipient.
20
+5. Completion cannot precede acknowledgement and duplicate terminal actions are rejected.
21
+6. Referral/action evidence is append-only.
22
+7. Queue output is server-filtered; UI hiding is not authorization.
23
+8. Existing accounting/Golden, ELI-1/2/3/4 and Office C1 gates must remain green.
24
+
25
+## Delivery tasks
26
+- [ ] Commit failing C2 static + Real-DOM coverage first.
27
+- [ ] Add production migration with target-access helper, hardened referral v2 RPC, referral-action RPC and queue RPC.
28
+- [ ] Run transactional adversarial verification in Production and rollback all fixtures.
29
+- [ ] Archive the exact production migration in the repository.
30
+- [ ] Implement work-queue UI and referral action flow.
31
+- [ ] Run full Quality/Real-DOM/Security/Pages.
32
+- [ ] Write `docs/OFFICE_SLICE_C2_VERIFICATION.md`, update gap register and `PROJECT_STATE.md`.