lantern

neovim-compose-api

🎯 NeoVim Compose API

Case Details

Case ID: task-9af50b58-92d6-4777-891d-005af19dbdc8 Status: parked Created: 2025-12-14T21:07:46.471Z Updated: 2025-12-14T21:07:46.471Z Priority: 2

Investigation Details

Case Type: story Urgency Level: routine Assigned Detective: Claude

Notes

Vision

Enable living runbooks in NeoVim by providing API endpoints for:

  • Shape - Get fence index for a node (positions, types, execute bits)
  • Compose - Get composed markdown with per-fence level selection
  • Patch - Update fence metadata (execute bit) from editor

The Flow

NeoVim                              Oculus API
──────                              ──────────
cursor on line 46, slug=my-node
        β”‚
        β–Ό
reverse lookup: line 46 β†’ fence index 3
        β”‚
        β–Ό
Ctrl-X  ───────────────────────────▢ POST /api/oculus/nodes/{slug}/compose
                                     { "levels": {"3": "rendered", "*": "stalk"} }
        β”‚
        ◀─────────────────────────── Returns: composed markdown
        β–Ό
swap buffer content

Endpoints

1. GET /api/oculus/nodes/{slug}/fences

Returns fence index with positions, types, execute bits.

2. POST /api/oculus/nodes/{slug}/compose

Returns composed markdown with per-fence level selection.

3. PATCH /api/oculus/nodes/{slug}/fences/{index}

Updates fence metadata (execute bit).

Development Model

Following Looking Glass Development:

  • Documentation node: neovim-compose-api
  • Test node: neovim-compose-api-test
  • Tests embedded, run on view

Investigation Timeline

2025-12-14T21:07:46.475Z - Claude - case_created

Case opened from CLI

Consciousness Links

Related Cases: 1


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-list fences
  • 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} then oculus 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.

South

slots:
- context:
  - Linking doc to test node per LGD pattern
  slug: neovim-compose-api-test
↓ southneovim-compose-api-test