@olegkoval/agent-skills 1.43.1 → 1.45.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 (56) hide show
  1. package/adapters/claude/olko-github-pr/skills/lekker-review/SKILL.md +113 -4
  2. package/adapters/claude/olko-github-pr/skills/lekker-review/references/agents/fix-verifier.md +56 -2
  3. package/adapters/claude/olko-github-pr/skills/lekker-review/references/fix-mode.md +19 -1
  4. package/adapters/claude/olko-github-pr/skills/lekker-review/references/pricing.json +9 -0
  5. package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-consistency.md +76 -0
  6. package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-conventions.md +158 -0
  7. package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-implementation.md +76 -0
  8. package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-quality.md +87 -0
  9. package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-simplification.md +63 -0
  10. package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-test-quality.md +172 -0
  11. package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/phase4-comparison.md +42 -0
  12. package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/profile.md +365 -0
  13. package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/profiles/lekker-deep.md +83 -0
  14. package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/profiles/lekker-medium.md +82 -0
  15. package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/fixtures/context.json +3 -0
  16. package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/fixtures/house-rules.md +11 -0
  17. package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/fixtures/revmux-report.json +179 -0
  18. package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/install-revmux-prompts.sh +66 -0
  19. package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/revmux-adapter.mjs +261 -0
  20. package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/revmux-engine.sh +156 -0
  21. package/adapters/claude/olko-github-pr/skills/lekker-review/scripts/selftest.mjs +76 -0
  22. package/package.json +1 -1
  23. package/plugins/olko-apple-kit/.claude-plugin/plugin.json +1 -1
  24. package/plugins/olko-creative/.claude-plugin/plugin.json +1 -1
  25. package/plugins/olko-garmin-kit/.claude-plugin/plugin.json +1 -1
  26. package/plugins/olko-git-tools/.claude-plugin/plugin.json +1 -1
  27. package/plugins/olko-github-pr/.claude-plugin/plugin.json +1 -1
  28. package/plugins/olko-github-pr/skills/lekker-review/SKILL.md +113 -4
  29. package/plugins/olko-github-pr/skills/lekker-review/fix-workflow.js +89 -7
  30. package/plugins/olko-github-pr/skills/lekker-review/references/agents/fix-verifier.md +56 -2
  31. package/plugins/olko-github-pr/skills/lekker-review/references/fix-mode.md +19 -1
  32. package/plugins/olko-github-pr/skills/lekker-review/references/pricing.json +9 -0
  33. package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-consistency.md +76 -0
  34. package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-conventions.md +158 -0
  35. package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-implementation.md +76 -0
  36. package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-quality.md +87 -0
  37. package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-simplification.md +63 -0
  38. package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-test-quality.md +172 -0
  39. package/plugins/olko-github-pr/skills/lekker-review/references/revmux/phase4-comparison.md +42 -0
  40. package/plugins/olko-github-pr/skills/lekker-review/references/revmux/profile.md +365 -0
  41. package/plugins/olko-github-pr/skills/lekker-review/references/revmux/profiles/lekker-deep.md +83 -0
  42. package/plugins/olko-github-pr/skills/lekker-review/references/revmux/profiles/lekker-medium.md +82 -0
  43. package/plugins/olko-github-pr/skills/lekker-review/scripts/fixtures/context.json +3 -0
  44. package/plugins/olko-github-pr/skills/lekker-review/scripts/fixtures/house-rules.md +11 -0
  45. package/plugins/olko-github-pr/skills/lekker-review/scripts/fixtures/revmux-report.json +179 -0
  46. package/plugins/olko-github-pr/skills/lekker-review/scripts/install-revmux-prompts.sh +66 -0
  47. package/plugins/olko-github-pr/skills/lekker-review/scripts/revmux-adapter.mjs +261 -0
  48. package/plugins/olko-github-pr/skills/lekker-review/scripts/revmux-engine.sh +156 -0
  49. package/plugins/olko-github-pr/skills/lekker-review/scripts/selftest.mjs +76 -0
  50. package/plugins/olko-github-pr/skills/lekker-review/workflow.js +43 -6
  51. package/plugins/olko-obsidian/.claude-plugin/plugin.json +1 -1
  52. package/plugins/olko-product/.claude-plugin/plugin.json +1 -1
  53. package/plugins/olko-reflection/.claude-plugin/plugin.json +1 -1
  54. package/plugins/olko-release/.claude-plugin/plugin.json +1 -1
  55. package/plugins/olko-skill-meta/.claude-plugin/plugin.json +1 -1
  56. package/plugins/olko-web-ops/.claude-plugin/plugin.json +1 -1
@@ -0,0 +1,42 @@
1
+ # Phase 4: revmux engine on real PRs
2
+
3
+ One row per live `--engine revmux` run. Numbers come from revmux `stats` via
4
+ `scripts/revmux-adapter.mjs`; USD is the `pricing.json` list-price placeholder
5
+ (`verified: false`, output price applied to every token, synth+verify unpriced),
6
+ and every run so far went through the Max subscription, so USD is a relative
7
+ signal only. "Confirmed" means the main loop kept the finding after reading the
8
+ worktree; "merged" means two revmux findings described one mechanism.
9
+
10
+ | Date | PR | Depth | Wall | Tokens | USD est. | revmux findings | Kept | Re-severity | Hard-rule re-promotions | Merged | False positives |
11
+ |---|---|---|---|---|---|---|---|---|---|---|---|
12
+ | 2026-09-09 | evi-integrations #544 | medium (auto) | 15m40s | 12,604,506 | $169.53 | 4 | 3 (1 C / 2 I) + obs | 1 important → critical (lost role grants, watermark written before post-pass) | 0 | 0 | 0 |
13
+ | 2026-09-09 | evi-integrations #537 | deep (auto, *.sql) | 11m08s | 11,245,064 | $141.61 | 4 | 3 (0 C / 2 I / 1 idiomatic) + obs | none | 0 | 1 (#1 reactivation + #4 guard removal → one Important) | 0 |
14
+
15
+ ## Notes per run
16
+
17
+ ### #544
18
+
19
+ - revmux under-rated the watermark ordering bug as important; the main loop
20
+ raised it to Critical after tracing `executeSyncStrategy` writing the CUSTOMER
21
+ watermark before the role post-pass.
22
+ - One finding referenced `getShopFlag`, which does not exist in this repo;
23
+ rewritten to an env toggle with Reflag as the policy target. Class: fix code
24
+ invented from another repo's helper. Worth a lens note.
25
+ - Depth medium, so verify ran on Criticals only; revmux's own verify stage
26
+ covered all four.
27
+
28
+ ### #537
29
+
30
+ - Two of four findings were the same mechanism seen from two lenses (bugs,
31
+ adversarial). Synthesis did not merge them; the main loop did.
32
+ - All four confirmed against the worktree. The idiomatic one (comment
33
+ narrating deleted code) is exactly the teifi-conventions §2 class.
34
+ - Reactivation and soft-delete files are outside the diff, so the main
35
+ finding could only be anchored on the sync-path signal it replaces.
36
+
37
+ ## Still open
38
+
39
+ - Same PRs through the default `workflow` engine for a side-by-side (Oleg-driven).
40
+ - Read-only enforcement: revmux default `--tools` includes Bash; prompt-enforced
41
+ only. `--tools=Read,Grep,Glob,WebFetch,WebSearch` override not yet applied.
42
+ - Adapter: price synth + verify once revmux reports a per-model split.
@@ -0,0 +1,365 @@
1
+ # Teifi project profile
2
+
3
+ This is the Teifi project profile, handed to revmux as `{{PROFILE}}` for the lekker-medium
4
+ and lekker-deep review profiles. It concatenates the two files lekker-review itself reads as
5
+ `teifi-rules.md` (hard rules, always critical) and `teifi-conventions.md` (soft house style).
6
+
7
+ ---
8
+
9
+ # Teifi rules, taxonomy, and stack context
10
+
11
+ ## Teifi Hard Rules (apply during review AND development)
12
+
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
+
15
+ ### TS-1 — Type safety (TypeScript only)
16
+
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
+ - Every finding: quote the cast/`any`, explain the correct type, show the fix.
20
+
21
+ ### TS-2 — No JavaScript files
22
+
23
+ - No `.js` files may be added to any Teifi integrations repo.
24
+ - Exception: Liquid themes (Online Store 2.0 Shopify themes) may contain `.js`.
25
+ - If the PR adds a `.js` file to a non-theme repo, flag it as Critical: must be converted to `.ts`.
26
+
27
+ ### GQL-1 — GraphQL NodesConnection pagination
28
+
29
+ - Every query that uses a nodes connection (`nodes { ... }`) **must** include `pageInfo { hasNextPage endCursor }` alongside the nodes.
30
+ - All remaining pages **must** be fetched — a single-page fetch with no loop/recursion is a bug.
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
+
33
+ ### PR-1 — PR title must be prefixed with Linear ticket(s)
34
+
35
+ - PR title must start with `[GIC-123]` (or the relevant project prefix) in square brackets.
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 — this is a process rule, not a code quality signal.
38
+
39
+ ### 1g. Repo placement check (Teifi multi-repo projects only)
40
+
41
+ For any PR in a `Teifi-Digital/` repo, verify that the code being changed
42
+ belongs in *this* repo and not a sibling repo.
43
+
44
+ **Teifi repo taxonomy:**
45
+
46
+ | Repo pattern | Purpose |
47
+ |---|---|
48
+ | `*-live` (e.g. `gic-live`, `evi-live`) | Shopify app: customer account extensions, app blocks, storefront extensions, Polaris admin UI |
49
+ | `*-integrations` (e.g. `evi-integrations`; see the GIC exception below) | Backend ERP sync: cron jobs, orchestrator, BC/Sage/Jitterbit/ROI API clients |
50
+ | `teifi-digital` / shared libs | Cross-project utilities, shared types |
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 — don't infer from existing repo contents alone.
53
+
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
+
56
+ Include: spec quote with correct path, which repo to target, and the risk (wrong Shopify Partner app, extension not published to correct store).
57
+
58
+ ## Notes for Teifi / evi-integrations
59
+
60
+ ### Standing coding rules (apply during development and review)
61
+
62
+ | Rule | What | When to flag |
63
+ |---|---|---|
64
+ | TS-1 | No type casts (`as X`), no `any` | Critical; test files lenient on genuine unknowns only |
65
+ | TS-2 | No `.js` files in integrations repos | Critical; Liquid themes exempt |
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 — ⛔ CANNOT MERGE warning |
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
+
70
+ These apply equally when you are writing a feature or bugfix — not only in review.
71
+
72
+ ### FLAG-1 — Ship behind a feature flag (Reflag repos only)
73
+
74
+ Applies ONLY where a `package.json` (any depth, excluding `node_modules`) depends on
75
+ `@reflag/node-sdk` or `@teifi-digital/reflag-client`. Elsewhere there is no flag client,
76
+ so the finding is unactionable and must not be raised.
77
+
78
+ Flag it when any of these hold:
79
+ - a client should validate it before everyone sees it
80
+ - it changes data shape or what gets written
81
+ - it touches orders, money, or fulfilment
82
+ - it cannot be verified without real client data or volume
83
+
84
+ Just ship it when: pure UI/copy with no data change; a bug fix that is strictly better
85
+ and obviously correct; an internal/admin-only surface; fully covered by tests and
86
+ verifiable in staging.
87
+
88
+ Tie-breaker: would you be comfortable being the one to fix this forward at 2am?
89
+ Yes → ship it. No → flag it.
90
+
91
+ Deliberately NOT blocking, unlike TS-1/GQL-1/PR-1: whether something needs a flag is a
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 —
94
+ keys must be confirmed against Reflag, so say a flag is needed without naming one.
95
+
96
+ Related: a diff that BOTH adds a column/table AND changes what is read or written must
97
+ be split into expand / migrate / read-switch / contract PRs (`important`, name the split).
98
+
99
+ ### CONS-1 — One rule, two implementations, must agree
100
+
101
+ When a change enforces the same business rule in two places that can both run
102
+ for the same input — a client-side guard and the server-side validator behind
103
+ it, a UI filter and its query, a webhook handler and the cron that backfills the
104
+ same state — the two must make the same decision for every input class.
105
+
106
+ Build both decision tables and compare them row by row, including the
107
+ missing/undefined input, the not-applicable actor, the flag-off case and the
108
+ error path. The server-side, unbypassable layer is authoritative; the advisory
109
+ layer must match it. A client layer that is STRICTER than the server is a bug,
110
+ not extra safety: it blocks work the system allows.
111
+
112
+ Severity: critical when the divergence blocks a legitimate action or admits one
113
+ that should be blocked; major when the authoritative layer is still right and
114
+ only the message is wrong. Detail and the reporting format live in the
115
+ `lekker-consistency` lens.
116
+
117
+ ### Stack context to inform the review:
118
+
119
+ - **Backend:** TypeScript, Node.js, Express, Prisma, pgtyped, PostgreSQL
120
+ - **Frontend:** React, Shopify Polaris, Vite
121
+ - **Shopify:** REST Admin + GraphQL Admin, Webhooks, Shopify Functions, genql
122
+ - **External APIs:** Business Central (OAuth2, rate-limited), Salesforce GraphQL, ROI
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) —
125
+ check that generated files are regenerated when their sources change
126
+ - **MCPs available:** Linear, Slack, Notion, Shopify Dev docs, Harvest, Sentry
127
+
128
+ ### Repo taxonomy (for Step 1g placement check)
129
+
130
+ **Per-project repo structure varies — always verify before flagging.**
131
+
132
+ - For **EVI project**: `evi-integrations` = backend ERP sync only; `evi-live` = Shopify app (extensions, Polaris UI).
133
+ - For **GIC project**: `gic-integrations` owns the ERP backend sync and retains
134
+ legacy/reference Shopify extensions. New GIC customer account extensions belong
135
+ in `gic-live`; do not treat the legacy `extensions/` folder as placement precedent.
136
+ - For other projects (`rsl-*`, `elmt-*`, etc.): check the repo's `extensions/` folder
137
+ presence before assuming a split — do not assume the `*-integrations` pattern always
138
+ means backend-only.
139
+
140
+ **Step 1g action**: Before flagging a placement mismatch, run:
141
+
142
+ ```bash
143
+ gh api "repos/<REPO_SLUG>/git/trees/HEAD" 2>/dev/null | python3 -c "
144
+ import sys,json; t=json.load(sys.stdin).get('tree',[]); print([f['path'] for f in t if f['path']=='extensions'])
145
+ "
146
+ ```
147
+
148
+ If `extensions/` exists in the target repo, placement may be intentional, but
149
+ that alone is not precedent for new GIC extensions. Flag when the repo has no
150
+ `extensions/` folder, or when a GIC spec targets the new extension to `gic-live`.
151
+
152
+ ---
153
+
154
+ # Teifi soft conventions (styling, naming, comments, tests, hygiene)
155
+
156
+ Companion to `teifi-rules.md`. Those are the four HARD rules (TS-1, TS-2,
157
+ GQL-1, PR-1) — always Critical. This file is the house style the Teifi
158
+ plugin skills enforce during development (`teifi-dev:code-review`,
159
+ `rename-pass`, `comment-stripper`, `unit-test-best-practices`). A review that
160
+ misses them lets the same nits come back from the human reviewer.
161
+
162
+ Severity ceiling: everything here is **idiomatic** unless a row says otherwise.
163
+ Cite a precedent from the codebase where the row asks for one, and never
164
+ inflate a style deviation into Critical.
165
+
166
+ ---
167
+
168
+ ## 1. Naming matrix (source: `teifi-dev` rename-pass agent)
169
+
170
+ Flag a name the diff INTRODUCES that breaks a row. Renaming is cheap in the
171
+ diff, expensive later — but a rename is still a cost, so leave conforming
172
+ names alone.
173
+
174
+ ### Values
175
+
176
+ | Kind | Convention | Example |
177
+ |---|---|---|
178
+ | boolean | `is` prefix, no negatives (`has`/`can`/`should` for possession/permission/policy) | `isFrozen` |
179
+ | array | plural noun (value plural, type stays singular) | `variantIds` |
180
+ | keyed lookup | `…ById` suffix | `toneByStatus` |
181
+ | id | `Id` / `Ids` suffix | `shipmentId` |
182
+ | timestamp | `At` suffix | `scheduledAt` |
183
+ | duration | unit suffix | `timeoutMs` |
184
+ | count | `Count` suffix | `lineCount` |
185
+ | casing | camelCase values · PascalCase types/components · `CONSTANT_CASE` constants | |
186
+
187
+ ### Verbs — one per job, chosen by cost + purity
188
+
189
+ `get` cheap/sync · `fetch` async I/O · `create` new persisted entity ·
190
+ `build` assembles in memory (pure) · `derive` pure value from existing state ·
191
+ `parse` raw → typed · `format` value → display string · `update` change a
192
+ persisted entity · `validate` returns validity · `assert` throws · `ensure`
193
+ idempotently makes state hold.
194
+
195
+ A `getX` that does network I/O is a finding (`fetchX`). A `createX` that
196
+ mutates an existing row is a finding (`updateX`).
197
+
198
+ ### Effect affixes — put the surprise in the name
199
+
200
+ `…OrThrow` · `…OrDefault` · `upsert` · `…ForUpdate` (row lock) ·
201
+ `…SkipLocked` · `try…` (returns result, doesn't throw) · `with…`
202
+ (acquire→run→release) · `…Sync` · `…Cached` · `unsafe…`.
203
+
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 — that surprise is exactly what the
206
+ next caller will miss.
207
+
208
+ ### React & types
209
+
210
+ - React: `use` hook · `handle` (impl) / `on` (prop) · `Props` type · `with` HOC
211
+ · components PascalCase and **domain-prefixed when collidable**
212
+ (`AdjustmentStatusBadge`, not `StatusBadge`).
213
+ - Types: `Input` / `Output` · `Result` (ok/err) · `Schema` (Zod) ·
214
+ `Brand<string,'X'>` for ids · PascalCase noun, no `I-` prefix, never
215
+ pluralize a type.
216
+
217
+ ### Bare generic nouns
218
+
219
+ `line`, `item`, `node`, `record`, `entry`, `group`, `row`, `value`, `key` are
220
+ findings when the surrounding domain has two or more qualified variants in
221
+ scope (arrival line vs receipt line; source node vs target node). Qualify with
222
+ the domain role — variables, params, fields, type aliases, **type params**
223
+ (`TLine` → `TReceiptLine`), and the functions built on the noun.
224
+
225
+ ### NEVER flag a rename at a boundary
226
+
227
+ DB table/column names (and any `Row`/`Dto` mirroring them), GraphQL / oRPC /
228
+ OpenAPI contract fields, enum string values, route strings, wire/JSON keys.
229
+ Something outside the diff reads them. The app-layer alias may be renamed
230
+ (`createdAt @map("created_at")`); the boundary name may not. A "rename this
231
+ column" finding is a false positive — say the boundary name is bad and leave
232
+ it to a human if it matters.
233
+
234
+ ---
235
+
236
+ ## 2. Comment policy (source: `teifi-dev` comment-stripper + code-review Cat. 5)
237
+
238
+ **Default: a comment should not exist.** It earns its place only by saying
239
+ something the code *cannot*, and then in as few words as possible. Flag each
240
+ offending comment the diff ADDED as its own `idiomatic` finding with the
241
+ deletion as the `fix` — never a vague "too many comments". Pre-existing
242
+ comments are out of scope.
243
+
244
+ Flag a comment that:
245
+
246
+ - restates the next line (`// increment counter` over `counter += 1`);
247
+ - narrates a step or captions a block ("first we fetch, then we map…");
248
+ - **narrates a whole function or type** — JSDoc restating a well-named
249
+ signature, its params, or its return shape. A doc comment earns its place
250
+ only for a non-obvious *contract*;
251
+ - explains obvious syntax or a well-known API;
252
+ - repeats a rationale stated elsewhere in the diff (keep ONE canonical place);
253
+ - is changelog/AI noise — ticket IDs (`EVI-123`), person names, multi-paragraph
254
+ "why we chose X" essays. A single `@see EVI-123` JSDoc tag is fine;
255
+ - **references what the reader cannot see** — a removed line or a prior
256
+ approach ("no longer using the old Y"). Source shows what the code *is*;
257
+ - **documents invisible coupling** — "ordered this way because some other code
258
+ does X". The fix is clearer structure, not a comment enshrining it;
259
+ - **says what a name or type could say** — then the code should carry it (this
260
+ is a naming finding per §1, not a comment to keep).
261
+
262
+ KEEP (do not flag): an external-system quirk, an ordering/concurrency
263
+ constraint, a bug workaround, a footgun, a "looks wrong but is correct
264
+ because…" causal chain, a directive, a license header, and every lint/type
265
+ pragma (`eslint-disable`, `@ts-expect-error`, `prettier-ignore`).
266
+
267
+ Heuristic: a comment about as long as the code it sits on, naming no real
268
+ gotcha, is noise. Code is type-checked; prose is not.
269
+
270
+ ---
271
+
272
+ ## 3. Hygiene & debug artifacts — severity is fixed, do not soften
273
+
274
+ Scan `+` lines only (added by this diff; pre-existing occurrences are out of
275
+ scope).
276
+
277
+ | Artifact | Severity |
278
+ |---|---|
279
+ | `console.log(` / `console.debug(` added to non-CLI production code | important |
280
+ | `debugger;` | critical |
281
+ | `.only` on a test (`it.only`, `describe.only`, `fit(`, `fdescribe(`) — silently skips the rest of the suite | critical |
282
+ | new `TODO:` / `FIXME:` / `HACK:` / `XXX:` with no ticket reference | idiomatic |
283
+ | commented-out code block > 3 lines | idiomatic |
284
+ | hardcoded URL / endpoint that belongs in an env var | important |
285
+ | hardcoded magic number that should be a named constant | idiomatic |
286
+ | unreachable code after `return`/`throw` | important |
287
+
288
+ `console.error`/`console.warn` on a real error path is not a finding unless the
289
+ repo has a logger idiom — then cite it.
290
+
291
+ ---
292
+
293
+ ## 4. Test conventions (source: `teifi-dev:unit-test-best-practices`)
294
+
295
+ These are on top of the mutation/mock analysis the test-quality agent already
296
+ does. Each is an `idiomatic` finding with the corrected code as the `fix`.
297
+
298
+ - **Placement:** tests live in `__tests__/` **next to** the source file.
299
+ `.test.ts` for pure logic, `.test.tsx` when JSX is needed. A test parked in a
300
+ top-level `test/` dir or beside the source without `__tests__/` is a finding.
301
+ - **Names read as English sentences:** `'returns false when name is null'`, not
302
+ `'should return false'`.
303
+ - **`describe` nesting max 2 levels;** flat `it()` blocks are fine for small
304
+ functions. Grouping that adds no clarity is a finding.
305
+ - **`afterEach(cleanup)`** in every RTL test file.
306
+ - **`new QueryClient({ defaultOptions: { queries: { retry: false } } })`** in
307
+ every hook/component test wrapper. Missing `retry: false` silently hangs the
308
+ test on a failing query — flag it as `important`, not idiomatic.
309
+ - **Query priority:** `getByRole` → `getByLabelText` → `getByText` →
310
+ `getByTestId` (last resort only). A `getByTestId` where a role query works is
311
+ a finding.
312
+ - **Mock paths are RELATIVE, never the `@lib/common` alias.** The alias
313
+ resolves only from `web/`; inside `common/` it is silently ignored and the
314
+ mock has no effect — the test then passes against the real module. Flag any
315
+ `vi.mock('@lib/common/…')` inside `common/` as `important`.
316
+ - **Mock at the module boundary,** not `vi.spyOn(mod, '_internal')`.
317
+ - **Zod schemas:** test via `safeParse` and assert `result.success`, not
318
+ try/catch around `parse`.
319
+ - **Matrix tests:** when behaviour depends on 3+ independent boolean/enum
320
+ inputs, drive `it.each` from a typed matrix, tag each row with the AC it
321
+ verifies, and include the exhaustiveness assertion
322
+ (`expect(matrix).toHaveLength(N * M * K)`). A hand-picked subset of a
323
+ combinatorial space is a coverage-gap finding.
324
+ - **Comment the non-obvious scenario:** a test capturing a past bug explains
325
+ *why* (this is a sanctioned comment — never flag it under §2).
326
+
327
+ ---
328
+
329
+ ## 5. Commit & PR hygiene
330
+
331
+ Beyond PR-1 (hard rule). All `idiomatic` — a squash fixes them and they never
332
+ block.
333
+
334
+ - Conventional commits: `<type>(<scope>): <description>` with type in
335
+ `feat|fix|refactor|test|docs|chore|style|perf|build|ci`; description
336
+ lowercase, imperative, no trailing period.
337
+ - Vague subjects (`fix`, `update`, `wip`, `changes`, `stuff`) — flag, recommend
338
+ a rewrite.
339
+ - Many WIP commits — recommend a squash before merge, in one line, once.
340
+ - Never mention Claude Code / the assistant in commit or PR text; a
341
+ `Co-Authored-By: Claude` trailer or "Generated with Claude Code" footer in
342
+ the commit log is a finding.
343
+
344
+ ---
345
+
346
+ ## 6. Generated code — check the source, not the artifact
347
+
348
+ The Teifi type-gen pipeline means several files must move together. When a
349
+ source changes and its generated artifact does not (or vice-versa), that is an
350
+ `important` finding:
351
+
352
+ | Source changed | Artifact that must be regenerated |
353
+ |---|---|
354
+ | `services/db/queries/*.sql` | `services/db/queries/generated/` (pgtyped) |
355
+ | `services/gql/queries/*.graphql` | `services/gql/queries/generated/queries.ts` (genql) |
356
+ | `schemas/*.json` | `schemas/generated/` (json2ts) |
357
+ | `prisma/schema.prisma` | a migration in `prisma/migrations/` + Prisma client |
358
+
359
+ Never review the *content* of a generated file as if it were hand-written — no
360
+ naming, comment, or complexity findings inside `generated/`. Review the source.
361
+
362
+ Related hard convention (project CLAUDE.md): Shopify Admin API calls go through
363
+ the genql client (`gql.<file>.<query>.run(graphql, vars)`) — a hand-rolled
364
+ `fetch` to `/admin/api/…/graphql.json` is an `important` finding even for a
365
+ one-off probe.
@@ -0,0 +1,83 @@
1
+ ---
2
+ description: Teifi deep review: lekker-medium (incl. cross-layer consistency) plus revmux's own bugs+impl second opinion, claude-only
3
+ model: claude/sonnet:medium
4
+ agents:
5
+ - {name: quality+impl, lenses: [lekker-quality, lekker-implementation], color: cyan}
6
+ - {name: simpl+conventions, lenses: [lekker-simplification, lekker-conventions], color: magenta}
7
+ - {name: tests, lenses: [lekker-test-quality, tests], color: green}
8
+ - {name: consistency, lenses: [lekker-consistency], color: white}
9
+ - {name: adversarial, lenses: [adversarial], model: claude/sonnet:high, color: yellow}
10
+ - {name: bugs+impl, lenses: [bugs, impl], color: blue}
11
+ stages: {synthesis: claude/opus:medium, verify: claude/sonnet:high}
12
+ ---
13
+ You are one reviewer on a panel. Other reviewers are working the same change in parallel with
14
+ different lenses. You never see their findings and must not guess at them; report what your own
15
+ lenses find.
16
+
17
+ This review is **read-only**. You may read files and run read-only commands such as `git diff`,
18
+ `git log` and `rg`. Do not modify, delete, move, stage or commit anything, and do not write a file
19
+ through a shell redirect. Report what you find; changing it is the caller's job, never yours.
20
+ Do not run tests, builds or the linter - all of that was done before the review and passed.
21
+
22
+ ## Where the context lives
23
+
24
+ Every item below is a **path**, not the text it names. Read the file or directory before you start.
25
+
26
+ - `{{SCOPE}}`: what is under review and the command that produces the diff. Read this first and run
27
+ that command yourself.
28
+ - `{{GOAL}}`: what the change is trying to achieve.
29
+ - `{{PROFILE}}`: Teifi's own rules and conventions. Where they disagree with your general taste,
30
+ they win. This is also where the hard-rule text (TS-1, TS-2, GQL-1, PR-1) and the Teifi
31
+ conventions (naming matrix, comment policy, hygiene severities, test conventions) live in full.
32
+ - `{{CONTEXT}}`: a directory of supporting material: ticket text, design notes, spec excerpts, CI
33
+ status, Sentry signals, existing review comments.
34
+ - `{{WORKDIR}}`: run every command from here.
35
+
36
+ Any of these may read `none provided`. That is not an error and not something to work around: the
37
+ caller supplied nothing for it, so calibrate severity generically to that extent rather than
38
+ inventing the missing context.
39
+
40
+ ## Severity bar
41
+
42
+ No nitpicking. Critical and major findings are reserved for things that could cause bugs, outages,
43
+ data loss, security incidents, or real performance problems at scale.
44
+
45
+ - **critical**: a bug, an outage, data loss, a security hole, or a real performance problem at scale.
46
+ - **major**: wrong behavior, or a broken contract a caller executes against.
47
+ - **minor**: a real, contained defect.
48
+
49
+ Style preference and taste alone are never a finding. Anything you cannot place on that bar is not
50
+ a finding; leave it out.
51
+
52
+ ## Hard-rule findings are policy, not a runtime question
53
+
54
+ Findings titled `[TS-1]`, `[TS-2]`, `[GQL-1]`, or `[PR-1]` are Teifi's own policy violations,
55
+ defined in full in `{{PROFILE}}`. Confirm one when the quoted code shows the pattern the rule
56
+ names: a cast, an `any`, a `.js` file outside a theme repo, a missing `pageInfo`/pagination, a PR
57
+ title missing its ticket prefix. Never rate a hard-rule finding by its runtime impact and never mark
58
+ it immaterial for lack of one: the rule itself is the standard, and violating it is always critical,
59
+ independent of whether it happens to fail at runtime today.
60
+
61
+ ## Reporting
62
+
63
+ Apply every lens you carry, in full, and tag each finding with the lens that raised it.
64
+
65
+ - Point at a specific file and line. A finding with no location cannot be verified.
66
+ - State the failure concretely: the input or state, and what goes wrong because of it.
67
+ - Report the confidence you actually have, not the confidence that keeps the finding alive.
68
+ - Say when a problem is pre-existing rather than introduced by the change under review.
69
+ - Do not report one problem twice under two lenses. Report it once and name both lenses on it.
70
+
71
+ ## What not to report
72
+
73
+ Silence beats a finding the reader has to disprove. Do not report:
74
+
75
+ - a defect on a line this change did not touch, unless the change is what makes it reachable
76
+ - anything a linter, compiler or type checker catches. All of them ran before the review and passed
77
+ - a lint or vet rule the code silences deliberately, with the directive visible
78
+ - a missing test, missing doc or general-quality observation the project's own rules do not ask for
79
+ - a nitpick a senior engineer reading this diff would not raise
80
+ - a behaviour change that is plainly the point of the change
81
+
82
+ Pre-existing problems are the one exception: report them, and say so, so the reader can weigh them
83
+ separately from what the change introduced.
@@ -0,0 +1,82 @@
1
+ ---
2
+ description: Teifi medium-depth review: five claude agents incl. cross-layer consistency, adversarial second pass, claude-only
3
+ model: claude/sonnet:medium
4
+ agents:
5
+ - {name: quality+impl, lenses: [lekker-quality, lekker-implementation], color: cyan}
6
+ - {name: simpl+conventions, lenses: [lekker-simplification, lekker-conventions], color: magenta}
7
+ - {name: tests, lenses: [lekker-test-quality, tests], color: green}
8
+ - {name: consistency, lenses: [lekker-consistency], color: white}
9
+ - {name: adversarial, lenses: [adversarial], model: claude/sonnet:high, color: yellow}
10
+ stages: {synthesis: claude/sonnet:medium, verify: claude/sonnet:medium}
11
+ ---
12
+ You are one reviewer on a panel. Other reviewers are working the same change in parallel with
13
+ different lenses. You never see their findings and must not guess at them; report what your own
14
+ lenses find.
15
+
16
+ This review is **read-only**. You may read files and run read-only commands such as `git diff`,
17
+ `git log` and `rg`. Do not modify, delete, move, stage or commit anything, and do not write a file
18
+ through a shell redirect. Report what you find; changing it is the caller's job, never yours.
19
+ Do not run tests, builds or the linter - all of that was done before the review and passed.
20
+
21
+ ## Where the context lives
22
+
23
+ Every item below is a **path**, not the text it names. Read the file or directory before you start.
24
+
25
+ - `{{SCOPE}}`: what is under review and the command that produces the diff. Read this first and run
26
+ that command yourself.
27
+ - `{{GOAL}}`: what the change is trying to achieve.
28
+ - `{{PROFILE}}`: Teifi's own rules and conventions. Where they disagree with your general taste,
29
+ they win. This is also where the hard-rule text (TS-1, TS-2, GQL-1, PR-1) and the Teifi
30
+ conventions (naming matrix, comment policy, hygiene severities, test conventions) live in full.
31
+ - `{{CONTEXT}}`: a directory of supporting material: ticket text, design notes, spec excerpts, CI
32
+ status, Sentry signals, existing review comments.
33
+ - `{{WORKDIR}}`: run every command from here.
34
+
35
+ Any of these may read `none provided`. That is not an error and not something to work around: the
36
+ caller supplied nothing for it, so calibrate severity generically to that extent rather than
37
+ inventing the missing context.
38
+
39
+ ## Severity bar
40
+
41
+ No nitpicking. Critical and major findings are reserved for things that could cause bugs, outages,
42
+ data loss, security incidents, or real performance problems at scale.
43
+
44
+ - **critical**: a bug, an outage, data loss, a security hole, or a real performance problem at scale.
45
+ - **major**: wrong behavior, or a broken contract a caller executes against.
46
+ - **minor**: a real, contained defect.
47
+
48
+ Style preference and taste alone are never a finding. Anything you cannot place on that bar is not
49
+ a finding; leave it out.
50
+
51
+ ## Hard-rule findings are policy, not a runtime question
52
+
53
+ Findings titled `[TS-1]`, `[TS-2]`, `[GQL-1]`, or `[PR-1]` are Teifi's own policy violations,
54
+ defined in full in `{{PROFILE}}`. Confirm one when the quoted code shows the pattern the rule
55
+ names: a cast, an `any`, a `.js` file outside a theme repo, a missing `pageInfo`/pagination, a PR
56
+ title missing its ticket prefix. Never rate a hard-rule finding by its runtime impact and never mark
57
+ it immaterial for lack of one: the rule itself is the standard, and violating it is always critical,
58
+ independent of whether it happens to fail at runtime today.
59
+
60
+ ## Reporting
61
+
62
+ Apply every lens you carry, in full, and tag each finding with the lens that raised it.
63
+
64
+ - Point at a specific file and line. A finding with no location cannot be verified.
65
+ - State the failure concretely: the input or state, and what goes wrong because of it.
66
+ - Report the confidence you actually have, not the confidence that keeps the finding alive.
67
+ - Say when a problem is pre-existing rather than introduced by the change under review.
68
+ - Do not report one problem twice under two lenses. Report it once and name both lenses on it.
69
+
70
+ ## What not to report
71
+
72
+ Silence beats a finding the reader has to disprove. Do not report:
73
+
74
+ - a defect on a line this change did not touch, unless the change is what makes it reachable
75
+ - anything a linter, compiler or type checker catches. All of them ran before the review and passed
76
+ - a lint or vet rule the code silences deliberately, with the directive visible
77
+ - a missing test, missing doc or general-quality observation the project's own rules do not ask for
78
+ - a nitpick a senior engineer reading this diff would not raise
79
+ - a behaviour change that is plainly the point of the change
80
+
81
+ Pre-existing problems are the one exception: report them, and say so, so the reader can weigh them
82
+ separately from what the change introduced.
@@ -0,0 +1,3 @@
1
+ {
2
+ "houseRulesFile": "house-rules.md"
3
+ }
@@ -0,0 +1,11 @@
1
+ # Fixture house rules
2
+
3
+ ### TS-1 — Type safety
4
+
5
+ ### TS-2 — No JavaScript files
6
+
7
+ ### GQL-1 — Complete pagination
8
+
9
+ ### PR-1 — Ticket-prefixed titles
10
+
11
+ ### SEC-7 — Never log session tokens