buzz icon indicating copy to clipboard operation
buzz copied to clipboard

feat(acp): reload team instructions from file

Open dschwartzAI opened this issue 4 months ago • 0 comments

What changed

  • Adds --team-instructions-file / BUZZ_ACP_TEAM_INSTRUCTIONS_FILE as a durable alternative to inline BUZZ_ACP_TEAM_INSTRUCTIONS.
  • Validates the file at startup, caps reads at 64 KiB, trims blank content, requires UTF-8, and rejects simultaneous inline/file sources.
  • Re-reads the file for every new ACP session; legacy adapters re-read it before every prompt.
  • Fails closed if a live file becomes unreadable or oversized, so an affected prompt never reaches the adapter with stale or partial team instructions.
  • Documents BUZZ_AUTH_TAG as provider/Desktop-supplied NIP-OA delegated authority and records the reserved-key/safe-provisioning boundary.

Why

Remote and long-running agents need a durable, operator-owned instruction source that can change without restarting the harness. Upstream previously treated BUZZ_ACP_TEAM_INSTRUCTIONS only as literal inline text, so passing a path injected the path itself. The README also omitted the trusted boundary around BUZZ_AUTH_TAG, which made the agent environment editor look like an intended provisioning surface even though Buzz strips and replaces reserved identity values.

Related to #2859 and remote-provider work in #3449. This does not duplicate the provider implementation.

Security and compatibility

  • Existing inline behavior and the default path remain unchanged.
  • The file path is operator-supplied and content is never logged by this feature.
  • Read size is bounded before UTF-8 decoding.
  • Missing or invalid durable instructions fail the affected session/prompt closed.
  • No owner key material is added or handled.

Verification

  • cargo test -p buzz-acp — 622 unit tests + 9 lifecycle tests passed
  • cargo clippy -p buzz-acp --all-targets -- -D warnings
  • cargo fmt --all
  • git diff --check
  • DCO sign-off present on both commits

dschwartzAI avatar Jul 29 '26 06:07 dschwartzAI