prompt(execute-task): add parallel-tool-call rule
Adds step 0a: when independent reads/greps are needed, batch them in a single assistant turn instead of one-at-a-time. The existing step 0 already pushed for terse narration, but didn't address the bigger waste — sequential tool calls when parallel would work. Common case: reading handler + test + schema to triangulate a bug — three reads in one turn, not three turns. Also nudges away from "talking-then-doing": if the next action is unambiguous, just take it. Describing intent before every call is the dead weight that adds up to 30-50% extra round-trips. Behavior fix only (prompt-level). Model can still narrate inside its thinking channel since that's a model property; this targets the chat/tool-use channel where the user pays per turn. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
c5df4b46a6
commit
fb4885b757
1 changed files with 1 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ A researcher explored the codebase and a planner decomposed the work — you are
|
|||
|
||||
Then:
|
||||
0. Narrate step transitions, key implementation decisions, and verification outcomes as you work. Keep it terse — one line between tool-call clusters, not between every call — but write complete sentences in user-facing prose, not shorthand notes or scratchpad fragments.
|
||||
0a. **Batch independent tool calls in parallel.** When the next step needs to read or grep multiple files/paths that don't depend on each other's results, issue them in a single tool-call message (multiple tool uses in one assistant turn) rather than one-at-a-time. Examples: reading the handler + the test file + the schema file to triangulate a bug; greping for two unrelated symbols. Sequential tool calls are only correct when each call's input genuinely depends on the previous call's output. Talking-then-doing is also dead weight — if the next action is unambiguous, just take it; describe what you found in the result, not what you plan to look at.
|
||||
1. {{skillActivation}} Follow any activated skills before writing code. If no skills match this task, skip this step.
|
||||
2. Execute the steps in the inlined task plan, adapting minor local mismatches when the surrounding code differs from the planner's snapshot
|
||||
3. Before any `Write` that creates an artifact or output file, check whether that path already exists. If it does, read it first and decide whether the work is already done, should be extended, or truly needs replacement. "Create" in the plan does **not** mean the file is missing — a prior session may already have started it.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue