Dag runtime

From curiositech/windags-skills · View interactive version

Dag runtime is an AI agent skill from the GitHub repository curiositech/windags-skills. Executes DAG workflows with parallel wave processing, agent spawning, context isolation, permission enforcement, and full execution tracing. Use when running a planned DAG, managing concurrent agent execution, enforcing isolation boundaries, or tracing execution for debugging. Activate on "execute D

How to use this skill

Skill file

DAG Runtime

Executes DAG workflows with parallel wave processing, agent spawning, context isolation, permission enforcement, and full execution tracing.

Decision Points

Isolation Level Selection

Input: threat model + node characteristics
├── Untrusted code execution?
│   └── YES → Container isolation
├── Resource limits needed?
│   └── YES → Process isolation
├── Context contamination risk?
│   └── YES → Context isolation
└── Cooperative nodes on same task?
    └── YES → None isolation

Failure Escalation Strategy

Node fails → Check failure type:
├── Timeout/Rate limit?
│   └── Retry with exponential backoff (max 3x expensive models, 10x cheap)
├── Invalid output schema?
│   └── Retry with schema reminder + example (max 2x)
├── Permission denied?
│   └── Check parent permissions → escalate to human if mismatch
├── Skill not found?
│   └── Mutate DAG: remove node or find alternative skill
└── Persistent failure after max retries?
    └── Human review required

Wave Completion Criteria

All nodes in wave complete → Check status:
├── All succeeded?
│   └── Advance to next wave
├── Some failed but non-blocking?
│   └── Mark outputs as null, advance with warning
├── Critical node failed?
│   └── Halt execution, trigger failure handling
└── Mixed success/retry?
    └── Wait for retries to complete

Failure Modes

**Permission Creep**

**Context Pollution**

**Zombie Wave**

**Resource Exhaustion**

**Cost Spiral**

Worked Examples

Multi-Wave DAG with Failure Recovery

Scenario: 3-wave codebase analysis DAG where Wave 2 node fails

# Initial DAG state
Wave 1: [scan-files] → completed
Wave 2: [analyze-architecture, check-security] → analyze-architecture fails
Wave 3: [generate-report] → blocked

Decision Navigation:

  1. Failure occurs: analyze-architecture returns malformed JSON
  2. Failure type check: Invalid schema → retry with schema reminder
  3. Retry fails: Still malformed → escalate to human
  4. Wave completion check: One node failed, one succeeded
  1. Dependency check: generate-report requires both outputs

Expert catches: Checking dependency requirements before advancing wave

Novice misses: Would either block forever or advance with missing critical data

Isolation Trade-offs

Scenario: Code execution node needs filesystem access but has security concerns

node: code-formatter
skills: [python-formatter]
inputs: {source_files: [...]}
permissions: {tools: [Read, Write, Bash], paths: ["/workspace/src"]}

Decision Navigation:

  1. Threat assessment: Bash tool + external code = high risk
  2. Isolation decision tree:
  1. Trade-off resolution:

Expert catches: Need to balance security with functionality

Novice misses: Would either over-isolate (breaking functionality) or under-isolate (security risk)

Quality Gates

NOT-FOR Boundaries

Don't use dag-runtime for:

Delegate to other skills when:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.