Parallel CX session workflow + SETUP.md for new teammates#3
Open
jorrit-stack wants to merge 8 commits into
Open
Parallel CX session workflow + SETUP.md for new teammates#3jorrit-stack wants to merge 8 commits into
jorrit-stack wants to merge 8 commits into
Conversation
…args
Bootstraps a parallel CX workstation workflow that any teammate can set up:
open-cx-session.sh
Spawn a fresh `claude` session per ticket in Warp / Terminal.app / Hyper.
Loads a prompt that walks the standard CX workflow: pull customer context
from Front, query the bolt admin chat, check past conversations, apply
policy from ~/.claude/CLAUDE.md, propose options for the human, draft a
reply, run the bolt-qa-checker skill, post as a Front comment for review.
- Warp (default): uses Warp Launch Configurations (~/.warp/launch_configurations/cx-session.yaml).
Bypasses Agent Mode entirely so no credits are consumed regardless of
the user's Warp settings.
- Terminal: native `do script` (most reliable; just needs Automation perm).
- Hyper: keystroke via System Events. No agent interception.
Auto-detects the `claude` binary across common locations (Homebrew
ARM/Intel, ~/.local/bin) plus a CLAUDE_BIN env-var override.
open-cx-deepdive.sh
Path B in the workflow: skip admin chat and go straight to the CX agent
Codespace (stackblitz/cx-agent). Wakes the Codespace, pulls minimal Front
context for the cnv_id, builds a primer prompt with cnv_id / email /
subject, copies it to the macOS pasteboard, and opens the Codespace's
github.dev URL in the user's browser. The user pastes the primer into
`claude` inside the Codespace to start the deep dive.
Path A (inline escalation from open-cx-session.sh) is handled in
~/.claude/CLAUDE.md instructions — the local session asks before
triggering open-cx-deepdive.sh on the user's confirmation.
gh-cx-agent.sh
Fix argument order on `gh codespace ssh`. The previous invocation passed
the remote command as `-c` (treated as the codespace name selector) and
the codespace name as the positional command — resulting in:
getting full codespace details: HTTP 404: Not Found
(.../user/codespaces/cd%20/workspaces/cx-agent%20...)
Correct order: `-c CODESPACE_NAME` selects the codespace, the trailing
positional is the remote command. Note: this only works end-to-end once
stackblitz/cx-agent has sshd installed (separate PR opened against that
repo).
SETUP.md
End-to-end bootstrap guide so a new teammate can stand up this stack:
prereqs, secrets, Raycast registration, macOS permission grants, smoke
tests, terminal selection, recommended ~/.claude/CLAUDE.md template,
workflow overview, troubleshooting. Process-level guidance only —
specific policy thresholds (live-session plan tier, goodwill amounts)
stay in personal CLAUDE.md and team docs.
README
One-line pointer to SETUP.md at the top.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…P.md
Makes the stack installable by another teammate. Previous SETUP.md was
prereq-shaped; this turns it into a runnable bootstrap with concrete
links, an opinionated workflow for skills + connectors + 1Password, and
a copy-paste-able CLAUDE.md template.
New files
skills/bolt-qa-checker/SKILL.md
skills/bolt-qa-checker/references/quality-rubric.md
skills/empathy-tone-checker/SKILL.md
Team's two custom CX skills committed at the repo root. Source of
truth for the four-dimension rubric (Empathy & Communication,
Ownership & Resolution, Technical Quality, Efficiency) and the
phrase-level rewrite helper. Treat these as team-versioned — when
the rubric calibrates, update here and re-run install-skills.sh
everywhere.
install-skills.sh
Raycast-compatible installer. Copies each skill dir from this repo's
skills/ into ~/.claude/skills/ so Claude Code picks them up
automatically on every session start. Idempotent — re-run after
pulling updates.
CLAUDE.md.example
Template ~/.claude/CLAUDE.md that a new teammate copies and edits.
Personal bits use [PLACEHOLDERS]; universal content (tool stack,
admin URLs, Bolt + Supabase staging guidance, agent picker change,
Slack channels, English-only reply rule, draft-style rules) is
pre-populated. Specific dollar/token thresholds intentionally
deferred to team-level discussion rather than committed in plaintext.
SETUP.md rewrite
- Distinguish Claude Code CLI from Claude Desktop (only the CLI is
required).
- Reframe Notion / Slack / Linear as Claude connectors (MCP) rather
than API keys. Linear/Slack keys in .env are now correctly marked
optional — only consumed by customer-360's mention-scan, not the
interactive workflow.
- Add 1Password as the source for the shared Front API key and Stripe
Keychain value (reference by item name, not deep link — repo is
public).
- Explicit per-key table (required/optional/where-from) instead of a
prose paragraph.
- Add Codespace creation step for cx-agent so first-time users land
on their own Codespace rather than failing the deep-dive flow.
- Updated troubleshooting and maintenance sections.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Warp's Launch Configurations path opens Warp on invocation but doesn't reliably execute the configured command in current testing (Warp lands in an empty shell with no error). Until that's worked out, switch the default spawn target to Terminal.app, which is verified working end-to-end via `do script`. Hyper remains the keystroke-based alternative. Warp branch stays in the script but is documented as experimental; set CX_TERMINAL=Warp to opt back in. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ap script Previously the Terminal branch used osascript -> tell application Terminal -> do script. This requires Automation permission for the calling process (Raycast) to control Terminal.app — a permission most new users haven't granted, and when missing it fails silently (Terminal opens but receives no command = blank window). Switch to writing a self-cleaning bootstrap shell script to /tmp and handing it to `open -a Terminal`. `open` uses LaunchServices, not AppleScript, and doesn't need any per-app Automation permission. The bootstrap script: - cd's to the working directory - prints the [cx-session] bootstrap line for visibility - reads the prompt from the original /tmp/cx-session-prompt.XXX file - self-deletes both that prompt file and itself - execs into claude with the prompt Net effect: same UX, fewer required setup steps for new teammates, no more blank Terminal windows from Raycast. Hyper branch (keystroke automation) and Warp branch (Launch Configurations, experimental) unchanged. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The `open -a Terminal <bootstrap-script>` approach didn't reliably execute the bootstrap script on Jorrit's Mac (Terminal opened blank). LaunchServices behavior for .sh files turns out to be too dependent on Terminal preferences and macOS version. Revert to the original osascript + `do script` approach. This requires the calling process (Raycast, your shell) to have Automation permission for Terminal in System Settings → Privacy & Security → Automation. Documented inline and in SETUP.md. For users who don't want to grant that permission, CX_TERMINAL=Hyper uses keystroke automation (different permission model — Accessibility for System Events instead of per-app Automation). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Terminal.app works via osascript do-script when the calling process has Automation permission, but Hyper is more reliably plug-and-play across fresh setups (Accessibility for System Events is broader and usually already granted for keystroke-using apps). Terminal remains a supported choice via CX_TERMINAL=Terminal. Warp stays experimental. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
install-skills.sh
Previous version used `cp -R "$skill_dir" "$SKILLS_DST/"` where skill_dir
ended with `/` (from the glob `*/`). On macOS that causes cp to copy the
contents of the source directory, not the directory itself — so both
skills ended up flattened into ~/.claude/skills/ (with SKILL.md from one
overwriting SKILL.md from the other). Strip the trailing slash and use
an explicit destination path per skill.
After fix:
~/.claude/skills/bolt-qa-checker/SKILL.md
~/.claude/skills/bolt-qa-checker/references/quality-rubric.md
~/.claude/skills/empathy-tone-checker/SKILL.md
open-cx-session.sh
Prompt referenced `anthropic-skills:bolt-qa-checker` (a plugin namespace
used by Claude Desktop when the skill ships as part of an anthropic-skills
plugin). For user-level installs at ~/.claude/skills/<name>/, the bare
name `bolt-qa-checker` is correct. Updated.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bundles the new CX automation workflow (parallel Claude sessions per ticket, deep-dive escalation to the cx-agent Codespace) and a
SETUP.mdso any teammate can bootstrap the same stack.What's in this PR
New:
open-cx-session.shSpawn a fresh
claudesession per ticket in Warp / Terminal.app / Hyper. The session walks the standard CX workflow: pull Front context, query the bolt admin chat, check past conversations, apply policy from~/.claude/CLAUDE.md, propose options for the human, draft a reply, run thebolt-qa-checkerskill, post as a Front comment.Trigger N times from Raycast → N parallel terminal tabs each working a different ticket.
Spawn-target switch via
CX_TERMINAL:Warp(default)~/.warp/launch_configurations/cx-session.yaml)Terminaldo scriptHyperclaudebinary auto-detection across Homebrew ARM/Intel +~/.local/bin+ PATH lookup, withCLAUDE_BINenv-var override.New:
open-cx-deepdive.shSkip admin chat and go straight to the CX agent Codespace. Wakes
stackblitz/cx-agentviagh codespace start, pulls minimal Front context (email + subject) for thecnv_id, builds a primer prompt, copies it to the macOS pasteboard, and opens the Codespace'sgithub.devURL in the browser. Paste the primer intoclaudeinside the Codespace to start the deep dive.Path A (inline escalation from
open-cx-session.sh) is handled via instructions in the recommended~/.claude/CLAUDE.md— the local session asks before triggering this script on the user's confirmation.Fix:
gh-cx-agent.shssh argument orderThe previous invocation passed the remote command as
-c(whichghtreats as the codespace name selector) and the codespace name as the positional command. Result:ghwas looking up a codespace literally namedcd /workspaces/cx-agent && echo .... Swap to correct order:gh codespace ssh -c "$CODESPACE_NAME" "<remote command>".Note: end-to-end usability still depends on adding sshd to the cx-agent devcontainer (separate PR opened on
stackblitz/cx-agent).New:
SETUP.mdEnd-to-end bootstrap guide so a new teammate can stand up this stack from scratch:
~/.claude/CLAUDE.mdtemplate — process-level only. Specific policy thresholds (live-session plan tier, goodwill amounts) stay personal/team-shared.Docs: README pointer
One-line pointer to
SETUP.mdat the top ofREADME.md.Dependencies
open-cx-session.shandopen-cx-deepdive.shto be useful end-to-end, the existing PR Add front-to-admin-chat: Front context → admin chat with prefilled query #2 (front-to-admin-chat) should land first. Without it the local Claude session can't pull Front + admin chat context as efficiently. The new scripts work standalone — they just callfront-to-admin-chat/index.jsif available.gh-cx-agent.shpath to fully work, the matching PR onstackblitz/cx-agent(adds sshd feature) must merge and the Codespace must be rebuilt.Test plan
bash open-cx-session.sh cnv_xxxopens a Warp tab via Launch Configurations (no Agent Mode interception, no credit consumption)CX_TERMINAL=Terminal bash open-cx-session.sh cnv_xxxopens a single Terminal.app windowCX_TERMINAL=Hyper bash open-cx-session.sh cnv_xxxopens Hyper via keystroke (Agent permissions granted)~/Documents/Raycast-scripts/cx-briefing/.envand authenticates Front + Linear + Slackbash open-cx-deepdive.sh cnv_xxxwakes the cx-agent Codespace and openshttps://<codespace>.github.dev/; primer is on clipboardopen-cx-session.shin quick succession produces 3+ independent terminal tabs🤖 Generated with Claude Code