slashdev 0.1.0 → 1.0.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.
- package/.gitmodules +3 -0
- package/CLAUDE.md +87 -0
- package/README.md +158 -21
- package/bin/check-setup.js +27 -0
- package/claude-skills/agentswarm/SKILL.md +479 -0
- package/claude-skills/bug-diagnosis/SKILL.md +34 -0
- package/claude-skills/code-review/SKILL.md +26 -0
- package/claude-skills/frontend-design/LICENSE.txt +177 -0
- package/claude-skills/frontend-design/SKILL.md +42 -0
- package/claude-skills/pr-description/SKILL.md +35 -0
- package/claude-skills/scope-estimate/SKILL.md +37 -0
- package/hooks/post-response.sh +242 -0
- package/package.json +11 -3
- package/skills/front-end-design/prompts/system.md +37 -0
- package/skills/front-end-testing/prompts/system.md +66 -0
- package/skills/github-manager/prompts/system.md +79 -0
- package/skills/product-expert/prompts/system.md +52 -0
- package/skills/server-admin/prompts/system.md +39 -0
- package/src/auth/index.js +115 -0
- package/src/cli.js +188 -18
- package/src/commands/setup-internals.js +137 -0
- package/src/commands/setup.js +104 -0
- package/src/commands/update.js +60 -0
- package/src/connections/index.js +449 -0
- package/src/connections/providers/github.js +71 -0
- package/src/connections/providers/servers.js +175 -0
- package/src/connections/registry.js +21 -0
- package/src/core/claude.js +78 -0
- package/src/core/codebase.js +119 -0
- package/src/core/config.js +110 -0
- package/src/index.js +8 -1
- package/src/info.js +54 -21
- package/src/skills/index.js +252 -0
- package/src/utils/ssh-keys.js +67 -0
- package/vendor/gstack/.env.example +5 -0
- package/vendor/gstack/autoplan/SKILL.md +1116 -0
- package/vendor/gstack/browse/SKILL.md +538 -0
- package/vendor/gstack/canary/SKILL.md +587 -0
- package/vendor/gstack/careful/SKILL.md +59 -0
- package/vendor/gstack/codex/SKILL.md +862 -0
- package/vendor/gstack/connect-chrome/SKILL.md +549 -0
- package/vendor/gstack/cso/ACKNOWLEDGEMENTS.md +14 -0
- package/vendor/gstack/cso/SKILL.md +929 -0
- package/vendor/gstack/design-consultation/SKILL.md +962 -0
- package/vendor/gstack/design-review/SKILL.md +1314 -0
- package/vendor/gstack/design-shotgun/SKILL.md +730 -0
- package/vendor/gstack/document-release/SKILL.md +718 -0
- package/vendor/gstack/freeze/SKILL.md +82 -0
- package/vendor/gstack/gstack-upgrade/SKILL.md +232 -0
- package/vendor/gstack/guard/SKILL.md +82 -0
- package/vendor/gstack/investigate/SKILL.md +504 -0
- package/vendor/gstack/land-and-deploy/SKILL.md +1367 -0
- package/vendor/gstack/office-hours/SKILL.md +1317 -0
- package/vendor/gstack/plan-ceo-review/SKILL.md +1537 -0
- package/vendor/gstack/plan-design-review/SKILL.md +1227 -0
- package/vendor/gstack/plan-eng-review/SKILL.md +1120 -0
- package/vendor/gstack/qa/SKILL.md +1136 -0
- package/vendor/gstack/qa/references/issue-taxonomy.md +85 -0
- package/vendor/gstack/qa/templates/qa-report-template.md +126 -0
- package/vendor/gstack/qa-only/SKILL.md +726 -0
- package/vendor/gstack/retro/SKILL.md +1197 -0
- package/vendor/gstack/review/SKILL.md +1138 -0
- package/vendor/gstack/review/TODOS-format.md +62 -0
- package/vendor/gstack/review/checklist.md +220 -0
- package/vendor/gstack/review/design-checklist.md +132 -0
- package/vendor/gstack/review/greptile-triage.md +220 -0
- package/vendor/gstack/setup-browser-cookies/SKILL.md +348 -0
- package/vendor/gstack/setup-deploy/SKILL.md +528 -0
- package/vendor/gstack/ship/SKILL.md +1931 -0
- package/vendor/gstack/unfreeze/SKILL.md +40 -0
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
```
|
|
@@ -0,0 +1,220 @@
|
|
|
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
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Design Review Checklist (Lite)
|
|
2
|
+
|
|
3
|
+
> **Subset of DESIGN_METHODOLOGY** — when adding items here, also update `generateDesignMethodology()` in `scripts/gen-skill-docs.ts`, and vice versa.
|
|
4
|
+
|
|
5
|
+
## Instructions
|
|
6
|
+
|
|
7
|
+
This checklist applies to **source code in the diff** — not rendered output. Read each changed frontend file (full file, not just diff hunks) and flag anti-patterns.
|
|
8
|
+
|
|
9
|
+
**Trigger:** Only run this checklist if the diff touches frontend files. Use `gstack-diff-scope` to detect:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
source <(~/.claude/skills/gstack/bin/gstack-diff-scope <base> 2>/dev/null)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
If `SCOPE_FRONTEND=false`, skip the entire design review silently.
|
|
16
|
+
|
|
17
|
+
**DESIGN.md calibration:** If `DESIGN.md` or `design-system.md` exists in the repo root, read it first. All findings are calibrated against the project's stated design system. Patterns explicitly blessed in DESIGN.md are NOT flagged. If no DESIGN.md exists, use universal design principles.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Confidence Tiers
|
|
22
|
+
|
|
23
|
+
Each item is tagged with a detection confidence level:
|
|
24
|
+
|
|
25
|
+
- **[HIGH]** — Reliably detectable via grep/pattern match. Definitive findings.
|
|
26
|
+
- **[MEDIUM]** — Detectable via pattern aggregation or heuristic. Flag as findings but expect some noise.
|
|
27
|
+
- **[LOW]** — Requires understanding visual intent. Present as: "Possible issue — verify visually or run /design-review."
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Classification
|
|
32
|
+
|
|
33
|
+
**AUTO-FIX** (mechanical CSS fixes only — HIGH confidence, no design judgment needed):
|
|
34
|
+
- `outline: none` without replacement → add `outline: revert` or `&:focus-visible { outline: 2px solid currentColor; }`
|
|
35
|
+
- `!important` in new CSS → remove and fix specificity
|
|
36
|
+
- `font-size` < 16px on body text → bump to 16px
|
|
37
|
+
|
|
38
|
+
**ASK** (everything else — requires design judgment):
|
|
39
|
+
- All AI slop findings, typography structure, spacing choices, interaction state gaps, DESIGN.md violations
|
|
40
|
+
|
|
41
|
+
**LOW confidence items** → present as "Possible: [description]. Verify visually or run /design-review." Never AUTO-FIX.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Output Format
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Design Review: N issues (X auto-fixable, Y need input, Z possible)
|
|
49
|
+
|
|
50
|
+
**AUTO-FIXED:**
|
|
51
|
+
- [file:line] Problem → fix applied
|
|
52
|
+
|
|
53
|
+
**NEEDS INPUT:**
|
|
54
|
+
- [file:line] Problem description
|
|
55
|
+
Recommended fix: suggested fix
|
|
56
|
+
|
|
57
|
+
**POSSIBLE (verify visually):**
|
|
58
|
+
- [file:line] Possible issue — verify with /design-review
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
If no issues found: `Design Review: No issues found.`
|
|
62
|
+
|
|
63
|
+
If no frontend files changed: skip silently, no output.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Categories
|
|
68
|
+
|
|
69
|
+
### 1. AI Slop Detection (6 items) — highest priority
|
|
70
|
+
|
|
71
|
+
These are the telltale signs of AI-generated UI that no designer at a respected studio would ship.
|
|
72
|
+
|
|
73
|
+
- **[MEDIUM]** Purple/violet/indigo gradient backgrounds or blue-to-purple color schemes. Look for `linear-gradient` with values in the `#6366f1`–`#8b5cf6` range, or CSS custom properties resolving to purple/violet.
|
|
74
|
+
|
|
75
|
+
- **[LOW]** The 3-column feature grid: icon-in-colored-circle + bold title + 2-line description, repeated 3x symmetrically. Look for a grid/flex container with exactly 3 children that each contain a circular element + heading + paragraph.
|
|
76
|
+
|
|
77
|
+
- **[LOW]** Icons in colored circles as section decoration. Look for elements with `border-radius: 50%` + a background color used as decorative containers for icons.
|
|
78
|
+
|
|
79
|
+
- **[HIGH]** Centered everything: `text-align: center` on all headings, descriptions, and cards. Grep for `text-align: center` density — if >60% of text containers use center alignment, flag it.
|
|
80
|
+
|
|
81
|
+
- **[MEDIUM]** Uniform bubbly border-radius on every element: same large radius (16px+) applied to cards, buttons, inputs, containers uniformly. Aggregate `border-radius` values — if >80% use the same value ≥16px, flag it.
|
|
82
|
+
|
|
83
|
+
- **[MEDIUM]** Generic hero copy: "Welcome to [X]", "Unlock the power of...", "Your all-in-one solution for...", "Revolutionize your...", "Streamline your workflow". Grep HTML/JSX content for these patterns.
|
|
84
|
+
|
|
85
|
+
### 2. Typography (4 items)
|
|
86
|
+
|
|
87
|
+
- **[HIGH]** Body text `font-size` < 16px. Grep for `font-size` declarations on `body`, `p`, `.text`, or base styles. Values below 16px (or 1rem when base is 16px) are flagged.
|
|
88
|
+
|
|
89
|
+
- **[HIGH]** More than 3 font families introduced in the diff. Count distinct `font-family` declarations. Flag if >3 unique families appear across changed files.
|
|
90
|
+
|
|
91
|
+
- **[HIGH]** Heading hierarchy skipping levels: `h1` followed by `h3` without an `h2` in the same file/component. Check HTML/JSX for heading tags.
|
|
92
|
+
|
|
93
|
+
- **[HIGH]** Blacklisted fonts: Papyrus, Comic Sans, Lobster, Impact, Jokerman. Grep `font-family` for these names.
|
|
94
|
+
|
|
95
|
+
### 3. Spacing & Layout (4 items)
|
|
96
|
+
|
|
97
|
+
- **[MEDIUM]** Arbitrary spacing values not on a 4px or 8px scale, when DESIGN.md specifies a spacing scale. Check `margin`, `padding`, `gap` values against the stated scale. Only flag when DESIGN.md defines a scale.
|
|
98
|
+
|
|
99
|
+
- **[MEDIUM]** Fixed widths without responsive handling: `width: NNNpx` on containers without `max-width` or `@media` breakpoints. Risk of horizontal scroll on mobile.
|
|
100
|
+
|
|
101
|
+
- **[MEDIUM]** Missing `max-width` on text containers: body text or paragraph containers with no `max-width` set, allowing lines >75 characters. Check for `max-width` on text wrappers.
|
|
102
|
+
|
|
103
|
+
- **[HIGH]** `!important` in new CSS rules. Grep for `!important` in added lines. Almost always a specificity escape hatch that should be fixed properly.
|
|
104
|
+
|
|
105
|
+
### 4. Interaction States (3 items)
|
|
106
|
+
|
|
107
|
+
- **[MEDIUM]** Interactive elements (buttons, links, inputs) missing hover/focus states. Check if `:hover` and `:focus` or `:focus-visible` pseudo-classes exist for new interactive element styles.
|
|
108
|
+
|
|
109
|
+
- **[HIGH]** `outline: none` or `outline: 0` without a replacement focus indicator. Grep for `outline:\s*none` or `outline:\s*0`. This removes keyboard accessibility.
|
|
110
|
+
|
|
111
|
+
- **[LOW]** Touch targets < 44px on interactive elements. Check `min-height`/`min-width`/`padding` on buttons and links. Requires computing effective size from multiple properties — low confidence from code alone.
|
|
112
|
+
|
|
113
|
+
### 5. DESIGN.md Violations (3 items, conditional)
|
|
114
|
+
|
|
115
|
+
Only apply if `DESIGN.md` or `design-system.md` exists:
|
|
116
|
+
|
|
117
|
+
- **[MEDIUM]** Colors not in the stated palette. Compare color values in changed CSS against the palette defined in DESIGN.md.
|
|
118
|
+
|
|
119
|
+
- **[MEDIUM]** Fonts not in the stated typography section. Compare `font-family` values against DESIGN.md's font list.
|
|
120
|
+
|
|
121
|
+
- **[MEDIUM]** Spacing values outside the stated scale. Compare `margin`/`padding`/`gap` values against DESIGN.md's spacing scale.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Suppressions
|
|
126
|
+
|
|
127
|
+
Do NOT flag:
|
|
128
|
+
- Patterns explicitly documented in DESIGN.md as intentional choices
|
|
129
|
+
- Third-party/vendor CSS files (node_modules, vendor directories)
|
|
130
|
+
- CSS resets or normalize stylesheets
|
|
131
|
+
- Test fixture files
|
|
132
|
+
- Generated/minified CSS
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Greptile Comment Triage
|
|
2
|
+
|
|
3
|
+
Shared reference for fetching, filtering, and classifying Greptile review comments on GitHub PRs. Both `/review` (Step 2.5) and `/ship` (Step 3.75) reference this document.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Fetch
|
|
8
|
+
|
|
9
|
+
Run these commands to detect the PR and fetch comments. Both API calls run in parallel.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner' 2>/dev/null)
|
|
13
|
+
PR_NUMBER=$(gh pr view --json number --jq '.number' 2>/dev/null)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**If either fails or is empty:** Skip Greptile triage silently. This integration is additive — the workflow works without it.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Fetch line-level review comments AND top-level PR comments in parallel
|
|
20
|
+
gh api repos/$REPO/pulls/$PR_NUMBER/comments \
|
|
21
|
+
--jq '.[] | select(.user.login == "greptile-apps[bot]") | select(.position != null) | {id: .id, path: .path, line: .line, body: .body, html_url: .html_url, source: "line-level"}' > /tmp/greptile_line.json &
|
|
22
|
+
gh api repos/$REPO/issues/$PR_NUMBER/comments \
|
|
23
|
+
--jq '.[] | select(.user.login == "greptile-apps[bot]") | {id: .id, body: .body, html_url: .html_url, source: "top-level"}' > /tmp/greptile_top.json &
|
|
24
|
+
wait
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**If API errors or zero Greptile comments across both endpoints:** Skip silently.
|
|
28
|
+
|
|
29
|
+
The `position != null` filter on line-level comments automatically skips outdated comments from force-pushed code.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Suppressions Check
|
|
34
|
+
|
|
35
|
+
Derive the project-specific history path:
|
|
36
|
+
```bash
|
|
37
|
+
REMOTE_SLUG=$(browse/bin/remote-slug 2>/dev/null || ~/.claude/skills/gstack/browse/bin/remote-slug 2>/dev/null || basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)")
|
|
38
|
+
PROJECT_HISTORY="$HOME/.gstack/projects/$REMOTE_SLUG/greptile-history.md"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Read `$PROJECT_HISTORY` if it exists (per-project suppressions). Each line records a previous triage outcome:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
<date> | <repo> | <type:fp|fix|already-fixed> | <file-pattern> | <category>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Categories** (fixed set): `race-condition`, `null-check`, `error-handling`, `style`, `type-safety`, `security`, `performance`, `correctness`, `other`
|
|
48
|
+
|
|
49
|
+
Match each fetched comment against entries where:
|
|
50
|
+
- `type == fp` (only suppress known false positives, not previously fixed real issues)
|
|
51
|
+
- `repo` matches the current repo
|
|
52
|
+
- `file-pattern` matches the comment's file path
|
|
53
|
+
- `category` matches the issue type in the comment
|
|
54
|
+
|
|
55
|
+
Skip matched comments as **SUPPRESSED**.
|
|
56
|
+
|
|
57
|
+
If the history file doesn't exist or has unparseable lines, skip those lines and continue — never fail on a malformed history file.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Classify
|
|
62
|
+
|
|
63
|
+
For each non-suppressed comment:
|
|
64
|
+
|
|
65
|
+
1. **Line-level comments:** Read the file at the indicated `path:line` and surrounding context (±10 lines)
|
|
66
|
+
2. **Top-level comments:** Read the full comment body
|
|
67
|
+
3. Cross-reference the comment against the full diff (`git diff origin/main`) and the review checklist
|
|
68
|
+
4. Classify:
|
|
69
|
+
- **VALID & ACTIONABLE** — a real bug, race condition, security issue, or correctness problem that exists in the current code
|
|
70
|
+
- **VALID BUT ALREADY FIXED** — a real issue that was addressed in a subsequent commit on the branch. Identify the fixing commit SHA.
|
|
71
|
+
- **FALSE POSITIVE** — the comment misunderstands the code, flags something handled elsewhere, or is stylistic noise
|
|
72
|
+
- **SUPPRESSED** — already filtered in the suppressions check above
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Reply APIs
|
|
77
|
+
|
|
78
|
+
When replying to Greptile comments, use the correct endpoint based on comment source:
|
|
79
|
+
|
|
80
|
+
**Line-level comments** (from `pulls/$PR/comments`):
|
|
81
|
+
```bash
|
|
82
|
+
gh api repos/$REPO/pulls/$PR_NUMBER/comments/$COMMENT_ID/replies \
|
|
83
|
+
-f body="<reply text>"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Top-level comments** (from `issues/$PR/comments`):
|
|
87
|
+
```bash
|
|
88
|
+
gh api repos/$REPO/issues/$PR_NUMBER/comments \
|
|
89
|
+
-f body="<reply text>"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**If a reply POST fails** (e.g., PR was closed, no write permission): warn and continue. Do not stop the workflow for a failed reply.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Reply Templates
|
|
97
|
+
|
|
98
|
+
Use these templates for every Greptile reply. Always include concrete evidence — never post vague replies.
|
|
99
|
+
|
|
100
|
+
### Tier 1 (First response) — Friendly, evidence-included
|
|
101
|
+
|
|
102
|
+
**For FIXES (user chose to fix the issue):**
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
**Fixed** in `<commit-sha>`.
|
|
106
|
+
|
|
107
|
+
\`\`\`diff
|
|
108
|
+
- <old problematic line(s)>
|
|
109
|
+
+ <new fixed line(s)>
|
|
110
|
+
\`\`\`
|
|
111
|
+
|
|
112
|
+
**Why:** <1-sentence explanation of what was wrong and how the fix addresses it>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**For ALREADY FIXED (issue addressed in a prior commit on the branch):**
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
**Already fixed** in `<commit-sha>`.
|
|
119
|
+
|
|
120
|
+
**What was done:** <1-2 sentences describing how the existing commit addresses this issue>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**For FALSE POSITIVES (the comment is incorrect):**
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
**Not a bug.** <1 sentence directly stating why this is incorrect>
|
|
127
|
+
|
|
128
|
+
**Evidence:**
|
|
129
|
+
- <specific code reference showing the pattern is safe/correct>
|
|
130
|
+
- <e.g., "The nil check is handled by `ActiveRecord::FinderMethods#find` which raises RecordNotFound, not nil">
|
|
131
|
+
|
|
132
|
+
**Suggested re-rank:** This appears to be a `<style|noise|misread>` issue, not a `<what Greptile called it>`. Consider lowering severity.
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Tier 2 (Greptile re-flags after prior reply) — Firm, overwhelming evidence
|
|
136
|
+
|
|
137
|
+
Use Tier 2 when escalation detection (below) identifies a prior GStack reply on the same thread. Include maximum evidence to close the discussion.
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
**This has been reviewed and confirmed as [intentional/already-fixed/not-a-bug].**
|
|
141
|
+
|
|
142
|
+
\`\`\`diff
|
|
143
|
+
<full relevant diff showing the change or safe pattern>
|
|
144
|
+
\`\`\`
|
|
145
|
+
|
|
146
|
+
**Evidence chain:**
|
|
147
|
+
1. <file:line permalink showing the safe pattern or fix>
|
|
148
|
+
2. <commit SHA where it was addressed, if applicable>
|
|
149
|
+
3. <architecture rationale or design decision, if applicable>
|
|
150
|
+
|
|
151
|
+
**Suggested re-rank:** Please recalibrate — this is a `<actual category>` issue, not `<claimed category>`. [Link to specific file change permalink if helpful]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Escalation Detection
|
|
157
|
+
|
|
158
|
+
Before composing a reply, check if a prior GStack reply already exists on this comment thread:
|
|
159
|
+
|
|
160
|
+
1. **For line-level comments:** Fetch replies via `gh api repos/$REPO/pulls/$PR_NUMBER/comments/$COMMENT_ID/replies`. Check if any reply body contains GStack markers: `**Fixed**`, `**Not a bug.**`, `**Already fixed**`.
|
|
161
|
+
|
|
162
|
+
2. **For top-level comments:** Scan the fetched issue comments for replies posted after the Greptile comment that contain GStack markers.
|
|
163
|
+
|
|
164
|
+
3. **If a prior GStack reply exists AND Greptile posted again on the same file+category:** Use Tier 2 (firm) templates.
|
|
165
|
+
|
|
166
|
+
4. **If no prior GStack reply exists:** Use Tier 1 (friendly) templates.
|
|
167
|
+
|
|
168
|
+
If escalation detection fails (API error, ambiguous thread): default to Tier 1. Never escalate on ambiguity.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Severity Assessment & Re-ranking
|
|
173
|
+
|
|
174
|
+
When classifying comments, also assess whether Greptile's implied severity matches reality:
|
|
175
|
+
|
|
176
|
+
- If Greptile flags something as a **security/correctness/race-condition** issue but it's actually a **style/performance** nit: include `**Suggested re-rank:**` in the reply requesting the category be corrected.
|
|
177
|
+
- If Greptile flags a low-severity style issue as if it were critical: push back in the reply.
|
|
178
|
+
- Always be specific about why the re-ranking is warranted — cite code and line numbers, not opinions.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## History File Writes
|
|
183
|
+
|
|
184
|
+
Before writing, ensure both directories exist:
|
|
185
|
+
```bash
|
|
186
|
+
REMOTE_SLUG=$(browse/bin/remote-slug 2>/dev/null || ~/.claude/skills/gstack/browse/bin/remote-slug 2>/dev/null || basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)")
|
|
187
|
+
mkdir -p "$HOME/.gstack/projects/$REMOTE_SLUG"
|
|
188
|
+
mkdir -p ~/.gstack
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Append one line per triage outcome to **both** files (per-project for suppressions, global for retro):
|
|
192
|
+
- `~/.gstack/projects/$REMOTE_SLUG/greptile-history.md` (per-project)
|
|
193
|
+
- `~/.gstack/greptile-history.md` (global aggregate)
|
|
194
|
+
|
|
195
|
+
Format:
|
|
196
|
+
```
|
|
197
|
+
<YYYY-MM-DD> | <owner/repo> | <type> | <file-pattern> | <category>
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Example entries:
|
|
201
|
+
```
|
|
202
|
+
2026-03-13 | garrytan/myapp | fp | app/services/auth_service.rb | race-condition
|
|
203
|
+
2026-03-13 | garrytan/myapp | fix | app/models/user.rb | null-check
|
|
204
|
+
2026-03-13 | garrytan/myapp | already-fixed | lib/payments.rb | error-handling
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Output Format
|
|
210
|
+
|
|
211
|
+
Include a Greptile summary in the output header:
|
|
212
|
+
```
|
|
213
|
+
+ N Greptile comments (X valid, Y fixed, Z FP)
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
For each classified comment, show:
|
|
217
|
+
- Classification tag: `[VALID]`, `[FIXED]`, `[FALSE POSITIVE]`, `[SUPPRESSED]`
|
|
218
|
+
- File:line reference (for line-level) or `[top-level]` (for top-level)
|
|
219
|
+
- One-line body summary
|
|
220
|
+
- Permalink URL (the `html_url` field)
|