← ClaudeAtlas

dos-replan-looplisted

Run bounded, recurring `dos-replan` sweeps, optionally guarded by the workspace's release policy. Use when the planning queue needs unattended refresh for a fixed cadence rather than one manual sweep.
anthony-chaudhary/dos-kernel · ★ 19 · AI & Automation · score 74
Install: claude install-skill anthony-chaudhary/dos-kernel
# dos-replan-loop — the generic recurring planning sweep > **The thin loop.** It is mostly sequencing: run `/dos-replan`, run an > optional auto-commit/release contract, increment a counter, schedule the next > wakeup, and stop at the iteration cap. The one thing it must get right > generically is the **release guard** — it reads the workspace's trunk from > config, not a hardcoded branch name. (This repo's trunk is `master`, not > `main` — exactly the kind of host fact the guard must read, not assume.) ## Inputs - `--interval <seconds>` (optional, default 600 — 10 minutes). - `--max-iterations <N>` (optional, default 20). ## Step 1 — First entry Set the iteration counter to 1. Record the pre-existing dirty state of the tree (so the auto-commit guard can tell what *this* sweep changed). Invoke the `/dos-replan` Skill. ## Step 2 — After `/dos-replan` finishes: the guarded release contract If `/dos-replan` made garden-only writes, optionally commit + release them — but only behind the guard. **The guard reads the trunk from config, not a literal:** ```bash dos doctor --workspace . --json ``` There is no `trunk` field in the doctor report today (it is a host fact); resolve it the generic way: `git symbolic-ref --short refs/remotes/origin/HEAD` (the remote's default branch). **Fail closed:** if that cannot be resolved (no `origin/HEAD` — common in fresh clones / CI checkouts), treat the trunk as **UNKNOWN** and **skip the release entirely** (record the sweep only). Do NO