codingbuddy-rules 4.4.0 → 5.0.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.
- package/.ai-rules/adapters/antigravity.md +6 -6
- package/.ai-rules/adapters/claude-code.md +107 -4
- package/.ai-rules/adapters/codex.md +5 -5
- package/.ai-rules/adapters/cursor.md +2 -2
- package/.ai-rules/adapters/kiro.md +8 -8
- package/.ai-rules/adapters/opencode.md +7 -7
- package/.ai-rules/adapters/q.md +2 -2
- package/.ai-rules/agents/README.md +66 -16
- package/.ai-rules/agents/accessibility-specialist.json +2 -1
- package/.ai-rules/agents/act-mode.json +2 -1
- package/.ai-rules/agents/agent-architect.json +8 -7
- package/.ai-rules/agents/ai-ml-engineer.json +1 -0
- package/.ai-rules/agents/architecture-specialist.json +1 -0
- package/.ai-rules/agents/auto-mode.json +4 -2
- package/.ai-rules/agents/backend-developer.json +1 -0
- package/.ai-rules/agents/code-quality-specialist.json +1 -0
- package/.ai-rules/agents/code-reviewer.json +65 -64
- package/.ai-rules/agents/data-engineer.json +8 -7
- package/.ai-rules/agents/data-scientist.json +10 -9
- package/.ai-rules/agents/devops-engineer.json +1 -0
- package/.ai-rules/agents/documentation-specialist.json +1 -0
- package/.ai-rules/agents/eval-mode.json +20 -19
- package/.ai-rules/agents/event-architecture-specialist.json +1 -0
- package/.ai-rules/agents/frontend-developer.json +1 -0
- package/.ai-rules/agents/i18n-specialist.json +2 -1
- package/.ai-rules/agents/integration-specialist.json +1 -0
- package/.ai-rules/agents/migration-specialist.json +1 -0
- package/.ai-rules/agents/mobile-developer.json +8 -7
- package/.ai-rules/agents/observability-specialist.json +1 -0
- package/.ai-rules/agents/parallel-orchestrator.json +346 -0
- package/.ai-rules/agents/performance-specialist.json +1 -0
- package/.ai-rules/agents/plan-mode.json +3 -1
- package/.ai-rules/agents/plan-reviewer.json +208 -0
- package/.ai-rules/agents/platform-engineer.json +1 -0
- package/.ai-rules/agents/security-engineer.json +9 -8
- package/.ai-rules/agents/security-specialist.json +2 -1
- package/.ai-rules/agents/seo-specialist.json +1 -0
- package/.ai-rules/agents/software-engineer.json +1 -0
- package/.ai-rules/agents/solution-architect.json +11 -10
- package/.ai-rules/agents/systems-developer.json +9 -8
- package/.ai-rules/agents/technical-planner.json +11 -10
- package/.ai-rules/agents/test-engineer.json +7 -6
- package/.ai-rules/agents/test-strategy-specialist.json +1 -0
- package/.ai-rules/agents/tooling-engineer.json +4 -3
- package/.ai-rules/agents/ui-ux-designer.json +1 -0
- package/.ai-rules/keyword-modes.json +4 -4
- package/.ai-rules/rules/clarification-guide.md +14 -14
- package/.ai-rules/rules/core.md +90 -1
- package/.ai-rules/rules/parallel-execution.md +217 -0
- package/.ai-rules/skills/README.md +23 -1
- package/.ai-rules/skills/agent-design/SKILL.md +5 -0
- package/.ai-rules/skills/agent-design/examples/agent-template.json +58 -0
- package/.ai-rules/skills/agent-design/references/expertise-guidelines.md +112 -0
- package/.ai-rules/skills/agent-discussion/SKILL.md +199 -0
- package/.ai-rules/skills/agent-discussion-panel/SKILL.md +448 -0
- package/.ai-rules/skills/api-design/SKILL.md +5 -0
- package/.ai-rules/skills/api-design/examples/error-response.json +159 -0
- package/.ai-rules/skills/api-design/examples/openapi-template.yaml +393 -0
- package/.ai-rules/skills/build-fix/SKILL.md +234 -0
- package/.ai-rules/skills/code-explanation/SKILL.md +4 -0
- package/.ai-rules/skills/context-management/SKILL.md +1 -0
- package/.ai-rules/skills/cost-budget/SKILL.md +348 -0
- package/.ai-rules/skills/cross-repo-issues/SKILL.md +257 -0
- package/.ai-rules/skills/database-migration/SKILL.md +1 -0
- package/.ai-rules/skills/deepsearch/SKILL.md +214 -0
- package/.ai-rules/skills/deployment-checklist/SKILL.md +1 -0
- package/.ai-rules/skills/error-analysis/SKILL.md +1 -0
- package/.ai-rules/skills/finishing-a-development-branch/SKILL.md +281 -0
- package/.ai-rules/skills/frontend-design/SKILL.md +5 -0
- package/.ai-rules/skills/frontend-design/examples/component-template.tsx +203 -0
- package/.ai-rules/skills/frontend-design/references/css-patterns.md +243 -0
- package/.ai-rules/skills/git-master/SKILL.md +358 -0
- package/.ai-rules/skills/incident-response/SKILL.md +1 -0
- package/.ai-rules/skills/legacy-modernization/SKILL.md +1 -0
- package/.ai-rules/skills/mcp-builder/SKILL.md +7 -0
- package/.ai-rules/skills/mcp-builder/examples/resource-example.ts +233 -0
- package/.ai-rules/skills/mcp-builder/examples/tool-example.ts +203 -0
- package/.ai-rules/skills/mcp-builder/references/protocol-spec.md +215 -0
- package/.ai-rules/skills/performance-optimization/SKILL.md +3 -0
- package/.ai-rules/skills/plan-and-review/SKILL.md +115 -0
- package/.ai-rules/skills/pr-all-in-one/SKILL.md +15 -13
- package/.ai-rules/skills/pr-all-in-one/configuration-guide.md +7 -7
- package/.ai-rules/skills/pr-all-in-one/pr-templates.md +10 -10
- package/.ai-rules/skills/pr-review/SKILL.md +4 -0
- package/.ai-rules/skills/receiving-code-review/SKILL.md +347 -0
- package/.ai-rules/skills/refactoring/SKILL.md +1 -0
- package/.ai-rules/skills/requesting-code-review/SKILL.md +348 -0
- package/.ai-rules/skills/rule-authoring/SKILL.md +5 -0
- package/.ai-rules/skills/rule-authoring/examples/rule-template.md +142 -0
- package/.ai-rules/skills/rule-authoring/examples/trigger-patterns.md +126 -0
- package/.ai-rules/skills/security-audit/SKILL.md +4 -0
- package/.ai-rules/skills/skill-creator/SKILL.md +461 -0
- package/.ai-rules/skills/skill-creator/agents/analyzer.md +206 -0
- package/.ai-rules/skills/skill-creator/agents/comparator.md +167 -0
- package/.ai-rules/skills/skill-creator/agents/grader.md +152 -0
- package/.ai-rules/skills/skill-creator/assets/eval_review.html +289 -0
- package/.ai-rules/skills/skill-creator/assets/skill-template.md +43 -0
- package/.ai-rules/skills/skill-creator/eval-viewer/generate_review.py +496 -0
- package/.ai-rules/skills/skill-creator/references/frontmatter-guide.md +632 -0
- package/.ai-rules/skills/skill-creator/references/multi-tool-compat.md +480 -0
- package/.ai-rules/skills/skill-creator/references/schemas.md +784 -0
- package/.ai-rules/skills/skill-creator/scripts/aggregate_benchmark.py +302 -0
- package/.ai-rules/skills/skill-creator/scripts/init_skill.sh +196 -0
- package/.ai-rules/skills/skill-creator/scripts/run_loop.py +327 -0
- package/.ai-rules/skills/systematic-debugging/SKILL.md +1 -0
- package/.ai-rules/skills/tech-debt/SKILL.md +1 -0
- package/.ai-rules/skills/test-coverage-gate/SKILL.md +303 -0
- package/.ai-rules/skills/tmux-master/SKILL.md +491 -0
- package/.ai-rules/skills/using-git-worktrees/SKILL.md +368 -0
- package/.ai-rules/skills/verification-before-completion/SKILL.md +234 -0
- package/.ai-rules/skills/widget-slot-architecture/SKILL.md +6 -0
- package/.ai-rules/skills/widget-slot-architecture/examples/parallel-route-setup.tsx +206 -0
- package/.ai-rules/skills/widget-slot-architecture/examples/widget-component.tsx +250 -0
- package/.ai-rules/skills/writing-plans/SKILL.md +78 -0
- package/bin/cli.js +178 -0
- package/lib/init/detect-stack.js +148 -0
- package/lib/init/generate-config.js +31 -0
- package/lib/init/index.js +86 -0
- package/lib/init/prompt.js +60 -0
- package/lib/init/scaffold.js +67 -0
- package/lib/init/suggest-agent.js +46 -0
- package/package.json +10 -2
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
# OpenAPI 3.1 Template
|
|
2
|
+
# Copy and adapt this template when creating new API specifications.
|
|
3
|
+
# Replace all placeholder values (marked with <angle-brackets>).
|
|
4
|
+
|
|
5
|
+
openapi: 3.1.0
|
|
6
|
+
info:
|
|
7
|
+
title: <Service Name> API
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
description: |
|
|
10
|
+
<Brief description of what this API does and who it serves.>
|
|
11
|
+
contact:
|
|
12
|
+
name: <Team Name>
|
|
13
|
+
email: <team@example.com>
|
|
14
|
+
|
|
15
|
+
servers:
|
|
16
|
+
- url: https://api.example.com/v1
|
|
17
|
+
description: Production
|
|
18
|
+
- url: https://api-staging.example.com/v1
|
|
19
|
+
description: Staging
|
|
20
|
+
|
|
21
|
+
# ──────────────────────────────────────────
|
|
22
|
+
# Paths
|
|
23
|
+
# ──────────────────────────────────────────
|
|
24
|
+
|
|
25
|
+
paths:
|
|
26
|
+
/items:
|
|
27
|
+
get:
|
|
28
|
+
summary: List items
|
|
29
|
+
operationId: listItems
|
|
30
|
+
tags: [Items]
|
|
31
|
+
parameters:
|
|
32
|
+
- $ref: '#/components/parameters/PageParam'
|
|
33
|
+
- $ref: '#/components/parameters/PageSizeParam'
|
|
34
|
+
- name: status
|
|
35
|
+
in: query
|
|
36
|
+
description: Filter by item status
|
|
37
|
+
schema:
|
|
38
|
+
type: string
|
|
39
|
+
enum: [active, archived, draft]
|
|
40
|
+
- name: search
|
|
41
|
+
in: query
|
|
42
|
+
description: Full-text search across name and description
|
|
43
|
+
schema:
|
|
44
|
+
type: string
|
|
45
|
+
maxLength: 200
|
|
46
|
+
responses:
|
|
47
|
+
'200':
|
|
48
|
+
description: Paginated list of items
|
|
49
|
+
content:
|
|
50
|
+
application/json:
|
|
51
|
+
schema:
|
|
52
|
+
$ref: '#/components/schemas/ItemListResponse'
|
|
53
|
+
'401':
|
|
54
|
+
$ref: '#/components/responses/Unauthorized'
|
|
55
|
+
|
|
56
|
+
post:
|
|
57
|
+
summary: Create an item
|
|
58
|
+
operationId: createItem
|
|
59
|
+
tags: [Items]
|
|
60
|
+
requestBody:
|
|
61
|
+
required: true
|
|
62
|
+
content:
|
|
63
|
+
application/json:
|
|
64
|
+
schema:
|
|
65
|
+
$ref: '#/components/schemas/CreateItemRequest'
|
|
66
|
+
responses:
|
|
67
|
+
'201':
|
|
68
|
+
description: Item created
|
|
69
|
+
headers:
|
|
70
|
+
Location:
|
|
71
|
+
description: URL of the newly created item
|
|
72
|
+
schema:
|
|
73
|
+
type: string
|
|
74
|
+
format: uri
|
|
75
|
+
content:
|
|
76
|
+
application/json:
|
|
77
|
+
schema:
|
|
78
|
+
$ref: '#/components/schemas/ItemResponse'
|
|
79
|
+
'400':
|
|
80
|
+
$ref: '#/components/responses/ValidationError'
|
|
81
|
+
'401':
|
|
82
|
+
$ref: '#/components/responses/Unauthorized'
|
|
83
|
+
'409':
|
|
84
|
+
$ref: '#/components/responses/Conflict'
|
|
85
|
+
|
|
86
|
+
/items/{itemId}:
|
|
87
|
+
parameters:
|
|
88
|
+
- name: itemId
|
|
89
|
+
in: path
|
|
90
|
+
required: true
|
|
91
|
+
description: Unique item identifier
|
|
92
|
+
schema:
|
|
93
|
+
type: string
|
|
94
|
+
format: uuid
|
|
95
|
+
|
|
96
|
+
get:
|
|
97
|
+
summary: Get an item by ID
|
|
98
|
+
operationId: getItem
|
|
99
|
+
tags: [Items]
|
|
100
|
+
responses:
|
|
101
|
+
'200':
|
|
102
|
+
description: Item details
|
|
103
|
+
content:
|
|
104
|
+
application/json:
|
|
105
|
+
schema:
|
|
106
|
+
$ref: '#/components/schemas/ItemResponse'
|
|
107
|
+
'404':
|
|
108
|
+
$ref: '#/components/responses/NotFound'
|
|
109
|
+
|
|
110
|
+
patch:
|
|
111
|
+
summary: Update an item
|
|
112
|
+
operationId: updateItem
|
|
113
|
+
tags: [Items]
|
|
114
|
+
requestBody:
|
|
115
|
+
required: true
|
|
116
|
+
content:
|
|
117
|
+
application/json:
|
|
118
|
+
schema:
|
|
119
|
+
$ref: '#/components/schemas/UpdateItemRequest'
|
|
120
|
+
responses:
|
|
121
|
+
'200':
|
|
122
|
+
description: Item updated
|
|
123
|
+
content:
|
|
124
|
+
application/json:
|
|
125
|
+
schema:
|
|
126
|
+
$ref: '#/components/schemas/ItemResponse'
|
|
127
|
+
'400':
|
|
128
|
+
$ref: '#/components/responses/ValidationError'
|
|
129
|
+
'404':
|
|
130
|
+
$ref: '#/components/responses/NotFound'
|
|
131
|
+
'409':
|
|
132
|
+
$ref: '#/components/responses/Conflict'
|
|
133
|
+
|
|
134
|
+
delete:
|
|
135
|
+
summary: Delete an item
|
|
136
|
+
operationId: deleteItem
|
|
137
|
+
tags: [Items]
|
|
138
|
+
responses:
|
|
139
|
+
'204':
|
|
140
|
+
description: Item deleted
|
|
141
|
+
'404':
|
|
142
|
+
$ref: '#/components/responses/NotFound'
|
|
143
|
+
|
|
144
|
+
# ──────────────────────────────────────────
|
|
145
|
+
# Components
|
|
146
|
+
# ──────────────────────────────────────────
|
|
147
|
+
|
|
148
|
+
components:
|
|
149
|
+
# --- Schemas ---
|
|
150
|
+
|
|
151
|
+
schemas:
|
|
152
|
+
Item:
|
|
153
|
+
type: object
|
|
154
|
+
required: [id, name, status, createdAt, updatedAt]
|
|
155
|
+
properties:
|
|
156
|
+
id:
|
|
157
|
+
type: string
|
|
158
|
+
format: uuid
|
|
159
|
+
description: Unique identifier
|
|
160
|
+
examples: ['550e8400-e29b-41d4-a716-446655440000']
|
|
161
|
+
name:
|
|
162
|
+
type: string
|
|
163
|
+
minLength: 1
|
|
164
|
+
maxLength: 255
|
|
165
|
+
description: Display name
|
|
166
|
+
description:
|
|
167
|
+
type: string
|
|
168
|
+
maxLength: 2000
|
|
169
|
+
description: Detailed description
|
|
170
|
+
status:
|
|
171
|
+
type: string
|
|
172
|
+
enum: [active, archived, draft]
|
|
173
|
+
description: Current item status
|
|
174
|
+
createdAt:
|
|
175
|
+
type: string
|
|
176
|
+
format: date-time
|
|
177
|
+
updatedAt:
|
|
178
|
+
type: string
|
|
179
|
+
format: date-time
|
|
180
|
+
|
|
181
|
+
CreateItemRequest:
|
|
182
|
+
type: object
|
|
183
|
+
required: [name]
|
|
184
|
+
properties:
|
|
185
|
+
name:
|
|
186
|
+
type: string
|
|
187
|
+
minLength: 1
|
|
188
|
+
maxLength: 255
|
|
189
|
+
description:
|
|
190
|
+
type: string
|
|
191
|
+
maxLength: 2000
|
|
192
|
+
status:
|
|
193
|
+
type: string
|
|
194
|
+
enum: [active, draft]
|
|
195
|
+
default: draft
|
|
196
|
+
|
|
197
|
+
UpdateItemRequest:
|
|
198
|
+
type: object
|
|
199
|
+
minProperties: 1
|
|
200
|
+
properties:
|
|
201
|
+
name:
|
|
202
|
+
type: string
|
|
203
|
+
minLength: 1
|
|
204
|
+
maxLength: 255
|
|
205
|
+
description:
|
|
206
|
+
type: string
|
|
207
|
+
maxLength: 2000
|
|
208
|
+
status:
|
|
209
|
+
type: string
|
|
210
|
+
enum: [active, archived, draft]
|
|
211
|
+
|
|
212
|
+
ItemResponse:
|
|
213
|
+
type: object
|
|
214
|
+
required: [data, meta]
|
|
215
|
+
properties:
|
|
216
|
+
data:
|
|
217
|
+
$ref: '#/components/schemas/Item'
|
|
218
|
+
meta:
|
|
219
|
+
$ref: '#/components/schemas/ResponseMeta'
|
|
220
|
+
|
|
221
|
+
ItemListResponse:
|
|
222
|
+
type: object
|
|
223
|
+
required: [data, meta]
|
|
224
|
+
properties:
|
|
225
|
+
data:
|
|
226
|
+
type: array
|
|
227
|
+
items:
|
|
228
|
+
$ref: '#/components/schemas/Item'
|
|
229
|
+
meta:
|
|
230
|
+
allOf:
|
|
231
|
+
- $ref: '#/components/schemas/ResponseMeta'
|
|
232
|
+
- $ref: '#/components/schemas/PaginationMeta'
|
|
233
|
+
|
|
234
|
+
# --- Shared Schemas ---
|
|
235
|
+
|
|
236
|
+
ResponseMeta:
|
|
237
|
+
type: object
|
|
238
|
+
required: [requestId, timestamp]
|
|
239
|
+
properties:
|
|
240
|
+
requestId:
|
|
241
|
+
type: string
|
|
242
|
+
format: uuid
|
|
243
|
+
description: Unique request trace ID
|
|
244
|
+
timestamp:
|
|
245
|
+
type: string
|
|
246
|
+
format: date-time
|
|
247
|
+
|
|
248
|
+
PaginationMeta:
|
|
249
|
+
type: object
|
|
250
|
+
required: [total, page, pageSize, hasNext]
|
|
251
|
+
properties:
|
|
252
|
+
total:
|
|
253
|
+
type: integer
|
|
254
|
+
minimum: 0
|
|
255
|
+
page:
|
|
256
|
+
type: integer
|
|
257
|
+
minimum: 1
|
|
258
|
+
pageSize:
|
|
259
|
+
type: integer
|
|
260
|
+
minimum: 1
|
|
261
|
+
maximum: 100
|
|
262
|
+
hasNext:
|
|
263
|
+
type: boolean
|
|
264
|
+
|
|
265
|
+
ErrorResponse:
|
|
266
|
+
type: object
|
|
267
|
+
required: [error, meta]
|
|
268
|
+
properties:
|
|
269
|
+
error:
|
|
270
|
+
type: object
|
|
271
|
+
required: [code, message]
|
|
272
|
+
properties:
|
|
273
|
+
code:
|
|
274
|
+
type: string
|
|
275
|
+
description: Machine-readable error code
|
|
276
|
+
examples: ['VALIDATION_ERROR']
|
|
277
|
+
message:
|
|
278
|
+
type: string
|
|
279
|
+
description: Human-readable error message
|
|
280
|
+
details:
|
|
281
|
+
type: array
|
|
282
|
+
items:
|
|
283
|
+
type: object
|
|
284
|
+
required: [message]
|
|
285
|
+
properties:
|
|
286
|
+
field:
|
|
287
|
+
type: string
|
|
288
|
+
message:
|
|
289
|
+
type: string
|
|
290
|
+
code:
|
|
291
|
+
type: string
|
|
292
|
+
meta:
|
|
293
|
+
$ref: '#/components/schemas/ResponseMeta'
|
|
294
|
+
|
|
295
|
+
# --- Parameters ---
|
|
296
|
+
|
|
297
|
+
parameters:
|
|
298
|
+
PageParam:
|
|
299
|
+
name: page
|
|
300
|
+
in: query
|
|
301
|
+
description: Page number (1-indexed)
|
|
302
|
+
schema:
|
|
303
|
+
type: integer
|
|
304
|
+
minimum: 1
|
|
305
|
+
default: 1
|
|
306
|
+
|
|
307
|
+
PageSizeParam:
|
|
308
|
+
name: pageSize
|
|
309
|
+
in: query
|
|
310
|
+
description: Items per page
|
|
311
|
+
schema:
|
|
312
|
+
type: integer
|
|
313
|
+
minimum: 1
|
|
314
|
+
maximum: 100
|
|
315
|
+
default: 20
|
|
316
|
+
|
|
317
|
+
# --- Responses ---
|
|
318
|
+
|
|
319
|
+
responses:
|
|
320
|
+
ValidationError:
|
|
321
|
+
description: Input validation failed
|
|
322
|
+
content:
|
|
323
|
+
application/json:
|
|
324
|
+
schema:
|
|
325
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
326
|
+
example:
|
|
327
|
+
error:
|
|
328
|
+
code: VALIDATION_ERROR
|
|
329
|
+
message: Invalid input data
|
|
330
|
+
details:
|
|
331
|
+
- field: name
|
|
332
|
+
message: Name is required
|
|
333
|
+
code: REQUIRED
|
|
334
|
+
meta:
|
|
335
|
+
requestId: '550e8400-e29b-41d4-a716-446655440000'
|
|
336
|
+
timestamp: '2024-01-15T10:30:00Z'
|
|
337
|
+
|
|
338
|
+
NotFound:
|
|
339
|
+
description: Resource not found
|
|
340
|
+
content:
|
|
341
|
+
application/json:
|
|
342
|
+
schema:
|
|
343
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
344
|
+
example:
|
|
345
|
+
error:
|
|
346
|
+
code: NOT_FOUND
|
|
347
|
+
message: The requested resource was not found
|
|
348
|
+
meta:
|
|
349
|
+
requestId: '550e8400-e29b-41d4-a716-446655440000'
|
|
350
|
+
timestamp: '2024-01-15T10:30:00Z'
|
|
351
|
+
|
|
352
|
+
Unauthorized:
|
|
353
|
+
description: Authentication required
|
|
354
|
+
content:
|
|
355
|
+
application/json:
|
|
356
|
+
schema:
|
|
357
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
358
|
+
example:
|
|
359
|
+
error:
|
|
360
|
+
code: UNAUTHORIZED
|
|
361
|
+
message: Authentication is required
|
|
362
|
+
meta:
|
|
363
|
+
requestId: '550e8400-e29b-41d4-a716-446655440000'
|
|
364
|
+
timestamp: '2024-01-15T10:30:00Z'
|
|
365
|
+
|
|
366
|
+
Conflict:
|
|
367
|
+
description: State conflict (duplicate or version mismatch)
|
|
368
|
+
content:
|
|
369
|
+
application/json:
|
|
370
|
+
schema:
|
|
371
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
372
|
+
example:
|
|
373
|
+
error:
|
|
374
|
+
code: CONFLICT
|
|
375
|
+
message: An item with this name already exists
|
|
376
|
+
meta:
|
|
377
|
+
requestId: '550e8400-e29b-41d4-a716-446655440000'
|
|
378
|
+
timestamp: '2024-01-15T10:30:00Z'
|
|
379
|
+
|
|
380
|
+
# --- Security ---
|
|
381
|
+
|
|
382
|
+
securitySchemes:
|
|
383
|
+
BearerAuth:
|
|
384
|
+
type: http
|
|
385
|
+
scheme: bearer
|
|
386
|
+
bearerFormat: JWT
|
|
387
|
+
|
|
388
|
+
security:
|
|
389
|
+
- BearerAuth: []
|
|
390
|
+
|
|
391
|
+
tags:
|
|
392
|
+
- name: Items
|
|
393
|
+
description: Item management endpoints
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-fix
|
|
3
|
+
description: Use when build fails, TypeScript errors appear, or compilation breaks. Minimal diff fixes only — no refactoring, no architecture changes.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
allowed-tools: Read, Edit, Grep, Glob, Bash
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Build Fix
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Build errors block everything. Fix them fast, fix them small, fix nothing else.
|
|
13
|
+
|
|
14
|
+
**Core principle:** Fix ONLY what is broken. A build fix is not an opportunity to refactor, add features, or improve architecture. Touch the minimum lines required to restore a passing build.
|
|
15
|
+
|
|
16
|
+
**Violating the letter of this process is violating the spirit of build fixing.**
|
|
17
|
+
|
|
18
|
+
## The Iron Law
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
MINIMAL DIFF, NO ARCHITECTURE CHANGES — FIX WHAT'S BROKEN, NOTHING MORE
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If your diff touches lines unrelated to the error, you are not build-fixing. You are refactoring. Stop.
|
|
25
|
+
|
|
26
|
+
**No exceptions:**
|
|
27
|
+
- "While I'm here, I'll clean up..." → No. Separate PR.
|
|
28
|
+
- "This would be better as..." → No. Separate issue.
|
|
29
|
+
- "The real problem is the architecture..." → No. File an issue, fix the build now.
|
|
30
|
+
|
|
31
|
+
## When to Use
|
|
32
|
+
|
|
33
|
+
Use for ANY build/compilation failure:
|
|
34
|
+
- TypeScript compiler errors (`tsc --noEmit` failures)
|
|
35
|
+
- Import/export resolution errors
|
|
36
|
+
- Dependency version mismatches or missing packages
|
|
37
|
+
- Configuration errors (tsconfig, webpack, vite, etc.)
|
|
38
|
+
- CI/CD build pipeline failures
|
|
39
|
+
- Module not found errors
|
|
40
|
+
|
|
41
|
+
**Use this ESPECIALLY when:**
|
|
42
|
+
- Build is red and blocking the team
|
|
43
|
+
- CI pipeline is failing on compilation
|
|
44
|
+
- Dependency update broke the build
|
|
45
|
+
- Merge conflict left broken imports
|
|
46
|
+
|
|
47
|
+
**Do NOT use when:**
|
|
48
|
+
- Tests fail but build succeeds → use `systematic-debugging`
|
|
49
|
+
- You want to improve code quality → use `refactoring`
|
|
50
|
+
- You want to add features → use `brainstorming` + TDD
|
|
51
|
+
- Runtime errors, not compile-time → use `error-analysis`
|
|
52
|
+
|
|
53
|
+
## Error Classification
|
|
54
|
+
|
|
55
|
+
First, classify the build error:
|
|
56
|
+
|
|
57
|
+
| Class | Symptoms | Typical Minimal Fix |
|
|
58
|
+
|-------|----------|-------------------|
|
|
59
|
+
| **TypeScript Error** | `TS2345`, `TS2339`, `TS7006`, `TS2532` | Add type annotation, null check, or correct type |
|
|
60
|
+
| **Import Error** | `Cannot find module`, `has no exported member` | Fix path, add missing export, correct import name |
|
|
61
|
+
| **Dependency Error** | Version mismatch, missing peer dep, lockfile conflict | Align version, install missing package |
|
|
62
|
+
| **Config Error** | `tsconfig.json` invalid, env var missing, wrong target | Fix config value, add missing variable |
|
|
63
|
+
| **Syntax Error** | Unexpected token, missing bracket | Fix syntax at reported location |
|
|
64
|
+
|
|
65
|
+
## The Four Phases
|
|
66
|
+
|
|
67
|
+
You MUST complete each phase before proceeding to the next.
|
|
68
|
+
|
|
69
|
+
### Phase 1: Read the Error
|
|
70
|
+
|
|
71
|
+
**BEFORE attempting ANY fix:**
|
|
72
|
+
|
|
73
|
+
1. **Read the FULL error output**
|
|
74
|
+
- Don't skim — read every line
|
|
75
|
+
- Note the error code (e.g., `TS2345`)
|
|
76
|
+
- Note the exact file and line number
|
|
77
|
+
- Note what the compiler expected vs. what it got
|
|
78
|
+
|
|
79
|
+
2. **Classify the error** (see table above)
|
|
80
|
+
- What class does this error belong to?
|
|
81
|
+
- Is it a single error or a cascade?
|
|
82
|
+
- Cascading errors: fix the FIRST error only, then re-run
|
|
83
|
+
|
|
84
|
+
3. **Count the errors**
|
|
85
|
+
- One error? Fix it directly.
|
|
86
|
+
- Many errors, same root cause? Fix the root, not each symptom.
|
|
87
|
+
- Many unrelated errors? Fix one at a time, verify after each.
|
|
88
|
+
|
|
89
|
+
### Phase 2: Identify Root Cause
|
|
90
|
+
|
|
91
|
+
**Find the MINIMUM change needed:**
|
|
92
|
+
|
|
93
|
+
1. **Check recent changes**
|
|
94
|
+
```bash
|
|
95
|
+
git diff HEAD~1 # What changed?
|
|
96
|
+
git log --oneline -5 # Recent commits
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
2. **Trace the error to its source**
|
|
100
|
+
- TypeScript error at line 42? Read line 42.
|
|
101
|
+
- Import error? Check if the export exists at the source.
|
|
102
|
+
- Dependency error? Check `package.json` versions.
|
|
103
|
+
|
|
104
|
+
3. **Identify the scope**
|
|
105
|
+
- How many files need to change?
|
|
106
|
+
- If more than 3 files → question whether this is truly a build fix
|
|
107
|
+
- If it requires new files → this is not a build fix, it's a feature
|
|
108
|
+
|
|
109
|
+
### Phase 3: Minimal Fix
|
|
110
|
+
|
|
111
|
+
**Apply the SMALLEST possible change:**
|
|
112
|
+
|
|
113
|
+
1. **One fix at a time**
|
|
114
|
+
- Change one thing
|
|
115
|
+
- Don't bundle fixes
|
|
116
|
+
- Don't "improve" surrounding code
|
|
117
|
+
|
|
118
|
+
2. **Common minimal fixes**
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
// TypeScript: TS2345 - Type mismatch
|
|
122
|
+
// BAD: Rewrite the function with new types
|
|
123
|
+
// GOOD: Add the correct type annotation or assertion
|
|
124
|
+
const value = data as ExpectedType;
|
|
125
|
+
|
|
126
|
+
// TypeScript: TS2532 - Possibly undefined
|
|
127
|
+
// BAD: Refactor to eliminate the possibility
|
|
128
|
+
// GOOD: Add null check or optional chaining
|
|
129
|
+
const name = user?.name ?? 'default';
|
|
130
|
+
|
|
131
|
+
// Import: Cannot find module
|
|
132
|
+
// BAD: Restructure the module system
|
|
133
|
+
// GOOD: Fix the import path
|
|
134
|
+
import { Thing } from './correct/path';
|
|
135
|
+
|
|
136
|
+
// Dependency: Missing peer dependency
|
|
137
|
+
// BAD: Upgrade the entire dependency tree
|
|
138
|
+
// GOOD: Install the specific missing package
|
|
139
|
+
// $ yarn add missing-package@^required.version
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
3. **What NOT to do**
|
|
143
|
+
- Do NOT rename variables for "clarity"
|
|
144
|
+
- Do NOT extract functions for "reusability"
|
|
145
|
+
- Do NOT add error handling beyond what's needed
|
|
146
|
+
- Do NOT update unrelated dependencies
|
|
147
|
+
- Do NOT change code formatting
|
|
148
|
+
|
|
149
|
+
### Phase 4: Verify
|
|
150
|
+
|
|
151
|
+
**Confirm the build passes:**
|
|
152
|
+
|
|
153
|
+
1. **Run the build command**
|
|
154
|
+
```bash
|
|
155
|
+
# Run the same command that failed
|
|
156
|
+
yarn build # or npm run build
|
|
157
|
+
tsc --noEmit # TypeScript check
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
2. **Run tests to ensure no regressions**
|
|
161
|
+
```bash
|
|
162
|
+
yarn test # or npm test
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
3. **Check the diff**
|
|
166
|
+
```bash
|
|
167
|
+
git diff
|
|
168
|
+
```
|
|
169
|
+
- Is every changed line directly related to the error?
|
|
170
|
+
- Did you touch anything unrelated? Revert it.
|
|
171
|
+
- Is the diff as small as possible?
|
|
172
|
+
|
|
173
|
+
4. **If build still fails**
|
|
174
|
+
- Read the NEW error message
|
|
175
|
+
- Is it the same error? → Your fix was wrong. Revert.
|
|
176
|
+
- Is it a different error? → Return to Phase 1 for the new error.
|
|
177
|
+
- Do NOT stack fixes without verifying between each one.
|
|
178
|
+
|
|
179
|
+
## Red Flags — STOP and Return to Phase 1
|
|
180
|
+
|
|
181
|
+
If you catch yourself thinking:
|
|
182
|
+
|
|
183
|
+
| Thought | Reality |
|
|
184
|
+
|---------|---------|
|
|
185
|
+
| "While I'm fixing this, I'll also..." | Build fix. Nothing else. |
|
|
186
|
+
| "This function should really be..." | File an issue. Fix the build. |
|
|
187
|
+
| "The types are all wrong, let me redesign..." | Fix the ONE type error. Not all types. |
|
|
188
|
+
| "I need to add a new abstraction..." | No new abstractions in a build fix. |
|
|
189
|
+
| "Let me upgrade this dependency to latest..." | Only change the version if it fixes the error. |
|
|
190
|
+
| "This code is messy, let me clean up..." | Messy code that compiles > clean code in a broken build. |
|
|
191
|
+
| "The architecture caused this, so I should..." | Architecture changes are not build fixes. |
|
|
192
|
+
|
|
193
|
+
**ALL of these mean: STOP. You are no longer build-fixing.**
|
|
194
|
+
|
|
195
|
+
## Common Rationalizations
|
|
196
|
+
|
|
197
|
+
| Excuse | Reality |
|
|
198
|
+
|--------|---------|
|
|
199
|
+
| "The refactor prevents future build errors" | Future prevention is a separate task. Fix now. |
|
|
200
|
+
| "It's just a small improvement" | Small improvements compound into large diffs. |
|
|
201
|
+
| "The code is already open in my editor" | Being convenient doesn't make it a build fix. |
|
|
202
|
+
| "No one will review a 1-line PR" | 1-line PRs are the BEST PRs. Ship it. |
|
|
203
|
+
| "I need to understand the whole module" | You need to understand the error. Not the module. |
|
|
204
|
+
| "The dependency is outdated anyway" | Outdated but compiling > updated and broken. |
|
|
205
|
+
|
|
206
|
+
## Scope Guard
|
|
207
|
+
|
|
208
|
+
Before committing, verify your changes pass the scope guard:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
For EACH changed line, ask:
|
|
212
|
+
"Would the build fail without this specific change?"
|
|
213
|
+
|
|
214
|
+
YES → Keep it
|
|
215
|
+
NO → Revert it
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
If any changed line fails the scope guard, you have scope creep. Remove it.
|
|
219
|
+
|
|
220
|
+
## Quick Reference
|
|
221
|
+
|
|
222
|
+
| Phase | Key Activity | Success Criteria |
|
|
223
|
+
|-------|-------------|------------------|
|
|
224
|
+
| **1. Read** | Read full error, classify, count | Know WHAT is broken |
|
|
225
|
+
| **2. Identify** | Check changes, trace source | Know WHERE and WHY |
|
|
226
|
+
| **3. Fix** | Smallest possible change | Minimal diff applied |
|
|
227
|
+
| **4. Verify** | Build passes, tests pass, diff is clean | Build green, no extras |
|
|
228
|
+
|
|
229
|
+
## Related Skills
|
|
230
|
+
|
|
231
|
+
- **`error-analysis`** — For classifying and understanding error messages (Phase 1)
|
|
232
|
+
- **`systematic-debugging`** — For runtime bugs, not compile-time errors
|
|
233
|
+
- **`verification-before-completion`** — For confirming the fix before claiming success
|
|
234
|
+
- **`refactoring`** — For when you actually WANT to improve structure (not during build fix)
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-explanation
|
|
3
3
|
description: Use when explaining complex code to new team members, conducting code reviews, onboarding, or understanding unfamiliar codebases. Provides structured analysis from high-level overview to implementation details.
|
|
4
|
+
context: fork
|
|
5
|
+
agent: Explore
|
|
6
|
+
allowed-tools: Read, Grep, Glob
|
|
7
|
+
argument-hint: [file-or-symbol]
|
|
4
8
|
---
|
|
5
9
|
|
|
6
10
|
# Code Explanation
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-management
|
|
3
3
|
description: Use when working on long tasks that span multiple sessions, when context compaction is a concern, or when decisions from PLAN mode need to persist through ACT and EVAL modes.
|
|
4
|
+
user-invocable: false
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Context Management
|