---
name: full-auto-long-demo
description: Fully automated end-to-end demo of the team-tile bootstrap pattern — zero user args, runs all 12 steps front-to-back, auto-cleans up at the end. Spawns 2 maw-tile panes, bootstraps them as TeamCreate teammates via maw run, sends quick missions via SendMessage, receives XML replies in context, shuts them down with shutdown_request, TeamDeletes the team, and kills the panes. Use when user says "full-auto-long-demo", "run the team-tile demo end-to-end", "self-running demo", or "show me everything in one command".
argument-hint: (no args — fully automatic)
---

# /full-auto-long-demo — Self-Running End-to-End Team-Tile Demo

The companion to `/team-tile-spawn` (production) and `/team-tile-demo` (educational walkthrough). This one **runs by itself with no args** — start it and watch all 12 steps execute, including cleanup.

**Validated**: 2026-05-20 (today). Same chain used in the original buddy-team session experiment.

## What it does (automatically)

1. **Generates a unique team name** from timestamp: `auto-demo-<unix-seconds>`
2. **Pre-flight checks** — tmux, $CLAUDE_SESSION_ID, tools loaded
3. **`TeamCreate({team_name})`** — registers the team in `~/.claude/teams/<name>/`
4. **`rtk maw tile 1 --path <repo-a> --cmd "<claude-cmd>"`** — spawns pane 1 with cd + claude.exe in one verb (NEW since maw-js #1837)
   - `reader-a` (magenta) in mother-oracle path
5. **`rtk maw tile 1 --path <repo-b> --cmd "<claude-cmd>"`** — spawns pane 2 likewise
   - `reader-b` (cyan) in maw-plugin-registry path
6. **`tmux select-layout main-vertical`** — me-left, teammates stacked right
7. **Wait 12s** for both claude.exe processes to boot
8. **`SendMessage` × 2 missions** — quick reads with structured replies expected
9. **Wait for replies** — they arrive as `<teammate-message>` XML in this context
10. **`SendMessage({type: "shutdown_request"})` × 2** — graceful shutdown
11. **`TeamDelete()`** — cleans up `~/.claude/teams/<name>/`
12. **`tmux kill-pane` × 2** — closes the demo panes

After step 12, the session is back to single-pane (just the lead).

## Total runtime

About 60-90 seconds end-to-end — most of it waiting for boot + teammate thinking time.

## Recipe (Claude executes this when /full-auto-long-demo is invoked)

```
# Step 0: gather state
TEAM="auto-demo-$(date +%s)"
SESSION=$(tmux display-message -p '#{session_name}')
WINDOW=$(tmux display-message -p '#{window_index}')
CLAUDE_BIN="/Users/nat/.nvm/versions/node/v24.15.0/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe"
PARENT="$CLAUDE_SESSION_ID"
[ -z "$PARENT" ] && { echo "ERROR: CLAUDE_SESSION_ID unset"; exit 1; }

# Step 3: TeamCreate (via Claude tool, not bash)
# Use the TeamCreate tool with team_name=$TEAM

# Step 4 — spawn pane 1 with --path + --cmd (NEW since maw-js #1837 landed)
# Single verb does: tile + cd + boot claude.exe with team flags
ENV_A="CLAUDECODE=1 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1"
CMD_A="env $ENV_A $CLAUDE_BIN \\
  --agent-id reader-a@$TEAM --agent-name reader-a --team-name $TEAM \\
  --agent-color magenta --parent-session-id $PARENT \\
  --model sonnet --dangerously-skip-permissions"
rtk maw tile 1 --path /opt/Code/github.com/Soul-Brews-Studio/mother-oracle --cmd "$CMD_A"

# Step 5 — spawn pane 2 with --path + --cmd
ENV_B="CLAUDECODE=1 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1"
CMD_B="env $ENV_B $CLAUDE_BIN \\
  --agent-id reader-b@$TEAM --agent-name reader-b --team-name $TEAM \\
  --agent-color cyan --parent-session-id $PARENT \\
  --model sonnet --dangerously-skip-permissions"
rtk maw tile 1 --path /opt/Code/github.com/Soul-Brews-Studio/maw-plugin-registry --cmd "$CMD_B"

# Step 2: layout (applied after spawns so it tiles all panes)
tmux select-layout main-vertical

# Step 6: wait for boots
sleep 12

# Step 7: SendMessage missions (via Claude tool)
# SendMessage({to: "reader-a", summary: "title + author of book-fleet-as-team",
#   message: "Read the frontmatter of ψ/lab/boy-method/book-fleet-as-team.md and reply with the title and author in one line. Then stand down."})
# SendMessage({to: "reader-b", summary: "buddy plugin version",
#   message: "Read plugins/buddy/plugin.json and reply with the version field value in one line. Then stand down."})

# Step 8: wait for replies (Claude observes <teammate-message> XML in context)
# (auto — replies arrive as conversation turns)

# Step 9: shutdown_request × 2 (via Claude tool)
# SendMessage({to: "reader-a", message: {type: "shutdown_request"}})
# SendMessage({to: "reader-b", message: {type: "shutdown_request"}})

# Step 10: wait for shutdown_approved (auto)

# Step 11: TeamDelete (via Claude tool)
# TeamDelete({})

# Step 12: kill remaining panes
tmux kill-pane -t $SESSION:$WINDOW.1
tmux kill-pane -t $SESSION:$WINDOW.2
```

## Claude orchestration plan (this is what Claude does step-by-step)

When the user invokes `/full-auto-long-demo`, Claude:

1. **Announce**: "Running full-auto-long-demo — 12 steps, no args, auto-cleanup. ~60-90s total."
2. **Pre-flight** — Bash a single check for tmux + env + tools. If anything fails, abort and report.
3. **Compute params** — TEAM name with timestamp, SESSION/WINDOW from tmux.
4. **Bash step 1-2**: `rtk maw tile 2 && tmux select-layout main-vertical` (or trigger the bootstrap.ts helper from team-tile-spawn skill in --no-mission mode if it exists).
5. **Tool**: Call `TeamCreate({team_name, description: "auto demo", agent_type: "researcher"})`.
6. **Bash step 4-5**: Two `rtk maw run` calls with the canonical 7-flag claude.exe invocations.
7. **Bash step 6**: `sleep 12` to let claude.exe boot.
8. **Tool**: Call `SendMessage` for each teammate with the quick-read missions.
9. **Wait + Observe**: User watches teammate replies arrive as `<teammate-message>` XML. Claude announces "Got reader-a reply: X" and "Got reader-b reply: Y".
10. **Tool**: Call `SendMessage({to, message: {type: "shutdown_request"}})` for each.
11. **Tool**: Call `TeamDelete({})` after both shutdown_approved replies arrive.
12. **Bash**: `tmux kill-pane -t <SESSION>:<WINDOW>.1` and `.2`.
13. **Report**: "Demo complete. Team `auto-demo-<ts>` ran 2 missions, got 2 replies, cleaned up. Total: <elapsed>s."

## Why hardcoded missions

The missions are intentionally **trivial** — just read a frontmatter field — so the demo completes in seconds, not minutes. Goal is showing the CHAIN, not the team doing real work.

## Failure-mode handling

| Failure | Action |
|---|---|
| Not in tmux | Abort early with clear message |
| Already leading another team | Auto `TeamDelete` first, then continue |
| `maw tile` fails | Abort, no cleanup needed (nothing spawned yet) |
| `maw run` fails | Continue with what we have; report partial spawn |
| Teammate doesn't reply within 60s | Skip waiting, send shutdown anyway |
| TeamDelete fails | Try once more, then warn user |
| `tmux kill-pane` fails | Warn but don't error (pane may have already exited cleanly) |

## What this demonstrates

By the end of one self-running invocation:

- ✅ `maw tile` spawn → `maw run`-addressable panes (closes seam #3 manually)
- ✅ TeamCreate registers the team properly (closes seam #2)
- ✅ Claude.exe boots with `--agent-id`/`--team-name` env (status bar shows `@role`)
- ✅ SendMessage delivers to JSON inbox → XML `<teammate-message>` wrap → lead's context
- ✅ Teammate reply round-trips back to lead context
- ✅ shutdown_request → shutdown_approved → process exit (or fall-through to kill-pane)
- ✅ TeamDelete cleans up team registry
- ✅ All 6 seams demonstrated or worked around in one run

## Related skills

- `/team-tile-spawn` — production verb (takes args, no auto-cleanup, no auto-shutdown)
- `/team-tile-demo` — long-form walkthrough (narrated, doesn't run)
- `/team-talk` (mother's) — conversational team wrapper

## What happens on success

```
✓ team auto-demo-1716284567 created
✓ pane %105 booted as reader-a@auto-demo-... (magenta)
✓ pane %106 booted as reader-b@auto-demo-... (cyan)
→ sending missions...
✓ reader-a replied: "Title: The Fleet As Team · Author: Mother Oracle (AI)"
✓ reader-b replied: "Version: 0.1.0"
→ sending shutdown_request...
✓ reader-a shutdown_approved
✓ reader-b shutdown_approved
✓ TeamDelete auto-demo-1716284567
✓ panes %105 %106 killed
✓ DONE — 78s
```

ARGUMENTS: $ARGUMENTS
