From 72440a128502aaa15cf7d92bf059083290616a0c Mon Sep 17 00:00:00 2001 From: Szymon Tanski Date: Sat, 1 Aug 2026 14:02:03 +0200 Subject: [PATCH] docs: note that addressable channel events scope by d, not h The channel scoping rule reads as universal, but it holds only for events inside a channel. Addressable events that describe a channel (kind:39000, 39001, 39002) carry the channel id in their `d` tag, which is what `get_channels` already relies on. Reading the existing wording as covering kind:39002 costs a debugging cycle: membership events do have `h` tags in some flows, so the mistake produces an empty result rather than an error. Signed-off-by: Szymon Tanski --- AGENTS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 7ff0eb4d47..4f03b312bc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -145,6 +145,10 @@ first, then implement handling in the relay. **Channel scoping**: Channels use `h` tags (NIP-29 group tag), not `e` tags. Filters and queries must scope to `h` tags when operating within a channel. +This applies to events *inside* a channel. Addressable events that describe a +channel carry its id in their `d` tag instead: kind:39000 (metadata), +kind:39001, kind:39002 (membership). `get_channels` resolves a user's channels +from the `d` tag of their kind:39002 events, not from `h`. **Agent-facing operations go in `buzz-cli`**: New agent-facing features belong in `buzz-cli` — add a subcommand there first, then wire the REST/WebSocket call in `client.rs`. `buzz-dev-mcp` (shell + file tools for `buzz-agent`) is separate.