Loading...
Loading...
Execute multi-step Standard Operating Procedures (SOPs) with approval gates, state persistence, and execution tracking. Use when you need to run complex, multi-step workflows that require human approval, conditional branching, and audit trails.
npx skill4agent add winsorllc/upgraded-carnival sop-engineautosupervisedstep_by_steppriority_basedmanualcronwebhookjqcurlgitsops/my-sop.md---
name: deploy-frontend
description: Deploy frontend to staging
version: "1.0.0"
priority: high
execution_mode: supervised
triggers:
- type: manual
- type: cron
expression: "0 9 * * *"
---
# Deploy Frontend to Staging
## Step 1: Build the Project
```bash
cd /job && npm run buildcd /job && npm testecho "Deploying to staging..."curl -s https://staging.example.com/health
### 2. List Available SOPs
```bash
sop-listsop-execute deploy-frontendsop-approve <run-id>sop-status <run-id>sop-listsop-execute <sop-name>
sop-execute <sop-name> --payload '{"key": "value"}'sop-approve <run-id>sop-reject <run-id> --reason "Not ready for deployment"sop-status <run-id>sop-runs
sop-runs --sop <sop-name>---
name: <unique-name>
description: <what this does>
version: "1.0.0"
priority: normal # low, normal, high, critical
execution_mode: supervised # auto, supervised, step_by_step, priority_based
triggers:
- type: manual
- type: cron
expression: "0 9 * * *"
- type: webhook
path: /webhook/deploy
---
# Title
## Step 1: Description
```bash
command to runanother command
## Execution Flow
## State Management
State is persisted in `~/.thepopebot/sop-state/<run-id>.json`:
```json
{
"run_id": "run-abc123",
"sop_name": "deploy-frontend",
"status": "running",
"current_step": 2,
"started_at": "2024-01-15T09:00:00Z",
"payload": {"key": "value"},
"history": [
{"step": 1, "status": "completed", "output": "...", "timestamp": "..."},
{"step": 2, "status": "pending_approval", "output": "...", "timestamp": "..."}
]
}~/.thepopebot/sop-audit/<run-id>.json<run-id>.log---
name: deploy-production
description: Deploy to production with approval
priority: critical
execution_mode: step_by_step
triggers:
- type: manual
---
# Production Deployment
## Step 1: Run Tests
```bash
npm testnpm run build./deploy.sh productioncurl -s https://production.example.com/health
### Data Processing Pipeline
```markdown
---
name: process-daily-data
description: Daily data processing pipeline
priority: high
execution_mode: auto
triggers:
- type: cron
expression: "0 2 * * *"
---
# Daily Data Processing
## Step 1: Fetch Data
```bash
curl -o data/raw.json https://api.example.com/datanode transform.js data/raw.json > data/processed.jsonnode validate.js data/processed.jsonmv data/processed.json archive/$(date +%Y%m%d).json
## Best Practices
1. **Use descriptive step titles** - Makes approval prompts clearer
2. **Keep steps atomic** - Each step should do one thing
3. **Include rollback commands** - For critical operations
4. **Add verification steps** - Always confirm success
5. **Use appropriate modes** - Production = step_by_step, dev = auto
6. **Document prerequisites** - List what needs to be true before execution
## Limitations
- Current implementation uses shell/bash - not all SOPs can be expressed this way
- State is local to the agent - not shared across different agent instances
- Approval requires human intervention via CLI