Expand description
Manager Daily Brief workflow contracts for labor-saving internal review.
The workflow starts from app-owned, source-grounded context and produces a deterministic packet that an agent may summarize or rank, but not use as authority to mutate schedules, provider/PMS records, customer channels, or money movement. Outcome records then capture whether the reviewed action actually reduced manager/front-desk labor.
use app::manager_daily_brief as brief;
use chrono::NaiveDate;
use domain::{analytics, entities, operations, source};
use uuid::Uuid;
let location_id = entities::LocationId(Uuid::from_u128(0x170));
let operating_day = operations::operating_day::Date::try_new(
NaiveDate::from_ymd_opt(2026, 6, 18).expect("fixture date is valid"),
)?;
let source_ref = source::RecordRef::new(
source::System::BusinessIntelligence,
source::record::Id::try_new("labor-read-model:boarding-demand:2026-06-18")?,
);
let demand_fact = analytics::service_demand::Fact::try_new(
analytics::service_demand::Id::try_new("boarding-demand-risk")?,
operations::operating_day::Key::new(
location_id,
operations::service_core::ServiceLine::Boarding,
operating_day,
),
analytics::service_demand::DemandUnits::try_new(42)?,
vec![source_ref.clone()],
analytics::ProjectionVersion::try_new("manager-brief-fixture-v1")?,
vec![],
)?;
let request = brief::Request::builder()
.location_id(location_id)
.operating_day(operating_day)
.prepared_for(brief::ManagerBriefPersona::GeneralManager)
.demand_attention_threshold(brief::DemandThresholdUnits::try_new(25)?)
.service_demand_facts(vec![demand_fact])
.build();
let packet = brief::Workflow::evaluate(request);
assert_eq!(packet.actions().len(), 1);
assert!(packet.all_actions_are_source_grounded());
assert!(packet.safe_agent_actions().contains(&brief::SafeAgentAction::RankManagerActions));
assert!(packet.blocked_actions().contains(&brief::BlockedAction::ChangeStaffSchedule));
assert!(packet.blocked_actions().contains(&brief::BlockedAction::MutateProviderOrPmsRecord));
assert!(packet.minutes_saved() > 0);
let outcome = brief::OutcomeRecord::builder()
.action_id(packet.actions()[0].id().clone())
.recorded_by(entities::ActorRef::Manager {
manager_id: entities::ManagerId::try_new("gm-fixture")?,
})
.outcome(brief::FeedbackOutcome::Completed)
.before_minutes(brief::LaborMinutes::try_new(45)?)
.actual_minutes(brief::LaborMinutes::try_new(12)?)
.source_record_refs(vec![source_ref])
.build();
assert!(outcome.records_feedback_without_external_mutation());
assert!(outcome.blocked_actions().contains(&brief::BlockedAction::SendCustomerMessage));
assert_eq!(outcome.actual_minutes_saved(), 33);Structs§
- Action
Id - Action
Rationale - Aggregate
Labor Minutes - Aggregate labor minutes carried by the manager daily brief workflow; it assembles reviewable manager brief packets from deterministic context and agent drafts.
- Brief
Action - Brief action carried by the manager daily brief workflow; it assembles reviewable manager brief packets from deterministic context and agent drafts.
- Brief
Action Builder - Use builder syntax to set the inputs and finish with
build(). - Brief
Summary - Demand
Threshold Units - Demand threshold units carried by the manager daily brief workflow; it assembles reviewable manager brief packets from deterministic context and agent drafts.
- Labor
Impact Estimate - Labor impact estimate carried by the manager daily brief workflow; it assembles reviewable manager brief packets from deterministic context and agent drafts.
- Labor
Minutes - Labor minutes carried by the manager daily brief workflow; it assembles reviewable manager brief packets from deterministic context and agent drafts.
- Outcome
Record - Outcome record carried by the manager daily brief workflow; it assembles reviewable manager brief packets from deterministic context and agent drafts.
- Outcome
Record Builder - Use builder syntax to set the inputs and finish with
build(). - Packet
- Reviewable packet handed to staff or agents with deterministic gates already applied.
- Request
- Input contract for building the workflow packet from source-grounded records.
- Request
Builder - Use builder syntax to set the inputs and finish with
build(). - Scoped
Checkout Packet - Scoped checkout packet carried by the manager daily brief workflow; it assembles reviewable manager brief packets from deterministic context and agent drafts.
- Scoped
Checkout Packet Builder - Use builder syntax to set the inputs and finish with
build(). - Scoped
Retention Packet - Scoped retention packet carried by the manager daily brief workflow; it assembles reviewable manager brief packets from deterministic context and agent drafts.
- Scoped
Retention Packet Builder - Use builder syntax to set the inputs and finish with
build(). - Source
Fact - Source fact carried by the manager daily brief workflow; it assembles reviewable manager brief packets from deterministic context and agent drafts.
- Source
Fact Builder - Use builder syntax to set the inputs and finish with
build(). - Workflow
- Workflow carried by the manager daily brief workflow; it assembles reviewable manager brief packets from deterministic context and agent drafts.
Enums§
- Action
IdError - Action
Rationale Error - Blocked
Action - Actions the agent must never perform without a human/operator system of record.
- Brief
Action Kind - Decision taxonomy for brief action kind in the manager daily brief workflow; each value carries operational meaning for source-grounded routing and review.
- Brief
Action Priority - Decision taxonomy for brief action priority in the manager daily brief workflow; each value carries operational meaning for source-grounded routing and review.
- Brief
Summary Error - Error
- Decision taxonomy for error in the manager daily brief workflow; each value carries operational meaning for source-grounded routing and review.
- Feedback
Outcome - Decision taxonomy for feedback outcome in the manager daily brief workflow; each value carries operational meaning for source-grounded routing and review.
- Manager
Brief Persona - Decision taxonomy for manager brief persona in the manager daily brief workflow; each value carries operational meaning for source-grounded routing and review.
- Removed
Manual Work - Decision taxonomy for removed manual work in the manager daily brief workflow; each value carries operational meaning for source-grounded routing and review.
- Safe
Agent Action - Review-safe agent tasks allowed to save staff time without crossing mutation or send boundaries.
- Source
Fact Kind - Decision taxonomy for source fact kind in the manager daily brief workflow; each value carries operational meaning for source-grounded routing and review.
Functions§
- requested_
side_ effect_ rejection_ reason - Produces the requested side effect rejection reason contract for the manager daily brief workflow.
Type Aliases§
- Result
- Result type returned by fallible manager daily brief operations.