Milestone 1.3: Overview #3

Closed
opened 2026-07-24 03:22:34 +00:00 by david · 0 comments
Owner

Overview

Implement git_worktree_list tool that lists all linked worktrees with branch and path.

Acceptance Criteria

  • Tool parses git worktree list output correctly
  • Returns structured data: { path, branch, isCurrent } for each worktree
  • Handles error case (no git repo) — returns clear error message
  • Displays "(current)" marker for the active worktree

Implementation Notes

const result = await pi.exec("git", ["worktree", "list"], { cwd: ctx.cwd });
// Parse output into structured format with path, branch, isCurrent fields

Validation

  • Run in a repo with multiple worktrees — verify output matches git worktree list
  • Test error case (no git repo) — should return clear error message
# Overview Implement `git_worktree_list` tool that lists all linked worktrees with branch and path. ## Acceptance Criteria - [ ] Tool parses `git worktree list` output correctly - [ ] Returns structured data: `{ path, branch, isCurrent }` for each worktree - [ ] Handles error case (no git repo) — returns clear error message - [ ] Displays "(current)" marker for the active worktree ## Implementation Notes ```typescript const result = await pi.exec("git", ["worktree", "list"], { cwd: ctx.cwd }); // Parse output into structured format with path, branch, isCurrent fields ``` ## Validation - Run in a repo with multiple worktrees — verify output matches `git worktree list` - Test error case (no git repo) — should return clear error message
david closed this issue 2026-07-24 21:18:41 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: david/pi-worktrees#3
No description provided.