The problem
Large, multi-part tasks handed to a single agent run serially by default — even when large chunks of the work don’t actually depend on each other. That serial-by-default behavior leaves real speed on the table for any task that decomposes into independent streams.
What I built
A skill that takes an incoming prompt, decomposes it into a directed acyclic graph of sub-agents with explicit dependencies, and validates that graph before anything runs. Independent branches of the graph dispatch in parallel; dependent steps wait on their inputs. The result is a task plan that only runs serially where the work genuinely requires it.
How it works
- Decomposition: the incoming task is broken into discrete sub-agent nodes with declared inputs and outputs.
- Validation: the graph is checked for cycles using Kahn’s algorithm before execution, so a malformed dependency chain fails fast instead of deadlocking mid-run.
- Capability detection: each node is checked against one of three execution modes depending on what tools and context it actually needs.
- Backward contract design: each node’s expected output is defined before its implementation, so downstream nodes can be built against a stable interface.
- Cost ledger: projected token and time cost is tracked per node, giving a running estimate of the full graph’s cost before and during execution.
A finding worth noting
Sub-agent dispatch doesn’t run in degraded mode on claude.ai — parallel dispatch requires the Task tool, which isn’t available there. Cost-ledger figures produced without a dispatched Task tool are projections, not measured values, which matters when comparing estimated versus actual run cost.
Stack
Claude Code, Python, graph validation via Kahn’s algorithm.