all: mild prompt engineering
diff --git a/loop/agent.go b/loop/agent.go
index 55f92b5..c407420 100644
--- a/loop/agent.go
+++ b/loop/agent.go
@@ -730,7 +730,7 @@
"properties": {
"title": {
"type": "string",
- "description": "A concise, descriptive title summarizing what this conversation is about"
+ "description": "A concise title summarizing what this conversation is about, imperative tense preferred"
},
"branch_name": {
"type": "string",
diff --git a/loop/testdata/agent_loop.httprr b/loop/testdata/agent_loop.httprr
index a846803..0e3743c 100644
--- a/loop/testdata/agent_loop.httprr
+++ b/loop/testdata/agent_loop.httprr
@@ -1,9 +1,9 @@
httprr trace v1
-9271 1795
+9296 1708
POST https://api.anthropic.com/v1/messages HTTP/1.1
Host: api.anthropic.com
User-Agent: Go-http-client/1.1
-Content-Length: 9074
+Content-Length: 9099
Anthropic-Version: 2023-06-01
Content-Type: application/json
@@ -51,24 +51,24 @@
},
{
"name": "keyword_search",
- "description": "\nkeyword_search locates files with a search-and-filter approach.\nUse when navigating unfamiliar codebases with only conceptual understanding or vague user questions.\n\nEffective use:\n- Provide a detailed query for accurate relevance ranking\n- Include extensive but uncommon keywords to ensure comprehensive results\n- Order keywords by importance (most important first) - less important keywords may be dropped if there are too many results\n\nIMPORTANT: Do NOT use this tool if you have precise information like log lines, error messages, filenames, symbols, or package names. Use direct approaches (grep, cat, go doc, etc.) instead.\n",
+ "description": "\nkeyword_search locates files with a search-and-filter approach.\nUse when navigating unfamiliar codebases with only conceptual understanding or vague user questions.\n\nEffective use:\n- Provide a detailed query for accurate relevance ranking\n- Prefer MANY SPECIFIC terms over FEW GENERAL ones (high precision beats high recall)\n- Order search terms by importance (most important first)\n- Supports regex search terms for flexible matching\n\nIMPORTANT: Do NOT use this tool if you have precise information like log lines, error messages, filenames, symbols, or package names. Use direct approaches (grep, cat, go doc, etc.) instead.\n",
"input_schema": {
"type": "object",
"required": [
"query",
- "keywords"
+ "search_terms"
],
"properties": {
"query": {
"type": "string",
"description": "A detailed statement of what you're trying to find or learn."
},
- "keywords": {
+ "search_terms": {
"type": "array",
"items": {
"type": "string"
},
- "description": "List of keywords in descending order of importance."
+ "description": "List of search terms in descending order of importance."
}
}
}
@@ -97,7 +97,7 @@
"properties": {
"title": {
"type": "string",
- "description": "A concise, descriptive title summarizing what this conversation is about"
+ "description": "A concise title summarizing what this conversation is about, imperative tense preferred"
},
"branch_name": {
"type": "string",
@@ -248,23 +248,23 @@
Anthropic-Organization-Id: 3c473a21-7208-450a-a9f8-80aebda45c1b
Anthropic-Ratelimit-Input-Tokens-Limit: 200000
Anthropic-Ratelimit-Input-Tokens-Remaining: 200000
-Anthropic-Ratelimit-Input-Tokens-Reset: 2025-04-30T13:14:12Z
+Anthropic-Ratelimit-Input-Tokens-Reset: 2025-04-30T17:29:47Z
Anthropic-Ratelimit-Output-Tokens-Limit: 80000
Anthropic-Ratelimit-Output-Tokens-Remaining: 80000
-Anthropic-Ratelimit-Output-Tokens-Reset: 2025-04-30T13:14:14Z
+Anthropic-Ratelimit-Output-Tokens-Reset: 2025-04-30T17:29:49Z
Anthropic-Ratelimit-Requests-Limit: 4000
Anthropic-Ratelimit-Requests-Remaining: 3999
-Anthropic-Ratelimit-Requests-Reset: 2025-04-30T13:14:07Z
+Anthropic-Ratelimit-Requests-Reset: 2025-04-30T17:29:47Z
Anthropic-Ratelimit-Tokens-Limit: 280000
Anthropic-Ratelimit-Tokens-Remaining: 280000
-Anthropic-Ratelimit-Tokens-Reset: 2025-04-30T13:14:12Z
+Anthropic-Ratelimit-Tokens-Reset: 2025-04-30T17:29:47Z
Cf-Cache-Status: DYNAMIC
-Cf-Ray: 93874ce69ec8ebe4-SJC
+Cf-Ray: 9388c364d81aed3b-SJC
Content-Type: application/json
-Date: Wed, 30 Apr 2025 13:14:14 GMT
-Request-Id: req_011CNeydDVsWFfpe8jTmFBYK
+Date: Wed, 30 Apr 2025 17:29:49 GMT
+Request-Id: req_011CNfK7wMYMH3rv3YTfoRHn
Server: cloudflare
Via: 1.1 google
X-Robots-Tag: none
-{"id":"msg_01Ax6kNduzKv6n5goSVxmmiL","type":"message","role":"assistant","model":"claude-3-7-sonnet-20250219","content":[{"type":"text","text":"Based on your request, I'll list the tools available to me:\n\n1. bash - Execute shell commands\n2. keyword_search - Search for files and code based on keywords\n3. think - Record thoughts and plans without external effects\n4. title - Set conversation title and create git branch\n5. done - Mark task as complete with checklist verification\n6. codereview - Run automated code review\n7. patch - File modification tool for precise text edits\n\nThese tools help me assist you with coding tasks, particularly in Go development. How would you like me to help you today?"}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":4,"cache_creation_input_tokens":2241,"cache_read_input_tokens":0,"output_tokens":127}}
\ No newline at end of file
+{"id":"msg_01L6bfTxo2BbKxnFVT9ZdooZ","type":"message","role":"assistant","model":"claude-3-7-sonnet-20250219","content":[{"type":"text","text":"I can access the following tools:\n\n1. `bash` - Run shell commands\n2. `keyword_search` - Search for files containing specific terms\n3. `think` - Record my thoughts and planning\n4. `title` - Set conversation title and create a git branch\n5. `done` - Mark the task as complete with a checklist\n6. `codereview` - Run automated code review\n7. `patch` - Make precise text edits to files\n\nThese tools allow me to explore code, execute commands, make edits, and document my work."}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":4,"cache_creation_input_tokens":2257,"cache_read_input_tokens":0,"output_tokens":126}}
\ No newline at end of file