Skip to content

About

Skills, scripts and the delegate CLI for orchestrating coding agents: plan, delegate, review and land tickets.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1,046 Commits

Folders and files

Repository files navigation

switchyard

Skills, helper scripts and the delegate CLI for coding agents (Claude Code, pi): planning a ticket, landing it through delegated lanes, reviewing and repairing PRs, triaging CI, and running a flywheel of tickets with the owner away.

Started from mattpocock/skills and reworked since.

Layout

Path What it holds
skills/ One folder per skill: SKILL.md, plus brief templates in briefs/ where the skill starts other jobs.
delegate/ The delegate CLI (Rust): runs a brief on another model and reports a job record.
bin/ Scripts the skills call: fill-brief, plan-check (check a plan's paths against its base), plan-sweep (one read-once context pack: symbol sites, outlines, doc sections and the paths outside a plan's Files), plan-gate (a plan's ## Gate command, or its optional ## Fix gate command with --fix), tkt-build (quota-gated lane dispatch, gate, and first review), lane-model (choose a box lane's session model by quota headroom and live load), review-pr, gh-ci, pr-closes, ship-pr, check-pack, canary-daily (daily jcode-bench parity canary runner and report), model-catalog-diff (daily vendor model catalog diff), model-deprecations (weekly vendor lifecycle report), agent-cost (recent agent token costs by kind, or API-equivalent USD by model and project with --usd --since), ci-health (hourly fiber CI health check), ci-friction (same test failing across CI lanes), inbox-send (deliver a stdin message to a file inbox, atomically, or over ssh when INBOX_HOST is set), inbox-wait (block until an inbox file waits and print its path), inbox-drain (print every unread inbox message and move each to read/), inbox-watchers (report each inbox no running inbox-wait watches, with its unread count; --host checks over ssh), roles-restart (relaunch missing role sessions after a reboot), wired-check (hourly wired-memory breaker and inbox note), post-ruling (post a ruling comment, copy it to the run dir, fix the label and drop an inbox line in one call), red-main (detect a red main and hand real failures to flywheel's inbox; run every 30 min, lag at most 30 min).
claude-code/agents/ Claude Code agent definitions: ticket-orchestrator (a flywheel lane, run as its own claude --bg session) and claude-worker (a Claude lane, Verifier or fix job).
test/ Tests for the scripts. test/run runs every suite.
docs/agents/ This repo's own setup for the skills: issue tracker, triage labels, workflow doc.

Install

Clone to ~/.agents and link the skills into your agent's skills folder, for example:

git clone https://github.com/aakshintala/switchyard ~/.agents
for s in ~/.agents/skills/*/; do ln -s "$s" ~/.claude/skills/; done
for a in ~/.agents/claude-code/agents/*.md; do ln -s "$a" ~/.claude/agents/; done   # Claude Code only

The skills call scripts at ~/.agents/bin/.

delegate

Delegated work runs through the delegate CLI in delegate/, a Rust binary that runs tasks on Cursor, pi and Claude Code models. Install it with ~/.agents/delegate/bin/setup.sh; see delegate/README.md. It moved here from aakshintala/delegate, which is archived and keeps the old issue and PR history.

Working on it

Branch, open a PR, squash merge. CI (ci) runs test/run and delegate's format, lint and tests, and must pass on a head up to date with main.

  • Gate: bash test/run && bash bin/check-pack (through bash: a fresh worktree's first direct exec of a script can stall for minutes on macOS), plus cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo test in delegate/ when it changes. test/run takes over 10 minutes, longer than the 600 s foreground tool limit: run it inside delegate run --gate or with run_in_background, never as a foreground call. Switchyard plans also declare ## Fix gate as bash test/run --since <since> && bash bin/check-pack, so fix rounds run the scoped gate.
  • Merge: squash, once a reviewer from a family other than the author's has approved the head's patch-id (or a scoped verify returned FIX-INCOMPLETE with only P3 findings), CI is green and pr-closes prints OK. Use bin/ship-pr. When the PR changes bin/ship-pr or bin/gh-ci, run the reviewed copies from the PR's worktree (bash <worktree>/bin/ship-pr ...): ~/.agents is fast-forwarded only after the merge. Several skills are adapted from other MIT-licensed projects; each says so in a comment at the top and carries its upstream licence beside it.

Licence

MIT. See LICENSE.

About

Skills, scripts and the delegate CLI for orchestrating coding agents: plan, delegate, review and land tickets.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages