Files
buzz/docs/nips
Will Pfleger acf1ede202 docs(nip-ap): add teams and kind:44300 instructions versions (#8191)
🤖 This PR adds two things to NIP-AP: a Teams section, and `kind:44300`
instructions versions, an owner-private history of each agent's and each
team's instructions. Today instructions are edited in place, so there's
no way to see past edits, tie a behavior change to an edit, or roll
back.

**Teams.** A team is identified by owner, community, and team id, using
the same id grammar as the `kind:30178` `d` tag. The section defines
what membership means (scoped by owner and community, not channel
membership, follows the team's current instructions), how team
instructions combine with an agent's own at launch, and the existing
rule that an agent in several teams can't start if their instructions
differ. How a client stores its private team records stays
client-defined, so this doesn't standardize discovering another client's
private teams.

**`kind:44300`.** A regular event, so every save is a new event and a
subject's events are its history. Each event names exactly one subject:
an agent (`p`) or a team (`t`). Content is NIP-44 encrypted to the owner
as `v1:` plus the raw text, which keeps empty text representable and
caps `content` at 218,548 bytes for the 128 KiB text limit. Current is
the newest version, and history pages with the `until` + `before_id`
cursor so versions saved in the same second are never skipped. Restore
and Reset to template append a new version. Launch order for an agent's
own instructions is its current version, then the linked `30175` prompt,
then a definition-less `30177`. The relay keeps it author-only on every
read surface, excludes it from search, and applies the subject filter
before `LIMIT`. Deletion requests for these versions must carry `["k",
"44300"]` and get the same author-only treatment, since they reveal
version ids and deletion times. A `30178` share is a snapshot: saving a
version doesn't change an existing share.

**Changes to existing spec text:**
- Removed the sentence saying `kind:30176`'s body is untouched "so
device sync keeps its contract". The current desktop client doesn't sync
teams through `30176`.
- Reworded the `30178` `d` tag rationale so it no longer refers to a
`30176` head.
- The "30175 beats 30177" rule now says a current `44300` version beats
both for an agent's instructions.
- Replaced the stale search bullet. It claimed no shared-gated kind is
in an FTS allowlist; search indexes those kinds, and each result passes
the per-event visibility check before delivery.

Relay and desktop implementation follow in separate PRs once this is
approved.

---------

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Paul <4a1bfa0013bc6d14a8d600d8bf6392efefbd2a26ac3c96c9b2a106b0d12297ca@buzz.block.builderlab.xyz>
Co-authored-by: Paul <4a1bfa0013bc6d14a8d600d8bf6392efefbd2a26ac3c96c9b2a106b0d12297ca@buzz.block.builderlab.xyz>
2026-10-08 19:39:38 -04:00
..
…
…
…