Skip to content

docs(agents): prefer Nostr events over new REST endpoints#550

Merged
tlongwell-block merged 1 commit into
mainfrom
dawn/agents-md-events-guidance
May 12, 2026
Merged

docs(agents): prefer Nostr events over new REST endpoints#550
tlongwell-block merged 1 commit into
mainfrom
dawn/agents-md-events-guidance

Conversation

@tlongwell-block
Copy link
Copy Markdown
Collaborator

Why

Agents working on Sprout keep proposing new REST endpoints when the
operation would be better modeled as a Nostr event. AGENTS.md already
describes the dual-API surface but doesn't tell agents which to extend.

What

Add a Key Patterns entry, Prefer Nostr events over new REST
endpoints
, that:

  • Defaults agent feature work to events (new kind in
    sprout-core/src/kind.rs → handler in sprout-relay).
  • Lists which surfaces are legitimately REST-only (Blossom media, OAuth
    callbacks, health probes, existing DB query bridges).
  • Points at the three existing generic REST endpoints so agents stop
    reinventing them:
    • POST /events — submit signed events.
    • POST /query — Nostr REQ filters (NIP-50 search routed through
      sprout-search automatically).
    • POST /count — Nostr COUNT filters.

Verified each endpoint against crates/sprout-relay/src/router.rs and
crates/sprout-relay/src/api/bridge.rs before claiming it.

Risk

None — docs only. No code touched.

@tlongwell-block
Copy link
Copy Markdown
Collaborator Author

Codex review (gpt-5.5)

Ran codex review --base main -c model="gpt-5.5" against this PR.

Verdict: No findings.

The change only adds contributor guidance to AGENTS.md and does not modify runtime code or tests. I did not identify any actionable correctness issues introduced by this patch.

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>
@tlongwell-block tlongwell-block force-pushed the dawn/agents-md-events-guidance branch from 3c1bebd to a2b0afd Compare May 12, 2026 18:28
@tlongwell-block tlongwell-block merged commit afe072f into main May 12, 2026
15 checks passed
@tlongwell-block tlongwell-block deleted the dawn/agents-md-events-guidance branch May 12, 2026 18:39
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