This document contains instructions for agents to perform efficient and accurate causal analysis of Skia task failures.
To perform this analysis, employ a hierarchical approach:
As the coordinator agent, your job is to identify which tasks are broken by which commits.
Retrieve the recent task results, eg. sk agent tool get_task_health_report --limit=35 --revision=main --repo=https://skia.googlesource.com/skia.git
Result Format: This returns a data set containing the following:
Commits: The authoritative, chronologically ordered list of commits (index 0 is newest).Task Results: A series of results for tasks whose result has changed within the given commit range. Each line contains:commit: The commit hash at which the task ran.status: The result (SUCCESS, FAILURE, MISHAP).id: The database ID of the task.To find the culprit commit(s), you MUST delegate the causal analysis for each task from Phase 1 to a separate sub-agent (the “Task Specialist”).
invoke_agent(agent_name="generalist", ...)).Once all Task Specialists have returned their findings, aggregate their reports.
If the results from Phase 3 are definitive, you might be able to stop there. However, depending on what you were originally asked to do, you may need to investigate further. Follow the instructions below.
If you found a persistently-failing task, your first priority is to single out the commit which caused it. If a single culprit has not already been found by this point, start by retrieving the commit messages for the suspect commits. The gerrit_get_commit_message tool from the pnd MCP server will be your best bet. If that's not available, you can try using git log locally but you may not be inside of a checkout of the correct repository. If all else fails, try using the Gitiles HTTP API.
If the culprit is not obvious by correlating the name(s) of the failing task(s) with the commit message, invoke a sub-agent to run sk agent workflow task_drilldown and follow the instructions it returns. IMPORTANT: Explicitly instruct the sub-agent that this is a log analysis task and it MUST NOT attempt to read source code or debug the issue. Have the sub-agent report the findings back to you so that you can aggregate them and report them to the user.
These are generally lower priority than recent persistent failures, but they may warrant investigation based on the original prompt. If so, invoke a sub-agent to run sk agent workflow task_drilldown and follow the instructions it returns. IMPORTANT: Explicitly instruct the sub-agent that this is a log analysis task and it MUST NOT attempt to read source code or debug the issue.
This somewhat depends on what was originally requested of you, but generally: