autonomous-loop
Phase-aware autonomous engineering loop with crash recovery. Combines Ralph Loop persistence with Compound Engineering workflows for long-horizon feature development. Use when running autonomous multi-phase engineering tasks.
What this skill does
# Autonomous Loop
A stop-hook-powered engineering loop that persists across context resets. State lives in `.claude/autonomous-loop.json` (JSON — resistant to model corruption). Each iteration starts with re-anchoring to prevent drift.
## Phase Machine
```
brainstorm → plan → deepen → work → review ──→ compound → test → ship
│ │
↓ (P1 found) ↓ (fail)
fix → re_review ──────→ fix
↑ │
└───────┘ (max 3 cycles)
```
## Phases
| Phase | Command | Done When |
|-------|---------|-----------|
| brainstorm | `/workflows:brainstorm` | Brainstorm doc created |
| plan | `/workflows:plan` | Plan file created |
| deepen | `/compound-engineering:deepen-plan` | Single pass (always advances) |
| work | `/workflows:work` | All tasks done, commits pushed |
| review | `/workflows:review` | Review complete |
| fix | `/compound-engineering:resolve_todo_parallel` | P1 findings resolved |
| re_review | `/workflows:review` | Verify fixes |
| compound | `/workflows:compound` | Learnings documented |
| test | `/compound-engineering:test-browser` | E2E tests pass |
| ship | Create/finalize PR | `<promise>SHIPPED</promise>` |
## Re-Anchoring Protocol
At the START of every iteration, before any other work:
1. Read `.claude/autonomous-loop.json` for current state
2. Run `git log --oneline -10` to see recent commits
3. Run `git diff --stat` to check uncommitted changes
4. Read the plan file (if `artifacts.plan_file` is set)
This prevents drift when context gets compressed between iterations.
## State Management
You MUST update `.claude/autonomous-loop.json` at every phase boundary.
### Completing a phase:
1. Add the completed phase name to `phases_completed`
2. Set `phase` to the next phase name
3. Reset `phase_iteration` to 0
4. Record a receipt in `receipts`:
```json
{"phase": "plan", "artifact": "docs/plans/...", "git_sha": "abc123", "timestamp": "2026-02-13T10:30:00Z"}
```
5. Update relevant `artifacts` fields (plan_file, pr_url, branch, etc.)
6. Update `last_updated` timestamp
### On errors:
- Add error details to the `errors` array
- Do NOT change the phase — the stop hook will retry on next iteration
### Phase-specific rules:
- **fix**: Increment `fix_review_cycles` when entering fix
- **review / re_review**: Check P1 findings to pick next phase
- **ship**: Set `artifacts.pr_url` before outputting promise
## Safety Rails
- **Global limit**: Stops at `max_iterations` (default 50)
- **Phase limit**: Force-advances if stuck for `max_phase_iterations` (default 10)
- **Fix cycles**: Max `max_fix_cycles` (default 3) fix→re_review rounds
- **Completion**: Output `<promise>SHIPPED</promise>` to end the loop
## Conflict with Ralph Loop
Do not run an autonomous loop and a Ralph Loop simultaneously. Both use stop hooks — only one should be active. Cancel Ralph first: `/cancel-ralph`
## Reference
- [State file schema](references/state-schema.md)
- [Phase prompt details](references/phase-prompts.md)
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.