Overview
Epic 6 implements Dreamweaving Operations - the vertical integration system that allows DreamNodes to incorporate external dependencies through Obsidian canvas parsing and git submodule management. This creates sovereign, self-contained DreamNodes that can be cloned without dependency issues.
Architecture
Core Components
-
Canvas Parser Service
- Parses Obsidian
.canvas JSON files (graph structure with nodes/edges)
- Identifies file nodes with external paths (outside current DreamNode)
- Uses vault-relative path analysis to detect cross-DreamNode references
- Integrates with existing Git State Indicators for safety checks
-
Submodule Manager Service
- Manages git submodule operations for external DreamNode dependencies
- Handles path updates after submodule import
- Ensures clean git state before operations (safety mechanisms)
- Automatic commit of submodule additions and path updates
-
DreamSong Interface System
- 3D flip animation for DreamNode3D component
- Topological sort of canvas dependency graph (edges between file/text nodes)
- Linear story flow generation from canvas relationships
- Flip-flop layout pattern (alternating text/media positioning)
-
Full-Screen Experience
- DreamTalk: Opens media files in new Obsidian leaf
- DreamSong: Opens full-screen story interface in new leaf
- Circular masking for quick-peek on DreamNode back side
Implementation Plan
Phase 1: Canvas Analysis Foundation
- Canvas JSON parser for node/edge extraction
- Path analysis service (vault-relative detection)
- External dependency detection algorithm
- Git state safety checks integration
Phase 2: Submodule Operations
- Git submodule management service
- Path rewriting after submodule import
- Automated commit workflows
- "Sync Submodules" command palette command
Phase 3: DreamSong Visualization
- DreamNode3D flip animation system
- Topological sorting algorithm for canvas dependencies
- Linear story flow React component
- Hover state flip button UI (bottom-center of DreamNode)
Phase 4: Full-Screen Integration
- Obsidian leaf management for full-screen experiences
- DreamSong full-screen component
- Media file opening via Obsidian API
- Circular masking for embedded DreamSong preview
User Experience
Canvas Creation Workflow
- User creates
.canvas file in DreamNode using Obsidian
- References media files from anywhere in vault (cross-DreamNode)
- Works normally without thinking about dependencies
- Lightweight tracker shows "external dependencies" status
- User triggers "Sync Submodules" command when ready
- Canvas becomes sovereign (all dependencies internalized)
DreamSong Interaction
- Hover over DreamNode reveals flip button (bottom-center)
- Click flip button triggers 3D animation to back side
- Back side shows DreamSong: linear story flow from canvas
- Flip-flop text/media layout with scrolling
- Full-screen button opens expanded story view
- Flip button present on both sides (DreamTalk ↔ DreamSong)
Safety & Sovereignty
- Git state validation before submodule operations
- External dependency warnings/indicators
- Conscious user-triggered synchronization (not automatic)
- Results in truly portable, clonable DreamNodes
Feature Breakdown
Canvas Parser & Dependency Detection (#TBD)
- Parse
.canvas JSON structure
- Identify file nodes with external paths
- Detect cross-DreamNode references via path analysis
- Integrate with git state indicators for safety
Git Submodule Management System (#TBD)
- Submodule import operations
- Path rewriting after import
- Safety checks and error handling
- Command palette integration
DreamNode Flip Animation & DreamSong UI (#TBD)
- 3D flip animation for DreamNode3D
- Topological sorting for canvas dependencies
- Linear story flow component
- Hover state controls (flip button)
Full-Screen DreamSong Experience (#TBD)
- Obsidian leaf management
- Full-screen story interface
- Media file integration
- Circular masking for preview
Technical Requirements
Dependencies
- Existing DreamNode3D component architecture
- Git state indicator system from Epic 3
- Obsidian Canvas API for file operations
- React Three Fiber for 3D animations
Performance Considerations
- Lazy loading for DreamSong content
- Efficient canvas parsing (JSON parsing only)
- Minimal git operations (user-triggered only)
- Smooth 3D animations without frame drops
Safety Mechanisms
- Clean git state validation before submodule operations
- Error handling for missing external dependencies
- User confirmation for destructive operations
- Rollback capabilities for failed imports
Definition of Done
Overview
Epic 6 implements Dreamweaving Operations - the vertical integration system that allows DreamNodes to incorporate external dependencies through Obsidian canvas parsing and git submodule management. This creates sovereign, self-contained DreamNodes that can be cloned without dependency issues.
Architecture
Core Components
Canvas Parser Service
.canvasJSON files (graph structure with nodes/edges)Submodule Manager Service
DreamSong Interface System
Full-Screen Experience
Implementation Plan
Phase 1: Canvas Analysis Foundation
Phase 2: Submodule Operations
Phase 3: DreamSong Visualization
Phase 4: Full-Screen Integration
User Experience
Canvas Creation Workflow
.canvasfile in DreamNode using ObsidianDreamSong Interaction
Safety & Sovereignty
Feature Breakdown
Canvas Parser & Dependency Detection (#TBD)
.canvasJSON structureGit Submodule Management System (#TBD)
DreamNode Flip Animation & DreamSong UI (#TBD)
Full-Screen DreamSong Experience (#TBD)
Technical Requirements
Dependencies
Performance Considerations
Safety Mechanisms
Definition of Done