Files
skills/skills/kvb-org-queue/SKILL.md
T
Kevin Veen-BirkenbachandClaude Opus 5.5 8e2db852e5 feat(kvb-org-organize): hold heavy jobs back on memory pressure with one shipped default config
watch.py admits heavy work only while PSI, swap-out rate and RAM forecast stay under the configured limits; config.default.json is the single default the install writes once (mode 600, no clobber) and every hook, admit and queue command falls back to. Browser runners and package-manager script forms count as heavy, preflight derives its probes from the light and heavy tool lists, and the shipped default carries no prune command, buildx path or host-specific key. Tests run once on unify/skills-20261114 after the merge (operator order 2026-11-14).

🎯 Fix: 85 %
💥 Break: 8 %
💸 Tokens: 99 %
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 79
🚦 Gate: ⛔ fix 85 % < 90, break 8 % > 5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 21:17:28 +00:00

3.4 KiB

name, description
name description
kvb-org-queue Queue every heavy job (gate, deploy, build, swarm), never ask the chair: hotfix first, then rank.

${CLAUDE_SKILL_DIR}/scripts/queue.py replaces asking the chair for heavy slots with one queue that every waiting agent evaluates by the same rules.

Run a heavy job

queue.py hold --kind <kind> --task <register task> -- <command>

Start it in the background (run_in_background or equivalent) and end the turn: hold runs the command on its grant and exits with its code.

  • <kind>: a key of slot_need_gb in ~/.claude/agents-council/config.json.
  • <register task>: your open kvb-org-rasci task; its rank places you.
  • --hotfix <slug>: the job proves the register row hotfix/<slug> (kvb-git-hotfix) and goes first.
  • --need-gb <N> overrides the learned disk need.
  • Start hold in the job's worktree: its git toplevel is the workdir. Other runtimes add --session <id>.
  • In a worktree the command stays gate.py run|hold (kvb-check-gate): queue.py hold ... -- python3 <gate.py> run ....

Light runs (kvb-org-organize Capacity) self-admit; anything else goes through hold with kind test, and a light kind refuses it.

Order and grant

Every 20 s each waiting hold evaluates the queue under one lock:

  1. Hotfix jobs first, then the register rank (rasci.py show), one place earlier per whole hour waited, then arrival; an open after task holds a job.
  2. In that order, a job is blocked at disk stage stop or critical, at warn when it needs disk, at memory stage stop, during a radio-silence mayday, while its kind's slots are taken, or while its workdir runs another job; exclusive_kinds run only beside light_kinds.
  3. A job whose disk need would cut below the stop threshold, or whose footprint would push the running ones past budget_percent, reserves it against the jobs behind it but light_kinds, which meet only running and granted jobs, so a stream of light jobs can delay a heavy head; a job alone always fits.
  4. An unblocked job counts as granted for the jobs behind it.
  5. Every job, alone too, needs CPU, and RAM used plus what it and the running jobs may still take, below load_limits.

History and learning

Every finished job appends a row to queue-history.jsonl, from which disk need, slot limits and footprints are learned; read learning.md next to this file before changing a seed or a limit.

Inspect and cancel

queue.py list
queue.py history
queue.py cancel <id>

list shows each job's position, ETA and blocking reason, history the learned values, cancel removes your own waiting job.

Rules

  • Never ask the chair for a heavy slot or announce a grant; the chair handles only exceptions such as a stuck queue or a hung job (capacity.md of kvb-org-organize).
  • A running job is never cut short for the queue; only the operator orders one down, and kvb-git-hotfix may void a gate. A kvb-org-queue-cleanup round deletes only entries whose lock no living process holds.
  • With queue_enforce: true, the block hook (PreToolUse on Bash) refuses heavy_commands, image builds, make install|test*|quality*|verify-*, tests beyond one unit file and gate.py run|hold outside queue.py hold.
  • Without the config, hold exits 2: tell the operator and ask the chair (kvb-org-organize) until it exists. A waiting hold rereads it every poll (a broken file keeps the last good one), so a limit change needs no re-hold.