Skip to content

source-control: babysit worktree pruner hard-depends on ghq (undeclared, author-personal repo-layout tool) #438

Description

@kyle-sexton

Plugin: source-control · Categories: hardcoded machine/user assumption (1), undeclared prerequisite (2)
Source: work-readiness sweep (read-only audit vs docs/PLUGIN-PHILOSOPHY.md + docs/MIGRATION-PLAYBOOK.md)

Findings

  • plugins/source-control/skills/babysit-prs/scripts/prune_babysit_worktrees.py:21ALLOWED_EXECUTABLES = ("git", "gh", "ghq")
  • :60-74repo_path(): run(["ghq", "list", "-p", …]) → fallback git config --get ghq.root then Path(root)/"github.com"/owner/repo → else raise RuntimeError("unable to resolve main checkout for {owner}/{repo}; install ghq or set ghq.root")
  • :135 — called from remove_worktree() on every --apply removal

Why it breaks agnosticism

ghq is the author's personal repo-layout tool; a consumer without it gets a hard RuntimeError, and even the ghq.root fallback bakes ghq's <root>/github.com/owner/repo layout. Undeclared prerequisite: README:113-120 claims "Self-contained. Everything runs on git, gh, jq, and Bash scripts" — ghq appears nowhere, violating PLUGIN-PHILOSOPHY's "declare every required CLI at the point of use and in the README" and the graceful-degrade rule. Bites engine-backed (Python) runs — worker/autopilot/engine-backed-safe tiers.

Fix direction

Resolve the main checkout natively from worktree git metadata (git -C <worktree> rev-parse --git-common-dir) — the linked worktree already points at its main repo, making ghq unnecessary. If a ghq path is kept, make it a presence-gated enhancement with the native fallback, declared in README prerequisites.

Metadata

Metadata

Assignees

Labels

priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions