sw-run
Skill4 starsChanged 57 days agoMITView on GitHub
Use when the user wants several Superwiki tasks worked through one after another without being asked at each step (run the backlog, do all tasks of an area, keep going until done or blocked, act as orchestrator), or invokes sw-run or sw:run.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- sw-boardSkill
- sw-configSkill
- sw-doctorSkill
- sw-doSkill
- sw-explainSkill
- sw-implementSkill
- sw-ingestSkill
- sw-initSkill
- sw-lintSkill
- sw-migrateSkill
- sw-planSkill
- sw-statsSkill
- sw-summarizeSkill
- sw-triageSkill
- sw-visualizeSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Run commands from the project root.
- Distinctive: line 19
sw-summarize: all of it, as sw-implement step 8 calls it.
- Very specific: line 53
Commit, if agreed and the task is done: the files under its Summary's ### Changes plus its bookkeeping (task file, plan, docs/log.md, …
- Distinctive: line 69
Every answer you give in the user's place, recorded where it was made:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
sw-run
Works through tasks in order, unattended, each one as the single-task skills run it. You are the orchestrator: subagents with clean contexts do the work; your session holds the queue, the reports and the decisions.
Run commands from the project root.
The skills a run follows
Load each once and follow it for every task:
- sw-do: step 1's
checktable, steps 2 and 3 (the rubric, theRoute:line) and step 4's medium route (the Approach note); - sw-plan: steps 4 to 6 and "An agreed split", on the large route;
- sw-implement: steps 2 to 10 and "Dispatching";
- sw-summarize: all of it, as sw-implement step 8 calls it.
This skill takes the place of their other steps.
Before the first task
- Scope, from the user's message: an area, a list of ids, or everything that becomes ready. An area is a task id prefix;
areasindocs/.sw/config.jsonmaps each prefix to its name, so "the backend area" is the prefix named Backend. Its tasks are the ids with that prefix thatnode docs/.sw/sw.mjs readylists at the start, in its order; tasks that become ready later join only when the message asks for them. No prefix matches: ask, or, when questions are ruled out, stop and say so. Standing answers, settled now, since the user will not be asked again:
Question If the message does not answer it May plans and proposed splits be approved without them? yes Which checks that start a service, need a running stack or change data may run? none Commit after each task? Push? no commit, no push Go on with other tasks when one stops? no; stop the run A question is answered only where the message speaks to it: "finish them all" sets the scope and "don't ask me" rules out questions, and neither answers one; "don't commit" answers commit, not push. Ask for the open ones in one question. When the message rules out questions, ask nothing: write one line that starts
Standing answers:and gives all four, the user's where given and the default otherwise, and start.- Check that the run can do what was agreed, before any task is touched:
node docs/.sw/sw.mjs lint: errors are fixed or reported first.- Commits were agreed: run one harmless git command. Refused by the project's settings or the tool: say so now, and neither start the run nor look for another way to run the command.
- Changes in the working tree that belong to no task of this run: say what they are and ask once whether to leave them or commit them first. Questions ruled out: leave them.
Each task
- Next task:
node docs/.sw/sw.mjs ready. A task in scope that is in progress comes first, then the first ready one in scope. None left: go to "The report". - Gate: sw-implement step 2, with sw-do's
checktable. A task whose plan is approved goes to step 5; one already in progress skips step 3. - Mark it started (sw-implement step 3), before routing.
- Route it with sw-do's rubric, from the task file alone, and say its
Route:line, as sw-do step 3 does. A draft plan means large.- Small: step 5.
- Medium: the
Approach (sw-do, <date>):note into "Notes", as sw-do writes it, unless one is there; then step 5. - Large: sw-plan steps 4 to 6; step 6 runs whole, so the plan is
approved.
- Implement: sw-implement steps 4 to 10, with the differences below. Step 10 keeps the area guide for every task.
- Close the task, also one that stops the run:
node docs/.sw/sw.mjs lint. An error stops the run.- Commit, if agreed and the task is
done: the files under its Summary's### Changesplus its bookkeeping (task file, plan,docs/log.md,docs/index.md, the area guide if changed), message<ID>: <title>. Push only if agreed. A refused commit or push stops the run.
- Check your own size:
node docs/.sw/sw.mjs stats, rowmain. Apeakabove 200k tokens stops the run here, between tasks.
What differs in a run
| In the single-task skills | In a run |
| sw-implement step 2: a draft plan stops; a task that is not small and has no plan goes to the user | step 4's route decides |
| sw-plan step 5: the user sees the plan, answers its questions, approves it and any split | nothing is presented. Each question gets the assumed answer, unless the task file, a wiki page or a lesson says otherwise (sw.mjs search); the plan and any split are approved under the standing answer. A split's new task joins the queue only if it is in scope |
sw-plan step 6: the answers go into "Notes"; the plan log entry | the answers go into "Notes" once, as decisions made without the user; the log entry gets the body line Approved under the run's standing answer. |
| sw-implement steps 4 and 6: the user allows checks that need the environment | the standing answer, no question: unattended means fewer questions, not more permission |
sw-implement step 6: a differs or preferred item is the user's call | one fix round, its entry the item in the task's wording |
| sw-implement steps 11 and 12: offers, and the report | offers, open decisions and open findings go into the run's report; the rest is in each task's Summary |
Decisions made without the user
Every answer you give in the user's place, recorded where it was made:
- on a task (a planner question answered, a plan or split approved, a
differsorpreferreditem sent back): in its "Notes" as- <date>, decided without the user: ..., and in the report with its id; - for the run (each default in the
Standing answers:line, working-tree changes left alone): in the report underrunand nowhere else, even when it later decides something on a task, as a check not allowed does.
When to stop
A stop on a task fires once the task is closed (step 6), with its summary and outcome recorded; a summary with an unverified or failed item takes step 9's blocked: <n> unverified, <m> failed row. Then stop and report, also on the last task in scope. Take the next task instead only if agreed and independent of this one.
- A requirement is
not met, or a fix round reports an entrynot fixed. Adiffersorpreferreditem not fixed is a difference the user has not decided:unverifiedin the summary. - The review after the second fix round still says
changes needed. - The summary leaves an item
failedorunverified, also one whose check was not allowed: that stop too fires after the summary, never before the work, with the task built and reviewed where required. lintreports an error, or an agreed commit or push is refused.- A large task, when plans may not be approved without the user: stop before its planner.
- Your
peakis above 200k.
Keeping the run cheap
- A fresh subagent for every task and role, as the clean session a skill cannot open. Only a fix round continues one: the implementer of the same task.
- Prompts exactly as sw-plan step 4 and sw-implement's "Dispatching" give them. No reading lists, no project summary, no word on commits: the role files say changes stay uncommitted and committing is yours.
- Reports, not files. You read no code and no other task's files. Of a plan you read what sw-summarize reads,
## Approachand## Verification, and its frontmatter when sw-plan step 6 approves it. - Edit frontmatter with your edit tool: a
sedpattern that does not match fails silently.
The report
At the end or on a stop:
- A table, one row per task in scope (
not reachedfor the rest): task, route, outcome, the last review verdict with the number of reviews, commit;-where none. - Decisions made without the user, one line each with the task id, or
run. - What stopped the run, and what would let it continue: for a difference, the user's call on it, applied as sw-implement step 6 says; for a check not allowed, the user's yes; for a failed review, its blocking findings.
- Offers, open decisions, and every review's
importantandminorfindings. node docs/.sw/sw.mjs stats, as printed.- What is ready next.
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.

