opengstack 0.13.10 → 0.14.2

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 (189) hide show
  1. package/AGENTS.md +4 -4
  2. package/CLAUDE.md +127 -110
  3. package/README.md +10 -5
  4. package/SKILL.md +500 -70
  5. package/bin/opengstack.js +69 -69
  6. package/{skills/land-and-deploy/SKILL.md → commands/autoplan.md} +7 -25
  7. package/{skills/benchmark/SKILL.md → commands/benchmark.md} +84 -108
  8. package/{skills/browse/SKILL.md → commands/browse.md} +60 -81
  9. package/{skills/ship/SKILL.md → commands/canary.md} +7 -27
  10. package/{skills/careful/SKILL.md → commands/careful.md} +2 -22
  11. package/{skills/canary/SKILL.md → commands/codex.md} +7 -26
  12. package/{skills/connect-chrome/SKILL.md → commands/connect-chrome.md} +7 -24
  13. package/commands/cso.md +70 -0
  14. package/commands/design-consultation.md +70 -0
  15. package/commands/design-review.md +70 -0
  16. package/commands/design-shotgun.md +70 -0
  17. package/commands/document-release.md +70 -0
  18. package/{skills/freeze/SKILL.md → commands/freeze.md} +3 -29
  19. package/{skills/guard/SKILL.md → commands/guard.md} +4 -35
  20. package/commands/investigate.md +70 -0
  21. package/commands/land-and-deploy.md +70 -0
  22. package/commands/office-hours.md +70 -0
  23. package/{skills/gstack-upgrade/SKILL.md → commands/opengstack-upgrade.md} +64 -79
  24. package/commands/plan-ceo-review.md +70 -0
  25. package/commands/plan-design-review.md +70 -0
  26. package/commands/plan-eng-review.md +70 -0
  27. package/commands/qa-only.md +70 -0
  28. package/commands/qa.md +70 -0
  29. package/commands/retro.md +70 -0
  30. package/commands/review.md +70 -0
  31. package/{skills/setup-browser-cookies/SKILL.md → commands/setup-browser-cookies.md} +22 -40
  32. package/commands/setup-deploy.md +70 -0
  33. package/commands/ship.md +70 -0
  34. package/commands/unfreeze.md +25 -0
  35. package/docs/designs/CHROME_VS_CHROMIUM_EXPLORATION.md +9 -9
  36. package/docs/designs/CONDUCTOR_CHROME_SIDEBAR_INTEGRATION.md +2 -2
  37. package/docs/designs/CONDUCTOR_SESSION_API.md +16 -16
  38. package/docs/designs/DESIGN_SHOTGUN.md +74 -74
  39. package/docs/designs/DESIGN_TOOLS_V1.md +111 -111
  40. package/docs/skills.md +483 -202
  41. package/package.json +42 -43
  42. package/scripts/analytics.ts +188 -0
  43. package/scripts/dev-skill.ts +83 -0
  44. package/scripts/discover-skills.ts +39 -0
  45. package/scripts/eval-compare.ts +97 -0
  46. package/scripts/eval-list.ts +117 -0
  47. package/scripts/eval-select.ts +86 -0
  48. package/scripts/eval-summary.ts +188 -0
  49. package/scripts/eval-watch.ts +172 -0
  50. package/scripts/gen-skill-docs.ts +473 -0
  51. package/scripts/resolvers/browse.ts +129 -0
  52. package/scripts/resolvers/codex-helpers.ts +133 -0
  53. package/scripts/resolvers/composition.ts +48 -0
  54. package/scripts/resolvers/confidence.ts +37 -0
  55. package/scripts/resolvers/constants.ts +50 -0
  56. package/scripts/resolvers/design.ts +950 -0
  57. package/scripts/resolvers/index.ts +59 -0
  58. package/scripts/resolvers/learnings.ts +96 -0
  59. package/scripts/resolvers/preamble.ts +505 -0
  60. package/scripts/resolvers/review.ts +884 -0
  61. package/scripts/resolvers/testing.ts +573 -0
  62. package/scripts/resolvers/types.ts +45 -0
  63. package/scripts/resolvers/utility.ts +421 -0
  64. package/scripts/skill-check.ts +190 -0
  65. package/scripts/cleanup.py +0 -100
  66. package/scripts/filter-skills.sh +0 -114
  67. package/scripts/filter_skills.py +0 -164
  68. package/scripts/install-skills.js +0 -60
  69. package/skills/autoplan/SKILL.md +0 -96
  70. package/skills/autoplan/SKILL.md.tmpl +0 -694
  71. package/skills/benchmark/SKILL.md.tmpl +0 -222
  72. package/skills/browse/SKILL.md.tmpl +0 -131
  73. package/skills/browse/bin/find-browse +0 -21
  74. package/skills/browse/bin/remote-slug +0 -14
  75. package/skills/browse/scripts/build-node-server.sh +0 -48
  76. package/skills/browse/src/activity.ts +0 -208
  77. package/skills/browse/src/browser-manager.ts +0 -959
  78. package/skills/browse/src/buffers.ts +0 -137
  79. package/skills/browse/src/bun-polyfill.cjs +0 -109
  80. package/skills/browse/src/cli.ts +0 -678
  81. package/skills/browse/src/commands.ts +0 -128
  82. package/skills/browse/src/config.ts +0 -150
  83. package/skills/browse/src/cookie-import-browser.ts +0 -625
  84. package/skills/browse/src/cookie-picker-routes.ts +0 -230
  85. package/skills/browse/src/cookie-picker-ui.ts +0 -688
  86. package/skills/browse/src/find-browse.ts +0 -61
  87. package/skills/browse/src/meta-commands.ts +0 -550
  88. package/skills/browse/src/platform.ts +0 -17
  89. package/skills/browse/src/read-commands.ts +0 -358
  90. package/skills/browse/src/server.ts +0 -1192
  91. package/skills/browse/src/sidebar-agent.ts +0 -280
  92. package/skills/browse/src/sidebar-utils.ts +0 -21
  93. package/skills/browse/src/snapshot.ts +0 -407
  94. package/skills/browse/src/url-validation.ts +0 -95
  95. package/skills/browse/src/write-commands.ts +0 -364
  96. package/skills/browse/test/activity.test.ts +0 -120
  97. package/skills/browse/test/adversarial-security.test.ts +0 -32
  98. package/skills/browse/test/browser-manager-unit.test.ts +0 -17
  99. package/skills/browse/test/bun-polyfill.test.ts +0 -72
  100. package/skills/browse/test/commands.test.ts +0 -2075
  101. package/skills/browse/test/compare-board.test.ts +0 -342
  102. package/skills/browse/test/config.test.ts +0 -316
  103. package/skills/browse/test/cookie-import-browser.test.ts +0 -519
  104. package/skills/browse/test/cookie-picker-routes.test.ts +0 -260
  105. package/skills/browse/test/file-drop.test.ts +0 -271
  106. package/skills/browse/test/find-browse.test.ts +0 -50
  107. package/skills/browse/test/findport.test.ts +0 -191
  108. package/skills/browse/test/fixtures/basic.html +0 -33
  109. package/skills/browse/test/fixtures/cursor-interactive.html +0 -22
  110. package/skills/browse/test/fixtures/dialog.html +0 -15
  111. package/skills/browse/test/fixtures/empty.html +0 -2
  112. package/skills/browse/test/fixtures/forms.html +0 -55
  113. package/skills/browse/test/fixtures/iframe.html +0 -30
  114. package/skills/browse/test/fixtures/network-idle.html +0 -30
  115. package/skills/browse/test/fixtures/qa-eval-checkout.html +0 -108
  116. package/skills/browse/test/fixtures/qa-eval-spa.html +0 -98
  117. package/skills/browse/test/fixtures/qa-eval.html +0 -51
  118. package/skills/browse/test/fixtures/responsive.html +0 -49
  119. package/skills/browse/test/fixtures/snapshot.html +0 -55
  120. package/skills/browse/test/fixtures/spa.html +0 -24
  121. package/skills/browse/test/fixtures/states.html +0 -17
  122. package/skills/browse/test/fixtures/upload.html +0 -25
  123. package/skills/browse/test/gstack-config.test.ts +0 -138
  124. package/skills/browse/test/gstack-update-check.test.ts +0 -514
  125. package/skills/browse/test/handoff.test.ts +0 -235
  126. package/skills/browse/test/path-validation.test.ts +0 -91
  127. package/skills/browse/test/platform.test.ts +0 -37
  128. package/skills/browse/test/server-auth.test.ts +0 -65
  129. package/skills/browse/test/sidebar-agent-roundtrip.test.ts +0 -226
  130. package/skills/browse/test/sidebar-agent.test.ts +0 -199
  131. package/skills/browse/test/sidebar-integration.test.ts +0 -320
  132. package/skills/browse/test/sidebar-unit.test.ts +0 -96
  133. package/skills/browse/test/snapshot.test.ts +0 -467
  134. package/skills/browse/test/state-ttl.test.ts +0 -35
  135. package/skills/browse/test/test-server.ts +0 -57
  136. package/skills/browse/test/url-validation.test.ts +0 -72
  137. package/skills/browse/test/watch.test.ts +0 -129
  138. package/skills/canary/SKILL.md.tmpl +0 -212
  139. package/skills/careful/SKILL.md.tmpl +0 -56
  140. package/skills/careful/bin/check-careful.sh +0 -112
  141. package/skills/codex/SKILL.md +0 -90
  142. package/skills/codex/SKILL.md.tmpl +0 -417
  143. package/skills/connect-chrome/SKILL.md.tmpl +0 -195
  144. package/skills/cso/ACKNOWLEDGEMENTS.md +0 -14
  145. package/skills/cso/SKILL.md +0 -93
  146. package/skills/cso/SKILL.md.tmpl +0 -606
  147. package/skills/design-consultation/SKILL.md +0 -94
  148. package/skills/design-consultation/SKILL.md.tmpl +0 -415
  149. package/skills/design-review/SKILL.md +0 -94
  150. package/skills/design-review/SKILL.md.tmpl +0 -290
  151. package/skills/design-shotgun/SKILL.md +0 -91
  152. package/skills/design-shotgun/SKILL.md.tmpl +0 -285
  153. package/skills/document-release/SKILL.md +0 -91
  154. package/skills/document-release/SKILL.md.tmpl +0 -359
  155. package/skills/freeze/SKILL.md.tmpl +0 -77
  156. package/skills/freeze/bin/check-freeze.sh +0 -79
  157. package/skills/gstack-upgrade/SKILL.md.tmpl +0 -222
  158. package/skills/guard/SKILL.md.tmpl +0 -77
  159. package/skills/investigate/SKILL.md +0 -105
  160. package/skills/investigate/SKILL.md.tmpl +0 -194
  161. package/skills/land-and-deploy/SKILL.md.tmpl +0 -881
  162. package/skills/office-hours/SKILL.md +0 -96
  163. package/skills/office-hours/SKILL.md.tmpl +0 -645
  164. package/skills/plan-ceo-review/SKILL.md +0 -94
  165. package/skills/plan-ceo-review/SKILL.md.tmpl +0 -811
  166. package/skills/plan-design-review/SKILL.md +0 -92
  167. package/skills/plan-design-review/SKILL.md.tmpl +0 -446
  168. package/skills/plan-eng-review/SKILL.md +0 -93
  169. package/skills/plan-eng-review/SKILL.md.tmpl +0 -303
  170. package/skills/qa/SKILL.md +0 -95
  171. package/skills/qa/SKILL.md.tmpl +0 -316
  172. package/skills/qa/references/issue-taxonomy.md +0 -85
  173. package/skills/qa/templates/qa-report-template.md +0 -126
  174. package/skills/qa-only/SKILL.md +0 -89
  175. package/skills/qa-only/SKILL.md.tmpl +0 -101
  176. package/skills/retro/SKILL.md +0 -89
  177. package/skills/retro/SKILL.md.tmpl +0 -820
  178. package/skills/review/SKILL.md +0 -92
  179. package/skills/review/SKILL.md.tmpl +0 -281
  180. package/skills/review/TODOS-format.md +0 -62
  181. package/skills/review/checklist.md +0 -220
  182. package/skills/review/design-checklist.md +0 -132
  183. package/skills/review/greptile-triage.md +0 -220
  184. package/skills/setup-browser-cookies/SKILL.md.tmpl +0 -81
  185. package/skills/setup-deploy/SKILL.md +0 -92
  186. package/skills/setup-deploy/SKILL.md.tmpl +0 -215
  187. package/skills/ship/SKILL.md.tmpl +0 -636
  188. package/skills/unfreeze/SKILL.md +0 -37
  189. 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