Description
Implement canvas parsing and git submodule management for Dreamweaving Operations. Parse .canvas files to identify external DreamNode dependencies, then import them as git submodules with automatic path rewriting.
Parent Specification: #271 - Dreamweaving Operations Specification
Technical Approach
DreamNode Boundary Detection
- Use
.udd metadata file as DreamNode boundary marker
- Recursively walk upward from canvas file until finding
.udd file
- This identifies which DreamNode contains the canvas (scope)
- All DreamNodes live at vault root level
Canvas Parsing Strategy
- Parse
.canvas JSON files to extract file nodes (using type field)
- Get vault root path via Obsidian API
- Identify external dependencies: files referencing paths outside current DreamNode
- Use real canvas examples during implementation (no hardcoded templates)
Git Safety & State Management
- Leverage existing autostash system for clean state enforcement
- External DreamNodes should be committed (untracked files auto-stashed)
- Use existing git state infrastructure from Epic 3
- Focus on polishing safety checks as lower priority refinement
Submodule Import Operations
- Import submodules directly at DreamNode root (no
submodules/ directory)
- Name submodules using DreamNode directory name (not metadata title)
- Update canvas file paths to point to submodule locations
- Automated commit with concise, clear message
Implementation Plan
Phase 1: Canvas Analysis Foundation
- Canvas JSON parser service
- Vault root path detection via Obsidian API
.udd file boundary detection algorithm
- External dependency identification logic
Phase 2: Git Submodule Management
- Git submodule import operations
- Path rewriting in canvas files after import
- Integration with existing GitDreamNodeService (real data, no mock)
- Automated commit workflow
Phase 3: Command Integration
- Multiple granular commands for debugging:
- "Parse Canvas Dependencies"
- "Import External DreamNodes"
- "Update Canvas Paths"
- Unified "Sync Submodules" command (encapsulates full workflow)
- Error handling and user feedback
Acceptance Criteria
Dependencies
- Existing GitDreamNodeService from Epic 3
- Git state management infrastructure
- Obsidian Vault API for path operations
.udd metadata file system from DreamNode template
User Experience
- User creates canvas with external media file references
- System detects external dependencies (optional status indicator)
- User runs granular commands OR "Sync Submodules" unified command
- External DreamNodes imported as submodules at root level
- Canvas paths automatically updated to reference submodules
- Automatic commit preserves changes
- DreamNode becomes sovereign (fully portable)
Definition of Done
Description
Implement canvas parsing and git submodule management for Dreamweaving Operations. Parse
.canvasfiles to identify external DreamNode dependencies, then import them as git submodules with automatic path rewriting.Parent Specification: #271 - Dreamweaving Operations Specification
Technical Approach
DreamNode Boundary Detection
.uddmetadata file as DreamNode boundary marker.uddfileCanvas Parsing Strategy
.canvasJSON files to extract file nodes (usingtypefield)Git Safety & State Management
Submodule Import Operations
submodules/directory)Implementation Plan
Phase 1: Canvas Analysis Foundation
.uddfile boundary detection algorithmPhase 2: Git Submodule Management
Phase 3: Command Integration
Acceptance Criteria
.uddfile boundary detection works for nested canvas filesDependencies
.uddmetadata file system from DreamNode templateUser Experience
Definition of Done
.canvasfile examples.uddboundary logic