SIAR: Master Specification Execution Order & Dependency Matrix

Document Purpose: Authoritative, dependency-ordered execution roadmap for all 60 SIAR system specifications (33 Core Architecture Specifications + 27 UI/UX Specifications, totaling 12,893 numbered sections).
Source Directory: sys-arch/
Complements: ROADMAP.md (priority tracker) and SYS_ARCH_IMPLEMENTATION_STATUS_AND_REMAINING_SECTIONS.md.


1. Executive Summary & Ordering Principles

SIAR cannot be written in strictly numerical order (01 → 33 followed by ui-ux-01 → 27). Doing so breaks fundamental architectural dependencies:

  1. Inverted Security Dependency: Spec 28 (E2EE Key Management & Privacy) encrypts data carried by transports and storage; writing strictly 01 → 33 would delay cryptographic security until after building FFI (19), embedded Linux (20), and plugin sandboxes (22, 24).
  2. Inverted UI Dependency: Spec ui-ux-22 (Design System Tokens & Typography) defines the styling tokens that every view depends on; writing ui-ux-01 → 27 sequentially would build complex views like the timeline (05) and calls (07) before styling tokens even exist.
  3. Joint Vertical Slices: Complex subsystems (e.g., QR pairing, notifications, search, backup, calls) require that the backend core spec and frontend UI spec be implemented together to ensure end-to-end functionality.

The 7-Milestone Flowchart

┌──────────────────────────────────────────────────────────────────────────────────┐
│ MILESTONE 1: TIER 0 — HEADLESS CORE ENGINE (Specs 01 ➔ 09)                       │
│ Sequential: Envelopes ➔ Identity ➔ Routing ➔ Outbox ➔ Blobs ➔ DTN ➔ Recovery    │
│ Status: Spec 01 Done (100%), Spec 02 Active (88% §170–§179 done), Specs 03–09 Next│
└──────────────────────────────────────┬───────────────────────────────────────────┘
                                       ▼
┌──────────────────────────────────────────────────────────────────────────────────┐
│ MILESTONE 2: TIER 1 — SECURITY & KEY MANAGEMENT BACKBONE (Spec 28)              │
│ Double Ratchet, forward secrecy, MLS group crypto, key revocation envelopes      │
└──────────────────────────────────────┬───────────────────────────────────────────┘
                                       ▼
┌──────────────────────────────────────────────────────────────────────────────────┐
│ MILESTONE 3: TIER 2 — UI DESIGN FOUNDATION & APP SHELLS                          │
│ Written Together: Tokens (ui-ux-22) + Responsive Layout (23) + App Shells (02/03)│
│ + First-Run Wizard (25) + Security Center (ui-ux-15 finish §195–§221)            │
└──────────────────────────────────────┬───────────────────────────────────────────┘
                                       ▼
┌──────────────────────────────────────────────────────────────────────────────────┐
│ MILESTONE 4: TIER 2 — CORE CHAT & SOCIAL GRAPH UI                                │
│ Written Together: Inbox (04) + Timeline (05) + Composer (06) + Contacts (08)    │
│ + Groups (09) + File Transfers (10) + Degraded States (24) + Virtualization (26) │
└──────────────────────────────────────┬───────────────────────────────────────────┘
                                       ▼
┌──────────────────────────────────────────────────────────────────────────────────┐
│ MILESTONE 5: TIER 2 — JOINT FEATURE SLICES (Core Backend + UI Together)          │
│ • QR/NFC Pairing (15 + ui-ux-12)      • Realtime Calls (29/25/26 + ui-ux-07)     │
│ • Presence & Receipts (30 + ui-ux-14) • Local Search & FTS (32 + ui-ux-11)       │
│ • Push Notifications (31 + ui-ux-13)  • Backup & Migration (33 + ui-ux-16)       │
│ • Emergency SOS (17 + ui-ux-17)       • Network Diagnostics (18 + ui-ux-20)      │
│ • Settings & Data Controls (ui-ux-18)                                            │
└──────────────────────────────────────┬───────────────────────────────────────────┘
                                       ▼
┌──────────────────────────────────────────────────────────────────────────────────┐
│ MILESTONE 6: TIER 3 — TRANSPORTS, DAEMONS & PLATFORM INFRASTRUCTURE             │
│ Relays (11) + Multipath (12) + Battery (13) + Proximity BLE/Wi-Fi Direct (14)   │
│ + Headless Daemon (16) + Embedded Linux (20) + C-ABI (19) + Android Build (27)  │
└──────────────────────────────────────┬───────────────────────────────────────────┘
                                       ▼
┌──────────────────────────────────────────────────────────────────────────────────┐
│ MILESTONE 7: TIER 4 — EXTENSIBILITY, ECOSYSTEM & QUALITY GATES (Final)           │
│ Plugin Host (24 + ui-ux-19) + WASM (22) + Extensions (21) + Interoperability (23)│
│ + Accessibility (ui-ux-21) + Fuzzing Test Suite (10) + Release Quality Gates (27)│
└──────────────────────────────────────────────────────────────────────────────────┘

2. Milestone 1: Headless Core Engine (Tier 0 — Sequential 01 → 09)

Execution Strategy: Implemented strictly sequentially. These 9 foundational crates form the underlying communications and persistence engine. Each spec directly relies on the prior spec's types and contracts.

StepSpec DocumentSectionsCoverage / StatusPrimary CratesCore Focus
1.101-protocol-extension-system-architecture.md108108/108 (100%)siar-protocol-ext, siar-protocolEnvelope framing, version negotiation, capability headers
1.202-multi-device-identity-architecture.md204204/204 (100%)siar-identity-multidevice, siar-cryptoEd25519 root key, device certs, revocation, algorithm agility (§190–§204 complete)
1.303-transport-routing-policy-engine-architecture.md200200/200 (100%)siar-routing-policy, siar-connectivitySPEC COMPLETE: 19 rounds complete, 263/263 tests passing
1.404-offline-event-log-architecture.md9510/95 (11%)siar-event-log, siar-storageCrash-resilient transactional outbox, append-only log
1.505-robust-file-blob-subsystem-architecture.md21023/210 (11%)siar-blob-manifest, siar-storageBLAKE3 chunking, deduplication, resumable blob transfers
1.606-dtn-store-carry-forward-architecture.md19250/192 (26%)siar-dtn-bundle, siar-dtnDelay-tolerant bundle store, epidemic forwarding, anti-entropy
1.707-capability-negotiation-architecture.md16419/164 (12%)siar-capability, siar-protocolDynamic link capability exchange, transport handoffs
1.808-resource-limits-backpressure-architecture.md19356/193 (29%)siar-resource-limitsToken-bucket rate limiting, buffer caps, DoS defense
1.909-crash-recovery-architecture.md18615/186 (8%)siar-crash-recovery, siar-storageWAL verification, panic isolation, corrupted state repair

3. Milestone 2: Security & Key Management Backbone (Tier 1)

Execution Strategy: Before expanding user interfaces or high-level network services, the End-to-End Encryption (E2EE) and key management invariants are closed. Transports and storage built in Milestone 1 operate in zero-knowledge mode over ciphertext payloads defined here.

Spec DocumentSectionsCoverage / StatusPrimary CratesCore Focus
28-production-security-e2ee-key-management-privacy-architecture.md12746/127 (36%)siar-crypto, siar-crypto-mlsDouble Ratchet session ratchets, MLS group key agreements, safety numbers, key storage abstractions, privacy boundaries

4. Milestone 3: UI Design Foundation & App Shells (Written Together)

Execution Strategy: Frontend specifications cannot be built in numerical sequence (ui-ux-01 → 27). This milestone establishes the visual foundation, cross-platform layouts, desktop/mobile app shells, and identity management UI together.

Spec DocumentSectionsFocus / ResponsibilityTarget Applications
ui-ux-22-design-system-tokens-typography-icons-motion-architecture.md253Design tokens, color palette, typography scales, spacing, icon sets, transition physicsShared CSS / Dioxus tokens
ui-ux-01-product-foundation-cross-platform-interaction-architecture.md83Core interaction models, keyboard shortcuts, pointer/touch parity, accessibility foundationsCross-platform
ui-ux-23-responsive-adaptive-desktop-tablet-foldable-phone-layout-architecture.md223Breakpoint grid (compact, medium, expanded), adaptive sidebars, foldable hinge postureLayout engines
ui-ux-02-desktop-dioxus-app-shell-navigation-window-architecture.md227Desktop Dioxus application window, system tray, titlebar, multi-windowing, navigation railapps/desktop
ui-ux-03-android-jetpack-compose-app-shell-navigation-lifecycle-architecture.md217Android Compose / Dioxus mobile shell, edge-to-edge system bars, predictive back navigationapps/android
ui-ux-25-onboarding-first-run-permission-education-architecture.md209First-run setup, cryptographic account generation wizard, emergency identity backup reminderClient apps
ui-ux-15-security-center-devices-keys-recovery-architecture.md221184/221 (83%) Done — Complete remaining sections §195–§221: key recovery, device revocation UXcrates/siar-ui-state

5. Milestone 4: Core Chat & Social Graph UI (Written Together)

Execution Strategy: Implemented as a coherent frontend package on top of the Milestone 1 engine and Milestone 3 shells. Bridges siar-ui-state with the user interface.

Spec DocumentSectionsFocus / ResponsibilityTarget Crates / Apps
ui-ux-04-conversation-list-inbox-architecture.md213Conversation inbox, unread counts, pinned chats, search filter headers, swipe actionssiar-ui-state
ui-ux-05-conversation-message-timeline-architecture.md254Bubble timeline, delivery status icons (sending, sent, delivered, read), reply threadssiar-ui-state
ui-ux-06-message-composer-attachments-voice-notes-drafts-architecture.md309Text area, markdown formatting, voice note recording waveform, draft persistencesiar-ui-state
ui-ux-08-contacts-requests-verification-identity-architecture.md227Contact directory, contact cards, Safety Number QR comparison, block/unblock listssiar-ui-state
ui-ux-09-groups-membership-roles-architecture.md224MLS group info, member list, permission roles (Admin, Member, Read-Only), join linkssiar-ui-state
ui-ux-10-files-media-gallery-transfer-architecture.md161In-chat media viewer, transfer progress bars, auto-download controls, media gridsiar-ui-state
ui-ux-24-error-loading-empty-offline-degraded-state-architecture.md205Offline banners, store-and-forward queue badges, reconnect retry toasts, empty placeholdersClient apps
ui-ux-26-performance-virtualization-large-data-ui-architecture.md276Virtual windowing for 100,000+ message timelines, image memory caching, 60fps scrollingClient apps

6. Milestone 5: Joint Feature Slices (Backend Core + UI Written Together)

Execution Strategy: Specialized features implemented end-to-end. Each row represents a vertical slice: the backend core spec and its UI counterpart are coded and verified in the same development cycle.

Feature AreaBackend Architecture SpecFrontend UI / UX Architecture SpecCombined Scope & Description
1. QR & NFC Device Linkingsys-arch/15 (176 §)sys-arch/ui-ux-12 (237 §)Out-of-band device pairing, ephemeral SAS handshake, animated QR codes, NFC tap exchange
2. Ephemeral Presence & Typingsys-arch/30 (269 §)sys-arch/ui-ux-14 (197 §)Typing indicators, ephemeral TTL status, read receipts, privacy visibility toggle
3. Push & Background Lifecyclesys-arch/31 (308 §)sys-arch/ui-ux-13 (215 §)UnifiedPush/FCM token manager, lockscreen banners, background wakeups, call heads-up UI
4. Realtime Audio/Video Callingsys-arch/29 (275 §)
sys-arch/25 (213 §)
sys-arch/26 (220 §)
sys-arch/ui-ux-07 (235 §)Full media subsystem: SRTP/QUIC session protocol, Android MediaCodec zero-copy surface, pure-Rust audio DSP (AEC/AGC/Opus), and in-call controls UI
5. Local Search & Retrievalsys-arch/32 (242 §)sys-arch/ui-ux-11 (148 §)Privacy-preserving local full-text search (Tantivy/FTS), keyword highlighting, search filter UI
6. Encrypted Backup & Migrationsys-arch/33 (280 §)sys-arch/ui-ux-16 (223 §)Argon2id KDF passphrase encryption, streaming tarball import/export, cloudless device transfer wizard
7. Emergency SOS & Mesh Modesys-arch/17 (188 §)sys-arch/ui-ux-17 (240 §)Priority classes (P0 SOS preemption), broadcast beaconing, high-contrast disaster mode UI
8. Diagnostics & Path Tracingsys-arch/18 (206 §)sys-arch/ui-ux-20 (225 §)RTT latency tracking, hop-by-hop mesh graph visualization, developer log inspection panel
9. App Settings & Privacy UI(Covered by core crates)sys-arch/ui-ux-18 (219 §)Granular settings: data saver mode, auto-download rules, blocked contacts, notification priority

7. Milestone 6: Transports, Daemons & Hardware Infrastructure (Tier 3)

Execution Strategy: Broadens connectivity beyond standard internet IP/QUIC into direct ad-hoc peer-to-peer radio protocols, headless relay infrastructure, and embedded system builds.

Spec DocumentSectionsFocus / ResponsibilityTarget Components
11-relay-self-hosted-infrastructure-architecture.md194Self-hosted encrypted relay servers, NAT hole-punching fallbackapps/emergency-node
12-multipath-networking-architecture(1).md178Concurrent packet striping across Wi-Fi and Cellular, seamless interface migrationsiar-connectivity
13-battery-aware-scheduling-architecture.md145Battery state monitoring, scan duty cycle throttling, low-power mesh maintenancesiar-connectivity
14-proximity-abstraction-architecture.md131Proximity hardware abstraction: BLE GATT server/client, Wi-Fi Direct, Wi-Fi Awaresiar-transport-ble, siar-transport-wifi-direct
16-daemon-headless-runtime-architecture.md211Headless Unix daemon, systemd socket activation, local Unix domain socket IPCapps/emergency-node
20-embedded-linux-node-architecture.md230Minimal footprint OpenWrt, Raspberry Pi, solar-powered field station buildsapps/emergency-node
19-c-abi-ffi-architecture.md170Memory-safe C-ABI exports, UniFFI bridge generation for Android Kotlin / iOS Swiftcrates/siar-ffi
27-rust-driven-android-native-build-packaging-automation.md279Hermetic Android native compilation, automated jniLibs staging, cargo xtask build pipelinesapps/android

8. Milestone 7: Extensibility, Ecosystem & Quality Gates (Tier 4 — Final)

Execution Strategy: Third-party developer extensions, WebAssembly sandboxing, external chat bridges, and automated release quality gates. Intentionally reserved for the final phase to keep the core codebase lean and focused.

ComponentBackend / Quality SpecFrontend UI SpecScope / Description
Plugin Module Ecosystemsys-arch/24 (305 §)sys-arch/ui-ux-19 (266 §)Wasmtime sandbox host, capability-based permission prompts, plugin marketplace UI
WASM Targetssys-arch/22 (254 §)—Browser WASM build targets, WebCrypto integration, web worker concurrency
Third-Party Extensionssys-arch/21 (248 §)—Publisher manifest signatures, sandboxed extension execution
External Interoperabilitysys-arch/23 (255 §)—Conformance test suites for Matrix, Bifrost, and RFC protocol bridges
Accessibility (A11y)—sys-arch/ui-ux-21 (294 §)Screen reader semantic labeling, high-contrast modes, dynamic text reflow
Protocol Fuzzing Suitesys-arch/10 (207 §)—AFL / cargo-fuzz harness, property-based network partition simulation
UI Release Quality Gates—sys-arch/ui-ux-27 (274 §)Automated screenshot regression diffs, cross-platform interaction testing gates

9. Master Specification Inventory (All 60 Documents)

Core Architecture Specs (01–33) — 6,863 Sections

SpecTitleSectionsStatusMilestone
01Protocol Extension System108108/108 (100%)Milestone 1
02Multi-Device Identity204204/204 (100%)Milestone 1
03Transport & Routing Policy200200/200 (100%)Milestone 1
04Offline Event Log9510/95 (11%)Milestone 1
05Robust File Blob Subsystem21023/210 (11%)Milestone 1
06DTN Store-Carry-Forward19250/192 (26%)Milestone 1
07Capability Negotiation16419/164 (12%)Milestone 1
08Resource Limits & Backpressure19356/193 (29%)Milestone 1
09Crash Recovery18615/186 (8%)Milestone 1
10Fuzzing Protocol Test Suite2070/207 (0%)Milestone 7
11Relay Self-Hosted Infrastructure1940/194 (0%)Milestone 6
12Multipath Networking1780/178 (0%)Milestone 6
13Battery-Aware Scheduling1450/145 (0%)Milestone 6
14Proximity Abstraction1310/131 (0%)Milestone 6
15QR/NFC Bootstrap Pairing1760/176 (0%)Milestone 5
16Daemon Headless Runtime2110/211 (0%)Milestone 6
17Emergency Priority Classes1880/188 (0%)Milestone 5
18Network Diagnostics2060/206 (0%)Milestone 5
19C-ABI FFI Architecture1700/170 (0%)Milestone 6
20Embedded Linux Node2300/230 (0%)Milestone 6
21Third-Party Protocol Extensions2480/248 (0%)Milestone 7
22WASM-Compatible Components2540/254 (0%)Milestone 7
23External Interoperability Suite2550/255 (0%)Milestone 7
24Plugin Module Ecosystem3050/305 (0%)Milestone 7
25Android Zero-Copy Media2130/213 (0%)Milestone 5
26Rust-First Audio DSP2200/220 (0%)Milestone 5
27Android Native Packaging2790/279 (0%)Milestone 6
28Production Security & E2EE12746/127 (36%)Milestone 2
29Realtime Calls Media Session2750/275 (0%)Milestone 5
30Presence, Typing & Receipts2690/269 (0%)Milestone 5
31Notifications & Push Lifecycle3080/308 (0%)Milestone 5
32Search Indexing & Privacy2420/242 (0%)Milestone 5
33Backup, Restore & Archival2800/280 (0%)Milestone 5

UI/UX Specs (ui-ux-01–27) — 6,030 Sections

SpecTitleSectionsStatusMilestone
01Product Foundation Interaction830/83 (0%)Milestone 3
02Desktop Dioxus App Shell2270/227 (0%)Milestone 3
03Android Compose App Shell2170/217 (0%)Milestone 3
04Conversation List & Inbox2130/213 (0%)Milestone 4
05Message Timeline2540/254 (0%)Milestone 4
06Message Composer & Drafts3090/309 (0%)Milestone 4
07Realtime Calls UI2350/235 (0%)Milestone 5
08Contacts & Verification2270/227 (0%)Milestone 4
09Groups & Membership Roles2240/224 (0%)Milestone 4
10Files & Media Gallery1610/161 (0%)Milestone 4
11Search & Knowledge Retrieval1480/148 (0%)Milestone 5
12Nearby QR/NFC Pairing2370/237 (0%)Milestone 5
13Background Notifications UI2150/215 (0%)Milestone 5
14Presence & Typing Indicators1970/197 (0%)Milestone 5
15Security Center UI221184/221 (83%)Milestone 3
16Backup, Restore & Migration UI2230/223 (0%)Milestone 5
17Emergency SOS Mode UI2400/240 (0%)Milestone 5
18Settings & Privacy Controls2190/219 (0%)Milestone 5
19Plugin Ecosystem UI2660/266 (0%)Milestone 7
20Diagnostics & Developer UI2250/225 (0%)Milestone 5
21Accessibility & Inclusion2940/294 (0%)Milestone 7
22Design System Tokens & Theme2530/253 (0%)Milestone 3
23Responsive Adaptive Layout2230/223 (0%)Milestone 3
24Error, Degraded & Empty States2050/205 (0%)Milestone 4
25Onboarding & Key Wizard2090/209 (0%)Milestone 3
26Virtualized Large Data UI2760/276 (0%)Milestone 4
27UI Testing & Quality Gates2740/274 (0%)Milestone 7

10. Current Position & Immediate Execution Steps

Current Milestone: MILESTONE 1 (Tier 0: Headless Core Engine)
Current Document : Spec 04 (04-offline-event-log-architecture.md)
Target Crate     : crates/siar-event-log
Current Status   : 10 / 95 Sections (11% Reconciled)
  1. Completed Batches:
    • Spec 01: 108/108 (100%) — complete
    • Spec 02: 204/204 (100%) — complete
    • Spec 03: 200/200 (100%) — SPEC COMPLETE (19 rounds complete, 263/263 tests passing)
  2. Next Step: Proceed to Step 1.4: Spec 04 (04-offline-event-log-architecture.md):
    • Append-only transactional outbox & log engine (§11+)