Skip to content

Align \wspace\ surfaces with git-native conventions (baseline default in help, \check\ unmanaged double-listing, \--stale\ docs) #9

Description

@EthanThatOneKid

Follow-up to the worktree baseline/staleness work (PR #8, commit a37adf0). Reviewing wspace against git's own conventions surfaced three divergences worth tightening.

1. worktree add baseline default not surfaced in --help

  • src/cli.ts usage() (lines 48-64) does not state the start-point default.
  • Behavior today: wspace worktree add <feature> branches from origin/<default> (resolved via origin/HEAD), not the current HEAD.
  • Deliberate and documented in README.md + ADR-0003, but a git-familiar user reading wspace worktree add --help would assume git's HEAD baseline.
  • Action: add one line to usage() help text stating the default baseline (e.g. "start-point defaults to origin/<default>").

2. wspace check double-lists every repo as (unmanaged)

  • src/status.ts collectStatus() (lines 120-139): every git directory under repos/ is pushed with name (unmanaged) <name> regardless of manifest membership.
  • The managed set (line 120) is built but never used to exclude those entries; line 143 (if (!managed.has(repository.name)) continue;) is dead code because managed is derived from the same manifest being iterated.
  • Result: each manifest repo appears twice in wspace check output — once prefixed (unmanaged) (from the directory scan) and once as the managed row.
  • Action: skip directories whose name is in managed during the repos/ scan so (unmanaged) flags only truly unmanaged checkouts. Add/adjust unit coverage in tests/.

3. worktree list --stale uses harness vocabulary

  • --stale = branch fully merged into the default branch (or missing), i.e. a safe removal candidate. Git itself has no equivalent flag (git worktree list exposes --porcelain/--expire).
  • Already documented in ADR-0003; the divergence is intentional but should be named where users look for git parity.
  • Action: document --stale semantics in wspace worktree list --help and the README command reference (no behavior change).

Verification

  • deno task ci (deno fmt --check, deno lint, deno check, deno test) green before merge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestwayfinder:taskTask ticket (HITL or AFK)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions