← All products
KAI-9 Idea medium

P3.1 · Vault file watcher + debounced push to Linear

Pro-tier feature

What

Subscribe to vault.on('modify', file). When a synced note (has linear_id in frontmatter) changes:

  1. Debounce 2s to coalesce rapid keystroke edits.
  2. Diff current body against cached last_known_remote_body for that note.
  3. If changed, call issueUpdate(id, { description: markdown }) via the Linear client.
  4. On success, update synced_at and last_known_remote_body in the sync cache.

Technical requirements

  • Don't push if only frontmatter changed (those are system-managed fields).
  • If the push fails due to rate limit, the client backoff takes over; user sees a discreet Notice only on hard failure.
  • Gate this feature behind license check — Free users get a "Pro required" Notice if they try to edit a synced note.

Acceptance criteria

  • Editing a synced note and waiting 3s pushes the update to Linear.
  • Editing frontmatter-only does NOT trigger a push.
  • Rapid edits within 2s are coalesced to one push.
Updated
2026-04-22