Skip to content

Reorganise lib, add git work, consolidate git workspace - #302

Merged
viqueen merged 8 commits into
mainfrom
feature/follow-ups
Oct 24, 2026
Merged

viqueen merged 8 commits into
mainfrom
feature/follow-ups

Conversation

@viqueen

@viqueen viqueen commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up tidy-ups: reorganise src/lib by theme, add a git work worktree command, and consolidate the git-workspace binaries into a single subcommand-based command.

Changes

  • Dependabot: use default-days cooldown for the github-actions ecosystem (the semver-*-days properties are only valid for semver ecosystems like npm).
  • src/lib structure: grouped files into item/, config/, branches/, and worktrees/ themes, each with an index.ts barrel re-exported from src/lib/index.ts. Layering stays one-directional: bin → tasks → lib.
  • New git work command (git work add <name> / git work remove):
    • add creates a worktree under the <item>-worktrees sibling folder, resolved against the main worktree so it works even when run from a linked worktree.
    • remove lists worktrees and multi-selects which to remove; reports the removed paths (git worktree remove is silent on success).
  • Consolidated git workspace: replaced the separate git-workspace-* binaries with a single git-workspace command exposing add/remove/clone/sync/config subcommands (plus list as the default), mirroring git work. Config is loaded lazily inside each action so git workspace config works before any config exists.
  • Extracted helpers: withFilterOptions, listWorkspaceItems, configureWorkspace into lib/config; submitItemTasks into tasks/. Removed the now-unused withProgram.
  • Docs: updated README with the new subcommand syntax and worktree section; updated CLAUDE.md with the lib themes and full command structure.

Testing

  • pnpm build, pnpm lint, pnpm format:check all clean
  • pnpm test — 19 tests across 8 suites pass (added worktree parse + remove tests)
  • Smoke-tested the real git work add/remove cycle and the consolidated git workspace CLI (help, default-command routing, -w filtering) against a live repo

🤖 Generated with Claude Code

viqueen and others added 8 commits October 24, 2026 20:38
The semver-specific cooldown properties are only supported for semver
ecosystems like npm, not github-actions.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Group the lib files by responsibility, each with its own barrel:
- item/     repository domain model (types, parsing, location, filter, status)
- config/   CLI plumbing (configuration, commander program)
- branches/ git branch operations (list, select, exclude)

Update bin imports to use the new subdir barrels instead of deep paths.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
git-work has two subcommands:
- add <name>: create a worktree under the <item>-worktrees sibling folder
- remove: list the current repo worktrees and multi-select to remove

Logic lives in a new lib/worktrees theme (list/add/select-and-remove),
with the main worktree derived from git so the sibling folder is always
resolved against the real repo even when run from a linked worktree.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
git worktree remove is silent on success, so console.table printed rows
with blank values. Print the removed paths and skip output when nothing
is selected.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Replace the separate git-workspace-* binaries with a single git-workspace
command exposing add/remove/clone/sync/config subcommands (and list as the
default), mirroring git-work. Invoke as `git workspace add`, etc.

Extract the reusable pieces out of the bin layer:
- lib/config/with-filter-options: shared commander filter options
- lib/config/list-workspace-items: config load + filtered registry list
- lib/config/configure-workspace: interactive workspaces config write
- tasks/submit-item-tasks: run item tasks under a cli progress pool

Remove the now unused withProgram helper. Config loading is deferred into
each data action so `git workspace config` works before any config exists.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
- use node:path / node:os import prefixes (S7772)
- add await in selectForRemoveQuestion so it stays a promise (S7503)

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@viqueen
viqueen merged commit 7150131 into main Oct 24, 2026
3 checks passed
@viqueen
viqueen deleted the feature/follow-ups branch October 24, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant