Skip to content

feat(repo): auto-name worktrees from topic slug#197

Merged
deepcoldy merged 2 commits into
masterfrom
feat/semantic-worktree-slug
Jun 17, 2026
Merged

feat(repo): auto-name worktrees from topic slug#197
deepcoldy merged 2 commits into
masterfrom
feat/semantic-worktree-slug

Conversation

@DeepColds

@DeepColds DeepColds commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • generate semantic worktree slugs from the topic title, falling back to the first pending prompt
  • optionally use an OpenAI-compatible AI slugger to translate/summarize Chinese or mixed-language task text into concise English slugs
  • keep deterministic local slug/hash fallback when AI is disabled, misconfigured, slow, or returns invalid output
  • use the slug for both auto branch names (wt/<slug>) and sibling worktree dirs (<repo>-wt-<slug>), with -2 style collision handling
  • keep explicit branch arguments unchanged and update help/usage copy

Config

AI slugging is disabled by default. Enable with:

  • BOTMUX_WORKTREE_SLUG_AI_ENABLED=true
  • BOTMUX_WORKTREE_SLUG_AI_BASE_URL=<openai-compatible-base-url>
  • BOTMUX_WORKTREE_SLUG_AI_API_KEY=<api-key>
  • BOTMUX_WORKTREE_SLUG_AI_MODEL=<model>

Optional:

  • BOTMUX_WORKTREE_SLUG_AI_TIMEOUT_MS (default 5000)
  • BOTMUX_WORKTREE_SLUG_AI_EXTRA_HEADERS
  • BOTMUX_WORKTREE_SLUG_AI_EXTRA_BODY

Tests

  • pnpm vitest run --project unit test/git-worktree.test.ts test/worktree-slug-ai.test.ts test/command-handler.test.ts test/card-handler-repo-select.test.ts
  • pnpm tsc --noEmit

@DeepColds DeepColds requested a review from deepcoldy as a code owner June 12, 2026 08:31
@DeepColds DeepColds force-pushed the feat/semantic-worktree-slug branch from 0c86369 to 85a35aa Compare June 12, 2026 08:43
# Conflicts:
#	src/core/command-handler.ts
@deepcoldy deepcoldy merged commit 85a2c46 into master Jun 17, 2026
@deepcoldy deepcoldy deleted the feat/semantic-worktree-slug branch June 17, 2026 09:39
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