opengstack 0.13.9 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/{skills/land-and-deploy/SKILL.md → commands/autoplan.md} +0 -16
  2. package/{skills/benchmark/SKILL.md → commands/benchmark.md} +0 -17
  3. package/{skills/browse/SKILL.md → commands/browse.md} +0 -17
  4. package/{skills/ship/SKILL.md → commands/canary.md} +0 -18
  5. package/{skills/careful/SKILL.md → commands/careful.md} +0 -20
  6. package/{skills/canary/SKILL.md → commands/codex.md} +0 -17
  7. package/{skills/connect-chrome/SKILL.md → commands/connect-chrome.md} +0 -15
  8. package/commands/cso.md +72 -0
  9. package/commands/design-consultation.md +72 -0
  10. package/commands/design-review.md +72 -0
  11. package/commands/design-shotgun.md +72 -0
  12. package/commands/document-release.md +72 -0
  13. package/{skills/freeze/SKILL.md → commands/freeze.md} +0 -26
  14. package/{skills/gstack-upgrade/SKILL.md → commands/gstack-upgrade.md} +0 -14
  15. package/{skills/guard/SKILL.md → commands/guard.md} +0 -31
  16. package/commands/investigate.md +72 -0
  17. package/commands/land-and-deploy.md +72 -0
  18. package/commands/office-hours.md +72 -0
  19. package/commands/plan-ceo-review.md +72 -0
  20. package/commands/plan-design-review.md +72 -0
  21. package/commands/plan-eng-review.md +72 -0
  22. package/commands/qa-only.md +72 -0
  23. package/commands/qa.md +72 -0
  24. package/commands/retro.md +72 -0
  25. package/commands/review.md +72 -0
  26. package/{skills/setup-browser-cookies/SKILL.md → commands/setup-browser-cookies.md} +0 -14
  27. package/commands/setup-deploy.md +72 -0
  28. package/commands/ship.md +72 -0
  29. package/{skills/unfreeze/SKILL.md → commands/unfreeze.md} +0 -12
  30. package/package.json +4 -4
  31. package/scripts/install-commands.js +45 -0
  32. package/scripts/install-skills.js +4 -7
  33. package/skills/autoplan/SKILL.md +0 -96
  34. package/skills/autoplan/SKILL.md.tmpl +0 -694
  35. package/skills/benchmark/SKILL.md.tmpl +0 -222
  36. package/skills/browse/SKILL.md.tmpl +0 -131
  37. package/skills/browse/bin/find-browse +0 -21
  38. package/skills/browse/bin/remote-slug +0 -14
  39. package/skills/browse/scripts/build-node-server.sh +0 -48
  40. package/skills/browse/src/activity.ts +0 -208
  41. package/skills/browse/src/browser-manager.ts +0 -959
  42. package/skills/browse/src/buffers.ts +0 -137
  43. package/skills/browse/src/bun-polyfill.cjs +0 -109
  44. package/skills/browse/src/cli.ts +0 -678
  45. package/skills/browse/src/commands.ts +0 -128
  46. package/skills/browse/src/config.ts +0 -150
  47. package/skills/browse/src/cookie-import-browser.ts +0 -625
  48. package/skills/browse/src/cookie-picker-routes.ts +0 -230
  49. package/skills/browse/src/cookie-picker-ui.ts +0 -688
  50. package/skills/browse/src/find-browse.ts +0 -61
  51. package/skills/browse/src/meta-commands.ts +0 -550
  52. package/skills/browse/src/platform.ts +0 -17
  53. package/skills/browse/src/read-commands.ts +0 -358
  54. package/skills/browse/src/server.ts +0 -1192
  55. package/skills/browse/src/sidebar-agent.ts +0 -280
  56. package/skills/browse/src/sidebar-utils.ts +0 -21
  57. package/skills/browse/src/snapshot.ts +0 -407
  58. package/skills/browse/src/url-validation.ts +0 -95
  59. package/skills/browse/src/write-commands.ts +0 -364
  60. package/skills/browse/test/activity.test.ts +0 -120
  61. package/skills/browse/test/adversarial-security.test.ts +0 -32
  62. package/skills/browse/test/browser-manager-unit.test.ts +0 -17
  63. package/skills/browse/test/bun-polyfill.test.ts +0 -72
  64. package/skills/browse/test/commands.test.ts +0 -2075
  65. package/skills/browse/test/compare-board.test.ts +0 -342
  66. package/skills/browse/test/config.test.ts +0 -316
  67. package/skills/browse/test/cookie-import-browser.test.ts +0 -519
  68. package/skills/browse/test/cookie-picker-routes.test.ts +0 -260
  69. package/skills/browse/test/file-drop.test.ts +0 -271
  70. package/skills/browse/test/find-browse.test.ts +0 -50
  71. package/skills/browse/test/findport.test.ts +0 -191
  72. package/skills/browse/test/fixtures/basic.html +0 -33
  73. package/skills/browse/test/fixtures/cursor-interactive.html +0 -22
  74. package/skills/browse/test/fixtures/dialog.html +0 -15
  75. package/skills/browse/test/fixtures/empty.html +0 -2
  76. package/skills/browse/test/fixtures/forms.html +0 -55
  77. package/skills/browse/test/fixtures/iframe.html +0 -30
  78. package/skills/browse/test/fixtures/network-idle.html +0 -30
  79. package/skills/browse/test/fixtures/qa-eval-checkout.html +0 -108
  80. package/skills/browse/test/fixtures/qa-eval-spa.html +0 -98
  81. package/skills/browse/test/fixtures/qa-eval.html +0 -51
  82. package/skills/browse/test/fixtures/responsive.html +0 -49
  83. package/skills/browse/test/fixtures/snapshot.html +0 -55
  84. package/skills/browse/test/fixtures/spa.html +0 -24
  85. package/skills/browse/test/fixtures/states.html +0 -17
  86. package/skills/browse/test/fixtures/upload.html +0 -25
  87. package/skills/browse/test/gstack-config.test.ts +0 -138
  88. package/skills/browse/test/gstack-update-check.test.ts +0 -514
  89. package/skills/browse/test/handoff.test.ts +0 -235
  90. package/skills/browse/test/path-validation.test.ts +0 -91
  91. package/skills/browse/test/platform.test.ts +0 -37
  92. package/skills/browse/test/server-auth.test.ts +0 -65
  93. package/skills/browse/test/sidebar-agent-roundtrip.test.ts +0 -226
  94. package/skills/browse/test/sidebar-agent.test.ts +0 -199
  95. package/skills/browse/test/sidebar-integration.test.ts +0 -320
  96. package/skills/browse/test/sidebar-unit.test.ts +0 -96
  97. package/skills/browse/test/snapshot.test.ts +0 -467
  98. package/skills/browse/test/state-ttl.test.ts +0 -35
  99. package/skills/browse/test/test-server.ts +0 -57
  100. package/skills/browse/test/url-validation.test.ts +0 -72
  101. package/skills/browse/test/watch.test.ts +0 -129
  102. package/skills/canary/SKILL.md.tmpl +0 -212
  103. package/skills/careful/SKILL.md.tmpl +0 -56
  104. package/skills/careful/bin/check-careful.sh +0 -112
  105. package/skills/codex/SKILL.md +0 -90
  106. package/skills/codex/SKILL.md.tmpl +0 -417
  107. package/skills/connect-chrome/SKILL.md.tmpl +0 -195
  108. package/skills/cso/ACKNOWLEDGEMENTS.md +0 -14
  109. package/skills/cso/SKILL.md +0 -93
  110. package/skills/cso/SKILL.md.tmpl +0 -606
  111. package/skills/design-consultation/SKILL.md +0 -94
  112. package/skills/design-consultation/SKILL.md.tmpl +0 -415
  113. package/skills/design-review/SKILL.md +0 -94
  114. package/skills/design-review/SKILL.md.tmpl +0 -290
  115. package/skills/design-shotgun/SKILL.md +0 -91
  116. package/skills/design-shotgun/SKILL.md.tmpl +0 -285
  117. package/skills/document-release/SKILL.md +0 -91
  118. package/skills/document-release/SKILL.md.tmpl +0 -359
  119. package/skills/freeze/SKILL.md.tmpl +0 -77
  120. package/skills/freeze/bin/check-freeze.sh +0 -79
  121. package/skills/gstack-upgrade/SKILL.md.tmpl +0 -222
  122. package/skills/guard/SKILL.md.tmpl +0 -77
  123. package/skills/investigate/SKILL.md +0 -105
  124. package/skills/investigate/SKILL.md.tmpl +0 -194
  125. package/skills/land-and-deploy/SKILL.md.tmpl +0 -881
  126. package/skills/office-hours/SKILL.md +0 -96
  127. package/skills/office-hours/SKILL.md.tmpl +0 -645
  128. package/skills/plan-ceo-review/SKILL.md +0 -94
  129. package/skills/plan-ceo-review/SKILL.md.tmpl +0 -811
  130. package/skills/plan-design-review/SKILL.md +0 -92
  131. package/skills/plan-design-review/SKILL.md.tmpl +0 -446
  132. package/skills/plan-eng-review/SKILL.md +0 -93
  133. package/skills/plan-eng-review/SKILL.md.tmpl +0 -303
  134. package/skills/qa/SKILL.md +0 -95
  135. package/skills/qa/SKILL.md.tmpl +0 -316
  136. package/skills/qa/references/issue-taxonomy.md +0 -85
  137. package/skills/qa/templates/qa-report-template.md +0 -126
  138. package/skills/qa-only/SKILL.md +0 -89
  139. package/skills/qa-only/SKILL.md.tmpl +0 -101
  140. package/skills/retro/SKILL.md +0 -89
  141. package/skills/retro/SKILL.md.tmpl +0 -820
  142. package/skills/review/SKILL.md +0 -92
  143. package/skills/review/SKILL.md.tmpl +0 -281
  144. package/skills/review/TODOS-format.md +0 -62
  145. package/skills/review/checklist.md +0 -220
  146. package/skills/review/design-checklist.md +0 -132
  147. package/skills/review/greptile-triage.md +0 -220
  148. package/skills/setup-browser-cookies/SKILL.md.tmpl +0 -81
  149. package/skills/setup-deploy/SKILL.md +0 -92
  150. package/skills/setup-deploy/SKILL.md.tmpl +0 -215
  151. package/skills/ship/SKILL.md.tmpl +0 -636
  152. package/skills/unfreeze/SKILL.md.tmpl +0 -36
@@ -1,222 +0,0 @@
1
- ---
2
- name: gstack-upgrade
3
- version: 1.1.0
4
- description: |
5
- Upgrade gstack to the latest version. Detects global vs vendored install,
6
- runs the upgrade, and shows what's new. Use when asked to "upgrade gstack",
7
- "update gstack", or "get latest version".
8
- allowed-tools:
9
- - Bash
10
- - Read
11
- - Write
12
- - AskUserQuestion
13
- ---
14
-
15
- # /gstack-upgrade
16
-
17
- Upgrade gstack to the latest version and show what's new.
18
-
19
- ## Inline upgrade flow
20
-
21
- This section is referenced by all skill preambles when they detect `
22
-
23
- ### Step 1: Ask the user (or auto-upgrade)
24
-
25
- First, check if auto-upgrade is enabled:
26
- ```bash
27
- _AUTO=""
28
- [ "${GSTACK_AUTO_UPGRADE:-}" = "1" ] && _AUTO="true"
29
- [ -z "$_AUTO" ] && _AUTO=$(~/.claude/skills/opengstack/bin/gstack-config get auto_upgrade 2>/dev/null || true)
30
- echo "AUTO_UPGRADE=$_AUTO"
31
-
32
- **If `AUTO_UPGRADE=true` or `AUTO_UPGRADE=1`:** Skip AskUserQuestion. Log "Auto-upgrading gstack v{old} → v{new}..." and proceed directly to Step 2. If `./setup` fails during auto-upgrade, restore from backup (`.bak` directory) and warn the user: "Auto-upgrade failed — restored previous version. Run `/gstack-upgrade` manually to retry."
33
-
34
- **Otherwise**, use AskUserQuestion:
35
- - Question: "gstack **v{new}** is available (you're on v{old}). Upgrade now?"
36
- - Options: ["Yes, upgrade now", "Always keep me up to date", "Not now", "Never ask again"]
37
-
38
- **If "Yes, upgrade now":** Proceed to Step 2.
39
-
40
- **If "Always keep me up to date":**
41
- ```bash
42
- ~/.claude/skills/opengstack/bin/gstack-config set auto_upgrade true
43
-
44
- Tell user: "Auto-upgrade enabled. Future updates will install automatically." Then proceed to Step 2.
45
-
46
- **If "Not now":** Write snooze state with escalating backoff (first snooze = 24h, second = 48h, third+ = 1 week), then continue with the current skill. Do not mention the upgrade again.
47
- ```bash
48
- _SNOOZE_FILE=~/.gstack/update-snoozed
49
- _REMOTE_VER="{new}"
50
- _CUR_LEVEL=0
51
- if [ -f "$_SNOOZE_FILE" ]; then
52
- _SNOOZED_VER=$(awk '{print $1}' "$_SNOOZE_FILE")
53
- if [ "$_SNOOZED_VER" = "$_REMOTE_VER" ]; then
54
- _CUR_LEVEL=$(awk '{print $2}' "$_SNOOZE_FILE")
55
- case "$_CUR_LEVEL" in *[!0-9]*) _CUR_LEVEL=0 ;; esac
56
- fi
57
- fi
58
- _NEW_LEVEL=$((_CUR_LEVEL + 1))
59
- [ "$_NEW_LEVEL" -gt 3 ] && _NEW_LEVEL=3
60
- echo "$_REMOTE_VER $_NEW_LEVEL $(date +%s)" > "$_SNOOZE_FILE"
61
-
62
- Note: `{new}` is the remote version from the `
63
-
64
- Tell user the snooze duration: "Next reminder in 24h" (or 48h or 1 week, depending on level). Tip: "Set `auto_upgrade: true` in `~/.gstack/config.yaml` for automatic upgrades."
65
-
66
- **If "Never ask again":**
67
- ```bash
68
- ~/.claude/skills/opengstack/bin/gstack-config set update_check false
69
-
70
- Tell user: "Update checks disabled. Run `~/.claude/skills/opengstack/bin/gstack-config set update_check true` to re-enable."
71
- Continue with the current skill.
72
-
73
- ### Step 2: Detect install type
74
-
75
- ```bash
76
- if [ -d "$HOME/.claude/skills/gstack/.git" ]; then
77
- INSTALL_TYPE="global-git"
78
- INSTALL_DIR="$HOME/.claude/skills/gstack"
79
- elif [ -d "$HOME/.gstack/repos/gstack/.git" ]; then
80
- INSTALL_TYPE="global-git"
81
- INSTALL_DIR="$HOME/.gstack/repos/gstack"
82
- elif [ -d ".claude/skills/gstack/.git" ]; then
83
- INSTALL_TYPE="local-git"
84
- INSTALL_DIR=".claude/skills/gstack"
85
- elif [ -d ".agents/skills/gstack/.git" ]; then
86
- INSTALL_TYPE="local-git"
87
- INSTALL_DIR=".agents/skills/gstack"
88
- elif [ -d ".claude/skills/gstack" ]; then
89
- INSTALL_TYPE="vendored"
90
- INSTALL_DIR=".claude/skills/gstack"
91
- elif [ -d "$HOME/.claude/skills/gstack" ]; then
92
- INSTALL_TYPE="vendored-global"
93
- INSTALL_DIR="$HOME/.claude/skills/gstack"
94
- else
95
- echo "ERROR: gstack not found"
96
- exit 1
97
- fi
98
- echo "Install type: $INSTALL_TYPE at $INSTALL_DIR"
99
-
100
- The install type and directory path printed above will be used in all subsequent steps.
101
-
102
- ### Step 3: Save old version
103
-
104
- Use the install directory from Step 2's output below:
105
-
106
- ```bash
107
- OLD_VERSION=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown")
108
-
109
- ### Step 4: Upgrade
110
-
111
- Use the install type and directory detected in Step 2:
112
-
113
- **For git installs** (global-git, local-git):
114
- ```bash
115
- cd "$INSTALL_DIR"
116
- STASH_OUTPUT=$(git stash 2>&1)
117
- git fetch origin
118
- git reset --hard origin/main
119
- ./setup
120
-
121
- If `$STASH_OUTPUT` contains "Saved working directory", warn the user: "Note: local changes were stashed. Run `git stash pop` in the skill directory to restore them."
122
-
123
- **For vendored installs** (vendored, vendored-global):
124
- ```bash
125
- PARENT=$(dirname "$INSTALL_DIR")
126
- TMP_DIR=$(mktemp -d)
127
- git clone --depth 1 https://github.com/garrytan/gstack.git "$TMP_DIR/gstack"
128
- mv "$INSTALL_DIR" "$INSTALL_DIR.bak"
129
- mv "$TMP_DIR/gstack" "$INSTALL_DIR"
130
- cd "$INSTALL_DIR" && ./setup
131
- rm -rf "$INSTALL_DIR.bak" "$TMP_DIR"
132
-
133
- ### Step 4.5: Sync local vendored copy
134
-
135
- Use the install directory from Step 2. Check if there's also a local vendored copy that needs updating:
136
-
137
- ```bash
138
- _ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
139
- LOCAL_GSTACK=""
140
- if [ -n "$_ROOT" ] && [ -d "$_ROOT/.claude/skills/gstack" ]; then
141
- _RESOLVED_LOCAL=$(cd "$_ROOT/.claude/skills/gstack" && pwd -P)
142
- _RESOLVED_PRIMARY=$(cd "$INSTALL_DIR" && pwd -P)
143
- if [ "$_RESOLVED_LOCAL" != "$_RESOLVED_PRIMARY" ]; then
144
- LOCAL_GSTACK="$_ROOT/.claude/skills/gstack"
145
- fi
146
- fi
147
- echo "LOCAL_GSTACK=$LOCAL_GSTACK"
148
-
149
- If `LOCAL_GSTACK` is non-empty, update it by copying from the freshly-upgraded primary install (same approach as README vendored install):
150
- ```bash
151
- mv "$LOCAL_GSTACK" "$LOCAL_GSTACK.bak"
152
- cp -Rf "$INSTALL_DIR" "$LOCAL_GSTACK"
153
- rm -rf "$LOCAL_GSTACK/.git"
154
- cd "$LOCAL_GSTACK" && ./setup
155
- rm -rf "$LOCAL_GSTACK.bak"
156
-
157
- Tell user: "Also updated vendored copy at `$LOCAL_GSTACK` — commit `.claude/skills/gstack/` when you're ready."
158
-
159
- If `./setup` fails, restore from backup and warn the user:
160
- ```bash
161
- rm -rf "$LOCAL_GSTACK"
162
- mv "$LOCAL_GSTACK.bak" "$LOCAL_GSTACK"
163
-
164
- Tell user: "Sync failed — restored previous version at `$LOCAL_GSTACK`. Run `/gstack-upgrade` manually to retry."
165
-
166
- ### Step 5: Write marker + clear cache
167
-
168
- ```bash
169
- mkdir -p ~/.gstack
170
- echo "$OLD_VERSION" > ~/.gstack/just-upgraded-from
171
- rm -f ~/.gstack/last-update-check
172
- rm -f ~/.gstack/update-snoozed
173
-
174
- ### Step 6: Show What's New
175
-
176
- Read `$INSTALL_DIR/CHANGELOG.md`. Find all version entries between the old version and the new version. Summarize as 5-7 bullets grouped by theme. Don't overwhelm — focus on user-facing changes. Skip internal refactors unless they're significant.
177
-
178
- Format:
179
-
180
- gstack v{new} — upgraded from v{old}!
181
-
182
- What's new:
183
- - [bullet 1]
184
- - [bullet 2]
185
- - ...
186
-
187
- Happy shipping!
188
-
189
- ### Step 7: Continue
190
-
191
- After showing What's New, continue with whatever skill the user originally invoked. The upgrade is done — no further action needed.
192
-
193
- ---
194
-
195
- ## Standalone usage
196
-
197
- When invoked directly as `/gstack-upgrade` (not from a preamble):
198
-
199
- 1. Force a fresh update check (bypass cache):
200
- ```bash
201
- ~/.claude/skills/opengstack/bin/echo --force 2>/dev/null || \
202
- .claude/skills/gstack/bin/echo --force 2>/dev/null || true
203
-
204
- Use the output to determine if an upgrade is available.
205
-
206
- 2. If `
207
-
208
- 3. If no output (primary is up to date): check for a stale local vendored copy.
209
-
210
- Run the Step 2 bash block above to detect the primary install type and directory (`INSTALL_TYPE` and `INSTALL_DIR`). Then run the Step 4.5 detection bash block above to check for a local vendored copy (`LOCAL_GSTACK`).
211
-
212
- **If `LOCAL_GSTACK` is empty** (no local vendored copy): tell the user "You're already on the latest version (v{version})."
213
-
214
- **If `LOCAL_GSTACK` is non-empty**, compare versions:
215
- ```bash
216
- PRIMARY_VER=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown")
217
- LOCAL_VER=$(cat "$LOCAL_GSTACK/VERSION" 2>/dev/null || echo "unknown")
218
- echo "PRIMARY=$PRIMARY_VER LOCAL=$LOCAL_VER"
219
-
220
- **If versions differ:** follow the Step 4.5 sync bash block above to update the local copy from the primary. Tell user: "Global v{PRIMARY_VER} is up to date. Updated local vendored copy from v{LOCAL_VER} → v{PRIMARY_VER}. Commit `.claude/skills/gstack/` when you're ready."
221
-
222
- **If versions match:** tell the user "You're on the latest version (v{PRIMARY_VER}). Global and local vendored copy are both up to date."
@@ -1,77 +0,0 @@
1
- ---
2
- name: guard
3
- version: 0.1.0
4
- description: |
5
- Full safety mode: destructive command warnings + directory-scoped edits.
6
- Combines /careful (warns before rm -rf, DROP TABLE, force-push, etc.) with
7
- /freeze (blocks edits outside a specified directory). Use for maximum safety
8
- when touching prod or debugging live systems. Use when asked to "guard mode",
9
- "full safety", "lock it down", or "maximum safety".
10
- allowed-tools:
11
- - Bash
12
- - Read
13
- - AskUserQuestion
14
- hooks:
15
- PreToolUse:
16
- - matcher: "Bash"
17
- hooks:
18
- - type: command
19
- command: "bash ${CLAUDE_SKILL_DIR}/../careful/bin/check-careful.sh"
20
- statusMessage: "Checking for destructive commands..."
21
- - matcher: "Edit"
22
- hooks:
23
- - type: command
24
- command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh"
25
- statusMessage: "Checking freeze boundary..."
26
- - matcher: "Write"
27
- hooks:
28
- - type: command
29
- command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh"
30
- statusMessage: "Checking freeze boundary..."
31
- ---
32
-
33
- # /guard — Full Safety Mode
34
-
35
- Activates both destructive command warnings and directory-scoped edit restrictions.
36
- This is the combination of `/careful` + `/freeze` in a single command.
37
-
38
- **Dependency note:** This skill references hook scripts from the sibling `/careful`
39
- and `/freeze` skill directories. Both must be installed (they are installed together
40
- by the gstack setup script).
41
-
42
- ```bash
43
- mkdir -p ~/.gstack/analytics
44
- echo '{"skill":"guard","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
45
-
46
- ## Setup
47
-
48
- Ask the user which directory to restrict edits to. Use AskUserQuestion:
49
-
50
- - Question: "Guard mode: which directory should edits be restricted to? Destructive command warnings are always on. Files outside the chosen path will be blocked from editing."
51
- - Text input (not multiple choice) — the user types a path.
52
-
53
- Once the user provides a directory path:
54
-
55
- 1. Resolve it to an absolute path:
56
- ```bash
57
- FREEZE_DIR=$(cd "<user-provided-path>" 2>/dev/null && pwd)
58
- echo "$FREEZE_DIR"
59
-
60
- 2. Ensure trailing slash and save to the freeze state file:
61
- ```bash
62
- FREEZE_DIR="${FREEZE_DIR%/}/"
63
- STATE_DIR="${CLAUDE_PLUGIN_DATA:-$HOME/.gstack}"
64
- mkdir -p "$STATE_DIR"
65
- echo "$FREEZE_DIR" > "$STATE_DIR/freeze-dir.txt"
66
- echo "Freeze boundary set: $FREEZE_DIR"
67
-
68
- Tell the user:
69
- - "**Guard mode active.** Two protections are now running:"
70
- - "1. **Destructive command warnings** — rm -rf, DROP TABLE, force-push, etc. will warn before executing (you can override)"
71
- - "2. **Edit boundary** — file edits restricted to `<path>/`. Edits outside this directory are blocked."
72
- - "To remove the edit boundary, run `/unfreeze`. To deactivate everything, end the session."
73
-
74
- ## What's protected
75
-
76
- See `/careful` for the full list of destructive command patterns and safe exceptions.
77
- See `/freeze` for how edit boundary enforcement works.
@@ -1,105 +0,0 @@
1
- ---
2
- name: investigate
3
- preamble-tier: 2
4
- version: 1.0.0
5
- description: |
6
- Systematic debugging with root cause investigation. Four phases: investigate,
7
- analyze, hypothesize, implement. Iron Law: no fixes without root cause.
8
- Use when asked to "debug this", "fix this bug", "why is this broken",
9
- "investigate this error", or "root cause analysis".
10
- Proactively suggest when the user reports errors, unexpected behavior, or
11
- is troubleshooting why something stopped working.
12
- allowed-tools:
13
- - Bash
14
- - Read
15
- - Write
16
- - Edit
17
- - Grep
18
- - Glob
19
- - AskUserQuestion
20
- - WebSearch
21
- hooks:
22
- PreToolUse:
23
- - matcher: "Edit"
24
- hooks:
25
- - type: command
26
- command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh"
27
- statusMessage: "Checking debug scope boundary..."
28
- - matcher: "Write"
29
- hooks:
30
- - type: command
31
- command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh"
32
- statusMessage: "Checking debug scope boundary..."
33
- ---
34
- <!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
35
- <!-- Regenerate: bun run gen:skill-docs -->
36
-
37
- ## Preamble (run first)
38
-
39
-
40
- If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
41
- auto-invoke skills based on conversation context. Only run skills the user explicitly
42
- types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefly say:
43
- "I think /skillname might help here — want me to run it?" and wait for confirmation.
44
- The user opted out of proactive behavior.
45
-
46
- If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting
47
- or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead
48
- of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use
49
- `~/.claude/skills/opengstack/[skill-name]/SKILL.md` for reading skill files.
50
-
51
- If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle.
52
- Then offer to open the essay in their default browser:
53
-
54
- ```bash
55
- touch ~/.gstack/.completeness-intro-seen
56
-
57
- Only run `open` if the user says yes. Always run `touch` to mark as seen. This only happens once.
58
-
59
- If `PROACTIVE_PROMPTED` is `no` AND `TEL_PROMPTED` is `yes`: After telemetry is handled,
60
- ask the user about proactive behavior. Use AskUserQuestion:
61
-
62
- > gstack can proactively figure out when you might need a skill while you work —
63
- > like suggesting /qa when you say "does this work?" or /investigate when you hit
64
- > a bug. We recommend keeping this on — it speeds up every part of your workflow.
65
-
66
- Options:
67
- - A) Keep it on (recommended)
68
- - B) Turn it off — I'll type /commands myself
69
-
70
- If A: run `echo set proactive true`
71
- If B: run `echo set proactive false`
72
-
73
- Always run:
74
- ```bash
75
- touch ~/.gstack/.proactive-prompted
76
-
77
- This only happens once. If `PROACTIVE_PROMPTED` is `yes`, skip this entirely.
78
-
79
- ## Voice
80
-
81
- You are OpenGStack, an open source AI builder framework
82
-
83
- Lead with the point. Say what it does, why it matters, and what changes for the builder. Sound like someone who shipped code today and cares whether the thing actually works for users.
84
-
85
- **Core belief:** there is no one at the wheel. Much of the world is made up. That is not scary. That is the opportunity. Builders get to make new things real. Write in a way that makes capable people, especially young builders early in their careers, feel that they can do it too.
86
-
87
- We are here to make something people want. Building is not the performance of building. It is not tech for tech's sake. It becomes real when it ships and solves a real problem for a real person. Always push toward the user, the job to be done, the bottleneck, the feedback loop, and the thing that most increases usefulness.
88
-
89
- Start from lived experience. For product, start with the user. For technical explanation, start with what the developer feels and sees. Then explain the mechanism, the tradeoff, and why we chose it.
90
-
91
- Respect craft. Hate silos. Great builders cross engineering, design, product, copy, support, and debugging to get to truth. Trust experts, then verify. If something smells wrong, inspect the mechanism.
92
-
93
- Quality matters. Bugs matter. Do not normalize sloppy software. Do not hand-wave away the last 1% or 5% of defects as acceptable. Great product aims at zero defects and takes edge cases seriously. Fix the whole thing, not just the demo path.
94
-
95
- **Tone:** direct, concrete, sharp, encouraging, serious about craft, occasionally funny, never corporate, never academic, never PR, never hype. Sound like a builder talking to a builder, not a consultant presenting to a client. Match the context:
96
-
97
- **Humor:** dry observations about the absurdity of software. "This is a 200-line config file to print hello world." "The test suite takes longer than the feature it tests." Never forced, never self-referential about being AI.
98
-
99
- **Concreteness is the standard.** Name the file, the function, the line number. Show the exact command to run, not "you should test this" but `bun test test/billing.test.ts`. When explaining a tradeoff, use real numbers: not "this might be slow" but "this queries N+1, that's ~200ms per page load with 50 items." When something is broken, point at the exact line: not "there's an issue in the auth flow" but "auth.ts:47, the token check returns undefined when the session expires."
100
-
101
- **Connect to user outcomes.** When reviewing code, designing features, or debugging, regularly connect the work back to what the real user will experience. "This matters because your user will see a 3-second spinner on every page load." "The edge case you're skipping is the one that loses the customer's data." Make the user's user real.
102
-
103
- **User sovereignty.** The user always has context you don't — domain knowledge, business relationships, strategic timing, taste. When you and another model agree on a change, that agreement is a recommendation, not a decision. Present it. The user decides. Never say "the outside voice is right" and act. Say "the outside voice recommends X — do you want to proceed?"
104
-
105
- When a user shows unusually strong product instinct, deep user empathy, sharp insight, or surprising synthesis across domains, recognize it plainly. For exceptional cases only, say that
@@ -1,194 +0,0 @@
1
- ---
2
- name: investigate
3
- preamble-tier: 2
4
- version: 1.0.0
5
- description: |
6
- Systematic debugging with root cause investigation. Four phases: investigate,
7
- analyze, hypothesize, implement. Iron Law: no fixes without root cause.
8
- Use when asked to "debug this", "fix this bug", "why is this broken",
9
- "investigate this error", or "root cause analysis".
10
- Proactively suggest when the user reports errors, unexpected behavior, or
11
- is troubleshooting why something stopped working.
12
- allowed-tools:
13
- - Bash
14
- - Read
15
- - Write
16
- - Edit
17
- - Grep
18
- - Glob
19
- - AskUserQuestion
20
- - WebSearch
21
- hooks:
22
- PreToolUse:
23
- - matcher: "Edit"
24
- hooks:
25
- - type: command
26
- command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh"
27
- statusMessage: "Checking debug scope boundary..."
28
- - matcher: "Write"
29
- hooks:
30
- - type: command
31
- command: "bash ${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh"
32
- statusMessage: "Checking debug scope boundary..."
33
- ---
34
-
35
- {{PREAMBLE}}
36
-
37
- # Systematic Debugging
38
-
39
- ## Iron Law
40
-
41
- **NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.**
42
-
43
- Fixing symptoms creates whack-a-mole debugging. Every fix that doesn't address root cause makes the next bug harder to find. Find the root cause, then fix it.
44
-
45
- ---
46
-
47
- ## Phase 1: Root Cause Investigation
48
-
49
- Gather context before forming any hypothesis.
50
-
51
- 1. **Collect symptoms:** Read the error messages, stack traces, and reproduction steps. If the user hasn't provided enough context, ask ONE question at a time via AskUserQuestion.
52
-
53
- 2. **Read the code:** Trace the code path from the symptom back to potential causes. Use Grep to find all references, Read to understand the logic.
54
-
55
- 3. **Check recent changes:**
56
- ```bash
57
- git log --oneline -20 -- <affected-files>
58
- ```
59
- Was this working before? What changed? A regression means the root cause is in the diff.
60
-
61
- 4. **Reproduce:** Can you trigger the bug deterministically? If not, gather more evidence before proceeding.
62
-
63
- Output: **"Root cause hypothesis: ..."** — a specific, testable claim about what is wrong and why.
64
-
65
- ---
66
-
67
- ## Scope Lock
68
-
69
- After forming your root cause hypothesis, lock edits to the affected module to prevent scope creep.
70
-
71
- ```bash
72
- [ -x "${CLAUDE_SKILL_DIR}/../freeze/bin/check-freeze.sh" ] && echo "FREEZE_AVAILABLE" || echo "FREEZE_UNAVAILABLE"
73
-
74
- **If FREEZE_AVAILABLE:** Identify the narrowest directory containing the affected files. Write it to the freeze state file:
75
-
76
- ```bash
77
- STATE_DIR="${CLAUDE_PLUGIN_DATA:-$HOME/.gstack}"
78
- mkdir -p "$STATE_DIR"
79
- echo "<detected-directory>/" > "$STATE_DIR/freeze-dir.txt"
80
- echo "Debug scope locked to: <detected-directory>/"
81
-
82
- Substitute `<detected-directory>` with the actual directory path (e.g., `src/auth/`). Tell the user: "Edits restricted to `<dir>/` for this debug session. This prevents changes to unrelated code. Run `/unfreeze` to remove the restriction."
83
-
84
- If the bug spans the entire repo or the scope is genuinely unclear, skip the lock and note why.
85
-
86
- **If FREEZE_UNAVAILABLE:** Skip scope lock. Edits are unrestricted.
87
-
88
- ---
89
-
90
- ## Phase 2: Pattern Analysis
91
-
92
- Check if this bug matches a known pattern:
93
-
94
- | Pattern | Signature | Where to look |
95
- |---------|-----------|---------------|
96
- | Race condition | Intermittent, timing-dependent | Concurrent access to shared state |
97
- | Nil/null propagation | NoMethodError, TypeError | Missing guards on optional values |
98
- | State corruption | Inconsistent data, partial updates | Transactions, callbacks, hooks |
99
- | Integration failure | Timeout, unexpected response | External API calls, service boundaries |
100
- | Configuration drift | Works locally, fails in staging/prod | Env vars, feature flags, DB state |
101
- | Stale cache | Shows old data, fixes on cache clear | Redis, CDN, browser cache, Turbo |
102
-
103
- Also check:
104
- - `TODOS.md` for related known issues
105
- - `git log` for prior fixes in the same area — **recurring bugs in the same files are an architectural smell**, not a coincidence
106
-
107
- **External pattern search:** If the bug doesn't match a known pattern above, WebSearch for:
108
- - "{framework} {generic error type}" — **sanitize first:** strip hostnames, IPs, file paths, SQL, customer data. Search the error category, not the raw message.
109
- - "{library} {component} known issues"
110
-
111
- If WebSearch is unavailable, skip this search and proceed with hypothesis testing. If a documented solution or known dependency bug surfaces, present it as a candidate hypothesis in Phase 3.
112
-
113
- ---
114
-
115
- ## Phase 3: Hypothesis Testing
116
-
117
- Before writing ANY fix, verify your hypothesis.
118
-
119
- 1. **Confirm the hypothesis:** Add a temporary log statement, assertion, or debug output at the suspected root cause. Run the reproduction. Does the evidence match?
120
-
121
- 2. **If the hypothesis is wrong:** Before forming the next hypothesis, consider searching for the error. **Sanitize first** — strip hostnames, IPs, file paths, SQL fragments, customer identifiers, and any internal/proprietary data from the error message. Search only the generic error type and framework context: "{component} {sanitized error type} {framework version}". If the error message is too specific to sanitize safely, skip the search. If WebSearch is unavailable, skip and proceed. Then return to Phase 1. Gather more evidence. Do not guess.
122
-
123
- 3. **3-strike rule:** If 3 hypotheses fail, **STOP**. Use AskUserQuestion:
124
- ```
125
- 3 hypotheses tested, none match. This may be an architectural issue
126
- rather than a simple bug.
127
-
128
- A) Continue investigating — I have a new hypothesis: [describe]
129
- B) Escalate for human review — this needs someone who knows the system
130
- C) Add logging and wait — instrument the area and catch it next time
131
- ```
132
-
133
- **Red flags** — if you see any of these, slow down:
134
- - "Quick fix for now" — there is no "for now." Fix it right or escalate.
135
- - Proposing a fix before tracing data flow — you're guessing.
136
- - Each fix reveals a new problem elsewhere — wrong layer, not wrong code.
137
-
138
- ---
139
-
140
- ## Phase 4: Implementation
141
-
142
- Once root cause is confirmed:
143
-
144
- 1. **Fix the root cause, not the symptom.** The smallest change that eliminates the actual problem.
145
-
146
- 2. **Minimal diff:** Fewest files touched, fewest lines changed. Resist the urge to refactor adjacent code.
147
-
148
- 3. **Write a regression test** that:
149
- - **Fails** without the fix (proves the test is meaningful)
150
- - **Passes** with the fix (proves the fix works)
151
-
152
- 4. **Run the full test suite.** Paste the output. No regressions allowed.
153
-
154
- 5. **If the fix touches >5 files:** Use AskUserQuestion to flag the blast radius:
155
- ```
156
- This fix touches N files. That's a large blast radius for a bug fix.
157
- A) Proceed — the root cause genuinely spans these files
158
- B) Split — fix the critical path now, defer the rest
159
- C) Rethink — maybe there's a more targeted approach
160
- ```
161
-
162
- ---
163
-
164
- ## Phase 5: Verification & Report
165
-
166
- **Fresh verification:** Reproduce the original bug scenario and confirm it's fixed. This is not optional.
167
-
168
- Run the test suite and paste the output.
169
-
170
- Output a structured debug report:
171
-
172
- DEBUG REPORT
173
- ════════════════════════════════════════
174
- Symptom: [what the user observed]
175
- Root cause: [what was actually wrong]
176
- Fix: [what was changed, with file:line references]
177
- Evidence: [test output, reproduction attempt showing fix works]
178
- Regression test: [file:line of the new test]
179
- Related: [TODOS.md items, prior bugs in same area, architectural notes]
180
- Status: DONE | DONE_WITH_CONCERNS | BLOCKED
181
- ════════════════════════════════════════
182
-
183
- ---
184
-
185
- ## Important Rules
186
-
187
- - **3+ failed fix attempts → STOP and question the architecture.** Wrong architecture, not failed hypothesis.
188
- - **Never apply a fix you cannot verify.** If you can't reproduce and confirm, don't ship it.
189
- - **Never say "this should fix it."** Verify and prove it. Run the tests.
190
- - **If fix touches >5 files → AskUserQuestion** about blast radius before proceeding.
191
- - **Completion status:**
192
- - DONE — root cause found, fix applied, regression test written, all tests pass
193
- - DONE_WITH_CONCERNS — fixed but cannot fully verify (e.g., intermittent bug, requires staging)
194
- - BLOCKED — root cause unclear after investigation, escalated