@olegkoval/agent-skills 1.45.0 → 1.45.1
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/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-conventions.md +20 -20
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-implementation.md +12 -12
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-quality.md +7 -7
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-simplification.md +9 -9
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-test-quality.md +18 -18
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/phase4-comparison.md +0 -2
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/profile.md +41 -41
- package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/fixtures/house-rules.md +5 -5
- package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/fixtures/revmux-report.json +1 -1
- package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/revmux-engine.sh +1 -0
- package/package.json +1 -1
- package/plugins/olko-apple-kit/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-creative/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-garmin-kit/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-git-tools/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-github-pr/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-conventions.md +20 -20
- package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-implementation.md +12 -12
- package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-quality.md +7 -7
- package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-simplification.md +9 -9
- package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-test-quality.md +18 -18
- package/plugins/olko-github-pr/skills/lekker-review/references/revmux/phase4-comparison.md +0 -2
- package/plugins/olko-github-pr/skills/lekker-review/references/revmux/profile.md +41 -41
- package/plugins/olko-github-pr/skills/lekker-review/scripts/fixtures/house-rules.md +5 -5
- package/plugins/olko-github-pr/skills/lekker-review/scripts/fixtures/revmux-report.json +1 -1
- package/plugins/olko-github-pr/skills/lekker-review/scripts/revmux-engine.sh +1 -0
- package/plugins/olko-obsidian/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-product/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-reflection/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-release/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-skill-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/olko-web-ops/.claude-plugin/plugin.json +1 -1
|
@@ -12,29 +12,29 @@ and lekker-deep review profiles. It concatenates the two files lekker-review its
|
|
|
12
12
|
|
|
13
13
|
These rules are non-negotiable. Violations are always **Critical** findings regardless of depth or other filters. Apply them when developing a feature or bugfix, not only during review.
|
|
14
14
|
|
|
15
|
-
### TS-1
|
|
15
|
+
### TS-1 - Type safety (TypeScript only)
|
|
16
16
|
|
|
17
|
-
- No type casting (`as X`, `<X>expr`)
|
|
18
|
-
- No `any`
|
|
17
|
+
- No type casting (`as X`, `<X>expr`) - ask them if they are Harry Potter for casting spells.
|
|
18
|
+
- No `any` - except in test files where types are genuinely hard to express; even there, blatantly omitted types (e.g. `any[]` on a known shaped list) must be flagged.
|
|
19
19
|
- Every finding: quote the cast/`any`, explain the correct type, show the fix.
|
|
20
20
|
|
|
21
|
-
### TS-2
|
|
21
|
+
### TS-2 - No JavaScript files
|
|
22
22
|
|
|
23
23
|
- No `.js` files may be added to any Teifi integrations repo.
|
|
24
24
|
- Exception: Liquid themes (Online Store 2.0 Shopify themes) may contain `.js`.
|
|
25
25
|
- If the PR adds a `.js` file to a non-theme repo, flag it as Critical: must be converted to `.ts`.
|
|
26
26
|
|
|
27
|
-
### GQL-1
|
|
27
|
+
### GQL-1 - GraphQL NodesConnection pagination
|
|
28
28
|
|
|
29
29
|
- Every query that uses a nodes connection (`nodes { ... }`) **must** include `pageInfo { hasNextPage endCursor }` alongside the nodes.
|
|
30
|
-
- All remaining pages **must** be fetched
|
|
30
|
+
- All remaining pages **must** be fetched - a single-page fetch with no loop/recursion is a bug.
|
|
31
31
|
- The page size **must** be `250` (Shopify max). If any other value is used, a code comment explaining why is required; if no comment exists, flag it.
|
|
32
32
|
|
|
33
|
-
### PR-1
|
|
33
|
+
### PR-1 - PR title must be prefixed with Linear ticket(s)
|
|
34
34
|
|
|
35
35
|
- PR title must start with `[GIC-123]` (or the relevant project prefix) in square brackets.
|
|
36
36
|
- Go through the commit history: if merged PRs or commits reference Linear tickets in square brackets (`[GIC-123]`), all of them must appear comma-separated in the current PR title (e.g. `[GIC-123,GIC-124]`).
|
|
37
|
-
- This is a **blocking** finding: display a prominent `⛔ CANNOT MERGE` warning and recommend the correct title prefix. Confidence score is not affected
|
|
37
|
+
- This is a **blocking** finding: display a prominent `⛔ CANNOT MERGE` warning and recommend the correct title prefix. Confidence score is not affected - this is a process rule, not a code quality signal.
|
|
38
38
|
|
|
39
39
|
### 1g. Repo placement check (Teifi multi-repo projects only)
|
|
40
40
|
|
|
@@ -49,7 +49,7 @@ belongs in *this* repo and not a sibling repo.
|
|
|
49
49
|
| `*-integrations` (e.g. `evi-integrations`; see the GIC exception below) | Backend ERP sync: cron jobs, orchestrator, BC/Sage/Jitterbit/ROI API clients |
|
|
50
50
|
| `teifi-digital` / shared libs | Cross-project utilities, shared types |
|
|
51
51
|
|
|
52
|
-
**Note:** `gic-integrations` has an `extensions/` folder containing legacy/reference extensions (e.g. `link-account-customer`), but **new customer account extensions for GIC should target `gic-live`** per project specs. Always check the Linear/Notion ticket for explicit repo path
|
|
52
|
+
**Note:** `gic-integrations` has an `extensions/` folder containing legacy/reference extensions (e.g. `link-account-customer`), but **new customer account extensions for GIC should target `gic-live`** per project specs. Always check the Linear/Notion ticket for explicit repo path - don't infer from existing repo contents alone.
|
|
53
53
|
|
|
54
54
|
**Action:** If the diff adds a new Shopify extension and the PR targets `*-integrations`, check the Linear/Notion spec for the explicit target directory. If the spec names `*-live`, flag it as a **Critical** placement error (`## 🏠 Wrong Repo`).
|
|
55
55
|
|
|
@@ -64,12 +64,12 @@ Include: spec quote with correct path, which repo to target, and the risk (wrong
|
|
|
64
64
|
| TS-1 | No type casts (`as X`), no `any` | Critical; test files lenient on genuine unknowns only |
|
|
65
65
|
| TS-2 | No `.js` files in integrations repos | Critical; Liquid themes exempt |
|
|
66
66
|
| GQL-1 | nodes connections need `pageInfo`, all pages fetched, size=250 | Critical if pageInfo/pagination missing; Important if size≠250 without comment |
|
|
67
|
-
| PR-1 | PR title must start with `[TICKET-NNN]`; include all commit-referenced tickets | Blocking
|
|
67
|
+
| PR-1 | PR title must start with `[TICKET-NNN]`; include all commit-referenced tickets | Blocking - ⛔ CANNOT MERGE warning |
|
|
68
68
|
| FLAG-1 | Reflag repos only: risky change should ship behind a feature flag | Non-blocking; `important` at most, usually `observation`. Never a `rule:` tag |
|
|
69
69
|
|
|
70
|
-
These apply equally when you are writing a feature or bugfix
|
|
70
|
+
These apply equally when you are writing a feature or bugfix - not only in review.
|
|
71
71
|
|
|
72
|
-
### FLAG-1
|
|
72
|
+
### FLAG-1 - Ship behind a feature flag (Reflag repos only)
|
|
73
73
|
|
|
74
74
|
Applies ONLY where a `package.json` (any depth, excluding `node_modules`) depends on
|
|
75
75
|
`@reflag/node-sdk` or `@teifi-digital/reflag-client`. Elsewhere there is no flag client,
|
|
@@ -90,7 +90,7 @@ Yes → ship it. No → flag it.
|
|
|
90
90
|
|
|
91
91
|
Deliberately NOT blocking, unlike TS-1/GQL-1/PR-1: whether something needs a flag is a
|
|
92
92
|
rollout judgement, not a correctness violation, and a blocking comment on every
|
|
93
|
-
borderline diff trains people to ignore the signal. Never invent a concrete flag key
|
|
93
|
+
borderline diff trains people to ignore the signal. Never invent a concrete flag key -
|
|
94
94
|
keys must be confirmed against Reflag, so say a flag is needed without naming one.
|
|
95
95
|
|
|
96
96
|
Related: a diff that BOTH adds a column/table AND changes what is read or written must
|
|
@@ -121,20 +121,20 @@ only the message is wrong. Detail and the reporting format live in the
|
|
|
121
121
|
- **Shopify:** REST Admin + GraphQL Admin, Webhooks, Shopify Functions, genql
|
|
122
122
|
- **External APIs:** Business Central (OAuth2, rate-limited), Salesforce GraphQL, ROI
|
|
123
123
|
- **Infra:** Docker Compose locally; environment-var–driven cron syncs via `orchestrator.ts`
|
|
124
|
-
- **Type gen pipeline:** pgtyped (SQL→TS), genql (GraphQL→TS), json2ts (schemas→TS)
|
|
124
|
+
- **Type gen pipeline:** pgtyped (SQL→TS), genql (GraphQL→TS), json2ts (schemas→TS) -
|
|
125
125
|
check that generated files are regenerated when their sources change
|
|
126
126
|
- **MCPs available:** Linear, Slack, Notion, Shopify Dev docs, Harvest, Sentry
|
|
127
127
|
|
|
128
128
|
### Repo taxonomy (for Step 1g placement check)
|
|
129
129
|
|
|
130
|
-
**Per-project repo structure varies
|
|
130
|
+
**Per-project repo structure varies - always verify before flagging.**
|
|
131
131
|
|
|
132
132
|
- For **EVI project**: `evi-integrations` = backend ERP sync only; `evi-live` = Shopify app (extensions, Polaris UI).
|
|
133
133
|
- For **GIC project**: `gic-integrations` owns the ERP backend sync and retains
|
|
134
134
|
legacy/reference Shopify extensions. New GIC customer account extensions belong
|
|
135
135
|
in `gic-live`; do not treat the legacy `extensions/` folder as placement precedent.
|
|
136
136
|
- For other projects (`rsl-*`, `elmt-*`, etc.): check the repo's `extensions/` folder
|
|
137
|
-
presence before assuming a split
|
|
137
|
+
presence before assuming a split - do not assume the `*-integrations` pattern always
|
|
138
138
|
means backend-only.
|
|
139
139
|
|
|
140
140
|
**Step 1g action**: Before flagging a placement mismatch, run:
|
|
@@ -154,7 +154,7 @@ that alone is not precedent for new GIC extensions. Flag when the repo has no
|
|
|
154
154
|
# Teifi soft conventions (styling, naming, comments, tests, hygiene)
|
|
155
155
|
|
|
156
156
|
Companion to `teifi-rules.md`. Those are the four HARD rules (TS-1, TS-2,
|
|
157
|
-
GQL-1, PR-1)
|
|
157
|
+
GQL-1, PR-1) - always Critical. This file is the house style the Teifi
|
|
158
158
|
plugin skills enforce during development (`teifi-dev:code-review`,
|
|
159
159
|
`rename-pass`, `comment-stripper`, `unit-test-best-practices`). A review that
|
|
160
160
|
misses them lets the same nits come back from the human reviewer.
|
|
@@ -168,7 +168,7 @@ inflate a style deviation into Critical.
|
|
|
168
168
|
## 1. Naming matrix (source: `teifi-dev` rename-pass agent)
|
|
169
169
|
|
|
170
170
|
Flag a name the diff INTRODUCES that breaks a row. Renaming is cheap in the
|
|
171
|
-
diff, expensive later
|
|
171
|
+
diff, expensive later - but a rename is still a cost, so leave conforming
|
|
172
172
|
names alone.
|
|
173
173
|
|
|
174
174
|
### Values
|
|
@@ -184,7 +184,7 @@ names alone.
|
|
|
184
184
|
| count | `Count` suffix | `lineCount` |
|
|
185
185
|
| casing | camelCase values · PascalCase types/components · `CONSTANT_CASE` constants | |
|
|
186
186
|
|
|
187
|
-
### Verbs
|
|
187
|
+
### Verbs - one per job, chosen by cost + purity
|
|
188
188
|
|
|
189
189
|
`get` cheap/sync · `fetch` async I/O · `create` new persisted entity ·
|
|
190
190
|
`build` assembles in memory (pure) · `derive` pure value from existing state ·
|
|
@@ -195,14 +195,14 @@ idempotently makes state hold.
|
|
|
195
195
|
A `getX` that does network I/O is a finding (`fetchX`). A `createX` that
|
|
196
196
|
mutates an existing row is a finding (`updateX`).
|
|
197
197
|
|
|
198
|
-
### Effect affixes
|
|
198
|
+
### Effect affixes - put the surprise in the name
|
|
199
199
|
|
|
200
200
|
`…OrThrow` · `…OrDefault` · `upsert` · `…ForUpdate` (row lock) ·
|
|
201
201
|
`…SkipLocked` · `try…` (returns result, doesn't throw) · `with…`
|
|
202
202
|
(acquire→run→release) · `…Sync` · `…Cached` · `unsafe…`.
|
|
203
203
|
|
|
204
204
|
A function that takes a row lock, throws on miss, or returns a cached value
|
|
205
|
-
without saying so in its name is a finding
|
|
205
|
+
without saying so in its name is a finding - that surprise is exactly what the
|
|
206
206
|
next caller will miss.
|
|
207
207
|
|
|
208
208
|
### React & types
|
|
@@ -219,7 +219,7 @@ next caller will miss.
|
|
|
219
219
|
`line`, `item`, `node`, `record`, `entry`, `group`, `row`, `value`, `key` are
|
|
220
220
|
findings when the surrounding domain has two or more qualified variants in
|
|
221
221
|
scope (arrival line vs receipt line; source node vs target node). Qualify with
|
|
222
|
-
the domain role
|
|
222
|
+
the domain role - variables, params, fields, type aliases, **type params**
|
|
223
223
|
(`TLine` → `TReceiptLine`), and the functions built on the noun.
|
|
224
224
|
|
|
225
225
|
### NEVER flag a rename at a boundary
|
|
@@ -228,7 +228,7 @@ DB table/column names (and any `Row`/`Dto` mirroring them), GraphQL / oRPC /
|
|
|
228
228
|
OpenAPI contract fields, enum string values, route strings, wire/JSON keys.
|
|
229
229
|
Something outside the diff reads them. The app-layer alias may be renamed
|
|
230
230
|
(`createdAt @map("created_at")`); the boundary name may not. A "rename this
|
|
231
|
-
column" finding is a false positive
|
|
231
|
+
column" finding is a false positive - say the boundary name is bad and leave
|
|
232
232
|
it to a human if it matters.
|
|
233
233
|
|
|
234
234
|
---
|
|
@@ -238,25 +238,25 @@ it to a human if it matters.
|
|
|
238
238
|
**Default: a comment should not exist.** It earns its place only by saying
|
|
239
239
|
something the code *cannot*, and then in as few words as possible. Flag each
|
|
240
240
|
offending comment the diff ADDED as its own `idiomatic` finding with the
|
|
241
|
-
deletion as the `fix`
|
|
241
|
+
deletion as the `fix` - never a vague "too many comments". Pre-existing
|
|
242
242
|
comments are out of scope.
|
|
243
243
|
|
|
244
244
|
Flag a comment that:
|
|
245
245
|
|
|
246
246
|
- restates the next line (`// increment counter` over `counter += 1`);
|
|
247
247
|
- narrates a step or captions a block ("first we fetch, then we map…");
|
|
248
|
-
- **narrates a whole function or type**
|
|
248
|
+
- **narrates a whole function or type** - JSDoc restating a well-named
|
|
249
249
|
signature, its params, or its return shape. A doc comment earns its place
|
|
250
250
|
only for a non-obvious *contract*;
|
|
251
251
|
- explains obvious syntax or a well-known API;
|
|
252
252
|
- repeats a rationale stated elsewhere in the diff (keep ONE canonical place);
|
|
253
|
-
- is changelog/AI noise
|
|
253
|
+
- is changelog/AI noise - ticket IDs (`EVI-123`), person names, multi-paragraph
|
|
254
254
|
"why we chose X" essays. A single `@see EVI-123` JSDoc tag is fine;
|
|
255
|
-
- **references what the reader cannot see**
|
|
255
|
+
- **references what the reader cannot see** - a removed line or a prior
|
|
256
256
|
approach ("no longer using the old Y"). Source shows what the code *is*;
|
|
257
|
-
- **documents invisible coupling**
|
|
257
|
+
- **documents invisible coupling** - "ordered this way because some other code
|
|
258
258
|
does X". The fix is clearer structure, not a comment enshrining it;
|
|
259
|
-
- **says what a name or type could say**
|
|
259
|
+
- **says what a name or type could say** - then the code should carry it (this
|
|
260
260
|
is a naming finding per §1, not a comment to keep).
|
|
261
261
|
|
|
262
262
|
KEEP (do not flag): an external-system quirk, an ordering/concurrency
|
|
@@ -269,7 +269,7 @@ gotcha, is noise. Code is type-checked; prose is not.
|
|
|
269
269
|
|
|
270
270
|
---
|
|
271
271
|
|
|
272
|
-
## 3. Hygiene & debug artifacts
|
|
272
|
+
## 3. Hygiene & debug artifacts - severity is fixed, do not soften
|
|
273
273
|
|
|
274
274
|
Scan `+` lines only (added by this diff; pre-existing occurrences are out of
|
|
275
275
|
scope).
|
|
@@ -278,7 +278,7 @@ scope).
|
|
|
278
278
|
|---|---|
|
|
279
279
|
| `console.log(` / `console.debug(` added to non-CLI production code | important |
|
|
280
280
|
| `debugger;` | critical |
|
|
281
|
-
| `.only` on a test (`it.only`, `describe.only`, `fit(`, `fdescribe(`)
|
|
281
|
+
| `.only` on a test (`it.only`, `describe.only`, `fit(`, `fdescribe(`) - silently skips the rest of the suite | critical |
|
|
282
282
|
| new `TODO:` / `FIXME:` / `HACK:` / `XXX:` with no ticket reference | idiomatic |
|
|
283
283
|
| commented-out code block > 3 lines | idiomatic |
|
|
284
284
|
| hardcoded URL / endpoint that belongs in an env var | important |
|
|
@@ -286,7 +286,7 @@ scope).
|
|
|
286
286
|
| unreachable code after `return`/`throw` | important |
|
|
287
287
|
|
|
288
288
|
`console.error`/`console.warn` on a real error path is not a finding unless the
|
|
289
|
-
repo has a logger idiom
|
|
289
|
+
repo has a logger idiom - then cite it.
|
|
290
290
|
|
|
291
291
|
---
|
|
292
292
|
|
|
@@ -305,13 +305,13 @@ does. Each is an `idiomatic` finding with the corrected code as the `fix`.
|
|
|
305
305
|
- **`afterEach(cleanup)`** in every RTL test file.
|
|
306
306
|
- **`new QueryClient({ defaultOptions: { queries: { retry: false } } })`** in
|
|
307
307
|
every hook/component test wrapper. Missing `retry: false` silently hangs the
|
|
308
|
-
test on a failing query
|
|
308
|
+
test on a failing query - flag it as `important`, not idiomatic.
|
|
309
309
|
- **Query priority:** `getByRole` → `getByLabelText` → `getByText` →
|
|
310
310
|
`getByTestId` (last resort only). A `getByTestId` where a role query works is
|
|
311
311
|
a finding.
|
|
312
312
|
- **Mock paths are RELATIVE, never the `@lib/common` alias.** The alias
|
|
313
313
|
resolves only from `web/`; inside `common/` it is silently ignored and the
|
|
314
|
-
mock has no effect
|
|
314
|
+
mock has no effect - the test then passes against the real module. Flag any
|
|
315
315
|
`vi.mock('@lib/common/…')` inside `common/` as `important`.
|
|
316
316
|
- **Mock at the module boundary,** not `vi.spyOn(mod, '_internal')`.
|
|
317
317
|
- **Zod schemas:** test via `safeParse` and assert `result.success`, not
|
|
@@ -322,28 +322,28 @@ does. Each is an `idiomatic` finding with the corrected code as the `fix`.
|
|
|
322
322
|
(`expect(matrix).toHaveLength(N * M * K)`). A hand-picked subset of a
|
|
323
323
|
combinatorial space is a coverage-gap finding.
|
|
324
324
|
- **Comment the non-obvious scenario:** a test capturing a past bug explains
|
|
325
|
-
*why* (this is a sanctioned comment
|
|
325
|
+
*why* (this is a sanctioned comment - never flag it under §2).
|
|
326
326
|
|
|
327
327
|
---
|
|
328
328
|
|
|
329
329
|
## 5. Commit & PR hygiene
|
|
330
330
|
|
|
331
|
-
Beyond PR-1 (hard rule). All `idiomatic`
|
|
331
|
+
Beyond PR-1 (hard rule). All `idiomatic` - a squash fixes them and they never
|
|
332
332
|
block.
|
|
333
333
|
|
|
334
334
|
- Conventional commits: `<type>(<scope>): <description>` with type in
|
|
335
335
|
`feat|fix|refactor|test|docs|chore|style|perf|build|ci`; description
|
|
336
336
|
lowercase, imperative, no trailing period.
|
|
337
|
-
- Vague subjects (`fix`, `update`, `wip`, `changes`, `stuff`)
|
|
337
|
+
- Vague subjects (`fix`, `update`, `wip`, `changes`, `stuff`) - flag, recommend
|
|
338
338
|
a rewrite.
|
|
339
|
-
- Many WIP commits
|
|
339
|
+
- Many WIP commits - recommend a squash before merge, in one line, once.
|
|
340
340
|
- Never mention Claude Code / the assistant in commit or PR text; a
|
|
341
341
|
`Co-Authored-By: Claude` trailer or "Generated with Claude Code" footer in
|
|
342
342
|
the commit log is a finding.
|
|
343
343
|
|
|
344
344
|
---
|
|
345
345
|
|
|
346
|
-
## 6. Generated code
|
|
346
|
+
## 6. Generated code - check the source, not the artifact
|
|
347
347
|
|
|
348
348
|
The Teifi type-gen pipeline means several files must move together. When a
|
|
349
349
|
source changes and its generated artifact does not (or vice-versa), that is an
|
|
@@ -356,10 +356,10 @@ source changes and its generated artifact does not (or vice-versa), that is an
|
|
|
356
356
|
| `schemas/*.json` | `schemas/generated/` (json2ts) |
|
|
357
357
|
| `prisma/schema.prisma` | a migration in `prisma/migrations/` + Prisma client |
|
|
358
358
|
|
|
359
|
-
Never review the *content* of a generated file as if it were hand-written
|
|
359
|
+
Never review the *content* of a generated file as if it were hand-written - no
|
|
360
360
|
naming, comment, or complexity findings inside `generated/`. Review the source.
|
|
361
361
|
|
|
362
362
|
Related hard convention (project CLAUDE.md): Shopify Admin API calls go through
|
|
363
|
-
the genql client (`gql.<file>.<query>.run(graphql, vars)`)
|
|
363
|
+
the genql client (`gql.<file>.<query>.run(graphql, vars)`) - a hand-rolled
|
|
364
364
|
`fetch` to `/admin/api/…/graphql.json` is an `important` finding even for a
|
|
365
365
|
one-off probe.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Fixture house rules
|
|
2
2
|
|
|
3
|
-
### TS-1
|
|
3
|
+
### TS-1 - Type safety
|
|
4
4
|
|
|
5
|
-
### TS-2
|
|
5
|
+
### TS-2 - No JavaScript files
|
|
6
6
|
|
|
7
|
-
### GQL-1
|
|
7
|
+
### GQL-1 - Complete pagination
|
|
8
8
|
|
|
9
|
-
### PR-1
|
|
9
|
+
### PR-1 - Ticket-prefixed titles
|
|
10
10
|
|
|
11
|
-
### SEC-7
|
|
11
|
+
### SEC-7 - Never log session tokens
|
package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/fixtures/revmux-report.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"body": "Two concurrent writers can both pass the guard and insert a fulfillment row.",
|
|
12
12
|
"fix": "Take a row lock on the order before the check-then-insert.",
|
|
13
13
|
"sources": ["quality+impl"],
|
|
14
|
-
"lenses": ["lekker-quality"],
|
|
14
|
+
"lenses": ["lekker-quality", "lekker-implementation"],
|
|
15
15
|
"verdict": "confirmed"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
@@ -143,6 +143,7 @@ REVMUX_OUT="$OUT"
|
|
|
143
143
|
set +e
|
|
144
144
|
revmux --task "$TASK" --run "$RUN" --profile "$PROFILE_NAME" \
|
|
145
145
|
--workdir "$WORKDIR" --tasks-dir "$TASKS_DIR" --config-dir "$CONFIG_DIR" \
|
|
146
|
+
--tools=Read,Grep,Glob,WebFetch,WebSearch \
|
|
146
147
|
--no-tui > "$REVMUX_OUT"
|
|
147
148
|
CODE=$?
|
|
148
149
|
set -e
|
package/package.json
CHANGED
package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-conventions.md
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: deviations from Teifi's own codebase conventions
|
|
2
|
+
description: deviations from Teifi's own codebase conventions - the "strong teammate" non-blocking lens
|
|
3
3
|
---
|
|
4
4
|
## Lens: lekker-conventions
|
|
5
5
|
|
|
6
6
|
Review the change for deviations from Teifi's established codebase
|
|
7
7
|
conventions and idioms. This is the "strong teammate" lens: the suggestions a
|
|
8
|
-
senior Teifi engineer leaves
|
|
8
|
+
senior Teifi engineer leaves - non-blocking, but they make the code match how
|
|
9
9
|
the rest of the codebase is written. Look beyond the diff only for
|
|
10
10
|
convention-specific precedent and reuse searches. Other lenses may inspect the
|
|
11
11
|
runtime context they need for their own cross-file checks.
|
|
12
12
|
|
|
13
|
-
Read `{{PROFILE}}` now, before forming any opinion
|
|
13
|
+
Read `{{PROFILE}}` now, before forming any opinion - it carries the Teifi
|
|
14
14
|
conventions text. Its §1 (naming matrix), §2 (comment policy), §5 (commit
|
|
15
|
-
hygiene) and §6 (generated code) are yours
|
|
15
|
+
hygiene) and §6 (generated code) are yours - they are the house style, so a
|
|
16
16
|
deviation needs NO codebase precedent beyond that file (the file IS the
|
|
17
17
|
precedent; cite the section, e.g. "teifi-conventions §1 verbs").
|
|
18
18
|
Everything else in this lens still requires a cited precedent from the code.
|
|
19
19
|
|
|
20
20
|
Axes to cover:
|
|
21
21
|
- Naming (teifi-conventions §1): every symbol the diff INTRODUCES against the
|
|
22
|
-
matrix
|
|
22
|
+
matrix - boolean without `is`/`has`, async I/O named `get`, a row lock or a
|
|
23
23
|
throw-on-miss or a cache read absent from the name (`…ForUpdate`,
|
|
24
24
|
`…OrThrow`, `…Cached`), a collidable component without its domain prefix, a
|
|
25
25
|
bare generic noun (`line`, `node`, `row`) where the domain has two variants in
|
|
26
26
|
scope. NEVER flag a boundary name (DB column, GraphQL/oRPC field, enum value,
|
|
27
|
-
route string, wire key)
|
|
27
|
+
route string, wire key) - renaming it breaks callers outside the diff.
|
|
28
28
|
- Comments (teifi-conventions §2): one finding per over-commenting offender the
|
|
29
29
|
diff ADDED, with the deletion as the fix. Never a vague "too many comments",
|
|
30
30
|
never a pre-existing comment, never a lint/type pragma or a genuine
|
|
31
31
|
non-obvious "why".
|
|
32
32
|
- Generated code (teifi-conventions §6): a changed `.sql` / `.graphql` /
|
|
33
33
|
`.json` schema / `prisma/schema.prisma` whose generated artifact is absent
|
|
34
|
-
from the diff (or the reverse)
|
|
34
|
+
from the diff (or the reverse) - major. Raise NO naming, comment, or
|
|
35
35
|
complexity finding inside a `generated/` directory. A hand-rolled `fetch` to
|
|
36
|
-
the Shopify Admin GraphQL endpoint instead of the genql client
|
|
36
|
+
the Shopify Admin GraphQL endpoint instead of the genql client - major.
|
|
37
37
|
- Commits (teifi-conventions §5): non-conventional or vague commit subjects, and
|
|
38
38
|
any Claude Code / assistant mention in the commit or PR text.
|
|
39
39
|
- Type-system idioms:
|
|
40
|
-
* A hand-written interface/type that duplicates an existing Zod schema
|
|
40
|
+
* A hand-written interface/type that duplicates an existing Zod schema -
|
|
41
41
|
should be `z.infer<typeof zSchema>` so the schema stays the single source
|
|
42
42
|
of truth. (Grep for a matching z-schema in the same feature folder.)
|
|
43
43
|
* Raw `string` used for a Shopify GID or an entity id where a branded
|
|
@@ -50,12 +50,12 @@ Axes to cover:
|
|
|
50
50
|
* A GID validated/parsed inline where a shared helper exists (e.g.
|
|
51
51
|
`zNamespacedGid`). Grep the shared libs and the repo before asserting.
|
|
52
52
|
- Reuse (search the worktree AND sibling Teifi repos before flagging):
|
|
53
|
-
* Inline fetch/client logic that should reuse
|
|
53
|
+
* Inline fetch/client logic that should reuse - or be promoted into - a
|
|
54
54
|
shared client (e.g. a company-switcher client) that already exists or that
|
|
55
55
|
the codebase clearly wants.
|
|
56
56
|
* A util/helper that already exists elsewhere being re-implemented inline.
|
|
57
57
|
* A symbol defined locally that is (or should be) exported from a shared
|
|
58
|
-
module
|
|
58
|
+
module - "are we not exporting this somewhere?"
|
|
59
59
|
- Consistency:
|
|
60
60
|
* Cache-key / composite-key separators that disagree with the repo's
|
|
61
61
|
prevailing choice (e.g. `:` vs `::`). Grep existing key-building code to
|
|
@@ -64,10 +64,10 @@ Axes to cover:
|
|
|
64
64
|
HttpError('...', 403)` instead of a bare string / generic Error).
|
|
65
65
|
* Naming/casing that breaks the convention used by sibling files.
|
|
66
66
|
|
|
67
|
-
MANDATORY SWEEP
|
|
67
|
+
MANDATORY SWEEP - do this FIRST, before forming any opinion:
|
|
68
68
|
|
|
69
69
|
The axes above are symptom-driven: they only fire once you already suspect a
|
|
70
|
-
duplication. That is how a re-implemented helper slips through
|
|
70
|
+
duplication. That is how a re-implemented helper slips through - nobody thinks to
|
|
71
71
|
look. So run these enumerations mechanically, whether or not anything looks wrong.
|
|
72
72
|
|
|
73
73
|
1. **Sibling sweep for every file the diff ADDS.** For each added file, list its
|
|
@@ -119,12 +119,12 @@ HARD RULES:
|
|
|
119
119
|
- Only raise a finding when the better pattern PROVABLY ALREADY EXISTS. Cite it:
|
|
120
120
|
the file:line where the helper/type/convention lives, or the sibling file that
|
|
121
121
|
does it the idiomatic way. If you cannot find a concrete precedent, DROP the
|
|
122
|
-
finding
|
|
122
|
+
finding - "this would be nicer as X" on taste alone is not allowed.
|
|
123
123
|
- Every finding must still trace to a `+` line in the diff (the deviation must
|
|
124
124
|
be code this change added/changed). The supporting precedent may live outside the
|
|
125
125
|
diff; the deviation may not.
|
|
126
126
|
- These are suggestions, not blockers. Do not inflate severity. Report each as
|
|
127
|
-
`file:line
|
|
127
|
+
`file:line - <deviation> (precedent: <file:line of the existing pattern>)`.
|
|
128
128
|
- ONE EXCEPTION to non-blocking: if the re-implementation DIVERGES in behaviour
|
|
129
129
|
from the helper it duplicates, that is not a style nit, it is two spellings of
|
|
130
130
|
the same value that disagree, and it belongs on lekker-quality's severity
|
|
@@ -145,14 +145,14 @@ omits it silently reports "no precedent exists" for whole directories.
|
|
|
145
145
|
|
|
146
146
|
A mined record of what other bots (Greptile / Gemini / CodeRabbit) have
|
|
147
147
|
commented on in this repo may be present under `{{CONTEXT}}`. Use it as a prior,
|
|
148
|
-
not as a checklist: a high count means "frequently raised here", not "correct"
|
|
148
|
+
not as a checklist: a high count means "frequently raised here", not "correct" -
|
|
149
149
|
never raise a finding because a bot once said it, only because it is true here.
|
|
150
150
|
|
|
151
151
|
Rules:
|
|
152
|
-
- Report file:line
|
|
152
|
+
- Report file:line - description with a precedent citation. No positive
|
|
153
153
|
observations. No taste-only suggestions.
|
|
154
|
-
- Quote the verbatim offending line(s)
|
|
155
|
-
from memory
|
|
154
|
+
- Quote the verbatim offending line(s) - never paraphrased, never reconstructed
|
|
155
|
+
from memory - and give a concrete drop-in fix, or when the fix is
|
|
156
156
|
architectural, a minimal skeleton plus one sentence on what else must change.
|
|
157
|
-
- A finding you cannot quote and cannot fix is a finding you have not proven
|
|
157
|
+
- A finding you cannot quote and cannot fix is a finding you have not proven -
|
|
158
158
|
drop it instead.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: correctness, scalability and integration issues
|
|
2
|
+
description: correctness, scalability and integration issues - Teifi's GQL-1 hard rule included
|
|
3
3
|
---
|
|
4
4
|
## Lens: lekker-implementation
|
|
5
5
|
|
|
@@ -35,12 +35,12 @@ Axes to cover:
|
|
|
35
35
|
idempotency, external API pagination not handled.
|
|
36
36
|
- GraphQL pagination (GQL-1): for every GraphQL query in the diff that uses a
|
|
37
37
|
nodes connection (`nodes { ... }`):
|
|
38
|
-
(a) Check that `pageInfo { hasNextPage endCursor }` is present alongside nodes
|
|
39
|
-
(b) Check that all pages are fetched (a loop or recursion using endCursor)
|
|
38
|
+
(a) Check that `pageInfo { hasNextPage endCursor }` is present alongside nodes - if missing, critical.
|
|
39
|
+
(b) Check that all pages are fetched (a loop or recursion using endCursor) - a single-page fetch is a bug, critical.
|
|
40
40
|
(c) Check the page size: must be 250 (Shopify max). If any other size is used without a code comment explaining why, flag as major.
|
|
41
41
|
Title any critical finding under this axis `[GQL-1] ...`.
|
|
42
42
|
- Feature-flag rollout (Reflag repos ONLY): first check the repo actually uses
|
|
43
|
-
Reflag
|
|
43
|
+
Reflag - a `package.json` (any depth, excluding node_modules) depending on
|
|
44
44
|
`@reflag/node-sdk` or `@teifi-digital/reflag-client`. If it does not, SKIP this
|
|
45
45
|
axis entirely and raise nothing; a repo with no flag client cannot act on the
|
|
46
46
|
finding. Where it does apply, ask whether the change should ship behind a flag:
|
|
@@ -51,26 +51,26 @@ Axes to cover:
|
|
|
51
51
|
correct, internal/admin-only surfaces, or work fully covered by tests and
|
|
52
52
|
verifiable in staging. Tie-breaker: if you would not be comfortable fixing it
|
|
53
53
|
forward at 2am, it needs a flag. Name which of (a)-(d) applies.
|
|
54
|
-
Severity: major at most, usually minor
|
|
54
|
+
Severity: major at most, usually minor - this is a rollout judgement call, not
|
|
55
55
|
a defect. NEVER title this with a bracketed hard-rule tag (that would force
|
|
56
56
|
critical and imply a policy violation). Never invent a concrete flag key as
|
|
57
57
|
though it exists: flag keys must be confirmed against Reflag, so say a flag is
|
|
58
58
|
needed without naming one.
|
|
59
59
|
Also raise as a structural concern (severity major) when a diff BOTH adds a
|
|
60
|
-
column/table AND changes what is read or written
|
|
60
|
+
column/table AND changes what is read or written - the SOP requires splitting
|
|
61
61
|
that into expand / migrate / read-switch / contract PRs. Name the split.
|
|
62
62
|
|
|
63
|
-
GQL-1's full rule text lives in `{{PROFILE}}`
|
|
63
|
+
GQL-1's full rule text lives in `{{PROFILE}}` - read it there before applying it.
|
|
64
64
|
|
|
65
65
|
Rules:
|
|
66
66
|
- Every finding must trace to a `+` line in the diff, with one exception: an
|
|
67
67
|
unmet AC whose defect lives in code the diff did not touch. Anchor that one to
|
|
68
68
|
the unchanged file:line that had to change, and say in the description why the
|
|
69
|
-
unchanged line is the defect. That line may be an unchanged one
|
|
69
|
+
unchanged line is the defect. That line may be an unchanged one - do not drop
|
|
70
70
|
an unmet AC for lack of a quotable added line.
|
|
71
|
-
- Report file:line
|
|
72
|
-
- Quote the verbatim offending line(s)
|
|
73
|
-
from memory
|
|
71
|
+
- Report file:line - description. No positive observations.
|
|
72
|
+
- Quote the verbatim offending line(s) - never paraphrased, never reconstructed
|
|
73
|
+
from memory - and give a concrete drop-in fix, or when the fix is
|
|
74
74
|
architectural, a minimal skeleton plus one sentence on what else must change.
|
|
75
|
-
- A finding you cannot quote and cannot fix is a finding you have not proven
|
|
75
|
+
- A finding you cannot quote and cannot fix is a finding you have not proven -
|
|
76
76
|
drop it instead.
|
package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-quality.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: quality, security and data-integrity issues
|
|
2
|
+
description: quality, security and data-integrity issues - Teifi's TS-1/TS-2 hard rules included
|
|
3
3
|
---
|
|
4
4
|
## Lens: lekker-quality
|
|
5
5
|
|
|
@@ -50,7 +50,7 @@ Axes to cover:
|
|
|
50
50
|
cast, explain the correct type, show the fix. Ask if they're Harry Potter.
|
|
51
51
|
Title the finding `[TS-1] ...`.
|
|
52
52
|
- No JavaScript files (TS-2): if the diff adds any `.js` file to a non-Liquid
|
|
53
|
-
theme repo, flag as critical
|
|
53
|
+
theme repo, flag as critical - must be `.ts`. Title the finding `[TS-2] ...`.
|
|
54
54
|
- Dependency changes. Skip this axis entirely unless the diff touches
|
|
55
55
|
`package.json`, a lockfile, or a vendored dependency. Where it applies:
|
|
56
56
|
(a) A version bump is a behaviour change nobody in this PR wrote. If neither
|
|
@@ -73,15 +73,15 @@ TS-1 and TS-2 are Teifi hard rules: their text is defined in full in `{{PROFILE}
|
|
|
73
73
|
title start with the bracketed tag, e.g. `[TS-1] ...` or `[TS-2] ...`, so the
|
|
74
74
|
caller can recognize it as a policy violation rather than an ordinary finding.
|
|
75
75
|
|
|
76
|
-
CI status, Sentry signals, and existing reviews may be present in `{{CONTEXT}}`
|
|
76
|
+
CI status, Sentry signals, and existing reviews may be present in `{{CONTEXT}}` -
|
|
77
77
|
read what is there before forming an opinion, and skip anything that is absent
|
|
78
78
|
rather than treating its absence as a finding.
|
|
79
79
|
|
|
80
80
|
Rules:
|
|
81
81
|
- Every finding must trace to a `+` line in the diff.
|
|
82
|
-
- Report file:line
|
|
83
|
-
- Quote the verbatim offending line(s) from the diff
|
|
84
|
-
reconstructed from memory
|
|
82
|
+
- Report file:line - description. No positive observations.
|
|
83
|
+
- Quote the verbatim offending line(s) from the diff - never paraphrased, never
|
|
84
|
+
reconstructed from memory - and give a concrete drop-in fix, or when the fix
|
|
85
85
|
is architectural, a minimal skeleton plus one sentence on what else must change.
|
|
86
|
-
- A finding you cannot quote and cannot fix is a finding you have not proven
|
|
86
|
+
- A finding you cannot quote and cannot fix is a finding you have not proven -
|
|
87
87
|
drop it instead of reporting it as a minor observation with no evidence.
|
|
@@ -6,17 +6,17 @@ description: over-engineering and DRY violations, plus Teifi's debug-artifact hy
|
|
|
6
6
|
Review the change for over-engineering and DRY violations.
|
|
7
7
|
|
|
8
8
|
Look for:
|
|
9
|
-
- Copy-paste logic: identical blocks that differ only in a constant
|
|
9
|
+
- Copy-paste logic: identical blocks that differ only in a constant - flag
|
|
10
10
|
for extraction.
|
|
11
|
-
- Parallel implementations: two functions doing the same thing
|
|
11
|
+
- Parallel implementations: two functions doing the same thing - one should
|
|
12
12
|
call the other.
|
|
13
13
|
- Unnecessary abstraction inversion: private helper called exactly once, adds
|
|
14
|
-
no reuse
|
|
14
|
+
no reuse - should be inlined.
|
|
15
15
|
- Over-engineered control flow: nested ternaries / promise chains that could
|
|
16
16
|
be plain if/else or async/await.
|
|
17
17
|
- Config spread: same magic constant defined in multiple files.
|
|
18
18
|
- Debug artifacts and hygiene: apply the fixed severity table in §3 of
|
|
19
|
-
`{{PROFILE}}` (the Teifi conventions section)
|
|
19
|
+
`{{PROFILE}}` (the Teifi conventions section) - `debugger` and
|
|
20
20
|
`.only`/`fit`/`fdescribe` are critical, an added `console.log`/`console.debug`
|
|
21
21
|
in production code and a hardcoded URL are major, an unreferenced
|
|
22
22
|
TODO/FIXME and a >3-line commented-out block are minor. Those severities
|
|
@@ -42,7 +42,7 @@ Look for:
|
|
|
42
42
|
Minor, or major when the dead path is still reachable from production code.
|
|
43
43
|
|
|
44
44
|
Only flag where duplication or complexity creates a real maintenance risk or
|
|
45
|
-
bug surface
|
|
45
|
+
bug surface - not aesthetic preference.
|
|
46
46
|
|
|
47
47
|
When you flag a structural problem, name the move, not just the smell: replace a
|
|
48
48
|
chain of conditionals with a typed model or an explicit dispatcher, collapse
|
|
@@ -55,9 +55,9 @@ actionable: name the move or drop the finding.
|
|
|
55
55
|
|
|
56
56
|
Rules:
|
|
57
57
|
- Every finding must trace to a `+` line in the diff.
|
|
58
|
-
- Report file:line
|
|
59
|
-
- Quote the verbatim offending line(s)
|
|
60
|
-
from memory
|
|
58
|
+
- Report file:line - description. No positive observations.
|
|
59
|
+
- Quote the verbatim offending line(s) - never paraphrased, never reconstructed
|
|
60
|
+
from memory - and give a concrete drop-in fix, or when the fix is
|
|
61
61
|
architectural, a minimal skeleton plus one sentence on what else must change.
|
|
62
|
-
- A finding you cannot quote and cannot fix is a finding you have not proven
|
|
62
|
+
- A finding you cannot quote and cannot fix is a finding you have not proven -
|
|
63
63
|
drop it instead.
|