Skip to content
Back to skills

Run

ASecurity

The pipeline''s front door — one ticket in, a merge-ready PR out. Drives run.sh, a scheduler that claims the ticket, commits its intake record, and spawns fresh build and review sessions until a review approves the current head or a budget is spent; you author nothing. Expects a ticket with paid-off intake: an intake record, plus the queue label on GitHub (under jira there is no label to check, so launching is the operator''s attestation).

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 19, 2026
ai-agentsrustgobashgit

Works with

  • terminal

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add manoldonev/second-shift --skill run --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Run?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Run
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/manoldonev-run/badge)](https://www.skillsdirectory.com/skills/manoldonev-run)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: run
description: 'The pipeline''s front door — one ticket in, a merge-ready PR out. Drives run.sh, a scheduler that claims the ticket, commits its intake record, and spawns fresh build and review sessions until a review approves the current head or a budget is spent; you author nothing. Expects a ticket with paid-off intake: an intake record, plus the queue label on GitHub (under jira there is no label to check, so launching is the operator''s attestation).'
---

# run

You drive `run.sh` (`R`, here — it sits beside this file, in this skill's base directory). It does
the whole lane: claim → worktree on the lane branch → the intake record committed as the branch's
first commit → up to `run.maxRounds` rounds of a fresh BUILD session, the scheduler's own checks
(config lanes plus the record's `## Checks`, read from that first commit) and route smoke, then a
fresh REVIEW. A review round runs two sessions blind to the record side by side: pass 1, with the
prompt in `pass-1-review.md` beside `R`, and a plain review, with the prompt in `plain-review.md`.
The REVIEW session then runs pass 2 on the pass-1 findings. The scheduler joins its draft with the
plain review's and posts the one verdict, which ends with one `lane vs blind:` line and a hidden machine line.
Once this launch has bound a verdict, each later review is told the head it reviewed: pass 2 and the join gate a
new finding only on a line changed since, except a new blocker that pass 1 or pass 2 raises and an open
finding of that verdict. A blocker that only the plain review raises on an unchanged line does not gate.
`bash R -h` prints the header: usage,
env, phases and the exit table. It is the truth; this file only says what is yours to do.

## Checklist

1. **Route.** Launch from a checkout of the repo the ticket belongs to: the cwd picks the repo, and
   `R` resolves the config, the worktree root and the `commands` key from that repo's main
   checkout, even when launched from a linked worktree.
2. **Resolve the build model.** On GitHub, `R` reads the ticket's `opus` / `sonnet` label itself.
   No label, or under jira (there is no label to read), size it yourself and pass
   `--build-model <opus|sonnet> --model-basis 'sized-here: <one line>'` — that line is the whole
   record that the sizing was yours. Review runs on `opus`; a different `--review-model` needs
   `--review-model-basis`.
3. **Launch detached, then watch.** `bash R <issue> [--build-model <m> --model-basis <why>] --detach`.
   From an agent session `--detach` is the launch that works: a foreground call is reaped long
   before a run ends (a build session alone may take two hours). It prints
   `detached: pid <pid> · log <log>`. Watch with one `Bash` call under `run_in_background` whose
   whole command is this loop, the two values pasted in, and whose `timeout` is the maximum the
   `Bash` tool's description states (the default is minutes):

   ```bash
   until grep -q 'detached run exited rc=' '<log>' || { pgrep -g <pid> >/dev/null; [ $? -eq 1 ]; }; do sleep 30; done
   ```

   The printed pid is a small wrapper that leads the run's process group, and the run is its child,
   so the loop checks the group: `kill -0 <pid>` would call a live run dead once only the wrapper
   is killed. Only `pgrep`'s exit 1 means the group is gone. It exits 2 on a usage error (a pid
   pasted wrong), and `! pgrep` would read that as gone too and end the watch on a live run. Nothing follows `done`: a hook that rewrites a command can drop `run_in_background`,
   and a trailing `| tail` or `; grep` makes it that kind of command. A background call is stopped at its
   `timeout` too, so a run longer than that bound outlives the watch: that is the routine re-arm
   below, not a fault. Not a `Monitor`: it caps at 30 minutes, so it wakes the session several
   times as often. When the watch ends, read the log's last lines:
   - the `detached run exited rc=<n>` line is there → step 4;
   - no exit line and `pgrep -g <pid>` exits 0 → the watcher died, not the run: re-arm the
     same loop. A watch that ended is never the run's end;
   - no exit line and `pgrep -g <pid>` exits anything but 0 or 1 → the check itself failed: fix the
     pid from the detach line and re-arm. It says nothing about the run;
   - no exit line and `pgrep -g <pid>` exits 1 → the process group is gone: report the run as interrupted, citing any bare
     `terminal:` slug the log carries, and stop. The wrapper writes the exit line even on a
     forwarded TERM/INT/HUP, so only an uncatchable kill leaves it out, and that is a human's read.
   The operator may have exported `RUN_WATCH_CMD` (e.g. `herdr-adapter.sh` beside `R`, a herdr workspace per ticket); its one `watch:` log line is never a signal to act on.
4. **Read the terminal and nothing else.** The log's `terminal: <slug>` line and `rc` are the whole
   signal:

   | rc | slugs | what you do |
   | --- | --- | --- |
   | `0` | `approved` | Report the PR. Merging is a human's act. (`build-handoff` is `/dev-pipeline:build`'s stop, never a run's.) |
   | `1` | `build-no-pr`, `build-blocked`, `build-paused`, `no-progress`, `build-inflight(-unreadable)`, `pr-ambiguous`, `closeout-inflight(-unreadable)`, `staleness-unreadable`, `verdict-uncheckable`, `plan-coverage-uncheckable`, `baseline-unwritten` | Stop and report the slug and its detail line; a human decides. Worktree and claim are left in place. On `build-paused` the detail line names the `pause-and-ask` region the build stopped on and its question: the requester answers it, never you. On `no-progress` a later round's build left the head at the sha the last verdict reviewed; the detail line names that verdict's open findings and the recovery. |
   | `2` | `usage-*`, `env-*` (among them `env-receipt-lint-unavailable`: no intake-toolkit lint this run can trust for the record), `claimed-elsewhere` | Fix what the detail line names and re-launch the same command. On `claimed-elsewhere`, stop: `--resume` takes over someone else's claim (or a `/dev-pipeline:build` handoff's), and that is the operator's call. |
   | `3` | `not-queued`, `env-no-record`, `env-receipt-invalid` | Resumable. Pay off intake (`/intake-toolkit:intake <issue>`, which writes the record — or rewrites one that fails `ledger-lint.sh --receipt`) and re-launch the same command. |
   | `4` | `rounds-spent`, `checks-red-spent`, `cost-spent` | Stop. A spent budget is a human's read, never an automatic re-launch. |
   | `5` | `review-unbound` | Run `/dev-pipeline:review <pr>` by hand in a fresh session: a rebuild fixes nothing. |
   | `7` | `ticket-closed`, `staleness-expired` | Closed: stop. Stale: the base moved into this branch's files and `R` could not rebase onto it (a conflict, or uncommitted work in the worktree) — rebase the branch, then re-launch; the claim marker lets it re-enter. A clean rebase is `R`'s own: it pushes it and moves the PR body's `Record baseline:` line, and the run goes on. |
   | `129` / `130` / `143` | interrupted | The claim is left in place; re-launch to re-enter. |

## Rules that are not negotiable

- **Never re-label a ticket to get past a reject.** A ticket the lane claimed re-enters on its own
  claim marker; a blocker label is someone's decision, not an obstacle.
- **You author nothing.** Claim, record commit, cost block, the `second-shift/review` commit
  status on each bound verdict's head, and closing comment are `R`'s writes
  (through the bot when one is configured); code and PR are the build session's; the verdict is the
  review session's. A write of yours would be a third identity in that record.
- **Never interpret a finding.** The terminal is the signal. Reading the verdict to decide what
  comes next is content judgment the lane does not ask of you.
- **Never resume a review context.** Every review is a fresh process; a round inheriting the last
  round's context is that round agreeing with itself.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.