Files
buzz/crates
Michael Neale c918877d60 fix(buzz-agent): stop rendering every AGENTS.md into the prompt twice
buzz-agent scanned for hint files itself and added the result as a
system-prompt extra. But goose's PromptManager::build_system_prompt
already calls .with_hints() (prompt_manager.rs:255), which runs the same
walk. Every AGENTS.md therefore reached the model twice -- once under our
'## Project Hints', again under goose's '### Project Hints'.

Verified against a scratch repo with a canary string: 2 occurrences
before, 1 after.

The walk really is the same algorithm, which is why this went unnoticed:
goose's find_git_root + get_local_directories collect cwd->root and
reverse for root->cwd ordering, exactly as buzz's did. goose's loader is
a superset -- .goosehints as a second filename, CONTEXT_FILE_NAMES to
configure the list, gitignore-aware filtering, and @file expansion
bounded at the git root.

So hint-file loading is deleted here and left to goose. What stays is
skill discovery, because load_skill is served by our builtin_client and
needs the same SkillEntry list the tool dispatches against.

hints.rs 732 -> 479 lines. A guard test fails if hint-file loading is
reintroduced, since the duplicate rendered silently -- the prompt was
merely longer, never wrong-looking.

Verified end-to-end against Anthropic: handtest.py --all, 18/18, persona
and hints still reach the model and load_skill still resolves.

Co-authored-by: Michael Neale <michael.neale@gmail.com>
Signed-off-by: Michael Neale <michael.neale@gmail.com>
2026-08-11 18:48:37 +10:00
..