dotask
Skill4 starsChanged 47 days agoMITView on GitHub
Use when the user asks to run ONE task by id/slug all the way ("run <slug>", "do task X", "take it to the PR", "dotask <id>"). Supervisor on top of the kitchen — dispatches the task to a tmux session (the execute flow), writes the manifest, watches it with a deterministic watcher and only ends with an open PR. A bug found midway does NOT stop the task — it becomes a record via `plan --problem`. With --sync, pushes the task doc to your tracker at the end (optional integration).
In this repository16 other files it gives its agents.
- executeSkill
- harvestSkill
- orchestrateSkill
- planSkill
- qaSkill
- resumeSkill
- saveSkill
- seguranca-agentesSkill
- seguranca-apiSkill
- seguranca-bots-webhooksSkill
- seguranca-dados-lgpdSkill
- seguranca-dependenciasSkill
- seguranca-infraSkill
- seguranca-segredosSkill
- seguranca-web-frontSkill
- syncSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 79
Update the manifest: 🔄 running — and record the dispatch instant (dispatched: YYYY-MM-DD HH:MM in the manifest's front matter.
- Distinctive: line 92
If the agent (or you) finds a bug/unexpected behaviour outside the scope of the acceptance criteria during execution:
- Very specific: line 103
Only exception: the bug prevents an acceptance criterion (the task cannot close on top of it).
- Distinctive: line 125
When the watcher exits, decide in this order:
- Very specific: line 172
No manifest at all → "never dispatched.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
/dotask — task doc → open PR, without dropping it halfway
/dotask <slug|id> [--sync] run until the PR is open; --sync pushes to the tracker at the end
/dotask <slug|id> --qa same, then run /qa on the PR diff and comment the verdict
/dotask <slug|id> --status only report where the task is (dispatches nothing)Read ../orchestrate/CORE.md before any step. This skill reimplements nothing: it
resolves the task, dispatches through the canonical mechanism (worktree + tmux session,
CORE §2, the execute flow) and watches until the PR opens. For several tasks at once,
use /orchestrate.
Step 0 — Resolve the task
- Adapter (CORE §1).
<id>can be a slug (file<vault.cards>/<slug>.md) or a tracker id (search the task docs' front matter). No doc → if the adapter has a backlog reader (backlog.reader), read the card and create a minimal doc in theplanformat before continuing; no card either → stop and suggest/plan. A doc withtype: qa(or aqa-*slug whose scope is testing, not building): the task IS a QA run — invoke theqaskill and follow its flow (it has its own dispatch, watcher and report; the manifest is its own). The end of that route is the report, not a PR — the endings of Step 4 do not apply. - Four eligibility filters (CORE §1): status, layer, dependencies (
depends_onopen → stop and report the chain) and reality (already done?). Deterministic pre-flight, before dispatching anything:
python3 <skills>/orchestrate/scripts/doctor.py <repo>Contract: exit 1 = critical → do NOT dispatch (report what it flagged and stop); exit 0 = go on, carrying the warnings to the report. It covers
executeStep 0 (clean main checkout, base == origin) and the health of<gh>.
Step 1 — Route
CORE §2. The task needs the scarce_resource → not a case for autonomous /dotask: say
so and run it inline with the human (the execute flow). Inline keeps the manifest
(Step 2, worktree column = main checkout), the acceptance criteria as DoD, the detour rule,
the pre-PR review and Step 5 — it only skips the tmux dispatch and the watcher.
Kitchen route → continue.
Step 2 — Manifest BEFORE dispatch
A batch of one is still a batch: write <vault.plans>/YYYY-MM-DD-<slug>-manifest.md
(CORE §7) with its single row at ⏸ queued. Without a manifest /harvest can never
clean this worktree (CORE §7 boundary) and a crash becomes a mystery with no record.
Step 3 — Dispatch
The canonical CORE §2 command: worktree + branch through execute Step 2 — when the id
IS the slug (task born in /plan, no tracker card): branch = <type>/<slug>, without
repeating the slug — and record the chosen branch in the doc's branch: field. A .kitchen/done left in a
reused worktree by an earlier attempt must be removed first — the watcher would read it as
"done" at once. Then .kitchen/prompt.md, session kitchen-<slug>, --strict-mcp-config. --model comes
from the doc's model_exec (the doc wins over the adapter's model_by_size; absent in
both = account default). Besides the standard content, the prompt carries FOUR rules of this
skill:
- Acceptance criteria are the DoD. The PR only opens with every criterion of the doc
checked (
- [x]) or with the unchecked one justified in the PR body. - The detour rule (section below), verbatim.
- Independent pre-PR review. Between the gates (
executeStep 8) and the PR (Step 11), dispatch an in-session reviewer subagent with the doc'smodel_review, giving it the diff (git diff <base>...HEAD) + the acceptance criteria. It returnsAPPROVEDor a list of problems; fix and repeat (≤3 rounds). NoAPPROVEDby the 3rd → the stop protocol ofexecuteStep 9 (⏳+ reason). The review verdict goes in the PR body. - Doc without a tracker id = the card does not exist yet. The status lives in the doc's
front matter (edit
status:there); do not call the tracker — there is nothing to update. The card is born at--sync, if requested.
Update the manifest: 🔄 running — and record the dispatch instant
(dispatched: YYYY-MM-DD HH:MM in the manifest's front matter; created: only has the
date, and a date does not tell two attempts on the same day apart). Step 4 needs it to not
confuse this batch's PR with a PR from an earlier attempt of the same task.
Check the boot before arming the watcher: ~30 s after dispatch,
tmux capture-pane -p -t '=kitchen-<slug>:' (trailing colon — CORE §2). Two possible
dialogs: the Bypass Permissions acceptance (first time on the machine) and folder trust
(attach, accept, detach). Without this check the watcher would watch a stuck dialog
thinking it is work.
The detour rule — a bug midway does NOT stop the task
If the agent (or you) finds a bug/unexpected behaviour outside the scope of the acceptance criteria during execution:
- Do not fix it. Out of scope is out of scope.
- Record it via
/plan --problem(template Symptom / Origin / How to reproduce / Expected vs. actual): a new doc with file:line evidence andfound_during: <slug of this task>. - Note it in the PR: the body lists "found along the way: <recorded slug(s)>".
- Carry on with the original task. The record costs minutes; the detour would cost the PR.
Only exception: the bug prevents an acceptance criterion (the task cannot close on top
of it). That is a real blocker: record the problem the same way AND apply the execute
Step 9 stop protocol (⏳ waiting on human + reason on the manifest).
Step 4 — Watch until the PR (without burning tokens on polling)
The watcher is a background process, not an agent:
python3 <skills>/orchestrate/scripts/watch.py <worktree> <slug> --manifest <manifest>Exit codes: 0 done (.kitchen/done or ✅ on the row) · 2 crash (session dead, no
done) · 3 ⏳ waiting on human · 4 manifest missing (the ⏳/🚫 triggers would be
blind — fix the path) · 5 🚫 aborted · 6 timeout with the session alive. It logs one
line per iteration (alive/done/state).
A query that errors is not an answer. Network failure, <gh> exit ≠ 0, timeout, 401,
empty JSON because of an error — all INCONCLUSIVE, never "no PR yet". Conclude nothing from
a failed check: do not rewrite the manifest, do not give up — try again. A network blip
read as a verdict is the easiest way to declare failure on work that was already done.
When the watcher exits, decide in this order:
- exit 0 → the agent closed: confirm the PR
(
<gh> pr view <branch> --json url,state,createdAt), reap the session (hibernation, CORE §2) and go to Step 5. The PR only counts ifcreatedAt≥ the manifest'sdispatched(with ~120 s slack for clocks/latency): branches are reused across attempts, and an already merged PR from an earlier attempt at the SAME task makes the watcher cry a false ✅.createdAtolder than the dispatch = another batch's PR → treat as "no PR" and keep watching.✅/donewithout a verifiable PR (or only an old one) is an anomaly: flag it. - exit 3 (
⏳) → take it to the human NOW (reason + how to attach:tmux attach -t '=kitchen-<slug>'). Resolved in the agent's conversation → rewrite the row to🔄 runningyourself (you are the waiter; without it the watcher wakes up on the same⏳and alerts in a loop — CORE §7,⏳→🔄) and watch again. - exit 2 (crash) → CORE §7 reconciliation (inspect
git -C <worktree> status/log, rewrite.kitchen/prompt.mdwith the partial state, recreate the session) and watch again. Never re-dispatch the original prompt on top of partial work. - exit 5 (
🚫) → stop and report the reason; cleanup is the waiter's role (CORE §11). - exit 6 (timeout) → attach and look; do not conclude anything from the clock alone.
/dotask only ends successfully when the PR is open. The only other endings are 🚫 and
a ⏳ the human decided not to resolve now.
Step 5 — Close
- Manifest:
✅ PR+ number + session id (the agent already wrote it inexecuteStep 12; check). - Report: PR, commits, acceptance criteria checked (and what was justified), detours
recorded (
/plan --problem→ slugs). --sync(optional tracker integration, seedocs/integrations.md): dry-run first, always, and confirm the dry-run targets exactly 1 doc and the right card (matching by name can grab the wrong card). Commenting on an existing, confirmed card → apply. Creating a card → show it and wait for the human's OK.--qa: the PR opened → run the QA pass on the diff BEFORE the final report. Invokeqawith target#<PR>: depth smoke (standardif the doc hassize: L|XL), anchor oracle = the doc's acceptance criteria. At the end:<gh> pr comment <PR> --bodywith the verdict + findings (1 line each) + link to the report — the ONLY write of/qaon a PR, and a failing verdict does NOT close the PR: it is information for the human review.- Remind: merging, closing the card and removing the worktree are the human's +
/harvest.
--status — read only
- Newest manifest of the slug: glob
<vault.plans>/*-<slug>-manifest.md(there may be several, from past attempts — take the newest). - One verdict line per source: manifest row (state) ·
tmux has-session -t '=kitchen-<slug>'(process alive?) ·.kitchen/done(hibernated?) ·<gh> pr view <branch>(PR — samecreatedAtrule as Step 4). - No manifest at all → "never dispatched; use
/dotask <slug>".
Zero writes — touches no manifest, doc, session or tracker.
This skill does NOT
- Sequence a backlog — several tasks is
/orchestrate. - Fix out-of-scope bugs (detour rule: record and carry on).
- Merge, close cards or remove worktrees (
/harvestafter the merge). - Push to a tracker without
--sync, and never CREATE a card there without the human's OK. - Watch with an agent in a loop — the watcher is a process; tokens are spent on work.
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.

