run
Execute plan tasks autonomously until completion
What this skill does
# Devloop Run
Execute plan tasks autonomously. **Do the work directly.**
**Bash hygiene**: prefer quiet flags to minimize output (`npm install --silent`, `git status -sb`, pipe long output through `| tail -n 20`).
**Monitor for long commands**: Use Monitor (not Bash) for test suites, builds, and full-codebase linting to stream output in real-time. Use Bash for all short commands (git ops, ls, devloop scripts).
Long-running commands that warrant Monitor:
- Test suites: `npm test`, `pytest`, `go test ./...`, `cargo test`, `make test`, `jest`, `vitest`, `mocha`
- Builds: `npm run build`, `make`, `cargo build`, `go build`, `tsc`, `webpack`, `vite build`, `gradle`, `mvn`
- Full-codebase linting: `eslint .`, `ruff check .`, `pylint src/`, `golangci-lint run`
Monitor pattern (always include failure patterns in the filter):
```
Monitor({ description: "test run", command: "npm test 2>&1 | grep --line-buffered -E 'PASS|FAIL|Error|passed|failed'", timeout_ms: 300000, persistent: false })
```
Fallback: if Monitor errors or is unavailable, use Bash directly.
## Step 1: Check Plan State
Run `${CLAUDE_PLUGIN_ROOT}/scripts/check-plan-complete.sh .devloop/plan.md`.
- **No plan**: Show entry points (`/devloop:plan`) and STOP.
- **Complete**: **AskUserQuestion**: Ship it, Archive, or Review. STOP.
- **Pending**: Continue to Step 2.
## Step 2: Parse Arguments
- `--max-iterations N`: Default 50.
- `--interactive`: Prompt at each task.
- `--next-issue`: Jump to Step 2b (Issue-to-ship workflow).
## Step 2b: Next Issue Workflow
1. Check for incomplete plan (prompt to replace).
2. Fetch with `gh issue list`.
3. Prioritize: bug/critical > security > feat > oldest.
4. Select issue, create `.devloop/plan.md` with required frontmatter (title, issue, url, status).
5. Post-completion: Validate (tests/lint) and commit with `Closes #N`.
## Step 3: Resume State
If `.devloop/next-action.json` exists, load and resume.
## Step 4: Setup Execution
Unless `--interactive`, create `.claude/ralph-loop.local.md` with iteration limits and completion promise: `<promise>ALL PLAN TASKS COMPLETE</promise>`.
**Optional**: Sync plan to native tasks with `${CLAUDE_PLUGIN_ROOT}/scripts/sync-plan-to-tasks.sh`.
## Step 5: Execute Tasks
Read plan, find all `- [ ]` tasks.
### 5a. Detect Parallel Groups
Scan pending tasks for `[parallel:X]` markers. If multiple pending tasks share the same group letter, they can run concurrently.
### 5b. Model Selection Per Task
Parse the `[model:X]` annotation from each task line:
- **`[model:haiku]`**: Spawn Agent with `model: "haiku"` — use for simple/mechanical tasks
- **`[model:sonnet]`**: Spawn Agent with `model: "sonnet"` — use for complex reasoning tasks
- **No annotation**: Do the work inline — no agent spawn needed
### 5c. Execute (Parallel or Sequential)
**For parallel groups**: Spawn one Agent per task in the group simultaneously (multiple Agent calls in a single message). Each agent receives the task description, phase context, and relevant files.
**For sequential tasks** (no parallel marker, or all group members not yet pending): Process one at a time.
Agent spawn pattern:
> **Prompt caching**: Put STATIC content first (identical across spawns → cached), DYNAMIC content last (varies per task → not cached). This maximizes cache hits when multiple agents are spawned in the same session.
```yaml
Agent:
model: "haiku" # or "sonnet" per [model:X] annotation
prompt: |
Instructions: Implement the task below. Do NOT modify plan.md or commit.
Phase: [phase name]
[STATIC: any shared project conventions or plan-level context here]
Task: [description]
Context: [relevant files and conventions -- dynamic, task-specific]
```
### 5d. Update Progress
1. Mark task `[x]` in `plan.md`.
2. Update native task to `completed`.
3. Check overall completion.
- **All complete**: Output `<promise>ALL PLAN TASKS COMPLETE</promise>`.
- **Tasks remain**: Continue (Autonomous) or Prompt (Interactive).
- **Checkpoints**: If `auto_commit: true`, commit at phase boundaries.
## Step 7: Finalize
**AskUserQuestion**: Ship it, Archive, or Review.
---
**Now**: Check plan state and begin.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.