merge: resolve conflicts with main (v0.11.5.0 → v0.11.5.1)

VERSION and CHANGELOG conflicts resolved: our inline office-hours
feature rebased on top of main's v0.11.5.0 (Bash Compatibility Fix).
This commit is contained in:
Garry Tan
2026-03-22 21:04:16 -07:00
30 changed files with 82 additions and 45 deletions
+9 -1
View File
@@ -1,12 +1,20 @@
# Changelog # Changelog
## [0.11.4.1] - 2026-03-23 — Inline Office Hours ## [0.11.5.1] - 2026-03-23 — Inline Office Hours
### Changed ### Changed
- **No more "open another window" for /office-hours.** When `/plan-ceo-review` or `/plan-eng-review` offer to run `/office-hours` first, it now runs inline in the same conversation. The review picks up right where it left off after the design doc is ready. Same for mid-session detection when you're still figuring out what to build. - **No more "open another window" for /office-hours.** When `/plan-ceo-review` or `/plan-eng-review` offer to run `/office-hours` first, it now runs inline in the same conversation. The review picks up right where it left off after the design doc is ready. Same for mid-session detection when you're still figuring out what to build.
- **Handoff note infrastructure removed.** The handoff notes that bridged the old "go to another window" flow are no longer written. Existing notes from prior sessions are still read for backward compatibility. - **Handoff note infrastructure removed.** The handoff notes that bridged the old "go to another window" flow are no longer written. Existing notes from prior sessions are still read for backward compatibility.
## [0.11.5.0] - 2026-03-23 — Bash Compatibility Fix
### Fixed
- **`gstack-review-read` and `gstack-review-log` no longer crash under bash.** These scripts used `source <(gstack-slug)` which silently fails to set variables under bash with `set -euo pipefail`, causing `SLUG: unbound variable` errors. Replaced with `eval "$(gstack-slug)"` which works correctly in both bash and zsh.
- **All SKILL.md templates updated.** Every template that instructed agents to run `source <(gstack-slug)` now uses `eval "$(gstack-slug)"` for cross-shell compatibility. Regenerated all SKILL.md files from templates.
- **Regression tests added.** New tests verify `eval "$(gstack-slug)"` works under bash strict mode, and guard against `source <(.*gstack-slug` patterns reappearing in templates or bin scripts.
## [0.11.4.0] - 2026-03-22 — Codex in Office Hours ## [0.11.4.0] - 2026-03-22 — Codex in Office Hours
### Added ### Added
+1 -1
View File
@@ -1 +1 @@
0.11.4.1 0.11.5.1
+1 -1
View File
@@ -448,7 +448,7 @@ State what you examined and why nothing was flagged (1-2 sentences minimum).
Before doing anything, save the plan file's current state to an external file: Before doing anything, save the plan file's current state to an external file:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | tr '/' '-') BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | tr '/' '-')
DATETIME=$(date +%Y%m%d-%H%M%S) DATETIME=$(date +%Y%m%d-%H%M%S)
echo "RESTORE_PATH=$HOME/.gstack/projects/$SLUG/${BRANCH}-autoplan-restore-${DATETIME}.md" echo "RESTORE_PATH=$HOME/.gstack/projects/$SLUG/${BRANCH}-autoplan-restore-${DATETIME}.md"
+1 -1
View File
@@ -107,7 +107,7 @@ State what you examined and why nothing was flagged (1-2 sentences minimum).
Before doing anything, save the plan file's current state to an external file: Before doing anything, save the plan file's current state to an external file:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG {{SLUG_SETUP}}
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | tr '/' '-') BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | tr '/' '-')
DATETIME=$(date +%Y%m%d-%H%M%S) DATETIME=$(date +%Y%m%d-%H%M%S)
echo "RESTORE_PATH=$HOME/.gstack/projects/$SLUG/${BRANCH}-autoplan-restore-${DATETIME}.md" echo "RESTORE_PATH=$HOME/.gstack/projects/$SLUG/${BRANCH}-autoplan-restore-${DATETIME}.md"
+1 -1
View File
@@ -333,7 +333,7 @@ When the user types `/benchmark`, run this skill.
### Phase 1: Setup ### Phase 1: Setup
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null || echo "SLUG=unknown") eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null || echo "SLUG=unknown")"
mkdir -p .gstack/benchmark-reports mkdir -p .gstack/benchmark-reports
mkdir -p .gstack/benchmark-reports/baselines mkdir -p .gstack/benchmark-reports/baselines
``` ```
+1 -1
View File
@@ -41,7 +41,7 @@ When the user types `/benchmark`, run this skill.
### Phase 1: Setup ### Phase 1: Setup
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null || echo "SLUG=unknown") eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null || echo "SLUG=unknown")"
mkdir -p .gstack/benchmark-reports mkdir -p .gstack/benchmark-reports
mkdir -p .gstack/benchmark-reports/baselines mkdir -p .gstack/benchmark-reports/baselines
``` ```
+1 -1
View File
@@ -3,7 +3,7 @@
# Usage: gstack-review-log '{"skill":"...","timestamp":"...","status":"..."}' # Usage: gstack-review-log '{"skill":"...","timestamp":"...","status":"..."}'
set -euo pipefail set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
source <("$SCRIPT_DIR/gstack-slug" 2>/dev/null) eval "$("$SCRIPT_DIR/gstack-slug" 2>/dev/null)"
GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}" GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}"
mkdir -p "$GSTACK_HOME/projects/$SLUG" mkdir -p "$GSTACK_HOME/projects/$SLUG"
echo "$1" >> "$GSTACK_HOME/projects/$SLUG/$BRANCH-reviews.jsonl" echo "$1" >> "$GSTACK_HOME/projects/$SLUG/$BRANCH-reviews.jsonl"
+1 -1
View File
@@ -3,7 +3,7 @@
# Usage: gstack-review-read # Usage: gstack-review-read
set -euo pipefail set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
source <("$SCRIPT_DIR/gstack-slug" 2>/dev/null) eval "$("$SCRIPT_DIR/gstack-slug" 2>/dev/null)"
GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}" GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}"
cat "$GSTACK_HOME/projects/$SLUG/$BRANCH-reviews.jsonl" 2>/dev/null || echo "NO_REVIEWS" cat "$GSTACK_HOME/projects/$SLUG/$BRANCH-reviews.jsonl" 2>/dev/null || echo "NO_REVIEWS"
echo "---CONFIG---" echo "---CONFIG---"
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# gstack-slug — output project slug and sanitized branch name # gstack-slug — output project slug and sanitized branch name
# Usage: source <(gstack-slug) → sets SLUG and BRANCH variables # Usage: eval "$(gstack-slug)" → sets SLUG and BRANCH variables
# Or: gstack-slug → prints SLUG=... and BRANCH=... lines # Or: gstack-slug → prints SLUG=... and BRANCH=... lines
# #
# Security: output is sanitized to [a-zA-Z0-9._-] only, preventing # Security: output is sanitized to [a-zA-Z0-9._-] only, preventing
+2 -2
View File
@@ -351,7 +351,7 @@ When the user types `/canary`, run this skill.
### Phase 1: Setup ### Phase 1: Setup
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null || echo "SLUG=unknown") eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null || echo "SLUG=unknown")"
mkdir -p .gstack/canary-reports mkdir -p .gstack/canary-reports
mkdir -p .gstack/canary-reports/baselines mkdir -p .gstack/canary-reports/baselines
mkdir -p .gstack/canary-reports/screenshots mkdir -p .gstack/canary-reports/screenshots
@@ -501,7 +501,7 @@ Save report to `.gstack/canary-reports/{date}-canary.md` and `.gstack/canary-rep
Log the result for the review dashboard: Log the result for the review dashboard:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)"
mkdir -p ~/.gstack/projects/$SLUG mkdir -p ~/.gstack/projects/$SLUG
``` ```
+2 -2
View File
@@ -42,7 +42,7 @@ When the user types `/canary`, run this skill.
### Phase 1: Setup ### Phase 1: Setup
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null || echo "SLUG=unknown") eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null || echo "SLUG=unknown")"
mkdir -p .gstack/canary-reports mkdir -p .gstack/canary-reports
mkdir -p .gstack/canary-reports/baselines mkdir -p .gstack/canary-reports/baselines
mkdir -p .gstack/canary-reports/screenshots mkdir -p .gstack/canary-reports/screenshots
@@ -192,7 +192,7 @@ Save report to `.gstack/canary-reports/{date}-canary.md` and `.gstack/canary-rep
Log the result for the review dashboard: Log the result for the review dashboard:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) {{SLUG_EVAL}}
mkdir -p ~/.gstack/projects/$SLUG mkdir -p ~/.gstack/projects/$SLUG
``` ```
+1 -1
View File
@@ -327,7 +327,7 @@ ls src/ app/ pages/ components/ 2>/dev/null | head -30
Look for office-hours output: Look for office-hours output:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)"
ls ~/.gstack/projects/$SLUG/*office-hours* 2>/dev/null | head -5 ls ~/.gstack/projects/$SLUG/*office-hours* 2>/dev/null | head -5
ls .context/*office-hours* .context/attachments/*office-hours* 2>/dev/null | head -5 ls .context/*office-hours* .context/attachments/*office-hours* 2>/dev/null | head -5
``` ```
+1 -1
View File
@@ -52,7 +52,7 @@ ls src/ app/ pages/ components/ 2>/dev/null | head -30
Look for office-hours output: Look for office-hours output:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) {{SLUG_EVAL}}
ls ~/.gstack/projects/$SLUG/*office-hours* 2>/dev/null | head -5 ls ~/.gstack/projects/$SLUG/*office-hours* 2>/dev/null | head -5
ls .context/*office-hours* .context/attachments/*office-hours* 2>/dev/null | head -5 ls .context/*office-hours* .context/attachments/*office-hours* 2>/dev/null | head -5
``` ```
+2 -2
View File
@@ -774,7 +774,7 @@ Compare screenshots and observations across pages for:
**Project-scoped:** **Project-scoped:**
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
``` ```
Write to: `~/.gstack/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md` Write to: `~/.gstack/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md`
@@ -1142,7 +1142,7 @@ Write the report to both local and project-scoped locations:
**Project-scoped:** **Project-scoped:**
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
``` ```
Write to `~/.gstack/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md` Write to `~/.gstack/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md`
+1 -1
View File
@@ -224,7 +224,7 @@ Write the report to both local and project-scoped locations:
**Project-scoped:** **Project-scoped:**
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG {{SLUG_SETUP}}
``` ```
Write to `~/.gstack/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md` Write to `~/.gstack/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md`
+1 -1
View File
@@ -883,7 +883,7 @@ Save report to `.gstack/deploy-reports/{date}-pr{number}-deploy.md`.
Log to the review dashboard: Log to the review dashboard:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)"
mkdir -p ~/.gstack/projects/$SLUG mkdir -p ~/.gstack/projects/$SLUG
``` ```
+1 -1
View File
@@ -542,7 +542,7 @@ Save report to `.gstack/deploy-reports/{date}-pr{number}-deploy.md`.
Log to the review dashboard: Log to the review dashboard:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) {{SLUG_EVAL}}
mkdir -p ~/.gstack/projects/$SLUG mkdir -p ~/.gstack/projects/$SLUG
``` ```
+2 -2
View File
@@ -331,7 +331,7 @@ You are a **YC office hours partner**. Your job is to ensure the problem is unde
Understand the project and the area the user wants to change. Understand the project and the area the user wants to change.
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)"
``` ```
1. Read `CLAUDE.md`, `TODOS.md` (if they exist). 1. Read `CLAUDE.md`, `TODOS.md` (if they exist).
@@ -870,7 +870,7 @@ Count the signals. You'll use this count in Phase 6 to determine which tier of c
Write the design document to the project directory. Write the design document to the project directory.
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
USER=$(whoami) USER=$(whoami)
DATETIME=$(date +%Y%m%d-%H%M%S) DATETIME=$(date +%Y%m%d-%H%M%S)
``` ```
+2 -2
View File
@@ -39,7 +39,7 @@ You are a **YC office hours partner**. Your job is to ensure the problem is unde
Understand the project and the area the user wants to change. Understand the project and the area the user wants to change.
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) {{SLUG_EVAL}}
``` ```
1. Read `CLAUDE.md`, `TODOS.md` (if they exist). 1. Read `CLAUDE.md`, `TODOS.md` (if they exist).
@@ -413,7 +413,7 @@ Count the signals. You'll use this count in Phase 6 to determine which tier of c
Write the design document to the project directory. Write the design document to the project directory.
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG {{SLUG_SETUP}}
USER=$(whoami) USER=$(whoami)
DATETIME=$(date +%Y%m%d-%H%M%S) DATETIME=$(date +%Y%m%d-%H%M%S)
``` ```
+2 -2
View File
@@ -606,7 +606,7 @@ Rules:
After the opt-in/cherry-pick ceremony, write the plan to disk so the vision and decisions survive beyond this conversation. Only run this step for EXPANSION and SELECTIVE EXPANSION modes. After the opt-in/cherry-pick ceremony, write the plan to disk so the vision and decisions survive beyond this conversation. Only run this step for EXPANSION and SELECTIVE EXPANSION modes.
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG/ceo-plans eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG/ceo-plans
``` ```
Before writing, check for existing CEO plans in the ceo-plans/ directory. If any are >30 days old or their branch has been merged/deleted, offer to archive them: Before writing, check for existing CEO plans in the ceo-plans/ directory. If any are >30 days old or their branch has been merged/deleted, offer to archive them:
@@ -1100,7 +1100,7 @@ After producing the Completion Summary, clean up any handoff notes for this bran
the review is complete and the context is no longer needed. the review is complete and the context is no longer needed.
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)"
rm -f ~/.gstack/projects/$SLUG/*-$BRANCH-ceo-handoff-*.md 2>/dev/null || true rm -f ~/.gstack/projects/$SLUG/*-$BRANCH-ceo-handoff-*.md 2>/dev/null || true
``` ```
+2 -2
View File
@@ -265,7 +265,7 @@ Rules:
After the opt-in/cherry-pick ceremony, write the plan to disk so the vision and decisions survive beyond this conversation. Only run this step for EXPANSION and SELECTIVE EXPANSION modes. After the opt-in/cherry-pick ceremony, write the plan to disk so the vision and decisions survive beyond this conversation. Only run this step for EXPANSION and SELECTIVE EXPANSION modes.
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG/ceo-plans eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG/ceo-plans
``` ```
Before writing, check for existing CEO plans in the ceo-plans/ directory. If any are >30 days old or their branch has been merged/deleted, offer to archive them: Before writing, check for existing CEO plans in the ceo-plans/ directory. If any are >30 days old or their branch has been merged/deleted, offer to archive them:
@@ -699,7 +699,7 @@ After producing the Completion Summary, clean up any handoff notes for this bran
the review is complete and the context is no longer needed. the review is complete and the context is no longer needed.
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) {{SLUG_EVAL}}
rm -f ~/.gstack/projects/$SLUG/*-$BRANCH-ceo-handoff-*.md 2>/dev/null || true rm -f ~/.gstack/projects/$SLUG/*-$BRANCH-ceo-handoff-*.md 2>/dev/null || true
``` ```
+1 -1
View File
@@ -643,7 +643,7 @@ The plan should be complete enough that when implementation begins, every test i
After producing the coverage diagram, write a test plan artifact to the project directory so `/qa` and `/qa-only` can consume it as primary test input: After producing the coverage diagram, write a test plan artifact to the project directory so `/qa` and `/qa-only` can consume it as primary test input:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
USER=$(whoami) USER=$(whoami)
DATETIME=$(date +%Y%m%d-%H%M%S) DATETIME=$(date +%Y%m%d-%H%M%S)
``` ```
+2 -2
View File
@@ -346,7 +346,7 @@ Before falling back to git diff heuristics, check for richer test plan sources:
1. **Project-scoped test plans:** Check `~/.gstack/projects/` for recent `*-test-plan-*.md` files for this repo 1. **Project-scoped test plans:** Check `~/.gstack/projects/` for recent `*-test-plan-*.md` files for this repo
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)"
ls -t ~/.gstack/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1 ls -t ~/.gstack/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1
``` ```
2. **Conversation context:** Check if a prior `/plan-eng-review` or `/plan-ceo-review` produced test plan output in this conversation 2. **Conversation context:** Check if a prior `/plan-eng-review` or `/plan-ceo-review` produced test plan output in this conversation
@@ -642,7 +642,7 @@ Write the report to both local and project-scoped locations:
**Project-scoped:** Write test outcome artifact for cross-session context: **Project-scoped:** Write test outcome artifact for cross-session context:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
``` ```
Write to `~/.gstack/projects/{slug}/{user}-{branch}-test-outcome-{datetime}.md` Write to `~/.gstack/projects/{slug}/{user}-{branch}-test-outcome-{datetime}.md`
+2 -2
View File
@@ -54,7 +54,7 @@ Before falling back to git diff heuristics, check for richer test plan sources:
1. **Project-scoped test plans:** Check `~/.gstack/projects/` for recent `*-test-plan-*.md` files for this repo 1. **Project-scoped test plans:** Check `~/.gstack/projects/` for recent `*-test-plan-*.md` files for this repo
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) {{SLUG_EVAL}}
ls -t ~/.gstack/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1 ls -t ~/.gstack/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1
``` ```
2. **Conversation context:** Check if a prior `/plan-eng-review` or `/plan-ceo-review` produced test plan output in this conversation 2. **Conversation context:** Check if a prior `/plan-eng-review` or `/plan-ceo-review` produced test plan output in this conversation
@@ -74,7 +74,7 @@ Write the report to both local and project-scoped locations:
**Project-scoped:** Write test outcome artifact for cross-session context: **Project-scoped:** Write test outcome artifact for cross-session context:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG {{SLUG_SETUP}}
``` ```
Write to `~/.gstack/projects/{slug}/{user}-{branch}-test-outcome-{datetime}.md` Write to `~/.gstack/projects/{slug}/{user}-{branch}-test-outcome-{datetime}.md`
+2 -2
View File
@@ -549,7 +549,7 @@ Before falling back to git diff heuristics, check for richer test plan sources:
1. **Project-scoped test plans:** Check `~/.gstack/projects/` for recent `*-test-plan-*.md` files for this repo 1. **Project-scoped test plans:** Check `~/.gstack/projects/` for recent `*-test-plan-*.md` files for this repo
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)"
ls -t ~/.gstack/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1 ls -t ~/.gstack/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1
``` ```
2. **Conversation context:** Check if a prior `/plan-eng-review` or `/plan-ceo-review` produced test plan output in this conversation 2. **Conversation context:** Check if a prior `/plan-eng-review` or `/plan-ceo-review` produced test plan output in this conversation
@@ -1013,7 +1013,7 @@ Write the report to both local and project-scoped locations:
**Project-scoped:** Write test outcome artifact for cross-session context: **Project-scoped:** Write test outcome artifact for cross-session context:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
``` ```
Write to `~/.gstack/projects/{slug}/{user}-{branch}-test-outcome-{datetime}.md` Write to `~/.gstack/projects/{slug}/{user}-{branch}-test-outcome-{datetime}.md`
+2 -2
View File
@@ -89,7 +89,7 @@ Before falling back to git diff heuristics, check for richer test plan sources:
1. **Project-scoped test plans:** Check `~/.gstack/projects/` for recent `*-test-plan-*.md` files for this repo 1. **Project-scoped test plans:** Check `~/.gstack/projects/` for recent `*-test-plan-*.md` files for this repo
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) {{SLUG_EVAL}}
ls -t ~/.gstack/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1 ls -t ~/.gstack/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1
``` ```
2. **Conversation context:** Check if a prior `/plan-eng-review` or `/plan-ceo-review` produced test plan output in this conversation 2. **Conversation context:** Check if a prior `/plan-eng-review` or `/plan-ceo-review` produced test plan output in this conversation
@@ -277,7 +277,7 @@ Write the report to both local and project-scoped locations:
**Project-scoped:** Write test outcome artifact for cross-session context: **Project-scoped:** Write test outcome artifact for cross-session context:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG {{SLUG_SETUP}}
``` ```
Write to `~/.gstack/projects/{slug}/{user}-{branch}-test-outcome-{datetime}.md` Write to `~/.gstack/projects/{slug}/{user}-{branch}-test-outcome-{datetime}.md`
+13 -3
View File
@@ -1219,7 +1219,7 @@ Compare screenshots and observations across pages for:
**Project-scoped:** **Project-scoped:**
\`\`\`bash \`\`\`bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
\`\`\` \`\`\`
Write to: \`~/.gstack/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md\` Write to: \`~/.gstack/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md\`
@@ -1815,7 +1815,7 @@ The plan should be complete enough that when implementation begins, every test i
After producing the coverage diagram, write a test plan artifact to the project directory so \`/qa\` and \`/qa-only\` can consume it as primary test input: After producing the coverage diagram, write a test plan artifact to the project directory so \`/qa\` and \`/qa-only\` can consume it as primary test input:
\`\`\`bash \`\`\`bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
USER=$(whoami) USER=$(whoami)
DATETIME=$(date +%Y%m%d-%H%M%S) DATETIME=$(date +%Y%m%d-%H%M%S)
\`\`\` \`\`\`
@@ -1879,7 +1879,7 @@ Coverage line: \`Test Coverage Audit: N new code paths. M covered (X%). K tests
After producing the coverage diagram, write a test plan artifact so \`/qa\` and \`/qa-only\` can consume it: After producing the coverage diagram, write a test plan artifact so \`/qa\` and \`/qa-only\` can consume it:
\`\`\`bash \`\`\`bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
USER=$(whoami) USER=$(whoami)
DATETIME=$(date +%Y%m%d-%H%M%S) DATETIME=$(date +%Y%m%d-%H%M%S)
\`\`\` \`\`\`
@@ -2661,7 +2661,17 @@ ${slopItems}
Source: [OpenAI "Designing Delightful Frontends with GPT-5.4"](https://developers.openai.com/blog/designing-delightful-frontends-with-gpt-5-4) (Mar 2026) + gstack design methodology.`; Source: [OpenAI "Designing Delightful Frontends with GPT-5.4"](https://developers.openai.com/blog/designing-delightful-frontends-with-gpt-5-4) (Mar 2026) + gstack design methodology.`;
} }
function generateSlugEval(ctx: TemplateContext): string {
return `eval "$(${ctx.paths.binDir}/gstack-slug 2>/dev/null)"`;
}
function generateSlugSetup(ctx: TemplateContext): string {
return `eval "$(${ctx.paths.binDir}/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG`;
}
const RESOLVERS: Record<string, (ctx: TemplateContext) => string> = { const RESOLVERS: Record<string, (ctx: TemplateContext) => string> = {
SLUG_EVAL: generateSlugEval,
SLUG_SETUP: generateSlugSetup,
COMMAND_REFERENCE: generateCommandReference, COMMAND_REFERENCE: generateCommandReference,
SNAPSHOT_FLAGS: generateSnapshotFlags, SNAPSHOT_FLAGS: generateSnapshotFlags,
PREAMBLE: generatePreamble, PREAMBLE: generatePreamble,
+3 -3
View File
@@ -395,7 +395,7 @@ If the Eng Review is NOT "CLEAR":
1. **Check for a prior override on this branch:** 1. **Check for a prior override on this branch:**
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)"
grep '"skill":"ship-review-override"' ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl 2>/dev/null || echo "NO_OVERRIDE" grep '"skill":"ship-review-override"' ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl 2>/dev/null || echo "NO_OVERRIDE"
``` ```
If an override exists, display the dashboard and note "Review gate previously accepted — continuing." Do NOT ask again. If an override exists, display the dashboard and note "Review gate previously accepted — continuing." Do NOT ask again.
@@ -409,7 +409,7 @@ If the Eng Review is NOT "CLEAR":
3. **If the user chooses A or C,** persist the decision so future `/ship` runs on this branch skip the gate: 3. **If the user chooses A or C,** persist the decision so future `/ship` runs on this branch skip the gate:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)"
echo '{"skill":"ship-review-override","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","decision":"USER_CHOICE"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl echo '{"skill":"ship-review-override","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","decision":"USER_CHOICE"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl
``` ```
Substitute USER_CHOICE with "ship_anyway" or "not_relevant". Substitute USER_CHOICE with "ship_anyway" or "not_relevant".
@@ -969,7 +969,7 @@ Coverage line: `Test Coverage Audit: N new code paths. M covered (X%). K tests g
After producing the coverage diagram, write a test plan artifact so `/qa` and `/qa-only` can consume it: After producing the coverage diagram, write a test plan artifact so `/qa` and `/qa-only` can consume it:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) && mkdir -p ~/.gstack/projects/$SLUG eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
USER=$(whoami) USER=$(whoami)
DATETIME=$(date +%Y%m%d-%H%M%S) DATETIME=$(date +%Y%m%d-%H%M%S)
``` ```
+2 -2
View File
@@ -62,7 +62,7 @@ If the Eng Review is NOT "CLEAR":
1. **Check for a prior override on this branch:** 1. **Check for a prior override on this branch:**
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) {{SLUG_EVAL}}
grep '"skill":"ship-review-override"' ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl 2>/dev/null || echo "NO_OVERRIDE" grep '"skill":"ship-review-override"' ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl 2>/dev/null || echo "NO_OVERRIDE"
``` ```
If an override exists, display the dashboard and note "Review gate previously accepted — continuing." Do NOT ask again. If an override exists, display the dashboard and note "Review gate previously accepted — continuing." Do NOT ask again.
@@ -76,7 +76,7 @@ If the Eng Review is NOT "CLEAR":
3. **If the user chooses A or C,** persist the decision so future `/ship` runs on this branch skip the gate: 3. **If the user chooses A or C,** persist the decision so future `/ship` runs on this branch skip the gate:
```bash ```bash
source <(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null) {{SLUG_EVAL}}
echo '{"skill":"ship-review-override","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","decision":"USER_CHOICE"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl echo '{"skill":"ship-review-override","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","decision":"USER_CHOICE"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl
``` ```
Substitute USER_CHOICE with "ship_anyway" or "not_relevant". Substitute USER_CHOICE with "ship_anyway" or "not_relevant".
+19
View File
@@ -1004,6 +1004,25 @@ describe('gstack-slug', () => {
expect(slug).toMatch(/^[a-zA-Z0-9._-]+$/); expect(slug).toMatch(/^[a-zA-Z0-9._-]+$/);
expect(branch).toMatch(/^[a-zA-Z0-9._-]+$/); expect(branch).toMatch(/^[a-zA-Z0-9._-]+$/);
}); });
test('eval sets variables under bash with set -euo pipefail', () => {
const result = Bun.spawnSync(
['bash', '-c', 'set -euo pipefail; eval "$(./bin/gstack-slug 2>/dev/null)"; echo "SLUG=$SLUG"; echo "BRANCH=$BRANCH"'],
{ cwd: ROOT, stdout: 'pipe', stderr: 'pipe' }
);
expect(result.exitCode).toBe(0);
const output = result.stdout.toString();
expect(output).toMatch(/^SLUG=.+/m);
expect(output).toMatch(/^BRANCH=.+/m);
});
test('no templates or bin scripts use source process substitution for gstack-slug', () => {
const result = Bun.spawnSync(
['grep', '-r', 'source <(.*gstack-slug', '--include=*.tmpl', '--include=gstack-review-*', '.'],
{ cwd: ROOT, stdout: 'pipe', stderr: 'pipe' }
);
// grep returns exit code 1 when no matches found — that's what we want
expect(result.stdout.toString().trim()).toBe('');
});
}); });
// --- Test Bootstrap validation --- // --- Test Bootstrap validation ---