Compare commits

..

2 commits

Author SHA1 Message Date
Jeff Smith
a67e4789b2 merge: feat/issue-2-confidence-prompt (#2) 2026-04-06 20:46:08 -06:00
Jeff Smith
80f8f883c1 feat(prompts): instruct agent to set confidence on cache writes (#2)
Add confidence and confidence_reason to both cache schemas in the dir
loop prompt. Add a Confidence section with categorical guidance
(high ≥ 0.8, medium 0.5–0.8, low < 0.5) and the rule to include
confidence_reason when confidence is below 0.7.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 20:46:05 -06:00

View file

@ -55,12 +55,24 @@ Output this as plain text before tool calls, not as a tool call itself.
## Cache Schemas ## Cache Schemas
File: {{path, relative_path, size_bytes, category, summary, notable, File: {{path, relative_path, size_bytes, category, summary, notable,
notable_reason, cached_at}} notable_reason, confidence, confidence_reason, cached_at}}
Dir: {{path, relative_path, child_count, summary, dominant_category, Dir: {{path, relative_path, child_count, summary, dominant_category,
notable_files, cached_at}} notable_files, confidence, confidence_reason, cached_at}}
category values: source, config, data, document, media, archive, unknown category values: source, config, data, document, media, archive, unknown
## Confidence
Always set `confidence` (0.01.0) on every write_cache call:
high 0.8 you read the file/dir fully and understood it clearly
medium 0.50.8 partial read, ambiguous content, or uncertain purpose
low < 0.5 binary/unreadable, missing context, or genuinely unclear
Set `confidence_reason` whenever confidence is below 0.7. Explain briefly
why you are uncertain (e.g. "binary file, content not readable",
"no README or docstring, purpose inferred from filename only",
"file truncated at max_bytes"). Do NOT set confidence_reason when
confidence is 0.7 or above.
## Context ## Context
{context} {context}