Specifies bounded DAG execution contracts and evaluates executor receipts. A plan does not establish that dispatch, isolation, cancellation, join, or external effects occurred.
Specifies bounded DAG execution contracts and evaluates executor receipts. A plan does not establish that dispatch, isolation, cancellation, join, or external effects occurred.
Use Runtime lifecycle limits. Planned topology does not establish dispatch, cancellation, join, or effect behavior.
Decision Points
Boundary selection
flowchart TD
A[Task data/effect contract] --> B[Name file, process, network, secret, resource, and context boundaries]
B --> C{Named control enforces required boundary?}
C -->|Yes| D[Record principal, lifetime, and readback]
C -->|No| E[Reduce scope, add control, or stop]
Failure disposition
flowchart TD
A[Failure/timeout receipt] --> B{Effect reconciled and retry safe?}
B -->|No| C[Contain dependents and reconcile]
B -->|Yes| D{Authorized changed-factor experiment?}
D -->|Yes| E[Propose revision/retry with acceptance check]
D -->|No| F[Record failure or escalate]
Join and release
flowchart LR
A[Attempt receipts] --> B{Declared AND/OR/partial join condition met?}
B -->|Yes| C[Release dependents with attributed limitations]
B -->|No| D[Block, contain, or escalate]
Failure Modes
Permission Creep
Symptoms: Child nodes have more permissions than parent
Detection: Compare delegated grants by principal, operation, canonical resource, conditions, expiry and policy version. Tool-name subsets alone do not establish attenuation.
Fix: Have the named policy evaluator derive an attenuated grant; deny or hold unresolved comparisons before dispatch.
Context Pollution
Symptoms: Node sees conversation history from unrelated nodes
Detection: Compare supplied context identities and disclosure scopes with declared input grants; a permitted dependency reference is not leakage.
Fix: Enforce context isolation, only pass declared inputs
Zombie Wave
Symptoms: Wave never completes, some nodes stuck in "running" state
Detection: The named executor has no terminal/cancellation receipt by its declared deadline or heartbeat policy.
Fix: Contain dependents and use the executor's authorized cancellation/reconciliation path; do not assert a kill occurred without its receipt.
Resource Exhaustion
Symptoms: New agents fail to spawn, memory/CPU limits hit
Detection: Agent spawn returns resource error
Fix: Reconcile resource receipts, bound admission and queue eligible nodes; changing isolation alone does not create capacity.
Detection: Compare attributed usage with the node and run budgets under their declared units and accounting source.
Fix: Follow the declared hold/escalation policy; budget data does not itself grant continuation authority.
Worked Examples
Multi-Wave DAG with Failure Recovery
Scenario: 3-wave codebase analysis DAG where Wave 2 node fails
flowchart LR
A[scan-files: completed] --> B[analyze-architecture: malformed output]
A --> C[check-security: completed]
B --> D{Declared partial join condition?}
C --> D
D -->|required architecture output| E[generate-report: blocked]
D -->|partial result explicitly allowed| F[generate-report: attributed limitation]
Reconciliation check: Determine whether an effect was attempted, its idempotency/effect key, and the executor receipt.
Retry guard: Retry only if the policy authorizes a changed-factor attempt, the effect state is reconciled, and its acceptance check is recorded; otherwise contain and escalate.
Wave completion check: One node failed, one succeeded
check-security succeeded, output available
analyze-architecture has an unavailable/unknown attempt result; do not encode that as JSON null.
Dependency check: generate-report requires both outputs
Decision: Can proceed with partial data? Check node config
If required: false → advance with warning
If required: true → halt execution
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
Threat assessment: Bash tool + external code = high risk
Isolation decision: select a named control only after its boundary, principal, mount, and readback are evaluated. A container alone does not determine host-write authority.
Trade-off resolution:
Constructed local configuration: a writable mount maps /workspace/src to /container/workspace; the mount grant, not the container label, authorizes that path.
Use a named enforceable command/process policy; the phrase "safe commands" does not constrain subprocesses, filesystem access, or network effects.
Constructed local limits are selected from the task workload and threat model, then recorded with the executor receipt.
Expert catches: Need to balance security with functionality
Novice misses: Would either over-isolate (breaking functionality) or under-isolate (security risk)
Quality Gates
Each node starts only after its required dependency and authority conditions are satisfied.
Each node has valid isolation level for its threat profile
Delegation attenuation is evaluated over complete grants; unresolved resource/condition comparisons block dispatch.
All required trace fields populated (node_id, model, tokens, cost, duration)
Deadlines, cancellation semantics, and readback source are declared; no default timeout is assumed.
Cost budgets defined and monitored per node
Retry is conditioned on idempotency/effect state, changed-factor rationale, budget, and acceptance check.
The reference inspected Kotlin coroutine lifecycle documentation, not an agent-runtime implementation. Book candidate, not Book prose: planned topology, dispatch receipt, and external-effect reconciliation are distinct claims. Compare with the Book-review files before asserting novelty or placement.
NOT-FOR Boundaries
Don't use dag-runtime for:
DAG structure planning → Use dag-planner instead
Output quality validation → Use dag-quality instead
Skill-to-task matching → Use dag-skills-matcher instead
Real-time interactive workflows → Use direct agent calls
Single-step tasks → Use individual skills directly
Need to modify DAG structure mid-execution → dag-planner
Agent needs different skill for retry → dag-skills-matcher
1---2license: BSL-1.13name: dag-runtime-24description: Specifies bounded DAG execution contracts and evaluates executor receipts for dispatch, cancellation, joins, and effect reconciliation. Use when an implementation must bind a planned DAG to named runtime controls. NOT for claiming an executor is active, spawning agents, or certifying an effect from a plan.5allowed-tools: Read,Write,Edit,Bash,Grep,Glob6metadata:7 source: https://skillmd.com/skills/curiositech/dag-runtime-28 category: DAG Framework9 tags:10 - dag11 - runtime12 - execute-dag13 - run-workflow14 - spawn-agents15 category: Agent & Orchestration16 tags:17 - dag18 - runtime19 - execution20 - engine21 - management22---2324# DAG Runtime2526Specifies bounded DAG execution contracts and evaluates executor receipts. A plan does not establish that dispatch, isolation, cancellation, join, or external effects occurred.2728Use [Runtime lifecycle limits](references/runtime-lifecycle-limits.md). Planned topology does not establish dispatch, cancellation, join, or effect behavior.2930## Decision Points3132### Boundary selection33```mermaid34flowchart TD35 A[Task data/effect contract] --> B[Name file, process, network, secret, resource, and context boundaries]36 B --> C{Named control enforces required boundary?}37 C -->|Yes| D[Record principal, lifetime, and readback]38 C -->|No| E[Reduce scope, add control, or stop]39```4041### Failure disposition42```mermaid43flowchart TD44 A[Failure/timeout receipt] --> B{Effect reconciled and retry safe?}45 B -->|No| C[Contain dependents and reconcile]46 B -->|Yes| D{Authorized changed-factor experiment?}47 D -->|Yes| E[Propose revision/retry with acceptance check]48 D -->|No| F[Record failure or escalate]49```5051### Join and release52```mermaid53flowchart LR54 A[Attempt receipts] --> B{Declared AND/OR/partial join condition met?}55 B -->|Yes| C[Release dependents with attributed limitations]56 B -->|No| D[Block, contain, or escalate]57```5859## Failure Modes6061### **Permission Creep**62- **Symptoms**: Child nodes have more permissions than parent63- **Detection**: Compare delegated grants by principal, operation, canonical resource, conditions, expiry and policy version. Tool-name subsets alone do not establish attenuation. 64- **Fix**: Have the named policy evaluator derive an attenuated grant; deny or hold unresolved comparisons before dispatch.6566### **Context Pollution**67- **Symptoms**: Node sees conversation history from unrelated nodes68- **Detection**: Compare supplied context identities and disclosure scopes with declared input grants; a permitted dependency reference is not leakage.69- **Fix**: Enforce context isolation, only pass declared inputs7071### **Zombie Wave**72- **Symptoms**: Wave never completes, some nodes stuck in "running" state73- **Detection**: The named executor has no terminal/cancellation receipt by its declared deadline or heartbeat policy.74- **Fix**: Contain dependents and use the executor's authorized cancellation/reconciliation path; do not assert a kill occurred without its receipt.7576### **Resource Exhaustion**77- **Symptoms**: New agents fail to spawn, memory/CPU limits hit78- **Detection**: Agent spawn returns resource error79- **Fix**: Reconcile resource receipts, bound admission and queue eligible nodes; changing isolation alone does not create capacity.8081### **Cost Spiral**82- **Symptoms**: Nodes repeatedly retry expensive operations83- **Detection**: Compare attributed usage with the node and run budgets under their declared units and accounting source.84- **Fix**: Follow the declared hold/escalation policy; budget data does not itself grant continuation authority.8586## Worked Examples8788### Multi-Wave DAG with Failure Recovery8990**Scenario**: 3-wave codebase analysis DAG where Wave 2 node fails9192```mermaid93flowchart LR94 A[scan-files: completed] --> B[analyze-architecture: malformed output]95 A --> C[check-security: completed]96 B --> D{Declared partial join condition?}97 C --> D98 D -->|required architecture output| E[generate-report: blocked]99 D -->|partial result explicitly allowed| F[generate-report: attributed limitation]100```101102**Decision Navigation**:1031. **Failure occurs**: `analyze-architecture` returns malformed JSON1042. **Reconciliation check**: Determine whether an effect was attempted, its idempotency/effect key, and the executor receipt.1053. **Retry guard**: Retry only if the policy authorizes a changed-factor attempt, the effect state is reconciled, and its acceptance check is recorded; otherwise contain and escalate.1064. **Wave completion check**: One node failed, one succeeded107 - `check-security` succeeded, output available108 - `analyze-architecture` has an unavailable/unknown attempt result; do not encode that as JSON `null`.1095. **Dependency check**: `generate-report` requires both outputs110 - **Decision**: Can proceed with partial data? Check node config111 - If `required: false` → advance with warning112 - If `required: true` → halt execution113114**Expert catches**: Checking dependency requirements before advancing wave115**Novice misses**: Would either block forever or advance with missing critical data116117### Isolation Trade-offs118119**Scenario**: Code execution node needs filesystem access but has security concerns120121```yaml122node: code-formatter123skills: [python-formatter]124inputs: {source_files: [...]}125permissions: {tools: [Read, Write, Bash], paths: ["/workspace/src"]}126```127128**Decision Navigation**:1291. **Threat assessment**: Bash tool + external code = high risk1302. **Isolation decision**: select a named control only after its boundary, principal, mount, and readback are evaluated. A container alone does not determine host-write authority.1313. **Trade-off resolution**:132 - Constructed local configuration: a writable mount maps `/workspace/src` to `/container/workspace`; the mount grant, not the container label, authorizes that path.133 - Use a named enforceable command/process policy; the phrase "safe commands" does not constrain subprocesses, filesystem access, or network effects.134 - Constructed local limits are selected from the task workload and threat model, then recorded with the executor receipt.135136**Expert catches**: Need to balance security with functionality137**Novice misses**: Would either over-isolate (breaking functionality) or under-isolate (security risk)138139## Quality Gates140141- [ ] Each node starts only after its required dependency and authority conditions are satisfied.142- [ ] Each node has valid isolation level for its threat profile143- [ ] Delegation attenuation is evaluated over complete grants; unresolved resource/condition comparisons block dispatch.144- [ ] All required trace fields populated (node_id, model, tokens, cost, duration)145- [ ] Deadlines, cancellation semantics, and readback source are declared; no default timeout is assumed.146- [ ] Cost budgets defined and monitored per node147- [ ] Retry is conditioned on idempotency/effect state, changed-factor rationale, budget, and acceptance check.148- [ ] Context isolation prevents cross-node conversation leakage149- [ ] Failed, unavailable, absent, and unknown output states remain distinguishable.150- [ ] Resume eligibility preserves input/version identity, attempt receipts, and validated artifact state.151152## Evidence and Book candidate153154The reference inspected Kotlin coroutine lifecycle documentation, not an agent-runtime implementation. **Book candidate, not Book prose:** planned topology, dispatch receipt, and external-effect reconciliation are distinct claims. Compare with the Book-review files before asserting novelty or placement.155156## NOT-FOR Boundaries157158**Don't use dag-runtime for**:159- **DAG structure planning** → Use `dag-planner` instead160- **Output quality validation** → Use `dag-quality` instead 161- **Skill-to-task matching** → Use `dag-skills-matcher` instead162- **Real-time interactive workflows** → Use direct agent calls163- **Single-step tasks** → Use individual skills directly164165**Delegate to other skills when**:166- Output doesn't meet quality standards → `dag-quality`167- Need to modify DAG structure mid-execution → `dag-planner`168- Agent needs different skill for retry → `dag-skills-matcher`
Run npx get-skill add curiositech/dag-runtime-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Specifies bounded DAG execution contracts and evaluates executor receipts. A plan does not establish that dispatch, isolation, cancellation, join, or external effects occurred. It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: reads secrets. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
curiositech (@curiositech) published this skill. Their other Agent Skills are listed on their SkillMD profile.