Logo van Investigation Dag Planner

Investigation Dag Planner

Community
AnthonyAlcaraz
investigation-dag-planner

Dynamic-DAG construction for a planning node (Ch5 Example 5-15 + the DevOps "Constructing the Investigation DAG" section). Given hypotheses/tasks with dependency constraints, compute a topological-level decomposition: each level is a phase of tasks that can run concurrently, ordered within-phase by priority. The estimated duration of a parallel phase is the MAX over its concurrent tests, and execution runs phase-by-phase with early termination once a hypothesis is confirmed. Detects dependency cycles as malformed plans. Use when a planning node must decide which work is parallel-safe and in what order — incident-investigation hypothesis testing, multi-track research, multi-party claim processing. NOT for purely linear pipelines (one task per level — annotation overhead exceeds benefit), NOT for runtime fault-isolation (that is event-driven orchestration), NOT for picking a model or pipeline shape (that is architecture selection).

Overzicht

UitgeverAnthonyAlcaraz
Repositoryagentic-graph-rag-skills
Skillnaaminvestigation-dag-planner
Sterren
29
Forks
9
Meegeleverde bestanden
3
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 3

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door AnthonyAlcaraz op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Investigation Dag Planner in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/reasoning-planning/investigation-dag-planner
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills.git /tmp/agentic-graph-rag-skills
mkdir -p .claude/skills
cp -r /tmp/agentic-graph-rag-skills/skills/reasoning-planning/investigation-dag-planner .claude/skills/investigation-dag-planner
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Investigation Dag Planner in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Investigation Dag Planner automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Investigation Dag Planner niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Investigation DAG Planner

Overview

Real investigation rarely follows a linear path. When multiple hypotheses exist, some can be tested in parallel while others have dependencies. Testing whether the database is overloaded and whether the payment service has memory pressure use different data sources — they can run simultaneously. But testing for a network partition between two services only makes sense after ruling out simpler explanations.

This is the dynamic-DAG-construction pattern (Example 5-15) applied to incident diagnosis. The planner:

  1. Analyzes dependencies between hypotheses/tasks.
  2. Identifies groups that can safely run in parallel (a topological level — the same computation bd ready performs in Beads, and parallel_groups in Example 5-15).
  3. Organizes them into phases. Within each phase, tasks are ordered by priority (the historically/structurally most-likely hypothesis first).
  4. Estimates each parallel phase's duration as the max of its concurrent tests, since they run concurrently — not the sum.

Execution then proceeds phase by phase with early termination: as soon as a hypothesis is confirmed with sufficient corroborating evidence, remaining phases are skipped. A dependency cycle raises CycleError — that is a malformed plan, surfaced rather than silently mis-executed.

In the DevOps latency investigation (account 123456789012), the checkout latency spike yields three hypotheses. The DAG groups db_pool_exhaustion and payment_memory_pressure into one parallel phase (different data sources); network_partition depends on ruling out the pool hypothesis, so it lands in a later phase. When the pool hypothesis confirms in the first phase, early termination skips the network-partition test entirely.

When to Use

  • A planning node must decide which tasks are parallel-safe and order phases
  • Incident-investigation hypothesis testing, multi-track research, multi-party claim processing (the chapter's multi-vehicle-accident example)
  • You want an explicit duration estimate and an auditable phase structure

Phrases: "construct an investigation DAG", "which hypotheses can run in parallel", "topological phases", "parallel groups", "early termination on confirmation", "task graph".

When NOT to Use

  • The work is genuinely linear (one task per level) — the DAG annotation overhead exceeds the benefit
  • You need runtime fault isolation / replay across distributed workers (that is event-driven orchestration, a different layer)
  • The decision is which model or pipeline shape to use (architecture selection)

Process

StepInputActionOutputVerification
1task rows (id, depends_on, duration_s, priority)lib.tasks_from_dicts(rows){id: Task} mapunknown-dep / self-dep raises before planning
2task maplib.topological_phases(tasks)list of levels (each a parallel group)every task appears once; deps land in an earlier level; cycle raises CycleError
3task maplib.build_investigation_dag(tasks)InvestigationDAG (phases, parallelism_factor, total/critical-path)parallel-phase duration == max of its tasks; total == sum of phase maxima
4dag + task map + test_fnlib.execute_with_early_termination(...)trace with confirmed id + phases_run/skippedonce confirmed, later phases are skipped

Rationalizations

Agent rationalizationDocumented rebuttal
"Just test every hypothesis sequentially — simpler."The chapter's whole point: parallel phases "slash latency" and early termination "can dramatically reduce investigation time." Independent hypotheses tested serially waste the parallel window.
"Sum the durations to estimate total time."Wrong for parallel phases. The chapter is explicit: "the estimated duration for a parallel phase is the maximum duration of its individual tests since they run concurrently." Summing within a phase over-estimates.
"Run all phases to be thorough."Early termination is the optimization: "As soon as a hypothesis is confirmed with sufficient corroborating evidence, there is no need to continue testing alternatives." Thoroughness past confirmation is wasted compute.
"A cycle just means re-run until it settles."A cycle is a malformed plan — there is no valid topological order. Surface it (CycleError) so the planner fixes the dependency, do not loop.

Red Flags

  • One giant phase with everything in it. No dependencies were extracted — either the task really is embarrassingly parallel, or the dependency extraction failed and you are about to test in an unsafe order.
  • Critical path == task count. Every task depends on the previous one; this is a linear pipeline wearing a DAG costume — use a sequential pipeline.
  • parallelism_factor == 0 on a multi-hypothesis investigation. The planner found no parallel-safe group; check that independent hypotheses were not given spurious dependencies.

Non-Negotiable Verification

  1. Run the benchmark battery. python cli.py benchmark must report:
    • independent tasks land in the same (first) phase
    • a dependent task lands strictly after its dependency
    • parallel-phase duration equals the max of its tasks; total equals sum of maxima
    • a cycle raises CycleError
    • early termination skips phases after a confirmation
    • within-phase ordering respects priority
  2. Verify CLI help. Exits 0 and prints the SKILL.md description.

Security Posture

  • Prompt injection. Task rows (ids, dependencies, priorities, durations) are data-only input, often LLM-proposed. The planner only sorts and groups them - nothing is executed here - but forged dependencies or inflated priorities can reorder an investigation to bury a hypothesis; malformed graphs surface as CycleError instead of silent mis-execution.
  • Data exfiltration. No network calls, no file writes. Hypothesis names and durations may describe internal infrastructure; they stay in-process and appear only in the stdout phase plan the caller owns.
  • Privilege escalation. No shell invocation, no eval. The DAG is a schedule, not an authorization: the harness that runs each phase's tests must still gate each action against the capability model (constraint-guided-plan-validator).

Source Attribution

Distilled from Agentic GraphRAG (O'Reilly, by Anthony Alcaraz and Sam Julien) Ch5 — Reasoning & Planning: "Dynamic DAG construction" (Example 5-15, GraphConstructingPlanningNode) and the DevOps agent's "Constructing the Investigation DAG" section (phases, max-duration parallel model, early termination on confirmation). The topological-sort framing connects to the chapter's "Task graphs at developer scale" (Beads bd ready).

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Investigation Dag Planner?

Dynamic-DAG construction for a planning node (Ch5 Example 5-15 + the DevOps "Constructing the Investigation DAG" section). Given hypotheses/tasks with dependency constraints, compute a topological-level decomposition: each level is a phase of tasks that can run concurrently, ordered within-phase by priority. The estimated duration of a parallel phase is the MAX over its concurrent tests, and execution runs phase-by-phase with early termination once a hypothesis is confirmed. Detects dependency cycles as malformed plans. Use when a planning node must decide which work is parallel-safe and in...

Waarom Investigation Dag Planner gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Investigation Dag Planner bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Investigation Dag Planner in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/reasoning-planning/investigation-dag-planner. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Investigation Dag Planner gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Investigation Dag Planner gebruiken?

Zoveel als je wilt. Je kunt Investigation Dag Planner gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Investigation Dag Planner gratis?

Ja. Deze skill is door AnthonyAlcaraz op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇