pub enum Kind {
Spinoff,
Research,
TechnicalDecision,
FanOut,
Unknown,
}Expand description
The run/node kind enum (design.md §1.2).
The 0.2 subtractive cut removed the code, orchestrate, orchestrated,
bugfix, and make-skill kinds (the interactive + DAG-driver topologies and
the two phantom variants that were behaviourally Spinoff). The surviving
kinds are all autonomous. Kind::Unknown is a read-only catch-all so a
legacy on-disk run recorded under a since-removed kind still deserializes —
doctor / run list report it, never delete it (ADR §D7).
Variants§
Spinoff
Autonomous fire-and-forget task that merges itself back (/worktree-spinoff).
Research
Autonomous multi-source research worktree (/worktree-research).
TechnicalDecision
Drives one architectural decision to an ADR (/worktree-technical-decision).
FanOut
Parallel fan-out of many identical units (/fan-out).
Unknown
A kind this build no longer models — a legacy run recorded on disk under a
kind removed in the 0.2 cut (code / orchestrate / orchestrated /
bugfix / make-skill), or any future/unknown wire value. Read-only:
#[serde(other)] maps every unrecognized kind here so doctor / run list can still surface such a run rather than faulting on it (ADR §D7).
It is NEVER a creatable kind — it is absent from Kind::WIRE_NAMES, so
no CLI surface or report validator accepts it as input.
Implementations§
Source§impl Kind
impl Kind
Sourcepub const WIRE_NAMES: &'static [&'static str]
pub const WIRE_NAMES: &'static [&'static str]
Every creatable kind’s kebab-case wire name, in declaration order.
Single source of truth for “the set of accepted kinds” — see
Kind::wire_name. Excludes Kind::Unknown, which is a read-only
catch-all, never a valid input.
Sourcepub const fn wire_name(self) -> &'static str
pub const fn wire_name(self) -> &'static str
The kebab-case wire name for this kind — the same string serde
(de)serializes via rename_all = "kebab-case".
The exhaustive match is deliberate: adding a Kind variant fails
to compile until its wire name is listed here, so Kind::WIRE_NAMES
and any caller that advertises the accepted kinds (e.g. the report
validator’s expected hint) cannot silently drift from the enum.
Sourcepub fn lifecycle(self) -> Lifecycle
pub fn lifecycle(self) -> Lifecycle
Default how-run Lifecycle for a kind — the value a run gets when
created WITHOUT --interactive. Every kind defaults to autonomous; the 0.2
cut removed the code kind that used to imply interactivity, so
interactivity is no longer kind-derived — it is the explicit --interactive
flag (Lifecycle docs, design.md §2/§6). This method only seeds the
default; it must NOT be read as “this kind is (non-)interactive”.
Kind::Unknown (a legacy on-disk run) reads as autonomous too; it is
never freshly supervised, so the value only ever feeds read-only display.
Sourcepub fn is_autonomous_single_node_worker(self) -> bool
pub fn is_autonomous_single_node_worker(self) -> bool
Whether this kind is a top-level, single-node, autonomous worker —
one detached agent that materializes its own worktree and self-merges,
with no children and no parent DAG driving it. These are exactly the
kinds eligible for the supervisor’s bounded auto-retry on an empty-handed
agent-died (issue autoretry-agent-died-worker).
Excludes FanOut (a multi-unit driver — its driver node has no agent of
its own) and Kind::Unknown (a legacy on-disk run, never freshly
supervised).
The exhaustive match fails to compile when a new Kind is added, forcing
a deliberate eligibility decision rather than a silent default.