Skip to content

Sub-Domain Blueprint: Unified Knowledge

Domain: Unified (audit, communications, identity, library, notifications, search, signals, vault, workflow) Logical Sub-Domain: Knowledge (Composite) Physical Packages: @sd/mod-unified-vault, @sd/mod-unified-library, @sd/mod-unified-communications Related Documents: Data Definition Context: This document defines the Process Models and Mandate for the Knowledge stack. Status: Stable (v2.5)

1. Mandate

The Knowledge Sub-Domain provides the enterprise-wide infrastructure for Information Lifecycle Management. It is responsible for the secure storage of documents (Vault), the structured organization of content (Library), and the facilitation of human-to-human discussion (Communications). It serves all verticals (Finance, Community, Ops).

2. Capabilities

Capability Description Component
Document Retention Storing files with strict legal retention policies (e.g., 7-year Tax Records). Vault
Secure Signing cryptographic signing and immutability checks for contracts/minutes. Vault
SOP Management Structured "Books" and "Topics" for operational procedures. Library
Discussion Forums Threaded posts and comments for community engagement. Communications
Cross-Linkage Creating "Knowledge Graphs" linking Docs to Assets or Users. Shared

3. Process Models

A. Vault: Ingestion & Retention (High Assurance)

Happy Path for saving a high-value Legal Document.

sequenceDiagram
    participant User
    participant Service as VaultService
    participant Storage as GoogleCloudStorage
    participant DB as Firestore (VaultRecord)

    User->>Service: upload(file, type="contract", retention="7_year")
    Service->>Storage: uploadFile(blob)
    Storage-->>Service: return (url, hash)
    Service->>DB: createRecord({ url, hash, expiresAt: NOW+7yr })
    DB-->>Service: return RecordID
    Service-->>User: Upload Complete (ID: 123)

B. Library: Publishing Workflow

Ensuring SOPs are reviewed before going live.

sequenceDiagram
    participant Editor
    participant Service as LibraryService
    participant DB as Firestore

    Editor->>Service: createTopic(bookId, title="Pool Safety", status="draft")
    Service->>DB: save({ ..., version: 1 })
    Editor->>Service: updateTopic(id, content="...")
    Editor->>Service: publishTopic(id)
    Service->>DB: update({ status: "active", publishedAt: NOW, version: 2 })
    Service->>Editor: Topic Live

4. State Machines

Discussion Post Lifecycle (CommPost)

stateDiagram-v2
    [*] --> Draft
    Draft --> Published: User Publishes
    Published --> Archived: Mod Archives / User Deletes
    Published --> Hidden: Reported & Flagged
    Hidden --> Published: Mod Approves
    Hidden --> [*]: Mod Confirms Delete

5. Interface Definitions

VaultService

  • createRecord(data: VaultRecord): Promise<VaultRecord>
  • getRecord(id: string): Promise<VaultRecord | null>
  • listByUnit(unitId: string): Promise<VaultRecord[]>
  • signRecord(id: string, userId: string): Promise<void>

LibraryService

  • createBook(data: Book): Promise<Book>
  • createTopic(topic: Topic): Promise<Topic>
  • listTopics(bookId: string): Promise<Topic[]>

CommunicationService

  • createChannel(data: Channel): Promise<Channel>
  • createPost(data: Post): Promise<Post>
  • listPosts(channelId: string): Promise<Post[]>