# The Waterline — an algorithmic philosophy

*A generative movement for the directed acyclic graph. Companion to [`../dag-phenomenology.md`](../dag-phenomenology.md).*

## The movement

**The Waterline** renders only the moving edge of the computable. It refuses the temptation every graph drawing gives in to — the urge to show you the whole structure at once, the affordance you can never actually hold — and instead draws the one thing the hand ever truly grasps: the frontier, the set of nodes whose every predecessor is done, advancing across a dark and layered sea like a tide coming in. Behind the waterline, settled history. Ahead of it, the locked dark. The piece is not a picture of a dependency graph; it is the *experience* of standing at a graph's leading edge, where the next thing has just become possible and is asking, in the plainest voice, to be picked up.

## How it moves

The algorithm builds a real partial order, not a decorative network. Nodes are dealt into ranks; edges are drawn only from a lower rank to a strictly higher one, so the figure is acyclic by construction — every arrow a one-way membrane, irreversibility made visible. Each node is then re-layered by its **longest path from a source** (the honest rank), arranged within its column to quiet the crossings, and handed to **Kahn's algorithm**, which removes the in-degree-zero set wave after wave. A small, exact identity organizes the whole composition: *a node's Kahn wave equals its longest-path rank*. The frontier advancing wave by wave and the waterline sweeping left to right across the layers are not two motions choreographed to agree — they are provably the same motion. Nothing here is faked against a timeline; the timeline is the topology.

## What it makes visible

Three felt truths, each earned in code rather than captioned. **The frontier**: a soft risen-water region with a ragged tideline, the ready nodes glowing on the rim while the done dim to calm and the locked wait in the dark — *you hold only the frontier, never the sea*. **The cone**: because a closed ring around a node would be the one thing acyclicity forbids, the only honest encircling is the double cone of light — backward through the full set of ancestors, forward through all descendants, computed as true reverse and forward reachability from a focus node. **Width and depth**: the widest rank is the graph's breath, the parallelism you can spend hands against; the critical path is its spine of fate, the longest chain no amount of help can shorten — drawn heavier and warmer, the bedrock you can only endure. By Dilworth's theorem these two measurements are the exact exchange rate between room and duration.

## The quiet confession

One element stays nearly invisible unless you go looking for it: the cut. A DAG is not what the world hands you; it is what remains after the cycles are removed. The piece keeps, dimmed almost to nothing and revealable by a single toggle, the ghost of a return edge — the loop that was always there, severed so the structure could be sorted and called calm. The serenity of the whole image is real, and it was bought.

## On craftsmanship and seed

This is meant to read as the product of careful work: a small, considered palette where light is earned against ink rather than sprayed across the frame; a strict motion budget where the tide breathes and almost nothing else stirs; flat geometry, no skeuomorphic glow, calm over busy. Every run is reproducible from a single seed — and the seed control is the quiet center of the idea. A topological sort proves only that *a* legal ordering exists, never which one is true; most graphs hold millions, superimposed. Each seed you summon is one legal flattening of many. Change it and the sea rearranges, the tide comes in again, and a different — equally honest — version of the order reveals itself.
