@olegkoval/agent-skills 1.94.0 → 1.94.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/agents/conventions.md +1 -1
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/agents/implementation.md +5 -12
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/agents/prover.md +1 -1
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/agents/quality.md +2 -12
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/agents/triage-logic.md +2 -2
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/agents/triage-quality.md +5 -12
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/agents/verifier.md +2 -6
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/output-format.md +2 -2
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-consistency.md +1 -1
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-conventions.md +3 -5
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-implementation.md +13 -28
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-quality.md +3 -13
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-test-quality.md +2 -15
- package/adapters/claude/olko-github-pr/skills/lekker-review/references/revmux/profile.md +17 -196
- 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/agents/conventions.md +1 -1
- package/plugins/olko-github-pr/skills/lekker-review/references/agents/implementation.md +5 -12
- package/plugins/olko-github-pr/skills/lekker-review/references/agents/prover.md +1 -1
- package/plugins/olko-github-pr/skills/lekker-review/references/agents/quality.md +2 -12
- package/plugins/olko-github-pr/skills/lekker-review/references/agents/triage-logic.md +2 -2
- package/plugins/olko-github-pr/skills/lekker-review/references/agents/triage-quality.md +5 -12
- package/plugins/olko-github-pr/skills/lekker-review/references/agents/verifier.md +2 -6
- package/plugins/olko-github-pr/skills/lekker-review/references/output-format.md +2 -2
- package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-consistency.md +1 -1
- package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-conventions.md +3 -5
- package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-implementation.md +13 -28
- package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-quality.md +3 -13
- package/plugins/olko-github-pr/skills/lekker-review/references/revmux/lenses/lekker-test-quality.md +2 -15
- package/plugins/olko-github-pr/skills/lekker-review/references/revmux/profile.md +17 -196
- 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
package/adapters/claude/olko-github-pr/skills/lekker-review/references/agents/conventions.md
CHANGED
|
@@ -16,7 +16,7 @@ section):
|
|
|
16
16
|
* A hand-written interface/type that duplicates an existing Zod schema:
|
|
17
17
|
should be `z.infer<typeof zSchema>` so the schema stays the single source
|
|
18
18
|
of truth. (Grep for a matching z-schema in the same feature folder.)
|
|
19
|
-
* Raw `string` used for
|
|
19
|
+
* Raw `string` used for an external identifier or entity ID where a branded
|
|
20
20
|
`ID<'Customer'>` (or similar) type exists and is used elsewhere.
|
|
21
21
|
* A union typed as `as readonly string[]` / a hand-rolled `is...` guard where
|
|
22
22
|
a `z.enum([...])` + `z.infer` would give validation, narrowing, and the
|
package/adapters/claude/olko-github-pr/skills/lekker-review/references/agents/implementation.md
CHANGED
|
@@ -46,12 +46,12 @@ Axes to cover:
|
|
|
46
46
|
Use title "Fix addresses the symptom", name the root cause and where it still
|
|
47
47
|
lives, and point `fix` at the producing code. Quiet when the root cause is
|
|
48
48
|
fixed, the mitigation fully resolves the defect, or the PR is not a bug fix.
|
|
49
|
-
- Integration Contracts:
|
|
49
|
+
- Integration Contracts: unsupported external API assumptions, webhook
|
|
50
50
|
idempotency, external API pagination not handled.
|
|
51
51
|
- Rollout safety (external writes): when the diff changes what is WRITTEN to
|
|
52
52
|
another system (an API payload, field mapping, or a DB write into a system
|
|
53
53
|
this service does not own), state whether the PR has a feature flag
|
|
54
|
-
(
|
|
54
|
+
(a guard around the new write) or a
|
|
55
55
|
documented revert plan (PR body or code comment). Look in the diff and in the
|
|
56
56
|
PR body in CONTEXT_FILE. When WORKTREE_PATH is available, trace the changed
|
|
57
57
|
write through unchanged callers and flag guards before deciding either is
|
|
@@ -89,16 +89,9 @@ Do not report a stateful/integration finding without this boundary object. If
|
|
|
89
89
|
the production entry point or downstream consumer cannot be identified, mark
|
|
90
90
|
the claim as unverified rather than inferring behavior from a helper alone.
|
|
91
91
|
|
|
92
|
-
GraphQL pagination
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
(b) Check that all pages are fetched (a loop or recursion using endCursor): a single-page fetch is a bug, Critical.
|
|
96
|
-
(c) Check the page size: must be 250 (Shopify max). If any other size is used without a code comment explaining why, flag as Important.
|
|
97
|
-
Set `rule: "GQL-1"` on any Critical finding raised under this axis.
|
|
98
|
-
|
|
99
|
-
Setting rule tags the finding as a house hard rule: it keeps its Critical
|
|
100
|
-
severity only after rule-specific validation and skips runtime challenges. Only set it for a genuine GQL-1
|
|
101
|
-
violation: never to shield an ordinary finding from verification.
|
|
92
|
+
- GraphQL pagination: when the consumer requires a complete result, verify that
|
|
93
|
+
the query exposes continuation metadata and the caller follows it. Check
|
|
94
|
+
page-size limits against the target API's contract.
|
|
102
95
|
|
|
103
96
|
CI_STATUS: read key "ciStatus" from the JSON file CONTEXT_FILE.
|
|
104
97
|
SENTRY_SIGNALS: read key "sentrySignals" from CONTEXT_FILE.
|
|
@@ -40,7 +40,7 @@ context in `DIFF_FILE`. Return `attempted: false, proven: false,
|
|
|
40
40
|
outcome: "not_attempted"` with an honest one-sentence `reason` when any of these
|
|
41
41
|
hold:
|
|
42
42
|
|
|
43
|
-
- The failure path requires live IO (
|
|
43
|
+
- The failure path requires live IO (an external API, a real DB, the
|
|
44
44
|
network) and the repo has no test infra to fake it cheaply.
|
|
45
45
|
- The buggy logic is not importable/reachable from a test without large
|
|
46
46
|
scaffolding (deep framework wiring, a webhook server bootstrap).
|
|
@@ -13,7 +13,7 @@ Axes to cover:
|
|
|
13
13
|
- Error Handling: unhandled promise rejections, empty catch blocks, missing
|
|
14
14
|
retries on transient failures, no dead-letter for failed jobs.
|
|
15
15
|
- Schema/Migration: NOT NULL without default, rename without two-step,
|
|
16
|
-
|
|
16
|
+
stale generated database bindings.
|
|
17
17
|
- Naming/Typos: wrong casing convention, mixed conventions in same scope,
|
|
18
18
|
misspelled identifiers (these are bugs-in-waiting).
|
|
19
19
|
- Derived-value consistency: when the diff introduces a transform of some input
|
|
@@ -28,14 +28,6 @@ Axes to cover:
|
|
|
28
28
|
```
|
|
29
29
|
- Env vars: dead vars, renamed without migration, wrong fallback operator
|
|
30
30
|
(?? vs ||), type mismatch, leaked in logs.
|
|
31
|
-
- TypeScript type safety (TS-1): flag every type cast (`as X`, `<X>expr`)
|
|
32
|
-
and every use of `any`. Test files: only flag blatantly omitted types
|
|
33
|
-
(e.g. `any[]` on a clearly-typed list). All others: Critical. Quote the
|
|
34
|
-
cast, explain the correct type, show the fix. Ask if they're Harry Potter.
|
|
35
|
-
Set `rule: "TS-1"` on the finding.
|
|
36
|
-
- No JavaScript files (TS-2): if the diff adds any `.js` file to a non-Liquid
|
|
37
|
-
theme repo, flag as Critical: must be `.ts`. Set `rule: "TS-2"` on the
|
|
38
|
-
finding.
|
|
39
31
|
- Dependency changes. Skip this axis entirely unless the diff touches
|
|
40
32
|
`package.json`, a lockfile, or a vendored dependency. Where it applies:
|
|
41
33
|
(a) A version bump is a behaviour change nobody in this PR wrote. If neither
|
|
@@ -55,9 +47,7 @@ Axes to cover:
|
|
|
55
47
|
Raise NO naming, comment, complexity, or hard-rule finding inside a lockfile
|
|
56
48
|
or a `node_modules` path.
|
|
57
49
|
|
|
58
|
-
|
|
59
|
-
severity only after rule-specific validation and skips runtime challenges. Only set it for a genuine
|
|
60
|
-
TS-1/TS-2 violation: never to shield an ordinary finding from verification.
|
|
50
|
+
Set `rule` to the ID of a configured hard rule only when the diff demonstrates a violation.
|
|
61
51
|
|
|
62
52
|
CI_STATUS: read key "ciStatus" from the JSON file CONTEXT_FILE.
|
|
63
53
|
Note: if CI_STATUS shows a failing build or test check, report it as a
|
package/adapters/claude/olko-github-pr/skills/lekker-review/references/agents/triage-logic.md
CHANGED
|
@@ -9,12 +9,12 @@ Axes to cover (Critical/Important only):
|
|
|
9
9
|
- Business Logic / AC coverage: for each AC below, mark ✅ met / ⚠️ partial / ❌ missing
|
|
10
10
|
AC_LIST: read key "acList" from CONTEXT_FILE.
|
|
11
11
|
- Scalability: N+1 queries, missing pagination, unbounded collections, missing rate-limit
|
|
12
|
-
- Integration Contracts:
|
|
12
|
+
- Integration Contracts: external API contract violations, webhook idempotency not handled
|
|
13
13
|
- Correctness: off-by-one, wrong operator, missing null guard
|
|
14
14
|
- Rollout safety (external writes): when the diff changes what is WRITTEN to
|
|
15
15
|
another system (an API payload, field mapping, or a DB write into a system
|
|
16
16
|
this service does not own), state whether the PR has a feature flag
|
|
17
|
-
(
|
|
17
|
+
(a guard around the new write) or a
|
|
18
18
|
documented revert plan (PR body or code comment). Look in the diff and in the
|
|
19
19
|
PR body in CONTEXT_FILE. When WORKTREE_PATH is available, trace the changed
|
|
20
20
|
write through unchanged callers and flag guards before deciding either is
|
package/adapters/claude/olko-github-pr/skills/lekker-review/references/agents/triage-quality.md
CHANGED
|
@@ -9,20 +9,13 @@ Axes to cover (Critical/Important only):
|
|
|
9
9
|
- Security: auth bypass, injection, missing permission checks, secrets in logs
|
|
10
10
|
- Data Integrity: missing transactions, silent data loss, partial-failure no rollback
|
|
11
11
|
- Error Handling: unhandled rejections, empty catch blocks, missing retries
|
|
12
|
-
- Schema/Migration: NOT NULL without default,
|
|
12
|
+
- Schema/Migration: NOT NULL without default, stale generated database bindings
|
|
13
13
|
- Env vars: dead vars, leaked in logs
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
set `rule: "TS-2"`
|
|
18
|
-
- GraphQL pagination (GQL-1): nodes connection without pageInfo, or missing
|
|
19
|
-
multi-page fetch, or page size != 250 without comment: Critical/Important,
|
|
20
|
-
set `rule: "GQL-1"` when Critical
|
|
14
|
+
- GraphQL pagination: when the consumer requires a complete result, verify that
|
|
15
|
+
the query exposes continuation metadata and the caller follows it. Check
|
|
16
|
+
page-size limits against the target API's contract.
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
severity only after rule-specific validation and skips runtime challenges. Only set it for a genuine
|
|
24
|
-
TS-1/TS-2/GQL-1 violation: never to shield an ordinary finding from
|
|
25
|
-
verification.
|
|
18
|
+
Set `rule` to the ID of a configured hard rule only when the diff demonstrates a violation.
|
|
26
19
|
|
|
27
20
|
CI_STATUS: read key "ciStatus" from the JSON file CONTEXT_FILE.
|
|
28
21
|
If CI_STATUS shows failing build/test: report it as Critical.
|
|
@@ -64,11 +64,7 @@ For all other non-empty `rule` tags, run exactly two checks:
|
|
|
64
64
|
grep "^+" "$DIFF_FILE" | grep "<snippet>"
|
|
65
65
|
```
|
|
66
66
|
2. **Rule applicability**: read the exact `HOUSE_RULES_FILE` path from the task
|
|
67
|
-
message, then confirm the code really violates the rule as written
|
|
68
|
-
e.g. an `as const` is not a type cast in
|
|
69
|
-
the TS-1 sense; a `nodes` query that legitimately fetches a single known
|
|
70
|
-
node with a documented comment may satisfy GQL-1; a `.js` file inside a
|
|
71
|
-
Liquid theme repo is exempt from TS-2.
|
|
67
|
+
message, then confirm the code really violates the rule as written in the configured house rules, including any stated exception.
|
|
72
68
|
|
|
73
69
|
Outcome: both checks pass -> `confirmed` at Critical, with `reasoning` naming
|
|
74
70
|
the rule and quoting the violating snippet. Either check fails -> `dropped`,
|
|
@@ -297,7 +293,7 @@ Critical finding
|
|
|
297
293
|
Common failure modes here:
|
|
298
294
|
- Assuming how a `your org's shared internal` package behaves without reading the source
|
|
299
295
|
- Assuming the DB schema based on the model name rather than the Prisma schema
|
|
300
|
-
- Assuming
|
|
296
|
+
- Assuming an external API’s behavior from memory rather than the docs
|
|
301
297
|
- Assuming a variable is always truthy/falsy without checking where it is set
|
|
302
298
|
|
|
303
299
|
If any assumption is unverified -> resolve it now (read the source, check the
|
|
@@ -61,9 +61,9 @@ Cover, in roughly this order:
|
|
|
61
61
|
- **The problem / goal: why this PR exists.** What was broken, missing, or
|
|
62
62
|
needed? Pull this from the Linear ticket (the AC_LIST and ticket summary),
|
|
63
63
|
not just the diff. State the user-facing or business outcome the change is
|
|
64
|
-
reaching for ("
|
|
64
|
+
reaching for ("The integration can sync contact records automatically instead
|
|
65
65
|
of hand-keying them", "unblocks the PUT/update flow that depends on the
|
|
66
|
-
|
|
66
|
+
required metadata being populated").
|
|
67
67
|
- **What it does: the mechanism, in plain terms.** The shape of the solution:
|
|
68
68
|
the key entry points, the data flow, the gating/safety mechanisms, and how the
|
|
69
69
|
pieces fit. Name the design choices and *why each one was made*: kill switch
|
|
@@ -17,7 +17,7 @@ exclude, retry/fail) is made in two code paths that can both run for the same
|
|
|
17
17
|
input. The usual shapes:
|
|
18
18
|
|
|
19
19
|
- a client-side guard and the server-side validator behind it (a checkout UI
|
|
20
|
-
extension and the
|
|
20
|
+
extension and the downstream handler, a form check and the API handler);
|
|
21
21
|
- a UI filter and the query that feeds it;
|
|
22
22
|
- a webhook handler and the cron reconciler that backfills the same state;
|
|
23
23
|
- a feature flag read in two clients that must agree on the same gate;
|
|
@@ -32,15 +32,13 @@ Axes to cover:
|
|
|
32
32
|
- Generated code (org-conventions §6): a changed `.sql` / `.graphql` /
|
|
33
33
|
`.json` schema / `prisma/schema.prisma` whose generated artifact is absent
|
|
34
34
|
from the diff (or the reverse) - major. Raise NO naming, comment, or
|
|
35
|
-
complexity finding inside a `generated/` directory.
|
|
36
|
-
|
|
37
|
-
- Commits (org-conventions §5): non-conventional or vague commit subjects, and
|
|
38
|
-
any Claude Code / assistant mention in the commit or PR text.
|
|
35
|
+
complexity finding inside a `generated/` directory.
|
|
36
|
+
- Commits: apply the conventions documented in the project profile.
|
|
39
37
|
- Type-system idioms:
|
|
40
38
|
* A hand-written interface/type that duplicates an existing Zod schema -
|
|
41
39
|
should be `z.infer<typeof zSchema>` so the schema stays the single source
|
|
42
40
|
of truth. (Grep for a matching z-schema in the same feature folder.)
|
|
43
|
-
* Raw `string` used for
|
|
41
|
+
* Raw `string` used for an external identifier or entity ID where a branded
|
|
44
42
|
`ID<'Customer'>` (or similar) type exists and is used elsewhere.
|
|
45
43
|
* A union typed as `as readonly string[]` / a hand-rolled `is...` guard where
|
|
46
44
|
a `z.enum([...])` + `z.infer` would give validation, narrowing, and the
|
|
@@ -41,36 +41,21 @@ Axes to cover:
|
|
|
41
41
|
missing DB indexes for new query patterns.
|
|
42
42
|
- Time/Space Complexity: O(n²) where linear exists, large payloads in memory,
|
|
43
43
|
sort/dedup on large arrays that could be done at DB level.
|
|
44
|
-
- Integration Contracts:
|
|
44
|
+
- Integration Contracts: unsupported external API assumptions, webhook
|
|
45
45
|
idempotency, external API pagination not handled.
|
|
46
|
-
- GraphQL pagination
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
finding. Where it does apply, ask whether the change should ship behind a flag:
|
|
57
|
-
(a) a client should validate it before everyone sees it; (b) it changes data
|
|
58
|
-
shape or what gets written; (c) it touches orders, money, or fulfilment; (d) it
|
|
59
|
-
cannot be verified without real client data or volume. Do NOT raise it for pure
|
|
60
|
-
UI/copy with no data change, a bug fix that is strictly better and obviously
|
|
61
|
-
correct, internal/admin-only surfaces, or work fully covered by tests and
|
|
62
|
-
verifiable in staging. Tie-breaker: if you would not be comfortable fixing it
|
|
63
|
-
forward at 2am, it needs a flag. Name which of (a)-(d) applies.
|
|
64
|
-
Severity: major at most, usually minor - this is a rollout judgement call, not
|
|
65
|
-
a defect. NEVER title this with a bracketed hard-rule tag (that would force
|
|
66
|
-
critical and imply a policy violation). Never invent a concrete flag key as
|
|
67
|
-
though it exists: flag keys must be confirmed against Reflag, so say a flag is
|
|
68
|
-
needed without naming one.
|
|
69
|
-
Also raise as a structural concern (severity major) when a diff BOTH adds a
|
|
70
|
-
column/table AND changes what is read or written - the SOP requires splitting
|
|
71
|
-
that into expand / migrate / read-switch / contract PRs. Name the split.
|
|
46
|
+
- GraphQL pagination: when the consumer requires a complete result, verify that
|
|
47
|
+
the query exposes continuation metadata and the caller follows it. Check
|
|
48
|
+
page-size limits against the target API's contract.
|
|
49
|
+
- Feature flags: when the repository has a rollout mechanism and a changed
|
|
50
|
+
path introduces a risky write or changes externally visible behavior, check
|
|
51
|
+
for a guard or a documented rollback plan. Trace the actual write through
|
|
52
|
+
its callers and configuration before reporting an omission. Refer to the
|
|
53
|
+
repository's own guidance for exemptions and avoid proposing invented flag keys.
|
|
54
|
+
Rollout advice on its own is noncritical. Reserve hard-rule tags for proven
|
|
55
|
+
violations of configured project rules.
|
|
72
56
|
|
|
73
|
-
|
|
57
|
+
|
|
58
|
+
Start the finding title with the bracketed rule ID when it violates a configured hard rule in `{{PROFILE}}`.
|
|
74
59
|
|
|
75
60
|
Rules:
|
|
76
61
|
- Every finding must trace to a `+` line in the diff, with one exception: an
|
|
@@ -27,7 +27,7 @@ Axes to cover:
|
|
|
27
27
|
silent AND still escapes. Do not accept "it reports correctly" as covering the
|
|
28
28
|
block; the report and the control flow are separate claims.
|
|
29
29
|
- Schema/Migration: NOT NULL without default, rename without two-step,
|
|
30
|
-
|
|
30
|
+
stale generated database bindings.
|
|
31
31
|
- Naming/Typos: wrong casing convention, mixed conventions in same scope,
|
|
32
32
|
misspelled identifiers (these are bugs-in-waiting).
|
|
33
33
|
- Derived-value consistency: when the diff introduces a transform of some input
|
|
@@ -44,13 +44,6 @@ Axes to cover:
|
|
|
44
44
|
|
|
45
45
|
- Env vars: dead vars, renamed without migration, wrong fallback operator
|
|
46
46
|
(?? vs ||), type mismatch, leaked in logs.
|
|
47
|
-
- TypeScript type safety (TS-1): flag every type cast (`as X`, `<X>expr`)
|
|
48
|
-
and every use of `any`. Test files: only flag blatantly omitted types
|
|
49
|
-
(e.g. `any[]` on a clearly-typed list). All others: critical. Quote the
|
|
50
|
-
cast, explain the correct type, show the fix. Ask if they're Harry Potter.
|
|
51
|
-
Title the finding `[TS-1] ...`.
|
|
52
|
-
- No JavaScript files (TS-2): if the diff adds any `.js` file to a non-Liquid
|
|
53
|
-
theme repo, flag as critical - must be `.ts`. Title the finding `[TS-2] ...`.
|
|
54
47
|
- Dependency changes. Skip this axis entirely unless the diff touches
|
|
55
48
|
`package.json`, a lockfile, or a vendored dependency. Where it applies:
|
|
56
49
|
(a) A version bump is a behaviour change nobody in this PR wrote. If neither
|
|
@@ -65,13 +58,10 @@ Axes to cover:
|
|
|
65
58
|
explanation, is critical: the lockfile is what actually ships.
|
|
66
59
|
(d) A new direct dependency that duplicates something already in the stack is
|
|
67
60
|
major. Name the existing thing that already solves it.
|
|
68
|
-
Raise NO naming, comment, complexity, or
|
|
61
|
+
Raise NO naming, comment, complexity, or project-convention finding inside a lockfile or a
|
|
69
62
|
`node_modules` path.
|
|
70
63
|
|
|
71
|
-
|
|
72
|
-
(read it there before applying either). A finding for one of them MUST have its
|
|
73
|
-
title start with the bracketed tag, e.g. `[TS-1] ...` or `[TS-2] ...`, so the
|
|
74
|
-
caller can recognize it as a policy violation rather than an ordinary finding.
|
|
64
|
+
When the finding violates a configured hard rule in `{{PROFILE}}`, start its title with the bracketed rule ID, such as `[EXAMPLE-1]`.
|
|
75
65
|
|
|
76
66
|
CI status, Sentry signals, and existing reviews may be present in `{{CONTEXT}}` -
|
|
77
67
|
read what is there before forming an opinion, and skip anything that is absent
|
|
@@ -131,21 +131,8 @@ g) Mock smell - test the behavior, not the way it's built
|
|
|
131
131
|
banner that appears only when the fetch rejects). Even then, prefer an
|
|
132
132
|
injected simple fake over a module-level spy, and assert what the user sees.
|
|
133
133
|
|
|
134
|
-
h)
|
|
135
|
-
|
|
136
|
-
the diff: `__tests__/` placement beside the source, `.test.ts` vs
|
|
137
|
-
`.test.tsx`, English-sentence test names, `describe` nesting <= 2,
|
|
138
|
-
`afterEach(cleanup)`, `retry: false` on the test QueryClient (major - its
|
|
139
|
-
absence hangs the suite on a failing query), the getByRole → getByLabelText
|
|
140
|
-
→ getByText → getByTestId priority, module-boundary mocking, `safeParse` for
|
|
141
|
-
Zod schemas, and the typed `it.each` matrix with AC tags plus the
|
|
142
|
-
exhaustiveness assertion whenever behaviour depends on 3+ independent inputs.
|
|
143
|
-
A `vi.mock('@lib/common/…')` inside `common/` is major, not style: the
|
|
144
|
-
alias resolves only from `web/`, so the mock silently does nothing and the
|
|
145
|
-
test passes against the real module. Quote the line, give the relative path
|
|
146
|
-
as the fix.
|
|
147
|
-
A comment explaining WHY a test exists (a captured past bug, a subtle
|
|
148
|
-
contract) is sanctioned - never flag it as over-commenting.
|
|
134
|
+
h) Project test conventions
|
|
135
|
+
Apply the test conventions documented in `{{PROFILE}}` to the changed tests.
|
|
149
136
|
|
|
150
137
|
Report each per-line issue as:
|
|
151
138
|
`test-file:line - <concise description of the gap or weakness>`
|
|
@@ -1,209 +1,30 @@
|
|
|
1
|
-
# Project profile
|
|
1
|
+
# Project review profile
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ID such as `TS-1` so findings can cite it. Where this file disagrees with a
|
|
8
|
-
reviewer's general taste, this file wins.
|
|
3
|
+
Use this profile to give reviewers the repository's review rules and conventions.
|
|
4
|
+
The default profile declares no project-specific requirements. Add explicit
|
|
5
|
+
rules to `references/house-rules.md` and include them here when using revmux.
|
|
6
|
+
Use a stable rule ID so a finding can cite the governing rule and evidence.
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
## 1. Naming
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
Check new names against established names for equivalent concepts in the target repository.
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
same nits come back from the human reviewer.
|
|
12
|
+
## 2. Comments
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
Cite a precedent from the codebase where the row asks for one, and never
|
|
19
|
-
inflate a style deviation into Critical.
|
|
14
|
+
Look for explanations of invariants, workarounds, and surprising constraints.
|
|
20
15
|
|
|
21
|
-
|
|
16
|
+
## 3. Debug artifacts
|
|
22
17
|
|
|
23
|
-
|
|
18
|
+
Flag debug output, breakpoints, and temporary files when the diff would ship them unintentionally.
|
|
24
19
|
|
|
25
|
-
|
|
26
|
-
diff, expensive later - but a rename is still a cost, so leave conforming
|
|
27
|
-
names alone.
|
|
20
|
+
## 4. Tests
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
Apply the target repository's test conventions and check that assertions exercise observable behavior.
|
|
30
23
|
|
|
31
|
-
|
|
32
|
-
|---|---|---|
|
|
33
|
-
| boolean | `is` prefix, no negatives (`has`/`can`/`should` for possession/permission/policy) | `isFrozen` |
|
|
34
|
-
| array | plural noun (value plural, type stays singular) | `variantIds` |
|
|
35
|
-
| keyed lookup | `…ById` suffix | `toneByStatus` |
|
|
36
|
-
| id | `Id` / `Ids` suffix | `shipmentId` |
|
|
37
|
-
| timestamp | `At` suffix | `scheduledAt` |
|
|
38
|
-
| duration | unit suffix | `timeoutMs` |
|
|
39
|
-
| count | `Count` suffix | `lineCount` |
|
|
40
|
-
| casing | camelCase values · PascalCase types/components · `CONSTANT_CASE` constants | |
|
|
24
|
+
## 5. Commits
|
|
41
25
|
|
|
42
|
-
|
|
26
|
+
Apply commit conventions declared by the project or demonstrated by comparable changes.
|
|
43
27
|
|
|
44
|
-
|
|
45
|
-
`build` assembles in memory (pure) · `derive` pure value from existing state ·
|
|
46
|
-
`parse` raw → typed · `format` value → display string · `update` change a
|
|
47
|
-
persisted entity · `validate` returns validity · `assert` throws · `ensure`
|
|
48
|
-
idempotently makes state hold.
|
|
28
|
+
## 6. Generated code
|
|
49
29
|
|
|
50
|
-
|
|
51
|
-
mutates an existing row is a finding (`updateX`).
|
|
52
|
-
|
|
53
|
-
### Effect affixes - put the surprise in the name
|
|
54
|
-
|
|
55
|
-
`…OrThrow` · `…OrDefault` · `upsert` · `…ForUpdate` (row lock) ·
|
|
56
|
-
`…SkipLocked` · `try…` (returns result, doesn't throw) · `with…`
|
|
57
|
-
(acquire→run→release) · `…Sync` · `…Cached` · `unsafe…`.
|
|
58
|
-
|
|
59
|
-
A function that takes a row lock, throws on miss, or returns a cached value
|
|
60
|
-
without saying so in its name is a finding - that surprise is exactly what the
|
|
61
|
-
next caller will miss.
|
|
62
|
-
|
|
63
|
-
### React & types
|
|
64
|
-
|
|
65
|
-
- React: `use` hook · `handle` (impl) / `on` (prop) · `Props` type · `with` HOC
|
|
66
|
-
· components PascalCase and **domain-prefixed when collidable**
|
|
67
|
-
(`AdjustmentStatusBadge`, not `StatusBadge`).
|
|
68
|
-
- Types: `Input` / `Output` · `Result` (ok/err) · `Schema` (Zod) ·
|
|
69
|
-
`Brand<string,'X'>` for ids · PascalCase noun, no `I-` prefix, never
|
|
70
|
-
pluralize a type.
|
|
71
|
-
|
|
72
|
-
### Bare generic nouns
|
|
73
|
-
|
|
74
|
-
`line`, `item`, `node`, `record`, `entry`, `group`, `row`, `value`, `key` are
|
|
75
|
-
findings when the surrounding domain has two or more qualified variants in
|
|
76
|
-
scope (arrival line vs receipt line; source node vs target node). Qualify with
|
|
77
|
-
the domain role - variables, params, fields, type aliases, **type params**
|
|
78
|
-
(`TLine` → `TReceiptLine`), and the functions built on the noun.
|
|
79
|
-
|
|
80
|
-
### NEVER flag a rename at a boundary
|
|
81
|
-
|
|
82
|
-
DB table/column names (and any `Row`/`Dto` mirroring them), GraphQL / oRPC /
|
|
83
|
-
OpenAPI contract fields, enum string values, route strings, wire/JSON keys.
|
|
84
|
-
Something outside the diff reads them. The app-layer alias may be renamed
|
|
85
|
-
(`createdAt @map("created_at")`); the boundary name may not. A "rename this
|
|
86
|
-
column" finding is a false positive - say the boundary name is bad and leave
|
|
87
|
-
it to a human if it matters.
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## 2. Comment policy
|
|
92
|
-
|
|
93
|
-
**Default: a comment should not exist.** It earns its place only by saying
|
|
94
|
-
something the code *cannot*, and then in as few words as possible. Flag each
|
|
95
|
-
offending comment the diff ADDED as its own `idiomatic` finding with the
|
|
96
|
-
deletion as the `fix` - never a vague "too many comments". Pre-existing
|
|
97
|
-
comments are out of scope.
|
|
98
|
-
|
|
99
|
-
Flag a comment that:
|
|
100
|
-
|
|
101
|
-
- restates the next line (`// increment counter` over `counter += 1`);
|
|
102
|
-
- narrates a step or captions a block ("first we fetch, then we map…");
|
|
103
|
-
- **narrates a whole function or type** - JSDoc restating a well-named
|
|
104
|
-
signature, its params, or its return shape. A doc comment earns its place
|
|
105
|
-
only for a non-obvious *contract*;
|
|
106
|
-
- explains obvious syntax or a well-known API;
|
|
107
|
-
- repeats a rationale stated elsewhere in the diff (keep ONE canonical place);
|
|
108
|
-
- is changelog/AI noise - ticket IDs (`PROJ-123`), person names, multi-paragraph
|
|
109
|
-
"why we chose X" essays. A single `@see PROJ-123` JSDoc tag is fine;
|
|
110
|
-
- **references what the reader cannot see** - a removed line or a prior
|
|
111
|
-
approach ("no longer using the old Y"). Source shows what the code *is*;
|
|
112
|
-
- **documents invisible coupling** - "ordered this way because some other code
|
|
113
|
-
does X". The fix is clearer structure, not a comment enshrining it;
|
|
114
|
-
- **says what a name or type could say** - then the code should carry it (this
|
|
115
|
-
is a naming finding per §1, not a comment to keep).
|
|
116
|
-
|
|
117
|
-
KEEP (do not flag): an external-system quirk, an ordering/concurrency
|
|
118
|
-
constraint, a bug workaround, a footgun, a "looks wrong but is correct
|
|
119
|
-
because…" causal chain, a directive, a license header, and every lint/type
|
|
120
|
-
pragma (`eslint-disable`, `@ts-expect-error`, `prettier-ignore`).
|
|
121
|
-
|
|
122
|
-
Heuristic: a comment about as long as the code it sits on, naming no real
|
|
123
|
-
gotcha, is noise. Code is type-checked; prose is not.
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
## 3. Hygiene & debug artifacts - severity is fixed, do not soften
|
|
128
|
-
|
|
129
|
-
Scan `+` lines only (added by this diff; pre-existing occurrences are out of
|
|
130
|
-
scope).
|
|
131
|
-
|
|
132
|
-
| Artifact | Severity |
|
|
133
|
-
|---|---|
|
|
134
|
-
| `console.log(` / `console.debug(` added to non-CLI production code | important |
|
|
135
|
-
| `debugger;` | critical |
|
|
136
|
-
| `.only` on a test (`it.only`, `describe.only`, `fit(`, `fdescribe(`) - silently skips the rest of the suite | critical |
|
|
137
|
-
| new `TODO:` / `FIXME:` / `HACK:` / `XXX:` with no ticket reference | idiomatic |
|
|
138
|
-
| commented-out code block > 3 lines | idiomatic |
|
|
139
|
-
| hardcoded URL / endpoint that belongs in an env var | important |
|
|
140
|
-
| hardcoded magic number that should be a named constant | idiomatic |
|
|
141
|
-
| unreachable code after `return`/`throw` | important |
|
|
142
|
-
|
|
143
|
-
`console.error`/`console.warn` on a real error path is not a finding unless the
|
|
144
|
-
repo has a logger idiom - then cite it.
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## 4. Test conventions
|
|
149
|
-
|
|
150
|
-
These are on top of the mutation/mock analysis the test-quality agent already
|
|
151
|
-
does. Each is an `idiomatic` finding with the corrected code as the `fix`.
|
|
152
|
-
|
|
153
|
-
- **Placement:** tests live in `__tests__/` **next to** the source file.
|
|
154
|
-
`.test.ts` for pure logic, `.test.tsx` when JSX is needed. A test parked in a
|
|
155
|
-
top-level `test/` dir or beside the source without `__tests__/` is a finding.
|
|
156
|
-
- **Names read as English sentences:** `'returns false when name is null'`, not
|
|
157
|
-
`'should return false'`.
|
|
158
|
-
- **`describe` nesting max 2 levels;** flat `it()` blocks are fine for small
|
|
159
|
-
functions. Grouping that adds no clarity is a finding.
|
|
160
|
-
- **`afterEach(cleanup)`** in every RTL test file.
|
|
161
|
-
- **`new QueryClient({ defaultOptions: { queries: { retry: false } } })`** in
|
|
162
|
-
every hook/component test wrapper. Missing `retry: false` silently hangs the
|
|
163
|
-
test on a failing query - flag it as `important`, not idiomatic.
|
|
164
|
-
- **Query priority:** `getByRole` → `getByLabelText` → `getByText` →
|
|
165
|
-
`getByTestId` (last resort only). A `getByTestId` where a role query works is
|
|
166
|
-
a finding.
|
|
167
|
-
- **Mock paths are RELATIVE, never the `@lib/common` alias.** The alias
|
|
168
|
-
resolves only from `web/`; inside `common/` it is silently ignored and the
|
|
169
|
-
mock has no effect - the test then passes against the real module. Flag any
|
|
170
|
-
`vi.mock('@lib/common/…')` inside `common/` as `important`.
|
|
171
|
-
- **Mock at the module boundary,** not `vi.spyOn(mod, '_internal')`.
|
|
172
|
-
- **Zod schemas:** test via `safeParse` and assert `result.success`, not
|
|
173
|
-
try/catch around `parse`.
|
|
174
|
-
- **Matrix tests:** when behaviour depends on 3+ independent boolean/enum
|
|
175
|
-
inputs, drive `it.each` from a typed matrix, tag each row with the AC it
|
|
176
|
-
verifies, and include the exhaustiveness assertion
|
|
177
|
-
(`expect(matrix).toHaveLength(N * M * K)`). A hand-picked subset of a
|
|
178
|
-
combinatorial space is a coverage-gap finding.
|
|
179
|
-
- **Comment the non-obvious scenario:** a test capturing a past bug explains
|
|
180
|
-
*why* (this is a sanctioned comment - never flag it under §2).
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
## 5. Commit & PR hygiene
|
|
185
|
-
|
|
186
|
-
Beyond PR-1 (hard rule). All `idiomatic` - a squash fixes them and they never
|
|
187
|
-
block.
|
|
188
|
-
|
|
189
|
-
- Conventional commits: `<type>(<scope>): <description>` with type in
|
|
190
|
-
`feat|fix|refactor|test|docs|chore|style|perf|build|ci`; description
|
|
191
|
-
lowercase, imperative, no trailing period.
|
|
192
|
-
- Vague subjects (`fix`, `update`, `wip`, `changes`, `stuff`) - flag, recommend
|
|
193
|
-
a rewrite.
|
|
194
|
-
- Many WIP commits - recommend a squash before merge, in one line, once.
|
|
195
|
-
- Never mention Claude Code / the assistant in commit or PR text; a
|
|
196
|
-
`Co-Authored-By: Claude` trailer or "Generated with Claude Code" footer in
|
|
197
|
-
the commit log is a finding.
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
## 6. Generated code - check the source, not the artifact
|
|
202
|
-
|
|
203
|
-
When a source file changes and the artifact generated from it does not (or
|
|
204
|
-
vice versa), that is an `important` finding: for example a changed `.sql`,
|
|
205
|
-
`.graphql`, JSON schema or ORM schema without its regenerated output, or a
|
|
206
|
-
migration missing for a schema change.
|
|
207
|
-
|
|
208
|
-
Never review the *content* of a generated file as if it were hand-written - no
|
|
209
|
-
naming, comment, or complexity findings inside `generated/`. Review the source.
|
|
30
|
+
Check that a source change includes its required generated output. Review the source for quality findings.
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ section):
|
|
|
16
16
|
* A hand-written interface/type that duplicates an existing Zod schema:
|
|
17
17
|
should be `z.infer<typeof zSchema>` so the schema stays the single source
|
|
18
18
|
of truth. (Grep for a matching z-schema in the same feature folder.)
|
|
19
|
-
* Raw `string` used for
|
|
19
|
+
* Raw `string` used for an external identifier or entity ID where a branded
|
|
20
20
|
`ID<'Customer'>` (or similar) type exists and is used elsewhere.
|
|
21
21
|
* A union typed as `as readonly string[]` / a hand-rolled `is...` guard where
|
|
22
22
|
a `z.enum([...])` + `z.infer` would give validation, narrowing, and the
|