Skip to content

Latest commit

 

History

History
26 lines (14 loc) · 2.76 KB

File metadata and controls

26 lines (14 loc) · 2.76 KB

cpp-library Root Worktree VSCode Tasks — Design

Goal

Give cpp-library's own repo the same "worktree: create" / "worktree: remove" VS Code tasks that templates/.vscode/tasks.json already gives to consumer projects (added in the worktree-vscode-tasks branch, merged as PR #24). That prior design explicitly called this out as out of scope: "cpp-library's own root .vscode/ (it has no tasks.json of its own — only the template, which is consumer-facing)." This closes that gap.

Reference

templates/.vscode/tasks.json — the worktreeName input and the two worktree: create / worktree: remove tasks (verbatim, including the best-effort tokensave wrapping and the per-platform windows override). See docs/superpowers/specs/2026-07-16-worktree-vscode-tasks-design.md for the full rationale behind that command shape (best-effort tokensave via command -v/where + || true/|| ver>nul, ver>nul over exit /b 0 to avoid killing the cmd.exe /c "..." invocation early, etc.) — unchanged here, just relocated.

Scope

Files touched:

  1. .vscode/tasks.json (repo root — new file) — the worktreeName input plus the two worktree tasks, copied verbatim from templates/.vscode/tasks.json.
  2. .gitignore (repo root) — add .claude/worktrees/ and .tokensave.

Adaptations from the template

1. No CMake-preset or cleanup tasks. templates/.vscode/tasks.json also has 8 CMake-preset tasks and 3 cleanup tasks — those exist because a consumer project is built with CMake presets (CMakePresets.json generated by cpp_library_setup()). cpp-library's own root has no CMakePresets.json and is never configured/built with CMake — its own "tests" are cmake -P tests/... script invocations (see root CLAUDE.md). Copying those tasks here would reference presets that don't exist. Root .vscode/tasks.json therefore contains only the worktreeName input and the two worktree tasks — nothing else.

2. Gitignore gap fix. Root .gitignore currently has .worktrees/ (added by an earlier, apparently unused convention — no code in this repo ever creates a directory at that path) but not .claude/worktrees/, which is what both the new task and this session's own EnterWorktree tool actually use. git status currently shows the whole .claude/ directory as untracked because of this gap. Add .claude/worktrees/ and .tokensave (matching the consumer template's entries) so worktrees created via the new task don't show up as untracked content in the root repo. .worktrees/ is left alone — removing it is out of scope for this change.

Process for this change

Per established convention (see the prior worktree-tasks feature), this happens in an isolated worktree, finishing with a pushed branch + PR rather than a direct push to main.