dos-setup
The dos-setup skill verifies that the dos-kernel Python package is importable and wired correctly to Claude Code, confirms the plugin's hooks and MCP server can function, and displays the bundled components. Run this immediately after installing the dos-kernel plugin, or when the MCP dos server fails to start or dos hook commands error, to diagnose import and configuration issues.
git clone --depth 1 https://github.com/anthony-chaudhary/dos-kernel /tmp/dos-setup && cp -r /tmp/dos-setup/claude-plugin/skills/dos-setup ~/.claude/skills/dos-setupSKILL.md
# dos-setup — confirm the plugin is wired, then point at the next move
> **The plugin ships JSON + markdown; the brains ship as a pip package.** The
> bundled hooks shell `python -m dos.cli …` and the bundled MCP server runs
> `python -m dos_mcp.server` — both need the `dos-kernel` package importable in the
> SAME Python that Claude Code launches. This skill verifies that one prerequisite
> and shows you what the plugin gave you. It is the only DOS skill that names the
> pip package; the rest are domain-free.
## Step 1 — Is the kernel importable? (the one prerequisite)
```bash
python -c "import dos, dos_mcp; print('dos', dos.__version__)"
```
- **Prints a version** → the package is installed and importable. Go to Step 2.
- **`ModuleNotFoundError: dos`** → the plugin's hooks/MCP cannot work yet. Install
the package (the `[mcp]` extra pulls the MCP server framework the bundled server
needs):
```bash
pip install "dos-kernel[mcp]"
```
Install it into the SAME interpreter Claude Code runs (the one `python` resolves
to here). Then re-run Step 1. If `python` is the wrong interpreter, the hooks will
silently no-op (they fail safe, by design) and the MCP server will print an
install hint in `/mcp`.
- **`ModuleNotFoundError: dos_mcp`** → the core installed but not the MCP extra;
re-run the `pip install "dos-kernel[mcp]"` line above.
## Step 2 — Does the kernel see this workspace? (confirm wiring)
```bash
python -m dos.cli doctor --workspace . --json
```
A JSON object with `lanes`, `paths`, and `stamp` means the kernel is reading THIS
repo. Skim it once — those values are the layout the bundled skills and the MCP
`dos_arbitrate` / `dos_verify` tools read instead of hardcoding anything. If this
repo has no `dos.toml`, the lanes are auto-derived from your top-level directories
and everything still works (the generic default).
## Step 3 — See it work end to end (60 seconds, throwaway repo)
Before reading the skills, watch the kernel make a real call. This runs in a
disposable git repo and cleans up after itself:
```bash
python -m dos.cli quickstart --driver workshop
```
It scaffolds a repo under the **`workshop` reference driver** (a worked
host-policy pack with two concurrent lanes + one exclusive release lane), then
shows BOTH halves of DOS against real artifacts:
- **the truth syscall** — `AUTH1` was committed → SHIPPED (exit 0); `AUTH2` was
only claimed → NOT_SHIPPED (exit 1). The verdict comes from git, not the agent.
- **the admission kernel** — `frontend` and `backend` acquire *concurrently*
(their file trees are disjoint), while `release` *refuses* (it is exclusive and
runs alone). This is the concurrency policy your own lanes will get.
`workshop` is the **copy-me template** for declaring your own lanes — see Step 5.
(The plain `dos quickstart`, no `--driver`, shows just the truth-syscall half.)
## Step 4 — What the plugin bundled (so you know what you have)
- **Hooks** (active on every Claude Code launch in this project, all fail-safe —
they emit nothing and exit 0 if anything goes wrong, so they never break a turn):
- **PreToolUse** → `dos hook pretool`: can DENY a structurally-refused call before
it runs (e.g. a self-modify of the kernel's own path). Advisory by default —
a behavioral deny needs a ruling handler wired; out of the box it only observes.
- **PostToolUse** → `dos hook posttool`: re-surfaces a stalled tool stream
(a read-loop spinning on the same file) as advisory context.
- **Stop** → `dos hook stop`: refuses to stop on an unverified claim, so the loop
does not close on "I'm done" the git history does not back.
Every one of those calls is **counted and logged**: the bundled native `dos-hook`
binary appends one record per hook call to `.dos/metrics/observations.jsonl`, so the
kernel emits evidence about its OWN behavior (docs/276). Read it back any time with
`/dos-kernel:dos-stats` (or `"${CLAUDE_PLUGIN_ROOT}/bin/dos-hook" stats --workspace .`)
— counts by verb/outcome, the delegate + stop-block rates, and per-verb latency.
- **MCP tools** (the `dos` server — check `/mcp` shows it connected): `dos_verify`
(did a claim actually ship, from git not self-report), `dos_arbitrate` (may two
workers run concurrently without colliding), `dos_commit_audit`, `dos_refuse_reasons`
/ `dos_check_reason`, `dos_status`, `dos_recall`, `dos_citation_resolve` (does a
cited legal case exist in a third-party reporter), `dos_doctor`.
- **The generic skill pack** — the domain-free dispatch screenplays, namespaced
under this plugin. The usual first one to read is `/dos-kernel:dos-next-up` (snapshot
the portfolio) or `/dos-kernel:dos-dispatch` (plan-and-ship one lane safely). And
`/dos-kernel:dos-stats` shows the kernel's own activity on this project.
## Step 5 — Adopt DOS in this repo (optional, makes it yours)
The plugin works against any git repo with zero config. To make the layout explicit
and editable (a `dos.toml` with your lanes, and the skills as local files you can
tune), scaffold it:
```bash
python -m dos.cli init . # lanes auto-derived from your top-level dirs
python -m dos.cli init . --example workshop # OR start from the worked reference taxonomy
```
The bare form derives one concurrent lane per top-level source dir. The
`--example workshop` form scaffolds the same lanes the Step-3 demo used (two
concurrent clusters + an exclusive release lane) for you to rename to your real
concurrency topics. Both are optional — the bundled surfaces already work without
any `dos.toml`.
## What this skill deliberately does NOT do
- **It installs nothing.** It only TELLS you the pip command if the import fails;
it never runs `pip` for you (that would mutate your environment without asking,
and the target interpreter is ambiguous). You run the install.
- **It wires nothing.** The hooks and MCP server are already wired BY the plugin;
this skill confirms them, it does not re-install or eAdjudicate 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.
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.
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.
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.
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).
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).
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).
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`.