Skip to content

feat: Spotlight mode – sync worktree changes to local checkout for testing #525

Description

@karlkling

Problem

When agents work in isolated git worktrees, testing their changes against the full local development environment can be difficult. Many real-world projects involve multiple interconnected services that are configured to communicate on specific ports and paths. Simply starting a dev server inside the worktree often isn't practical because the rest of the stack isn't aware of it.

Currently, to test worktree changes locally, you have to manually cherry-pick, copy files, or switch branches — all of which break the isolation benefit of worktrees in the first place.

Proposed Solution

A "Spotlight" mode that selectively syncs file changes from an active worktree back into the repository root directory, so that an already-running local dev server (with hot reload) picks up the changes immediately.

Key behaviors:

  • One-way sync: worktree → repo root (not the other way around)
  • Only git-tracked files are synced (no node_modules, build artifacts, etc.)
  • Activating/deactivating spotlight should be a single action (button toggle)
  • On deactivation, the repo root is restored to its previous state
  • Optional: file watcher for automatic continuous sync while spotlight is active

Prior Art

Conductor implements this as "Spotlight Testing" using watchexec for file watching and checkpoint commits.

Why This Matters

Worktree isolation is one of the strongest features for parallel agent work. But without a simple way to test those changes in the context of the full local environment, users are forced to choose between isolation and testability. Spotlight bridges that gap.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions