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
fix(companions): co-install command-essential deps as required (#726)
Aurora Capital5479c1c02328
diff --git a/claude-ops/.claude-plugin/plugin.json b/claude-ops/.claude-plugin/plugin.jsonindex ca00fe8a..1af809cb 100644--- a/claude-ops/.claude-plugin/plugin.json+++ b/claude-ops/.claude-plugin/plugin.json@@ -823,8 +823,37 @@"name": "desktop-act","marketplace": "ops-marketplace","coInstall": true,- "required": false,+ "required": true,"reason": "MCP companion for /ops:desktop and unattended captcha cascade"+ },+ {+ "name": "gsd",+ "marketplace": "gsd-build-get-shit-done",+ "coInstall": true,+ "required": true,+ "reason": "Project roadmap for /ops:flow project mode, /ops:projects, /ops:go"+ },+ {+ "name": "superpowers",+ "marketplace": "superpowers-marketplace",+ "coInstall": true,+ "required": true,+ "reason": "Guardrails for merge/orchestrate/triage checkpoints"+ },+ {+ "name": "feature-dev",+ "marketplace": "claude-plugins-official",+ "coInstall": true,+ "required": true,+ "reason": "Structured feature pipeline for /ops:ops-feature-dev"+ }+ ],+ "skillsClones": [+ {+ "name": "gstack",+ "installScript": "scripts/install-gstack-companion.sh",+ "required": true,+ "reason": "Ad-hoc /ops:flow lifecycle skills (not a marketplace plugin)"}]}diff --git a/claude-ops/CHANGELOG.md b/claude-ops/CHANGELOG.mdindex 45e5b88a..b72a68cb 100644--- a/claude-ops/CHANGELOG.md+++ b/claude-ops/CHANGELOG.md@@ -2,9 +2,14 @@## Unreleased+### Changed++- **Required companion co-install:** companions essential to ops commands are no longer optional setup prompts. `plugin-dependencies.json` marks `desktop-act`, `gsd`, `gstack` (skills clone), `superpowers`, and `feature-dev` as `required: true` with `updateWithOps: always` and `essentialFor` command lists. `scripts/install-companions.sh` always installs missing required companions (even under `--update-only`), and `--status` exits 1 when any required companion is missing. `/ops:setup` Step 2b runs the SSOT script without Skip for required deps. `/ops:update` step 9 co-installs the full required set (still skippable only via `--no-companions` / `OPS_SKIP_COMPANIONS=1`). Adds `scripts/install-gstack-companion.sh` (env-templated `GSTACK_REPO`/`GSTACK_DIR`/`GSTACK_BRANCH`).++### Added-- **ops-update companions:** step 9 runs `scripts/install-companions.sh` from `plugin-dependencies.json` — always co-install/update `desktop-act@ops-marketplace`; update `gsd`, `superpowers`, and `feature-dev` only if already installed. `gstack` is not managed. Flag: `--no-companions`.+- **ops-update companions:** step 9 runs `scripts/install-companions.sh` from `plugin-dependencies.json` — co-install/update all **required** companions (`desktop-act`, `gsd`, `gstack` skills-clone, `superpowers`, `feature-dev`). Flag: `--no-companions`.- **desktop-act marketplace companion:** `desktop-act` is published in `ops-marketplace` next to `ops` (source `./desktop-act`). Declared as a co-install dependency in `plugin.json` + `plugin-dependencies.json`. `scripts/install-desktop-act-companion.sh` installs via `claude plugin install desktop-act@ops-marketplace` (idempotent). `/ops:setup` and `/ops:update` co-install by default (`desktop_act_co_install`). Launcher resolves `ops-marketplace/desktop-act` before cache clone; default bootstrap repo is Lifecycle-Innovations-Limited/desktop-act.- **magic-link-autoloop reauth env (portable):** unattended re-auth child now inherits an env-templated headed seat + captcha cascade contract (`reauth-env.mjs`, `CAPTCHA-CASCADE.md`). Defaults: headed display from `CLAUDE_DESKTOP_DISPLAY` / `DESKTOP_ACT_DISPLAY`, visual + desktop-act + VNC layers on when present, 20m rotate timeout, no steal-lock, sticky `SKIP_TOKEN_SOLVERS=1` cleared. Dispatch mode `setup` (default) or `magic-link` via `$CRS_MAGIC_LINK_DISPATCH` / `crs.magicLinkDispatch`. Shell wrapper resolves plugin via `$CLAUDE_PLUGIN_ROOT` (no host hardcodes). Launchd template + `config.example.json` document the knobs.- **installer (`claude-ops-installer`, v0.1.0):** cross-CLI `npx claude-ops-installer install` — auto-detects Claude Code, Codex, Gemini CLI, OpenClaw, Hermes, and OpenCode, mirrors upstream skills + binstubs into each agent's expected layout, ships with a central `~/.config/claude-ops-installer/config.yaml`, and supports `install` / `update` / `verify` / `doctor` / `uninstall` / `agents` subcommands. One source of truth (the upstream marketplace repo at the pinned ref); per-agent manifest at `~/.cache/claude-ops-installer/manifest.json` enables surgical uninstall. Public-repo clean: no PII, no hardcoded paths, no embedded credentials.diff --git a/claude-ops/bin/ops-update b/claude-ops/bin/ops-updateindex 30a4d578..f1fd3ae8 100755--- a/claude-ops/bin/ops-update+++ b/claude-ops/bin/ops-update@@ -15,7 +15,7 @@# 6. Rewrite stale version-pinned paths in live configs/scripts (never logs/history)# 7. Run per-version idempotent migrations (ops-post-update-migrate)# 8. Fast-forward a linked local source checkout's main → origin/main (if clean)-# 9. Companion plugins (plugin-dependencies.json): desktop-act always;+# 9. Companion plugins (plugin-dependencies.json): all required companions;# gsd / superpowers / feature-dev if installed. gstack is not managed.# 10. Report old→new + what changed, and how to apply (/reload-plugins or restart)#@@ -259,9 +259,9 @@ elsefifi-# ── 9. Companion plugins (desktop-act always; others if installed) ─────────-# SSOT: plugin-dependencies.json — desktop-act co-install; gsd / superpowers /-# feature-dev update only when already present. gstack is not managed.+# ── 9. Companion plugins (required co-install from plugin-dependencies.json) ─+# SSOT: plugin-dependencies.json — required companions always install+update+# (desktop-act, gsd, gstack skills-clone, superpowers, feature-dev).step "9/10 Companion plugins"if [[ "$COMPANIONS" -eq 0 ]]; thensay " ${c_dim}(skipped: --no-companions)${c_rst}"@@ -271,10 +271,10 @@ elseif [[ -f "$COMP_SCRIPT" ]]; thenif [[ "$DRY" -eq 1 ]]; thensay " ${c_dim}[dry-run] CLAUDE_PLUGIN_ROOT=$NEW_CACHE bash $COMP_SCRIPT --update-only${c_rst}"- # also show install of always-coInstall (desktop-act) when missing+ # full pass installs required missing + updates all updateWithOps companionssay " ${c_dim}[dry-run] CLAUDE_PLUGIN_ROOT=$NEW_CACHE bash $COMP_SCRIPT${c_rst}"else- # Full pass: install always-coInstall missing + update if-installed+ # Full pass: install required missing + update all companionsCLAUDE_PLUGIN_ROOT="${NEW_CACHE:-$THIS_ROOT}" bash "$COMP_SCRIPT" \&& ok "companions install/update finished" \|| warn "companions script non-zero (non-fatal)"@@ -289,7 +289,7 @@ step "10/10 Summary"say " plugin: $PLUGIN@$MARKETPLACE"say " version: ${CUR:-<none>} → ${c_grn}$NEW${c_rst}"say " cache: $(ls -1 "$CACHE_ROOT" 2>/dev/null | grep -E '^[0-9]+\.' | tr '\n' ' ')"-say " companions: desktop-act (always) · gsd/superpowers/feature-dev (if installed) · gstack (not managed)"+say " companions: required co-install (desktop-act · gsd · gstack · superpowers · feature-dev)"if [[ "$DRY" -eq 1 ]]; thenwarn "DRY RUN — nothing changed. Re-run without --dry-run to apply."elsediff --git a/claude-ops/plugin-dependencies.json b/claude-ops/plugin-dependencies.jsonindex 4ee07238..6a4074cf 100644--- a/claude-ops/plugin-dependencies.json+++ b/claude-ops/plugin-dependencies.json@@ -1,74 +1,92 @@{- "_comment": "SSOT for companion plugins. Read by scripts/install-companions.sh and bin/ops-update. No host paths, no personal data.",+ "_comment": "SSOT for companion plugins + skills clones. Read by scripts/install-companions.sh and bin/ops-update. No host paths, no personal data. required=true means co-install on setup and always install/update with ops-update (unless --no-companions / OPS_SKIP_COMPANIONS=1). essentialFor lists the ops commands that break or hollow-out without the companion.","marketplace": "ops-marketplace","companions": [{"name": "desktop-act",+ "kind": "claude-plugin","marketplaceId": "ops-marketplace","marketplaceAdd": null,"installCli": "claude plugin install desktop-act@ops-marketplace","updateCli": "claude plugin update desktop-act@ops-marketplace","installScript": "scripts/install-desktop-act-companion.sh","sameMarketplaceAsOps": true,+ "required": true,"coInstallDefault": true,"updateWithOps": "always","userConfigGate": "desktop_act_co_install","prefsKey": "plugins.desktop_act",- "detect": {- "find": "*/desktop-act/*plugin.json"- },+ "detect": { "find": "*/desktop-act/*plugin.json" },+ "essentialFor": ["/ops:desktop", "unattended captcha cascade (rotate-magic / magic-link-autoloop)"],"reason": "MCP companion for /ops:desktop and unattended captcha cascade"},{"name": "gsd",+ "kind": "claude-plugin","marketplaceId": "gsd-build-get-shit-done","marketplaceAdd": "gsd-build/get-shit-done","installCli": "claude plugin install gsd@gsd-build-get-shit-done","updateCli": "claude plugin update gsd@gsd-build-get-shit-done","sameMarketplaceAsOps": false,+ "required": true,"coInstallDefault": true,- "updateWithOps": "if-installed",+ "updateWithOps": "always","prefsKey": "plugins.gsd",+ "detect": { "find": "*/skills/gsd-progress*" },+ "essentialFor": ["/ops:flow (project mode)", "/ops:projects", "/ops:go GSD sections", "/ops:next GSD priority"],+ "reason": "Project roadmap phases for /ops:flow project mode, /ops:go, and /ops:projects"+ },+ {+ "name": "gstack",+ "kind": "skills-clone",+ "marketplaceId": null,+ "marketplaceAdd": null,+ "installCli": null,+ "updateCli": null,+ "installScript": "scripts/install-gstack-companion.sh",+ "sameMarketplaceAsOps": false,+ "required": true,+ "coInstallDefault": true,+ "updateWithOps": "always",+ "prefsKey": "plugins.gstack","detect": {- "find": "*/skills/gsd-progress*"+ "pathExists": ["${HOME}/.claude/skills/gstack/SKILL.md", "${HOME}/.agents/skills/gstack/SKILL.md"]},- "reason": "Project roadmap phases for /ops:go and /ops:projects"+ "essentialFor": ["/ops:flow (ad-hoc mode)", "/spec", "/review", "/qa", "/ship", "/browse"],+ "reason": "Stateless dev-lifecycle skills for /ops:flow ad-hoc mode (not a Claude marketplace plugin — git skills clone)"},{"name": "superpowers",+ "kind": "claude-plugin","marketplaceId": "superpowers-marketplace","marketplaceAdd": "obra/superpowers-marketplace","installCli": "claude plugin install superpowers@superpowers-marketplace","updateCli": "claude plugin update superpowers@superpowers-marketplace","sameMarketplaceAsOps": false,+ "required": true,"coInstallDefault": true,- "updateWithOps": "if-installed",+ "updateWithOps": "always","prefsKey": "plugins.superpowers",- "detect": {- "find": "*/superpowers/skills/using-superpowers*"- },- "reason": "Verification/dispatch/debug guardrails for ops merge and triage skills"+ "detect": { "find": "*/superpowers/skills/using-superpowers*" },+ "essentialFor": ["/ops:ops-merge checkpoints", "/ops:ops-orchestrate checkpoints", "/ops:ops-triage checkpoints"],+ "reason": "Verification/dispatch/debug guardrails for ops merge, orchestrate, and triage skills"},{"name": "feature-dev",+ "kind": "claude-plugin","marketplaceId": "claude-plugins-official","marketplaceAdd": null,"installCli": "claude plugin install feature-dev@claude-plugins-official","updateCli": "claude plugin update feature-dev@claude-plugins-official","sameMarketplaceAsOps": false,+ "required": true,"coInstallDefault": true,- "updateWithOps": "if-installed",+ "updateWithOps": "always","prefsKey": "plugins.feature_dev",- "detect": {- "find": "*/feature-dev/*/agents/code-explorer.md"- },+ "detect": { "find": "*/feature-dev/*/agents/code-explorer.md" },+ "essentialFor": ["/ops:ops-feature-dev", "/flow feature-dev"],"reason": "Structured explore/architect/review agents for /ops:ops-feature-dev"}],- "_not_managed": [- {- "name": "gstack",- "note": "Not installed or registered by claude-ops setup. Do not co-update unless added to companions with a verified marketplace id."- }- ]+ "_not_managed": []}diff --git a/claude-ops/scripts/install-companions.sh b/claude-ops/scripts/install-companions.shindex 90250f54..7a7ca2b6 100755--- a/claude-ops/scripts/install-companions.sh+++ b/claude-ops/scripts/install-companions.sh@@ -1,18 +1,24 @@#!/usr/bin/env bash-# install-companions.sh — install and/or update companion plugins declared in+# install-companions.sh — install and/or update companions declared in# plugin-dependencies.json (same repo as ops).#+# required=true companions are ALWAYS installed when missing and ALWAYS+# updated when updateWithOps is always/if-installed. They are essential to+# named ops commands (see essentialFor in the JSON). Do not prompt-to-skip+# them from /ops:setup — run this script instead.+## Usage:-# bash scripts/install-companions.sh # install missing + update always-# bash scripts/install-companions.sh --update-only # only updateWithOps companions+# bash scripts/install-companions.sh+# bash scripts/install-companions.sh --update-only+# bash scripts/install-companions.sh --required-only# bash scripts/install-companions.sh --status# bash scripts/install-companions.sh --dry-run-# bash scripts/install-companions.sh --no-external # same-marketplace only+# bash scripts/install-companions.sh --no-external## Env:-# CLAUDE_PLUGIN_ROOT ops plugin root-# OPS_SKIP_COMPANIONS=1 no-op exit 0-# desktop_act_co_install / userConfig gates via prefs optional (best-effort)+# CLAUDE_PLUGIN_ROOT+# OPS_SKIP_COMPANIONS=1+# GSTACK_REPO/DIR/BRANCHset -euo pipefailSCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"@@ -23,14 +29,16 @@ PLUGINS_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins"STATUS_ONLY=0DRY_RUN=0UPDATE_ONLY=0+REQUIRED_ONLY=0NO_EXTERNAL=0for arg in "$@"; docase "$arg" in--status) STATUS_ONLY=1 ;;--dry-run) DRY_RUN=1 ;;--update-only) UPDATE_ONLY=1 ;;+ --required-only) REQUIRED_ONLY=1 ;;--no-external) NO_EXTERNAL=1 ;;- -h|--help) sed -n '2,20p' "$0"; exit 0 ;;+ -h|--help) sed -n '2,28p' "$0"; exit 0 ;;esacdone@@ -46,14 +54,34 @@ ficommand -v jq >/dev/null 2>&1 || { echo "companions: jq required" >&2; exit 1; }+expand_home() {+ local p="$1"+ p="${p//\$\{HOME\}/$HOME}"+ p="${p//\$HOME/$HOME}"+ printf '%s' "$p"+}+is_installed() {- local name="$1" find_pat="$2"+ local name="$1" find_pat="$2" kind="$3" path_json="$4"+ if [[ -n "$path_json" && "$path_json" != "null" && "$path_json" != "" ]]; then+ local p+ while IFS= read -r p; do+ [[ -z "$p" || "$p" == "null" ]] && continue+ p="$(expand_home "$p")"+ if [[ -e "$p" ]]; then+ return 0+ fi+ done < <(echo "$path_json" | jq -r '.[]? // empty')+ fiif [[ -n "$find_pat" ]]; thenfind "$PLUGINS_DIR" -path "$find_pat" 2>/dev/null | head -1 | grep -q . && return 0+ find "${HOME}/.claude" "${HOME}/.agents" -path "$find_pat" 2>/dev/null | head -1 | grep -q . && return 0+ fi+ if [[ "$kind" == "skills-clone" ]]; then+ [[ -f "${HOME}/.claude/skills/${name}/SKILL.md" ]] && return 0+ [[ -f "${HOME}/.agents/skills/${name}/SKILL.md" ]] && return 0fi- # cache dir presencefind "$PLUGINS_DIR/cache" -type d -name "$name" 2>/dev/null | head -1 | grep -q . && return 0- # installed_plugins.json mentionif [[ -f "$PLUGINS_DIR/installed_plugins.json" ]]; thenjq -e --arg n "$name" '..|strings?|select(test($n))' "$PLUGINS_DIR/installed_plugins.json" >/dev/null 2>&1 && return 0fi@@ -71,9 +99,11 @@ run_cmd() {n_ok=0n_skip=0n_fail=0+n_required_missing=0while IFS= read -r row; doname="$(echo "$row" | jq -r '.name')"+ kind="$(echo "$row" | jq -r '.kind // "claude-plugin"')"mkt="$(echo "$row" | jq -r '.marketplaceId // empty')"mkt_add="$(echo "$row" | jq -r '.marketplaceAdd // empty')"install_cli="$(echo "$row" | jq -r '.installCli // empty')"@@ -82,53 +112,70 @@ while IFS= read -r row; dosame_mp="$(echo "$row" | jq -r '.sameMarketplaceAsOps // false')"update_mode="$(echo "$row" | jq -r '.updateWithOps // "never"')"find_pat="$(echo "$row" | jq -r '.detect.find // empty')"+ path_json="$(echo "$row" | jq -c '.detect.pathExists // empty')"co_default="$(echo "$row" | jq -r '.coInstallDefault // false')"+ required="$(echo "$row" | jq -r '.required // false')"+ essential="$(echo "$row" | jq -r '.essentialFor // [] | join(", ")')"- if [[ "$NO_EXTERNAL" -eq 1 && "$same_mp" != "true" ]]; then+ if [[ "$REQUIRED_ONLY" -eq 1 && "$required" != "true" ]]; then+ echo "skip $name (not required, --required-only)"+ n_skip=$((n_skip + 1))+ continue+ fi++ if [[ "$NO_EXTERNAL" -eq 1 && "$same_mp" != "true" && "$kind" != "skills-clone" && "$required" != "true" ]]; thenecho "skip $name (external marketplace, --no-external)"n_skip=$((n_skip + 1))continuefiinstalled=0- if is_installed "$name" "$find_pat"; then+ if is_installed "$name" "$find_pat" "$kind" "$path_json"; theninstalled=1fiif [[ "$STATUS_ONLY" -eq 1 ]]; thenif [[ "$installed" -eq 1 ]]; then- echo "$name: installed"+ echo "$name: installed${required:+ (required)}"else- echo "$name: missing"+ if [[ "$required" == "true" ]]; then+ echo "$name: MISSING (required — essential for: ${essential:-see plugin-dependencies.json})"+ n_required_missing=$((n_required_missing + 1))+ else+ echo "$name: missing"+ fificontinuefi- # updateWithOps: always | if-installed | never- if [[ "$update_mode" == "never" ]]; then+ if [[ "$update_mode" == "never" && "$required" != "true" ]]; thenecho "skip $name (updateWithOps=never)"n_skip=$((n_skip + 1))continuefi- if [[ "$UPDATE_ONLY" -eq 1 && "$installed" -eq 0 ]]; then- echo "skip $name (not installed, --update-only)"- n_skip=$((n_skip + 1))- continue- fi-- if [[ "$installed" -eq 0 && "$UPDATE_ONLY" -eq 0 ]]; then- # install path- if [[ "$co_default" != "true" && "$update_mode" != "always" ]]; then+ if [[ "$installed" -eq 0 ]]; then+ if [[ "$required" != "true" && "$UPDATE_ONLY" -eq 1 ]]; then+ echo "skip $name (not installed, --update-only)"+ n_skip=$((n_skip + 1))+ continue+ fi+ if [[ "$required" != "true" && "$co_default" != "true" && "$update_mode" != "always" ]]; thenecho "skip $name (not installed, coInstallDefault=false)"n_skip=$((n_skip + 1))continuefi- echo "install $name …"++ echo "install $name …${required:+ [required]}${essential:+ — $essential}"if [[ -n "$install_script" && -f "$PLUGIN_ROOT/$install_script" ]]; thenif run_cmd "bash \"$PLUGIN_ROOT/$install_script\""; thenecho "ok: $name (script)"; n_ok=$((n_ok + 1)); continuefi+ if [[ "$required" == "true" ]]; then+ echo "fail: $name required install script failed" >&2+ n_fail=$((n_fail + 1))+ continue+ fifiif [[ -n "$mkt_add" ]]; thenrun_cmd "claude plugin marketplace add \"$mkt_add\" >/dev/null 2>&1 || true"@@ -140,13 +187,27 @@ while IFS= read -r row; doecho "fail: $name install" >&2; n_fail=$((n_fail + 1))fielse- echo "fail: $name no installCli" >&2; n_fail=$((n_fail + 1))+ echo "fail: $name no installCli/installScript" >&2; n_fail=$((n_fail + 1))ficontinuefi- # update path (installed)+ if [[ "$update_mode" == "never" ]]; then+ echo "skip $name update (updateWithOps=never, already installed)"+ n_skip=$((n_skip + 1))+ continue+ fi+echo "update $name …"+ if [[ -n "$install_script" && -f "$PLUGIN_ROOT/$install_script" && ( "$kind" == "skills-clone" || -z "$update_cli" ) ]]; then+ if run_cmd "bash \"$PLUGIN_ROOT/$install_script\" --update 2>/dev/null || bash \"$PLUGIN_ROOT/$install_script\""; then+ echo "ok: $name (script)"; n_ok=$((n_ok + 1))+ else+ echo "warn: $name script update non-zero (non-fatal)" >&2+ n_fail=$((n_fail + 1))+ fi+ continue+ fiif [[ "$same_mp" != "true" && -n "$mkt" ]]; thenrun_cmd "claude plugin marketplace update \"$mkt\" >/dev/null 2>&1 || true"fi@@ -154,7 +215,6 @@ while IFS= read -r row; doif run_cmd "$update_cli >/dev/null 2>&1"; thenecho "ok: $name (update)"; n_ok=$((n_ok + 1))else- # reinstall fallbackif [[ -n "$install_cli" ]] && run_cmd "$install_cli >/dev/null 2>&1"; thenecho "ok: $name (reinstall fallback)"; n_ok=$((n_ok + 1))else@@ -162,17 +222,18 @@ while IFS= read -r row; don_fail=$((n_fail + 1))fifi- elif [[ -n "$install_script" && -f "$PLUGIN_ROOT/$install_script" ]]; then- run_cmd "bash \"$PLUGIN_ROOT/$install_script\"" && echo "ok: $name (script)" && n_ok=$((n_ok + 1))elseecho "skip $name (no updateCli)"; n_skip=$((n_skip + 1))fidone < <(jq -c '.companions[]' "$DEPS_JSON")if [[ "$STATUS_ONLY" -eq 1 ]]; then+ if [[ "$n_required_missing" -gt 0 ]]; then+ echo "companions: ${n_required_missing} required missing" >&2+ exit 1+ fiexit 0fiecho "companions: ok=$n_ok skip=$n_skip fail=$n_fail"-# never fail ops-update over companionsexit 0diff --git a/claude-ops/scripts/install-gstack-companion.sh b/claude-ops/scripts/install-gstack-companion.shnew file mode 100755index 00000000..26b026f6--- /dev/null+++ b/claude-ops/scripts/install-gstack-companion.sh@@ -0,0 +1,122 @@+#!/usr/bin/env bash+# install-gstack-companion.sh — co-install gstack as a skills clone.+#+# gstack is not a Claude Code marketplace plugin. It ships as a git repo of+# skills (default: garrytan/gstack) cloned under ~/.claude/skills/gstack so+# /ops:flow ad-hoc mode can route to /spec /review /qa /ship /browse etc.+#+# Portable: no host hardcodes. Override via env:+# GSTACK_REPO git URL (default https://github.com/garrytan/gstack.git)+# GSTACK_DIR install path (default $HOME/.claude/skills/gstack)+# GSTACK_BRANCH branch or tag (default main)+#+# Usage:+# bash scripts/install-gstack-companion.sh+# bash scripts/install-gstack-companion.sh --status+# bash scripts/install-gstack-companion.sh --dry-run+# bash scripts/install-gstack-companion.sh --update+set -euo pipefail++GSTACK_REPO="${GSTACK_REPO:-https://github.com/garrytan/gstack.git}"+GSTACK_DIR="${GSTACK_DIR:-${HOME}/.claude/skills/gstack}"+GSTACK_BRANCH="${GSTACK_BRANCH:-main}"++STATUS_ONLY=0+DRY_RUN=0+UPDATE=0+for arg in "$@"; do+ case "$arg" in+ --status) STATUS_ONLY=1 ;;+ --dry-run) DRY_RUN=1 ;;+ --update) UPDATE=1 ;;+ -h|--help)+ sed -n '2,25p' "$0"+ exit 0+ ;;+ esac+done++gstack_present() {+ if [[ -f "${GSTACK_DIR}/SKILL.md" ]]; then+ return 0+ fi+ if [[ -f "${GSTACK_DIR}/.agents/skills/gstack/SKILL.md" ]]; then+ return 0+ fi+ if [[ -f "${HOME}/.agents/skills/gstack/SKILL.md" ]]; then+ return 0+ fi+ return 1+}++if [[ "$STATUS_ONLY" -eq 1 ]]; then+ if gstack_present; then+ echo "gstack: installed (${GSTACK_DIR})"+ exit 0+ fi+ echo "gstack: missing"+ exit 1+fi++if gstack_present && [[ "$UPDATE" -eq 0 ]]; then+ if [[ -d "${GSTACK_DIR}/.git" ]]; then+ if [[ "$DRY_RUN" -eq 1 ]]; then+ echo "dry-run: would git -C ${GSTACK_DIR} pull --ff-only origin ${GSTACK_BRANCH}"+ exit 0+ fi+ if git -C "$GSTACK_DIR" fetch origin "$GSTACK_BRANCH" >/dev/null 2>&1 \+ && git -C "$GSTACK_DIR" merge --ff-only "origin/${GSTACK_BRANCH}" >/dev/null 2>&1; then+ echo "ok: gstack updated (ff-only) at ${GSTACK_DIR}"+ else+ echo "ok: gstack already present at ${GSTACK_DIR} (update skipped — non-ff or offline)"+ fi+ else+ echo "ok: gstack already present at ${GSTACK_DIR}"+ fi+ exit 0+fi++if [[ "$DRY_RUN" -eq 1 ]]; then+ if [[ -d "${GSTACK_DIR}/.git" ]]; then+ echo "dry-run: would git -C ${GSTACK_DIR} pull --ff-only origin ${GSTACK_BRANCH}"+ else+ echo "dry-run: would git clone --branch ${GSTACK_BRANCH} ${GSTACK_REPO} ${GSTACK_DIR}"+ fi+ exit 0+fi++if ! command -v git >/dev/null 2>&1; then+ echo "error: git is required to install gstack" >&2+ exit 1+fi++if [[ -d "${GSTACK_DIR}/.git" ]]; then+ git -C "$GSTACK_DIR" fetch origin "$GSTACK_BRANCH" >/dev/null 2>&1 || true+ if git -C "$GSTACK_DIR" merge --ff-only "origin/${GSTACK_BRANCH}" >/dev/null 2>&1; then+ echo "ok: gstack updated at ${GSTACK_DIR}"+ exit 0+ fi+ echo "ok: gstack present at ${GSTACK_DIR} (could not ff-only update)"+ exit 0+fi++if [[ -e "$GSTACK_DIR" && ! -d "${GSTACK_DIR}/.git" ]]; then+ echo "error: ${GSTACK_DIR} exists but is not a git clone — set GSTACK_DIR or remove it" >&2+ exit 1+fi++mkdir -p "$(dirname "$GSTACK_DIR")"+if git clone --depth 1 --branch "$GSTACK_BRANCH" "$GSTACK_REPO" "$GSTACK_DIR" >/dev/null 2>&1; then+ echo "ok: gstack cloned to ${GSTACK_DIR}"+ exit 0+fi++if git clone --depth 1 "$GSTACK_REPO" "$GSTACK_DIR" >/dev/null 2>&1; then+ echo "ok: gstack cloned to ${GSTACK_DIR} (default branch)"+ exit 0+fi++echo "error: could not clone gstack from ${GSTACK_REPO}" >&2+echo " try: git clone ${GSTACK_REPO} ${GSTACK_DIR}" >&2+echo " or set GSTACK_REPO / GSTACK_DIR / GSTACK_BRANCH" >&2+exit 1diff --git a/claude-ops/skills/ops-update/SKILL.md b/claude-ops/skills/ops-update/SKILL.mdindex 7604c26e..897b2d59 100644--- a/claude-ops/skills/ops-update/SKILL.md+++ b/claude-ops/skills/ops-update/SKILL.md@@ -26,11 +26,14 @@ The workhorse is **`${CLAUDE_PLUGIN_ROOT}/bin/ops-update`**. It runs a 9-step lo8. **Local sync** — if a linked local source checkout of this repo is present under `~/Projects`, fast-forwards its `main` to `origin/main` so a dev clone never silently drifts behind the published release. Acts only on a clean `main` (never clobbers uncommitted WIP, a feature branch, or unpushed commits); a no-op when no checkout exists. Skip with `--no-localsync`.9. **Report** — old→new, what changed, and that a restart / `/reload-plugins` is needed to load it.10. **Companions** — `bin/ops-update` step 9 runs `scripts/install-companions.sh`- against `plugin-dependencies.json`:- - **desktop-act** (`ops-marketplace`) — always co-install/update (gate:- `desktop_act_co_install`)- - **gsd**, **superpowers**, **feature-dev** — update only if already installed- - **gstack** — not managed by claude-ops (not in the matrix)+ against `plugin-dependencies.json`. Every companion with `required: true` is+ co-installed when missing and updated on every ops-update:+ - **desktop-act** — `/ops:desktop` + captcha cascade+ - **gsd** — `/ops:flow` project mode, `/ops:projects`, `/ops:go`+ - **gstack** — skills clone for `/ops:flow` ad-hoc (`/spec` `/review` `/qa` `/ship`)+ - **superpowers** — merge / orchestrate / triage checkpoints+ - **feature-dev** — `/ops:ops-feature-dev`+ Skip only with `--no-companions` or `OPS_SKIP_COMPANIONS=1`.```bash# manual companion pass@@ -91,7 +94,7 @@ Code constraint, not a failure.| `--no-patches` | Skip the cache-patch reapply step. || `--no-rewrite` | Skip the stale-version-path rewrite step. || `--no-localsync` | Skip fast-forwarding a linked local source checkout's `main`. |-| `--no-companions` | Skip companion install/update (desktop-act, gsd, superpowers, …). |+| `--no-companions` | Skip required companion co-install/update (desktop-act, gsd, gstack, superpowers, feature-dev). |## Mobile / SSH (Rule 7)diff --git a/claude-ops/skills/setup/SKILL.md b/claude-ops/skills/setup/SKILL.mdindex 95d736d0..11415c5e 100644--- a/claude-ops/skills/setup/SKILL.md+++ b/claude-ops/skills/setup/SKILL.md@@ -247,7 +247,7 @@ Use `AskUserQuestion` with `multiSelect: true`. Offer **only sections that need| Option | Header | Description || ------------------ | -------- | ----------------------------------------------- || Configure channels | channels | Set tokens for Telegram, WhatsApp, Email, Slack |-| Companion plugins | plugins | Install desktop-act (ops dep), GSD, Superpowers, feature-dev |+| Companion plugins | plugins | Co-install required deps: desktop-act, GSD, gstack, Superpowers, feature-dev || Save preferences | prefs | Owner name, timezone, default priorities || Shell env | env | Export `CLAUDE_PLUGIN_ROOT` in shell profile |@@ -304,180 +304,65 @@ After installation, re-run `ops-setup-detect` to refresh status before continuin----## Step 2b — Companion plugins (if selected)+## Step 2b — Companion plugins (required co-install)-### desktop-act (co-installed ops dependency — default on)+Companions declared in `plugin-dependencies.json` with `required: true` are+**essential** to named ops commands. They are **not optional prompts**. When the+user selected Companion plugins or "Set up everything", install them without a+Skip choice.-`desktop-act` is listed in the same `ops-marketplace` as the ops plugin and is-declared in `plugin-dependencies.json` / `plugin.json` `dependencies`. It powers-`/ops:desktop` and the unattended captcha cascade. Prefer co-install whenever-ops is installed; do not require a second marketplace add.--Check:+SSOT install (RULE ZERO — background Bash):```bash-bash "${CLAUDE_PLUGIN_ROOT}/scripts/install-desktop-act-companion.sh" --status \- && echo "installed" || echo "not_installed"-```--If `not_installed` and `desktop_act_co_install` is not explicitly false in-userConfig / prefs, **install without prompting** when the user chose-"Set up everything" or selected Companion plugins. Otherwise ask:--```-desktop-act (computer-use MCP) is a companion of ops.- Powers /ops:desktop and captcha cascade for unattended re-auth.- [Install desktop-act (Recommended)] [Skip]-```--On install (RULE ZERO — background Bash):+bash "${CLAUDE_PLUGIN_ROOT}/scripts/install-companions.sh"+bash "${CLAUDE_PLUGIN_ROOT}/scripts/install-companions.sh --status"+```++`--status` exits 1 if any required companion is missing. Report each line+(`installed` / `MISSING`) and re-run the install script once on failures.++| Companion | Kind | Essential for |+| --- | --- | --- |+| desktop-act | marketplace plugin (ops-marketplace) | `/ops:desktop`, captcha cascade |+| gsd | marketplace plugin | `/ops:flow` project mode, `/ops:projects`, `/ops:go` |+| gstack | skills clone (`~/.claude/skills/gstack`) | `/ops:flow` ad-hoc (`/spec` `/review` `/qa` `/ship` `/browse`) |+| superpowers | marketplace plugin | merge / orchestrate / triage checkpoints |+| feature-dev | marketplace plugin | `/ops:ops-feature-dev`, `/flow feature-dev` |++### Rules++1. **No Skip for required companions.** If a required install fails, show the+ error and retry once. Do not mark setup complete while+ `install-companions.sh --status` is non-zero.+2. **Do not hand-roll per-plugin install prompts** unless the bulk script is+ absent (old cache). Prefer the SSOT script above.+3. **gstack** is not a Claude marketplace plugin — the install script clones+ `$GSTACK_REPO` (default `https://github.com/garrytan/gstack.git`) to+ `$GSTACK_DIR` (default `$HOME/.claude/skills/gstack`). Override via env only.+4. Record prefs when status is green: `plugins.desktop_act`, `plugins.gsd`,+ `plugins.gstack`, `plugins.superpowers`, `plugins.feature_dev` = `"installed"`.+5. Opt-out is only via userConfig / env that install scripts already honor+ (e.g. `desktop_act_co_install=false`, `OPS_SKIP_COMPANIONS=1`) — not a wizard Skip.++### Legacy fallback (only if `install-companions.sh` is missing)```bashbash "${CLAUDE_PLUGIN_ROOT}/scripts/install-desktop-act-companion.sh"-```--Record `plugins.desktop_act = "installed"` in `$PREFS_PATH` when `--status` passes.--If they skip:--```-Skipped desktop-act. Install later:- claude plugin install desktop-act@ops-marketplace- # or- bash ${CLAUDE_PLUGIN_ROOT}/scripts/install-desktop-act-companion.sh-```-------### GSD (Get Shit Done)--GSD is a third-party Claude Code plugin that adds project roadmap tracking. When installed, claude-ops dashboards (`/ops:go`, `/ops:projects`, `/ops:next`, `/ops:yolo`) automatically show active phases, progress, and next actions per project. Without it, those sections are simply omitted.--Check if GSD is already installed:--```bash-find ~/.claude -name "gsd-progress" -path "*/skills/*" 2>/dev/null | head -1 | grep -q . && echo "installed" || echo "not_installed"-```--If not installed, ask via `AskUserQuestion`:--```-GSD adds project roadmap tracking to your ops dashboards.- /ops:go shows active phases and progress per project- /ops:projects shows GSD state alongside CI/PR status- /ops:next factors in GSD work priority-- [Install GSD (latest)] [Skip — I don't need roadmap tracking]-```--On install, run the commands directly — do NOT tell the user to run them manually:--```bash-# Install GSD in one shot — no user intervention needed-claude plugin marketplace add gsd-build/get-shit-done 2>/dev/null && \+bash "${CLAUDE_PLUGIN_ROOT}/scripts/install-gstack-companion.sh"+claude plugin marketplace add gsd-build/get-shit-done 2>/dev/nullclaude plugin install gsd@gsd-build-get-shit-done 2>/dev/null-```--If `claude` CLI is not available in the path, fall back to the plugin cache mechanism:--```bash-# Direct marketplace clone fallback-GSD_MARKETPLACE_DIR="$HOME/.claude/plugins/marketplaces/gsd-build-get-shit-done"-if [ ! -d "$GSD_MARKETPLACE_DIR" ]; then- git clone https://github.com/gsd-build/get-shit-done.git "$GSD_MARKETPLACE_DIR" 2>/dev/null-fi-```--Report success/failure. Record `plugins.gsd = "installed"` in `$PREFS_PATH`.--If they skip:--```-Skipped GSD. Install later with: /plugin marketplace add gsd-build/get-shit-done-```-------## Step 2b.5 — Superpowers (optional, recommended)--Several ops skills (`/ops:ops-merge`, `/ops:ops-orchestrate`, `/ops:ops-triage`) integrate with `superpowers:*` skills at key checkpoints — verification-before-completion, finishing-a-development-branch, dispatching-parallel-agents, systematic-debugging. Without superpowers installed, those checkpoints are no-ops; with it, they enforce stronger guardrails on merges, multi-agent dispatch, and root-cause analysis.--Check if superpowers is already installed:--```bash-find ~/.claude/plugins -path "*/superpowers/skills/using-superpowers" -type d 2>/dev/null | head -1 | grep -q . && echo "installed" || echo "not_installed"-```--If not installed, ask via `AskUserQuestion`:--```-Superpowers adds verification, dispatch, and debugging guardrails to ops skills.-- [Install Superpowers (latest)] [Skip — I'll add it later]-```--On install, run the commands directly:--```bash-claude plugin marketplace add obra/superpowers-marketplace 2>/dev/null && \+claude plugin marketplace add obra/superpowers-marketplace 2>/dev/nullclaude plugin install superpowers@superpowers-marketplace 2>/dev/null-```--Fallback if `claude` CLI is not on PATH:--```bash-SP_MARKETPLACE_DIR="$HOME/.claude/plugins/marketplaces/superpowers-marketplace"-if [ ! -d "$SP_MARKETPLACE_DIR" ]; then- git clone https://github.com/obra/superpowers-marketplace.git "$SP_MARKETPLACE_DIR" 2>/dev/null-fi-```--Report success/failure. Record `plugins.superpowers = "installed"` in `$PREFS_PATH`.--If they skip:--```-Skipped Superpowers. Ops skills will run without superpower checkpoints.-Install later with: /plugin marketplace add obra/superpowers-marketplace+claude plugin install feature-dev@claude-plugins-official 2>/dev/null```----## Step 2c — Feature-dev (optional, recommended for structured builds)--The **feature-dev** plugin adds a 7-phase feature pipeline (`code-explorer`, `code-architect`, `code-reviewer` agents). claude-ops routes to it via `/ops:ops-feature-dev`, `/flow feature-dev`, and silent auto-swap when `general-purpose` agents match explore/architect/review keywords.--Check if feature-dev is already installed:--```bash-find ~/.claude ~/.cursor -path "*/feature-dev/*/agents/code-explorer.md" 2>/dev/null | head -1 | grep -q . && echo "installed" || echo "not_installed"-```--If not installed, ask via `AskUserQuestion`:--```plaintext-Feature-dev adds structured feature development (explore → architect → implement → review).+## Step 2c — (reserved numbering) Feature-dev is required via Step 2b- [Install feature-dev (latest)] [Skip — I'll add it later]-```--On install, try the Claude Code plugin CLI when available:--```bash-# Cursor / Claude Code — plugin id varies by marketplace; verify with: claude plugin list-claude plugin install feature-dev@claude-plugins-official 2>/dev/null || true-```--Re-check with the find command above. If still `not_installed`, tell the user to install **feature-dev** from Cursor Settings → Plugins (or their Claude Code marketplace UI), then re-run `/ops:setup`.--Report success/failure. Record `plugins.feature_dev = "installed"` in `$PREFS_PATH` only when the find check passes.--If they skip:--```plaintext-Skipped feature-dev. Install later from Cursor plugins or run /feature-dev after installing the feature-dev plugin.-Structured builds still work via /flow build and gsd-execute-phase without it.-```+Feature-dev is no longer an optional Step. It is co-installed in Step 2b as a+required companion. Structured builds without it hollow out+`/ops:ops-feature-dev` and `/flow feature-dev`.---