docs(agents): prefer Nostr events over new REST endpoints#550
Merged
Conversation
Collaborator
Author
Codex review (gpt-5.5)Ran Verdict: No findings.
|
Agents working on the codebase keep proposing new REST endpoints when the operation would be better modeled as a Nostr event. Add an explicit pattern under "Key Patterns" that: - Tells agents to default to events (new kind in sprout-core/src/kind.rs, handler in sprout-relay) for new feature work. - Lists which surfaces are legitimately REST-only (Blossom, OAuth, health, existing query/count bridges). - Points at the three existing generic REST endpoints (POST /events, POST /query, POST /count) so agents stop reinventing them, and notes that NIP-50 search is routed via /query. Signed-off-by: tlongwell-block <109685178+tlongwell-block@users.noreply.github.com>
3c1bebd to
a2b0afd
Compare
This was referenced May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Agents working on Sprout keep proposing new REST endpoints when the
operation would be better modeled as a Nostr event.
AGENTS.mdalreadydescribes the dual-API surface but doesn't tell agents which to extend.
What
Add a
Key Patternsentry, Prefer Nostr events over new RESTendpoints, that:
sprout-core/src/kind.rs→ handler insprout-relay).callbacks, health probes, existing DB query bridges).
reinventing them:
POST /events— submit signed events.POST /query— Nostr REQ filters (NIP-50 search routed throughsprout-searchautomatically).POST /count— Nostr COUNT filters.Verified each endpoint against
crates/sprout-relay/src/router.rsandcrates/sprout-relay/src/api/bridge.rsbefore claiming it.Risk
None — docs only. No code touched.