block / block/buzz

Add owner-signed repository creation to Desktop and agent draft flow

Open
#5,052 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

## Problem

Buzz Desktop 0.5.5 shows repositories under Projects, but there is no visible flow to create one as the signed-in human.

The CLI supports `buzz repos create`, but the repository announcement is signed by the identity running the command. In an agent chat, that makes the agent the repository owner. A human cannot ask an agent to prepare a repository owned by the human without either leaving chat or exposing human signing credentials, which should never be required.

There is also no `--owner` option (correctly, since ownership must be cryptographically signed) and no owner-reviewed repository draft flow analogous to `buzz agents draft-create`.

## Proposed solution

Support both surfaces:

1. Add **New repository** under **Projects → Repositories**. The signed-in human reviews the fields and signs the NIP-34 repository announcement.
2. Add an owner-reviewed agent flow such as `buzz repos draft-create --channel ...`. The agent supplies metadata, Buzz Desktop opens a reviewable draft, and only the human's Save action signs and creates the repository.

Suggested fields:

- repository id
- display name
- description
- channel binding / ACL
- generated clone URL
- optional web URL and preferred Nostr relay

## Acceptance criteria

- A signed-in human can create a repository from Desktop and is the NIP-34 owner.
- An agent can prepare a repository draft without receiving or using the human private key.
- Saving the draft produces the same repository shape as `buzz repos create`; cancelling produces no repository event.
- The channel binding requirement and resulting access scope are explicit before Save.
- Duplicate or invalid repository ids are rejected before signing.
- Success returns/displays the `buzz://` deep link and clone URL.
- Tests prove that the final owner pubkey is the reviewing human, not the proposing agent.
- CLI and Desktop documentation cover both workflows.

## User scenario

A human wants to create a portable company knowledge-base repository through an agent conversation. The repository must remain human-owned so it survives agent replacement and can safely grant access to multiple harnesses.

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing `buzz repos create` and `buzz agents draft-create` flows across CLI and Desktop, then trace NIP-34 signing and the related tests. Define the review, validation, cancellation, and channel-binding behavior before implementing. Done means both workflows create the same repository shape, the reviewing human signs, invalid or duplicate IDs are rejected, and tests cover owner identity and no-event cancellation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, desktop, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.