Commit Graph
314 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 393c06c749 [decompose] extract ProfileHashtagController from js/ui/profileModalController.js
Extracts all hashtag preference related logic into a new controller
`js/ui/profileModal/ProfileHashtagController.js` to reduce the size of `js/ui/profileModalController.js` and improve maintainability.

- Moves `normalizeHashtagTag`, `formatHashtagTag`, `getResolvedHashtagPreferences`, `setHashtagStatus`, `refreshHashtagBackgroundStatus`, `populateHashtagPreferences`, `renderHashtagList`, `sanitizeHashtagList`, `createHashtagListItem`, `persistHashtagPreferences`, `handleAddHashtagPreference`, `handleRemoveHashtagPreference`, `handleHashtagPreferencesChange`, `describeHashtagPreferencesError`.
- Updates `ProfileModalController` to delegate to `ProfileHashtagController`.
- Adds delegate getters/methods in `ProfileModalController` to maintain backward compatibility for tests.
- Reduces `js/ui/profileModalController.js` by ~600 lines.
- Updates file size baseline in `scripts/check-file-size.mjs`.

Passes `npm run lint` and `npm run test:unit`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 02:06:08 +00:00
thePR0M3TH3AN 6150ef96ff Merge branch 'unstable' into ai/decompose/daily-run-4837693991627885906 2026-02-12 20:48:23 -05:00
google-labs-jules[bot]andPR0M3TH3AN 5f1edebea7 [decompose] extract ProfileHashtagController from js/ui/profileModalController.js
Extracts all hashtag preference related logic into a new controller
`js/ui/profileModal/ProfileHashtagController.js` to reduce the size of `js/ui/profileModalController.js` and improve maintainability.

- Moves `normalizeHashtagTag`, `formatHashtagTag`, `getResolvedHashtagPreferences`, `setHashtagStatus`, `refreshHashtagBackgroundStatus`, `populateHashtagPreferences`, `renderHashtagList`, `sanitizeHashtagList`, `createHashtagListItem`, `persistHashtagPreferences`, `handleAddHashtagPreference`, `handleRemoveHashtagPreference`, `handleHashtagPreferencesChange`, `describeHashtagPreferencesError`.
- Updates `ProfileModalController` to delegate to `ProfileHashtagController`.
- Reduces `js/ui/profileModalController.js` by ~600 lines.
- Updates file size baseline in `scripts/check-file-size.mjs`.

Passes `npm run lint` and `npm run test:unit`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 01:39:22 +00:00
google-labs-jules[bot]andPR0M3TH3AN 205b704af0 docs(agents): add task completion guidelines to all agent prompts
- Inserts a `## TASK COMPLETION & SELF-CORRECTION` section into all daily and weekly agent prompts.
- Instructs agents to complete their task and commit upon success, rather than asking for next steps.
- Provides specific negative examples of questions to avoid.
- Places the instruction before `FINAL NOTE` or `BEGIN` markers to ensure visibility.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 01:37:12 +00:00
thePR0M3TH3AN adf739517d Merge pull request #2413 from PR0M3TH3AN/content-audit/fix-upload-docs-8160176985010143731
chore(agents): run content-audit-agent daily task
2026-02-12 20:14:04 -05:00
thePR0M3TH3AN 39b27c6bbc docs(agents): clarify scheduler PR filter scope 2026-02-12 20:00:38 -05:00
google-labs-jules[bot]andPR0M3TH3AN b7f63b323a chore(agents): replace gh pr list with curl in agent prompts
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 00:37:21 +00:00
Claude 857e820d65 fix(agents): prevent duplicate job selection in scheduler prompts
Agents were repeatedly picking up content-audit-agent because:
1. CSV only updated after task completion — crashes left no trace
2. PR claim check (Step 1.5) was buried and easy to skip
3. No "started" status meant failed runs were invisible to rotation
4. Pre-flight scan was too narrow (checked one agent, not all)

Changes:
- Add Step 0 (mandatory pre-flight) that scans ALL open PRs and CSV
  for in-progress work before selecting any task
- Introduce "started" CSV status logged immediately upon claiming,
  before task execution begins — ensures rotation advances on crash
- Promote claim check from sub-step 1.5 to full Step 2 with explicit
  MANDATORY warnings
- Add 24-hour stale claim timeout for abandoned "started" entries
- Add fallback: if gh is unavailable, CSV "started" rows still work
- Strengthen META_PROMPTS.md to front-load deduplication as Step 0
  with explicit "this has happened before" warning language
- Add Quick Reference table summarizing all 5 deduplication layers

https://claude.ai/code/session_017QCJvunQJ7ATr6uZBHV5iA
2026-02-13 00:08:36 +00:00
google-labs-jules[bot]andPR0M3TH3AN eeaf89330e chore(agents): run content-audit-agent daily task — audit upload docs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 23:50:45 +00:00
thePR0M3TH3AN 5324294b7a Merge pull request #2412 from PR0M3TH3AN/chore/agents/fix-scheduler-claims-9955232686930365858
Fix scheduler task claiming logic and add meta prompts
2026-02-12 18:42:08 -05:00
google-labs-jules[bot]andPR0M3TH3AN 7e86f96a2c chore(agents): fix scheduler task claiming logic and add meta prompts
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 23:41:48 +00:00
google-labs-jules[bot]andPR0M3TH3AN a77e182ed1 chore(agents): run const-refactor-agent daily task — Refactored timeouts in UI controllers and webtorrent.js to use canonical constants
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 23:10:37 +00:00
thePR0M3TH3AN fadd74b0af Merge pull request #2409 from PR0M3TH3AN/claude/investigate-agent-scheduling-pOFwt
Add task claiming protocol to prevent duplicate agent work
2026-02-12 17:07:26 -05:00
thePR0M3TH3AN 429d15e6f6 Merge pull request #2408 from PR0M3TH3AN/ai/ci-health-fix-watch-history-flake-12522500475940907567
test: fix flaky watch history hydration test using waitFor
2026-02-12 17:04:26 -05:00
Claude 749dece7dd docs(agents): add draft PR task claiming protocol to prevent duplicate work
When multiple agents (Claude Code, Codex, Jules) run schedulers concurrently,
they can pick up the same task because neither has committed yet. This adds a
"Draft PR Lock" protocol: agents must check for and create a draft PR before
starting work, acting as a distributed lock visible to all platforms.

Changes:
- AGENTS.md §12: new "Task Claiming Protocol" subsection with check/claim/race
  handling steps
- daily-scheduler.md: new Step 1.5 with concrete gh CLI commands
- weekly-scheduler.md: same Step 1.5 addition

https://claude.ai/code/session_01Vnih5ZARbEmnh3EGTDQAXX
2026-02-12 22:02:37 +00:00
google-labs-jules[bot]andPR0M3TH3AN 36a8eba565 test: fix flaky watch history hydration test using waitFor
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 21:51:20 +00:00
google-labs-jules[bot]andPR0M3TH3AN e3c382d19c docs(ai): weekly changelog draft
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 21:42:54 +00:00
thePR0M3TH3AN f482909550 Merge pull request #2405 from PR0M3TH3AN/unstable-12848923588166411502
Run audit-agent daily task
2026-02-12 16:14:50 -05:00
google-labs-jules[bot]andPR0M3TH3AN 20a295b170 chore(agents): run bug-reproducer-agent weekly task — Created reproducer for hashtag preferences flakiness
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 21:10:58 +00:00
google-labs-jules[bot]andPR0M3TH3AN fab5b11824 chore(agents): run audit-agent daily task — initial audit report
- Executed `scripts/check-file-size.mjs --report`
- Executed `scripts/check-innerhtml.mjs --report`
- Executed `npm run lint` (skipped assets check due to missing build)
- Created parser scripts in `scripts/agent/audit-parsers/`
- Generated JSON reports and summary in `artifacts/audit/2026-02-12/`
- Updated `AGENT_TASK_LOG.csv`

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 21:10:13 +00:00
google-labs-jules[bot]andPR0M3TH3AN a7d18e232a chore(docs): update interop and smoke agent prompts
- Add missing FAILURE MODES, OUTPUTS PER RUN, and BEGIN sections to `docs/agents/prompts/weekly/bitvid-interop-agent.md`
- Add missing FAILURE MODES, PR & COMMIT CONVENTIONS, OUTPUTS PER RUN, and BEGIN sections to `docs/agents/prompts/weekly/bitvid-smoke-agent.md`
- Ensure consistency with other agent prompts in the repository

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 20:49:15 +00:00
Claude 843f1a8c2d docs(agents): add prompt library supporting docs
Add three supporting documents for prompt library maintenance:

- PROMPT_LIBRARY_STATUS.md: current health, inventory of all 36
  prompts, changes this run, known remaining issues
- STYLE_GUIDE.md: canonical prompt template, naming conventions,
  voice/tone guidance, anti-patterns to avoid
- RESEARCH_LOG.md: web research on prompt-engineering best practices
  from Anthropic and OpenAI (2025-2026), with library impact analysis

https://claude.ai/code/session_01Nz6FJopPp2YHEscJrRAFNv
2026-02-12 20:42:41 +00:00
Claude 6a79cb52c5 docs(agents): fix behavioral defects in agent prompts (P2)
- Remove AI generation artifacts (:contentReference) from
  docs-code-investigator (4 occurrences)
- Fix require() -> import in event-schema-agent example
  (project uses ES modules)
- Clarify nonexistent script reference in const-refactor-agent
  (scripts/find-numeric-literals.js must be created, not assumed)
- Close truncated code blocks and add TODO notices in interop-agent
  and smoke-agent (both missing Failure Modes and Outputs sections)

No agent mission changes.

https://claude.ai/code/session_01Nz6FJopPp2YHEscJrRAFNv
2026-02-12 20:42:22 +00:00
Claude c96982f469 docs(agents): fix policy violations in agent prompts (P1)
- Fix agent name typo: bitvd -> bitvid in content-audit-agent
- Remove emoji from PR titles in content-audit, docs-alignment, perf,
  and perf-optimization agents (CLAUDE.md prohibits emoji)
- Fix identity/filename mismatch: style-agent.md said stylelint-agent

No agent mission changes.

https://claude.ai/code/session_01Nz6FJopPp2YHEscJrRAFNv
2026-02-12 20:42:00 +00:00
google-labs-jules[bot]andPR0M3TH3AN 354cc9a2b8 chore(agents): update weekly scheduler roster
Update `docs/agents/prompts/weekly-scheduler.md` to include 12 missing agents that were present in the `docs/agents/prompts/weekly` directory but absent from the scheduler list.

This ensures the weekly agent rotation includes all available weekly agents:
- bug-reproducer-agent
- dead-code-agent
- event-schema-agent
- fuzz-agent
- interop-agent
- perf-optimization-agent
- pr-review-agent
- refactor-agent
- smoke-agent
- telemetry-agent
- test-coverage-agent
- weekly-synthesis-agent

Verified that the daily scheduler list is already up-to-date.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 20:26:36 +00:00
thePR0M3TH3AN 8a924e60d4 updated agent library 2026-02-12 15:18:40 -05:00
Claude de5296e44c docs(agents): add race-condition-agent to weekly rotation
Add a weekly race condition agent that systematically audits the codebase
for concurrency hazards, timing bugs, and initialization races. The agent
covers relay connection ordering, signer availability, playback fallback
negotiation, cache state consistency, and DOM-ready assumptions.

https://claude.ai/code/session_01AudwR75Y4Bi4WLSYEAJPVW
2026-02-12 19:57:15 +00:00
Claude 2e0bcefa4b docs(agents): add scheduler-update-agent to daily rotation
Add a new daily agent whose job is to keep the daily and weekly scheduler
rosters in sync with the actual prompt files on disk. It scans the prompt
directories, diffs against the roster tables, and applies additions,
removals, or filename corrections as needed.

- New file: docs/agents/prompts/daily/bitvid-scheduler-update-agent.md
- Updated daily-scheduler.md roster (20 -> 21 agents)

https://claude.ai/code/session_01KZQjoJKmPH74AK3QF1pzSq
2026-02-12 19:43:46 +00:00
Claude d559bd6d0b chore(agents): add weekly agent scheduler prompt and task log
- Add weekly-scheduler.md with rotation logic for 3 weekly agents
  (changelog-agent, frontend-console-debug-agent, perf-deepdive-agent)
- Add separate WEEKLY_AGENT_TASK_LOG.csv to keep weekly and daily
  rotations independent
- Mirrors the daily-scheduler.md structure with the same authority
  hierarchy, error handling, and log format

https://claude.ai/code/session_017PuKrVuAUbo1seo7jBTbw6
2026-02-12 19:34:50 +00:00
thePR0M3TH3AN 1bb073c4c9 update 2026-02-12 14:30:08 -05:00
Claude 647abfdd05 chore(agents): add daily agent scheduler prompt and task log
Replace the ad-hoc scheduling instructions with a structured
scheduler prompt that handles task rotation, error cases, and
CSV-based run tracking.

https://claude.ai/code/session_019EdLsbzCWtht1R3qk7pptb
2026-02-12 19:22:43 +00:00
thePR0M3TH3AN cf5a9e1a0c added agent library 2026-02-12 14:12:26 -05:00
google-labs-jules[bot]andPR0M3TH3AN a997120f42 chore(ai): doc js/nostr/client.js and videoEventBuffer.js
- Add JSDoc to exported methods in `js/nostr/client.js`
- Add JSDoc to `js/nostr/videoEventBuffer.js`
- Add in-code comments for complex algorithms (history hydration, soft/hard delete, buffering)
- Update `docs/nostr-client-overview.md` with invariants and pitfalls
- No functional changes

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 15:28:54 +00:00
google-labs-jules[bot]andPR0M3TH3AN 676f41d76d chore(ai): doc js/nostr/managers/EventsCacheStore.js (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 15:30:45 +00:00
thePR0M3TH3AN 6fce210044 [ci] verify dist deploy artifact and force HTML cache purge 2026-02-10 16:52:05 -05:00
google-labs-jules[bot]andPR0M3TH3AN b2ab1d9f48 docs: align development docs with codebase behavior
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-10 16:50:35 +00:00
google-labs-jules[bot]andPR0M3TH3AN 8df741f525 chore(ai): doc js/nostr/client.js (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-10 15:10:49 +00:00
google-labs-jules[bot]andPR0M3TH3AN de7218d90b docs(ai): update quickstart and contributing (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-10 14:09:05 +00:00
thePR0M3TH3AN c36a240394 Add cache-safe deploy smoke checks for unstable releases 2026-02-10 01:16:17 -05:00
thePR0M3TH3AN 53ac83df2a [ci] remove runtime asset version cache busting 2026-02-10 01:10:19 -05:00
Claude 804b3323c4 Add code health lint guards, consolidate relay constants, document agent prompts
Three CI-enforced lint scripts to prevent common codebase growth problems:

- lint:file-size — enforces 1000-line max for new JS files, grandfathers
  existing oversized files and prevents them from growing further
- lint:innerhtml — tracks innerHTML usage per-file with a baseline count,
  blocks new innerHTML additions (guides agents toward safe DOM APIs)
- Relay constants consolidated from duplicate definitions in client.js and
  ConnectionManager.js into shared js/nostr/relayConstants.js
- AGENTS.md Section 13: documents all three rules with examples
- docs/scheduled-agent-prompts.md: copy-paste prompts for recurring
  file decomposition, innerHTML migration, and constant dedup tasks

https://claude.ai/code/session_01LzErpH9FNw4hAPsjoYb1v9
2026-02-10 03:25:18 +00:00
Claude bc1341d989 Add Capacitor native app migration plan
Comprehensive plan for wrapping bitvid as native apps using Capacitor
for Android, iOS, and desktop (Windows/macOS/Linux via Electron).
Covers architecture, phased implementation, CI/CD workflows, testing
strategy, platform risks, and app store submission guidance.

https://claude.ai/code/session_01RBdcFkjzXaawaLY68MMhxc
2026-02-10 02:07:24 +00:00
google-labs-jules[bot]andPR0M3TH3AN d35aced8ad docs: align development docs with codebase behavior
Updates documentation to match current codebase implementation:
- Deprecates `nostrClient.fetchVideos` in README.md, pointing to `subscribeVideos`.
- Clarifies `playVideoWithFallback` implementation location in `docs/playback-fallback.md` and `AGENTS.md` (moved to `js/app/playbackCoordinator.js`).
- Corrects `WATCH_HISTORY` d-tag description in `docs/nostr-event-schemas.md` to match actual code behavior (`<YYYY-MM>`).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-09 18:33:32 +00:00
thePR0M3TH3AN ede2f5cdc2 Merge pull request #2249 from PR0M3TH3AN/docs-subscription-backup-schema-11453826493234400433
Add Subscription Backup to Nostr Event Schemas Docs
2026-02-08 13:32:04 -05:00
thePR0M3TH3AN a0614cdf82 Merge pull request #2247 from PR0M3TH3AN/ai/doc-moderationService-20260208-12200370596611243912
chore(ai): document js/services/moderationService.js
2026-02-08 13:31:33 -05:00
google-labs-jules[bot]andPR0M3TH3AN c7ac9f03f2 docs: add Subscription Backup to event schema catalogue
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-08 16:57:43 +00:00
google-labs-jules[bot]andPR0M3TH3AN 75c21c83dd chore(ai): doc js/services/moderationService.js (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-08 15:06:35 +00:00
google-labs-jules[bot]andPR0M3TH3AN 0f04245440 chore(ai): event schema validation tool + fixes
- Created `scripts/agent/validate-events.mjs` to validate event builders against schemas, covering standard and specific usage patterns.
- Updated `js/nostrEventSchemas.js` to include NIP-17 event types (`GIFT_WRAP`, `SEAL`, `CHAT_MESSAGE`) and their builders.
- Refactored `js/nostr/client.js` to use NIP-17 builders in `sendDirectMessage`, enabling runtime schema validation.
- Updated `docs/nostr-event-schemas.md` to document the new event types.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-08 05:09:54 +00:00
Claude 41a12669f6 refactor: extract Application method clusters into coordinator modules
Move cohesive method groups out of the monolithic Application class
(js/app.js, ~10K lines) into five coordinator modules under js/app/:

- feedCoordinator: feed registration, runtime building, refresh,
  video loading, URL-health helpers, and feed telemetry
- playbackCoordinator: URL-first + magnet fallback pipeline, probing,
  torrent status intervals, and video timestamp resolution
- authSessionCoordinator: signer lifecycle, profile switching,
  relay/block/wallet management, and cleanup
- modalCoordinator: modal open/close, view-count subscriptions,
  watch-history metadata, and playback logging
- moderationCoordinator: moderation settings, video decoration,
  override/block/hide action routing

Each coordinator factory receives injected dependencies instead of
importing globals. Application retains thin delegator methods so all
public call-sites remain unchanged. Coordinator initialisation is
idempotent (via _initCoordinators) and supports both constructor-based
and Object.create()-based instantiation used by test harnesses.

All existing unit tests, lint checks, and syntax validation pass.

https://claude.ai/code/session_01C3PKJTCdavsGbk5jjC85EB
2026-02-06 20:47:10 +00:00
google-labs-jules[bot]andPR0M3TH3AN 6f95000703 docs: remove unsupported presigned manifest upload mode
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-06 17:04:35 +00:00