docs(agents): add TORCH protocol documentation

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
This commit is contained in:
Claude committed 2026-02-13 21:09:30 +00:00
1 parent 445262110b
commit 9d4c98a872
5 files changed
+318 -6

No files matched your search

+5 -3
View File
@@ -2,11 +2,13 @@
// scripts/agent/nostr-lock.mjs
//
// Nostr-based distributed task locking for multi-agent coordination.
// TORCH — Task Orchestration via Relay-Coordinated Handoff
//
// Decentralized task locking for multi-agent development using Nostr.
// Each lock generates a fresh ephemeral keypair and discards it.
// Locks auto-expire via NIP-40 — no cleanup needed.
// Other agents discover locks by querying relays for bitvid lock events.
// Locks auto-expire via NIP-40 — no cleanup, no tokens, no secrets.
//
// See docs/agents/TORCH.md for the full protocol documentation.
//
// Commands:
// check --cadence <daily|weekly> JSON list of locked agents