gunk-dev/the-valley

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

source0d936ef425c5main's published tip history
4.4 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 as
13_production_ — the result of computing and satisfying a DAG. But DAGs and event-based systems have
14very different topologies and control flow. The question: can the two be woven naturally, or not?
15
16## What about the SDLC is DAG-shaped
17
18An existing build target has an a priori DAG: a transitive closure of inputs that produce the thing
19that meets some behavior requirement. Development is the process of manifesting the DAG of a root
20node in the future whose spec is yet to be satisfied. A build is a completed development — the same
21DAG seen after the fact. The development process does not look like a DAG while it runs because the
22missing structure is not known yet, not because the work has a different shape; the engine must
23suspend and resume as structure appears rather than plan-then-execute ("Build Systems à la Carte"
24studies exactly this axis).
25
26Two kinds of compute do the manifesting. Deterministic compute executes code that exists. Neural
27compute — human or LLM agents — manifests the missing deterministic instructions in the stack. While
28the root node does not satisfy its requirements, neural nodes produce the elements needed to
29deterministically produce a satisfying artifact. The formal signature: deterministic nodes are
30graph-preserving (they execute known edges); neural nodes are graph-extending (their output is new
31graph structure). A neural node's end goal is to put itself out of business, automating as much as
32it can with deterministic nodes — the graduation policy ([[dcr-74c3158]],
33[dcr-74c3158-valley-cli-lifecycle.md](../decisions/dcr-74c3158-valley-cli-lifecycle.md)) generalized
34to all neural work.
35
36Pressure ([[ida-3145b7a]], [ida-3145b7a-demand-pressure.md](./ida-3145b7a-demand-pressure.md)) is
37the engine: the system always trying to unblock stalls in the realization of the future DAG. The
38root's behavior requirement is what makes "not yet satisfied" decidable, so pressure has a gradient;
39the conformance-suite move ([[ida-4557af7]],
40[ida-4557af7-spec-driven-iteration.md](./ida-4557af7-spec-driven-iteration.md)) is the same
41requirement seen from the spec side.
42
43## The weave
44
45Events at the boundary, the DAG explicit in the middle, levels underneath — the shape k8s,
46incremental build systems, and Excel share. Events never drive work; they _invalidate_ observed
47state. The knowledge graph holds the dependency structure, queryable at rest, and a level-triggered
48reconciler compares demand against observation and pulls the frontier. An event only makes the
49reconciler look sooner; the absence of events never means the absence of pressure. The anti-pattern
50is reaction chains that encode the DAG implicitly in event wiring — the failure "a log, not a
51workflow engine" ([architecture.md](../../design/architecture.md)) guards against.
52
53Incidents fit inside the model: an incident is an event invalidating the observed satisfaction of an
54already-satisfied root, and pressure resumes. Cycles fit too: review→revise→review is cyclic, but
55the artifact dependency structure is acyclic at any instant — versioning turns cycles into spirals,
56the 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, cosmo).
64Perhaps no innovation is needed there — undecided. The Terraform ban does not settle it: the ban
65indicts statefulness and the configuration language, not DAGishness, and a reconciler might still
66need 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)).