Skillsdo

do

Overview

The do skill is the main entry point for the somnio-loop plugin. It accepts a ticket or task description and orchestrates the full agentic loop end-to-end — from triage and planning through implementation, verification, and final artifact delivery.

When to use

  • User pastes a Jira/Linear/GitHub ticket or a free-form task description
  • User says /loop:do, “run this end to end”, or “execute the full flow”
  • Any request that implies a multi-phase deliverable handed off to autonomous execution

Do NOT use for single-step lookups or quick edits — those run without loop overhead.

Inputs

InputDescription
Ticket textFull ticket body, bullet list, or bare ticket ID (e.g. TKT-123)
.loop/config.yamlAutonomy preset and gate configuration
.loop/state.mdPrior run context and watch list
--autonomy=<preset>Optional per-run override at the end of the ticket

Outputs

OutputLocation
Final deliverable(s)User’s outputs folder
run-report.mdAlongside every artifact
plan.yml.loop/plans/<ts>-<ticket_hash>.yml
trace.json.loop/traces/<ts>-<ticket_hash>.json
Updated run-log.loop/run-log.md

The final chat message always includes an executive summary and a per-agent consumption table (model, invocations, time, tokens, cost).

Definition of Done

A run is not complete until all of the following are present. The orchestrator verifies this checklist before delivering the final message — missing items trigger a re-dispatch or an explicit partial status, never a silent skip.

ItemRequired
Every artifact in final_artifacts: exists and is non-emptyAlways
verify-report.md with a BLOCKING: lineAlways
run-report.md with status, phases, tokens, cost, artifact listAlways
Per-agent consumption table with consistent totalsAlways
run-log.md entry updated to final statusAlways
trace.json saved to .loop/traces/Always
plan.yml archived to .loop/plans/Always
Ticket status updated / PR created / notification sentWhen configured

If the run must be delivered as partial (budget exhausted, max retries hit, unresolvable verifier findings), the orchestrator surfaces exactly what is present and what is missing, and adds the missing items to state.md → High Priority for the next run.

Multi-ticket: one branch and one PR per ticket

When running multiple tickets (do "MH-100 MH-101" or --parallel), each ticket is fully isolated. This is the most common multi-ticket failure mode: workers from two tickets landing on the same branch and producing a merged PR that conflates unrelated changes.

The invariant: one ticket → one branch → one PR. Always. No exceptions.

ScopeIsolated per ticket
Branchfeature/MH-100-... and feature/MH-101-... — created independently from the same base
WorktreesEach ticket gets its own wt-<ticket_id>-<worker_n> directories
Output dir/tmp/loop-runs/<ts>-MH-100/ and /tmp/loop-runs/<ts>-MH-101/
run-log entryOne entry per ticket
PR creationPhase 7 runs independently per ticket — NOT once for the whole batch

How parallel dispatch works

When using --parallel, each ticket is dispatched as an independent sub-agent that runs the full 8-phase do protocol on its own. The parent orchestrator does NOT run phases or create PRs — it only collects results and assembles the summary.

do (parent orchestrator)
  ├─ Agent: ticket MH-100 → runs full loop → branch feature/MH-100-... → PR #444
  ├─ Agent: ticket MH-101 → runs full loop → branch feature/MH-101-... → PR #445
  └─ summary table (assembled by parent after both return)

At the end the orchestrator shows a consolidated table with one PR URL per ticket:

| Ticket | Status      | Branch                    | PR   |
|--------|-------------|---------------------------|------|
| MH-100 | ✅ completed | feature/MH-100-add-cache  | #444 |
| MH-101 | ✅ completed | feature/MH-101-fix-login  | #445 |

Example

/loop:do TKT-421 — Add rate limiting to the public API
 
Acceptance criteria:
- 429 returned after 100 req/min per API key
- X-RateLimit-* headers on every response
- Existing integration tests still pass