mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
docs(ai): update quickstart and contributing (agent)
- Update `README.md` example to clarify 's' tag auto-generation. - Update `CONTRIBUTING.md` with explicit `npm run lint` details and new "Event Schema Validation" section. - Verified all documentation against codebase. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
8c331f8c14
commit
d8d82cc51d
2 files changed
+12
-1
No files matched your search
@@ -145,6 +145,7 @@ To set up the project locally:
|
||||
```
|
||||
|
||||
_Note: `npm run format` currently targets CSS, HTML, Markdown, and Tailwind config files._
|
||||
_Note: `npm run lint` checks for CSS errors, hex color usage (use tokens instead), inline styles, and design token compliance._
|
||||
|
||||
5. **Git Hooks (Optional)**:
|
||||
We provide a script to set up a git pre-commit hook that runs linting and CSS builds automatically before you commit.
|
||||
@@ -154,6 +155,16 @@ To set up the project locally:
|
||||
|
||||
For a full guide, see the [Local Setup section in README.md](./README.md#local-setup).
|
||||
|
||||
### Event Schema Validation
|
||||
|
||||
When modifying event schemas or builders, verify your changes against the codebase and test suite:
|
||||
|
||||
```bash
|
||||
node scripts/agent/validate-events.mjs
|
||||
```
|
||||
|
||||
This script checks that all event builders produce valid events according to the definitions in `js/nostrEventSchemas.js`.
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
- **Browserslist Warning**: If you see `Browserslist: caniuse-lite is outdated` during the build, run:
|
||||
|
||||
@@ -246,7 +246,7 @@ const event = buildVideoPostEvent({
|
||||
version: 3,
|
||||
title: "My First Video",
|
||||
videoRootId: "my-first-video", // Logical ID, matches the d-tag
|
||||
url: "https://example.com/video.mp4",
|
||||
url: "https://example.com/video.mp4", // The builder automatically derives the required 's' storage tag from this URL
|
||||
description: "This is a test video post sent via the SDK."
|
||||
// magnet: "magnet:?xt=urn:btih:..." // Optional fallback (provide the raw magnet string)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user