Skip to content

docs(mentions): specify portable mention rules - #270

Closed
loganj wants to merge 2 commits into
feat/mention-chooser-rulesfrom
docs/mention-rules-spec
Closed

loganj wants to merge 2 commits into
feat/mention-chooser-rulesfrom
docs/mention-rules-spec

Conversation

@loganj

@loganj loganj commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

🤖
Stacked on #258, which is stacked on #257. Review those first. This PR's diff has only the spec, the fixtures, and the tests that run them.

Summary

What the spec covers

  • Who you can mention: channel members, the agents offered in the channel, and, in channels and forums only, people found in the community directory.
  • How @ text is read: when completion opens, and when a query with a space is still part of a name.
  • Matching and order: members first, then better matches, then the tie-breaks for agents with the same name.
  • Space: when Space completes a mention.
  • List stability: rows do not move while the list is open. This is desktop behavior and the fixtures do not test it.
  • People outside the channel: the send prompt with Do nothing / Invite, or Send anyway. It follows the block/buzz desktop dialog, and the spec names that source file.
  • Tags: a p tag notifies a person (a recipient). A two-field mention tag names a person without notifying them (a reference). This is the same format that other Buzz clients already write. No new event kind or NIP.
  • It also says what a mention does not do: choosing a person does not give them access, and it does not promise that an agent will answer.

Details

  • The spec is in src/bundled/mentions/README.md, next to the plugin that implements the chooser. This is the same layout as the identity-naming spec (docs(names): specify portable identity disambiguation #227). The README links to it.
  • mention-rules.fixtures.json has 66 cases: ranking (23), Space (12), query syntax (12), multi-word queries (6), tag writing (7), and tag reading (6). The expected outputs are written by hand. The code under test does not generate them.
  • The app's existing test files run every case through the production code: the ranking and Space functions, the @ query parser, the message send path, and the message reader. No existing test changed.

Larry added 2 commits September 25, 2026 11:43
Other clients can now reproduce the desktop mention chooser and tags from
one versioned spec. The spec defines the choice set, query syntax, match
tiers, sort order, Space selection, the outside-channel prompt, and the
p and two-field mention tags. The JSON fixtures hold literal expected
results, and the desktop tests run every case against the production
ranking, query, tag writer, and fold code.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Section 7 now lists Invite, Do nothing, Send anyway, and Close or Escape, with the permission that shows each one, and cites the block/buzz dialog source.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
@loganj

loganj commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Closed for now. This will reopen after #257 and #258 are accepted, in case they change. The branch stays pushed.

@loganj

loganj commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

🤖
Replaced by #343. GitHub could not reopen this PR after its base branch merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant