Run script/setup in new worktrees and give each task a port block

This commit is contained in:
Ian Gulliver
2026-10-15 11:52:13 -07:00
parent f5e5dd30e3
commit cfa9699f4b
15 changed files with 453 additions and 174 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ import (
"g.fc.run/misc/byre/internal/api"
"g.fc.run/misc/byre/internal/claude"
"g.fc.run/misc/byre/internal/store"
"g.fc.run/misc/byre/internal/todo"
)
@@ -60,7 +61,8 @@ func (m *Manager) bounceProseQuestion(l *live) claude.HookFunc {
}
func (m *Manager) taskGuidance(ctx context.Context, task api.Task) (string, error) {
g := guidance
g := guidance + fmt.Sprintf("\n- This task's ports are %d to %d; $PORT holds the first. Run dev servers and anything else that listens on these, so parallel tasks don't collide.",
task.PortBase, task.PortBase+store.PortBlock-1)
if task.TodoItem != nil {
g += fmt.Sprintf("\n- This task was started from the item %q in %s at the repo root. When the work is done, remove that item from %s in this worktree, so the removal lands in the same merge as the work.",
*task.TodoItem, todo.File, todo.File)