feat(infra): 병렬 worktree 인프라 + 게이트웨이 + 대시보드#15
Merged
Conversation
- .claude/hooks/worktreeRegistry.mjs: 단일 registry 유틸 (git-common-dir 기반 공유) - .claude/hooks/allocWorktreePort.mjs: 포트 연번 할당 (min free ≥ 5173) - .claude/hooks/requireWorktree.mjs: main worktree Edit/Write 차단 - .claude/hooks/sessionStartWorktree.mjs: 세션 시작 시 worktree·포트 가시성 주입 - .claude/hooks/stopRequireCommit.mjs: 종료 시 dirty/unpushed 감지 → /handoff 유도 - .claude/hooks/guardBash.mjs: main commit/push 차단 확장 + cd prefix 감지 fix - scripts/wtList.mjs: CLI 테이블 + --json/--prune - vite.config.ts: worktree별 dev port 자동 - .gitignore: .claude/worktrees.json (registry) 제외 - PRD: docs/2026/2026-04/2026-04-21/parallelWorktreePrd.md de facto "always worktree, never main" (Conductor/Claude Squad/Crystal) 채택. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- scripts/wtCaddy.mjs: worktrees.json → .claude/Caddyfile 자동 생성 - scripts/wtDash.mjs: :4000 HTTP 대시보드 (브랜치/포트/HEAD/diff/dirty) - allocWorktreePort: 브랜치 FNV-1a 해시 결정론 할당 (북마크 안정성) - sessionStartWorktree: 세션 시작 시 wtCaddy --reload 자동 트리거 - Caddyfile gitignore - docs/2026-04-21/worktreeGatewayDashboard.md 접근: http://wt.localhost:4100 (대시보드) · http://{name}.localhost:4100 (각 worktree)
- scripts/wtStart.mjs: idempotent 기동 (Caddyfile 생성 → dash detached → caddy start/reload) - scripts/wtStop.mjs: caddy stop + dash pkill - sessionStartWorktree: wtCaddy --reload → wtStart 로 전환 (첫 세션이 자동 기동) - 스크립트 경로는 import.meta.url 기준으로 해소 (worktree 자기 copy 실행)
# Conflicts: # .claude/hooks/guardBash.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.claude/hooks/4종 + worktree 레지스트리 +wt:list(병렬 세션 가드)*.localhost:4100) + HTTP 대시보드 (:4000)wt:start/wt:stop원커맨드 + sessionStart hook 자동 기동Why
PR #13의 깨끗한 rebase. base가 main으로, #10 결합 없음.
병렬 worktree의 포트 수동 확인·변경 추적 문제 해소.
Test plan
brew install caddy && pnpm wt:start→ http://wt.localhost:4100🤖 Generated with Claude Code