@davoodmehraban89 / Factor-easy / commits / 3b38982
Fork 0

سامانه صدور فاکتور و حسابداری

Plan Office Slice C3 related archive graph

davoodmehraban89 committed Sep 30, 2026 at 19:15 UTC 3b38982986df7e44daeeeef1c655cad250063082
1 file changed +29
docs/superpowers/plans/2026-09-30-office-slice-c3-related-archive.md new
+29
@@ -0,0 +1,29 @@
1 +# Office Slice C3 — Related-Letter Graph + Archive Classification/Search Plan
2 +
3 +Date: 2026-09-30
4 +
5 +**Goal:** Add durable reply/related-letter relationships and server-authoritative archive classification/search without claiming OCR or external document-management integrations.
6 +
7 +## Scope
8 +- Append-only correspondence relation evidence: `reply_to` and `related`.
9 +- Prevent self-links, duplicate reply parents and reply cycles.
10 +- Append-only archive classification events (folder, classification code, tags) with latest-event semantics.
11 +- Server-filtered archive search over readable correspondence and structured classification metadata.
12 +- Office archive UI for folder/classification filters, classification action and relation creation.
13 +- No OCR-quality claim, no qualified signature, no external archive adapter.
14 +
15 +## Security invariants
16 +1. Both ends of a relation must be readable by the caller in the same organization.
17 +2. Relation/classification events are server-created `correspondenceAudit` evidence and inherit the direct-insert guard from C2.
18 +3. `reply_to` has at most one parent per source and cannot form a cycle.
19 +4. Archive classification requires `archive` or `configure` capability and never rewrites registration identity/history.
20 +5. Archive search returns only rows passing entitlement + membership + scope + confidentiality.
21 +6. Existing accounting/Golden, ELI-1/2/3/4 and Office C1/C2 gates remain green.
22 +
23 +## Delivery tasks
24 +- [ ] Commit failing C3 static + Real-DOM coverage first.
25 +- [ ] Apply and archive production migration for relations/classification/search.
26 +- [ ] Run rollback adversarial tests for cross-tenant/unreadable links, cycle/duplicate denial, classification authorization and search isolation.
27 +- [ ] Implement archive/relation UI and runtime integration.
28 +- [ ] Run full Quality/Real-DOM/Security/Pages.
29 +- [ ] Write C3 verification evidence and update canonical continuity/gap register.