gunk-dev/the-valley

ida-b48bded-production-dags-and-events.md

source6823e38e3ee5main's published tip history
4.3 KiB · Rendered
1---
2type: idea
3id: ida-b48bded
4status: exploring
5title: "Outcomes as production: can DAGs and events weave?"
6created: 2026-07-16
7source: design conversations, 2026-07-16/17
8---
9
10# Outcomes as production: can DAGs and events weave?
11
12A central pillar of the architecture is a bet to be tested: most valuable outcomes can be modeled
13as *production* — the result of computing and satisfying a DAG. But DAGs and event-based systems
14have very different topologies and control flow. The question: can the two be woven naturally, or
15not?
16
17## What about the SDLC is DAG-shaped
18
19An existing build target has an a priori DAG: a transitive closure of inputs that produce the thing
20that meets some behavior requirement. Development is the process of manifesting the DAG of a root
21node in the future whose spec is yet to be satisfied. A build is a completed development — the same
22DAG seen after the fact. The development process does not look like a DAG while it runs because the
23missing structure is not known yet, not because the work has a different shape; the engine must
24suspend and resume as structure appears rather than plan-then-execute ("Build Systems à la Carte"
25studies exactly this axis).
26
27Two kinds of compute do the manifesting. Deterministic compute executes code that exists. Neural
28compute — human or LLM agents — manifests the missing deterministic instructions in the stack.
29While the root node does not satisfy its requirements, neural nodes produce the elements needed to
30deterministically produce a satisfying artifact. The formal signature: deterministic nodes are
31graph-preserving (they execute known edges); neural nodes are graph-extending (their output is new
32graph structure). A neural node's end goal is to put itself out of business, automating as much as
33it can with deterministic nodes — the graduation policy ([[dcr-74c3158]],
34[dcr-74c3158-valley-cli-lifecycle.md](../decisions/dcr-74c3158-valley-cli-lifecycle.md))
35generalized to all neural work.
36
37Pressure ([[ida-3145b7a]], [ida-3145b7a-demand-pressure.md](./ida-3145b7a-demand-pressure.md)) is
38the engine: the system always trying to unblock stalls in the realization of the future DAG. The
39root's behavior requirement is what makes "not yet satisfied" decidable, so pressure has a
40gradient; the conformance-suite move ([[ida-4557af7]],
41[ida-4557af7-spec-driven-iteration.md](./ida-4557af7-spec-driven-iteration.md)) is the same
42requirement seen from the spec side.
43
44## The weave
45
46Events at the boundary, the DAG explicit in the middle, levels underneath — the shape k8s,
47incremental build systems, and Excel share. Events never drive work; they *invalidate* observed
48state. The knowledge graph holds the dependency structure, queryable at rest, and a level-triggered
49reconciler compares demand against observation and pulls the frontier. The anti-pattern is reaction
50chains that encode the DAG implicitly in event wiring — the failure "a log, not a workflow engine"
51([architecture.md](../../design/architecture.md)) guards against.
52
53Incidents fit inside the model: an incident is an event invalidating the observed satisfaction of
54an already-satisfied root, and pressure resumes. Cycles fit too: review→revise→review is cyclic,
55but the artifact dependency structure is acyclic at any instant — versioning turns cycles into
56spirals, the same move changes-not-branches makes ([[ida-93e4f91]],
57[ida-93e4f91-changes-not-branches.md](./ida-93e4f91-changes-not-branches.md)).
58
59## The residue, undecided
60
61Standing obligations — infrastructure, long-lived services, timers — have no terminal "satisfied"
62state; their specs quantify over time. Production claims demanded, terminating work; the standing
63layer is delegated to level-triggered convergence, which this stack already runs (armstrong,
64cosmo). Perhaps no innovation is needed there — undecided. The Terraform ban does not settle it:
65the ban indicts statefulness and the configuration language, not DAGishness, and a reconciler might
66still need to compute all the dependencies of, for example, a service to cleanly instantiate it.
67
68Phase 5 (effectful reactions, [roadmap.md](../../design/roadmap.md)) is where this resolves in
69practice: reconciler-against-the-graph, or reaction chains. Deciding early is cheap; refactoring
70Phase 5 later is not.
71
72Extends the outcome-DAG bet ([[ida-eac723e]],
73[ida-eac723e-outcome-dag.md](./ida-eac723e-outcome-dag.md)).