Files
bitvid/context/CONTEXT_20260218_154631.md

1.0 KiB

Documentation Plan: js/nostr/nip71.js

Selection

  • File: js/nostr/nip71.js
  • Lines: 1530
  • Reason:
    • Large Nostr helper file (>1500 LOC).
    • Handles core domain logic for Video Events (NIP-71), which is critical for BitVid.
    • Memory indicates it differs from other event builders (defined separately), making it a source of confusion.
    • Likely contains complex logic for validation, parsing, and construction of video events.
  • Last Significant Commit: f22253f560 (2026-02-18) - touched by perf-agent but likely not fully documented.

Plan

  1. Analyze: Read the file to understand its exports, flows, and dependencies.
  2. Document:
    • Add file-level overview comment.
    • Add JSDoc to all exported functions (builders, parsers, validators).
    • Document internal helper functions where necessary.
    • Create docs/nip71-overview.md if the logic is complex enough (likely yes, given 1.5k LOC).
  3. Verify: Run npm run test:unit and npm run lint.