Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

feat(prompt): turn-efficiency prompts — size reads to the file, match verification to the ask

Rach Pradhan6d0a9e3c5a73
diff --git a/src/prompt_snapshot_tests.zig b/src/prompt_snapshot_tests.zig
index 54fb6239..f0be1bbb 100644
--- a/src/prompt_snapshot_tests.zig
+++ b/src/prompt_snapshot_tests.zig
@@ -106,7 +106,10 @@ const golden_full_prompt =
\\a green run anywhere else is not evidence — and the failure you were
\\chasing gone. Never stop at a plan, a half-applied edit, or an untested
\\guess, and never leave the last step for the user. If a real ambiguity
- \\blocks you, ask; otherwise decide and go.
+ \\blocks you, ask; otherwise decide and go. Match the verification to the
+ \\ask: make the requested thing work and prove it — do not add unrequested
+ \\tests, coverage, or review passes; thoroughness past the ask is turns,
+ \\tokens, and diff noise the user did not order.
\\
\\Before a large chunk of work, give a one- or two-sentence heads-up on what
\\you are about to do; on long tasks, drop a brief note as each phase lands.
diff --git a/src/prompt_text.zig b/src/prompt_text.zig
index 4383ba94..0a56aea0 100644
--- a/src/prompt_text.zig
+++ b/src/prompt_text.zig
@@ -150,7 +150,10 @@ pub const work_note =
\\a green run anywhere else is not evidence — and the failure you were
\\chasing gone. Never stop at a plan, a half-applied edit, or an untested
\\guess, and never leave the last step for the user. If a real ambiguity
- \\blocks you, ask; otherwise decide and go.
+ \\blocks you, ask; otherwise decide and go. Match the verification to the
+ \\ask: make the requested thing work and prove it — do not add unrequested
+ \\tests, coverage, or review passes; thoroughness past the ask is turns,
+ \\tokens, and diff noise the user did not order.
;
/// Always present: narration is a habit, not a capability.
diff --git a/src/skills.zig b/src/skills.zig
index 8619dc1b..b47b7c25 100644
--- a/src/skills.zig
+++ b/src/skills.zig
@@ -67,7 +67,7 @@ pub const skills_registry = [_]SkillDef{
/// Edits inside the cwd stay native: edit_file/write_file are
/// /rewind-snapshotted and already splice via zigpatch, whereas codedb-pro
/// edit/patch/replace bypass /rewind. Explicit external targets use gated bash.
-const codedbpro_note_licensed = "The codedb-pro MCP server is connected and LICENSED — its mcp__codedbpro__* tools (load once per session via load_tool_schemas, e.g. by query) REPLACE the native read/search defaults, which are BLOCKED while the server is healthy: read/search calls are refused with a pointer to the pro equivalent, shell searches to `zigrep` via bash; any codedb-pro failure unblocks the natives for the rest of the session. KEEP EDITS inside the cwd on the native edit_file/write_file tools — they are snapshot-tracked for /rewind; codedb-pro edit/patch/replace bypass /rewind. An explicitly user-requested external target is the exception: permission-gated bash, quoted paths, and explain /rewind does not cover it.";
+const codedbpro_note_licensed = "The codedb-pro MCP server is connected and LICENSED — its mcp__codedbpro__* tools (load once per session via load_tool_schemas, e.g. by query) REPLACE the native read/search defaults, which are BLOCKED while the server is healthy: read/search calls are refused with a pointer to the pro equivalent, shell searches to `zigrep` via bash; any codedb-pro failure unblocks the natives for the rest of the session. Size reads to the file: mode=full in ONE call for small files — outline/symbol/lines modes are for files too big to read whole; never outline-first a file you could have read in one call. KEEP EDITS inside the cwd on the native edit_file/write_file tools — they are snapshot-tracked for /rewind; codedb-pro edit/patch/replace bypass /rewind. An explicitly user-requested external target is the exception: permission-gated bash, quoted paths, and explain /rewind does not cover it.";
const McpNote = struct { server: []const u8, note: []const u8 };
pub const mcp_notes = [_]McpNote{