oculus-live-editing-loop
π― Oculus Live Editing Loop for Emacs
Case Details
Case ID: task-1654d6e6-de98-4d7c-b6f3-5f945a970eb4
Status: parked
Created: 2025-12-08T17:38:42.577Z
Updated: 2025-12-08T17:38:42.577Z
Priority: 3
Investigation Details
Case Type: investigation Urgency Level: routine
Notes
Objective
Create a Stuffy-style live editing loop for Oculus nodes in Emacs:
- Pull node content to a local buffer
- Auto-save on buffer save β upload back to Oculus
- Trigger cache invalidation on update
- Push refresh to connected clients (Stuffy viewers, Alice, etc.)
Research Findings
Existing Components
oculus-integration.el (current state):
oculus-edit-node- Downloads node to temp fileoculus-save-node-edits- Usesoculus edit slug --file tempfileoculus--auto-save-nodehook onafter-save-hook- Missing: live editing mode, auto-upload, API integration
stuffy-integration.el (reference model):
stuffy-auto-upload-modeminor mode withafter-save-hook- Downloads content with channel tracking (buffer-local)
- Case-aware sharing functions
- Browser integration for live preview
- Context switching (local/remote)
Oculus API Endpoints
GET /api/graph/{slug}- Export node as markdownPOST /api/graph/{slug}- Import/update node from markdown- Cache invalidation via
ast_cache.invalidate(slug, CacheLevel.SUBSTITUTED) path_parser.py::poke()handles all write operations with proper invalidation
Missing Infrastructure
- Client refresh notification - No WebSocket/SSE to push updates to viewers
- Stuffy integration - Could leverage existing Stuffy channels to notify viewers
- Live editing mode - Need minor mode like
stuffy-auto-upload-mode
Proposed Architecture
Emacs Buffer β save-hook β HTTP POST /api/graph/{slug}
β
Cache Invalidation
β
Stuffy Channel Broadcast (via poke trigger?)
β
Connected Viewers RefreshImplementation Tasks
- oculus-live-edit-mode - Minor mode for live editing
- oculus-pull-node - Download node, setup buffer-local tracking
- oculus-push-node - HTTP POST to API on save
- Refresh mechanism - Either:- Option A: Stuffy channel upload triggers viewers
- Option B: Add SSE/WebSocket to oculus-api
- Option C: Pattern trigger that pokes a "refresh" signal
Investigation Timeline
2025-12-08T17:38:42.579Z - System - case_created
Case opened from CLI
Consciousness Links
Case Files: 2
Auto-Detected Keywords
investigation
This case file is automatically updated. For investigation logs, see the corresponding log channel.
π Case To-Do List
This case has an integrated to-do list system that syncs with the Oculus knowledge graph. The to-do list uses the virtual:todo-list fence which auto-detects GitHub-style checkbox markdown.
How the To-Do System Works
- Auto-Detection: Checkbox lists are automatically detected as
virtual:todo-listfences - Alice Integration: Display in Alice dashboard using
:::wonderland-todo-list slug="${current_case}" - ISA Operations: Use fence exec for add/check/update operations
- Metadata Support: Add
[assignee:name][priority:level]tags to tasks
Case To-Do Operations
- View state:
oculus fence list ${slug}thenoculus fence view ${slug} <fence-index> - Add task:
oculus fence exec ${slug} <fence-index> add "New task" - Check task:
oculus fence exec ${slug} <fence-index> check 0 - Update task:
oculus fence exec ${slug} <fence-index> update 0 "Updated content" - Reference: See virtual-fence-todo for full documentation
Current Case Tasks
- π― Solve the case
- π Document findings in investigation notes
- π Link relevant evidence and consciousness resources
- β Update case status when complete
Next Steps
Add investigation notes and evidence tags as you progress. The to-do list will evolve with your investigation. Tasks can be managed via Oculus fence operations or edited directly in the node.