-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
Parent Specification: #270 - Radicle Integration Specification
Parent Epic: #258 - Coherence Beacon System
Implement complete Radicle CLI integration to enable peer-to-peer DreamNode collaboration on macOS/Linux. This establishes the primary network layer for InterBrain's decentralized collective cognition system.
Enhanced Acceptance Criteria
Radicle Integration
-
DreamNode creation automatically runsSUPERSEDED: Implemented superior lazy initialization patternrad initafter git init - Graceful handling if Radicle unavailable (creation continues)
- "Share DreamNode" command checks for new commits to share
- Share command disabled/returns message if nothing new
-
rad pushexecutes in background with status indicator - Success notification after successful share
- Clone command accepts Radicle ID input
- Clone auto-derives DreamNode name from Radicle metadata
- Clone command runs
rad cloneand integrates into vault
Metadata & Contact Info
-
radicleIdfield added to DreamNode metadata structure - Radicle ID saved alongside email/phone contact fields
- Metadata persists correctly in
.uddfile (single JSON file)
Platform Compatibility
- Platform detection prevents Radicle on Windows
- Placeholder code structure for future GitHub implementation
- Windows limitation documented in README
Error Handling
- Radicle errors logged and reported to user
- Core DreamNode operations continue despite Radicle failures
- Clear error messages for missing Radicle installation
Documentation
- Platform compatibility notes (macOS/Linux only)
- Windows limitation and future GitHub solution noted
- Radicle CLI installation guide in README (deferred - can be added incrementally)
- Radicle identity setup instructions (
rad auth) (deferred - can be added incrementally)
Implementation Summary
✅ Core Features Implemented
1. Lazy Radicle Initialization (Superior to Original Plan)
- DreamNodes created local-first (no automatic init on creation)
- Intelligent initialization triggered on first network use (video call email export)
RadicleBatchInitServicehandles batchrad initwith race condition prevention- Graceful degradation if Radicle unavailable
2. Clone Workflow with Deep Links
- Obsidian URI protocol:
obsidian://interbrain-clone?id=rad:... - Auto-derive DreamNode name from Radicle metadata
- Duplicate detection with performance optimization
- Auto-refresh after clone (vault scan + relationship scan + constellation layout)
- Auto-focus on cloned/existing nodes
- Batch clone support for multiple nodes
3. Share Command
- Manual "Share DreamNode" command
- Background
rad pushoperation - Status notifications
- Error handling and graceful degradation
4. Performance Optimizations
- Constellation repositioning: 100x faster (10s → 100ms)
- Radicle duplicate detection: ~10x faster (parallel I/O + early exit)
- Parallel DreamSong relationship scanning
5. Metadata & Storage
radicleIdfield in UDD schema and runtime types- Auto-save Radicle ID to
.uddfile after clone - Contact field integration (email, phone, radicleId)
User Testing Results
✅ User testing completed successfully
✅ Clone workflow validated with real Radicle network
✅ Duplicate detection works instantly
✅ Auto-focus and auto-refresh working perfectly
✅ Performance optimizations confirmed (~100ms repositioning)
✅ No outstanding issues identified
Technical Achievements
Key Implementation Decisions:
- Lazy initialization (better than automatic init-on-creation)
- Single
.uddfile (not directory structure) - Parallel I/O for relationship scanning
- Batch position updates for instant repositioning
- Early exit patterns for duplicate detection
Architecture Patterns:
- Dependency injection for service composition
- Graceful error handling throughout
- Platform detection for cross-platform compatibility
- Intelligent caching with
.uddfile storage
Definition of Done
- Implementation complete and tested on macOS
- Platform detection working correctly
- All enhanced acceptance criteria met (see above)
- User testing validated core functionality
- Performance optimizations implemented
- Comprehensive documentation (deferred to incremental updates)
Next Steps
Feature Complete - Ready for epic integration
Documentation enhancements (can be separate PRs):
- Detailed Radicle setup section in README
rad authconfiguration guide- Troubleshooting section