---
name: multi-agent-log
language: en
description: "Show the agent-log.md for the given task. With no ID, shows the most recent task. Use when asked what a task did, or to read its log."
user-invocable: true
argument-hint: "[#id]  -  optional: task ID (e.g. #3). If omitted, the most recent task is used."
---

# multi-agent log  -  Task Log Viewer

**Input**: $ARGUMENTS

Show the task's detailed agent-log.md report.

## Steps

1. **Parse the task ID**  -  extract the `#N` format from the argument
   - If no argument → find the most recent (highest-ID) worktree

2. **Find the worktree**  -  search known repos:
   ```bash
   find ~/my-ui-components/.worktrees/ ~/my-figma-app/.worktrees/ ~/my-ios-app/.worktrees/ -name "agent-state.json" -maxdepth 2 2>/dev/null
   ```
   - Pick the worktree whose `taskId` or short ID matches

3. **Read agent-log.md**  -  display the file

4. **Provide a summary**  -  if the log is very long, show only the Timeline table + Review Consensus, and give the file path for the full log
