claude-toolkit 0.10.0 → 0.15.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 (40) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +2 -0
  3. package/core/agents/ct-code-reviewer.md +5 -4
  4. package/core/agents/ct-github-workflow.md +28 -15
  5. package/core/commands/ct/code-quality.md +22 -2
  6. package/core/commands/ct/onboard.md +8 -3
  7. package/core/commands/ct/pr-review.md +22 -88
  8. package/core/commands/ct/pr-summary.md +6 -3
  9. package/core/commands/ct/ticket.md +20 -3
  10. package/core/hooks/{skill-eval.js → skill-eval.cjs} +103 -41
  11. package/core/hooks/skill-rules.schema.json +4 -0
  12. package/core/skills/ct-code-style/SKILL.md +134 -0
  13. package/core/skills/ct-systematic-debugging/SKILL.md +1 -1
  14. package/core/skills/ct-testing-patterns/SKILL.md +5 -7
  15. package/core/skills/ct-typescript-conventions/SKILL.md +15 -11
  16. package/core/skills/ct-verification-before-completion/SKILL.md +2 -1
  17. package/docs/README.md +2 -0
  18. package/docs/commands/code-quality.md +2 -8
  19. package/docs/commands/onboard.md +2 -11
  20. package/docs/commands/pr-review.md +2 -13
  21. package/docs/commands/pr-summary.md +2 -2
  22. package/docs/commands/proto-check.md +4 -4
  23. package/docs/commands/ticket.md +2 -2
  24. package/docs/skills/code-style.md +26 -0
  25. package/docs/skills/systematic-debugging.md +1 -1
  26. package/docs/skills/testing-patterns.md +78 -56
  27. package/docs/skills/typescript-conventions.md +23 -10
  28. package/docs/skills/verification-before-completion.md +1 -1
  29. package/docs/stacks/esnext-idioms.md +25 -0
  30. package/package.json +2 -1
  31. package/src/detect.ts +74 -0
  32. package/src/generator.ts +19 -2
  33. package/src/types.ts +1 -0
  34. package/stacks/esnext/skills/ct-esnext-idioms/SKILL.md +130 -0
  35. package/stacks/esnext/stack.json +37 -0
  36. package/{core/commands/ct → stacks/protobuf/commands}/proto-check.md +11 -2
  37. package/stacks/solidjs/skills/ct-solidjs-patterns/SKILL.md +1 -1
  38. package/templates/configs/biome.base.json +8 -1
  39. package/templates/skill-rules.base.json +18 -23
  40. package/core/hooks/skill-eval.sh +0 -35
@@ -17,6 +17,7 @@
17
17
  "config": {
18
18
  "type": "object",
19
19
  "description": "Global configuration options",
20
+ "additionalProperties": false,
20
21
  "required": ["minConfidenceScore", "showMatchReasons", "maxSkillsToShow"],
21
22
  "properties": {
22
23
  "minConfidenceScore": {
@@ -39,6 +40,7 @@
39
40
  "scoring": {
40
41
  "type": "object",
41
42
  "description": "Points assigned to each match type",
43
+ "additionalProperties": false,
42
44
  "required": [
43
45
  "keyword",
44
46
  "keywordPattern",
@@ -68,6 +70,7 @@
68
70
  "description": "Skill definitions and their triggers",
69
71
  "additionalProperties": {
70
72
  "type": "object",
73
+ "additionalProperties": false,
71
74
  "required": ["description", "triggers"],
72
75
  "properties": {
73
76
  "description": { "type": "string" },
@@ -79,6 +82,7 @@
79
82
  },
80
83
  "triggers": {
81
84
  "type": "object",
85
+ "additionalProperties": false,
82
86
  "properties": {
83
87
  "keywords": { "type": "array", "items": { "type": "string" } },
84
88
  "keywordPatterns": {
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: ct-code-style
3
+ description: Code structure & style — guard clauses, lookup tables, destructuring, no classes, no magic values
4
+ ---
5
+
6
+ # Code Style
7
+
8
+ Write small, flat, data-driven functions. These conventions apply to all JS/TS. Stack skills override where noted below.
9
+
10
+ ## Guard clauses / early returns
11
+
12
+ Return early on edge cases; never nest the happy path inside `else`.
13
+
14
+ ```ts
15
+ // Bad — nested, else-heavy
16
+ const price = (user) => {
17
+ if (user) {
18
+ if (user.active) {
19
+ return user.plan.price;
20
+ } else {
21
+ return 0;
22
+ }
23
+ } else {
24
+ return 0;
25
+ }
26
+ };
27
+
28
+ // Good — guard clauses, flat
29
+ const price = (user) => {
30
+ if (!user) return 0;
31
+ if (!user.active) return 0;
32
+ return user.plan.price;
33
+ };
34
+ ```
35
+
36
+ Rule: no `else` / `else if` after a `return`.
37
+
38
+ ## Lookup tables over chained conditionals
39
+
40
+ ```ts
41
+ // Bad
42
+ const getDiscount = (type) => {
43
+ if (type === "student") return 0.1;
44
+ else if (type === "senior") return 0.15;
45
+ else if (type === "employee") return 0.2;
46
+ else return 0;
47
+ };
48
+
49
+ // Good
50
+ const getDiscount = (type) => {
51
+ const discounts = { student: 0.1, senior: 0.15, employee: 0.2 };
52
+ return discounts[type] ?? 0;
53
+ };
54
+ ```
55
+
56
+ For an exhaustive **typed** union where every case must be handled, prefer an exhaustive `switch` — see `ct-typescript-conventions`.
57
+
58
+ ## Ternaries — one level, never nested
59
+
60
+ A ternary must not contain another ternary. Nesting → extract a lookup table or guard clauses.
61
+
62
+ ```ts
63
+ // Bad — nested ternary
64
+ const label = a ? "x" : b ? "y" : "z";
65
+
66
+ // Good — lookup or guards
67
+ const labels = { a: "x", b: "y" };
68
+ const label = labels[key] ?? "z";
69
+ ```
70
+
71
+ ## Destructuring — use it fully
72
+
73
+ ```ts
74
+ const { id, name: title, role = "guest", address: { city } = {}, ...rest } = user;
75
+ // basic rename default nested (+ default) rest
76
+ const greet = ({ name, lang = "en" }) => `${GREETING[lang]} ${name}`; // in params
77
+ ```
78
+
79
+ **⚠️ Never destructure reactive framework props.** In SolidJS, `const { value } = props` breaks reactivity — read `props.value` at the point of use. This carve-out is authoritative: see `ct-solidjs-patterns`. Destructuring is for plain data objects.
80
+
81
+ ## Functions — arrow-only, no `class`, no `this`
82
+
83
+ Model behavior as functions and closures over state. No `class`, no `this` in your own code.
84
+
85
+ ```ts
86
+ // Bad — class + this
87
+ class Counter {
88
+ count = 0;
89
+ inc() {
90
+ this.count++;
91
+ }
92
+ }
93
+
94
+ // Good — closure
95
+ const makeCounter = () => {
96
+ let count = 0;
97
+ return { inc: () => ++count, value: () => count };
98
+ };
99
+ ```
100
+
101
+ **⚠️ Exception:** use `class` / `this` only when a third-party lib or platform leaves no functional alternative — e.g. Cloudflare Durable Objects / `WorkerEntrypoint` (`export class Room extends DurableObject`), or subclassing built-ins (`class AppError extends Error`). See `ct-cloudflare-d1-kv`.
102
+
103
+ ## No magic numbers or strings
104
+
105
+ Name every literal that carries meaning. User-facing text → i18n keys, never inline strings.
106
+
107
+ ```ts
108
+ // Bad
109
+ if (retries > 3) show("Trop de tentatives");
110
+
111
+ // Good
112
+ const MAX_RETRIES = 3;
113
+ if (retries > MAX_RETRIES) show(LL.errors.tooManyRetries()); // i18n key, not a literal
114
+ ```
115
+
116
+ User-facing strings belong in the locale layer — see `ct-i18n-typesafe`.
117
+
118
+ ## Anti-Patterns
119
+
120
+ | Bad | Good |
121
+ | --- | --- |
122
+ | `else` after a `return` | guard clauses |
123
+ | `if/else if` chain on a value | object lookup table + `??` |
124
+ | nested ternary | lookup table or guards |
125
+ | `class` + `this` for your own logic | arrow functions + closures |
126
+ | destructuring SolidJS `props` | read `props.x` (see `ct-solidjs-patterns`) |
127
+ | magic number / inline UI string | named const / i18n key |
128
+
129
+ ## See Also
130
+
131
+ - `ct-typescript-conventions` — exhaustive `switch` for typed unions; typing destructured params.
132
+ - `ct-esnext-idioms` — modern features these patterns pair with (`??`, `Object.groupBy`).
133
+ - `ct-solidjs-patterns` — props are reactive; do not destructure them.
134
+ - `ct-i18n-typesafe` — where user-facing strings live.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ct-systematic-debugging
3
- description: Four-phase methodology for diagnosing and fixing bugs efficiently without guesswork.
3
+ description: Four-phase methodology for diagnosing and fixing bugs efficiently without guesswork. Use when investigating a bug, test failure, or unexpected behavior before proposing a fix
4
4
  ---
5
5
 
6
6
  # Systematic Debugging
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ct-testing-patterns
3
- description: Generic test-driven development practices and patterns applicable to any language or test framework.
3
+ description: Generic test-driven development practices and patterns applicable to any language or test framework. Use when writing tests, setting up a test suite, or deciding what to test at which layer
4
4
  ---
5
5
 
6
6
  # Testing Patterns
@@ -28,6 +28,8 @@ description: Generic test-driven development practices and patterns applicable t
28
28
  | Interaction | ~20% | Component variants, user interactions, accessibility, visual regression |
29
29
  | E2E | ~10% | Critical user journeys, authentication flows, cross-page workflows |
30
30
 
31
+ > **Scope:** This core skill owns the layering _decision_ below, the unit and interaction layers, and the cross-cutting E2E principles. Runner-specific E2E setup and execution live in the stack skills (e.g. `ct-playwright-patterns`) when a matching stack is installed.
32
+
31
33
  ### When to Use Which Layer
32
34
 
33
35
  | Question | Layer |
@@ -103,13 +105,9 @@ bun test path/to/file.test.ts # single file
103
105
 
104
106
  Bun supports `describe`, `it`/`test`, `expect`, lifecycle hooks, and snapshot testing out of the box with no additional dependencies.
105
107
 
106
- ## Test Pyramid
107
-
108
- See 3-Layer Testing Strategy above. Many unit tests (fast, focused) > some interaction tests (component sandbox) > few E2E tests (full flow). Aim for 70/20/10 distribution.
109
-
110
108
  ## Test Speed
111
109
 
112
- Three levers recur across every runner (Vitest, Playwright, Storybook browser mode). Stated once here; each stack skill carries the framework-specific syntax.
110
+ Three levers recur across common runners (Vitest, Playwright, Storybook browser mode). Stated once here; each stack skill carries the framework-specific syntax.
113
111
 
114
112
  - **Parallelism sized to the runner.** Enable file-level parallelism (Vitest `fileParallelism`, Playwright `fullyParallel`), but cap workers to the runner's *real* vCPUs (`"50%"` or a measured count). GitHub standard runners are 2 vCPU (private) / 4 (public); oversubscribing thrashes.
115
113
  - **Shard across CI jobs, then merge the blob reports.** Sharding splits at the *file* level (`--shard=i/n`), so wall-clock is gated by the slowest shard -- balance file sizes. Always emit a blob report per shard (`--reporter=blob`) and merge it (`merge-reports` / `--merge-reports`) in a dependent job, or results and coverage are fragmented and incomplete.
@@ -117,7 +115,7 @@ Three levers recur across every runner (Vitest, Playwright, Storybook browser mo
117
115
 
118
116
  Profile before tuning, and never `sleep` to mask timing -- use the framework's auto-waiting (see Shared Principles).
119
117
 
120
- Per-runner config: `ct-vite-vitest-patterns`, `ct-playwright-patterns`, `ct-storybook-patterns`.
118
+ Per-runner config, if the corresponding stack is installed: `ct-vite-vitest-patterns`, `ct-playwright-patterns`, `ct-storybook-patterns`.
121
119
 
122
120
  ## Anti-Patterns
123
121
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ct-typescript-conventions
3
- description: Strict TypeScript patterns for type safety, readability, and maintainable codebases.
3
+ description: Strict TypeScript patterns for type safety, readability, and maintainable codebases. Use when writing or reviewing TypeScript, adding or tightening types, or deciding between type and interface
4
4
  ---
5
5
 
6
6
  # TypeScript Conventions
@@ -10,7 +10,7 @@ Strict mode enabled. Catch errors at compile time, not runtime.
10
10
  ## Rules
11
11
 
12
12
  - **No `any`** -- Use `unknown` + narrowing, generics, or specific types.
13
- - **`interface` for objects**, `type` for unions/intersections/utilities.
13
+ - **Default to `type`.** Use `interface` only when you need `extends` (object inheritance). `type` aliases have an implicit index signature, so they stay assignable to `Record<string, unknown>`; interfaces do not.
14
14
  - **`as const`** for literal types and readonly tuples.
15
15
  - **Never disable strict checks.** Hard-to-type code = design issue.
16
16
 
@@ -42,19 +42,21 @@ type AsyncState<T> =
42
42
 
43
43
  ## `satisfies` Operator
44
44
 
45
- Validate a value matches a type without widening it. Preserves the narrowest inferred type while ensuring conformance.
45
+ Validate a value conforms to a type while keeping the *narrowest inferred type* per property, instead of widening every property to the target's value type (as an explicit annotation would). Against a union-typed target, the matching literal is preserved.
46
46
 
47
47
  ```typescript
48
- type Route = { path: string; children?: Route[] };
49
-
50
- const routes = {
51
- home: { path: "/" },
52
- user: { path: "/user/:id", children: [{ path: "settings" }] },
53
- } satisfies Record<string, Route>;
54
-
55
- // routes.home.path is still "/" (literal), not string
48
+ const config = {
49
+ mode: "production",
50
+ level: 3,
51
+ } satisfies { mode: "development" | "production"; level: number };
52
+
53
+ // config.mode is the literal "production" (not widened to string),
54
+ // because the target property is a union of literals. A plain
55
+ // annotation `const config: {...}` would widen it to the full union.
56
56
  ```
57
57
 
58
+ Note: `satisfies` does not by itself narrow to literals against a _wide_ target -- e.g. `satisfies Record<string, string>` still infers `string` for each value, and `satisfies Record<string, { path: string }>` leaves each `path` as `string`. Combine with `as const` when you need literals preserved against a `string`-typed target.
59
+
58
60
  ## `const` Type Parameters
59
61
 
60
62
  Infer literal types from arguments without requiring callers to write `as const`:
@@ -68,6 +70,8 @@ function createConfig<const T extends readonly string[]>(names: T): Record<T[num
68
70
  const flags = createConfig(["debug", "verbose"]);
69
71
  ```
70
72
 
73
+ The `as Record<T[number], boolean>` above is the narrow exception to anti-pattern #1: `Object.fromEntries` is typed to return a wide `Record<string, boolean>`, so a localized cast _at a generic helper's return_ -- where the signature already proves the tighter type -- is acceptable. Reach for type guards everywhere else.
74
+
71
75
  ## Template Literal Types
72
76
 
73
77
  Build precise string types from unions:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ct-verification-before-completion
3
- description: Evidence-based completion claims -- never say "done" without proof that the work is correct.
3
+ description: Evidence-based completion claims -- never say "done" without proof that the work is correct. Use when about to claim a task is done, fixed, or passing, or before committing or opening a PR
4
4
  ---
5
5
 
6
6
  # Verification Before Completion
@@ -21,6 +21,7 @@ Before claiming complete, run and show output for each:
21
21
  - Empty inputs (empty string, empty array, null, undefined)
22
22
  - Boundary values (zero, negative, max, off-by-one)
23
23
  - Invalid inputs (wrong types, malformed data, missing fields)
24
+ - Concurrent access (simultaneous requests or operations)
24
25
  - Error paths (network failure, permission denied)
25
26
 
26
27
  Do not assume edge cases work because the happy path works.
package/docs/README.md CHANGED
@@ -16,6 +16,7 @@ Skills that are always included regardless of stack configuration.
16
16
  | [ct-testing-patterns](skills/testing-patterns.md) | Framework-agnostic TDD practices, mocking strategies, and test organization |
17
17
  | [ct-typescript-conventions](skills/typescript-conventions.md) | Strict TypeScript patterns for type safety and maintainability |
18
18
  | [ct-verification-before-completion](skills/verification-before-completion.md) | Evidence-based completion claims with structured verification checklist |
19
+ | [ct-code-style](skills/code-style.md) | Code structure & style: guard clauses, lookup tables, no magic values |
19
20
 
20
21
  ## Commands
21
22
 
@@ -55,3 +56,4 @@ Stack-specific skills activated based on your `claude-toolkit.config.ts` configu
55
56
  | [ct-playwright-patterns](stacks/playwright-patterns.md) | `playwright` | E2E testing with Page Objects, fixtures, auth, network mocking, CI/CD |
56
57
  | [ct-storybook-patterns](stacks/storybook-patterns.md) | `storybook` | Interaction testing, CSF 3, play functions, a11y, visual regression |
57
58
  | [ct-capacitor-ota](stacks/capacitor-ota.md) | `capacitor` | Capacitor 8 native runtime and Capgo OTA live updates, channels, encryption |
59
+ | [ct-esnext-idioms](stacks/esnext-idioms.md) | `esnext` | Modern ECMAScript runtime idioms: Temporal, iterator helpers, using, structuredClone |
@@ -1,4 +1,4 @@
1
- # /code-quality
1
+ # /ct:code-quality
2
2
 
3
3
  > Run code quality checks (lint, typecheck, format) on a directory or file.
4
4
 
@@ -9,7 +9,7 @@
9
9
  ## Usage
10
10
 
11
11
  ```bash
12
- /code-quality [path]
12
+ /ct:code-quality [path]
13
13
  ```
14
14
 
15
15
  ## Workflow
@@ -29,12 +29,6 @@ The command produces a structured report with:
29
29
  - **Format Issues** -- table with file and status
30
30
  - **Summary** -- total issues across files with actionable suggestions
31
31
 
32
- ## Best Practices Reference
33
-
34
- | Topic | Guide |
35
- | --- | --- |
36
- | Recommended `tsconfig.json` settings | [TSConfig Cheat Sheet](../best-practices/typescript/tsconfig-cheat-sheet.md) |
37
-
38
32
  ## Notes
39
33
 
40
34
  - Always uses the project's own configuration; does not impose external rules
@@ -1,4 +1,4 @@
1
- # /onboard
1
+ # /ct:onboard
2
2
 
3
3
  > Systematically explore and understand a codebase area, module, or task context.
4
4
 
@@ -9,7 +9,7 @@
9
9
  ## Usage
10
10
 
11
11
  ```bash
12
- /onboard [area]
12
+ /ct:onboard [area]
13
13
  ```
14
14
 
15
15
  If no area is specified, starts from the project root.
@@ -56,15 +56,6 @@ If no area is specified, starts from the project root.
56
56
  - {Things that are unclear or undocumented}
57
57
  ```
58
58
 
59
- ## Best Practices Reference
60
-
61
- Conventions to look for during onboarding:
62
-
63
- | Topic | Guide |
64
- | --- | --- |
65
- | TypeScript conventions and patterns | [TypeScript Best Practices](../best-practices/typescript/README.md) |
66
- | SolidJS conventions and patterns | [SolidJS Best Practices](../best-practices/solidjs/README.md) |
67
-
68
59
  ## Notes
69
60
 
70
61
  - Prioritizes understanding over completeness -- deeply understand 5 key files rather than skim 50
@@ -1,4 +1,4 @@
1
- # /pr-review
1
+ # /ct:pr-review
2
2
 
3
3
  > Perform a checklist-based code review on the current PR or a specified PR number.
4
4
 
@@ -9,7 +9,7 @@
9
9
  ## Usage
10
10
 
11
11
  ```bash
12
- /pr-review [pr-number]
12
+ /ct:pr-review [pr-number]
13
13
  ```
14
14
 
15
15
  If no PR number is provided, diffs the current branch against the base branch.
@@ -83,17 +83,6 @@ The command evaluates all changed files against these criteria:
83
83
  ### Summary
84
84
  ```
85
85
 
86
- ## Best Practices Reference
87
-
88
- Review criteria informed by these guides:
89
-
90
- | Review Area | Guide |
91
- | --- | --- |
92
- | Type safety: `any` usage, unsafe casts | [any & unknown](../best-practices/typescript/any-and-unknown.md) |
93
- | State modeling with unions | [Discriminated Unions](../best-practices/typescript/discriminated-unions.md) |
94
- | SolidJS-specific issues (props, reactivity) | [SolidJS Anti-Patterns](../best-practices/solidjs/anti-patterns.md) |
95
- | Performance: re-renders, reactivity mistakes | [SolidJS Performance](../best-practices/solidjs/performance.md) |
96
-
97
86
  ## Notes
98
87
 
99
88
  - References specific file names and line numbers
@@ -1,4 +1,4 @@
1
- # /pr-summary
1
+ # /ct:pr-summary
2
2
 
3
3
  > Generate a structured pull request summary from the current branch.
4
4
 
@@ -9,7 +9,7 @@
9
9
  ## Usage
10
10
 
11
11
  ```
12
- /pr-summary
12
+ /ct:pr-summary
13
13
  ```
14
14
 
15
15
  ## Workflow
@@ -1,15 +1,15 @@
1
- # /proto-check
1
+ # /ct:proto-check
2
2
 
3
3
  > Validate protobuf definitions for correctness, lint compliance, and backward compatibility.
4
4
 
5
5
  **Type:** Command (slash command)
6
- **Source:** [`core/commands/ct/proto-check.md`](../core/commands/ct/proto-check.md)
7
- **Allowed Tools:** Bash, Read, Glob, Grep
6
+ **Source:** [`stacks/protobuf/commands/proto-check.md`](../stacks/protobuf/commands/proto-check.md) (installed only with the protobuf stack)
7
+ **Allowed Tools:** Bash (scoped to `buf`/`protoc` and build commands), Read, Glob, Grep
8
8
 
9
9
  ## Usage
10
10
 
11
11
  ```
12
- /proto-check
12
+ /ct:proto-check
13
13
  ```
14
14
 
15
15
  ## Workflow
@@ -1,4 +1,4 @@
1
- # /ticket
1
+ # /ct:ticket
2
2
 
3
3
  > Work end-to-end on a ticket or issue: understand, explore, plan, implement, deliver.
4
4
 
@@ -9,7 +9,7 @@
9
9
  ## Usage
10
10
 
11
11
  ```
12
- /ticket [issue-number-or-description]
12
+ /ct:ticket [issue-number-or-description]
13
13
  ```
14
14
 
15
15
  ## Phases
@@ -0,0 +1,26 @@
1
+ # Code Style
2
+
3
+ > Code structure & style: guard clauses, lookup tables, destructuring, no classes, no magic values.
4
+
5
+ **Type:** Core Skill (always included)
6
+ **Source:** [`core/skills/ct-code-style/SKILL.md`](../../core/skills/ct-code-style/SKILL.md)
7
+
8
+ ## Overview
9
+
10
+ Universal, target-independent conventions for writing small, flat, data-driven functions. Always active — no stack required. It complements `ct-typescript-conventions` (types) and `ct-esnext-idioms` (modern features). Stack skills win where they overlap.
11
+
12
+ ## Rules
13
+
14
+ - **Guard clauses / early returns** — no `else`/`else if` after a `return`.
15
+ - **Lookup tables** over `if/else if` chains keyed on a value (`discounts[type] ?? 0`).
16
+ - **Ternaries** — one level, never nested.
17
+ - **Full ES6 destructuring** — basic, renaming, defaults, nested, rest, in parameters.
18
+ - **Arrow-only, no `class`, no `this`** — model behavior as functions + closures.
19
+ - **No magic numbers/strings** — named constants; user-facing text → i18n keys.
20
+
21
+ ## Carve-outs (stack skills win)
22
+
23
+ - **SolidJS props:** never destructure reactive `props` — it breaks reactivity. See [`ct-solidjs-patterns`](../best-practices/solidjs/props-patterns.md).
24
+ - **Platform classes:** `class`/`this` only where a third-party lib/platform requires it (Cloudflare Durable Objects, `class X extends Error`).
25
+
26
+ Three of these rules are additionally enforced by Biome in the scaffolded `biome.json` (`noUselessElse`, `noNestedTernary`, `useArrowFunction`). "No magic numbers" stays guidance-only — it is too noisy to enforce mechanically.
@@ -1,6 +1,6 @@
1
1
  # Systematic Debugging
2
2
 
3
- > Four-phase methodology for diagnosing and fixing bugs efficiently without guesswork.
3
+ > Four-phase methodology for diagnosing and fixing bugs efficiently without guesswork. Use when investigating a bug, test failure, or unexpected behavior before proposing a fix
4
4
 
5
5
  **Type:** Core Skill (always included)
6
6
  **Source:** [`core/skills/ct-systematic-debugging/SKILL.md`](../core/skills/ct-systematic-debugging/SKILL.md)