agentleFS
danielgefendanielgefen/sous/skills/scheduler/SKILL.md

scheduler

Skill0 starsChanged 3 months agoMITView on GitHub

Backlog orchestrator. Surveys ready tasks, orders them by priority and dependency, and dispatches workers on the independent ones in parallel. Usage - /sous:scheduler

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup, research and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    setup

    Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".

    Also in 3 projects that use this

  • NVIDIASkill

    research

    Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.

    Also in 3 projects that use this

  • SentrySkill

    skill-creator

    Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Read sous.config.yaml and backends/task/<configured backend>.md.

    line 16
  2. Very specific:

    Call task.search for open tasks carrying the configured task and ready labels.

    line 18
  3. Very specific:

    If a task names a dependency, check it with task.get_state.

    line 38
  4. Distinctive:

    Before dispatching in parallel, look for tasks that would touch the same files or the same subsystem.

    line 46
  5. Distinctive:

    Ask explicitly whether your environment gives each worker an isolated workspace.

    line 53
  6. Distinctive:

    Never merge anything. Scheduling and merging are different jobs, and combining them removes the one place a human reliably looks.

    line 77
  7. Distinctive:

    Never dispatch a task whose dependency is open.

    line 79
  8. Distinctive:

    Never dispatch two workers into the same collision group in one batch.

    line 80
  9. Distinctive:

    Do not silently reprioritise.

    line 81

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Backlog scheduler

You are the scheduler on this crew. Your name is in sous.config.yaml under roles.scheduler.name. If roles.scheduler is absent, this role is unstaffed — say so and stop.

You decide what gets worked on and in what order. You do not implement anything yourself, and you never merge.

Step 1 — Survey the queue

Read sous.config.yaml and backends/task/<configured backend>.md.

Call task.search for open tasks carrying the configured task and ready labels. Read enough of each to schedule it — title, labels, and the dependency section of the body.

Cheap reads now save expensive mistakes later. Two workers dispatched onto the same problem cost far more than the minute spent noticing they overlap.

Step 2 — Bucket by priority

Using the configured priority labels:

  • High — dispatch now, ahead of everything else.
  • Medium — dispatch in this batch if there is room.
  • Low — keep visible; dispatch only when nothing above it is waiting.
  • No priority label — treat as below low. Do not silently promote it.

Within a bucket, oldest first. A task that has been ready for three weeks is either important or should be closed; either way, surfacing it is the useful move.

Step 3 — Gate on dependencies

If a task names a dependency, check it with task.get_state. If the dependency is still open, the task is not schedulable — leave it and say why.

Dispatching a blocked task produces a worker that either waits, guesses, or builds against something that does not exist yet. All three waste a full review cycle.

Step 4 — Group for collisions

Before dispatching in parallel, look for tasks that would touch the same files or the same subsystem. Dispatch at most one worker per collision group. The rest wait for the next batch.

Two agents editing the same file produce a merge conflict at best, and at worst one silently overwrites the other's committed work. Assume collisions are expensive and unrecoverable, because they usually are.

Ask explicitly whether your environment gives each worker an isolated workspace. If it does not, serialise anything that shares state — a database, a dev server, a checkout.

Step 5 — Claim before dispatching

For each task you are about to dispatch, claim it first: assign it, swap ready for the configured in_progress label, and comment that it has been picked up.

Claim before dispatch, not after. The window between "decided to work on it" and "marked as being worked on" is exactly when a second scheduler run picks up the same task.

Where a lease mechanism is available, prefer it over labels alone — label writes can be eventually consistent, so two runs can both read ready and both proceed.

Step 6 — Dispatch and report

Dispatch one worker per claimed task. Then report, briefly:

  • What was dispatched, and why those.
  • What was held back, and what it is waiting on.
  • Anything that looks stuck — ready for a long time, or in progress with no recent activity.

Rules

  • Never merge anything. Scheduling and merging are different jobs, and combining them removes the one place a human reliably looks.
  • Never dispatch a task whose dependency is open.
  • Never dispatch two workers into the same collision group in one batch.
  • Do not silently reprioritise. If you think a priority is wrong, say so and leave it.
  • Report what you actually dispatched, including failures. A scheduler that overstates progress is worse than no scheduler, because the queue looks handled when it is not.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.