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 <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-13 05:35:46 +00:00
1 parent b55b96a620
commit 3b0556414c
5 files changed
+47

No files matched your search

+2
View File
@@ -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
+12
View File
@@ -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.
@@ -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
@@ -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.
+17
View File
@@ -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', <recipient>]`. 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', <messageId>]` and optional `['k', <messageKind>]`.
- **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