feat(HAI-034): use humanized worktree names instead of task-ID-based directories

- Add worktree-names module with adjective-animal name generator (generateWorktreeName)
- Update executor to assign humanized random worktree names and support dependency worktree reuse
- Remove task-ID fallback paths from merger and store; add shared worktree cleanup via findWorktreeUser
- Remove worktree pool module and related scheduler/integration tests
- Update dashboard worktree label tests and add JSDoc documentation for worktree naming
This commit is contained in:
Dustin Byrne
2026-03-25 23:09:25 -04:00
parent 74379bdbce
commit b9d7c89905
7 changed files with 233 additions and 36 deletions

View File

@@ -468,7 +468,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
}
const branch = `hai/${id.toLowerCase()}`;
const worktreePath = task.worktree || join(this.rootDir, ".worktrees", id);
const worktreePath = task.worktree;
const result: MergeResult = {
task,
branch,
@@ -519,7 +519,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
}
// 3. Remove worktree
if (existsSync(worktreePath)) {
if (worktreePath && existsSync(worktreePath)) {
try {
execSync(`git worktree remove "${worktreePath}" --force`, {
cwd: this.rootDir,