diff --git a/src/docs/TORCH.md b/src/docs/TORCH.md index 03c2043..e480993 100644 --- a/src/docs/TORCH.md +++ b/src/docs/TORCH.md @@ -55,12 +55,15 @@ Common settings: - `dashboard.defaultCadenceView` — default dashboard view (`daily`, `weekly`, `all`). - `dashboard.defaultStatusView` — default dashboard status filter (`active`, `all`). - `scheduler.firstPromptByCadence.daily` / `.weekly` — first-run scheduler starting agent. +- `scheduler.handoffCommandByCadence.daily` / `.weekly` — shell command run after lock acquisition; command must use `SCHEDULER_AGENT`, `SCHEDULER_CADENCE`, and `SCHEDULER_PROMPT_PATH` provided by `scripts/agent/run-scheduler-cycle.mjs`. - `scheduler.paused.daily` / `.weekly` — array of agent names to exclude from scheduler rotation. Default first-run daily scheduler prompt is `scheduler-update-agent`. For weekly repository-fit maintenance, TORCH also includes `src/prompts/weekly/repo-fit-agent.md` to periodically adjust defaults and docs to the host repository. +Operational note: scheduler handoff commands are treated as required execution steps. A non-zero exit code (or missing command) is a hard failure: the scheduler writes a `_failed.md` task log, exits immediately, and does not publish `lock:complete` for that run. + ## Roster precedence The lock CLI resolves roster names in this order: diff --git a/torch-config.json b/torch-config.json index ab630b6..9827335 100644 --- a/torch-config.json +++ b/torch-config.json @@ -18,6 +18,10 @@ "daily": "scheduler-update-agent", "weekly": "bug-reproducer-agent" }, + "handoffCommandByCadence": { + "daily": "test -n \"$SCHEDULER_AGENT\" && test -n \"$SCHEDULER_CADENCE\" && test -n \"$SCHEDULER_PROMPT_PATH\" && test -f \"$SCHEDULER_PROMPT_PATH\" && echo \"HANDOFF_OK cadence=$SCHEDULER_CADENCE agent=$SCHEDULER_AGENT prompt=$SCHEDULER_PROMPT_PATH\"", + "weekly": "test -n \"$SCHEDULER_AGENT\" && test -n \"$SCHEDULER_CADENCE\" && test -n \"$SCHEDULER_PROMPT_PATH\" && test -f \"$SCHEDULER_PROMPT_PATH\" && echo \"HANDOFF_OK cadence=$SCHEDULER_CADENCE agent=$SCHEDULER_AGENT prompt=$SCHEDULER_PROMPT_PATH\"" + }, "memoryPolicyByCadence": { "daily": { "mode": "required",