AgentSkillsCN

eoa-progress-monitoring

基于状态检测的代理进度监控。适用于追踪任务完成情况、识别任务停滞或对无响应的代理进行升级处理。当需要进行进度检查时,即可触发相关操作。

SKILL.md
--- frontmatter
name: eoa-progress-monitoring
description: Agent progress monitoring via state-based detection. Use when tracking task completion, detecting stalls, or escalating unresponsive agents. Trigger with progress checks.
license: Apache-2.0
compatibility: Requires AI Maestro installed.
metadata:
  author: Anthropic
  version: 1.0.0
context: fork
agent: eoa-main

Progress Monitoring Skill

Overview

This skill defines how the Orchestrator (EOA) monitors agent progress. Monitoring is based on state transitions and response order - not fixed time intervals. Agents collaborate asynchronously and may be hibernated for extended periods. The orchestrator tracks agent states (Acknowledged, Active, No Progress, Stale, Unresponsive, Blocked, Complete) and escalates through ordered steps when issues are detected.

Prerequisites

  1. Read AGENT_OPERATIONS.md for orchestrator workflow
  2. Read eoa-label-taxonomy for status labels and workflow states
  3. Read eoa-messaging-templates for message formats and escalation templates
  4. Access to AI Maestro API for agent message history
  5. Access to GitHub CLI for issue status queries
  6. Understanding of agent lifecycle and state transitions

1. Agent States

Monitor agents based on their current state:

StateDefinitionAction
AcknowledgedAgent sent ACK for assigned taskNormal monitoring
No ACKTask assigned but no acknowledgment receivedSend reminder
ActiveAgent sending progress updatesContinue monitoring
No ProgressAgent acknowledged but no updates sinceSend status request
StaleAgent's last update predates significant eventsEscalate priority
UnresponsiveMultiple reminders without any responseConsider reassignment
BlockedAgent reported blockerAddress blocker
CompleteAgent reported task doneVerify and close

2. State Detection

2.1 Check Agent State

bash
# Get agent's last message timestamp from AI Maestro
curl -s "$AIMAESTRO_API/api/messages?agent=$AGENT_NAME&action=list" | jq '.messages[0].timestamp'

# Get task assignment event
gh issue view $ISSUE --json timelineItems | jq '.timelineItems[] | select(.label == "assign:$AGENT_NAME")'

2.2 State Transitions

code
Assigned → (ACK received) → Acknowledged
Acknowledged → (progress update) → Active
Acknowledged → (no updates) → No Progress
Active → (no updates after activity) → Stale
No Progress/Stale → (reminder sent, no response) → Unresponsive
Any → (blocker reported) → Blocked
Active → (completion reported) → Complete

3. Escalation Order

Escalation follows a strict order, not time-based triggers:

StepTrigger StateActionPriority
1No ACKSend first reminderNormal
2Still No ACK after Step 1Send urgent reminderHigh
3Unresponsive after Step 2Notify user, consider reassignmentUrgent

3.1 First Reminder

When state = No ACK or No Progress:

json
{
  "from": "orchestrator",
  "to": "<agent-name>",
  "subject": "Status Request: <task-id>",
  "priority": "normal",
  "content": {
    "type": "request",
    "message": "What is your current status on <task-id>? Report progress, blockers, and next steps.",
    "data": {
      "task_id": "<task-id>"
    }
  }
}

3.2 Urgent Reminder

When state = Unresponsive (no response to first reminder):

json
{
  "from": "orchestrator",
  "to": "<agent-name>",
  "subject": "URGENT: <task-id> - Response Required",
  "priority": "urgent",
  "content": {
    "type": "escalation",
    "message": "No response received. Please provide status immediately or task may be reassigned.",
    "data": {
      "task_id": "<task-id>",
      "escalation_level": 2
    }
  }
}

3.3 Reassignment Decision

When still unresponsive after urgent reminder:

  1. Check if user is available → Present options (wait, reassign, abort)
  2. If user unavailable → Auto-reassign to available agent
  3. Notify original agent of reassignment
  4. Transfer all context to new agent

4. Progress Report Format

Agents should report progress using this format:

4.1 Status Update

code
[IN_PROGRESS] <task-id> - <brief-description>
Progress: <percentage or milestone>
Next: <next-step>
Blockers: <none or blocker-list>

4.2 Completion Report

code
[DONE] <task-id> - <result-summary>
Output: <file-path or PR-number>
Tests: <passed/failed>

4.3 Blocker Report

code
[BLOCKED] <task-id> - <blocker-description>
Waiting on: <dependency or resource>
Impact: <what cannot proceed>
Suggested resolution: <if any>

5. Blocker Handling

When agent reports [BLOCKED]:

Blocker TypeResolution
Dependency on another taskCheck blocking task status, expedite if possible
Missing informationRoute to appropriate source (user, architect, etc.)
Technical issueEscalate to ECOS or user
Resource contentionCoordinate with other agents

5.1 Update Labels

bash
# Mark task as blocked
gh issue edit $ISSUE --remove-label "status:in-progress" --add-label "status:blocked"

# Add blocker details as comment
gh issue comment $ISSUE --body "BLOCKED: <blocker-description>"

5.2 When Blocker Resolved

bash
# Mark task as in-progress again
gh issue edit $ISSUE --remove-label "status:blocked" --add-label "status:in-progress"

# Notify agent
# (send message via AI Maestro)

6. Completion Verification

When agent reports [DONE]:

6.1 Verification Checklist

Copy this checklist and track your progress:

  • PR exists and is linked to issue
  • Tests pass (CI status)
  • Code review approved (if required)
  • Documentation updated (if required)
  • Issue checklist items complete

6.2 If Verification Passes

bash
# Update status
gh issue edit $ISSUE --remove-label "status:in-progress" --add-label "status:done"

# Remove assignment (task complete)
gh issue edit $ISSUE --remove-label "assign:$AGENT_NAME"

# Close issue if all criteria met
gh issue close $ISSUE

6.3 If Verification Fails

Send clarification request to agent:

json
{
  "type": "request",
  "message": "Completion verification failed. Missing: <list>. Please address and report again."
}

7. Dashboard View

Track all active tasks:

TaskAgentStateLast UpdatePriority
#42impl-01ActiveRecentHigh
#43impl-02No ProgressStaleNormal
#44reviewerBlockedRecentHigh

Query active tasks:

bash
# All in-progress tasks
gh issue list --label "status:in-progress" --json number,title,labels

# Blocked tasks
gh issue list --label "status:blocked" --json number,title,labels

# Tasks by agent
gh issue list --label "assign:impl-01" --json number,title,labels

Instructions

Follow these steps to monitor agent progress:

  1. Query all issues with status:in-progress label
  2. For each assigned task:
    1. Determine current agent state (section 1)
    2. Check AI Maestro for agent's last message timestamp
    3. Compare task assignment time vs. last agent update
    4. If state is "No ACK", send first reminder (section 3.1)
    5. If state is "No Progress" or "Stale", send status request
    6. If state is "Unresponsive" after reminders, send urgent escalation (section 3.2)
    7. If state is "Blocked", handle blocker (section 5)
    8. If state is "Complete", verify completion (section 6)
  3. Update issue labels to reflect current state
  4. Log all state transitions and escalations
  5. Reassign tasks only after full escalation order (section 3.3)

Output

Output TypeFormatExample
Agent state reportMarkdown tableTask #42, impl-01, Active, last update 2h ago
Escalation messageAI Maestro JSONReminder or urgent message sent to agent
Dashboard viewMarkdown tableAll in-progress tasks with states
Blocker reportIssue comment"BLOCKED: Waiting on API design approval"
Completion verificationBoolean + checklistPR exists ✓, tests pass ✓, docs updated ✓

Error Handling

ErrorCauseSolution
Agent never ACKsAgent offline, hibernated, or unawareSend reminder, escalate to ECOS if no response
Agent stops responding mid-taskAgent crashed, hibernated, or blockedFollow escalation order (sections 3.1-3.3)
Blocker reported but not resolvedDependency on external eventCoordinate with other agents or escalate to user
Completion reported but verification failsMissing tests, failing CI, or incomplete requirementsSend REVISE message (see eoa-implementer-interview-protocol)
Multiple agents updating same taskConcurrent work or reassignment conflictCheck assign:* label, coordinate via AI Maestro
Stale state but agent actually hibernatedNormal hibernation, not a failureDistinguish hibernation from unresponsiveness via ECOS

Examples

Example 1: Query Agent State via AI Maestro

bash
# Get agent's last message timestamp
AGENT="implementer-1"
LAST_MESSAGE=$(curl -s "$AIMAESTRO_API/api/messages?agent=$AGENT&action=list" | \
  jq -r '.messages[0].timestamp')

echo "Agent $AGENT last seen: $LAST_MESSAGE"

# Get task assignment timestamp
ISSUE=42
ASSIGNED_AT=$(gh issue view $ISSUE --json timelineItems | \
  jq -r '.timelineItems[] | select(.label.name == "assign:'$AGENT'") | .createdAt')

echo "Task #$ISSUE assigned at: $ASSIGNED_AT"

Example 2: Send First Reminder

bash
# Send normal priority status request
curl -X POST "$AIMAESTRO_API/api/messages" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "orchestrator",
    "to": "implementer-1",
    "subject": "Status Request: #42",
    "priority": "normal",
    "content": {
      "type": "request",
      "message": "What is your current status on #42? Report progress, blockers, and next steps.",
      "data": {
        "task_id": "42"
      }
    }
  }'

Example 3: Escalate to Urgent

bash
# After no response to first reminder
curl -X POST "$AIMAESTRO_API/api/messages" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "orchestrator",
    "to": "implementer-1",
    "subject": "URGENT: #42 - Response Required",
    "priority": "urgent",
    "content": {
      "type": "escalation",
      "message": "No response received. Please provide status immediately or task may be reassigned.",
      "data": {
        "task_id": "42",
        "escalation_level": 2
      }
    }
  }'

Example 4: Handle Blocker Report

bash
ISSUE=42

# Agent reports blocker via message
# Update issue labels
gh issue edit $ISSUE --remove-label "status:in-progress" --add-label "status:blocked"

# Add blocker comment to issue
gh issue comment $ISSUE --body "BLOCKED: Waiting on API endpoint design approval. Cannot proceed until #38 is resolved."

# Query the blocking issue
BLOCKER_STATUS=$(gh issue view 38 --json state,labels | jq -r '.state')
echo "Blocking issue #38 status: $BLOCKER_STATUS"

# If blocker is resolved, notify agent
if [ "$BLOCKER_STATUS" = "closed" ]; then
  gh issue edit $ISSUE --remove-label "status:blocked" --add-label "status:in-progress"
  # Send message to agent
fi

Example 5: Verify Completion

bash
ISSUE=42

# Check PR existence
PR_NUMBER=$(gh issue view $ISSUE --json body | jq -r '.body | match("PR #([0-9]+)") | .captures[0].string')

if [ -z "$PR_NUMBER" ]; then
  echo "VERIFICATION FAILED: No PR linked"
else
  # Check CI status
  CI_STATUS=$(gh pr view $PR_NUMBER --json statusCheckRollup | jq -r '.statusCheckRollup[] | select(.conclusion) | .conclusion')

  if [ "$CI_STATUS" = "SUCCESS" ]; then
    echo "VERIFICATION PASSED: PR #$PR_NUMBER exists and CI passed"
    # Update to done
    gh issue edit $ISSUE --remove-label "status:in-progress" --add-label "status:done"
    gh issue edit $ISSUE --remove-label "assign:implementer-1"
  else
    echo "VERIFICATION FAILED: CI status is $CI_STATUS"
  fi
fi

Resources

  • AGENT_OPERATIONS.md - Core orchestrator workflow
  • eoa-label-taxonomy - Status labels and workflow states
  • eoa-messaging-templates - Escalation message templates
  • eoa-task-distribution - Assignment protocol and agent states
  • eoa-implementer-interview-protocol - Post-task verification protocol