Task: Implement the fleet command

Table of Contents

This page documents a task in the compass cross-worktree status (global where) story. It captures the goal, current status, acceptance, and any notes or results.

Goal

Add a compass fleet subcommand that lists every git worktree with its branch, mapped story + task (via the task #+branch: field), and open PR (live state via gh), so parallel checkouts/agents don't collide.

Status

Field Value
State DONE
Parent story compass cross-worktree status (global where)
Now Implemented and dogfooded across the live worktrees.
Waiting on Nothing.
Next Review.
Last touched 2026-05-25

Acceptance

  • compass fleet lists every worktree from git worktree list with branch, mapped story + task, and open PR + live state.
  • The branch → task mapping is read from each worktree's own tree (the task #+branch: field), so it works on unmerged branches.
  • The current worktree is marked; worktrees with no matching task (e.g. main) are shown plainly.
  • -f json emits a structured array; works offline (omits PR state).

Plan

  1. list_worktrees (parse git worktree list --porcelain).
  2. task_for_branch (per-worktree glob of task_*.org for #+branch:).
  3. open_prs_by_branch (one gh pr list call, matched by headRefName).
  4. cmd_fleet + fleet subparser; pretty + json output.

Notes

Dogfooded across the five live worktrees: local1 mapped to its story, task and PR #828; PRs matched live by branch; the current worktree flagged with .

PRs

PR Title
#832 [ores.compass] Implement compass fleet (worktree status)

Review

Comment summary File Decision Notes
       

Result

Implemented compass fleet in compass.py (cmd_fleet plus list_worktrees / task_for_branch / open_prs_by_branch helpers and the fleet subparser). Verified across the five live worktrees: local1 → "ORE Studio Emacs dashboard" / its audit task / PR #828; this worktree self-maps to this very task; the current worktree is marked ; -f json emits the structured array. where / add unaffected; py_compile clean.

Emacs 29.1 (Org mode 9.6.6)