Skip to content

Add worktree create/remove VSCode tasks for cpp-library's own repo#25

Merged
sean-parent merged 2 commits into
mainfrom
worktree-cpp-library-worktree-tasks
Jul 16, 2026
Merged

Add worktree create/remove VSCode tasks for cpp-library's own repo#25
sean-parent merged 2 commits into
mainfrom
worktree-cpp-library-worktree-tasks

Conversation

@sean-parent

@sean-parent sean-parent commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a root .vscode/tasks.json with the "worktree: create" / "worktree: remove" tasks (best-effort tokensave integration), mirroring what templates/.vscode/tasks.json already gives to consumer projects (PR Add worktree create/remove VSCode tasks #24) — but without the CMake-preset/cleanup tasks, since cpp-library's own root has no CMakePresets.json.
  • Fixes a .gitignore gap: .claude/worktrees/ wasn't ignored at the repo root, so worktrees created there (by this new task or by the EnterWorktree tool) showed up as untracked content. Added .claude/worktrees/ and .tokensave, matching the consumer template's entries.
  • Adds design + plan docs under docs/superpowers/ following this repo's established convention for this kind of change.

Test plan

  • cmake -P tests/install/CMakeLists.txt — 33/33 pass (unaffected by this change; run to confirm no regression)
  • cmake -P tests/setup/test_setup_version_resolution.cmake — passes
  • Verified .vscode/tasks.json is valid JSON with the expected 2 tasks / 1 input
  • Verified the two tasks are byte-identical to their counterparts in templates/.vscode/tasks.json
  • Verified git status --porcelain .claude/ is clean after the .gitignore fix
  • Exercised the git worktree add/remove + best-effort tokensave command in a scratch repo (bash form); create always succeeded (exit 0) including when tokensave was substituted with a nonexistent binary name
  • Note: this machine has a personal global git post-checkout hook (~/.config/git/hooks/post-checkout, set via core.hooksPath) that auto-runs real tokensave bookkeeping on every checkout, independent of this repo. That caused git worktree remove (without --force) to occasionally fail on leftover .tokensave/ state during my scratch testing — this is identical, pre-existing behavior of the already-shipped, byte-identical consumer-facing task, not something introduced here, and not fixable from this repo.

🤖 Generated with Claude Code


Note

Low Risk
Developer tooling and ignore rules only; no runtime, build, or consumer-shipped template changes.

Overview
Brings the worktree: create / worktree: remove VS Code tasks to the cpp-library repo root so developers get the same workflow when this repo is the workspace—not only when consumer projects copy templates/.vscode/tasks.json. The new root tasks.json includes only the worktreeName prompt and those two shell tasks (optional tokensave + code --new-window), deliberately omitting CMake preset/cleanup tasks because this root has no CMakePresets.json.

Root .gitignore now ignores .claude/worktrees/ and .tokensave, aligning with the consumer template so worktrees under .claude/worktrees/ no longer appear as untracked noise.

Adds docs/superpowers/ design and implementation plan docs for this change; templates/ and CMake modules are untouched.

Reviewed by Cursor Bugbot for commit d8bff2a. Bugbot is set up for automated code reviews on this repo. Configure here.

Mirrors templates/.vscode/tasks.json's worktree tasks (which consumer
projects already get) but without the CMake-preset/cleanup tasks, since
cpp-library's own root has no CMakePresets.json.
…tignore

.claude/ was showing up as untracked in git status because nothing ignored
it, even though it's exactly what the worktree tasks (and this session's
own EnterWorktree tool) create worktrees under.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds repo-local developer tooling to make working with git worktrees in this repository match the already-established consumer template workflow.

Changes:

  • Add root .vscode/tasks.json with worktree: create / worktree: remove tasks (and worktreeName input), aligned with templates/.vscode/tasks.json.
  • Update root .gitignore to ignore .claude/worktrees/ and .tokensave to prevent worktree-related untracked noise.
  • Add design + implementation plan docs under docs/superpowers/ documenting scope and constraints.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
docs/superpowers/specs/2026-07-16-cpp-library-worktree-tasks-design.md Design/spec describing why root tasks are needed and what’s in/out of scope.
docs/superpowers/plans/2026-07-16-cpp-library-worktree-tasks-plan.md Step-by-step implementation/verification plan for adding root tasks + ignore rules.
.vscode/tasks.json New root VS Code tasks for worktree create/remove with best-effort tokensave integration.
.gitignore Ignore entries for .claude/worktrees/ and .tokensave.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sean-parent
sean-parent merged commit 6910aa9 into main Jul 16, 2026
5 checks passed
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.

2 participants