dos-next-up — the generic plan-and-ship snapshot
This is the baseline screenplay DOS ships, not a prerequisite. It drives the
kernel syscalls (
verify,gate) against any repo whose layout lives in
dos.toml. It names no host directory, no host lane, and no host commit
convention — every host specific comes from
dos doctor --json(paths/lanes,
via WCR) or
dos.toml [stamp](the ship grammar, via SCV). Copy it into your
own skills dir, point
dosat your workspace, and it runs.
The shape is domain-free: **discover the layout → walk the plans → audit each
pick against the truth syscall → render a packet → gate the empty case.** The
policy (which lanes, which plan grammar, where output lands) is data the
screenplay reads, never literals it hardcodes.
Inputs
--scope <name>(repeatable, optional) — narrow candidates to one lane (a
name from the active [lanes] taxonomy) or one plan id. Omitted = all plans.
--limit <N>(optional, default 5) — how many top picks to render.
Step 0 — Discover the workspace layout (one call)
Run the doctor verb and read the result. **This is the WCR on-ramp: every
path/lane below comes from here, never a literal.**
dos doctor --workspace . --json
Parse the JSON object. The fields you use:
paths.plans_glob— the glob to walk for plan docs (whatever the workspace
declared). Use this value; never assume a fixed plans directory.
paths.next_packets— where the rendered packet is written (the configured
output dir; .dos/verdicts under the generic default).
lanes.concurrent/lanes.exclusive/lanes.trees— the active lane
taxonomy, if you need to group picks by lane or honor a --scope.
stamp— the active ship-subject grammar (informational;dos verifyapplies
it for you — you never grep subjects yourself).
If git is false, warn the operator: dos verify's git rung has no history to
read, so every pick will report source="none" unless a registry exists.
Step 1 — Walk the plans glob → candidate picks
List the plan docs under paths.plans_glob (relative to paths.root). For each
plan doc, read its phase headings to extract (plan_id, phase_id) candidate
pairs — the next not-yet-shipped phases. Keep this generic: a "phase" is a
heading the doc marks as a unit of work; you do not need the job's exact
frontmatter. If a --scope was given, keep only plans/lanes that match it.
Collect a flat list of candidate (plan, phase) picks. Do not rank by any
host-specific signal — order by plan-doc order, then truncate later.
Step 2 — Audit each candidate against the truth syscall
For each candidate pick, ask the kernel whether it already shipped — never
trust the plan doc's own stamp, and never grep commit subjects yourself:
dos verify --workspace . <PLAN> <PHASE> --json
Read the ShipVerdict JSON: {shipped, source, sha?, plan, phase}. source
tells you how the kernel knows: registry (a ship row), grep (a commit
subject under the active [stamp] grammar), or none (no positive evidence).
This is the SCV payoff — a foreign repo whose commits read AUTH2: … is
recognized iff its dos.toml declares the matching [stamp].
Classify each pick into one of three dispositions — this is what the gate reads:
shipped: false, source: "none"→ live: a real next pick. Disposition
{phase, live: true}.
shipped: true, source: "registry"→ done, cleanly: a ship row exists.
Disposition {phase, live: false, drop_reason: "shipped"} — drop it.
shipped: true, source: "grep"→ a real git ship. Now check the plan
doc: does its heading for this phase carry a SHIPPED stamp? If yes, drop it
as a clean ship (as above). If no, this is a stale stamp — the work
shipped in git but the plan doc lags — and you must encode it so the gate can
catch the false-drain: `{phase, live: false, drop_reason: "shipped",
"ship_via": "direct", "plan_doc_stamped": false}`.
The ship_via: "direct" + plan_doc_stamped: false pair is the exact shape
dos gate classifies as STALE-STAMP (a grep ship the plan doc doesn't reflect).
Do not put verify's source value into ship_via — ship_via is the gate's
own direct-ship marker, set to the literal "direct" only for an unstamped git
ship; a registry hit is a clean shipped drop, never STALE-STAMP.
Keep the first --limit live picks as the packet's dispatch list.
Step 3 — Render the dispatch packet
Assemble a self-contained markdown packet yourself (DOS ships no packet
template in the kernel — see the friction log: the [render] packet-template
seam is a named open axis). Write it under paths.next_packets, named
next-up-<UTC-date>-<N>.md. The packet has, generically:
- Header — the workspace root, the active lane taxonomy, the run timestamp.
- Portfolio snapshot — one row per plan: plan id, how many phases, how many
verified shipped (from Step 2), the next live phase.
- Dispatch list — for each live pick, a self-contained prompt another agent
could be launched with: the plan id, the phase id, the plan-doc path, and the
one-line goal. Keep each prompt standalone (no shared context). **The dispatch
list IS a proposed fan-out partition** — if these picks are about to be launched
in parallel, price the partition first with