Cycle analysis of directed acyclic graph

From curiositech/windags-skills · View interactive version

Cycle analysis of directed acyclic graph is an AI agent skill from the GitHub repository curiositech/windags-skills. Analyze hierarchical DAG-like systems by separating undirected substrate from ordering metadata, then classifying diamonds, mixers, shortcuts, and hidden cycle structure. Use for workflow architecture, citation or genealogy DAG comparison, and information-flow diagnosis. NOT for ordinary cycle detec

How to use this skill

Skill file

Hierarchical Cycle Analysis

Use this skill when a system looks acyclic in its directed form, but you need to understand the hidden cycle structure that actually governs resilience, integration, and information flow.

When to Use

NOT for Boundaries

This skill is not the primary tool for:

Core Mental Models

DAG = Substrate + Ordering Metadata

The undirected substrate contains the real topology. The direction labels encode an external ordering constraint. "Acyclic" only means the directions respect the ordering; it does not mean the substrate lacks cycles.

Four Cycle Classes, Two That Matter Most

After the right contractions, cycles fall into four classes: feedback loops, shortcuts, diamonds, and mixers. In transitively reduced DAGs, the informative survivors are diamonds and mixers.

Transitive Reduction Reveals Essential Structure

Transitive reduction removes edges that add no new information path. It helps separate real organizational structure from shortcut clutter, but it is an analytical lens, not an automatic design prescription.

Antichains Give Hierarchical Coordinates

Antichains identify nodes that are incomparable under the ordering. They tell you where information is parallel, where it converges, and why a cycle behaves like a diamond or a mixer.

Topology Alone Cannot Explain Function

Two systems can have similar raw cycle counts but different information-processing behavior because the cycles sit at different heights, stretches, and source-sink relationships.

Decision Points

See the expanded visual inventory in diagrams/INDEX.md.

flowchart TD
  A[Hierarchical graph to analyze] --> B{Real ordering constraint present?}
  B -->|No| C[Use ordinary graph analysis instead]
  B -->|Yes| D[Separate undirected substrate from direction metadata]
  D --> E{Need essential structure?}
  E -->|Yes| F[Compute or reason about transitive reduction]
  E -->|No| G[Inspect full substrate cycles]
  F --> H[Classify diamonds and mixers]
  G --> I[Classify full cycle inventory]
  H --> J[Interpret resilience vs integration roles]
  I --> J

1. Decide Whether the Framework Applies

2. Decide Whether to Use Transitive Reduction

3. Decide What You Are Comparing

Failure Modes

1. Topology-Only Comparison

You compare hierarchies using degree, clustering, or raw cycle counts and miss the fact that cycle position in the ordering is what changes function.

2. Acyclic-Means-No-Cycles Confusion

You assume DAGs cannot contain meaningful cyclic organization. That collapses ordering constraints into topology and hides the very structure you are trying to study.

3. Shortcut/Diamond Conflation

You treat every alternative path as resilience. Some are eliminable shortcuts; others are genuinely informative parallel routes.

4. Ignoring Antichains

You describe hierarchy in terms of "layers" without checking incomparability structure. That loses the distinction between integration across levels and parallelism within a level.

5. Over-Reading the Model

You let the graph representation stand in for the full system, forgetting temporal dynamics, stochasticity, incentives, or external interventions that are outside the graph.

Worked Examples

Example 1: Workflow DAG with Apparent Redundancy

A multi-agent workflow graph looks over-connected. Using the substrate-plus-metadata lens shows that some extra edges are transitively reducible shortcuts, while a smaller set forms diamonds that preserve alternative recovery routes when one branch stalls. The redesign should prune shortcuts without destroying resilience.

Example 2: Citation Network vs. Genealogy

Two hierarchical networks have similar size and edge density. Raw graph metrics say they are close; cycle analysis shows one concentrates mixer structures high in the hierarchy while the other mostly has local diamonds. The first is integration-heavy, the second is redundancy-heavy, which explains different diffusion behavior.

Quality Gates

Reference Documentation

| File | Load when... |

| --- | --- |

| references/when-does-dag-analysis-apply.md | You need to check the boundary conditions before using this framework. |

| references/dag-decomposition-for-hierarchical-reasoning.md | You want the formal decomposition between substrate and ordering metadata. |

| references/four-cycle-classes-information-processing.md | You need the complete taxonomy and information-role interpretation of each cycle class. |

| references/transitive-reduction-information-minimization.md | You are deciding whether transitive reduction clarifies or oversimplifies the hierarchy. |

| references/antichains-and-hierarchical-coordinates.md | You need the antichain view for positioning cycles inside the hierarchy. |

| references/metadata-localizes-topology.md | Similar topologies behave differently and you need the metadata story. |

Anti-Patterns

Shibboleths

You have internalized this skill if you naturally ask:

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.