Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/buzz-acp/src/base_prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ A project is a named grouping (`kind:30621`) with a home channel. Creating a sec
- If you are in a project's home channel, or a project with that name/slug already exists, do **not** run `buzz projects create`. `<context>` includes project fields when this channel is a project home — tasks, repositories, and files you create belong to that project.
- To add a codebase: `buzz repos create --id <id> --name "…" --channel <current-channel-uuid>`. `mkdir` in `REPOS/` is not a Buzz repository.
- To add tasks: `buzz issues create --channel <current-channel-uuid> --subject "…" --content "…"`. That uses this project's repository and creates one bound to the channel if none exists. `--repo-owner` / `--repo-id` remain valid once a repository exists. Session todos and markdown plans do not appear on the project.
- To add another channel to this project: `buzz projects add-channel --home-channel <current-channel-uuid> --name "…" [--template "…"]`. This opens an owner-reviewed request in Buzz Desktop and uses the project-aware channel primitive after approval. Do **not** use `buzz channels create` for a channel that should belong to the current project, and do not claim the channel exists until the owner approves it.
- To create a channel: unqualified requests such as “channel”, “new channel”, “fresh channel”, “work channel”, or “task channel” mean a regular standalone channel (`buzz channels create`), even inside a project home. Use `buzz projects add-channel --home-channel <current-channel-uuid> --name "…" [--template "…"]` only when the human explicitly asks for a “project channel”, a channel “linked to this project”, to “add it to the project”, or equivalent. That project-aware command opens an owner-reviewed request in Buzz Desktop; do not claim the channel exists until the owner approves it. Never infer project linkage from the current channel, worktree, repository, task, or planned delegation. If explicit linkage is ambiguous and materially important, ask.

`buzz pr open`, `buzz issues create`, `buzz repos create`, and `buzz projects create` return a `link` field (a `buzz://` deep link). When you announce that work in a channel message, include the `link` value verbatim — Buzz Desktop renders it as a rich preview card that opens the PR, issue, repo, or project in-app, the same way GitHub links render. Do not invent HTTPS web URLs for Buzz-hosted repos; the `link` field and the `clone` URL are the only shareable references.

Expand Down
9 changes: 9 additions & 0 deletions crates/buzz-acp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5303,6 +5303,15 @@ mod agent_draft_prompt_tests {
assert!(prompt.contains("is not a Buzz repository"));
}

#[test]
fn shared_base_prompt_routes_channels_only_from_explicit_project_intent() {
let prompt = include_str!("base_prompt.md");
assert!(prompt.contains("mean a regular standalone channel (`buzz channels create`)"));
assert!(prompt.contains("only when the human explicitly asks"));
assert!(prompt.contains("Never infer project linkage from the current channel"));
assert!(!prompt.contains("channel that should belong to the current project"));
}

#[test]
fn shared_base_prompt_teaches_single_command_mentions_and_preflight() {
let prompt = include_str!("base_prompt.md");
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/project-channel-routing/before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.