Business operating system for Claude Code — 57 skills, 21 agents, smart daemon. Unified inbox (WhatsApp/Email/Slack/Telegram), autonomous PR merge, full-AWS monitoring, revenue (Stripe+RevenueCat), e-commerce (Shopify), marketing (Klaviyo/Meta/GA4), voice (Bland/ElevenLabs), APM (Datadog/NewRelic/OTEL), YOLO mode.
Shell agent-teamsai-agentai-automationanthropicautonomous-agentawsbusiness-operationsclaudeclaude-codeclaude-code-plugindevopsecommerceinbox-zeroklaviyomarketingmcpmorning-briefingpr-automationshopifyterminal
feat(recap): Claude Code statusLine fallback when tmux is missing
auroracapital5eb239f40ba8
diff --git a/claude-ops/scripts/recap/README.md b/claude-ops/scripts/recap/README.mdnew file mode 100644index 00000000..accaa982--- /dev/null+++ b/claude-ops/scripts/recap/README.md@@ -0,0 +1,48 @@+# Recap Marquee Scripts++Background daemon + helpers that synthesize a one-line digest across all parallel Claude Code sessions and recent shell activity, written to `/tmp/claude-recap-digest`.++| Script | Role |+|--------|------|+| `daemon.sh` | Long-lived loop — polls per-session recap inputs, calls `digest.sh` when stale, writes `/tmp/claude-recap-digest` |+| `digest.sh` | Synthesizes the one-liner via `claude -p --model haiku` over recent sessions + tool-activity files |+| `marquee.sh` | Tmux-side scroller (called from `status-right`) — reads the digest file and emits a windowed slice |++## Display surfaces++The daemon is decoupled from how the digest is displayed. Two surfaces are supported and they can coexist:++### 1. tmux `status-right` (preferred when tmux is present)++`/ops:setup` Step 2d.3 (or `/ops:recap configure`) appends to `~/.tmux.conf`:++```+set -g status-right '#(cat /tmp/claude-recap-digest 2>/dev/null | head -c 80) #[fg=#a6e3a1]%H:%M '+set -g status-interval 2+```++### 2. Claude Code `statusLine` (fallback when tmux is missing)++When `command -v tmux` returns non-zero, `/ops:setup` Step 2d.3b (or `/ops:recap configure`) offers to wire `~/.claude/settings.json`:++```json+{+ "statusLine": {+ "type": "command",+ "command": "cat /tmp/claude-recap-digest 2>/dev/null | head -c 80",+ "refreshInterval": 30+ }+}+```++The merge is done with `jq` so any existing keys in `settings.json` are preserved. If a `statusLine` already exists, the user is asked whether to replace, append (chain commands so both render), or skip.++This fallback path also works when tmux *is* installed — both surfaces will render the same digest.++### 3. No surface++If neither tmux nor statusLine is wired, the daemon still produces `/tmp/claude-recap-digest`. Read it on demand with `/ops:recap tail` or `cat /tmp/claude-recap-digest`.++## Status checks++`/ops:recap status` reports which surfaces are currently active (tmux status-right, Claude Code statusLine, both, or neither).diff --git a/claude-ops/skills/ops-recap/SKILL.md b/claude-ops/skills/ops-recap/SKILL.mdindex 786843e1..41987b78 100644--- a/claude-ops/skills/ops-recap/SKILL.md+++ b/claude-ops/skills/ops-recap/SKILL.md@@ -72,14 +72,34 @@ if [ -f "$DAEMON_LOG" ]; thenfi# tmux integration?+# Display surfaces — tmux status-right + Claude Code statusLine can coexist+tmux_wired=0+statusline_wired=0+if command -v tmux >/dev/null 2>&1; thenif grep -q claude-recap "$HOME/.tmux.conf" 2>/dev/null; thenecho "✓ tmux status-right wired"+ tmux_wired=1elseecho "○ tmux installed but status-right not wired — run /ops:recap configure"fielse- echo "○ tmux not installed — marquee won't display, daemon still useful for /ops:recap tail"+ echo "○ tmux not installed"+fi++SETTINGS="$HOME/.claude/settings.json"+if [ -f "$SETTINGS" ] && command -v jq >/dev/null 2>&1; then+ sl_cmd=$(jq -r '.statusLine.command // empty' "$SETTINGS" 2>/dev/null)+ if echo "$sl_cmd" | grep -q claude-recap-digest; then+ echo "✓ Claude Code statusLine wired"+ statusline_wired=1+ else+ echo "○ Claude Code statusLine not wired — run /ops:recap configure"+ fi+fi++if [ "$tmux_wired" -eq 0 ] && [ "$statusline_wired" -eq 0 ]; then+ echo " → no display surface active. Daemon still produces /tmp/claude-recap-digest (useful for /ops:recap tail)."fi```@@ -97,14 +117,14 @@ tail -n 30 /tmp/claude-recap-daemon.log 2>/dev/null || echo "(no daemon log yet)## Subcommand: `configure`-Walk the user through tmux integration if not already wired. Detect existing `status-right` first to avoid clobbering.+Walk the user through display-surface integration. Two surfaces are supported and they can coexist: tmux `status-right` and Claude Code `statusLine` (`~/.claude/settings.json`). Detect existing config first to avoid clobbering.-1. Check tmux availability:+1. Check tmux availability — if missing, jump to the statusLine fallback flow below:```bashif ! command -v tmux >/dev/null 2>&1; then- echo "tmux not installed — recap daemon still runs and you can read /tmp/claude-recap-digest manually."- exit 0+ echo "tmux not installed — offering Claude Code statusLine fallback."+ # → see "statusLine fallback" section belowfi```@@ -144,6 +164,67 @@ TMUXtmux info >/dev/null 2>&1 && tmux source-file "$TMUX_CONF" 2>/dev/null```+### `configure` — statusLine fallback (no tmux, or in addition to tmux)++When tmux is missing — or the user wants a second surface — wire the recap into Claude Code's own status bar via `~/.claude/settings.json`.++1. `AskUserQuestion` (Rule 1 — exactly 4 options):++ ```+ Wire recap into Claude Code statusLine (~/.claude/settings.json)?+ [Add to Claude Code statusLine] [Show me the JSON, I'll add manually] [Skip] [Help]+ ```++2. On `Add to Claude Code statusLine`, detect existing entry:++ ```bash+ SETTINGS="$HOME/.claude/settings.json"+ mkdir -p "$(dirname "$SETTINGS")"+ [ -f "$SETTINGS" ] || echo '{}' > "$SETTINGS"+ existing=$(jq -r '.statusLine // empty' "$SETTINGS")+ ```++3. If `existing` is non-empty, ask (Rule 1 — 3 options):++ ```+ Existing statusLine detected. How to handle?+ [Replace with recap] [Append after current (chain commands)] [Skip]+ ```++4. Merge with `jq` so other settings are preserved:++ ```bash+ TMP=$(mktemp)+ jq '.statusLine = {+ "type": "command",+ "command": "cat /tmp/claude-recap-digest 2>/dev/null | head -c 80",+ "refreshInterval": 30+ }' "$SETTINGS" > "$TMP" && mv "$TMP" "$SETTINGS"+ ```++ For the append branch, chain commands so both render side-by-side:++ ```bash+ prev_cmd=$(jq -r '.statusLine.command // ""' "$SETTINGS")+ new_cmd="${prev_cmd}; cat /tmp/claude-recap-digest 2>/dev/null | head -c 80"+ TMP=$(mktemp)+ jq --arg cmd "$new_cmd" '.statusLine.command = $cmd' "$SETTINGS" > "$TMP" && mv "$TMP" "$SETTINGS"+ ```++5. Print: `✓ Claude Code statusLine wired — restart Claude Code (or open a new session) to activate.`++The JSON snippet (for the manual / `Show me the JSON` path):++```json+{+ "statusLine": {+ "type": "command",+ "command": "cat /tmp/claude-recap-digest 2>/dev/null | head -c 80",+ "refreshInterval": 30+ }+}+```+## Subcommand: `restart`Reload the launchd agent without reconfiguring:diff --git a/claude-ops/skills/setup/SKILL.md b/claude-ops/skills/setup/SKILL.mdindex ec7171b1..6d244e06 100644--- a/claude-ops/skills/setup/SKILL.md+++ b/claude-ops/skills/setup/SKILL.md@@ -576,18 +576,23 @@ launchctl bootout "gui/$(id -u)/com.claude-ops.recap-daemon" 2>/dev/null || truelaunchctl bootstrap "gui/$(id -u)" "$PLIST_DEST"```-### Step 2d.3 — tmux integration+### Step 2d.3 — Display surface integration (tmux OR Claude Code statusLine)-Detect tmux availability — skip cleanly if missing:+The daemon writes `/tmp/claude-recap-digest`. Two display surfaces can render it (and they can coexist):++- **tmux `status-right`** — preferred when tmux is installed (richer color, scrolling).+- **Claude Code `statusLine`** — fallback when tmux is missing; renders in Claude Code's own status bar via `~/.claude/settings.json`.++Detect tmux availability and branch:```bashif ! command -v tmux >/dev/null 2>&1; then- echo "○ tmux not installed — daemon installed, but no marquee surface. Daemon still useful for /ops:recap tail."- # write recap.enabled = true, recap.tmux_wired = false, then skip to Step 2d.5+ echo "○ tmux not installed — offering Claude Code statusLine fallback instead."+ # → jump to Step 2d.3b (statusLine fallback)fi```-If `recap_marquee_auto_configure_tmux = false`, print the snippet and skip the rest of this step (let user wire manually).+If `recap_marquee_auto_configure_tmux = false`, print the tmux snippet and skip the rest of this step (let user wire manually). The statusLine fallback in Step 2d.3b still applies if tmux is absent.If tmux is present and `recap_marquee_auto_configure_tmux = true`, ask:@@ -627,6 +632,83 @@ TMUXtmux info >/dev/null 2>&1 && tmux source-file "$TMUX_CONF" 2>/dev/null```+### Step 2d.3b — Claude Code statusLine fallback (no tmux)++When `command -v tmux` returned non-zero in Step 2d.3, offer the Claude Code `statusLine` setting as the marquee surface. Same digest file (`/tmp/claude-recap-digest`), different render target. This is also safe to layer alongside tmux if both are present — but typically only run when tmux is absent.++Ask via `AskUserQuestion` (Rule 1 — exactly 4 options):++```+No tmux detected. Wire the recap marquee into Claude Code's statusLine instead?+ [Add to Claude Code statusLine] [Show me the JSON, I'll add manually] [Skip] [Help]+```++On `Help`: explain that Claude Code reads `~/.claude/settings.json` → `statusLine` and runs the configured command on each refresh, displaying the output in its own status bar. Then re-ask.++On `Show me the JSON`: print the snippet below and continue to Step 2d.4 with `recap.statusline_wired = false`.++On `Skip`: write `recap.statusline_wired = false` and continue to Step 2d.4.++On `Add to Claude Code statusLine`:++1. Detect existing `statusLine` entry:++ ```bash+ SETTINGS="$HOME/.claude/settings.json"+ mkdir -p "$(dirname "$SETTINGS")"+ [ -f "$SETTINGS" ] || echo '{}' > "$SETTINGS"+ existing=$(jq -r '.statusLine // empty' "$SETTINGS" 2>/dev/null)+ ```++2. If `existing` is non-empty, ask via `AskUserQuestion` (Rule 1 — 3 options):++ ```+ Existing statusLine detected in ~/.claude/settings.json. How to handle?+ [Replace with recap] [Append after current (chain commands)] [Skip]+ ```++ - `Replace with recap` → overwrite the `statusLine` key.+ - `Append after current` → preserve the existing command but suffix `; cat /tmp/claude-recap-digest 2>/dev/null | head -c 80` so both render. Use the existing entry's `type` and `refreshInterval`.+ - `Skip` → leave settings.json untouched and continue.++3. Merge with `jq` (preserves all other keys — never overwrite the whole file):++ ```bash+ TMP=$(mktemp)+ jq '.statusLine = {+ "type": "command",+ "command": "cat /tmp/claude-recap-digest 2>/dev/null | head -c 80",+ "refreshInterval": 30+ }' "$SETTINGS" > "$TMP" && mv "$TMP" "$SETTINGS"+ ```++ For the `Append after current` branch, build the merged command first:++ ```bash+ prev_cmd=$(jq -r '.statusLine.command // ""' "$SETTINGS")+ new_cmd="${prev_cmd}; cat /tmp/claude-recap-digest 2>/dev/null | head -c 80"+ TMP=$(mktemp)+ jq --arg cmd "$new_cmd" '.statusLine.command = $cmd' "$SETTINGS" > "$TMP" && mv "$TMP" "$SETTINGS"+ ```++4. Print:++ ```+ ✓ Claude Code statusLine wired — restart Claude Code (or open a new session) to activate.+ ```++The JSON snippet to show on `Show me the JSON`:++```json+{+ "statusLine": {+ "type": "command",+ "command": "cat /tmp/claude-recap-digest 2>/dev/null | head -c 80",+ "refreshInterval": 30+ }+}+```+### Step 2d.4 — Verify daemon is producing outputWait up to 60s for the daemon to write its first digest. Run in background; do NOT block the wizard:@@ -650,6 +732,7 @@ Write to `$PREFS_PATH`:"recap": {"enabled": true,"tmux_wired": true,+ "statusline_wired": false,"installed_at_step": "2d","platform": "macos"}