Living Document Notice
Published 2026-09-17. The evolving architecture, revisions, and connected notes for this dispatch live in the Stax Digital Garden.
Directed Acyclic Graph Task Dependencies
Summary
Linear task lists obscure the critical path of complex technical projects. Trice structures task prerequisites as a directed acyclic graph (DAG), enabling automated topological sorting, unblocking triggers, and strict cycle detection across distributed markdown files.
The Myth of the Flat Priority Queue
Prioritizing tasks simply as P1, P2, or P3 ignores the reality of prerequisite dependencies. A P1 task cannot be executed if it depends on three unresolved P3 infrastructure tickets. Attempting to manage complex deliverables with linear ordering leads to constant rescheduling, stalled work streams, and cognitive friction.
Trice models task networks as directed acyclic graphs. Tasks declare both upstream requirements (waitingOnTask) and downstream commitments (blocksTask).
+-------------------------------------------------------------+
| Trice Topological Task Network |
| |
| +---------------------+ +---------------------+ |
| | TRC-1001: WAL Engine| ----> | TRC-1002: B-Tree | |
| | (Base Storage) | | (Index Layer) | |
| +---------------------+ +---------------------+ |
| │ │ |
| v v |
| +---------------------+ +---------------------+ |
| | TRC-1003: WASM Build| ----> | TRC-1004: End-to-End| |
| | (Compilation Pass) | | (Integration Tests) | |
| +---------------------+ +---------------------+ |
+-------------------------------------------------------------+
Dependency Graph Predicates
Relationships between tasks are defined using explicit URN links in the $pkm.relations block:
$pkm:
id: "urn:uuid:0191fa30-3001-7000-8000-000000000004"
realm: trice
relations:
waitingOnTask:
- "urn:trice:task:0191fa30-3001-7000-8000-000000000002"
- "urn:trice:task:0191fa30-3001-7000-8000-000000000003"When all targets in waitingOnTask reach completed, the Trice scheduler automatically transitions the dependent task from blocked to pending, signaling to the operator that work may commence.
Cycle Detection Algorithm
Circular dependencies (Task A -> Task B -> Task A) freeze workflows indefinitely. Trice validates the dependency graph using Tarjan’s strongly connected components algorithm or depth-first cycle traversal on every vault rebuild:
pub fn detect_dependency_cycle(graph: &HashMap<String, Vec<String>>) -> Result<(), Vec<String>> {
let mut visited = HashSet::new();
let mut on_stack = HashSet::new();
let mut path = Vec::new();
for node in graph.keys() {
if !visited.contains(node) {
if has_cycle(node, graph, &mut visited, &mut on_stack, &mut path) {
return Err(path);
}
}
}
Ok(())
}If a cycle is detected, the linter emits an immediate pre-flight warning and halts automated state promotion, displaying the exact dependency loop to the operator.
Critical Path Evaluation
By assigning estimated durations to each task node, Trice calculates the longest path through the graph:
Critical Path: TRC-1001 (120m) -> TRC-1002 (180m) -> TRC-1004 (60m) = 360m Total
Slack Path: TRC-1003 (45m) [Float: 255m]This computation allows the operator to focus physical and mental energy strictly on tasks that directly control delivery timelines, ignoring non-blocking peripheral work.
- Directus Target: trice
- Garden Source Reference: MOC - Bosun PKM Tools, MOC - Fleet Operations
- Garden Source Reference: [TRC-1002 - Directed Acyclic Graph Task Dependencies](TRC-1002 - Directed Acyclic Graph Task Dependencies)