opengstack 0.13.10 → 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 (151) 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/skills/autoplan/SKILL.md +0 -96
  33. package/skills/autoplan/SKILL.md.tmpl +0 -694
  34. package/skills/benchmark/SKILL.md.tmpl +0 -222
  35. package/skills/browse/SKILL.md.tmpl +0 -131
  36. package/skills/browse/bin/find-browse +0 -21
  37. package/skills/browse/bin/remote-slug +0 -14
  38. package/skills/browse/scripts/build-node-server.sh +0 -48
  39. package/skills/browse/src/activity.ts +0 -208
  40. package/skills/browse/src/browser-manager.ts +0 -959
  41. package/skills/browse/src/buffers.ts +0 -137
  42. package/skills/browse/src/bun-polyfill.cjs +0 -109
  43. package/skills/browse/src/cli.ts +0 -678
  44. package/skills/browse/src/commands.ts +0 -128
  45. package/skills/browse/src/config.ts +0 -150
  46. package/skills/browse/src/cookie-import-browser.ts +0 -625
  47. package/skills/browse/src/cookie-picker-routes.ts +0 -230
  48. package/skills/browse/src/cookie-picker-ui.ts +0 -688
  49. package/skills/browse/src/find-browse.ts +0 -61
  50. package/skills/browse/src/meta-commands.ts +0 -550
  51. package/skills/browse/src/platform.ts +0 -17
  52. package/skills/browse/src/read-commands.ts +0 -358
  53. package/skills/browse/src/server.ts +0 -1192
  54. package/skills/browse/src/sidebar-agent.ts +0 -280
  55. package/skills/browse/src/sidebar-utils.ts +0 -21
  56. package/skills/browse/src/snapshot.ts +0 -407
  57. package/skills/browse/src/url-validation.ts +0 -95
  58. package/skills/browse/src/write-commands.ts +0 -364
  59. package/skills/browse/test/activity.test.ts +0 -120
  60. package/skills/browse/test/adversarial-security.test.ts +0 -32
  61. package/skills/browse/test/browser-manager-unit.test.ts +0 -17
  62. package/skills/browse/test/bun-polyfill.test.ts +0 -72
  63. package/skills/browse/test/commands.test.ts +0 -2075
  64. package/skills/browse/test/compare-board.test.ts +0 -342
  65. package/skills/browse/test/config.test.ts +0 -316
  66. package/skills/browse/test/cookie-import-browser.test.ts +0 -519
  67. package/skills/browse/test/cookie-picker-routes.test.ts +0 -260
  68. package/skills/browse/test/file-drop.test.ts +0 -271
  69. package/skills/browse/test/find-browse.test.ts +0 -50
  70. package/skills/browse/test/findport.test.ts +0 -191
  71. package/skills/browse/test/fixtures/basic.html +0 -33
  72. package/skills/browse/test/fixtures/cursor-interactive.html +0 -22
  73. package/skills/browse/test/fixtures/dialog.html +0 -15
  74. package/skills/browse/test/fixtures/empty.html +0 -2
  75. package/skills/browse/test/fixtures/forms.html +0 -55
  76. package/skills/browse/test/fixtures/iframe.html +0 -30
  77. package/skills/browse/test/fixtures/network-idle.html +0 -30
  78. package/skills/browse/test/fixtures/qa-eval-checkout.html +0 -108
  79. package/skills/browse/test/fixtures/qa-eval-spa.html +0 -98
  80. package/skills/browse/test/fixtures/qa-eval.html +0 -51
  81. package/skills/browse/test/fixtures/responsive.html +0 -49
  82. package/skills/browse/test/fixtures/snapshot.html +0 -55
  83. package/skills/browse/test/fixtures/spa.html +0 -24
  84. package/skills/browse/test/fixtures/states.html +0 -17
  85. package/skills/browse/test/fixtures/upload.html +0 -25
  86. package/skills/browse/test/gstack-config.test.ts +0 -138
  87. package/skills/browse/test/gstack-update-check.test.ts +0 -514
  88. package/skills/browse/test/handoff.test.ts +0 -235
  89. package/skills/browse/test/path-validation.test.ts +0 -91
  90. package/skills/browse/test/platform.test.ts +0 -37
  91. package/skills/browse/test/server-auth.test.ts +0 -65
  92. package/skills/browse/test/sidebar-agent-roundtrip.test.ts +0 -226
  93. package/skills/browse/test/sidebar-agent.test.ts +0 -199
  94. package/skills/browse/test/sidebar-integration.test.ts +0 -320
  95. package/skills/browse/test/sidebar-unit.test.ts +0 -96
  96. package/skills/browse/test/snapshot.test.ts +0 -467
  97. package/skills/browse/test/state-ttl.test.ts +0 -35
  98. package/skills/browse/test/test-server.ts +0 -57
  99. package/skills/browse/test/url-validation.test.ts +0 -72
  100. package/skills/browse/test/watch.test.ts +0 -129
  101. package/skills/canary/SKILL.md.tmpl +0 -212
  102. package/skills/careful/SKILL.md.tmpl +0 -56
  103. package/skills/careful/bin/check-careful.sh +0 -112
  104. package/skills/codex/SKILL.md +0 -90
  105. package/skills/codex/SKILL.md.tmpl +0 -417
  106. package/skills/connect-chrome/SKILL.md.tmpl +0 -195
  107. package/skills/cso/ACKNOWLEDGEMENTS.md +0 -14
  108. package/skills/cso/SKILL.md +0 -93
  109. package/skills/cso/SKILL.md.tmpl +0 -606
  110. package/skills/design-consultation/SKILL.md +0 -94
  111. package/skills/design-consultation/SKILL.md.tmpl +0 -415
  112. package/skills/design-review/SKILL.md +0 -94
  113. package/skills/design-review/SKILL.md.tmpl +0 -290
  114. package/skills/design-shotgun/SKILL.md +0 -91
  115. package/skills/design-shotgun/SKILL.md.tmpl +0 -285
  116. package/skills/document-release/SKILL.md +0 -91
  117. package/skills/document-release/SKILL.md.tmpl +0 -359
  118. package/skills/freeze/SKILL.md.tmpl +0 -77
  119. package/skills/freeze/bin/check-freeze.sh +0 -79
  120. package/skills/gstack-upgrade/SKILL.md.tmpl +0 -222
  121. package/skills/guard/SKILL.md.tmpl +0 -77
  122. package/skills/investigate/SKILL.md +0 -105
  123. package/skills/investigate/SKILL.md.tmpl +0 -194
  124. package/skills/land-and-deploy/SKILL.md.tmpl +0 -881
  125. package/skills/office-hours/SKILL.md +0 -96
  126. package/skills/office-hours/SKILL.md.tmpl +0 -645
  127. package/skills/plan-ceo-review/SKILL.md +0 -94
  128. package/skills/plan-ceo-review/SKILL.md.tmpl +0 -811
  129. package/skills/plan-design-review/SKILL.md +0 -92
  130. package/skills/plan-design-review/SKILL.md.tmpl +0 -446
  131. package/skills/plan-eng-review/SKILL.md +0 -93
  132. package/skills/plan-eng-review/SKILL.md.tmpl +0 -303
  133. package/skills/qa/SKILL.md +0 -95
  134. package/skills/qa/SKILL.md.tmpl +0 -316
  135. package/skills/qa/references/issue-taxonomy.md +0 -85
  136. package/skills/qa/templates/qa-report-template.md +0 -126
  137. package/skills/qa-only/SKILL.md +0 -89
  138. package/skills/qa-only/SKILL.md.tmpl +0 -101
  139. package/skills/retro/SKILL.md +0 -89
  140. package/skills/retro/SKILL.md.tmpl +0 -820
  141. package/skills/review/SKILL.md +0 -92
  142. package/skills/review/SKILL.md.tmpl +0 -281
  143. package/skills/review/TODOS-format.md +0 -62
  144. package/skills/review/checklist.md +0 -220
  145. package/skills/review/design-checklist.md +0 -132
  146. package/skills/review/greptile-triage.md +0 -220
  147. package/skills/setup-browser-cookies/SKILL.md.tmpl +0 -81
  148. package/skills/setup-deploy/SKILL.md +0 -92
  149. package/skills/setup-deploy/SKILL.md.tmpl +0 -215
  150. package/skills/ship/SKILL.md.tmpl +0 -636
  151. package/skills/unfreeze/SKILL.md.tmpl +0 -36
@@ -1,92 +0,0 @@
1
- ---
2
- name: review
3
- preamble-tier: 4
4
- version: 1.0.0
5
- description: |
6
- Pre-landing PR review. Analyzes diff against the base branch for SQL safety, LLM trust
7
- boundary violations, conditional side effects, and other structural issues. Use when
8
- asked to "review this PR", "code review", "pre-landing review", or "check my diff".
9
- Proactively suggest when the user is about to merge or land code changes.
10
- allowed-tools:
11
- - Bash
12
- - Read
13
- - Edit
14
- - Write
15
- - Grep
16
- - Glob
17
- - Agent
18
- - AskUserQuestion
19
- - WebSearch
20
- ---
21
- <!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
22
- <!-- Regenerate: bun run gen:skill-docs -->
23
-
24
- ## Preamble (run first)
25
-
26
-
27
- If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
28
- auto-invoke skills based on conversation context. Only run skills the user explicitly
29
- types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefly say:
30
- "I think /skillname might help here — want me to run it?" and wait for confirmation.
31
- The user opted out of proactive behavior.
32
-
33
- If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting
34
- or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead
35
- of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use
36
- `~/.claude/skills/opengstack/[skill-name]/SKILL.md` for reading skill files.
37
-
38
- If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle.
39
- Then offer to open the essay in their default browser:
40
-
41
- ```bash
42
- touch ~/.gstack/.completeness-intro-seen
43
-
44
- Only run `open` if the user says yes. Always run `touch` to mark as seen. This only happens once.
45
-
46
- If `PROACTIVE_PROMPTED` is `no` AND `TEL_PROMPTED` is `yes`: After telemetry is handled,
47
- ask the user about proactive behavior. Use AskUserQuestion:
48
-
49
- > gstack can proactively figure out when you might need a skill while you work —
50
- > like suggesting /qa when you say "does this work?" or /investigate when you hit
51
- > a bug. We recommend keeping this on — it speeds up every part of your workflow.
52
-
53
- Options:
54
- - A) Keep it on (recommended)
55
- - B) Turn it off — I'll type /commands myself
56
-
57
- If A: run `echo set proactive true`
58
- If B: run `echo set proactive false`
59
-
60
- Always run:
61
- ```bash
62
- touch ~/.gstack/.proactive-prompted
63
-
64
- This only happens once. If `PROACTIVE_PROMPTED` is `yes`, skip this entirely.
65
-
66
- ## Voice
67
-
68
- You are OpenGStack, an open source AI builder framework
69
-
70
- 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.
71
-
72
- **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.
73
-
74
- 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.
75
-
76
- 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.
77
-
78
- 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.
79
-
80
- 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.
81
-
82
- **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:
83
-
84
- **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.
85
-
86
- **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."
87
-
88
- **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.
89
-
90
- **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?"
91
-
92
- 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,281 +0,0 @@
1
- ---
2
- name: review
3
- preamble-tier: 4
4
- version: 1.0.0
5
- description: |
6
- Pre-landing PR review. Analyzes diff against the base branch for SQL safety, LLM trust
7
- boundary violations, conditional side effects, and other structural issues. Use when
8
- asked to "review this PR", "code review", "pre-landing review", or "check my diff".
9
- Proactively suggest when the user is about to merge or land code changes.
10
- allowed-tools:
11
- - Bash
12
- - Read
13
- - Edit
14
- - Write
15
- - Grep
16
- - Glob
17
- - Agent
18
- - AskUserQuestion
19
- - WebSearch
20
- ---
21
-
22
- {{PREAMBLE}}
23
-
24
- {{BASE_BRANCH_DETECT}}
25
-
26
- # Pre-Landing PR Review
27
-
28
- You are running the `/review` workflow. Analyze the current branch's diff against the base branch for structural issues that tests don't catch.
29
-
30
- ---
31
-
32
- ## Step 1: Check branch
33
-
34
- 1. Run `git branch --show-current` to get the current branch.
35
- 2. If on the base branch, output: **"Nothing to review — you're on the base branch or have no changes against it."** and stop.
36
- 3. Run `git fetch origin <base> --quiet && git diff origin/<base> --stat` to check if there's a diff. If no diff, output the same message and stop.
37
-
38
- ---
39
-
40
- ## Step 1.5: Scope Drift Detection
41
-
42
- Before reviewing code quality, check: **did they build what was requested — nothing more, nothing less?**
43
-
44
- 1. Read `TODOS.md` (if it exists). Read PR description (`gh pr view --json body --jq .body 2>/dev/null || true`).
45
- Read commit messages (`git log origin/<base>..HEAD --oneline`).
46
- **If no PR exists:** rely on commit messages and TODOS.md for stated intent — this is the common case since /review runs before /ship creates the PR.
47
- 2. Identify the **stated intent** — what was this branch supposed to accomplish?
48
- 3. Run `git diff origin/<base>...HEAD --stat` and compare the files changed against the stated intent.
49
-
50
- {{PLAN_COMPLETION_AUDIT_REVIEW}}
51
-
52
- 4. Evaluate with skepticism (incorporating plan completion results if available):
53
-
54
- **SCOPE CREEP detection:**
55
- - Files changed that are unrelated to the stated intent
56
- - New features or refactors not mentioned in the plan
57
- - "While I was in there..." changes that expand blast radius
58
-
59
- **MISSING REQUIREMENTS detection:**
60
- - Requirements from TODOS.md/PR description not addressed in the diff
61
- - Test coverage gaps for stated requirements
62
- - Partial implementations (started but not finished)
63
-
64
- 5. Output (before the main review begins):
65
- ```
66
- Scope Check: [CLEAN / DRIFT DETECTED / REQUIREMENTS MISSING]
67
- Intent: <1-line summary of what was requested>
68
- Delivered: <1-line summary of what the diff actually does>
69
- [If drift: list each out-of-scope change]
70
- [If missing: list each unaddressed requirement]
71
- ```
72
-
73
- 6. This is **INFORMATIONAL** — does not block the review. Proceed to Step 2.
74
-
75
- ---
76
-
77
- ## Step 2: Read the checklist
78
-
79
- Read `.claude/skills/review/checklist.md`.
80
-
81
- **If the file cannot be read, STOP and report the error.** Do not proceed without the checklist.
82
-
83
- ---
84
-
85
- ## Step 2.5: Check for Greptile review comments
86
-
87
- Read `.claude/skills/review/greptile-triage.md` and follow the fetch, filter, classify, and **escalation detection** steps.
88
-
89
- **If no PR exists, `gh` fails, API returns an error, or there are zero Greptile comments:** Skip this step silently. Greptile integration is additive — the review works without it.
90
-
91
- **If Greptile comments are found:** Store the classifications (VALID & ACTIONABLE, VALID BUT ALREADY FIXED, FALSE POSITIVE, SUPPRESSED) — you will need them in Step 5.
92
-
93
- ---
94
-
95
- ## Step 3: Get the diff
96
-
97
- Fetch the latest base branch to avoid false positives from stale local state:
98
-
99
- ```bash
100
- git fetch origin <base> --quiet
101
-
102
- Run `git diff origin/<base>` to get the full diff. This includes both committed and uncommitted changes against the latest base branch.
103
-
104
- ---
105
-
106
- ## Step 4: Two-pass review
107
-
108
- Apply the checklist against the diff in two passes:
109
-
110
- 1. **Pass 1 (CRITICAL):** SQL & Data Safety, Race Conditions & Concurrency, LLM Output Trust Boundary, Enum & Value Completeness
111
- 2. **Pass 2 (INFORMATIONAL):** Conditional Side Effects, Magic Numbers & String Coupling, Dead Code & Consistency, LLM Prompt Issues, Test Gaps, View/Frontend, Performance & Bundle Impact
112
-
113
- **Enum & Value Completeness requires reading code OUTSIDE the diff.** When the diff introduces a new enum value, status, tier, or type constant, use Grep to find all files that reference sibling values, then Read those files to check if the new value is handled. This is the one category where within-diff review is insufficient.
114
-
115
- **Search-before-recommending:** When recommending a fix pattern (especially for concurrency, caching, auth, or framework-specific behavior):
116
- - Verify the pattern is current best practice for the framework version in use
117
- - Check if a built-in solution exists in newer versions before recommending a workaround
118
- - Verify API signatures against current docs (APIs change between versions)
119
-
120
- Takes seconds, prevents recommending outdated patterns. If WebSearch is unavailable, note it and proceed with in-distribution knowledge.
121
-
122
- Follow the output format specified in the checklist. Respect the suppressions — do NOT flag items listed in the "DO NOT flag" section.
123
-
124
- ---
125
-
126
- ## Step 4.5: Design Review (conditional)
127
-
128
- {{DESIGN_REVIEW_LITE}}
129
-
130
- Include any design findings alongside the findings from Step 4. They follow the same Fix-First flow in Step 5 — AUTO-FIX for mechanical CSS fixes, ASK for everything else.
131
-
132
- ---
133
-
134
- ## Step 4.75: Test Coverage Diagram
135
-
136
- {{TEST_COVERAGE_AUDIT_REVIEW}}
137
-
138
- This step subsumes the "Test Gaps" category from Pass 2 — do not duplicate findings between the checklist Test Gaps item and this coverage diagram. Include any coverage gaps alongside the findings from Step 4 and Step 4.5. They follow the same Fix-First flow — gaps are INFORMATIONAL findings.
139
-
140
- ---
141
-
142
- ## Step 5: Fix-First Review
143
-
144
- **Every finding gets action — not just critical ones.**
145
-
146
- Output a summary header: `Pre-Landing Review: N issues (X critical, Y informational)`
147
-
148
- ### Step 5a: Classify each finding
149
-
150
- For each finding, classify as AUTO-FIX or ASK per the Fix-First Heuristic in
151
- checklist.md. Critical findings lean toward ASK; informational findings lean
152
- toward AUTO-FIX.
153
-
154
- ### Step 5b: Auto-fix all AUTO-FIX items
155
-
156
- Apply each fix directly. For each one, output a one-line summary:
157
- `[AUTO-FIXED] [file:line] Problem → what you did`
158
-
159
- ### Step 5c: Batch-ask about ASK items
160
-
161
- If there are ASK items remaining, present them in ONE AskUserQuestion:
162
-
163
- - List each item with a number, the severity label, the problem, and a recommended fix
164
- - For each item, provide options: A) Fix as recommended, B) Skip
165
- - Include an overall RECOMMENDATION
166
-
167
- Example format:
168
-
169
- I auto-fixed 5 issues. 2 need your input:
170
-
171
- 1. [CRITICAL] app/models/post.rb:42 — Race condition in status transition
172
- Fix: Add `WHERE status = 'draft'` to the UPDATE
173
- → A) Fix B) Skip
174
-
175
- 2. [INFORMATIONAL] app/services/generator.rb:88 — LLM output not type-checked before DB write
176
- Fix: Add JSON schema validation
177
- → A) Fix B) Skip
178
-
179
- RECOMMENDATION: Fix both — #1 is a real race condition, #2 prevents silent data corruption.
180
-
181
- If 3 or fewer ASK items, you may use individual AskUserQuestion calls instead of batching.
182
-
183
- ### Step 5d: Apply user-approved fixes
184
-
185
- Apply fixes for items where the user chose "Fix." Output what was fixed.
186
-
187
- If no ASK items exist (everything was AUTO-FIX), skip the question entirely.
188
-
189
- ### Verification of claims
190
-
191
- Before producing the final review output:
192
- - If you claim "this pattern is safe" → cite the specific line proving safety
193
- - If you claim "this is handled elsewhere" → read and cite the handling code
194
- - If you claim "tests cover this" → name the test file and method
195
- - Never say "likely handled" or "probably tested" — verify or flag as unknown
196
-
197
- **Rationalization prevention:** "This looks fine" is not a finding. Either cite evidence it IS fine, or flag it as unverified.
198
-
199
- ### Greptile comment resolution
200
-
201
- After outputting your own findings, if Greptile comments were classified in Step 2.5:
202
-
203
- **Include a Greptile summary in your output header:** `+ N Greptile comments (X valid, Y fixed, Z FP)`
204
-
205
- Before replying to any comment, run the **Escalation Detection** algorithm from greptile-triage.md to determine whether to use Tier 1 (friendly) or Tier 2 (firm) reply templates.
206
-
207
- 1. **VALID & ACTIONABLE comments:** These are included in your findings — they follow the Fix-First flow (auto-fixed if mechanical, batched into ASK if not) (A: Fix it now, B: Acknowledge, C: False positive). If the user chooses A (fix), reply using the **Fix reply template** from greptile-triage.md (include inline diff + explanation). If the user chooses C (false positive), reply using the **False Positive reply template** (include evidence + suggested re-rank), save to both per-project and global greptile-history.
208
-
209
- 2. **FALSE POSITIVE comments:** Present each one via AskUserQuestion:
210
- - Show the Greptile comment: file:line (or [top-level]) + body summary + permalink URL
211
- - Explain concisely why it's a false positive
212
- - Options:
213
- - A) Reply to Greptile explaining why this is incorrect (recommended if clearly wrong)
214
- - B) Fix it anyway (if low-effort and harmless)
215
- - C) Ignore — don't reply, don't fix
216
-
217
- If the user chooses A, reply using the **False Positive reply template** from greptile-triage.md (include evidence + suggested re-rank), save to both per-project and global greptile-history.
218
-
219
- 3. **VALID BUT ALREADY FIXED comments:** Reply using the **Already Fixed reply template** from greptile-triage.md — no AskUserQuestion needed:
220
- - Include what was done and the fixing commit SHA
221
- - Save to both per-project and global greptile-history
222
-
223
- 4. **SUPPRESSED comments:** Skip silently — these are known false positives from previous triage.
224
-
225
- ---
226
-
227
- ## Step 5.5: TODOS cross-reference
228
-
229
- Read `TODOS.md` in the repository root (if it exists). Cross-reference the PR against open TODOs:
230
-
231
- - **Does this PR close any open TODOs?** If yes, note which items in your output: "This PR addresses TODO: <title>"
232
- - **Does this PR create work that should become a TODO?** If yes, flag it as an informational finding.
233
- - **Are there related TODOs that provide context for this review?** If yes, reference them when discussing related findings.
234
-
235
- If TODOS.md doesn't exist, skip this step silently.
236
-
237
- ---
238
-
239
- ## Step 5.6: Documentation staleness check
240
-
241
- Cross-reference the diff against documentation files. For each `.md` file in the repo root (README.md, ARCHITECTURE.md, CONTRIBUTING.md, CLAUDE.md, etc.):
242
-
243
- 1. Check if code changes in the diff affect features, components, or workflows described in that doc file.
244
- 2. If the doc file was NOT updated in this branch but the code it describes WAS changed, flag it as an INFORMATIONAL finding:
245
- "Documentation may be stale: [file] describes [feature/component] but code changed in this branch. Consider running `/document-release`."
246
-
247
- This is informational only — never critical. The fix action is `/document-release`.
248
-
249
- If no documentation files exist, skip this step silently.
250
-
251
- ---
252
-
253
- {{ADVERSARIAL_STEP}}
254
-
255
- ## Step 5.8: Persist Eng Review result
256
-
257
- After all review passes complete, persist the final `/review` outcome so `/ship` can
258
- recognize that Eng Review was run on this branch.
259
-
260
- Run:
261
-
262
- ```bash
263
- ~/.claude/skills/opengstack/bin/gstack-review-log '{"skill":"review","timestamp":"TIMESTAMP","status":"STATUS","issues_found":N,"critical":N,"informational":N,"commit":"COMMIT"}'
264
-
265
- Substitute:
266
- - `TIMESTAMP` = ISO 8601 datetime
267
- - `STATUS` = `"clean"` if there are no remaining unresolved findings after Fix-First handling and adversarial review, otherwise `"issues_found"`
268
- - `issues_found` = total remaining unresolved findings
269
- - `critical` = remaining unresolved critical findings
270
- - `informational` = remaining unresolved informational findings
271
- - `COMMIT` = output of `git rev-parse --short HEAD`
272
-
273
- If the review exits early before a real review completes (for example, no diff against the base branch), do **not** write this entry.
274
-
275
- ## Important Rules
276
-
277
- - **Read the FULL diff before commenting.** Do not flag issues already addressed in the diff.
278
- - **Fix-first, not read-only.** AUTO-FIX items are applied directly. ASK items are only applied after user approval. Never commit, push, or create PRs — that's /ship's job.
279
- - **Be terse.** One line problem, one line fix. No preamble.
280
- - **Only flag real problems.** Skip anything that's fine.
281
- - **Use Greptile reply templates from greptile-triage.md.** Every reply includes evidence. Never post vague replies.
@@ -1,62 +0,0 @@
1
- # TODOS.md Format Reference
2
-
3
- Shared reference for the canonical TODOS.md format. Referenced by `/ship` (Step 5.5) and `/plan-ceo-review` (TODOS.md updates section) to ensure consistent TODO item structure.
4
-
5
- ---
6
-
7
- ## File Structure
8
-
9
- ```markdown
10
- # TODOS
11
-
12
- ## <Skill/Component> ← e.g., ## Browse, ## Ship, ## Review, ## Infrastructure
13
- <items sorted P0 first, then P1, P2, P3, P4>
14
-
15
- ## Completed
16
- <finished items with completion annotation>
17
- ```
18
-
19
- **Sections:** Organize by skill or component (`## Browse`, `## Ship`, `## Review`, `## QA`, `## Retro`, `## Infrastructure`). Within each section, sort items by priority (P0 at top).
20
-
21
- ---
22
-
23
- ## TODO Item Format
24
-
25
- Each item is an H3 under its section:
26
-
27
- ```markdown
28
- ### <Title>
29
-
30
- **What:** One-line description of the work.
31
-
32
- **Why:** The concrete problem it solves or value it unlocks.
33
-
34
- **Context:** Enough detail that someone picking this up in 3 months understands the motivation, the current state, and where to start.
35
-
36
- **Effort:** S / M / L / XL
37
- **Priority:** P0 / P1 / P2 / P3 / P4
38
- **Depends on:** <prerequisites, or "None">
39
- ```
40
-
41
- **Required fields:** What, Why, Context, Effort, Priority
42
- **Optional fields:** Depends on, Blocked by
43
-
44
- ---
45
-
46
- ## Priority Definitions
47
-
48
- - **P0** — Blocking: must be done before next release
49
- - **P1** — Critical: should be done this cycle
50
- - **P2** — Important: do when P0/P1 are clear
51
- - **P3** — Nice-to-have: revisit after adoption/usage data
52
- - **P4** — Someday: good idea, no urgency
53
-
54
- ---
55
-
56
- ## Completed Item Format
57
-
58
- When an item is completed, move it to the `## Completed` section preserving its original content and appending:
59
-
60
- ```markdown
61
- **Completed:** vX.Y.Z (YYYY-MM-DD)
62
- ```
@@ -1,220 +0,0 @@
1
- # Pre-Landing Review Checklist
2
-
3
- ## Instructions
4
-
5
- Review the `git diff origin/main` output for the issues listed below. Be specific — cite `file:line` and suggest fixes. Skip anything that's fine. Only flag real problems.
6
-
7
- **Two-pass review:**
8
- - **Pass 1 (CRITICAL):** Run SQL & Data Safety and LLM Output Trust Boundary first. Highest severity.
9
- - **Pass 2 (INFORMATIONAL):** Run all remaining categories. Lower severity but still actioned.
10
-
11
- All findings get action via Fix-First Review: obvious mechanical fixes are applied automatically,
12
- genuinely ambiguous issues are batched into a single user question.
13
-
14
- **Output format:**
15
-
16
- ```
17
- Pre-Landing Review: N issues (X critical, Y informational)
18
-
19
- **AUTO-FIXED:**
20
- - [file:line] Problem → fix applied
21
-
22
- **NEEDS INPUT:**
23
- - [file:line] Problem description
24
- Recommended fix: suggested fix
25
- ```
26
-
27
- If no issues found: `Pre-Landing Review: No issues found.`
28
-
29
- Be terse. For each issue: one line describing the problem, one line with the fix. No preamble, no summaries, no "looks good overall."
30
-
31
- ---
32
-
33
- ## Review Categories
34
-
35
- ### Pass 1 — CRITICAL
36
-
37
- #### SQL & Data Safety
38
- - String interpolation in SQL (even if values are `.to_i`/`.to_f` — use parameterized queries (Rails: sanitize_sql_array/Arel; Node: prepared statements; Python: parameterized queries))
39
- - TOCTOU races: check-then-set patterns that should be atomic `WHERE` + `update_all`
40
- - Bypassing model validations for direct DB writes (Rails: update_column; Django: QuerySet.update(); Prisma: raw queries)
41
- - N+1 queries: Missing eager loading (Rails: .includes(); SQLAlchemy: joinedload(); Prisma: include) for associations used in loops/views
42
-
43
- #### Race Conditions & Concurrency
44
- - Read-check-write without uniqueness constraint or catch duplicate key error and retry (e.g., `where(hash:).first` then `save!` without handling concurrent insert)
45
- - find-or-create without unique DB index — concurrent calls can create duplicates
46
- - Status transitions that don't use atomic `WHERE old_status = ? UPDATE SET new_status` — concurrent updates can skip or double-apply transitions
47
- - Unsafe HTML rendering (Rails: .html_safe/raw(); React: dangerouslySetInnerHTML; Vue: v-html; Django: |safe/mark_safe) on user-controlled data (XSS)
48
-
49
- #### LLM Output Trust Boundary
50
- - LLM-generated values (emails, URLs, names) written to DB or passed to mailers without format validation. Add lightweight guards (`EMAIL_REGEXP`, `URI.parse`, `.strip`) before persisting.
51
- - Structured tool output (arrays, hashes) accepted without type/shape checks before database writes.
52
- - LLM-generated URLs fetched without allowlist — SSRF risk if URL points to internal network (Python: `urllib.parse.urlparse` → check hostname against blocklist before `requests.get`/`httpx.get`)
53
- - LLM output stored in knowledge bases or vector DBs without sanitization — stored prompt injection risk
54
-
55
- #### Shell Injection (Python-specific)
56
- - `subprocess.run()` / `subprocess.call()` / `subprocess.Popen()` with `shell=True` AND f-string/`.format()` interpolation in the command string — use argument arrays instead
57
- - `os.system()` with variable interpolation — replace with `subprocess.run()` using argument arrays
58
- - `eval()` / `exec()` on LLM-generated code without sandboxing
59
-
60
- #### Enum & Value Completeness
61
- When the diff introduces a new enum value, status string, tier name, or type constant:
62
- - **Trace it through every consumer.** Read (don't just grep — READ) each file that switches on, filters by, or displays that value. If any consumer doesn't handle the new value, flag it. Common miss: adding a value to the frontend dropdown but the backend model/compute method doesn't persist it.
63
- - **Check allowlists/filter arrays.** Search for arrays or `%w[]` lists containing sibling values (e.g., if adding "revise" to tiers, find every `%w[quick lfg mega]` and verify "revise" is included where needed).
64
- - **Check `case`/`if-elsif` chains.** If existing code branches on the enum, does the new value fall through to a wrong default?
65
- To do this: use Grep to find all references to the sibling values (e.g., grep for "lfg" or "mega" to find all tier consumers). Read each match. This step requires reading code OUTSIDE the diff.
66
-
67
- ### Pass 2 — INFORMATIONAL
68
-
69
- #### Async/Sync Mixing (Python-specific)
70
- - Synchronous `subprocess.run()`, `open()`, `requests.get()` inside `async def` endpoints — blocks the event loop. Use `asyncio.to_thread()`, `aiofiles`, or `httpx.AsyncClient` instead.
71
- - `time.sleep()` inside async functions — use `asyncio.sleep()`
72
- - Sync DB calls in async context without `run_in_executor()` wrapping
73
-
74
- #### Column/Field Name Safety
75
- - Verify column names in ORM queries (`.select()`, `.eq()`, `.gte()`, `.order()`) against actual DB schema — wrong column names silently return empty results or throw swallowed errors
76
- - Check `.get()` calls on query results use the column name that was actually selected
77
- - Cross-reference with schema documentation when available
78
-
79
- #### Conditional Side Effects
80
- - Code paths that branch on a condition but forget to apply a side effect on one branch. Example: item promoted to verified but URL only attached when a secondary condition is true — the other branch promotes without the URL, creating an inconsistent record.
81
- - Log messages that claim an action happened but the action was conditionally skipped. The log should reflect what actually occurred.
82
-
83
- #### Magic Numbers & String Coupling
84
- - Bare numeric literals used in multiple files — should be named constants documented together
85
- - Error message strings used as query filters elsewhere (grep for the string — is anything matching on it?)
86
-
87
- #### Dead Code & Consistency
88
- - Variables assigned but never read
89
- - Version mismatch between PR title and VERSION/CHANGELOG files
90
- - CHANGELOG entries that describe changes inaccurately (e.g., "changed from X to Y" when X never existed)
91
- - Comments/docstrings that describe old behavior after the code changed
92
-
93
- #### LLM Prompt Issues
94
- - 0-indexed lists in prompts (LLMs reliably return 1-indexed)
95
- - Prompt text listing available tools/capabilities that don't match what's actually wired up in the `tool_classes`/`tools` array
96
- - Word/token limits stated in multiple places that could drift
97
-
98
- #### Test Gaps
99
- - Negative-path tests that assert type/status but not the side effects (URL attached? field populated? callback fired?)
100
- - Assertions on string content without checking format (e.g., asserting title present but not URL format)
101
- - `.expects(:something).never` missing when a code path should explicitly NOT call an external service
102
- - Security enforcement features (blocking, rate limiting, auth) without integration tests verifying the enforcement path works end-to-end
103
-
104
- #### Completeness Gaps
105
- - Shortcut implementations where the complete version would cost <30 minutes CC time (e.g., partial enum handling, incomplete error paths, missing edge cases that are straightforward to add)
106
- - Options presented with only human-team effort estimates — should show both human and CC+gstack time
107
- - Test coverage gaps where adding the missing tests is a "lake" not an "ocean" (e.g., missing negative-path tests, missing edge case tests that mirror happy-path structure)
108
- - Features implemented at 80-90% when 100% is achievable with modest additional code
109
-
110
- #### Crypto & Entropy
111
- - Truncation of data instead of hashing (last N chars instead of SHA-256) — less entropy, easier collisions
112
- - `rand()` / `Random.rand` for security-sensitive values — use `SecureRandom` instead
113
- - Non-constant-time comparisons (`==`) on secrets or tokens — vulnerable to timing attacks
114
-
115
- #### Time Window Safety
116
- - Date-key lookups that assume "today" covers 24h — report at 8am PT only sees midnight→8am under today's key
117
- - Mismatched time windows between related features — one uses hourly buckets, another uses daily keys for the same data
118
-
119
- #### Type Coercion at Boundaries
120
- - Values crossing Ruby→JSON→JS boundaries where type could change (numeric vs string) — hash/digest inputs must normalize types
121
- - Hash/digest inputs that don't call `.to_s` or equivalent before serialization — `{ cores: 8 }` vs `{ cores: "8" }` produce different hashes
122
-
123
- #### View/Frontend
124
- - Inline `<style>` blocks in partials (re-parsed every render)
125
- - O(n*m) lookups in views (`Array#find` in a loop instead of `index_by` hash)
126
- - Ruby-side `.select{}` filtering on DB results that could be a `WHERE` clause (unless intentionally avoiding leading-wildcard `LIKE`)
127
-
128
- #### Performance & Bundle Impact
129
- - New `dependencies` entries in package.json that are known-heavy: moment.js (→ date-fns, 330KB→22KB), lodash full (→ lodash-es or per-function imports), jquery, core-js full polyfill
130
- - Significant lockfile growth (many new transitive dependencies from a single addition)
131
- - Images added without `loading="lazy"` or explicit width/height attributes (causes layout shift / CLS)
132
- - Large static assets committed to repo (>500KB per file)
133
- - Synchronous `<script>` tags without async/defer
134
- - CSS `@import` in stylesheets (blocks parallel loading — use bundler imports instead)
135
- - `useEffect` with fetch that depends on another fetch result (request waterfall — combine or parallelize)
136
- - Named → default import switches on tree-shakeable libraries (breaks tree-shaking)
137
- - New `require()` calls in ESM codebases
138
-
139
- **DO NOT flag:**
140
- - devDependencies additions (don't affect production bundle)
141
- - Dynamic `import()` calls (code splitting — these are good)
142
- - Small utility additions (<5KB gzipped)
143
- - Server-side-only dependencies
144
-
145
- #### Distribution & CI/CD Pipeline
146
- - CI/CD workflow changes (`.github/workflows/`): verify build tool versions match project requirements, artifact names/paths are correct, secrets use `${{ secrets.X }}` not hardcoded values
147
- - New artifact types (CLI binary, library, package): verify a publish/release workflow exists and targets correct platforms
148
- - Cross-platform builds: verify CI matrix covers all target OS/arch combinations, or documents which are untested
149
- - Version tag format consistency: `v1.2.3` vs `1.2.3` — must match across VERSION file, git tags, and publish scripts
150
- - Publish step idempotency: re-running the publish workflow should not fail (e.g., `gh release delete` before `gh release create`)
151
-
152
- **DO NOT flag:**
153
- - Web services with existing auto-deploy pipelines (Docker build + K8s deploy)
154
- - Internal tools not distributed outside the team
155
- - Test-only CI changes (adding test steps, not publish steps)
156
-
157
- ---
158
-
159
- ## Severity Classification
160
-
161
- ```
162
- CRITICAL (highest severity): INFORMATIONAL (lower severity):
163
- ├─ SQL & Data Safety ├─ Conditional Side Effects
164
- ├─ Race Conditions & Concurrency ├─ Magic Numbers & String Coupling
165
- ├─ LLM Output Trust Boundary ├─ Dead Code & Consistency
166
- └─ Enum & Value Completeness ├─ LLM Prompt Issues
167
- ├─ Test Gaps
168
- ├─ Completeness Gaps
169
- ├─ Crypto & Entropy
170
- ├─ Time Window Safety
171
- ├─ Type Coercion at Boundaries
172
- ├─ View/Frontend
173
- ├─ Performance & Bundle Impact
174
- └─ Distribution & CI/CD Pipeline
175
-
176
- All findings are actioned via Fix-First Review. Severity determines
177
- presentation order and classification of AUTO-FIX vs ASK — critical
178
- findings lean toward ASK (they're riskier), informational findings
179
- lean toward AUTO-FIX (they're more mechanical).
180
- ```
181
-
182
- ---
183
-
184
- ## Fix-First Heuristic
185
-
186
- This heuristic is referenced by both `/review` and `/ship`. It determines whether
187
- the agent auto-fixes a finding or asks the user.
188
-
189
- ```
190
- AUTO-FIX (agent fixes without asking): ASK (needs human judgment):
191
- ├─ Dead code / unused variables ├─ Security (auth, XSS, injection)
192
- ├─ N+1 queries (missing eager loading) ├─ Race conditions
193
- ├─ Stale comments contradicting code ├─ Design decisions
194
- ├─ Magic numbers → named constants ├─ Large fixes (>20 lines)
195
- ├─ Missing LLM output validation ├─ Enum completeness
196
- ├─ Version/path mismatches ├─ Removing functionality
197
- ├─ Variables assigned but never read └─ Anything changing user-visible
198
- └─ Inline styles, O(n*m) view lookups behavior
199
- ```
200
-
201
- **Rule of thumb:** If the fix is mechanical and a senior engineer would apply it
202
- without discussion, it's AUTO-FIX. If reasonable engineers could disagree about
203
- the fix, it's ASK.
204
-
205
- **Critical findings default toward ASK** (they're inherently riskier).
206
- **Informational findings default toward AUTO-FIX** (they're more mechanical).
207
-
208
- ---
209
-
210
- ## Suppressions — DO NOT flag these
211
-
212
- - "X is redundant with Y" when the redundancy is harmless and aids readability (e.g., `present?` redundant with `length > 20`)
213
- - "Add a comment explaining why this threshold/constant was chosen" — thresholds change during tuning, comments rot
214
- - "This assertion could be tighter" when the assertion already covers the behavior
215
- - Suggesting consistency-only changes (wrapping a value in a conditional to match how another constant is guarded)
216
- - "Regex doesn't handle edge case X" when the input is constrained and X never occurs in practice
217
- - "Test exercises multiple guards simultaneously" — that's fine, tests don't need to isolate every guard
218
- - Eval threshold changes (max_actionable, min scores) — these are tuned empirically and change constantly
219
- - Harmless no-ops (e.g., `.reject` on an element that's never in the array)
220
- - ANYTHING already addressed in the diff you're reviewing — read the FULL diff before commenting