Skip to content

feat(skills): use sequence numbers for worktree directory names - #536

Merged
baleen37 merged 3 commits into
mainfrom
feat/worktree-skill-numbering
Feb 25, 2026
Merged

feat(skills): use sequence numbers for worktree directory names#536
baleen37 merged 3 commits into
mainfrom
feat/worktree-skill-numbering

Conversation

@baleen37

@baleen37 baleen37 commented Feb 24, 2026

Copy link
Copy Markdown
Owner

워크트리 디렉토리 이름 앞에 날짜 대신 5자리 시퀀스 번호를 붙입니다.

Changes

  • using-git-worktrees 스킬: 디렉토리명 형식을 YYYY-MM-DD-<branch>00001-<branch>로 변경
  • 기존 워크트리 수를 기준으로 자동 증가 (00001, 00002, ...)
  • plugins/me/agents/plugins/core/agents/로 이동

Tests

  • 스킬 문서 변경만 포함, 실행 코드 없음

Summary by CodeRabbit

Release Notes

  • Documentation
    • Updated git worktree naming convention: directory names now include zero-padded sequence prefixes (e.g., 00001-branch-name) instead of plain branch names
    • Refreshed example commands and expected outputs to reflect new naming scheme
    • Consolidated git worktree skill documentation for improved user guidance

Replace date prefix with zero-padded sequence numbers (00001-, 00002-, ...)
for worktree directories. Also moves agents from me to core plugin.
@coderabbitai

coderabbitai Bot commented Feb 24, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@baleen37 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 24 minutes and 0 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3d8d85f and d1d2179.

📒 Files selected for processing (1)
  • tests/me/me-specific.bats
📝 Walkthrough

Walkthrough

This PR updates the worktree skill documentation to incorporate zero-padded sequence prefixes in directory naming (00001-branch-name format), removes duplicate skill documentation from the me plugins directory, and expands test coverage to validate agents across all plugin directories rather than a single one.

Changes

Cohort / File(s) Summary
Worktree Skill Documentation
plugins/core/skills/using-git-worktrees/SKILL.md
Updated creation steps and example commands to reflect zero-padded sequence prefixes in worktree directory names; paths and output messages now reference .worktrees/00001-auth format instead of bare branch names.
Removed Duplicate Skill
plugins/me/skills/using-git-worktrees/SKILL.md
Deleted entire skill documentation file (224 lines); appears to be consolidation of duplicate content after migration.
Test Discovery Expansion
tests/integration/cross_plugin_interactions.bats
Replaced plugins/me/agents/*.md glob pattern with broader plugins/*/agents/*.md and plugins/*/agents/*/*.md patterns; consolidated separate validation loops into single pass to validate agents across all plugins.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A worktree numbered, so fine and neat!
00001 paths make the prefix sweet,
Old copies pruned from the plugin row,
Tests now seek where all agents grow!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: implementing sequence numbers for worktree directory naming instead of date prefixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/worktree-skill-numbering

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@baleen37
baleen37 enabled auto-merge (squash) February 24, 2026 23:47
auto-merge was automatically disabled February 24, 2026 23:58

Repository rule violations found

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugins/core/skills/using-git-worktrees/SKILL.md`:
- Around line 89-90: The script stores LOCATION into base_dir and later
constructs paths like "~/.config/superpowers/worktrees/$project/$dir_name" then
calls git worktree add with that quoted path, but tilde is not expanded; update
the code to expand any leading tilde before passing to git by normalizing
LOCATION and any constructed path (e.g., expand LOCATION into base_dir and
expand the final $path used in git worktree add) using a reliable expansion
method (eg. a small helper that replaces leading "~" with "$HOME" or uses
printf/realpath to canonicalize) so git receives an absolute/expanded path
instead of a literal "~" string; ensure you update references to base_dir, last,
LOCATION, and the variable used in git worktree add to use the expanded value.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 663341b and 3d8d85f.

📒 Files selected for processing (5)
  • plugins/core/agents/code-reviewer.md
  • plugins/core/agents/web-researcher.md
  • plugins/core/skills/using-git-worktrees/SKILL.md
  • plugins/me/skills/using-git-worktrees/SKILL.md
  • tests/integration/cross_plugin_interactions.bats
💤 Files with no reviewable changes (1)
  • plugins/me/skills/using-git-worktrees/SKILL.md

Comment on lines +89 to +90
base_dir="$LOCATION" # e.g. .worktrees
last=$(ls "$base_dir" 2>/dev/null | grep -E '^[0-9]{5}-' | sort | tail -1 | grep -oE '^[0-9]{5}')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, find and read the SKILL.md file
fd -t f "SKILL.md" plugins/core/skills/using-git-worktrees/

Repository: baleen37/everything-agent

Length of output: 117


🏁 Script executed:

# Read the relevant sections of the file
if [ -f "plugins/core/skills/using-git-worktrees/SKILL.md" ]; then
  echo "=== Lines 85-105 (context around line 89-90 and 100) ==="
  sed -n '85,105p' "plugins/core/skills/using-git-worktrees/SKILL.md"
fi

Repository: baleen37/everything-agent

Length of output: 790


🏁 Script executed:

# Run the test script from the review to verify tilde expansion behavior
#!/bin/bash
set -euo pipefail
LOCATION='~/.config/superpowers/worktrees/demo'
base_dir="$LOCATION"
path="~/.config/superpowers/worktrees/demo/00001-branch"
printf 'base_dir=%s\npath=%s\n' "$base_dir" "$path"
echo "---"
echo "Confirming tilde expansion does NOT occur in variable assignments:"
echo "Expected: literal ~ in output (no expansion)"

Repository: baleen37/everything-agent

Length of output: 285


🏁 Script executed:

# Verify that git itself does expand tilde in worktree paths
# This helps determine if the issue is critical or just bad practice

echo "=== Testing git's tilde expansion behavior ==="
# Create a simple test to see if git interprets literal ~ correctly
echo "Note: git worktree add does NOT expand tilde in quoted paths at argument level"
echo "Git receives the literal string and may or may not interpret it depending on context"
echo "The safer approach is to expand in shell before passing to git"

Repository: baleen37/everything-agent

Length of output: 342


🏁 Script executed:

# Check for similar patterns in the file that might have the same issue
sed -n '1,120p' "plugins/core/skills/using-git-worktrees/SKILL.md" | grep -n "~" | head -20

Repository: baleen37/everything-agent

Length of output: 308


Expand tilde (~) in paths before passing to git commands.

Line 100 hardcodes ~/.config/superpowers/worktrees/$project/$dir_name as a literal string, and line 89 stores $LOCATION without expanding the tilde. When git worktree add "$path" receives ~/..., git doesn't reliably expand it from within quoted arguments, causing worktree creation to fail or target incorrect locations.

Proposed fix
-base_dir="$LOCATION"  # e.g. .worktrees
+base_dir="${LOCATION/#\~/$HOME}"  # e.g. .worktrees or /home/user/.config/...

@@
-    path="~/.config/superpowers/worktrees/$project/$dir_name"
+    path="$HOME/.config/superpowers/worktrees/$project/$dir_name"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/core/skills/using-git-worktrees/SKILL.md` around lines 89 - 90, The
script stores LOCATION into base_dir and later constructs paths like
"~/.config/superpowers/worktrees/$project/$dir_name" then calls git worktree add
with that quoted path, but tilde is not expanded; update the code to expand any
leading tilde before passing to git by normalizing LOCATION and any constructed
path (e.g., expand LOCATION into base_dir and expand the final $path used in git
worktree add) using a reliable expansion method (eg. a small helper that
replaces leading "~" with "$HOME" or uses printf/realpath to canonicalize) so
git receives an absolute/expanded path instead of a literal "~" string; ensure
you update references to base_dir, last, LOCATION, and the variable used in git
worktree add to use the expanded value.

@baleen37
baleen37 merged commit 1e50508 into main Feb 25, 2026
5 checks passed
@baleen37
baleen37 deleted the feat/worktree-skill-numbering branch February 25, 2026 00:03
baleen-release-app Bot pushed a commit that referenced this pull request Feb 25, 2026
# [5.36.0](v5.35.4...v5.36.0) (2026-02-25)

### Features

* **skills:** use sequence numbers for worktree directory names ([#536](#536)) ([1e50508](1e50508))
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