Outcome Driven Development (ODD) (CEM-004)¶
For context, refer to ODD - Outcome Driven Development.
State Machine (CEM-004-000)¶
Specification¶
The manifest specifies a formal, human-and-machine-readable language for defining the artifacts of intent — desired outcomes and the processes to achieve them — using state machines.
Language Requirements¶
Defined using a structured format (e.g., YAML or JSON).
Capable of representing states, transitions, events, and side effects.
Includes mechanisms for defining success criteria (outcomes).
Designed for tool support, enabling generation of visual diagrams and executable boilerplate code.
The formalism favors machine-centric expression to improve prompts to coding agents.
Human-Centric (Sub-optimal for Agents)¶
The trial site starts in the 'Setup' phase. Once we get the IRB approval,
we can move to 'Ready.' However, we also need the initial drug batch to
arrive. When both are done, the site becomes 'Active.' If the site fails
the safety audit at any point, we have to move it to 'Suspended' and it
might need to go back to 'Setup' or stay 'Suspended' indefinitely.
Algebraic/Machine-Centric (Optimized for Agents)¶
system_id: PHARMA_CLINICAL_ENROLL_01
graph_type: [DIRECTED, ORIENTED, CYCLIC]
formalism: DETERMINISTIC_FINITE_AUTOMATA
states:
- id: SITE_IDENTIFIED
type: INITIAL
- id: REGULATORY_PENDING
type: INTERMEDIATE
- id: LOGISTICS_TRANSIT
type: INTERMEDIATE
spatial_mapping: EUCLIDEAN
coordinates_target: [42.3601, -71.0589] # Site Location
- id: SITE_ACTIVE
type: SUCCESS_OUTCOME
criteria:
- $REF(REGULATORY_APPROVAL == TRUE)
- $REF(DISTANCE_TO_TARGET < 0.1km)
- id: SITE_SUSPENDED
type: TERMINAL_FAILURE
transitions:
- event: INITIATE_VETTING
from: SITE_IDENTIFIED
to: REGULATORY_PENDING
side_effects: [NOTIFY_IRB, ALLOCATE_BUDGET]
- event: IRB_APPROVE
from: REGULATORY_PENDING
to: LOGISTICS_TRANSIT
condition: "payload.approval_hash != null"
- event: SHIPMENT_ARRIVAL
from: LOGISTICS_TRANSIT
to: SITE_ACTIVE
guard: "euclidean_dist(current_pos, target_pos) <= threshold"
outcome_delta: +1.0_ENROLLED_SITE
- event: SAFETY_AUDIT_FAIL
from: "*" # Any state
to: SITE_SUSPENDED
side_effects: [HALT_PATIENT_RECRUITMENT, TRIGGER_COMPLIANCE_ALARM]
cycles:
- allowed: [SITE_SUSPENDED, SITE_IDENTIFIED] # Remediation path
State Machine Requirements¶
The state machine may be deterministic or nondeterministic and represented by acyclic, cyclic, oriented, or non-oriented graphs. Where applicable, the state machine can also be represented by a Euclidean graph.
ODD State Machine Schema (CEM-004-001)¶
Specification¶
The current draft schema for the ODD state machine definition is documented in the following file: File.
Schema Elements¶
Element |
Description |
Example |
|---|---|---|
outcome_id |
Unique identifier for the outcome process |
UserOnboardingProcess |
start_state |
The initial state |
INITIATED |
states |
A map of all possible states |
VERIFIED, PROFILE_SETUP |
transitions |
Rules for moving between states, triggered by events |
INITIATED -> VERIFIED on event EMAIL_CONFIRMED |
success_criteria |
Condition(s) that define a successful outcome |
state == ‘PROFILE_SETUP’ |
The team will hold a follow-up meeting to finalize the ODD language specification and agree on a timeline for implementation. The meeting is scheduled for Date. Join the meeting here: Calendar event.