claude-toolkit 0.16.0 → 0.17.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 (68) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +54 -13
  3. package/bin/cli.ts +75 -19
  4. package/package.json +6 -7
  5. package/src/generator.ts +64 -26
  6. package/src/refresh-hint.ts +95 -0
  7. package/bin/postinstall.mjs +0 -69
  8. package/docs/README.md +0 -59
  9. package/docs/agents/code-reviewer.md +0 -76
  10. package/docs/agents/github-workflow.md +0 -98
  11. package/docs/best-practices/capacitor/README.md +0 -64
  12. package/docs/best-practices/capacitor/capacitor-8.md +0 -60
  13. package/docs/best-practices/capacitor/capgo-setup.md +0 -151
  14. package/docs/best-practices/capacitor/channels-and-rollouts.md +0 -101
  15. package/docs/best-practices/capacitor/live-updates-ota.md +0 -75
  16. package/docs/best-practices/capacitor/security-encryption.md +0 -68
  17. package/docs/best-practices/solidjs/README.md +0 -43
  18. package/docs/best-practices/solidjs/anti-patterns.md +0 -166
  19. package/docs/best-practices/solidjs/component-patterns.md +0 -131
  20. package/docs/best-practices/solidjs/context-and-global-state.md +0 -131
  21. package/docs/best-practices/solidjs/control-flow.md +0 -124
  22. package/docs/best-practices/solidjs/data-fetching.md +0 -205
  23. package/docs/best-practices/solidjs/effects-and-lifecycle.md +0 -113
  24. package/docs/best-practices/solidjs/performance.md +0 -100
  25. package/docs/best-practices/solidjs/props-patterns.md +0 -100
  26. package/docs/best-practices/solidjs/reactivity-model.md +0 -104
  27. package/docs/best-practices/solidjs/signals-and-state.md +0 -78
  28. package/docs/best-practices/solidjs/stores-and-nested-state.md +0 -111
  29. package/docs/best-practices/solidjs/typescript-integration.md +0 -186
  30. package/docs/best-practices/testing/README.md +0 -84
  31. package/docs/best-practices/testing/playwright-e2e.md +0 -649
  32. package/docs/best-practices/testing/storybook-interaction.md +0 -455
  33. package/docs/best-practices/testing/vitest-unit.md +0 -451
  34. package/docs/best-practices/typescript/README.md +0 -45
  35. package/docs/best-practices/typescript/any-and-unknown.md +0 -73
  36. package/docs/best-practices/typescript/deriving-vs-decoupling.md +0 -83
  37. package/docs/best-practices/typescript/discriminated-unions.md +0 -75
  38. package/docs/best-practices/typescript/enums-alternatives.md +0 -72
  39. package/docs/best-practices/typescript/essential-patterns.md +0 -119
  40. package/docs/best-practices/typescript/generics-patterns.md +0 -105
  41. package/docs/best-practices/typescript/micro-opinions.md +0 -87
  42. package/docs/best-practices/typescript/runtime-validation.md +0 -62
  43. package/docs/best-practices/typescript/satisfies-operator.md +0 -100
  44. package/docs/best-practices/typescript/tsconfig-cheat-sheet.md +0 -160
  45. package/docs/best-practices/typescript/type-organization.md +0 -64
  46. package/docs/best-practices/typescript/type-vs-interface.md +0 -80
  47. package/docs/commands/code-quality.md +0 -36
  48. package/docs/commands/onboard.md +0 -63
  49. package/docs/commands/pr-review.md +0 -91
  50. package/docs/commands/pr-summary.md +0 -50
  51. package/docs/commands/proto-check.md +0 -59
  52. package/docs/commands/ticket.md +0 -56
  53. package/docs/skills/code-style.md +0 -26
  54. package/docs/skills/systematic-debugging.md +0 -70
  55. package/docs/skills/testing-patterns.md +0 -140
  56. package/docs/skills/typescript-conventions.md +0 -283
  57. package/docs/skills/verification-before-completion.md +0 -103
  58. package/docs/stacks/capacitor-ota.md +0 -145
  59. package/docs/stacks/cloudflare-d1-kv.md +0 -144
  60. package/docs/stacks/esnext-idioms.md +0 -25
  61. package/docs/stacks/i18n-typesafe.md +0 -141
  62. package/docs/stacks/playwright-patterns.md +0 -179
  63. package/docs/stacks/protobuf-contracts.md +0 -85
  64. package/docs/stacks/rust-wasm-patterns.md +0 -106
  65. package/docs/stacks/solidjs-patterns.md +0 -110
  66. package/docs/stacks/storybook-patterns.md +0 -177
  67. package/docs/stacks/vanilla-extract-patterns.md +0 -115
  68. package/docs/stacks/vite-vitest-patterns.md +0 -485
@@ -1,160 +0,0 @@
1
- # TSConfig Cheat Sheet
2
-
3
- > Source: [The TSConfig Cheat Sheet](https://www.totaltypescript.com/tsconfig-cheat-sheet) — Matt Pocock
4
-
5
- ## Base Options (Every Project)
6
-
7
- These belong in every `tsconfig.json`:
8
-
9
- ```jsonc
10
- {
11
- "compilerOptions": {
12
- // Smooth over CJS/ESM interop differences
13
- "esModuleInterop": true,
14
-
15
- // Skip type-checking node_modules .d.ts files for performance
16
- "skipLibCheck": true,
17
-
18
- // Stable target — prefer over "esnext"
19
- "target": "es2022",
20
-
21
- // Allow importing .js and .json files
22
- "allowJs": true,
23
- "resolveJsonModule": true,
24
-
25
- // Treat all files as modules (avoids redeclaration errors)
26
- "moduleDetection": "force",
27
-
28
- // Prevent unsafe TS features that break per-file transpilation
29
- "isolatedModules": true,
30
-
31
- // Enforce import type / export type syntax
32
- "verbatimModuleSyntax": true
33
- }
34
- }
35
- ```
36
-
37
- ## Strictness
38
-
39
- Enable all strict checks, plus two extras Matt considers essential:
40
-
41
- ```jsonc
42
- {
43
- "compilerOptions": {
44
- // All strict type-checking options
45
- "strict": true,
46
-
47
- // Force checking array/object index access (prevents undefined bugs)
48
- "noUncheckedIndexedAccess": true,
49
-
50
- // Make the override keyword functional in classes
51
- "noImplicitOverride": true
52
- }
53
- }
54
- ```
55
-
56
- Matt **deliberately excludes** noisier options like `noImplicitReturns`, `noUnusedLocals`, and `noUnusedParameters`. Add them only if your team wants them — they create friction during development.
57
-
58
- ## When TypeScript Transpiles (tsc emits JS)
59
-
60
- ```jsonc
61
- {
62
- "compilerOptions": {
63
- "module": "NodeNext",
64
- "outDir": "dist"
65
- }
66
- }
67
- ```
68
-
69
- ### For Published Libraries
70
-
71
- Add `.d.ts` generation so consumers get autocomplete:
72
-
73
- ```jsonc
74
- {
75
- "compilerOptions": {
76
- "declaration": true
77
- }
78
- }
79
- ```
80
-
81
- ### For Monorepo Packages
82
-
83
- ```jsonc
84
- {
85
- "compilerOptions": {
86
- "composite": true,
87
- "sourceMap": true,
88
- "declarationMap": true
89
- }
90
- }
91
- ```
92
-
93
- ## When TypeScript Does NOT Transpile (Linting Mode)
94
-
95
- When a bundler (Vite, esbuild, etc.) handles transpilation:
96
-
97
- ```jsonc
98
- {
99
- "compilerOptions": {
100
- // Mimic bundler module resolution
101
- "module": "preserve",
102
-
103
- // Don't emit JS files
104
- "noEmit": true
105
- }
106
- }
107
- ```
108
-
109
- ## Environment-Specific `lib`
110
-
111
- **DOM environments** (browsers, SSR with DOM APIs):
112
-
113
- ```jsonc
114
- {
115
- "compilerOptions": {
116
- "lib": ["es2022", "dom", "dom.iterable"]
117
- }
118
- }
119
- ```
120
-
121
- **Non-DOM environments** (Node.js CLIs, serverless, workers):
122
-
123
- ```jsonc
124
- {
125
- "compilerOptions": {
126
- "lib": ["es2022"]
127
- }
128
- }
129
- ```
130
-
131
- ## TypeScript 7 Delta
132
-
133
- > Not from the source cheat sheet — added for TypeScript 7 (GA 2026-07-08, `typescript@7.0.2`). See [ct-typescript-conventions](../../skills/typescript-conventions.md#tsconfigjson-under-ts7) for the full compiler-selection guidance.
134
-
135
- Everything above is TS7-compatible as written, with **two additions** required when the native compiler is in use:
136
-
137
- ```jsonc
138
- {
139
- "compilerOptions": {
140
- // `types` defaults to [] from 6.0 onward. Without this, ambient
141
- // globals (`process`, Bun's APIs) fail TS2591 even when
142
- // @types/node IS installed. Name only packages you actually have —
143
- // a missing one is TS2688.
144
- "types": ["node"],
145
-
146
- // `rootDir` defaults to "./" from 6.0 onward. With sources in src/
147
- // AND an outDir set, emit fails TS5011 — and `--noEmit` will not
148
- // warn you. Without an outDir it does not fire.
149
- "rootDir": "./src"
150
- }
151
- }
152
- ```
153
-
154
- Both defaults changed in **6.0**, not 7.0 — verified identical on `typescript@6.0.3` and `7.0.2`. `rootDir` matters only when the project emits to an `outDir`; `types` matters always.
155
-
156
- `"types": ["*"]` restores the pre-6.0 catch-all behaviour on 6.x and 7.x, but is `TS2688` on 5.x — so it is not a safe value for a config shared across majors.
157
-
158
- TS7 also rejects options this sheet never recommends — `baseUrl`, `outFile`, `downlevelIteration`, `target: "es5"`, `module: "amd" | "umd" | "system"`, and `moduleResolution: "node" | "node10" | "classic"`. `ignoreDeprecations` does not silence them.
159
-
160
- The TypeScript website's [tsconfig reference](https://www.typescriptlang.org/tsconfig/) has not been updated for TS7 and still documents removed options.
@@ -1,64 +0,0 @@
1
- # Type Organization
2
-
3
- > Source: [Where To Put Your Types in Application Code](https://www.totaltypescript.com/where-to-put-your-types-in-application-code) — Matt Pocock
4
-
5
- ## Three Rules
6
-
7
- ### Rule 1: Colocate Single-Use Types
8
-
9
- When a type is used in only one place, put it in the same file where it's used.
10
-
11
- ```typescript
12
- // components/Avatar.tsx
13
- type AvatarProps = {
14
- imageUrl: string;
15
- name: string;
16
- };
17
-
18
- export function Avatar({ imageUrl, name }: AvatarProps) {
19
- // ...
20
- }
21
- ```
22
-
23
- Don't extract single-use types into separate files. It's low-cost to refactor later if the type grows in scope. Inlining is fine for truly single-use types.
24
-
25
- ### Rule 2: Share Types Across Modules
26
-
27
- When a type serves multiple files, move it to a shared `*.types.ts` file at the appropriate level:
28
-
29
- - **App-wide types** → `src/types.ts` or `src/shared.types.ts`
30
- - **Folder-specific types** → `src/features/auth/auth.types.ts`
31
-
32
- This mirrors how you'd handle shared functions — keep them at the narrowest scope that covers all consumers.
33
-
34
- ```
35
- src/
36
- ├── types.ts # App-wide types
37
- ├── features/
38
- │ ├── auth/
39
- │ │ ├── auth.types.ts # Shared within auth feature
40
- │ │ ├── login.tsx
41
- │ │ └── signup.tsx
42
- │ └── billing/
43
- │ ├── billing.types.ts
44
- │ └── invoice.tsx
45
- ```
46
-
47
- ### Rule 3: Monorepo-Level Sharing
48
-
49
- In a monorepo, types used across multiple packages go in a dedicated shared package:
50
-
51
- ```
52
- packages/
53
- ├── types/ # Shared types package
54
- │ └── src/
55
- │ └── index.ts
56
- ├── web-app/
57
- │ └── src/
58
- └── api/
59
- └── src/
60
- ```
61
-
62
- ## Core Principle
63
-
64
- Share types across the **smallest number of modules** that require them. Don't pre-extract types "just in case" — colocate by default and widen scope only when a second consumer appears.
@@ -1,80 +0,0 @@
1
- # Type vs Interface
2
-
3
- > Source: [Type vs Interface: Which Should You Use?](https://www.totaltypescript.com/type-vs-interface-which-should-you-use) — Matt Pocock
4
-
5
- ## The Verdict
6
-
7
- **Default to `type`. Use `interface` only when you need `extends`.**
8
-
9
- This contradicts the official TypeScript team guidance (which defaults to `interface`), but Matt argues the tradeoffs favor `type` for most codebases.
10
-
11
- ## Why Default to `type`
12
-
13
- ### 1. Flexibility
14
-
15
- Type aliases can express unions, mapped types, and conditional types. Interfaces cannot.
16
-
17
- ```typescript
18
- // Only possible with type
19
- type Result = Success | Failure;
20
- type Mapped = { [K in keyof T]: boolean };
21
- type Conditional = T extends string ? "yes" : "no";
22
- ```
23
-
24
- ### 2. Declaration Merging is Dangerous
25
-
26
- If you accidentally declare the same interface name twice in the same scope, TypeScript silently merges them — no error, no warning. You end up with a type that has extra properties you never intended.
27
-
28
- ```typescript
29
- interface User {
30
- name: string;
31
- }
32
-
33
- interface User {
34
- age: number;
35
- }
36
-
37
- // User is now { name: string; age: number } — silently merged
38
- ```
39
-
40
- With `type`, a duplicate name throws a compile error immediately.
41
-
42
- ### 3. Implicit Index Signature
43
-
44
- Type aliases have an implicit index signature, making them assignable to `Record<PropertyKey, unknown>`. Interfaces do not, which causes unexpected errors when passing interface-typed objects to functions expecting `Record` types.
45
-
46
- ## When to Use `interface`
47
-
48
- Use `interface` specifically for **object inheritance** with `extends`:
49
-
50
- ```typescript
51
- interface Animal {
52
- name: string;
53
- }
54
-
55
- interface Dog extends Animal {
56
- breed: string;
57
- }
58
- ```
59
-
60
- **Why?** `extends` makes TypeScript's type checker run slightly faster than `&` intersections. TypeScript caches interface relationships in an internal registry, optimizing repeated type checks.
61
-
62
- ```typescript
63
- // Prefer this (faster)
64
- interface Dog extends Animal {
65
- breed: string;
66
- }
67
-
68
- // Over this (slower)
69
- type Dog = Animal & {
70
- breed: string;
71
- };
72
- ```
73
-
74
- ## Summary
75
-
76
- | Scenario | Use |
77
- |---|---|
78
- | Object shapes (no inheritance) | `type` |
79
- | Unions, mapped types, conditionals | `type` |
80
- | Object inheritance | `interface` with `extends` |
@@ -1,36 +0,0 @@
1
- # /ct:code-quality
2
-
3
- > Run code quality checks (lint, typecheck, format) on a directory or file.
4
-
5
- **Type:** Command (slash command)
6
- **Source:** [`core/commands/ct/code-quality.md`](../core/commands/ct/code-quality.md)
7
- **Allowed Tools:** Bash, Read, Glob, Grep
8
-
9
- ## Usage
10
-
11
- ```bash
12
- /ct:code-quality [path]
13
- ```
14
-
15
- ## Workflow
16
-
17
- 1. **Detect project tooling** -- reads `package.json`, `pyproject.toml`, `Makefile`, `Cargo.toml`, or equivalent to identify the linter, typechecker, and formatter configured in the project
18
- 2. **Run linting** -- uses the project-configured linter (e.g., `eslint`, `ruff`, `clippy`, `golangci-lint`)
19
- 3. **Run type checking** -- uses the project-configured typechecker (e.g., `tsc --noEmit`, `mypy`, `pyright`)
20
- 4. **Run format checking** -- uses the project-configured formatter in check mode (e.g., `prettier --check`, `black --check`, `rustfmt --check`)
21
- 5. **Compile results** -- produces a structured report
22
-
23
- ## Output Format
24
-
25
- The command produces a structured report with:
26
-
27
- - **Lint Issues** -- table with file, line, rule, message, and severity
28
- - **Type Errors** -- table with file, line, and message
29
- - **Format Issues** -- table with file and status
30
- - **Summary** -- total issues across files with actionable suggestions
31
-
32
- ## Notes
33
-
34
- - Always uses the project's own configuration; does not impose external rules
35
- - For monorepos, scopes checks to the target directory rather than the entire repo
36
- - If a tool is not configured, it is noted and skipped
@@ -1,63 +0,0 @@
1
- # /ct:onboard
2
-
3
- > Systematically explore and understand a codebase area, module, or task context.
4
-
5
- **Type:** Command (slash command)
6
- **Source:** [`core/commands/ct/onboard.md`](../core/commands/ct/onboard.md)
7
- **Allowed Tools:** Bash, Read, Glob, Grep
8
-
9
- ## Usage
10
-
11
- ```bash
12
- /ct:onboard [area]
13
- ```
14
-
15
- If no area is specified, starts from the project root.
16
-
17
- ## Workflow
18
-
19
- 1. **Understand the scope** -- the user specifies an area (e.g., "the auth module", "the payments flow") or the entire repo
20
- 2. **Read foundational files** -- `README.md`, `CLAUDE.md`, `CONTRIBUTING.md`, `package.json`, config files, entry points
21
- 3. **Map the architecture** -- directory structure, entry points, request/data flow, key abstractions, design patterns
22
- 4. **Identify conventions** -- naming, error handling, testing patterns, state management
23
- 5. **Understand dependencies** -- key external libraries, internal module boundaries, database schema
24
- 6. **Ask clarifying questions** if ambiguities or undocumented conventions exist
25
-
26
- ## Output Format
27
-
28
- ```markdown
29
- ## Onboarding Summary: {area}
30
-
31
- ### Tech Stack
32
- - **Language:** {language and version}
33
- - **Framework:** {framework}
34
- - **Key libraries:** {list with purpose}
35
- - **Database:** {if applicable}
36
-
37
- ### Architecture
38
- {2-4 sentences describing the overall structure}
39
-
40
- ### Directory Map
41
- - `src/` - {purpose}
42
- - `src/models/` - {purpose}
43
-
44
- ### Key Files
45
- | File | Purpose | Notes |
46
-
47
- ### Data Flow
48
- {How a request/action flows through the system}
49
-
50
- ### Conventions
51
- - **Naming:** {patterns observed}
52
- - **Error handling:** {approach}
53
- - **Testing:** {framework, patterns, location}
54
-
55
- ### Questions / Gaps
56
- - {Things that are unclear or undocumented}
57
- ```
58
-
59
- ## Notes
60
-
61
- - Prioritizes understanding over completeness -- deeply understand 5 key files rather than skim 50
62
- - Notes what is NOT there (missing tests, docs, error handling) as well as what is
63
- - If onboarding for a specific task, focuses exploration on the relevant areas
@@ -1,91 +0,0 @@
1
- # /ct:pr-review
2
-
3
- > Perform a checklist-based code review on the current PR or a specified PR number.
4
-
5
- **Type:** Command (slash command)
6
- **Source:** [`core/commands/ct/pr-review.md`](../core/commands/ct/pr-review.md)
7
- **Allowed Tools:** Bash, Read, Glob, Grep
8
-
9
- ## Usage
10
-
11
- ```bash
12
- /ct:pr-review [pr-number]
13
- ```
14
-
15
- If no PR number is provided, diffs the current branch against the base branch.
16
-
17
- ## Review Checklist
18
-
19
- The command evaluates all changed files against these criteria:
20
-
21
- ### Logic Correctness
22
-
23
- - Conditionals and branches correct, no off-by-one errors
24
- - Edge cases handled (empty inputs, null values, boundary conditions)
25
- - Control flow matches intended behavior
26
- - No unreachable code paths
27
-
28
- ### Type Safety
29
-
30
- - Precise types (no `any`, no unsafe casts, no overly broad unions)
31
- - Type narrowing used correctly before accessing properties
32
- - Generic constraints appropriate
33
- - Return types explicit where needed
34
-
35
- ### Error Handling
36
-
37
- - Errors caught and handled meaningfully (not swallowed)
38
- - Error messages provide enough context for debugging
39
- - Error boundaries or fallbacks in place where needed
40
- - Cleanup logic (finally blocks, defer) correct
41
-
42
- ### Test Coverage
43
-
44
- - New behaviors covered by tests
45
- - Tests focus on behavior, not implementation details
46
- - Edge cases and error paths tested
47
- - Test descriptions clear and descriptive
48
-
49
- ### Performance
50
-
51
- - No unnecessary re-renders, recomputations, or allocations
52
- - No N+1 query patterns or missing pagination
53
- - No missing memoization for expensive operations
54
- - No potential memory leaks
55
-
56
- ### Security
57
-
58
- - No injection vulnerabilities (SQL, XSS, command injection)
59
- - User inputs validated and sanitized
60
- - Auth checks present on protected operations
61
- - Secrets and sensitive data properly handled
62
-
63
- ### Code Style
64
-
65
- - Naming follows project conventions
66
- - Code readable without excessive comments
67
- - Abstractions at the right level
68
- - No unnecessary duplication
69
-
70
- ## Output Format
71
-
72
- ```markdown
73
- ## PR Review: {title}
74
-
75
- **Branch:** {branch} -> {base}
76
- **Files changed:** {count}
77
- **Verdict:** APPROVE | REQUEST_CHANGES | COMMENT
78
-
79
- ### Critical Issues
80
- ### Warnings
81
- ### Suggestions
82
- ### Positive Notes
83
- ### Summary
84
- ```
85
-
86
- ## Notes
87
-
88
- - References specific file names and line numbers
89
- - Distinguishes between opinion and objective issues
90
- - Acknowledges good patterns, not just problems
91
- - Suggests splitting if the PR is too large to review effectively
@@ -1,50 +0,0 @@
1
- # /ct:pr-summary
2
-
3
- > Generate a structured pull request summary from the current branch.
4
-
5
- **Type:** Command (slash command)
6
- **Source:** [`core/commands/ct/pr-summary.md`](../core/commands/ct/pr-summary.md)
7
- **Allowed Tools:** Bash, Read
8
-
9
- ## Usage
10
-
11
- ```
12
- /ct:pr-summary
13
- ```
14
-
15
- ## Workflow
16
-
17
- 1. **Identify the base branch** -- checks for `main` or `master`, uses `git merge-base` to find the common ancestor
18
- 2. **Gather the diff** -- runs `git diff {base}...HEAD --stat` for overview and full diff for details
19
- 3. **Gather commit history** -- runs `git log {base}...HEAD --oneline --no-merges`
20
- 4. **Analyze changes** -- reads modified files to understand the "why" behind each change
21
- 5. **Generate the summary**
22
-
23
- ## Output Format
24
-
25
- ```markdown
26
- ## Summary
27
- {1-3 bullet points describing the high-level purpose}
28
-
29
- ## What Changed
30
-
31
- ### {Category} (e.g., "Authentication", "Database", "UI")
32
- - `{file}` - {what changed and why}
33
-
34
- ## Impact Assessment
35
- - **Risk level:** low | medium | high
36
- - **Affected areas:** {list of features or systems impacted}
37
- - **Breaking changes:** none, or description
38
- - **Migration needed:** none, or description
39
-
40
- ## Testing Notes
41
- - {How to test this change}
42
- - {Key scenarios to verify}
43
- ```
44
-
45
- ## Notes
46
-
47
- - Infers the "why" from commit messages, code comments, and the nature of changes
48
- - Groups related file changes under meaningful categories
49
- - Honest about risk level -- flags potential issues in Testing Notes
50
- - Designed to be scannable in under 60 seconds
@@ -1,59 +0,0 @@
1
- # /ct:proto-check
2
-
3
- > Validate protobuf definitions for correctness, lint compliance, and backward compatibility.
4
-
5
- **Type:** Command (slash command)
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
-
9
- ## Usage
10
-
11
- ```
12
- /ct:proto-check
13
- ```
14
-
15
- ## Workflow
16
-
17
- 1. **Find proto files** -- locates all `.proto` files and identifies buf configuration (`buf.yaml`, `buf.gen.yaml`)
18
- 2. **Run lint checks** -- executes `buf lint` or the project-configured linter
19
- 3. **Check for breaking changes** -- runs `buf breaking --against .git#branch=main` to detect backward-incompatible changes:
20
- - Removing or renaming fields
21
- - Changing field numbers or types
22
- - Removing services or RPCs
23
- - Changing RPC signatures
24
- 4. **Regenerate types** -- runs `buf generate` or the project-configured generation command
25
- 5. **Verify generated code compiles** -- runs the project's typecheck or build command
26
- 6. **Report results**
27
-
28
- ## Output Format
29
-
30
- ```markdown
31
- ## Protobuf Validation Report
32
-
33
- **Proto files found:** {count}
34
- **Buf config:** {path or "not found"}
35
-
36
- ### Lint Results
37
- - **Status:** pass | fail
38
- - **Issues:** {count}
39
-
40
- ### Breaking Change Check
41
- - **Status:** pass | fail
42
- - **Against:** {branch or reference}
43
-
44
- ### Code Generation
45
- - **Status:** success | failure
46
- - **Files generated:** {count}
47
-
48
- ### Compilation Check
49
- - **Status:** pass | fail
50
-
51
- ### Summary
52
- {Overall status and recommended actions}
53
- ```
54
-
55
- ## Notes
56
-
57
- - Checks for alternative protobuf tooling (`protoc`, `grpc_tools`) if `buf` is not installed
58
- - Reports clearly if no proto files are found
59
- - Breaking changes are flagged for human review, not automatically treated as errors
@@ -1,56 +0,0 @@
1
- # /ct:ticket
2
-
3
- > Work end-to-end on a ticket or issue: understand, explore, plan, implement, deliver.
4
-
5
- **Type:** Command (slash command)
6
- **Source:** [`core/commands/ct/ticket.md`](../core/commands/ct/ticket.md)
7
- **Allowed Tools:** Bash, Read, Write, Edit, Glob, Grep
8
-
9
- ## Usage
10
-
11
- ```
12
- /ct:ticket [issue-number-or-description]
13
- ```
14
-
15
- ## Phases
16
-
17
- ### Phase 1: Understand
18
-
19
- - Read the ticket (fetches via `gh issue view` if a GitHub issue number is provided)
20
- - Clarify requirements -- identify acceptance criteria, edge cases, and constraints
21
- - Identify scope -- what needs to change, what should NOT change
22
-
23
- ### Phase 2: Explore
24
-
25
- - Find relevant code -- search for files, functions, and patterns related to the ticket
26
- - Understand the test landscape -- existing tests, framework, patterns, coverage
27
- - Check for related changes -- recent commits or PRs in the affected area
28
-
29
- ### Phase 3: Plan
30
-
31
- - Draft an implementation plan listing specific changes needed:
32
- - Files to create or modify
33
- - Functions to add or change
34
- - Tests to write
35
- - Migrations or config changes
36
- - Share the plan with the user and get confirmation before proceeding
37
-
38
- ### Phase 4: Implement
39
-
40
- - Create a feature branch following project conventions
41
- - Write tests first when applicable (TDD)
42
- - Implement changes following project conventions
43
- - Run quality checks (lint, typecheck, tests)
44
-
45
- ### Phase 5: Deliver
46
-
47
- - Commit with conventional commit messages
48
- - Create a PR with clear title and description
49
- - Report back with the PR link and summary
50
-
51
- ## Notes
52
-
53
- - Always asks before making architectural decisions (new tables, new services, changing frameworks)
54
- - Does not gold-plate -- implements what the ticket asks for, nothing more
55
- - Proposes splitting if the ticket is too large for a single PR
56
- - Notes bugs or issues outside the ticket scope but does not fix them unless they block the ticket
@@ -1,26 +0,0 @@
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.