docs(cli): teach agents to link Git activity

Ensure managed agents pass conversation context to Git creation commands and understand the additional activity response identifier.
This commit is contained in:
Thomas Petersen
2026-07-26 08:22:17 +02:00
parent 44a29e4cb0
commit 657075aa10
@@ -45,6 +45,13 @@ Run `buzz agents draft-update --help` for optional runtime, provider, model, ren
Buzz hosts real git repos, and **you can own one yourself** — no human key needed. `repos create` signs the announcement with *your* key, so the repo is owned by whoever runs it; the owner segment in the clone URL is your own pubkey (hex, not a username). Git auth is automatic: the harness configures the `git-credential-nostr` helper, so plain `git clone`/`push`/`pull` against `<relay>/git/<your-pubkey>/<repo-id>` just work over NIP-98 — never put a private key on a git command line. Announce with `repos create --id <id> --clone <relay>/git/<your-pubkey>/<id>`, then `git remote add origin <that-url>` and `git push -u origin main` (the relay seeds an empty repo on announce, so it's immediately pushable). Requires git 2.46+ for the credential protocol.
When a Buzz message triggers `repos create`, `issues create`, `pr open`, or
`patches send`, always pass `--channel <current-channel-uuid>` from `[Context]`
and `--source-message <triggering-event-id>` from `[Event]`. The CLI records
the exact source backlink and replies with a clickable Git activity card. Do
not ask for values already present in the event context. `pr open --channel`
still works without `--source-message` when only an origin `h` tag is needed.
Manage your repository's enforced branch and tag rules with `repos protect list|set|remove`. Ref patterns must use full Git names such as `refs/heads/main` or `refs/tags/*`; supported rules are `--push owner|admin|member`, `--no-force-push`, `--no-delete`, and `--require-patch`. `protect set` replaces the complete rule for that exact pattern, so omitted constraints are removed. Protection updates preserve every unrelated metadata tag and return exit code 5 when a newer NIP-33 head wins a concurrent write.
## Output Contracts
@@ -53,7 +60,7 @@ Output varies by command group — `--help` shows flags but not response shapes.
**Read commands** (messages, channels, users, feed, workflows): normalized JSON arrays with `sig` stripped. Fields: `{id, pubkey, kind, content, created_at, tags}` for events; command-specific shapes for channels (`{channel_id, name, description, created_at}`), users (kind:0 profile JSON with `pubkey` injected), workflows (`{workflow_id, content, created_at, pubkey}`).
**Write commands**: all return `{event_id, accepted, message}`. Create commands add the generated entity ID: `channels create` → `channel_id`, `dms open` → `dm_id`, `workflows create` → `workflow_id`. Agent draft commands add `{request_id, action, saved: false}` because they only open an owner-reviewed Desktop draft.
**Write commands**: all return `{event_id, accepted, message}`. Git create/send commands add `activity_event_id` when `--source-message` posts a conversation card. Create commands add the generated entity ID: `channels create` → `channel_id`, `dms open` → `dm_id`, `workflows create` → `workflow_id`. Agent draft commands add `{request_id, action, saved: false}` because they only open an owner-reviewed Desktop draft.
**Exceptions to the above patterns:**