making test

Prompt

Yes—this exact pattern exists, and it's usually called **DAG (Directed Acyclic Graph) task planning with parallel execution**. Instead of your agent going `step1 → step2 → step3 → ...` one request at a time, it plans the whole job upfront as a dependency graph, then fires every independent step **at the same time**. A step only waits when it actually depends on another step's output. Below are the best existing skills/frameworks I found, followed by a ready-to-use skill template you can drop into your agent if you want to build it yourself. --- ## 🛠️ Existing skills and frameworks ### 🔍 `graph-skill` (npm) This is probably the closest drop-in fit for a coding agent. It plans the task as a dependency graph of small nodes and **runs independent nodes concurrently**. The example tree it shows: ``` inspect → analysis, quality, review (all run in parallel) → synthesis (waits for all three) ``` It also caches completed work so you never re-pay for steps that already succeeded. Install with `npx graph-skill install`. ### 📦 `genpark-dynamic-tool-dependency-dag-topological-resolver-skill` A **zero-dependency Python skill** built specifically for multi-tool/multi-agent execution. It takes tool declarations, builds a dependency DAG, topologically sorts them into **parallel execution batches**, and detects circular locks. It exposes itself over **MCP** (Model Context Protocol), so it plugs into Claude Desktop, Cursor, etc.. ### ⚙️ `Agent Workflow Skill` (task-graph-executor) A skill that does exactly your workflow: decompose → build DAG → **run independent tasks first, parallelize when possible**, wait for dependencies, return structured results. It has a planner, executor, and example scripts. ### 🐍 `hydra-agents` (PyPI) A full orchestration framework with **hybrid DAG execution**: independent tasks run in parallel, dependent tasks wait automatically. It also generates specialized agents at runtime and streams every step. Install: `pip install hydra-agents`. ### 🧩 `pydantask` A harness for building deep multi-step agents on Pydantic AI. Its supervisor builds a task DAG, and **dependency-satisfied tasks run concurrently**. ### 📚 Research-grade approach: LLMCompiler The underlying architecture is validated by **LLMCompiler (ICML 2024)**. The idea: **invoke the LLM once to plan all function calls as a DAG**, then execute independent calls in parallel. This reportedly achieves up to **3.7× latency speedup** and minimizes sequential steps. --- ## ✍️ If you want to build it yourself (custom skill) Here is a minimal skill structure you can adapt. It works with any agent that supports tool calling. ### 📋 Skill definition (e.g., `parallel_dag_skill.md`) ```markdown # Skill: Parallel DAG Executor ## When to use Use when a task has multiple steps where some steps are independent and others depend on earlier outputs. ## Workflow ### Step 1 — Plan as a DAG (one LLM call) Break the task into subtasks. For each subtask output: - id - description - depends_on: [] # list of subtask ids that must finish first Return ONLY the DAG as JSON. ### Step 2 — Topological sort into waves Group subtasks into waves: - Wave 1: every subtask with depends_on = [] - Wave N: every subtask whose dependencies are all in earlier waves ### Step 3 — Execute waves in order, parallel inside each wave For each wave: - Launch ALL subtasks in that wave at the same time (parallel tool calls). - Wait for the whole wave to finish. - Merge outputs into a shared context. - If any task failed, retry it alone before moving to the next wave. ### Step 4 — Return final result ``` ### 🧮 Deterministic sorter (Python, zero dependencies) ```python def plan_waves(tasks): """ tasks: list of dicts with 'id' and 'depends_on' (list of ids) Returns list of waves, each wave is a list of task ids that can run in parallel. """ done = set() waves = [] remaining = list(tasks) while remaining: wave = [ t["id"] for t in remaining if all(dep in done for dep in t["depends_on"]) ] if not wave: raise ValueError("Circular dependency detected") waves.append(wave) done.update(wave) remaining = [t for t in remaining if t["id"] not in done] return waves ``` This is essentially what the GenPark skill does: it returns `topologically_sorted_execution_stages` (waves) so your agent knows exactly what to fire in parallel. --- ## 💡 Practical tips to lower requests further 1. **Plan once, not every step.** Use a single planning call to produce the DAG, then execute deterministically. This is the LLMCompiler principle: **one LLM call for orchestration, zero additional LLM calls for dispatch**. 2. **Use local checks before AI steps.** Lint, type-check, or validate outputs with deterministic code before sending anything back to the model—this saves tokens on steps that don't need AI at all. 3. **Cache node results.** If a step succeeded, never re-run it. Graph-skill caches by content hash. 4. **Retry only the failed node and its dependents.** With a DAG, a failure in one parallel branch does not force you to re-run the whole job. If you tell me which agent platform you're using (Claude Code, Cursor, a custom Python loop, etc.), I can tailor the skill definition and the exact parallel-call syntax for that runtime.

Drag to resize
Drag to resize
Drag to resize
Drag to resize
Drag to resize