Skill Tracer
Skills › gstack › design-review › outside-voices.md

outside-voices.md

142 lines · design-review/sections/outside-voices.md at 3f79d81

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1<!-- AUTO-GENERATED from outside-voices.md.tmpl — do not edit directly -->
2<!-- Regenerate: bun run gen:skill-docs -->

<!-- AUTO-GENERATED from outside-voices.md.tmpl — do not edit directly --> <!-- Regenerate: bun run gen:skill-docs -->

Raw lines 1 to 2
3## Design Outside Voices (independent)
4
5**Consent:** Outside voices run without a question when Codex is available and `codex_reviews` allows the send (unset means the default, enabled; the first send prints a one-time notice). `codex_reviews=disabled` runs only the native voice.
6
7**Check Codex availability:**
8```bash
9
10if ! _OUTSIDE_CFG=$("$HOME/.claude/skills/gstack/bin/gstack-config" get --stored codex_reviews) || [ "$_OUTSIDE_CFG" = disabled ]; then
11 echo 'CODEX_MODE: disabled'
12elif ( # GSTACK_ACTIVE_HOST names the harness, never the model.
13if { [ -n "${CODEX_THREAD_ID:-}" ] || [ -n "${CODEX_SANDBOX:-}" ] || [ "${GSTACK_ACTIVE_HOST:-}" = codex ]; }; then
14 echo 'Codex outside review unavailable: harness mismatch; no outside process started. Missing coverage.' >&2
15 if { [ -n "${CLAUDECODE:-}" ] || [ "${GSTACK_ACTIVE_HOST:-}" = claude ]; } && { [ -n "${CODEX_THREAD_ID:-}" ] || [ -n "${CODEX_SANDBOX:-}" ] || [ "${GSTACK_ACTIVE_HOST:-}" = codex ]; }; then
16 echo 'Inherited harness markers conflict. Run setup --host <actual-harness> (claude or codex); do not guess a replacement provider.' >&2
17 else
18 echo 'Repair installed skills: run setup --host codex from your gstack checkout.' >&2
19 fi
20 exit 78
21fi
22); then
23 if command -v codex >/dev/null 2>&1; then echo 'CODEX_MODE: ready'; else echo 'CODEX_MODE: not_installed'; fi
24else
25 echo 'CODEX_MODE: under_current_harness'
26fi
27```
29The historical `CODEX_MODE` variable describes **Codex** availability here. `CODEX_MODE: disabled` or a send's `consent_missing` line: `codex_reviews` is off or unreadable; do not ask; record `outside_status: disabled`. Authentication and configured model validity are checked by the actual invocation, without overriding either. Missing/broken CLI: install or repair Codex; authentication failure: run `codex login`. Otherwise honor this caller’s opt-in/skip choice. Any non-ready outcome is missing outside coverage; follow the caller’s existing fallback. Never substitute another external provider.
31Declined: skip both voices. `CODEX_MODE: disabled`: run only the native voice and record `outside_status: disabled`. Non-ready: retain the repair notice, use only the native voice, and record `outside_status: unavailable` even if it succeeds. The invocation rechecks the harness before spawning.
33**When ready**, run both voices and await both before synthesis. Overlap calls
34if supported; keep the native call blocking.
361. **Codex design voice** (via Bash):
37Prompt (include the actual plan/product/frontend source context, not only file paths):
39"Review the frontend source code in this repo. Evaluate against these design hard rules:
40- Spacing: systematic (design tokens / CSS variables) or magic numbers?
41- Typography: expressive purposeful fonts or default stacks?
42- Color: CSS variables with defined system, or hardcoded hex scattered?
43- Responsive: breakpoints defined? calc(100svh - header) for heroes? Mobile tested?
44- A11y: ARIA landmarks, alt text, contrast ratios, 44px touch targets?
45- Motion: one authored moment (an entrance or scroll-linked reveal, ease-out from a visible default) plus state transitions only where they carry information, or zero / ornamental only?
46- Cards: used only when card IS the interaction? No decorative card grids?
48First classify as MARKETING/LANDING PAGE vs APP UI vs HYBRID, then apply matching rules.
50LITMUS CHECKS — answer YES/NO:
511. Brand/product unmistakable in first screen?
522. One strong visual anchor present?
533. Page understandable by scanning headlines only?
544. Each section has one job?
555. Are cards actually necessary?
566. Does motion improve hierarchy or atmosphere?
577. Would design feel premium with all decorative shadows removed?
59HARD REJECTION — flag if ANY apply:
601. Generic SaaS card grid as first impression
612. Beautiful image with weak brand
623. Strong headline with no clear action
634. Busy imagery behind text
645. Sections repeating same mood statement
656. Carousel with no narrative purpose
667. App UI made of stacked cards instead of layout
68Be specific. Reference file:line for every finding."
70Write the **complete prompt and context**, including actual plan/spec/source, to a private file. Substitute its shell-quoted path for `<prepared-prompt-file>`; never interpolate user text into shell source. Request a severity (Critical, High, Medium or Low) per finding and a final Recommendation: <action> because <specific reason> line, including an explicit no-findings rationale.
72```bash
73# GSTACK_ACTIVE_HOST names the harness, never the model.
74if { [ -n "${CODEX_THREAD_ID:-}" ] || [ -n "${CODEX_SANDBOX:-}" ] || [ "${GSTACK_ACTIVE_HOST:-}" = codex ]; }; then
75 echo 'Codex outside review unavailable: harness mismatch; no outside process started. Missing coverage.' >&2
76 if { [ -n "${CLAUDECODE:-}" ] || [ "${GSTACK_ACTIVE_HOST:-}" = claude ]; } && { [ -n "${CODEX_THREAD_ID:-}" ] || [ -n "${CODEX_SANDBOX:-}" ] || [ "${GSTACK_ACTIVE_HOST:-}" = codex ]; }; then
77 echo 'Inherited harness markers conflict. Run setup --host <actual-harness> (claude or codex); do not guess a replacement provider.' >&2
78 else
79 echo 'Repair installed skills: run setup --host codex from your gstack checkout.' >&2
80 fi
81 exit 78
82fi
84_REPO_ROOT=$(git rev-parse --show-toplevel) || { echo 'ERROR: not in a git repo' >&2; exit 1; }
85_OUTSIDE_TMP=$(mktemp -d "${TMPDIR:-/tmp}/gstack-outside.XXXXXXXX") || exit 1
86trap 'rm -rf "$_OUTSIDE_TMP"' EXIT
87_OUTSIDE_INPUT="$_OUTSIDE_TMP/prompt"
88cat -- '<prepared-prompt-file>' >"$_OUTSIDE_INPUT" || exit 1
90_CODEX_PROBE="$HOME/.claude/skills/gstack/bin/gstack-codex-probe"
91_CODEX_OUT=$("$_CODEX_PROBE" select-model exec) || exit 1
92_CODEX_SEL=$(echo "$_CODEX_OUT" | sed -n 's/^CODEX_SEL: //p')
93_CODEX_SANDBOX_MODE=$(echo "$_CODEX_OUT" | sed -n 's/^CODEX_SANDBOX: //p')
94"$_CODEX_PROBE" check-sandbox || exit 1
95"$_CODEX_PROBE" show-first-use-notice
96_OUTSIDE_EXIT=0
97"$_CODEX_PROBE" run-with-timeout --effort high 300 codex exec - -C "$_REPO_ROOT" -s "${_CODEX_SANDBOX_MODE:?}" -c "model=\"${_CODEX_SEL:?}\"" -c skills.include_instructions=false -c 'web_search="cached"' --json -o "$_OUTSIDE_TMP/text" <"$_OUTSIDE_INPUT" >"$_OUTSIDE_TMP/events" 2>"$_OUTSIDE_TMP/stderr" || _OUTSIDE_EXIT=$?
98cat "$_OUTSIDE_TMP/text" 2>/dev/null || tail -n 20 "$_OUTSIDE_TMP/events"
100cat "$_OUTSIDE_TMP/stderr" >&2 || { [ "$_OUTSIDE_EXIT" -ne 0 ] || _OUTSIDE_EXIT=1; }
101_OUTSIDE_RC=0
102bun --no-env-file --config=/dev/null "$HOME/.claude/skills/gstack/lib/outside-review-result.ts" --label 'Codex outside review' --exit "$_OUTSIDE_EXIT" --stderr "$_OUTSIDE_TMP/stderr" --events "$_OUTSIDE_TMP/events" review "$_OUTSIDE_TMP/text" || _OUTSIDE_RC=$?
103case "$_OUTSIDE_RC" in
104 0|3) ;;
105 4) echo 'OUTSIDE_STATUS: unverified provider=codex host=claude'; exit 4 ;;
106 *) [ "$_OUTSIDE_EXIT" -ne 0 ] && exit "$_OUTSIDE_EXIT"; exit 1 ;;
107esac
108echo 'OUTSIDE_STATUS: completed provider=codex host=claude'
109```
111Use Bash `timeout: 360000`; show the full response in a `tool-output` fence. Require successful execution and valid markers. Refusal, empty/malformed output, missing score/severity/completion markers, timeout or CLI failure means `outside_status: unavailable`. P0/P1 findings block like native ones; `OUTSIDE_STATUS: unverified` is missing coverage. Use the caller's fallback; missing coverage is never clean/PASS. After either outcome, delete only your private prompt; scratch cleanup is automatic.
1132. **Claude design subagent** (Agent tool, `run_in_background: false` when available; await its result. A launch receipt means it went background: await its completion notice.):
114"Review the frontend source code in this repo. You are an independent senior product designer doing a source-code design audit. Focus on CONSISTENCY PATTERNS across files rather than individual violations:
115- Are spacing values systematic across the codebase?
116- Is there ONE color system or scattered approaches?
117- Do responsive breakpoints follow a consistent set?
118- Is the accessibility approach consistent or spotty?
120For each finding: what's wrong, severity (critical/high/medium), and the file:line."
122**Error handling (all non-blocking):**
123- **Auth failure:** If stderr contains "auth", "login", "unauthorized", or "API key": "Codex authentication failed. Run `codex login` to authenticate."
124- **Timeout:** "Codex timed out after 5 minutes."
125- **Empty response:** "Codex returned no response."
126- On any Codex error: proceed with Claude subagent output only, tagged `[single-model]`.
127- If Claude subagent also fails: "Outside voices unavailable — continuing with primary review."
129Output headers: `CODEX SAYS (design source audit):` and `CLAUDE SUBAGENT (design consistency):`.
131**Synthesis — Litmus scorecard:**
133Use the same scorecard format as /plan-design-review (shown above). Fill in from both outputs.
134Merge findings into the triage with `[codex]` / `[subagent]` / `[cross-model]` tags.
136**Log the result:**
137```bash
138~/.claude/skills/gstack/bin/gstack-review-log '{"skill":"design-outside-voices","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","status":"STATUS","source":"SOURCE","host":"claude","outside_provider":"codex","outside_status":"OUTSIDE_STATUS","phase":"design","commit":"'"$(git rev-parse --short HEAD)"'"}'
139```
140STATUS="clean" requires a completed review with no findings; use "issues_found" for findings, "unavailable" if neither completed. SOURCE is the completed provider or in-host.
142Retain the historical review-log skill ID; add `"host":"claude","outside_provider":"codex","outside_status":"completed|unavailable|disabled|skipped","phase":"design"`. Record differing attempt outcomes separately. `source:"codex"` requires completed CLI output; native uses `source:"in-host"` (historical `source:"claude"`: native Claude). Availability/native fallback is not outside completion. Preserve all reported modelUsage; unknown model identity stays unknown. Under `GSTACK_CODEX_NO_SANDBOX=1` add `"codex_sandbox":"danger-full-access"`.

Design Outside Voices (independent)

Consent: Outside voices run without a question when Codex is available and codex_reviews allows the send (unset means the default, enabled; the first send prints a one-time notice). codex_reviews=disabled runs only the native voice.

Check Codex availability:


if ! _OUTSIDE_CFG=$("$HOME/.claude/skills/gstack/bin/gstack-config" get --stored codex_reviews) || [ "$_OUTSIDE_CFG" = disabled ]; then
  echo 'CODEX_MODE: disabled'
elif ( # GSTACK_ACTIVE_HOST names the harness, never the model.
if { [ -n "${CODEX_THREAD_ID:-}" ] || [ -n "${CODEX_SANDBOX:-}" ] || [ "${GSTACK_ACTIVE_HOST:-}" = codex ]; }; then
  echo 'Codex outside review unavailable: harness mismatch; no outside process started. Missing coverage.' >&2
  if { [ -n "${CLAUDECODE:-}" ] || [ "${GSTACK_ACTIVE_HOST:-}" = claude ]; } && { [ -n "${CODEX_THREAD_ID:-}" ] || [ -n "${CODEX_SANDBOX:-}" ] || [ "${GSTACK_ACTIVE_HOST:-}" = codex ]; }; then
    echo 'Inherited harness markers conflict. Run setup --host <actual-harness> (claude or codex); do not guess a replacement provider.' >&2
  else
    echo 'Repair installed skills: run setup --host codex from your gstack checkout.' >&2
  fi
  exit 78
fi
); then
  if command -v codex >/dev/null 2>&1; then echo 'CODEX_MODE: ready'; else echo 'CODEX_MODE: not_installed'; fi
else
  echo 'CODEX_MODE: under_current_harness'
fi

The historical CODEX_MODE variable describes Codex availability here. CODEX_MODE: disabled or a send's consent_missing line: codex_reviews is off or unreadable; do not ask; record outside_status: disabled. Authentication and configured model validity are checked by the actual invocation, without overriding either. Missing/broken CLI: install or repair Codex; authentication failure: run codex login. Otherwise honor this caller’s opt-in/skip choice. Any non-ready outcome is missing outside coverage; follow the caller’s existing fallback. Never substitute another external provider.

Declined: skip both voices. CODEX_MODE: disabled: run only the native voice and record outside_status: disabled. Non-ready: retain the repair notice, use only the native voice, and record outside_status: unavailable even if it succeeds. The invocation rechecks the harness before spawning.

When ready, run both voices and await both before synthesis. Overlap calls if supported; keep the native call blocking.

  1. Codex design voice (via Bash):

Prompt (include the actual plan/product/frontend source context, not only file paths):

"Review the frontend source code in this repo. Evaluate against these design hard rules:

  • Spacing: systematic (design tokens / CSS variables) or magic numbers?
  • Typography: expressive purposeful fonts or default stacks?
  • Color: CSS variables with defined system, or hardcoded hex scattered?
  • Responsive: breakpoints defined? calc(100svh - header) for heroes? Mobile tested?
  • A11y: ARIA landmarks, alt text, contrast ratios, 44px touch targets?
  • Motion: one authored moment (an entrance or scroll-linked reveal, ease-out from a visible default) plus state transitions only where they carry information, or zero / ornamental only?
  • Cards: used only when card IS the interaction? No decorative card grids?

First classify as MARKETING/LANDING PAGE vs APP UI vs HYBRID, then apply matching rules.

LITMUS CHECKS — answer YES/NO:

  1. Brand/product unmistakable in first screen?
  2. One strong visual anchor present?
  3. Page understandable by scanning headlines only?
  4. Each section has one job?
  5. Are cards actually necessary?
  6. Does motion improve hierarchy or atmosphere?
  7. Would design feel premium with all decorative shadows removed?

HARD REJECTION — flag if ANY apply:

  1. Generic SaaS card grid as first impression
  2. Beautiful image with weak brand
  3. Strong headline with no clear action
  4. Busy imagery behind text
  5. Sections repeating same mood statement
  6. Carousel with no narrative purpose
  7. App UI made of stacked cards instead of layout

Be specific. Reference file:line for every finding."

Write the complete prompt and context, including actual plan/spec/source, to a private file. Substitute its shell-quoted path for <prepared-prompt-file>; never interpolate user text into shell source. Request a severity (Critical, High, Medium or Low) per finding and a final Recommendation: <action> because <specific reason> line, including an explicit no-findings rationale.

# GSTACK_ACTIVE_HOST names the harness, never the model.
if { [ -n "${CODEX_THREAD_ID:-}" ] || [ -n "${CODEX_SANDBOX:-}" ] || [ "${GSTACK_ACTIVE_HOST:-}" = codex ]; }; then
  echo 'Codex outside review unavailable: harness mismatch; no outside process started. Missing coverage.' >&2
  if { [ -n "${CLAUDECODE:-}" ] || [ "${GSTACK_ACTIVE_HOST:-}" = claude ]; } && { [ -n "${CODEX_THREAD_ID:-}" ] || [ -n "${CODEX_SANDBOX:-}" ] || [ "${GSTACK_ACTIVE_HOST:-}" = codex ]; }; then
    echo 'Inherited harness markers conflict. Run setup --host <actual-harness> (claude or codex); do not guess a replacement provider.' >&2
  else
    echo 'Repair installed skills: run setup --host codex from your gstack checkout.' >&2
  fi
  exit 78
fi

_REPO_ROOT=$(git rev-parse --show-toplevel) || { echo 'ERROR: not in a git repo' >&2; exit 1; }
_OUTSIDE_TMP=$(mktemp -d "${TMPDIR:-/tmp}/gstack-outside.XXXXXXXX") || exit 1
trap 'rm -rf "$_OUTSIDE_TMP"' EXIT
_OUTSIDE_INPUT="$_OUTSIDE_TMP/prompt"
cat -- '<prepared-prompt-file>' >"$_OUTSIDE_INPUT" || exit 1

_CODEX_PROBE="$HOME/.claude/skills/gstack/bin/gstack-codex-probe"
_CODEX_OUT=$("$_CODEX_PROBE" select-model exec) || exit 1
_CODEX_SEL=$(echo "$_CODEX_OUT" | sed -n 's/^CODEX_SEL: //p')
_CODEX_SANDBOX_MODE=$(echo "$_CODEX_OUT" | sed -n 's/^CODEX_SANDBOX: //p')
"$_CODEX_PROBE" check-sandbox || exit 1
"$_CODEX_PROBE" show-first-use-notice
_OUTSIDE_EXIT=0
"$_CODEX_PROBE" run-with-timeout --effort high 300 codex exec - -C "$_REPO_ROOT" -s "${_CODEX_SANDBOX_MODE:?}" -c "model=\"${_CODEX_SEL:?}\"" -c skills.include_instructions=false -c 'web_search="cached"' --json -o "$_OUTSIDE_TMP/text" <"$_OUTSIDE_INPUT" >"$_OUTSIDE_TMP/events" 2>"$_OUTSIDE_TMP/stderr" || _OUTSIDE_EXIT=$?
cat "$_OUTSIDE_TMP/text" 2>/dev/null || tail -n 20 "$_OUTSIDE_TMP/events"

cat "$_OUTSIDE_TMP/stderr" >&2 || { [ "$_OUTSIDE_EXIT" -ne 0 ] || _OUTSIDE_EXIT=1; }
_OUTSIDE_RC=0
bun --no-env-file --config=/dev/null "$HOME/.claude/skills/gstack/lib/outside-review-result.ts" --label 'Codex outside review' --exit "$_OUTSIDE_EXIT" --stderr "$_OUTSIDE_TMP/stderr" --events "$_OUTSIDE_TMP/events" review "$_OUTSIDE_TMP/text" || _OUTSIDE_RC=$?
case "$_OUTSIDE_RC" in
  0|3) ;;
  4) echo 'OUTSIDE_STATUS: unverified provider=codex host=claude'; exit 4 ;;
  *) [ "$_OUTSIDE_EXIT" -ne 0 ] && exit "$_OUTSIDE_EXIT"; exit 1 ;;
esac
echo 'OUTSIDE_STATUS: completed provider=codex host=claude'

Use Bash timeout: 360000; show the full response in a tool-output fence. Require successful execution and valid markers. Refusal, empty/malformed output, missing score/severity/completion markers, timeout or CLI failure means outside_status: unavailable. P0/P1 findings block like native ones; OUTSIDE_STATUS: unverified is missing coverage. Use the caller's fallback; missing coverage is never clean/PASS. After either outcome, delete only your private prompt; scratch cleanup is automatic.

  1. Claude design subagent (Agent tool, run_in_background: false when available; await its result. A launch receipt means it went background: await its completion notice.):

"Review the frontend source code in this repo. You are an independent senior product designer doing a source-code design audit. Focus on CONSISTENCY PATTERNS across files rather than individual violations:

  • Are spacing values systematic across the codebase?
  • Is there ONE color system or scattered approaches?
  • Do responsive breakpoints follow a consistent set?
  • Is the accessibility approach consistent or spotty?

For each finding: what's wrong, severity (critical/high/medium), and the file:line."

Error handling (all non-blocking):

  • Auth failure: If stderr contains "auth", "login", "unauthorized", or "API key": "Codex authentication failed. Run codex login to authenticate."
  • Timeout: "Codex timed out after 5 minutes."
  • Empty response: "Codex returned no response."
  • On any Codex error: proceed with Claude subagent output only, tagged [single-model].
  • If Claude subagent also fails: "Outside voices unavailable — continuing with primary review."

Output headers: CODEX SAYS (design source audit): and CLAUDE SUBAGENT (design consistency):.

Synthesis — Litmus scorecard:

Use the same scorecard format as /plan-design-review (shown above). Fill in from both outputs. Merge findings into the triage with [codex] / [subagent] / [cross-model] tags.

Log the result:

~/.claude/skills/gstack/bin/gstack-review-log '{"skill":"design-outside-voices","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","status":"STATUS","source":"SOURCE","host":"claude","outside_provider":"codex","outside_status":"OUTSIDE_STATUS","phase":"design","commit":"'"$(git rev-parse --short HEAD)"'"}'

STATUS="clean" requires a completed review with no findings; use "issues_found" for findings, "unavailable" if neither completed. SOURCE is the completed provider or in-host.

Retain the historical review-log skill ID; add "host":"claude","outside_provider":"codex","outside_status":"completed|unavailable|disabled|skipped","phase":"design". Record differing attempt outcomes separately. source:"codex" requires completed CLI output; native uses source:"in-host" (historical source:"claude": native Claude). Availability/native fallback is not outside completion. Preserve all reported modelUsage; unknown model identity stays unknown. Under GSTACK_CODEX_NO_SANDBOX=1 add "codex_sandbox":"danger-full-access".

Raw lines 3 to 142
Runs code bin/gstack-config :10
Starts an agent spawning :31
Runs code bin/gstack-codex-probe :90
Starts an agent subagent :113
Starts an agent Agent tool :113
Starts an agent SUBAGENT :129
Names a skill plan-design-review :133
Runs code bin/gstack-review-log :138