Merge set_task_title and set_merge_title into one set_titles tool

This commit is contained in:
Ian Gulliver
2026-10-21 11:34:13 -07:00
parent 3f4e4d5e90
commit 5dd89d9d14
6 changed files with 366 additions and 388 deletions
+3 -3
View File
@@ -102,9 +102,9 @@ func (m *Manager) taskGuidance(ctx context.Context, task api.Task) (string, erro
"\n- This worktree starts with only what git tracks. Before other work in a new worktree, do any setup the project's AGENTS.md describes.",
task.PortBase, task.PortBase+store.PortBlock-1)
if task.Title == "" {
g += "\n- This task has no title yet. First thing, before any other work, call set_task_title with a very short, distinct, to-the-point title (two to four words), and call it again whenever the work moves on."
g += "\n- This task has no title yet. First thing, before any other work, call set_titles with a very short, distinct, to-the-point task title (two to four words) and a merge commit title that describes the work, and call it again whenever the work moves on."
} else {
g += fmt.Sprintf("\n- This task's title is %q. First thing, if it isn't very short (two to four words), distinct and to the point, call set_task_title with one that is, and call it again whenever the work moves on.", task.Title)
g += fmt.Sprintf("\n- This task's title is %q. First thing, call set_titles with a merge commit title that describes the work, and a task title that is very short (two to four words), distinct and to the point (this one, if it already is), and call it again whenever the work moves on.", task.Title)
}
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.",
@@ -132,7 +132,7 @@ func longTitleGuidance(task api.Task) string {
if n <= maxMergeTitle {
return ""
}
return fmt.Sprintf("\n- This task's merge commit title, %q, is %d characters, over the %d allowed, so Merge will refuse it. Early in your first turn, call set_merge_title with a one-line title of at most %d characters that describes the work.",
return fmt.Sprintf("\n- This task's merge commit title, %q, is %d characters, over the %d allowed, so Merge will refuse it. Early in your first turn, call set_titles with a one-line merge title of at most %d characters that describes the work.",
task.MergeTitle, n, maxMergeTitle, maxMergeTitle)
}