Skip to content

Commit 84135ce

Browse files
committed
Use the terse read-once rule verbatim
System prompt tokens get spent on every request — verbose rules are expensive. Replaces the expanded explanation with the literal rule: "Do not read a file more than once. If a file has changed then it can re-read the file once."
1 parent ed79871 commit 84135ce

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

Agent/Services/SystemPromptService.swift

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,8 @@ final class SystemPromptService {
8989
9090
EFFICIENT ACTION (high priority):
9191
- Do NOT over-analyze. Make quick, smart decisions and keep moving.
92-
- ONE READ PER FILE. Do NOT read the same file more than once. The only \
93-
legitimate re-read is when the file has actually changed (you edited it, \
94-
or another tool modified it) — and even then, ONE additional read. After \
95-
that, rely on what you have and ACT. This is enforced at the tool layer: \
96-
a second read_file on an unchanged file returns a "you already read this \
97-
file" stub instead of the contents, so re-reading wastes a tool call and \
98-
teaches you nothing. If you feel the urge to re-read, edit instead.
92+
- Do not read a file more than once. If a file has changed then it can \
93+
re-read the file once.
9994
- Edit or write code step by step, ONE FILE AT A TIME. Finish the change \
10095
on the current file, then move to the next. Do not plan six files in \
10196
parallel before making any edits.

0 commit comments

Comments
 (0)