From 3b0556414c0dc445efd962e074383501412d5314 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 13 Feb 2026 05:35:46 +0000 Subject: [PATCH] docs: align CLAUDE.md and nostr-event-schemas.md with codebase - Update `CLAUDE.md` to include `FEATURE_TRUSTED_HIDE_CONTROLS` and `FEATURE_IMPROVED_COMMENT_FETCHING`. - Update `docs/nostr-event-schemas.md` to include detailed schemas for NIP-17 and Gift Wrap kinds (1059, 13, 14, 15, 20001, 20002, 10050). - Add task logs for docs-alignment-agent execution. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- CLAUDE.md | 2 ++ context/CONTEXT_2026-02-13_05-26-29.md | 12 ++++++++++++ ...-13_05-26-29_docs-alignment-agent_started.md | 8 ++++++++ ...3_05-34-32_docs-alignment-agent_completed.md | 8 ++++++++ docs/nostr-event-schemas.md | 17 +++++++++++++++++ 5 files changed, 47 insertions(+) create mode 100644 context/CONTEXT_2026-02-13_05-26-29.md create mode 100644 docs/agents/task-logs/daily/2026-02-13_05-26-29_docs-alignment-agent_started.md create mode 100644 docs/agents/task-logs/daily/2026-02-13_05-34-32_docs-alignment-agent_completed.md diff --git a/CLAUDE.md b/CLAUDE.md index 996a17c5..d0ab3328 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -249,6 +249,8 @@ Feature flags in `js/constants.js` gate experimental behavior: | `FEATURE_PUBLISH_NIP71` | false | NIP-71 video publishing | | `FEATURE_SEARCH_FILTERS` | Dev mode only | Advanced search | | `FEATURE_TRUST_SEEDS` | true | Baseline trust seeds | +| `FEATURE_TRUSTED_HIDE_CONTROLS` | true | Trusted mute/spam hide controls | +| `FEATURE_IMPROVED_COMMENT_FETCHING` | true | Improved comment fetching logic | Toggle at runtime: ```javascript diff --git a/context/CONTEXT_2026-02-13_05-26-29.md b/context/CONTEXT_2026-02-13_05-26-29.md new file mode 100644 index 00000000..cff4bf87 --- /dev/null +++ b/context/CONTEXT_2026-02-13_05-26-29.md @@ -0,0 +1,12 @@ +# Docs Alignment Agent Context (2026-02-13) + +## Goal +Align development documentation with the current codebase behavior. + +## Scope +- `CLAUDE.md`: Update feature flags table to match `js/constants.js`. +- `docs/nostr-event-schemas.md`: Add missing detailed schema sections for NIP-17/Gift Wrap kinds. + +## Mismatches Identified +- `CLAUDE.md` missing `FEATURE_TRUSTED_HIDE_CONTROLS` and `FEATURE_IMPROVED_COMMENT_FETCHING`. +- `docs/nostr-event-schemas.md` missing detailed sections for Kinds 1059, 13, 14, 15, 20001, 20002, 10050. diff --git a/docs/agents/task-logs/daily/2026-02-13_05-26-29_docs-alignment-agent_started.md b/docs/agents/task-logs/daily/2026-02-13_05-26-29_docs-alignment-agent_started.md new file mode 100644 index 00000000..f1e3fc84 --- /dev/null +++ b/docs/agents/task-logs/daily/2026-02-13_05-26-29_docs-alignment-agent_started.md @@ -0,0 +1,8 @@ +# Agent Task Log Entry + +- **Date:** 2026-02-13 +- **Agent:** docs-alignment-agent +- **Prompt:** bitvid-docs-alignment-agent.md +- **Status:** started +- **Branch:** chore/docs-alignment-daily +- **Summary:** Task claimed — execution beginning diff --git a/docs/agents/task-logs/daily/2026-02-13_05-34-32_docs-alignment-agent_completed.md b/docs/agents/task-logs/daily/2026-02-13_05-34-32_docs-alignment-agent_completed.md new file mode 100644 index 00000000..026acfef --- /dev/null +++ b/docs/agents/task-logs/daily/2026-02-13_05-34-32_docs-alignment-agent_completed.md @@ -0,0 +1,8 @@ +# Agent Task Log Entry + +- **Date:** 2026-02-13 +- **Agent:** docs-alignment-agent +- **Prompt:** bitvid-docs-alignment-agent.md +- **Status:** completed +- **Branch:** chore/docs-alignment-daily +- **Summary:** Aligned CLAUDE.md flags and nostr-event-schemas.md with codebase. diff --git a/docs/nostr-event-schemas.md b/docs/nostr-event-schemas.md index c83a9b86..04e6346c 100644 --- a/docs/nostr-event-schemas.md +++ b/docs/nostr-event-schemas.md @@ -249,6 +249,23 @@ If you introduce a new Nostr feature, add its schema to `js/nostrEventSchemas.js` so that the catalogue stays complete and so existing builders inherit the same debugging knobs. +### NIP-17 & Gift Wrap (Kinds 1059, 13, 14) + +Modern direct messages use the NIP-17 "gift wrap" structure to maximize metadata privacy. The visible event on relays is the **Gift Wrap** (kind 1059), which encrypts a **Seal** (kind 13) for the recipient. The Seal in turn encrypts the actual **Chat Message** (kind 14) or other rumor types (like attachments), ensuring that only the sender and recipient can read the content or see the author/kind of the inner message. + +- **Gift Wrap (`1059`)**: Visible tags are limited to `['p', ]`. The content is a NIP-44 encrypted seal. +- **Seal (`13`)**: The content is a NIP-44 encrypted rumor. +- **Chat Message (`14`)**: The inner rumor containing the plaintext message. + +### DM Attachments & Receipts (Kinds 15, 20001, 20002, 10050) + +bitvid supports rich DM interactions via specialized kinds wrapped in NIP-17 seals (or legacy kind 4 for backward compatibility where applicable): + +- **DM Attachment (`15`)**: Represents a file transfer. Metadata lives in tags (`url`, `x` hash, `size`, `type`, `name`, `k` key) while the content field remains empty. +- **DM Read Receipt (`20001`)**: Ephemeral signal that a message was viewed. Tags include `['e', ]` and optional `['k', ]`. +- **DM Typing Indicator (`20002`)**: Ephemeral signal with an `['expiration']` tag to show active typing state without persisting history. +- **DM Relay Hints (`10050`)**: A discoverable list of relays where a user accepts NIP-17 gift wraps, allowing senders to route messages correctly. + ### Hashtag preference lists Hashtag preference events (`NOTE_TYPES.HASHTAG_PREFERENCES`) now publish as a