Agent-driven install runbooks (Claude Desktop + Codex) - #2
Conversation
End-to-end workflow skill that consumes a writing-plans plan, branches off main, implements via TDD, opens PR, loops on Aria code review (cap 10), squash-merges, and notifies via /aria:notify. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Default is --no-merge: after Aria approves, notify with "PR Ready to Merge!" including any detected staging URL, then halt. --merge preserves the original auto-squash-merge + "PR Merged!" flow. Adds staging URL detection via GitHub Deployments API, status check targetUrls, and known preview bot comments. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8-task plan to build the single-file user-level skill. Each task writes one or two phase sections + commits. Final task validates YAML frontmatter, scans for placeholder leakage, and hands off a manual smoke-test checklist (Aria is a live service so end-to-end automation isn't possible). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a design spec for per-harness, agent-targeted install runbooks under agents/install/. Covers Claude Desktop and Codex CLI in this initial pass, with a 7-phase linear structure (preflight, GCP setup, uv install, CLI install, account auth, harness config wiring, verify) and explicit hand-holding tone for non-technical users. No test added — this is a documentation-only change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A user with prior GCP work may have multiple client_secret_*.json files in ~/Downloads. The original spec used a blind `mv ~/Downloads/client_secret_*.json` which fails noisily on multiple matches and risks picking the wrong file silently. Splits 1h into "locate/confirm" and 1i "move/verify" sub-phases with an explicit zero/one/many decision tree. No test added — this is a documentation-only change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Seven-task plan covering the two per-harness runbooks (claude-desktop.md and codex.md) plus the README pointer + reorganization. Tasks are phase-by-phase for the Claude Desktop runbook, then a single-task copy + adapt step for Codex, then README, then a final sanity sweep. No test added — documentation-only change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds agents/install/claude-desktop.md with header, tone guidance, and the Phase 0 (Preflight) detection block. The account-files check uses `find` rather than a bare glob so the runbook stays portable across bash and zsh (zsh's NOMATCH errors out on `ls foo/*.json` with no matches, before the redirection takes effect). Subsequent phases land in follow-up commits. No test added — documentation-only change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nine sub-phases (1a-1i) walking a non-technical user through GCP project creation, API enablement, OAuth consent setup, OAuth client creation, and client_secret.json placement. Sub-phase 1h uses `find -maxdepth 1 -print0 | xargs -0 ls -lt` rather than `ls ~/Downloads/client_secret_*.json` so it stays clean under zsh's default NOMATCH option, and includes the zero/one/many decision tree for users with prior GCP downloads in ~/Downloads. No test added — documentation-only change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…p runbook Phase 2 walks the agent through bootstrapping `uv` if missing. Phase 3 runs `uv tool install .` from the repo root. Phase 4 walks the user through `multi-google-mcp-auth add <label>` and the browser OAuth consent flow. Phase 4's detection check uses `find` rather than a bare glob to stay portable across bash and zsh. No test added — documentation-only change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…top runbook Phase 5 walks the agent through the read-merge-write of ~/Library/Application Support/Claude/claude_desktop_config.json, with explicit backup before write, JSON parse-failure guarding, and preservation of pre-existing mcpServers entries via `jq` assignment. Phase 6 covers the restart and smoke-test prompt, with a failure-mode diagnostic checklist for the case where Claude Desktop doesn't pick up the new server. Includes a closing "You're done" section listing add/list/remove and troubleshooting pointers. No test added — documentation-only change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors agents/install/claude-desktop.md except for the harness-specific parts: - Title + audience intro reference Codex / TOML rather than Claude Desktop / JSON - Phase 0 check #5 looks at ~/.codex/config.toml; check #6 greps for the [mcp_servers.multi-google] section - Phase 5 uses a TOML append-with-backup pattern instead of `jq` JSON merge - Phase 6 references restarting a `codex` session rather than Cmd+Q on Claude Desktop, and points at ~/.codex/log/ for diagnostics Verified the TOML append preserves pre-existing sections on a scratch file before committing. No test added — documentation-only change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a "Quick install (let an agent do it)" section right after Prerequisites that links to agents/install/claude-desktop.md and agents/install/codex.md. The existing GCP / Install / Add account / Wire into Claude Desktop subsections are now nested under a new "Manual install" H2 parent — content unchanged, just demoted from H2 to H3. This makes the new runbooks discoverable to both humans skimming the README and to AI agents reading the repo to figure out how to install the server for the user. No test added — documentation-only change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
aria-teknal-studio
left a comment
There was a problem hiding this comment.
Findings:
-
[P1] Treat failed check lookup as a merge blocker —
docs/superpowers/plans/2026-05-18-code-task.md:666The
--mergepath capturesgh pr checks "$PR_URL" 2>&1and only blocks when the output text containsfailorpending. If the checks lookup itself fails, is rate-limited, cannot reach GitHub, returns an auth error, or reports another non-green state such as cancelled/timed out/skipped, this grep can miss it and proceed togh pr merge. In repositories without branch protection, that turns a CI verification failure into an auto-merge. Please check thegh pr checksexit status and/or consume structured JSON, and require every relevant check conclusion/status to be explicitly green before merging. Unknown/error/no-checks should fail closed. -
[P2] Pytest detection example skips pytest for the common pyproject case —
docs/superpowers/plans/2026-05-18-code-task.md:447The command
[ -f pyproject.toml ] || [ -f pytest.ini ] && pytestis parsed as[ -f pyproject.toml ] || ( [ -f pytest.ini ] && pytest ), so repositories with apyproject.tomldo not run pytest at all. This conflicts with the detection table immediately above and can let the generated/code-taskskill push or merge Python changes without running tests. Wrap the condition, for example([ -f pyproject.toml ] || [ -f pytest.ini ]) && pytest.
Summary:
The install runbook additions look generally careful, and local verification of the current Python gate passed (uv run ruff check . && uv run mypy && uv run pytest). CI is green for the existing Python package, but it does not exercise the new runbook/automation shell snippets. The blocking risk is in the added automation docs that can become a user-level code-changing skill.
Aria flagged that the documented Step 6.2 merge guard greps for the literal strings 'fail|pending' in `gh pr checks` output. That string- matching approach silently passes if the command itself errors (rate- limit, auth failure, network), times out, or reports states it doesn't match (cancelled, skipped, action_required), turning a CI verification failure into an auto-merge. Switches to the canonical signal — `gh pr checks`'s exit code — which the live /code-task skill spec already uses. Fails closed on any non-zero exit. The plan doc was lagging the live skill on this point. Addresses Aria's P1 finding on PR #2. P2 (claimed bash precedence bug in the pytest detection example) is not actually a bug: bash `||` and `&&` are left-associative with equal precedence, so `A || B && C` parses as `(A || B) && C` per the bash manual, which is the intended behavior. Empirical test confirms the original snippet correctly runs pytest when either pyproject.toml or pytest.ini is present. Leaving Step 3.1's example unchanged. No test added — documentation-only change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Thanks Aria — addressed both findings: P1 ( P2 (pytest detection precedence) — respectfully disagree, leaving as-is. The diagnosis cites the parsing as The snippet does the intended thing. If you have evidence to the contrary (a specific bash version where this parses differently, or a POSIX-strict shell), happy to take another look — but on standard bash 3+/4+/5+ this isn't a bug. Leaving Step 3.1's example unchanged. |
aria-teknal-studio
left a comment
There was a problem hiding this comment.
Findings:
-
High - Account verification prints Google refresh tokens to stdout.
Files: agents/install/claude-desktop.md:497 and agents/install/codex.md:496
Both runbooks verify account setup withjq -e '.refresh_token' ~/.config/multi-google-mcp/accounts/<label>.json. Without>/dev/null, jq prints the actual refresh token into the terminal, agent transcript, debug logs, or any command-output capture. These tokens grant long-lived Gmail/Calendar/Drive access, so this turns a verification step into a credential disclosure. Use a non-printing predicate instead, for example:
jq -e '(.refresh_token | type == "string" and length > 0)' ... >/dev/null.
Also update any copied guidance in the design/spec docs if those are intended to be followed by agents. -
Medium - Claude Desktop wiring uses a bare command that often fails from GUI-launched apps on macOS.
File: agents/install/claude-desktop.md:540 and agents/install/claude-desktop.md:558
The runbook installs viauv tool install ., then writes{"command": "multi-google-mcp"}to Claude Desktop config. When Claude Desktop is launched from Finder/Dock, it commonly does not inherit the interactive shell PATH where uv places tool shims (often~/.local/bin). The runbook can pass its owncommand -v multi-google-mcpdetection in the terminal but still produce a Claude config that cannot start the server after restart. Capture the absolute path fromcommand -v multi-google-mcpafter install and write that path into the Claude config, or include an explicitenv.PATHentry and verify it matches the actual uv tool location. The Codex runbook is less exposed because Codex is normally launched from a shell, but Claude Desktop needs the stronger path handling.
Verification:
- uv run ruff check . passed.
- uv run mypy passed.
- uv run pytest passed: 88 tests.
- GitHub PR check "pytest + ruff + mypy" is passing.
Summary:
The docs/runbooks are thorough and CI is green, but these two install-flow issues are user-facing and security/compatibility relevant. I would not merge until the token-printing verification commands are fixed and Claude Desktop uses a launch-safe server path.
Two findings, both legitimate: P1 (High) — refresh-token leak in account verification. Phase 4's verification ran `jq -e '.refresh_token' …` without redirecting stdout, which printed the live Google OAuth refresh token into the agent's output (and from there into the conversation transcript). Switches to the boolean predicate `jq -e '.refresh_token != null'` with explicit `>/dev/null`, and adds a NEVER rule explicitly forbidding the bare form. Same fix applied to both runbooks. P2 (Medium) — bare-name server command in harness configs. Claude Desktop launched from Finder/Dock inherits launchd's minimal PATH (/usr/bin:/bin:/usr/sbin:/sbin), not the shell PATH that includes ~/.local/bin where `uv tool install` puts binaries. The same PATH risk applies to Codex under non-login shells or GUI wrappers. Phase 5 now resolves the absolute path via `command -v multi-google-mcp` at write time and stores that. Phase 5 detection also verifies the stored path points at an executable file, so a stale bare-name entry from a prior install is detected and overwritten on rerun. Codex's TOML write gained an in-place replace branch (awk-based) for the same reason, which preserves blank lines between sections. No test added — documentation-only change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Round 2 addressed in
|
aria-teknal-studio
left a comment
There was a problem hiding this comment.
Findings:
-
High - The copied install-plan guidance still prints OAuth refresh tokens.
File: docs/superpowers/plans/2026-05-19-agent-install-runbook.md:656
The primary runbooks were fixed, but this PR still adds a plan document that tells agents to verify account setup withjq -e '.refresh_token' ~/.config/multi-google-mcp/accounts/<label>.json. If an agent follows or copies this plan, jq prints the live Google refresh token into terminal output/transcripts/logs. Since this PR is explicitly adding agent-facing install guidance, the unsafe duplicate needs the same non-printing predicate used in the runbooks, e.g.jq -e '(.refresh_token | type == "string" and length > 0)' ... >/dev/null. Please update or clearly mark the stale plan snippet as superseded so future agents do not reintroduce the credential leak. -
Medium - The supporting design/plan docs still encode the old bare-command harness wiring.
Files: docs/superpowers/specs/2026-05-19-agent-install-runbook-design.md:383 and docs/superpowers/plans/2026-05-19-agent-install-runbook.md:755
The active Claude/Codex runbooks now correctly resolve and store an absolutemulti-google-mcppath, but these newly-added support docs still prescribe"command": "multi-google-mcp"/command = "multi-google-mcp". That leaves the design record contradicting the fixed runbooks and makes it easy for the next agent to regenerate or patch the runbook back to the GUI PATH bug. Please bring the spec/plan docs in sync with the absolute-path approach or mark the old snippets as obsolete.
Verification:
- uv run ruff check . passed.
- uv run mypy passed.
- uv run pytest passed: 88 tests.
- GitHub PR check "pytest + ruff + mypy" is passing.
Summary:
The active runbooks now address the previous findings, but the PR still adds stale copied guidance with the same token-disclosure and launch-path problems. Because these are agent-facing docs, I would not merge until the duplicates are corrected or explicitly deprecated.
Aria's round 3 noted that while the canonical runbooks were fixed for the refresh-token leak (jq output redirection) and the GUI-PATH issue (absolute path via command -v), the design spec and implementation plan that ship in the same PR still echoed the pre-fix examples. Future agents reading them could mimic the unsafe patterns. Changes: - Spec §11 verification: switch to `jq -e '.refresh_token != null' ... >/dev/null` with explicit rationale. - Spec §12.1 Claude Desktop variant: introduce <MGM_BIN> placeholder, document the launchd-PATH rationale, update the schema and merge logic to use the resolved absolute path, update verification to also assert [ -x "$STORED_CMD" ]. - Spec §12.2 Codex variant: same MGM_BIN pattern, add the in-place rewrite branch for stale bare-name installs, update verification to parse the command back out and check executability. - Plan Task 3 (Phase 4 verification): same refresh-token redact pattern. - Plan Task 4 (Phase 5 Claude Desktop section): rewrite with MGM_BIN resolution and the executable-path verification. - Plan Task 5 (Phase 5 Codex section): rewrite with the append-or-replace awk pattern and MGM_BIN. - Plan Task 4 Step 3 sanity test: use MGM_BIN. - Plan Task 5 Step 8 sanity test: use MGM_BIN. - Both files now carry a "canonical source" banner at the top noting the runbooks are authoritative when the docs drift. The two remaining `"command": "multi-google-mcp"` references in the files are inside explanatory prose discussing why the bare form is wrong — kept intentionally as cautionary examples. No test added — documentation-only change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Round 3 addressed in
|
aria-teknal-studio
left a comment
There was a problem hiding this comment.
No findings.\n\nThe current head resolves the prior review issues:\n- The active Claude Desktop and Codex runbooks no longer print refresh tokens during account verification; the remaining matches are cautionary text explaining why the unredirected form is unsafe.\n- The active runbooks now resolve with and write an executable absolute path into harness config.\n- The supporting spec/plan docs were brought into alignment with those safety fixes and now clearly defer to the shipped runbooks as canonical.\n\nVerification:\n- All checks passed! passed.\n- Success: no issues found in 14 source files passed.\n- ........................................................................ [ 81%]
................ [100%]
88 passed in 0.28s passed: 88 tests.\n- GitHub PR check is passing.\n\nResidual risk:\nThis is documentation-only, so CI does not exercise the runbooks end-to-end in a real Claude Desktop/Codex installation. Manual install smoke testing is still the meaningful final gate for these docs.\n
aria-teknal-studio
left a comment
There was a problem hiding this comment.
No findings.
The current head resolves the prior review issues:
- The active Claude Desktop and Codex runbooks no longer print refresh tokens during account verification; the remaining
.refresh_tokenmatches are cautionary text explaining why the unredirected form is unsafe. - The active runbooks now resolve
multi-google-mcpwithcommand -vand write an executable absolute path into harness config. - The supporting spec/plan docs were brought into alignment with those safety fixes and now clearly defer to the shipped runbooks as canonical.
Verification:
uv run ruff check .passed.uv run mypypassed.uv run pytestpassed: 88 tests.- GitHub PR check
pytest + ruff + mypyis passing.
Residual risk:
This is documentation-only, so CI does not exercise the runbooks end-to-end in a real Claude Desktop/Codex installation. Manual install smoke testing is still the meaningful final gate for these docs.
Summary
agents/install/— one for Claude Desktop, one for Codex CLI. Both walk a non-technical user through GCP project setup, OAuth client creation,uv tool install, account auth, and harness config wiring with patient one-step-at-a-time pacing.~/Downloadsdoesn't get bitten by a blind glob, and usesfind ... -print0 | xargs -0 ls -ltto stay clean under zsh'sNOMATCHdefault.Test plan
ruff check .— passesmypy— no issues in 14 source filespytest— 88 passedNOMATCHerrorsfind ... -print0 | xargs -0 ls -ltreturns cleanly with zero matchesjqmerge preserves pre-existingmcpServersentries (verified against a scratch JSON)🤖 Generated with Claude Code