From 7a64474106b23f2f7e7a7407968db4a78b40c452 Mon Sep 17 00:00:00 2001 From: geobelsky Date: Wed, 18 Mar 2026 18:38:50 +0000 Subject: [PATCH] feat: add scenario examples for all 7 human task types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New examples under examples/human/: - review/ — code review with 3-way outcome (approved/changes_requested/rejected) - clarification/ — structured data request with form_schema - manual-action/ — physical inspection with evidence_required - confirmation/ — DNS propagation verification - assignment/ — P1 incident commander designation with form - override/ — emergency deploy override with required_comment Each scenario demonstrates the task_type field and type-specific configuration (form_schema, evidence_required, required_comment). Co-Authored-By: Claude Opus 4.6 (1M context) --- examples/human/assignment/scenario.json | 75 ++++++++++++++++++++++ examples/human/clarification/scenario.json | 75 ++++++++++++++++++++++ examples/human/confirmation/scenario.json | 58 +++++++++++++++++ examples/human/manual-action/scenario.json | 62 ++++++++++++++++++ examples/human/override/scenario.json | 60 +++++++++++++++++ examples/human/review/scenario.json | 58 +++++++++++++++++ 6 files changed, 388 insertions(+) create mode 100644 examples/human/assignment/scenario.json create mode 100644 examples/human/clarification/scenario.json create mode 100644 examples/human/confirmation/scenario.json create mode 100644 examples/human/manual-action/scenario.json create mode 100644 examples/human/override/scenario.json create mode 100644 examples/human/review/scenario.json diff --git a/examples/human/assignment/scenario.json b/examples/human/assignment/scenario.json new file mode 100644 index 0000000..68a39c0 --- /dev/null +++ b/examples/human/assignment/scenario.json @@ -0,0 +1,75 @@ +{ + "scenario_id": "human.assignment.v1", + "title": "Assignment — designate incident commander for P1", + "description": "An automated triage agent classifies an incident as P1 severity. The workflow pauses for the on-call manager to designate an incident commander who will own the resolution.", + + "agents": [ + { + "role": "triage", + "address": "incident-triage-agent", + "display_name": "Incident Triage Agent", + "delivery_mode": "stream", + "create_if_missing": true + } + ], + + "humans": [ + { + "role": "oncall_manager", + "display_name": "On-Call Manager" + } + ], + + "workflow": { + "steps": [ + { + "step_id": "triage_incident", + "tool_id": "tool.agent.task.v1", + "assigned_to": "triage", + "step_deadline_seconds": 30 + }, + { + "step_id": "assign_commander", + "tool_id": "tool.approval.human_signoff", + "assigned_to": "oncall_manager", + "requires_approval": true, + "step_deadline_seconds": 900, + "remind_after_seconds": 300, + "remind_interval_seconds": 300, + "max_reminders": 2, + "human_task": { + "title": "Assign incident commander — P1: Payment processing outage", + "description": "Incident INC-2026-0431 classified as P1. Customer-facing payment processing is down. Please designate an incident commander.", + "task_type": "assignment", + "notify_email": "oncall-manager@example.com", + "form_schema": { + "type": "object", + "required": ["assignee_email"], + "properties": { + "assignee_email": { + "type": "string", + "description": "Email of the designated incident commander" + }, + "notes": { + "type": "string", + "description": "Handoff notes for the commander" + } + } + } + } + } + ] + }, + + "intent": { + "type": "intent.incident.assignment.v1", + "payload": { + "incident_id": "INC-2026-0431", + "severity": "P1", + "service": "payment-processing", + "impact": "Customer-facing payment transactions failing", + "detected_at": "2026-03-18T14:22:00Z", + "on_call_team": "platform-sre" + } + } +} diff --git a/examples/human/clarification/scenario.json b/examples/human/clarification/scenario.json new file mode 100644 index 0000000..5f0e2b6 --- /dev/null +++ b/examples/human/clarification/scenario.json @@ -0,0 +1,75 @@ +{ + "scenario_id": "human.clarification.v1", + "title": "Data clarification — missing fields in customer record", + "description": "An automated agent detects incomplete fields in a customer onboarding record and pauses the workflow to request structured data from the responsible team member.", + + "agents": [ + { + "role": "validator", + "address": "customer-data-validator", + "display_name": "Customer Data Validator", + "delivery_mode": "stream", + "create_if_missing": true + } + ], + + "humans": [ + { + "role": "data_provider", + "display_name": "Customer Success Rep" + } + ], + + "workflow": { + "steps": [ + { + "step_id": "validate_record", + "tool_id": "tool.agent.task.v1", + "assigned_to": "validator", + "step_deadline_seconds": 30 + }, + { + "step_id": "request_clarification", + "tool_id": "tool.approval.human_signoff", + "assigned_to": "data_provider", + "requires_approval": true, + "step_deadline_seconds": 86400, + "human_task": { + "title": "Clarification needed — Customer ABC Corp onboarding", + "description": "The following fields are missing or invalid in the customer record. Please provide the correct values.", + "task_type": "clarification", + "notify_email": "cs-rep@example.com", + "form_schema": { + "type": "object", + "required": ["billing_contact_email", "tax_id"], + "properties": { + "billing_contact_email": { + "type": "string", + "description": "Billing contact email address" + }, + "tax_id": { + "type": "string", + "description": "Company tax identification number" + }, + "preferred_payment_method": { + "type": "string", + "description": "Payment method (wire, card, invoice)", + "enum": ["wire", "card", "invoice"] + } + } + } + } + } + ] + }, + + "intent": { + "type": "intent.customer.onboarding.v1", + "payload": { + "customer_id": "CUST-2026-0847", + "company_name": "ABC Corp", + "missing_fields": ["billing_contact_email", "tax_id"], + "onboarding_stage": "data_validation" + } + } +} diff --git a/examples/human/confirmation/scenario.json b/examples/human/confirmation/scenario.json new file mode 100644 index 0000000..4f3029f --- /dev/null +++ b/examples/human/confirmation/scenario.json @@ -0,0 +1,58 @@ +{ + "scenario_id": "human.confirmation.v1", + "title": "Confirmation — verify DNS propagation completed", + "description": "An automated agent submits a DNS change request. The workflow pauses for the network team to confirm that DNS propagation has been verified across all regions before proceeding with the cutover.", + + "agents": [ + { + "role": "dns_agent", + "address": "dns-change-agent", + "display_name": "DNS Change Agent", + "delivery_mode": "stream", + "create_if_missing": true + } + ], + + "humans": [ + { + "role": "network_ops", + "display_name": "Network Operations" + } + ], + + "workflow": { + "steps": [ + { + "step_id": "submit_dns_change", + "tool_id": "tool.agent.task.v1", + "assigned_to": "dns_agent", + "step_deadline_seconds": 60 + }, + { + "step_id": "confirm_propagation", + "tool_id": "tool.approval.human_signoff", + "assigned_to": "network_ops", + "requires_approval": true, + "step_deadline_seconds": 14400, + "human_task": { + "title": "Confirm DNS propagation — api.example.com CNAME update", + "description": "DNS change submitted: api.example.com CNAME → new-lb.cloud.example.com. Please verify propagation across US-East, US-West, and EU-West regions before confirming.", + "task_type": "confirmation", + "notify_email": "netops@example.com" + } + } + ] + }, + + "intent": { + "type": "intent.dns.change.v1", + "payload": { + "domain": "api.example.com", + "record_type": "CNAME", + "old_value": "old-lb.cloud.example.com", + "new_value": "new-lb.cloud.example.com", + "regions_to_verify": ["us-east-1", "us-west-2", "eu-west-1"], + "change_ticket": "NET-2026-1847" + } + } +} diff --git a/examples/human/manual-action/scenario.json b/examples/human/manual-action/scenario.json new file mode 100644 index 0000000..8d9f683 --- /dev/null +++ b/examples/human/manual-action/scenario.json @@ -0,0 +1,62 @@ +{ + "scenario_id": "human.manual_action.v1", + "title": "Manual action — physical server rack inspection", + "description": "An automated monitoring agent detects elevated temperatures in a server rack. The workflow pauses for a data center technician to physically inspect the rack and report findings.", + + "agents": [ + { + "role": "monitor", + "address": "dc-thermal-monitor", + "display_name": "Data Center Thermal Monitor", + "delivery_mode": "stream", + "create_if_missing": true + } + ], + + "humans": [ + { + "role": "technician", + "display_name": "DC Technician" + } + ], + + "workflow": { + "steps": [ + { + "step_id": "detect_anomaly", + "tool_id": "tool.agent.task.v1", + "assigned_to": "monitor", + "step_deadline_seconds": 30 + }, + { + "step_id": "rack_inspection", + "tool_id": "tool.approval.human_signoff", + "assigned_to": "technician", + "requires_approval": true, + "step_deadline_seconds": 7200, + "remind_after_seconds": 1800, + "remind_interval_seconds": 1800, + "max_reminders": 3, + "human_task": { + "title": "Inspect server rack B-14 — elevated temperature alert", + "description": "Thermal sensors in rack B-14 report 42°C (threshold: 38°C). Please physically inspect the rack, check airflow and cooling, and report findings.", + "task_type": "manual_action", + "evidence_required": true, + "notify_email": "dc-ops@example.com" + } + } + ] + }, + + "intent": { + "type": "intent.dc.inspection.v1", + "payload": { + "rack_id": "B-14", + "location": "DC-East, Row 3", + "current_temp_c": 42, + "threshold_c": 38, + "alert_level": "warning", + "sensor_ids": ["SENS-B14-01", "SENS-B14-02"] + } + } +} diff --git a/examples/human/override/scenario.json b/examples/human/override/scenario.json new file mode 100644 index 0000000..6b8cae7 --- /dev/null +++ b/examples/human/override/scenario.json @@ -0,0 +1,60 @@ +{ + "scenario_id": "human.override.v1", + "title": "Override — emergency production deploy outside change window", + "description": "An automated change management agent blocks a deployment because it falls outside the approved change window. The workflow pauses for a senior operator to provide an explicit override with justification.", + + "agents": [ + { + "role": "change_mgmt", + "address": "change-management-gate", + "display_name": "Change Management Gate", + "delivery_mode": "stream", + "create_if_missing": true + } + ], + + "humans": [ + { + "role": "senior_operator", + "display_name": "Senior Operator" + } + ], + + "workflow": { + "steps": [ + { + "step_id": "check_change_window", + "tool_id": "tool.agent.task.v1", + "assigned_to": "change_mgmt", + "step_deadline_seconds": 30 + }, + { + "step_id": "override_approval", + "tool_id": "tool.approval.human_signoff", + "assigned_to": "senior_operator", + "requires_approval": true, + "step_deadline_seconds": 3600, + "human_task": { + "title": "Override request — deploy api-gateway v3.5.0 outside change window", + "description": "This deployment is blocked by change management policy: outside approved change window (next window: Monday 06:00 UTC). A critical hotfix requires immediate deployment. Provide justification to override.", + "task_type": "override", + "required_comment": true, + "notify_email": "senior-ops@example.com" + } + } + ] + }, + + "intent": { + "type": "intent.deploy.override.v1", + "payload": { + "service": "api-gateway", + "version": "v3.5.0", + "environment": "production", + "blocked_reason": "outside_change_window", + "next_window": "2026-03-20T06:00:00Z", + "hotfix_ticket": "HOT-2026-0092", + "risk_level": "high" + } + } +} diff --git a/examples/human/review/scenario.json b/examples/human/review/scenario.json new file mode 100644 index 0000000..28b889f --- /dev/null +++ b/examples/human/review/scenario.json @@ -0,0 +1,58 @@ +{ + "scenario_id": "human.review.v1", + "title": "Code review — PR sign-off before merge", + "description": "An automated agent runs static analysis and test coverage checks. The workflow then pauses for a human reviewer to approve, request changes, or reject the PR.", + + "agents": [ + { + "role": "analyzer", + "address": "code-quality-analyzer", + "display_name": "Code Quality Analyzer", + "delivery_mode": "stream", + "create_if_missing": true + } + ], + + "humans": [ + { + "role": "reviewer", + "display_name": "Code Reviewer" + } + ], + + "workflow": { + "steps": [ + { + "step_id": "run_analysis", + "tool_id": "tool.agent.task.v1", + "assigned_to": "analyzer", + "step_deadline_seconds": 120 + }, + { + "step_id": "code_review", + "tool_id": "tool.approval.human_signoff", + "assigned_to": "reviewer", + "requires_approval": true, + "step_deadline_seconds": 172800, + "human_task": { + "title": "Review PR #847 — Add retry logic to payment service", + "description": "Static analysis passed. Test coverage: 94%. Please review the implementation and approve, request changes, or reject.", + "task_type": "review", + "notify_email": "reviewer@example.com" + } + } + ] + }, + + "intent": { + "type": "intent.code.review.v1", + "payload": { + "pr_number": 847, + "repository": "payment-service", + "branch": "feat/retry-logic", + "author": "platform-bot", + "files_changed": 12, + "coverage_pct": 94 + } + } +}