gunk-dev/the-valley

ida-eac723e-outcome-dag.md

sourcedfa994caaeb3main's published tip history
6.1 KiB · Rendered
1---
2type: idea
3id: ida-eac723e
4status: adopted
5title: "Schedule work from outcomes and their dependencies"
6created: 2026-07-02
7source: PR #1
8---
9
10# Schedule work from outcomes and their dependencies
11
12An outcome states something the project wants to achieve. Outcomes can depend on other outcomes. A
13scheduler could use that graph to identify ready work, prioritize it, and dispatch the people or
14agents able to complete it.
15
16This adopted sketch connects the knowledge graph to execution. Software development is the first
17application; the proposed scheduling structure can also represent other work with explicit
18dependencies and completion evidence.
19
20The [architecture](../../design/architecture.md#work-from-outcomes-and-dependencies) carries the
21high-level commitment. This node supplies the reasoning and candidate mechanics.
22
23## Dependencies and completion
24
25The graph already represents blockers through `blocked_by`. The scheduler would read active outcomes
26as requested work, rather than requiring a separate manually maintained task queue.
27
28An outcome such as shipping a feature might depend on implementation and documentation.
29Implementation might in turn depend on resolving an authentication defect. Work begins with the
30dependencies that can proceed.
31
32[[dcr-593d3d1]](../decisions/dcr-593d3d1-ideas-are-transitional.md) defines which node states clear
33a blocker. Decisions, ideas, bugs, and other outcomes can all block work. A blocker becoming
34terminal removes the mechanical block; the parent may still need reassessment when a prerequisite
35was abandoned rather than fulfilled.
36
37The current graph stores status changes in commits. Completion of code work and its outcome update
38can therefore be integrated together. Candidate conveniences such as `closes`, reverse `blocks`
39edges, and completion events are not all part of the current schema. Any automation they enable must
40preserve the same integration path.
41
42## Priorities and ready work
43
44Active root outcomes carry the requested priority. A dependency inherits the highest priority of the
45roots that need it.
46
47The **frontier** is the set of unfinished outcomes whose blockers have cleared. The proposed
48scheduler selects from that set, favoring work that advances the highest-priority roots.
49
50Critical-path scheduling would also need enough information about dependencies and task duration to
51identify which work delays completion. Priority propagation alone does not provide a duration
52estimate.
53
54| Concept | Meaning |
55| ------------------ | ---------------------------------------------------------------------- |
56| Root outcome | A requested result from which demand and priority begin |
57| Effective priority | The highest priority inherited from a root that needs the outcome |
58| Frontier | Unfinished outcomes with no remaining mechanical blockers |
59| Critical path | A dependency chain determining the earliest completion of a root |
60| Completion | An accepted state change recording that the outcome's criteria are met |
61
62## Dispatch and reconciliation
63
64A scheduler controller observes node changes and recomputes readiness and priority.
65[[ida-b48bded]](ida-b48bded-production-dags-and-events.md) refines this into continuous
66reconciliation: events prompt a refresh, while current graph and run state determine what work
67remains.
68
69Dispatch must be idempotent per outcome. Repeated observations must not create several runs for the
70same claimed work.
71
72The sketch proposes recording the claim and run association on the outcome before execution begins.
73Only unclaimed, open frontier work would be eligible. The current status spelling is `in-progress`;
74run association, leases, and an atomic claim protocol still need a concrete schema and
75implementation.
76
77A dead run must eventually release its claim or be detected as stale.
78[[ida-3145b7a]](ida-3145b7a-demand-pressure.md) explores leases, redispatch, and escalation.
79
80Budgets and loop limits must bound repeated attempts.
81[[bd-5cb2034]](../bugs/bd-5cb2034-unbounded-loops-under-demand-pressure.md) examines cumulative
82limits, and [[bd-c4d069b]](../bugs/bd-c4d069b-git-churn-from-task-state.md) examines the cost of
83frequent coordination writes to Git. The graph makes readiness queryable; it does not by itself
84solve those operational problems.
85
86## Human attention
87
88Scheduling answers what work should proceed next. Attention routing also asks which completed work,
89failures, and reports a person should see.
90
91A human decision that blocks an outcome can be scheduled as a request for attention, as proposed in
92[[ida-3145b7a]](ida-3145b7a-demand-pressure.md). The broader notification and review problem remains
93open in [openquestions.md](../../design/openquestions.md).
94
95## Outcomes and bugs
96
97An outcome is a unit of work with completion criteria. A bug records a problem that may motivate one
98or several outcomes.
99
100Their lifecycles remain distinct. Completing one repair outcome should not automatically close a bug
101if other required repair work remains.
102
103The sketch proposes explicit relationships such as `motivates` and `motivated_by`. A controller
104could use them to propose closing a bug when all required outcomes are complete. Those edges and
105that behavior still need implementation; status edits must pass through integration.
106
107This preserves the distinction between explaining a problem and scheduling the work needed to
108address it.
109
110## Broader use
111
112The scheduler's dependency traversal does not require a code artifact. Booking tickets after a
113budget is approved has a similar dependency structure to implementing a feature after a design
114decision.
115
116Each domain still needs suitable permissions, completion evidence, and handling of changing
117circumstances. The structure can be reused without assuming those details are identical.
118
119[[ida-8482624]](ida-8482624-federation-groups.md) describes the valley and federation context.
120[[dcr-2113c52]](../decisions/dcr-2113c52-pr1-relanding.md) records this sketch's place in the
121documentation, and [user-scenarios.md](../../design/user-scenarios.md) determines when detailed
122scheduling work becomes a priority.