Use the host's native recurring-task tool. In Codex, use the native
scheduled-task tool. If the host has no recurring-task capability, stop and
explain that this scheduling skill is unsupported there. Do not start a shell
while loop or launch a separate agent process.
- Resolve the repository root and
owner/repo. Schedule exactly one lane in the current chat: build by default, or review when explicitly requested. - Run
npx @opengsd/gsd-loop@latest doctorbefore build scheduling. Add--review-readybefore review scheduling. Do not create or update a review task when that stricter check fails. - Use the deterministic name
gsd-loop LANE — owner/repo. Inspect existing scheduled tasks first. Update an exact match instead of duplicating it. If a different active builder targets the same repository, stop and identify it. - Attach the task to the current chat, start at 15 minutes, and initialize its
lane-specific idle count to zero. Keep any repository-local scheduler state
at
.gsd/scheduled_tasks.lock; never write it under a harness-specific directory such as.claude/. - Put the lane skill in the scheduled prompt using the current host's native
invocation syntax:
- Codex:
$gsd-loop-buildor$gsd-loop-review - Claude Code:
/gsd-loop-buildor/gsd-loop-review - Cursor:
/gsd-loop-buildor/gsd-loop-review - Gemini CLI:
Use the gsd-loop-build skillorUse the gsd-loop-review skill - Grok Build:
/gsd-loop-buildor/gsd-loop-review - Kimi Code:
/skill:gsd-loop-buildor/skill:gsd-loop-reviewRun exactly one playbook pass per wake and require its finalGSD_LOOP_RESULTline. A missing or malformed result isblocked, never inferred from prose.
- Codex:
- After each pass, run
npx @opengsd/gsd-loop@latest policy EVENT IDLE_COUNT. Persist the returned count in task context and immediately apply its action and interval to this scheduled task. This resets productive work to 15 minutes, backs idle work off to 60 minutes, and pauses after three idle passes. - Treat credentials, permissions, dirty unrelated worktrees, escalations, and
other playbook stop conditions as
blocked; pause and report them.
Build and review require separate chats and separate scheduled tasks so their state cannot mix. If the user requests both, schedule the current lane only and tell them to invoke this skill in a second chat for the other lane.
Never schedule the interactive discover or spec lanes. Never merge, enable auto-merge, force-push, or run more than one builder for the same repository.