# Do

> Executes a task per plan. Triggered when the user writes "execute", "do", "run the plan", "implement", or passes a path to a plan file and asks to execute it.

- Skill: `yokeloop/do` (Agent Skill, multi-file: 16 files)
- Install (CLI): `npx skillmds@latest add yokeloop/do`
- Raw SKILL.md: https://api.skillmd.com/api/skills/yokeloop/do/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: yokeloop (https://skillmd.com/u/yokeloop)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/yokeloop/do

---


# Execute task per plan

Act as the orchestrator. Detect the input shape, pick a mode, and run that
mode's procedure from its reference file. The flow is **grill → do → PR**: every
run ends by finishing per `reference/finish.md` — the pull request(s) are the
deliverable.

**Principle:** the developer starts the run and returns on notification.

---

## Input

`$ARGUMENTS` — one of:

- **empty** — no input; work from the current conversation (inline)
- **a plain task description** — chat text, no ticket (inline)
- **a single issue URL**, a bare `<slug>`, or a `*-task.md` path (sub-agents)
- **a `*-plan.md` path** — a pre-built plan (sub-agents, back-compat)
- **a PRD issue that has GitHub sub-issues** (team)
- **a Draft PR URL**, or a bare `<slug>` whose `.yoke/ai/<slug>/<slug>-draft.md` exists (draft execution)

Optional flag `--update-docs` enables the documentation step. Without it, /do
skips docs unless the plan's frontmatter sets `update_docs: true`.

---

## Router

Detect the mode from `$ARGUMENTS`. First match wins:

1. **`$ARGUMENTS` is a path ending `-plan.md`** → **sub-agents** mode. A plan
   already exists, so skip planning. Read the file's `**Mode:**` header for
   back-compat — an `agent-team` header maps to **team** mode instead. Then read
   and follow `reference/mode-sub-agents.md` (or `reference/mode-team.md` when
   the header says `agent-team`).
2. **`$ARGUMENTS` is a GitHub pull-request URL (path contains `/pull/`), or a
   bare `<slug>` for which `.yoke/ai/<slug>/<slug>-draft.md` exists** →
   **draft execution** mode: a `/draft` run marked the code and opened the
   Draft PR; implement it per the review. Read and follow
   `reference/mode-draft-execution.md`.
3. **`$ARGUMENTS` is a single issue URL, a bare `<slug>`, or a `*-task.md`
   path** → **sub-agents** mode (investigate → plan → pause → execute). Read and
   follow `reference/mode-sub-agents.md`.
4. **`$ARGUMENTS` points at a PRD issue that HAS sub-issues** (detect via
   `gh api`) → **team** mode. Read and follow `reference/mode-team.md`.
5. **empty / a plain chat description / no ticket** → **inline** mode. Read and
   follow `reference/mode-inline.md`.

Each mode's full procedure lives in its reference file. Read only the one this
ladder selects, then execute it.

---

## Modes

| Mode                | Input                                            | Behavior                                                                                                                  |
| ------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- |
| **inline**          | empty / plain chat description                   | Brief plan in chat, execute in-session, then finish per `reference/finish.md`.                                            |
| **sub-agents**      | issue URL / `<slug>` / `*-task.md` / `*-plan.md` | Write the plan, pause only on cold start, executor → reviewer → validator, then finish.                                   |
| **draft execution** | Draft PR URL / drafted `<slug>`                  | Implement the Markup per the review (comments > markers > plan), reply in the threads, flip the PR to ready, then finish. |
| **team**            | PRD issue with sub-issues                        | Write the plan, pause only on cold start, dispatch sub-agents per sub-issue, then finish.                                 |

---

## Principles

These hold for every mode run:

- **Worktree on default branch.** Before touching code (after the cold-start
  pause, if any), enter a worktree per `reference/finish.md` §2 when the run
  starts on the default branch.
- **Finish at PR.** Once the tasks are done, hand off to `reference/finish.md`
  §3-§7: finish each repo by its finish policy from the flow map, comment on
  the ticket, and send the notify carrying the PR link(s).
- **Pause only on cold start.** The plan-confirmation pause fires only when no
  grill preceded in the session and no approved plan was handed in. A plan
  already agreed in grill runs straight through.
- **Never merge, except one signal.** An explicit "straight to main" from the
  user is the single merge exception (`reference/finish.md` §6). Otherwise `do`
  finishes at the PR and never merges; it never runs deploy or release.
- **Artifacts under `.yoke/`.** Every file `do` writes lives under `.yoke/`.
- **Commits by convention.** Format, ticket ID, and git initiative — from
  `${CLAUDE_PLUGIN_ROOT}/skills/gca/reference/commit-convention.md` (see its
  "Git initiative and defaults"). Do not ask "commit?" mid-run.
- **Read the git memory first.** Before modifying a file, read its recent
  commit history per
  `${CLAUDE_PLUGIN_ROOT}/skills/gca/reference/history-reading.md`. A
  `Constraint:` or `Directive:` that conflicts with the plan is surfaced,
  not silently overridden; a `Rejected:` approach is not re-proposed
  without new evidence.
- **Review after each task.** Spec compliance → code quality. Mandatory.
- **Context isolation.** A sub-agent receives only its own task text, not the
  whole plan.
- **CLI output.** Run commands with long output (formatter, lint, build, test)
  with `2>&1 | tail -20`.
- Language: match the ticket/input language, or follow the project-level
  definition in CLAUDE.md / AGENTS.md.

---

## Report

Sub-agents and team modes write `.yoke/ai/<slug>/<slug>-report.md` and append the finish block from `reference/finish.md` §7; inline prints its summary in chat. Full template: `reference/report-format.md`.

