Skip to main content

Declared cognitive time — `now:` on a step and its context frame

Primitives used: context · flow · step · run

// A scheduling agent MUST know what time it is — but "the server's local
// time", string-interpolated by hand into every ask:, is the ambient,
// unrecorded clock read `time_is_an_explicit_input` forbids. v2.46.0 makes the
// need declarative: the frame (or a single step) states its zone, the
// runtime supplies the instant, the envelope records the replay triple.

type VisitPlan { slots: String }

// Frame-level: every step running within this context carries the run's
// captured instant, rendered in Bogotá time.
context Scheduling {
depth: standard
now: "America/Bogota"
}

flow ScheduleVisit() -> VisitPlan {
step Triage {
ask: "Propose three visit slots this week, during business hours."
output: VisitPlan
}
// Step-level override: THIS step reasons in UTC (e.g. an upstream
// system speaks UTC timestamps). Same captured instant, different
// rendering — two steps in one run never disagree about "now".
step ConfirmUpstream {
given: Triage.output
now: "UTC"
ask: "Emit the upstream confirmation payload with UTC timestamps."
output: VisitPlan
}
return ConfirmUpstream.output
}

run ScheduleVisit() within Scheduling