Skip to main content
ClaudeWave
Skill8 estrellas del repoactualizado today

dos-replan

The `dos-replan` skill performs portfolio gardening for work queues by detecting closed items (those whose phases verify as shipped), tracking sweep cooldown state, and surfacing only 0-2 items requiring human decision in the `dos decisions` queue. Use it after dispatch bursts, when backlogs appear drained, or when recurring findings impact throughput. It reads queue and cooldown state, closes verified-shipped items via the `dos verify` syscall, ranks remaining work, and updates only its queue and state file without touching code or data paths.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/anthony-chaudhary/dos-kernel /tmp/dos-replan && cp -r /tmp/dos-replan/src/dos/skills/dos-replan ~/.claude/skills/dos-replan
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# dos-replan — the generic portfolio gardening sweep

> **The planning refresh that keeps the loop honest.** Its domain-free core is
> small: a queue item whose phases now `dos verify` as shipped is *closed*; the
> operator should see only the 0-2 items that truly need a human. The heavy
> host-specific gardening passes (anchor reconciliation, soak-state drift, the
> postmortem evidence stream) are host driver hooks, scoped OUT of the generic
> baseline. Closure detection rides the truth syscall; the operator surface is
> the `dos decisions` queue.

The shape: **read the queue → close what verifies as shipped → rank what's left →
surface only what needs a human.** Closure is a kernel call (`dos verify`); the
operator inbox is the kernel's decisions projection.

## Inputs

- `--force` (optional) — run even if the no-op skip gate would fire (no new
  evidence since the last sweep).

## Step 0 — Discover the layout

```bash
dos doctor --workspace . --json
```

Read `paths` (where the queue/cooldown state live) and `stamp` (the active ship
grammar `dos verify` applies). Read the active trunk from config if you will
gate a release later (see `/dos-replan-loop`).

## Step 1 — No-op skip gate

If there is no new evidence since the last sweep (no new commits, no new findings)
and `--force` was not given, print one line and exit cheap — writing nothing.
This is the gate that keeps a recurring loop from doing 0-work sweeps; an
*unproductive* replan (this skip, or a 0/0/0 sweep) must NOT arm the loop's
drained-twice trigger (the kernel loop decision enforces that — report the
productivity honestly so `/dos-dispatch-loop` reads it right).

## Step 2 — Closure detection (the domain-free core, via the truth syscall)

For each open item in the queue, ask the kernel whether its phases have shipped:

```bash
dos verify --workspace . <PLAN> <PHASE> --json
```

If every phase of a queue item now reports `shipped: true`, the item is **closed**
— move it from the open queue to the closed section. **Never trust the plan doc's
own stamp; the truth syscall is the source.** This is the auto-close pass that
keeps the queue from carrying already-shipped work as if it were pending.

Count the closures — this is part of the productivity signal Step 5 reports.

## Step 3 — Cooldown-state tracking

Bump the cooldown timestamp in the configured state file so `/dos-next-up` knows
when this sweep last ran (the cooldown banner). Generic, no host specifics.

## Step 4 — Rank what's left

Order the remaining open items by a domain-free signal (recency, how many phases
remain). Do not impose a host's bespoke ranking — that's a driver hook.

## Step 5 — Surface only what needs a human (the operator inbox)

The ruthless filter: of everything you swept, at most **0-2 items** should reach
the operator — the ones no mechanism can resolve (a real decision-needed). The
kernel's operator inbox is the `dos decisions` queue; read it to see what is
already pending so you don't duplicate a row:

```bash
dos decisions --workspace . --json
```

The `dos decisions` projection is the generic operator inbox: a HUMAN-resolvable
row is one a mechanism (an ORACLE/JUDGE) cannot close.

**Honesty about the write path (a named open seam).** `dos decisions` is
**read-only** today — there is no generic `dos` verb to *append* a decision-needed
row (the queue's write path, `home.append_decision`, is currently reached only by
`dos arbitrate --force`'s override capture). So the generic baseline **surfaces**
the 0-2 items in its operator summary (Step 6) and reads the existing queue here;
*emitting a new decision row into the queue is a host/driver capability* (the
named open seam — see `docs/74-friction-log.md`). Do not imply `dos decisions`
writes; it lists and drills in.

## Step 5b — Concrete findings go to the issue tracker, not the inbox

A sweep surfaces more than closures: a bug in another lane, a missing test, a
doc that drifted from the code. The 0-2 operator slots are for *decisions*; a
concrete, public-subject finding with a checkable done-condition is *work*, and
its durable home is the workspace's public issue tracker (on a GitHub-hosted
repo, the `gh` CLI) — not the inbox, not a memory file, not silence. The filing
discipline is `/dos-dispatch`'s "Out-of-scope findings" section: **dedupe
first** (`gh issue list --search "<keywords>"`); give the body a checkable
**done-condition**, a lane guess, and where you found it; **leak-check the
drafted body before posting** (issue text is public output no tracked-file gate
scans — no machine-absolute paths, hostnames, or personal identifiers; if the
workspace ships a publication leak-scanner, pipe the draft through it and treat
a hit as a refusal). An issue closes only via `Fixes #N` in the body of the
commit that resolves it — never `gh issue close` off your own narration.

## Step 6 — Emit the operator summary

Print a terse summary: how many items closed (Step 2), how many remain, and the
0-2 that need a decision (with a pointer to `dos decisions`). Report the
productivity verdict honestly (PRODUCTIVE iff it closed/refilled/gardened
anything) — `/dos-dispatch-loop` reads this to decide drained-twice.

## What this skill deliberately does NOT do (no silent gap)

- **No host gardening passes.** Anchor reconciliation, soak-state drift, the
  postmortem evidence stream, gitignore drift — those are host-specific evidence
  surfaces, scoped OUT of the generic baseline (a driver hook, or out of scope).
  The generic sweep does closure detection + the operator surface, and `log`s
  what it is skipping.
- **No host inbox file.** It writes to the kernel's `dos decisions` queue — the
  generic operator-inbox surface — not a host-specific pending-decisions file.

## Worked example (live transcript)

> **The stale-stamp catch.** A queue item points at a plan whose phase the doc
> still narrates as in-flight — but the grep rung sees a commit *subject* carrying
> the phase token, so `dos verify` flips it SHIPP
issue-verifySkill

Adjudicate a GitHub issue's "this is resolved" claim from witnesses the claimant didn't author — then close it carrying the evidence, or refuse with the typed gap. Use when an issue looks already-solved, after landing a fix that should have closed one, or to sweep open issues for silently-resolved ones.

issue-workSkill

Pick the next most important open GitHub issue this agent can actually complete, make its done-condition true, land it with witnesses (suite + parity + commit-audit), and priority-tag every issue touched along the way. Use when asked to "work the backlog", "complete the next most important issue", or to fix a specific issue number end-to-end.

releaseSkill

Cut a versioned release of the DOS kernel — bump the version, draft release notes, commit, tag, push to master, and create a GitHub release. The tag push triggers the gated PyPI publish pipeline (publish.yml); the skill surfaces the run and its approval gate.

stable-releaseSkill

Promote an already-shipped rolling release (vX.Y.Z) of the DOS kernel to a named stable channel — gated on a green kernel suite + a green third-party CI run on the candidate + a clean truth syscall + a soak window. Writes an evidence file and adds a stable/<codename> git tag on the same commit. Does NOT bump versions or build new artifacts.

dos-class-cycleSkill

One automatic plan-class lifecycle tick. Reads the DECLARED class set + transition list from the workspace `[lifecycle]` table (not a hardcoded taxonomy), evaluates each trigger, spawns a read-only JUDGE-rung adjudicator (the `dos.judges` seam — advisory, fail-to-abstain) to approve/defer each candidate transition, applies the gated transitions as plan-meta edits + one commit per cycle, and logs to the run archive. Failsafes (per-cycle cap, per-plan cooldown, a veto class) are `[lifecycle]` data; the judge content is a host `dos.judges` driver. Every path/class comes from `dos doctor --json`. Use to garden a plan portfolio's lifecycle automatically, judge-gated. The DOS lifecycle gardener (SKP Axis 5, docs/207 Phase 5c).

dos-dispatch-loopSkill

Run /dos-dispatch on a recurring cadence, alternating with /dos-replan when the backlog drains — the dispatch→replan→dispatch cycle. The continue/stop/next-mode decision is the kernel's typed loop decision, not inline prose: each iteration is classified (`dos gate`) into a verdict and the loop's counters (drained-twice, the unclear/dirty-zero breakers, the iteration cap) drive the next step. Several loops on disjoint lanes run concurrently, each taking its own lane lease via `dos arbitrate`. Driven entirely by `dos` verbs + the workspace's `dos.toml`. The DOS reference loop workflow (SKP Axis 5).

dos-dispatchSkill

End-to-end plan-and-ship for one lane — snapshot the portfolio with /dos-next-up, take a lane lease via `dos arbitrate` so parallel dispatches don't collide, gate the empty case via `dos gate`, ship the packet, and archive the run under the configured run dir. Driven entirely by `dos` verbs + the workspace's `dos.toml`; names no host path, lane, or commit convention. Use when you want to plan and ship the next batch on one lane in a single command, with concurrency safety. The DOS reference dispatch workflow (SKP Axis 5).

dos-goal-gateSkill

Ground a "keep working until the goal is met" stop condition in a witness the agent did not author, instead of letting the agent self-certify "done". A harness goal/Stop-hook condition is normally checked by the model re-reading its OWN work — consistency, not grounding. This skill turns the operator's goal into checkable EFFECT claims and wires `dos hook stop` so the Stop is refused until git ancestry (a shipped phase) or an effect read-back corroborates the claimed effect. Driven by `dos` verbs and the workspace's own `dos.toml` — no host-specific paths, lanes, or commit conventions. Use when you want a self-stopping agent (or a `/loop` worker) to be unable to declare a goal complete on its own say-so. The single-agent self-stop analogue of `dos-witness-claim`.