sp-work
Skill2 starsChanged 3 months agoMITView on GitHub
Orchestrator mode — drive the agent pipeline for a GitHub issue from this interactive session. Picks the right dispatch event from the issue's agent labels, runs it, and narrates the result. Preserves the plan-review gate.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- discord-bot/AGENTS.mdAGENTS.md
- prompts/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- slack-bot/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- discord-bot/CLAUDE.mdCLAUDE.md
- prompts/CLAUDE.mdCLAUDE.md
- scripts/CLAUDE.mdCLAUDE.md
- slack-bot/CLAUDE.mdCLAUDE.md
- setupSkill
- sp-post-mergeSkill
- sp-reviseSkill
- sp-statusSkill
- testSkill
- troubleshootSkill
- updateSkill
- sp-cleanupSkill
- sp-implementSkill
- sp-reviewSkill
- sp-reviseSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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
- Very specific: line 56
Run /sp-status <n> — stale: false means it is ALIVE.
- Distinctive: line 57
Read the last-dispatch record the status output includes — every run writes its outcome before exiting, failures included.
- Very specific: line 58
Check the work branch: git log origin/agent/issue-<n> --oneline | head — commits are pushed before gates can fail.
- Distinctive: line 59
Only report the dispatch as stopped once all of that agrees.
≈ “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
sp-work: Dispatch the Pipeline for an Issue
You are the orchestrator tier: you run one command, parse one JSON line, and narrate. The pipeline (harness + headless phases) does the work.
Never implement, fix, or review anything yourself in this session — the pipeline owns that. Work you do here is neither seen by the adversarial review phase nor recorded in a phase envelope. Your job is dispatch, notify, report.
Step 1: Locate the dispatch script and repo
- Script:
.sandbox-pal-dispatch/scripts/sandbox-pal-dispatch.shif it exists (standalone install), elsescripts/sandbox-pal-dispatch.sh. - Repo:
gh repo view --json nameWithOwner -q .nameWithOwner.
Step 2: Pick the event from the issue's agent labels
gh issue view <n> --json labels,state -q '[.labels[].name, .state]' — the issue must be OPEN.
| Label state | Action |
none / agent / agent:triage | Run event new_issue (triage: posts a plan or questions) |
agent:needs-info | If the human has answered on the issue, run issue_reply; otherwise report what's still awaited |
agent:plan-review | Stop — the plan gate. Point the operator at the plan comment on the issue. Only if the operator explicitly approves: apply agent:plan-approved (gh issue edit <n> --add-label agent:plan-approved --remove-label agent:plan-review), then run implement |
agent:plan-approved | Run event implement |
agent:in-progress | A dispatch may be running — run /sp-status <n> first; only re-dispatch if it is stale |
agent:pr-open | Nothing to dispatch — link the PR for human review |
agent:failed | Read the failure comment and the last-dispatch record, explain the cause, and re-run the appropriate event only if the operator says so |
Step 3: Run the dispatch
AGENT_EXECUTION_MODE=orchestrator <script> <event> <owner/repo> <issue>This can run a long time (an implement dispatch includes the test gate and the adversarial review loop). While it runs, stderr is the human-readable narration; do not touch the worktree.
Step 4: Parse the result
The final line of stdout is a compact JSON object: {event, repo, issue, outcome, exit_code, pr_url, started, finished}. Everything else is host output for humans. Act on outcome:
agent:plan-review— plan posted; show the operator where to review it. The gate is theirs, not yours.agent:needs-info— questions posted; relay them.agent:pr-open— reportpr_url, the review-loop summary from the PR body (including any "Review Unresolved" banner and Permission Denials section), and remind the operator the PR awaits their human review.agent:failed— quote the failure comment from the issue; if it lists permission denials, each one is an allow-list gap to fix in config.lock-refused— another dispatch owns this issue's lock; run/sp-status <n>and report who holds it.error— infrastructure error; the issue has an "Agent Infrastructure Error" comment with diagnostics.
If the command appears to die: verify before you report
A killed or failed task notification is unverified until you check it. Background-task monitors have reported dispatches killed that were alive and went on to open PRs.
- Run
/sp-status <n>—stale: falsemeans it is ALIVE; report the phase it is in and leave it alone. - Read the last-dispatch record the status output includes — every run writes its outcome before exiting, failures included.
- Check the work branch:
git log origin/agent/issue-<n> --oneline | head— commits are pushed before gates can fail. - Only report the dispatch as stopped once all of that agrees. Never describe the working tree as half-finished, and never advise discarding or salvaging work, on the strength of a notification alone.
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.

