This agent analyzes the repository and proposes new, self-contained features as single files in a `features/` directory, aimed at incrementally adding value to the project. Co-authored-by: PR0M3TH3AN <[email protected]>
TORCH: Task Orchestration via Relay-Coordinated Handoff
TORCH is a portable Nostr-based task locking toolkit for multi-agent coordination.
First-run quickstart
From the repository root:
npm install
cp torch-config.json /path/to/your-project/torch-config.json # optional template step when vendoring TORCH
npm run lock:check:daily
AGENT_PLATFORM=codex npm run lock:lock -- --agent docs-agent --cadence daily
npm run lock:list
Project configuration (torch-config.json)
Create a torch-config.json file in your project root (or set TORCH_CONFIG_PATH) to override defaults per repo:
nostrLock.namespace(d-tag/tag namespace)nostrLock.relaysnostrLock.ttlSecondsnostrLock.queryTimeoutMsnostrLock.dailyRoster/nostrLock.weeklyRosterdashboard.defaultCadenceView(daily,weekly, orall)dashboard.defaultStatusView(activeorall)scheduler.firstPromptByCadence.daily/.weekly
Weekly alignment maintenance is available via src/prompts/weekly/repo-fit-agent.md, which is designed to keep TORCH defaults and docs tuned to the host repository over time.
Default first-run behavior is configured so daily scheduling starts with scheduler-update-agent.
Optional dashboard:
npm run dashboard:serve
# then open http://localhost:4173/dashboard/
Included
src/nostr-lock.mjs— Generic lock/check/list CLIsrc/docs/TORCH.md— Protocol summary and usagesrc/prompts/— Generic scheduler prompts and flowskills/— Repository-local skill guides for agent onboarding and repeatable workflowsexamples/— Optional scheduler overlay examples for adapting TORCH to downstream repositoriesdashboard/index.html— Static lock dashboard
CLI dependencies
Declared in package.json and pinned:
NPM script helpers
npm run lock:check:dailynpm run lock:check:weeklynpm run lock:listnpm run lock:lock -- --agent <agent-name> --cadence <daily|weekly>npm run dashboard:serve
Environment variables
NOSTR_LOCK_NAMESPACENOSTR_LOCK_RELAYSNOSTR_LOCK_TTLNOSTR_LOCK_QUERY_TIMEOUT_MSNOSTR_LOCK_DAILY_ROSTERNOSTR_LOCK_WEEKLY_ROSTERTORCH_CONFIG_PATHAGENT_PLATFORM
Roster precedence
The lock CLI resolves roster names in this order:
NOSTR_LOCK_DAILY_ROSTER/NOSTR_LOCK_WEEKLY_ROSTER(comma-separated env overrides).torch-config.json(nostrLock.dailyRoster/nostrLock.weeklyRoster).src/prompts/roster.json(daily/weeklycanonical scheduler roster).- Built-in fallback roster (used only if
src/prompts/roster.jsonis unreadable).
lock --agent validates names against the resolved cadence roster, and check/list report lock events whose agent names do not match scheduler roster entries exactly.
Example
NOSTR_LOCK_NAMESPACE=my-project \
AGENT_PLATFORM=codex \
node src/nostr-lock.mjs lock --agent docs-agent --cadence daily