Skip to content

refactor(prompt): compose upstream #6340 agent guidance - #296

Merged
oscarlehuu merged 2 commits into
mainfrom
devin/issue-283-acp-prompt-compose
Aug 22, 2026
Merged

oscarlehuu merged 2 commits into
mainfrom
devin/issue-283-acp-prompt-compose

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

Ports upstream Buzz block#6340 (refactor(prompt): simplify Buzz agent guidance, commit 752efe669) into the Crew fork, composed rather than applied blindly.

base_prompt.md — the ## Conversational Agent Creation section collapses from four blocks (two prose paragraphs + a bare command line + a draft-update note) into upstream's two paragraphs:

-...ask for at most two things: the agent's name and what it should do day-to-day. Turn the user's rough purpose into the `--system-prompt` yourself; do not separately ask for purpose, tone, ...
-`buzz agents draft-create --channel <current-channel-uuid> ...`
-Use the channel UUID from `[Context]`. Do not ask about runtime, ...: Buzz Desktop resolves local runtime/provider/model defaults ...
-For explicit changes ... Draft updates also require owner review and save.
+...ask for at most two things: its name and what it should do day-to-day. Write the `--system-prompt` yourself. Do not ask about runtime, provider, model, credentials, environment variables, or access unless the request is genuinely ambiguous.
+Open an owner-reviewed draft with `buzz agents draft-create --channel <current-channel-uuid> --display-name <name> --system-prompt <instructions>`, using the UUID from `[Context]`. Never claim the agent exists until the owner saves it. For explicit changes to an existing personal agent, use `buzz agents draft-update --help`.

Everything removed here is upstream text — no Crew delta is lost. All Crew office sections (CoS intake, Evidence on completion, Gate C client acceptance, no-bare-ack, call-by-name) keep their position after upstream's ## Communication Patterns, per docs/crew/UPSTREAM-SYNC.md; the Crew BUZZ_AUTH_TAG draft caveat stays in the Buzz CLI section.

buzz-cli — upstream's channels create --ttl help clarification (omitting --ttl ⇒ permanent channel) is the second half of the same upstream commit, so it lands here rather than in the sibling CLI issue (#284, which touches messages). Doc-comment text only, no behaviour change.

Two new prompt-contract tests machine-check both halves of the compose, so a future sync cannot silently re-expand the section or move a Crew section above Communication Patterns.

Divergences from upstream: none required. Upstream's parent revision also contains buzz issues assign / buzz projects create prompt text that Crew does not carry yet — out of scope for #283, left to its own sync child.

Related issue

Fixes #283 (parent sync meta #285, guardrail #278 — no IA files touched).

Testing

TDD, non-UI change → full terminal logs attached to the session message.

  • RED: cargo test -p buzz-acp --lib agent_draft_prompt_tests → shared_base_prompt_agent_creation_is_compact_upstream_form FAILED; cargo test -p buzz-cli --lib channels_create_ttl → FAILED.

  • GREEN: cargo test -p buzz-acp --lib → 1024 passed, 0 failed (all pre-existing Crew prompt assertions still green); new prompt tests + CLI ttl test pass.

  • Gates: pnpm --filter buzz check ✅, pnpm --filter buzz typecheck ✅, pnpm --filter buzz test ✅ (5528 passed / 1 skipped / 0 failed), just check-compile ✅, cargo clippy -p buzz-acp -p buzz-cli --all-targets ✅ (warnings only, pre-existing).

  • just test-unit reports two failures that are pre-existing on main and unrelated to this diff (baseline logs captured on a clean main tree):

    • buzz-cli inventory tests (command_inventory_is_stable, subcommand_counts_are_stable, subcommand_names_are_stable) — drift from the Crew-added agents call subcommand.
    • buzz-db embedded_migrator_contains_consolidated_initial_schema — migration count 31 vs expected 30.

    Both fail identically with this branch stashed, so they are not fixed here (out of upstream(sync): Tier 1 ACP prompt compose — Buzz agent guidance (#6340) #283 scope).

Reality ladder: level 0 (prompt text + machine-checked contract). No UI surface changed; the prompt is consumed by the ACP harness, so a fresh-channel agent session pickup (#116) is the level-2 check left for the sync meta.

Link to Devin session: https://app.devin.ai/sessions/0ffe1fa784824cba8eddafe194122337
Requested by: @oscarlehuu

Port Buzz block#6340 into the Crew base prompt: compact the Conversational
Agent Creation section to two paragraphs and clarify that omitting
channels create --ttl yields a permanent channel. Crew office sections
(CoS intake, evidence-on-completion, Gate C, no-bare-ack) stay in place
after upstream Communication Patterns, guarded by new contract tests.

Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Oscar Le <[email protected]>
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration

Copy link
Copy Markdown
Author

Runtime verification — composed base prompt actually reaches a live ACP agent

Tested with the acp-harness-e2e skill: real buzz-acp process against a local relay (Postgres + Redis + MinIO, BUZZ_AUTO_MIGRATE=true), open stream channel, owner key mentions an agent key, and a scriptable fake ACP agent logging every JSON-RPC frame. No unit-test-only claims — this is the prompt the agent received on the wire.

ACP v2: session/new.params.systemPrompt (18,418 chars) — new upstream text AND Crew office sections both present
systemPrompt frames: 1, prompt text blocks: 2
UPSTREAM     PASS   present  'Open an owner-reviewed draft with `buzz agents draft-create'
UPSTREAM     PASS   present  'its name and what it should do day-to-day'
CREW         PASS   present  'CoS intake'
CREW         PASS   present  'Evidence on completion'
CREW         PASS   present  'Never publish a bare acknowledgement'
CREW         PASS   present  'buzz agents call --channel <UUID> --agent <Name>'
CREW         PASS   present  'Client acceptance (Gate C)'
REMOVED-OLD  PASS   absent   'Buzz Desktop resolves local runtime/provider/model defaults'
REMOVED-OLD  PASS   absent   "the agent's name and what it should do day-to-day"
ORDER        PASS   ## Communication Patterns@4403 < CoS intake@9899, Gate C@16227
RESULT: PASS (0 failures)

The delivered section verbatim, as received by the agent:

## Conversational Agent Creation

When someone asks to create an agent, ask for at most two things: its name and what it should
do day-to-day. Write the `--system-prompt` yourself. Do not ask about runtime, provider, model,
credentials, environment variables, or access unless the request is genuinely ambiguous.

Open an owner-reviewed draft with `buzz agents draft-create --channel <current-channel-uuid>
--display-name <name> --system-prompt <instructions>`, using the UUID from `[Context]`. Never
claim the agent exists until the owner saves it. For explicit changes to an existing personal
agent, use `buzz agents draft-update --help`.

## Communication Patterns
Legacy ACP protocol v1 [Base] path — also passing

With FAKE_AGENT_PROTOCOL=1 the harness sends no systemPrompt; the first session/prompt text block starts with [Base] and carries the same 7 substrings, same ordering, old wording still absent (RESULT: PASS (0 failures)).

buzz channels create --help — new ttl wording
      --ttl <SECONDS>  Make the channel temporary/ephemeral: idle lifetime in seconds. If omitted,
                       the channel is permanent. The relay archives it once this many seconds pass
                       without a new message
cargo test -p buzz-acp --lib — 1024 passed, 0 failed (41.78s)

Note: the first full run hung >60 min on acp::tests::pending_elicitation_pauses_idle_and_hard_deadlines while the box was loaded (relay + harness running). It passes in isolation (0.03s) and the clean re-run was fully green — pre-existing flake/hang-under-load, unrelated to this diff, but it could stall CI.

No UI surface is touched by this PR, so there are no screenshots — the wire-level frame captures above are the evidence.

Written by Devin

@oscarlehuu
oscarlehuu merged commit 6326e4b into main Aug 22, 2026
8 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upstream(sync): Tier 1 ACP prompt compose — Buzz agent guidance (#6340)

1 participant