Mission
interface Mission {
id: string;
name: string;
data: string;
prompt?: string;
status: MissionStatus;
deadline?: string;
schedule?: string;
endDate?: string;
qualityThreshold?: number;
notifications?: ScopedNotificationRules;
executionCount?: number;
createdAt: string;
updatedAt: string;
}
MissionStatus
type MissionStatus =
| "draft"
| "scheduled"
| "recurring"
| "active"
| "paused"
| "completed"
| "failed"
| "cancelled"
Mission data format
Thedata field is a JSON string containing tasks, team composition, and orchestration rules:
{
"tasks": [
{
"title": "Design the API schema",
"description": "Create OpenAPI spec for the auth endpoints",
"assignTo": "backend-dev",
"expectations": [
{ "type": "file_exists", "paths": ["openapi.yaml"] }
]
},
{
"title": "Implement auth endpoints",
"description": "Build the endpoints from the OpenAPI spec",
"assignTo": "backend-dev",
"dependsOn": ["Design the API schema"],
"expectations": [
{ "type": "test", "command": "npm test -- --grep auth" }
]
}
],
"team": [
{
"name": "api-reviewer",
"role": "Reviews API design for security",
"model": "anthropic:claude-sonnet-4-5",
"volatile": true
}
],
"checkpoints": [
{
"name": "design-review",
"afterTasks": ["Design the API schema"],
"blocksTasks": ["Implement auth endpoints"],
"message": "Review the API design before implementation"
}
],
"qualityGates": [
{
"name": "security-check",
"afterTasks": ["Implement auth endpoints"],
"blocksTasks": [],
"minScore": 4.0,
"requireAllPassed": true
}
],
"delays": [
{
"name": "cooldown",
"afterTasks": ["Design the API schema"],
"blocksTasks": ["Implement auth endpoints"],
"duration": "PT30M"
}
]
}
MissionReport
Generated when a mission completes:interface MissionReport {
missionId: string;
group: string;
allPassed: boolean;
totalDuration: number;
tasks: {
title: string;
status: "done" | "failed";
duration: number;
score?: number;
filesCreated: string[];
filesEdited: string[];
outcomes?: TaskOutcome[];
}[];
filesCreated: string[];
filesEdited: string[];
outcomes?: TaskOutcome[];
avgScore?: number;
}
Quality gates
interface MissionQualityGate {
name: string;
afterTasks: string[];
blocksTasks: string[];
minScore?: number;
requireAllPassed?: boolean;
condition?: string;
notifyChannels?: string[];
}
Checkpoints
Pause mission execution for human review:interface MissionCheckpoint {
name: string;
afterTasks: string[];
blocksTasks: string[];
notifyChannels?: string[];
message?: string;
}
Delays
Timed pauses between task groups:interface MissionDelay {
name: string;
afterTasks: string[];
blocksTasks: string[];
duration: string;
notifyChannels?: string[];
message?: string;
}