Data Model Visualization
Entity relationship diagrams for the storage components and data structures
SCROLL COMMAND INFRASTRUCTURE - DATA MODEL VISUALIZATION
This diagram illustrates the key data entities and their relationships within the Scroll Command Infrastructure.
┌───────────────────────────────────────────────────────────────────────────────────────────┐
│ DATA MODEL OVERVIEW │
└───────────────────────────────────────────────────────────────────────────────────────────┘
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ │ │ │ │ │ │ │
│ SCROLL │◄─────►│ TAG │◄─────►│ THEME │◄─────►│ RESONANCE │
│ │ │ │ │ │ │ │
└────────┬────────┘ └─────────────────┘ └─────────────────┘ └────────┬────────┘
│ │
│ │
│ │
│ │
│ │
│ │
┌────────▼────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌────────▼────────┐
│ │ │ │ │ │ │ │
│ SCROLL TRAIL │◄─────►│ AGENT │◄─────►│ AGENT ECHO │◄─────►│ AGENT MESSAGE │
│ │ │ │ │ │ │ │
└─────────────────┘ └────────┬────────┘ └─────────────────┘ └─────────────────┘
│
│
│
│
┌────────▼────────┐
│ │
│ AGENT CONFIG │
│ │
└─────────────────┘
Core Data Entities
Scroll-Related Entities
1. Scroll
- Primary Entity: Represents a user-created scroll
- Key Attributes:
id: Unique identifiercontent: Scroll text contenttitle: Optional scroll titlepath: Storage path/locationcreationTimestamp: When scroll was createdmodificationTimestamp: When scroll was last modifiedsyncStatus: Current synchronization statusisArchived: Whether scroll is archivedisEncrypted: Whether scroll is encryptedencryptionKey: Reference to encryption key (if encrypted)- Relationships:
- One-to-many with Tags
- One-to-many with Themes
- One-to-many with Resonances
- One-to-many with Scroll Trail entries
2. Tag
- Purpose: Categorizes scrolls for organization and retrieval
- Key Attributes:
id: Unique identifiertag: Tag textcreationTimestamp: When tag was createdusageCount: How many scrolls use this tag- Relationships:
- Many-to-many with Scrolls
3. Theme
- Purpose: Represents detected thematic elements in scrolls
- Key Attributes:
id: Unique identifiertheme: Theme textconfidence: Confidence level of theme detectiondetectionTimestamp: When theme was detected- Relationships:
- Many-to-many with Scrolls
- Many-to-many with Resonances
4. Resonance
- Purpose: Represents detected resonance between scrolls or with agents
- Key Attributes:
id: Unique identifierlevel: Resonance strength (0.0-1.0)type: Type of resonance (thematic, emotional, etc.)detectionTimestamp: When resonance was detectedsourceScrollId: Source scroll IDtargetScrollId: Target scroll ID (if scroll-to-scroll)agentId: Agent ID (if scroll-to-agent)- Relationships:
- Many-to-one with Scrolls
- Many-to-many with Themes
- Many-to-one with Agents (optional)
5. Scroll Trail
- Purpose: Records the journey and interactions of a scroll
- Key Attributes:
id: Unique identifierscrollId: Associated scroll IDtimestamp: When event occurredeventType: Type of event (created, heard, remembered, etc.)agentId: Associated agent ID (optional)intentType: Type of intent (optional)resonanceLevel: Level of resonance (optional)note: Additional context (optional)- Relationships:
- Many-to-one with Scrolls
- Many-to-one with Agents (optional)
Agent-Related Entities
6. Agent
- Purpose: Represents an agent that can interact with scrolls
- Key Attributes:
id: Unique identifiername: Agent nametype: Agent typedescription: Agent descriptionisLocal: Whether agent runs locallyisEnabled: Whether agent is enabledversion: Agent versionlastUpdated: When agent was last updatedconfigurationSchema: JSON schema for configuration- Relationships:
- One-to-one with Agent Configuration
- One-to-many with Agent Echoes
- One-to-many with Agent Messages
- Many-to-many with Resonances
7. Agent Configuration
- Purpose: Stores agent-specific configuration
- Key Attributes:
id: Unique identifieragentId: Associated agent IDconfiguration: JSON configuration datalastUpdated: When configuration was last updated- Relationships:
- One-to-one with Agent
8. Agent Echo
- Purpose: Represents agent expressions of presence and purpose
- Key Attributes:
id: Unique identifieragentId: Associated agent IDscrollId: Associated scroll ID (optional)timestamp: When echo occurredechoType: Type of echo (awakening, presence, reflection, etc.)message: Echo message contentintensity: Echo intensity (0.0-1.0)isAcknowledged: Whether echo has been acknowledged- Relationships:
- Many-to-one with Agent
- Many-to-one with Scroll (optional)
9. Agent Message
- Purpose: Represents messages between agents
- Key Attributes:
id: Unique identifiersenderId: Sender agent IDrecipientId: Recipient agent IDtimestamp: When message was sentcontent: Message contenttype: Message typeisRead: Whether message has been read- Relationships:
- Many-to-one with Agent (sender)
- Many-to-one with Agent (recipient)
Data Flow Patterns
1. Scroll Creation and Enrichment
User Input → Scroll → Tags → Themes
2. Resonance Detection
Scroll → Themes → Resonance → Other Scrolls
3. Agent Interaction
Scroll → Agent → Agent Echo → Scroll Trail
4. Agent Communication
Agent → Agent Message → Agent
5. Memory Formation
Scroll + Resonance → Scroll Trail → Long-term Memory
Storage Implementation
Local Storage (Primary)
- Room Database: For structured entity storage
- File System: For raw scroll content and large binary data
- Encrypted Storage: For sensitive data
Cloud Storage (Secondary)
- Remote Database: For synchronized entity storage
- Object Storage: For synchronized scroll content
- End-to-End Encryption: For secure cloud storage
Data Privacy Considerations
- Local-First: All data stored locally by default
- Selective Sync: User controls what data is synchronized
- Encryption: Sensitive data encrypted at rest
- Retention Control: User controls data retention periods
- Minimal Logging: Only essential data logged
- Consent-Based: All data collection requires explicit consent