all: delete commit-message-style tool
It added significant latency.
All the caching options were unappealing.
Instead, let users specify in dear_llm.md if they care,
and default to simple, concise messages.
At some point (soon?), we will likely
make it easier in the UI to edit commit messages.
Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: sbcd1f38735d091aek
diff --git a/loop/agent.go b/loop/agent.go
index cf35eb4..9e55491 100644
--- a/loop/agent.go
+++ b/loop/agent.go
@@ -1378,7 +1378,7 @@
convo.Tools = []*llm.Tool{
bashTool.Tool(), claudetool.Keyword, claudetool.Patch(a.patchCallback),
- claudetool.Think, claudetool.TodoRead, claudetool.TodoWrite, a.commitMessageStyleTool(), makeDoneTool(a.codereview),
+ claudetool.Think, claudetool.TodoRead, claudetool.TodoWrite, makeDoneTool(a.codereview),
a.codereview.Tool(), claudetool.AboutSketch,
}
convo.Tools = append(convo.Tools, browserTools...)
@@ -1547,23 +1547,6 @@
}
}
-func (a *Agent) commitMessageStyleTool() *llm.Tool {
- description := `Provides git commit message style guidance. MANDATORY: You must use this tool before making any git commits.`
- preCommit := &llm.Tool{
- Name: "commit-message-style",
- Description: description,
- InputSchema: llm.EmptySchema(),
- Run: func(ctx context.Context, input json.RawMessage) llm.ToolOut {
- styleHint, err := claudetool.CommitMessageStyleHint(ctx, a.repoRoot)
- if err != nil {
- slog.DebugContext(ctx, "failed to get commit message style hint", "err", err)
- }
- return llm.ToolOut{LLMContent: llm.TextContent(styleHint)}
- },
- }
- return preCommit
-}
-
// patchCallback is the agent's patch tool callback.
// It warms the codereview cache in the background.
func (a *Agent) patchCallback(input claudetool.PatchInput, output llm.ToolOut) llm.ToolOut {
diff --git a/loop/agent_system_prompt.txt b/loop/agent_system_prompt.txt
index 0faf441..f2bd7ed 100644
--- a/loop/agent_system_prompt.txt
+++ b/loop/agent_system_prompt.txt
@@ -53,6 +53,7 @@
Default coding guidelines:
- Clear is better than clever.
- Minimal inline comments: non-obvious logic and key decisions only.
+- When no commit message style guidance is provided: write a single lowercase line starting with an imperative verb, ≤50 chars, no period
</style>
{{ with .Codebase }}
diff --git a/loop/testdata/agent_loop.httprr b/loop/testdata/agent_loop.httprr
index ee2cfa3..66cae4f 100644
--- a/loop/testdata/agent_loop.httprr
+++ b/loop/testdata/agent_loop.httprr
@@ -1,9 +1,9 @@
httprr trace v1
-18529 2497
+18427 2414
POST https://api.anthropic.com/v1/messages HTTP/1.1
Host: api.anthropic.com
User-Agent: Go-http-client/1.1
-Content-Length: 18331
+Content-Length: 18229
Anthropic-Version: 2023-06-01
Content-Type: application/json
@@ -189,14 +189,6 @@
}
},
{
- "name": "commit-message-style",
- "description": "Provides git commit message style guidance. MANDATORY: You must use this tool before making any git commits.",
- "input_schema": {
- "type": "object",
- "properties": {}
- }
- },
- {
"name": "done",
"description": "Use this tool when you have achieved the user's goal. The parameters form a checklist which you should evaluate.",
"input_schema": {
@@ -537,7 +529,7 @@
],
"system": [
{
- "text": "You are the expert software engineer and architect powering Sketch,\nan agentic coding environment that helps users accomplish coding tasks through autonomous analysis and implementation.\n\n\u003cworkflow\u003e\nStart by asking concise clarifying questions as needed.\nOnce the intent is clear, work autonomously.\nWhenever possible, do end-to-end testing, to ensure fully working functionality.\nAim for a small diff size while thoroughly completing the requested task.\nPrioritize thoughtful analysis and critical engagement over agreeability.\n\nBreak down the overall goal into a series of smaller steps.\nUse the todo_read and todo_write tools to organize and track your work systematically.\n\nFollow this broad workflow:\n\n- Think about how the current step fits into the overall plan.\n- Do research. Good tool choices: bash, think, keyword_search\n- Make edits.\n- If you have completed a standalone chunk of work, make a git commit.\n- Update your todo task list.\n- Repeat.\n\nTo make edits reliably and efficiently, first think about the intent of the edit,\nand what set of patches will achieve that intent.\nThen use the patch tool to make those edits. Combine all edits to any given file into a single patch tool call.\n\nYou may run tool calls in parallel.\n\nComplete every task exhaustively - no matter how repetitive or tedious.\nPartial work, pattern demonstrations, or stubs with TODOs are not acceptable, unless explicitly permitted by the user.\n\nThe done tool provides a checklist of items you MUST verify and\nreview before declaring that you are done. Before executing\nthe done tool, run all the tools the done tool checklist asks\nfor, including creating a git commit. Do not forget to run tests.\n\n\n\nWhen communicating with the user, take it easy on the emoji, don't be over-enthusiastic, and be concise.\n\nDocker is available. Before running the docker command, start dockerd as a background process.\nAlways use --network=host when running docker containers.\n\u003c/workflow\u003e\n\n\u003cstyle\u003e\nDefault coding guidelines:\n- Clear is better than clever.\n- Minimal inline comments: non-obvious logic and key decisions only.\n\u003c/style\u003e\n\n\u003csystem_info\u003e\n\u003cplatform\u003e\nlinux/amd64\n\u003c/platform\u003e\n\u003cpwd\u003e\n/\n\u003c/pwd\u003e\n\u003c/system_info\u003e\n\n\u003cgit_info\u003e\n\u003cgit_root\u003e\n\n\u003c/git_root\u003e\n\u003cHEAD\u003e\nHEAD\n\u003c/HEAD\u003e\n\n\u003c/git_info\u003e\n\n",
+ "text": "You are the expert software engineer and architect powering Sketch,\nan agentic coding environment that helps users accomplish coding tasks through autonomous analysis and implementation.\n\n\u003cworkflow\u003e\nStart by asking concise clarifying questions as needed.\nOnce the intent is clear, work autonomously.\nWhenever possible, do end-to-end testing, to ensure fully working functionality.\nAim for a small diff size while thoroughly completing the requested task.\nPrioritize thoughtful analysis and critical engagement over agreeability.\n\nBreak down the overall goal into a series of smaller steps.\nUse the todo_read and todo_write tools to organize and track your work systematically.\n\nFollow this broad workflow:\n\n- Think about how the current step fits into the overall plan.\n- Do research. Good tool choices: bash, think, keyword_search\n- Make edits.\n- If you have completed a standalone chunk of work, make a git commit.\n- Update your todo task list.\n- Repeat.\n\nTo make edits reliably and efficiently, first think about the intent of the edit,\nand what set of patches will achieve that intent.\nThen use the patch tool to make those edits. Combine all edits to any given file into a single patch tool call.\n\nYou may run tool calls in parallel.\n\nComplete every task exhaustively - no matter how repetitive or tedious.\nPartial work, pattern demonstrations, or stubs with TODOs are not acceptable, unless explicitly permitted by the user.\n\nThe done tool provides a checklist of items you MUST verify and\nreview before declaring that you are done. Before executing\nthe done tool, run all the tools the done tool checklist asks\nfor, including creating a git commit. Do not forget to run tests.\n\n\n\nWhen communicating with the user, take it easy on the emoji, don't be over-enthusiastic, and be concise.\n\nDocker is available. Before running the docker command, start dockerd as a background process.\nAlways use --network=host when running docker containers.\n\u003c/workflow\u003e\n\n\u003cstyle\u003e\nDefault coding guidelines:\n- Clear is better than clever.\n- Minimal inline comments: non-obvious logic and key decisions only.\n- When no commit message style guidance is provided: write a single lowercase line starting with an imperative verb, ≤50 chars, no period\n\u003c/style\u003e\n\n\u003csystem_info\u003e\n\u003cplatform\u003e\nlinux/amd64\n\u003c/platform\u003e\n\u003cpwd\u003e\n/\n\u003c/pwd\u003e\n\u003c/system_info\u003e\n\n\u003cgit_info\u003e\n\u003cgit_root\u003e\n\n\u003c/git_root\u003e\n\u003cHEAD\u003e\nHEAD\n\u003c/HEAD\u003e\n\n\u003c/git_info\u003e\n\n",
"type": "text",
"cache_control": {
"type": "ephemeral"
@@ -548,24 +540,24 @@
Anthropic-Organization-Id: 3c473a21-7208-450a-a9f8-80aebda45c1b
Anthropic-Ratelimit-Input-Tokens-Limit: 2000000
Anthropic-Ratelimit-Input-Tokens-Remaining: 2000000
-Anthropic-Ratelimit-Input-Tokens-Reset: 2025-07-23T18:04:13Z
+Anthropic-Ratelimit-Input-Tokens-Reset: 2025-07-24T18:29:22Z
Anthropic-Ratelimit-Output-Tokens-Limit: 400000
Anthropic-Ratelimit-Output-Tokens-Remaining: 400000
-Anthropic-Ratelimit-Output-Tokens-Reset: 2025-07-23T18:04:18Z
+Anthropic-Ratelimit-Output-Tokens-Reset: 2025-07-24T18:29:26Z
Anthropic-Ratelimit-Requests-Limit: 4000
Anthropic-Ratelimit-Requests-Remaining: 3999
-Anthropic-Ratelimit-Requests-Reset: 2025-07-23T18:04:12Z
+Anthropic-Ratelimit-Requests-Reset: 2025-07-24T18:29:21Z
Anthropic-Ratelimit-Tokens-Limit: 2400000
Anthropic-Ratelimit-Tokens-Remaining: 2400000
-Anthropic-Ratelimit-Tokens-Reset: 2025-07-23T18:04:13Z
+Anthropic-Ratelimit-Tokens-Reset: 2025-07-24T18:29:22Z
Cf-Cache-Status: DYNAMIC
-Cf-Ray: 963d1951fa4567e9-SJC
+Cf-Ray: 96457b868b1a17e4-SJC
Content-Type: application/json
-Date: Wed, 23 Jul 2025 18:04:18 GMT
-Request-Id: req_011CRQPh7JZsCN9bRzBcZiu6
+Date: Thu, 24 Jul 2025 18:29:26 GMT
+Request-Id: req_011CRSKREDtTu6EhURJSoHyZ
Server: cloudflare
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Via: 1.1 google
X-Robots-Tag: none
-{"id":"msg_01EGxSVYkNrBjKc5foxF4frd","type":"message","role":"assistant","model":"claude-sonnet-4-20250514","content":[{"type":"text","text":"Here are the tools available to me:\n\n**File & Code Management:**\n- `bash` - Execute shell commands\n- `patch` - Modify files with precise text edits\n- `keyword_search` - Search codebase by keywords\n\n**Task Management:**\n- `todo_read` - Read current todo list\n- `todo_write` - Create/manage task list\n- `think` - Take notes and form plans\n\n**Git & Code Quality:**\n- `commit-message-style` - Get git commit message guidance\n- `codereview` - Run automated code review\n- `done` - Mark completion with checklist verification\n\n**Browser Automation:**\n- `browser_navigate` - Navigate to URLs\n- `browser_click` - Click elements\n- `browser_type` - Type into inputs\n- `browser_wait_for` - Wait for elements\n- `browser_get_text` - Read element text\n- `browser_eval` - Execute JavaScript\n- `browser_scroll_into_view` - Scroll to elements\n- `browser_resize` - Resize browser window\n- `browser_take_screenshot` - Capture screenshots\n- `browser_recent_console_logs` - Get console logs\n- `browser_clear_console_logs` - Clear console logs\n\n**Utilities:**\n- `read_image` - Read and encode image files\n- `about_sketch` - Get help with Sketch functionality"}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":3,"cache_creation_input_tokens":4261,"cache_read_input_tokens":0,"output_tokens":319,"service_tier":"standard"}}
\ No newline at end of file
+{"id":"msg_019AzMcwE57Xjjpv7Q8aUPZQ","type":"message","role":"assistant","model":"claude-sonnet-4-20250514","content":[{"type":"text","text":"Here are the tools available to me:\n\n**File & Code Management:**\n- `bash` - Execute shell commands\n- `patch` - Modify files with precise text edits\n- `keyword_search` - Search codebase by concepts/terms\n\n**Task Management:**\n- `todo_read` / `todo_write` - Track and manage task lists\n- `think` - Take notes and form plans\n\n**Development Workflow:**\n- `codereview` - Run automated code review\n- `done` - Complete tasks with verification checklist\n\n**Browser Automation:**\n- `browser_navigate` - Navigate to URLs\n- `browser_click` - Click elements\n- `browser_type` - Type into inputs\n- `browser_wait_for` - Wait for elements\n- `browser_get_text` - Read page text\n- `browser_eval` - Execute JavaScript\n- `browser_scroll_into_view` - Scroll to elements\n- `browser_resize` - Resize browser window\n- `browser_recent_console_logs` - Get console logs\n- `browser_clear_console_logs` - Clear console logs\n- `browser_take_screenshot` - Take screenshots\n\n**Utility:**\n- `read_image` - Read and encode image files\n- `about_sketch` - Get help with Sketch functionality"}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":3,"cache_creation_input_tokens":4236,"cache_read_input_tokens":0,"output_tokens":298,"service_tier":"standard"}}
\ No newline at end of file