class MaxisCelcomDigiClosedLoopPilot < BaseAgent contract "doil.operationsContract/v1" do file "maxis-celcomdigi-closed-loop-pilot.doil" title "Maxis and CelcomDigi closed-loop growth pilot" exposure :public_blueprint, visibility: :public, sensitive: false, recipients: [:noc_automation_reviewer, :growth_operations_reviewer] execution :one_shot, handler: :run_closed_loop_pilot, max_cycles: 1, concurrency: 1, failure_policy: :stop_and_escalate, approval: :human_required_before_entrypoint portability :noc_agent, :rpa, :runbook, :workflow, :agentic test_clock "2026-08-09T16:00:00.000Z" objective "OBJ-MY-GROWTH-001", criticality: :required, derived_from: ["desk://block/blk_uglyc662t", "desk://block/blk_obhqpout2", "desk://block/blk_yaedqwk7i", "desk://run/run_xWQaFl_omHW-NOvaEQ4PJ"] end intent "Operate two separate, consented 12-week closed-loop growth pilots for Maxis Malaysia and CelcomDigi, each capped at 10,000 relationships, with no price or catalog writes and with service-readiness gates before cohort release or later scale-up." context do require geography: "Malaysia; separate Maxis Malaysia and CelcomDigi pilot footprints" require technology: "Existing operator mobile and fixed access; no technology change" require link: "Existing operator service-activation and consented customer-contact paths" require system: "Existing operator-specific CRM, ordering, activation and assurance paths; receiver resolves live endpoints before execution" require event: "Twelve-week readiness-gated closed-loop growth pilot" require user: "Human growth operations owner" require nodes: ["maxis-malaysia-pilot-cohort", "celcomdigi-pilot-cohort"] require time: { starts_at: "2026-08-10T00:00:00+08:00", ends_at: "2026-11-02T23:59:59+08:00" } require cohort_limit_per_operator: 10000 require consent_required: true require provisioning_completion_min: 0.98 require risk_churn_max: 0.02 require coverage_setting_min: 75 require capacity_headroom_min: 0.15 require capacity_pressure_max: 0.85 require operator_data_isolation: "No shared customer-level data pool" require price_and_catalog_writes: "forbidden" require automatic_scale_up: "forbidden" require assurance_destination: "Operator-specific manual assurance queues" end tools do validate_pilot_readiness description: "Read consent, eligibility, order, provisioning, coverage, capacity and endpoint readiness without reopening the investigation.", effect: "read", vendor_op: "receiver_owned", parameters: ["nodes", "system", "consent_required", "provisioning_completion_min", "coverage_setting_min", "capacity_headroom_min", "capacity_pressure_max"] configure_isolated_growth_workflows description: "Configure separate acquisition, onboarding, retention, recovery and win-back workflows for Maxis and CelcomDigi within the approved boundaries.", effect: "external_change", vendor_op: "receiver_owned", parameters: ["nodes", "cohort_limit_per_operator", "operator_data_isolation", "price_and_catalog_writes"] release_consented_cohorts description: "Release the two operator-isolated pilot cohorts only after human approval of the readiness packet.", effect: "external_change", vendor_op: "receiver_owned", parameters: ["nodes", "cohort_limit_per_operator", "time"] submit_accepted_pilot_orders description: "Submit only accepted pilot orders through each operator's existing activation path.", effect: "external_change", vendor_op: "receiver_owned", parameters: ["nodes", "system"] start_closed_loop_messages_and_recovery description: "Start consented customer messages and service-recovery branches for released cohort members.", effect: "external_change", vendor_op: "receiver_owned", parameters: ["nodes", "consent_required"] observe_pilot_outcomes description: "Read separate weekly active relationships, net adds, churn, provisioning and service-readiness outcomes; return failed on consent breach, duplicate contact, missing or pooled outcomes, or any threshold failure.", effect: "read", vendor_op: "receiver_owned", parameters: ["nodes", "assurance_destination", "risk_churn_max", "provisioning_completion_min", "coverage_setting_min", "capacity_headroom_min", "capacity_pressure_max"] stop_and_rollback_pilot description: "On failed verification, freeze new intake, stop new messages, cancel only unsubmitted or unaccepted pilot orders, honor issued commitments, and route accepted orders and exceptions to operator-specific manual assurance.", effect: "external_change", vendor_op: "receiver_owned", parameters: ["nodes", "system", "assurance_destination"] end guardrails do pre_execution do require :approval end during_execution do max_changes 20000 end end output do stage :readiness do generate :operator_readiness_packet present :consent_eligibility_provisioning_coverage_capacity_and_endpoint_status end stage :workflow_configuration do generate :isolated_workflow_configuration_receipt present :operator_isolation_and_exact_boundary_match require :approval end stage :pilot_release do generate :cohort_release_and_activation_receipt present :released_cohorts_orders_messages_and_exceptions require :approval end stage :week_12_close do generate :separate_operator_outcome_packet present :weekly_growth_churn_provisioning_and_service_readiness require :approval end end def run_closed_loop_pilot preconditions = tools.validate_pilot_readiness.apply(:nodes) if preconditions.ready result = tools.configure_isolated_growth_workflows.apply(:nodes) result_2 = tools.release_consented_cohorts.apply(:nodes) result_3 = tools.submit_accepted_pilot_orders.apply(:nodes) result_4 = tools.start_closed_loop_messages_and_recovery.apply(:nodes) verification = tools.observe_pilot_outcomes.apply(:nodes) if verification.failed tools.stop_and_rollback_pilot.apply(:nodes, result) end end end end