Standalone HTML page at views/dev/agent-dashboard.html that connects
directly to the same three Nostr relays agents use (relay.damus.io,
nos.lol, relay.primal.net), subscribes to kind 30078 events tagged
with #bitvid-agent-lock, and renders a live dashboard of active
agent locks with TTL bars, platform badges, and a raw event log.
https://claude.ai/code/session_017hmikBS4vBXtFWCsdkkQv8
TORCH (Task Orchestration via Relay-Coordinated Handoff) is the name
for the Nostr-based distributed task locking system used to coordinate
multi-agent development.
Adds docs/agents/TORCH.md covering:
- Protocol overview with sequence diagram
- NIP-78 event schema with tag breakdown
- Ephemeral key lifecycle and why no secrets are needed
- Race detection mechanism
- Auto-expiration via NIP-40
- Configuration reference
- Architecture diagram
- Path toward a generalizable drop-in package for any repo
Also references TORCH by name in AGENTS.md, scheduler-flow.md,
nostr-lock.mjs header, and CLAUDE.md key documentation table.
https://claude.ai/code/session_01BpDsVSAkVWtJLnfKxsB9ib
Remove the git push and GitHub API fallback methods from the scheduler
flow, leaving only the Nostr lock as the single locking mechanism.
This significantly reduces the agent reasoning chain:
- scheduler-flow.md: 10 steps → 8 steps, single code path
- META_PROMPTS.md: 5 MUST blocks → 4, no jq pipeline or branching
- AGENTS.md: 3-method protocol → 2 commands (check + lock)
The agent no longer needs to parse jq output, decide between methods,
handle cascading fallbacks, or perform manual race detection. It runs
two scripts and checks exit codes.
https://claude.ai/code/session_01BpDsVSAkVWtJLnfKxsB9ib
Replace GitHub draft PR as the primary locking mechanism with Nostr
relay-based locks. Each agent generates an ephemeral keypair, publishes
a NIP-78 (Kind 30078) lock event with NIP-40 auto-expiration, and
discards the key. No tokens, no secrets, no git push required.
New script: scripts/agent/nostr-lock.mjs
- check: query relays for active locks, return JSON exclusion set
- lock: claim a task with built-in race detection (exit 3 = lost)
- list: human-readable table of all active locks
The locking fallback chain is now:
1. Nostr lock (no credentials needed, works in any sandbox)
2. git push + draft PR (traditional method)
3. GitHub API via curl (needs GITHUB_TOKEN)
Updated scheduler-flow.md, META_PROMPTS.md, and AGENTS.md to document
all three methods with Nostr as the preferred primary.
https://claude.ai/code/session_01BpDsVSAkVWtJLnfKxsB9ib
Jules agents cannot git push due to sandbox restrictions, which breaks the
draft PR-based distributed lock mechanism. Multiple agents can pick up the
same task because the claim is never visible remotely.
This adds scripts/agent/claim-task-api.sh which creates the remote branch,
started.md log file, and draft PR entirely via curl and the GitHub REST API,
bypassing git push. The scheduler-flow.md, META_PROMPTS.md, and AGENTS.md
are updated to document the fallback: try git push first, fall back to the
API script if push is blocked, fail-closed if neither method works.
https://claude.ai/code/session_01BpDsVSAkVWtJLnfKxsB9ib
The daily and weekly scheduler prompts included a "hard stop" rule that aborted execution if Draft PR creation failed. In restricted environments (like the agent sandbox), `GH_TOKEN` is unavailable, preventing API write access even if git operations work.
This change modifies `docs/agents/prompts/daily-scheduler.md` and `docs/agents/prompts/weekly-scheduler.md` to implement a "soft fail" policy:
- If PR creation fails (e.g., missing credentials), the agent logs the failure in the `_started.md` file summary and proceeds.
- The pushed branch and `_started.md` log file serve as the primary distributed lock.
- Updates the checklist template to accept "FAILED/SKIPPED" for the PR number.
This ensures the scheduler can operate in constrained environments without sacrificing the core distributed locking mechanism.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Switched from `waitUntil: 'networkidle'` to `domcontentloaded` + explicit selector wait to avoid flakiness from background polling.
- Added fail-fast logic to detect "Failed to load content" view states.
- Added error logging to capture page state if the test times out.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Updated scripts/agent/debug_frontend.py to be more robust (timestamps, exit codes).
- Verified no frontend console errors on startup.
- Created task logs (started/completed).
Co-authored-by: PR0M3TH3AN <[email protected]>