brutal-swarm
Skill2 starsChanged 4 months agoMITView on GitHub
Drain a BRUTAL.md task graph through parallel isolated workers and stacked pull requests. Managed workers use append-only phases with fresh execution context.
In this repository25 other files it gives its agents.
- brutal-deepresearchSkill
- brutal-grillSkill
- brutal-idea-evalSkill
- brutal-inf-fix-loopSkill
- brutal-planSkill
- brutal-pr-finding-fixerSkill
- brutal-pr-fix-loopSkill
- brutal-project-reviewSkill
- brutal-pr-reviewSkill
- brutal-realitySkill
- brutal-reviewSkill
- brutal-specSkill
- brutal-ticketsSkill
- brutal-wayfinderSkill
- brutal-workerSkill
- codex-coopSkill
- design-jepa-modelsSkill
- factory-designSkill
- funcvec-dedupe-fixerSkill
- grill-meSkill
- handoffSkill
- opencode-delegateSkill
- rust-architecture-reviewSkill
- rust-pr-reviewSkill
- supply-chain-analyzerSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Read applicable repository workflow rules.
- Distinctive: line 25
Never inherit uncommitted changes from the initiating worktree.
- Distinctive: line 26
Ask for the maximum concurrent ticket workers on every run.
- Very specific: line 36
Use scripts/swarm_wave.py on fresh normalized provider reads for every wave.
- Distinctive: line 47
After handoff, do not claim, comment, transition, implement, push, review, or edit that task/PR.
- Very specific: line 68
After terminal clean, remove the worktree only when the returned local head equals the verified pushed PR head.
- Distinctive: line 75
Do not stop after the first wave.
- Distinctive: line 87
Keep full tmux JSONL, test, diff, and provider output in protected run/attempt logs.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Brutal Swarm
Schedule exact-task workers without taking ownership of their tickets or pull requests.
Required Context
- Read
../brutal-shared/integration-resolver.md,../brutal-shared/support/contracts.md,../brutal-worker/SKILL.md, andreferences/parallel-execution.mdcompletely. - Resolve one work store and code host, load both support modules, and retain their normalized identities.
- Read applicable repository workflow rules.
Start A Run
- Discover resumable
in_progress/in_reviewwork and stack-readytodoartifacts of kindtaskorreview_finding. Select one plan graph. - Resolve the explicit or default root branch and record its remote head. Never inherit uncommitted changes from the initiating worktree.
- Ask for the maximum concurrent ticket workers on every run. Use the smaller of that answer and platform capacity.
- Resolve
execution.worker_runtimewithscripts/runtime_config.pybefore claiming or provisioning. Missing meanstmux; accept onlytmuxorsubagentand never fall back implicitly. - For a local work store, resolve its canonical absolute root against the primary worktree.
Drain The Graph
Use scripts/swarm_wave.py on fresh normalized provider reads for every wave.
Resume owned attempts before starting todo work.
For each selected artifact:
- Provision or safely resume its sibling worktree serially with
scripts/worktree_manager.py. - Pass the exact managed handoff from the execution reference. Use
scripts/tmux_worker.pyfor tmux, or one persistent native collaboration worker for the subagent runtime. Instruct it to use$brutal-workerfor only that task. - After handoff, do not claim, comment, transition, implement, push, review, or edit that task/PR. The swarm may re-read state, advance managed phases, and relay progress.
- Preserve progress on failure. Remove only a verified empty worktree after claim loss. Exclude blocked descendants while independent work continues.
For tmux, count only live panes toward the concurrency cap. Retained dead panes
occupy no slot. When a pane returns a valid zero-exit checkpoint, revalidate the
task, ownership, PR, branch/base/head, and checks; write a mutable phase
snapshot; then call tmux_worker.py advance with the active attempt id and
revalidated snapshot. The controller derives the next phase. Never resume a
completed checkpoint or reuse its Codex thread across phases.
Managed prompts contain only the phase, context-file path, and result path. Bulk ticket, diff, check, and finding data stays in one run-local context file.
Prioritize an interrupted same-phase resume before new work, still within the
cap. Use exact-thread resume only for that interruption. Every phase and retry
gets an append-only attempt directory; never overwrite or accept a stale
attempt, missing exit record, or partial result.
After terminal clean, remove the worktree only when the returned local head
equals the verified pushed PR head. Keep branches while PRs remain open. A
zero_findings or materially_clean review gate is stack-ready; literal
pr.clean remains a compatibility input, not the only readiness signal.
Rebuild the graph whenever a worker reaches a checkpoint or terminal result. Continue until no resumable, reconcilable, or stack-ready artifact remains. Do not stop after the first wave.
Reconcile Existing Stacks
Prioritize exact-task handoffs that complete merged tickets, update children after a base advances, or resume matching owned work. A child worker merges the new base normally, resolves conflicts, verifies, pushes, retargets when needed, and re-enters the material-correctness review/fix loop. Never merge a PR, force-push, or let a parent worker edit a child.
Operational Output
Keep full tmux JSONL, test, diff, and provider output in protected run/attempt logs. Relay only status, duration, checkpoint summary, and on failure the last 200 lines or 16 KiB, whichever is smaller. Logs and sessions are observability, not workflow truth.
Final Response
Report integrations, graph, requested/effective concurrency, runtime, worker and phase attempts, task/session/worktree/branch/PR mappings, completion kinds, residual lower-severity findings, blocked results, retained evidence, safe attach/cleanup commands, and reasons remaining artifacts are not stack-ready.
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
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.

