| name | command-ops |
| description | Command playbook — invoked on-demand by `squadrant command [--task ...]`. Covers daily briefing, delegation workflow, project registration, status checking, and learnings review. Command is no longer always-on. |
Command Operations
On-demand only. Command is no longer launched by squadrant launch --all. You were spawned by squadrant command --task <briefing|learnings-review|wiki-aggregate> to run a single task and exit. Do the task, then exit cleanly — no persistent loop.
Daily Briefing (Session Start)
Run when session starts, or user says "morning", "catch up", "summary":
- Check handoffs from all projects (context from yesterday's sessions):
for vault in $(cat ~/.config/squadrant/config.json | python3 -c "import json,sys; [print(p['spokeVault']) for p in json.loads(sys.stdin.read())['projects'].values()]"); do
echo "=== $(basename $vault) ==="
~/.config/squadrant/scripts/read-handoff.sh "$vault" --keep
done
Handoffs contain: currentState, openBranches, nextSteps, blockedItems, decisions. Use these to understand where each project left off.
- Search claude-mem (
mem-search skill) for recent activity across all projects.
- Read yesterday's logs:
YESTERDAY=$(date -v-1d +"%Y-%m-%d")
for vault in $(cat ~/.config/squadrant/config.json | python3 -c "import json,sys; [print(p['spokeVault']) for p in json.loads(sys.stdin.read())['projects'].values()]"); do
echo "=== $vault ==="
cat "$vault/daily-logs/${YESTERDAY}.md" 2>/dev/null || echo "(no log)"
done
- Read current status:
~/.config/squadrant/scripts/read-status.sh
- Run quick standup for context:
squadrant standup --yesterday --raw
- Present briefing, then save to
{hubVault}/daily-logs/YYYY-MM-DD.md
Delegation Workflow
When the user gives a task for a project:
1. Identify project
Match to ~/.config/squadrant/config.json.
2. Check for captain workspace
/Applications/cmux.app/Contents/Resources/bin/cmux list-workspaces
CRITICAL: Match the EXACT captainName from config. Brove ≠ ⚓ brove-captain.
3. Freshness gate (run BEFORE deciding to reuse)
A name match is not sufficient — the workspace may be holding a session from a previous day. Check sessions.json against today before reusing:
TODAY=$(date +%Y-%m-%d)
LAST=$(python3 -c "import json; d=json.load(open('$HOME/.config/squadrant/sessions.json')); print(d.get('workspaces',{}).get('{captainName}',{}).get('lastLaunched',''))" 2>/dev/null)
[ "$LAST" = "$TODAY" ] && echo "fresh" || echo "stale"
Never skip this gate when a workspace was found by name — that's how stale captains get reused.
4. Spawn captain (missing or stale)
~/.config/squadrant/scripts/spawn-workspace.sh "{captainName}" "{projectPath}"
Wait a few seconds, then list-workspaces again to get its ref. Confirm the spawn logged ↻ new day — starting fresh session (or a clean first-launch) before sending work.
5. Send the task
/Applications/cmux.app/Contents/Resources/bin/cmux send --workspace "workspace:N" "Task description with all context"
/Applications/cmux.app/Contents/Resources/bin/cmux send-key --workspace "workspace:N" Enter
6. Report back
"Delegated to {captainName}."
Checking Status
~/.config/squadrant/scripts/read-status.sh
Or read a captain's screen:
/Applications/cmux.app/Contents/Resources/bin/cmux read-screen --workspace "workspace:N"
Registering Projects
- Explore directory:
find {path} -maxdepth 2 -name ".git" -type d
- Identify primary repo (most active, main application)
- Identify siblings (docs, sites, forks)
- Register with groups:
squadrant projects add {name} {path/to/repo} --group {group}
squadrant projects add {name}-docs {path/to/docs} --group {group} --group-role "documentation site"
- Confirm with user. Always register the
.git directory, not the parent.
Monitoring Captains
Captains will send you reports via cmux send when tasks complete or blockers arise. When you receive a captain report:
- Acknowledge the report
- Update your dashboard / briefing notes
- If the captain reported a blocker — escalate to the user
- If all tasks for a project are done — inform the user
You can also proactively check captain progress:
for vault in $(cat ~/.config/squadrant/config.json | python3 -c "import json,sys; [print(p['spokeVault']) for p in json.loads(sys.stdin.read())['projects'].values()]"); do
echo "=== $(basename $vault) ==="
head -15 "$vault/status.md" 2>/dev/null || echo "(no status)"
done
Do this when:
- The user asks for a status update
- A captain hasn't reported back in a while
- Before your daily briefing
Reviewing Learnings
- Scan
{spokeVault}/learnings/*.md where applied: false
- Group by category, identify cross-project patterns
- If same issue in 2+ projects → propose a captured skill
- If a skill keeps failing → propose a fix
- Propose specific changes to the user
- After approval, apply and mark
applied: true
Wiki Aggregation (Hub Knowledge Base)
Periodically review spoke wikis across all projects to build a cross-project knowledge base.
1. Scan spoke wiki indexes
for vault in $(cat ~/.config/squadrant/config.json | python3 -c "import json,sys; [print(p['spokeVault']) for p in json.loads(sys.stdin.read())['projects'].values()]"); do
echo "=== $(basename $vault) ==="
cat "$vault/wiki/index.md" 2>/dev/null || echo "(no wiki)"
done
2. Identify cross-project knowledge
If a pattern appears in 2+ spoke wikis, create a hub-level wiki page that synthesizes both.
3. Create hub wiki pages
~/.config/squadrant/scripts/wiki-ingest.sh "{hubVaultPath}" "{slug}" "{title}" "{category}" "{body}" "{tags}" "aggregated from spoke wikis"
4. Wiki health check
During daily briefing, check for:
- Projects with zero wiki pages (captains not compiling knowledge)
- Stale wiki pages (not updated in 2+ weeks)
- Missing cross-references between related pages