vibesuite 1.3.2 → 2.0.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.
Files changed (75) hide show
  1. package/README.md +8 -1
  2. package/assets/.agent/skills/avoid-feature-creep/SKILL.md +307 -0
  3. package/assets/.agent/skills/avoid-feature-creep/agents/openai.yaml +3 -0
  4. package/assets/.agent/skills/avoid-feature-creep/assets/large-logo.png +0 -0
  5. package/assets/.agent/skills/avoid-feature-creep/assets/small-logo.svg +17 -0
  6. package/assets/.agent/skills/convex/SKILL.md +62 -0
  7. package/assets/.agent/skills/convex/agents/openai.yaml +3 -0
  8. package/assets/.agent/skills/convex/assets/large-logo.png +0 -0
  9. package/assets/.agent/skills/convex/assets/small-logo.svg +17 -0
  10. package/assets/.agent/skills/convex-agents/SKILL.md +516 -0
  11. package/assets/.agent/skills/convex-agents/agents/openai.yaml +3 -0
  12. package/assets/.agent/skills/convex-agents/assets/large-logo.png +0 -0
  13. package/assets/.agent/skills/convex-agents/assets/small-logo.svg +17 -0
  14. package/assets/.agent/skills/convex-best-practices/SKILL.md +369 -0
  15. package/assets/.agent/skills/convex-best-practices/agents/openai.yaml +3 -0
  16. package/assets/.agent/skills/convex-best-practices/assets/large-logo.png +0 -0
  17. package/assets/.agent/skills/convex-best-practices/assets/small-logo.svg +17 -0
  18. package/assets/.agent/skills/convex-component-authoring/SKILL.md +457 -0
  19. package/assets/.agent/skills/convex-component-authoring/agents/openai.yaml +3 -0
  20. package/assets/.agent/skills/convex-component-authoring/assets/large-logo.png +0 -0
  21. package/assets/.agent/skills/convex-component-authoring/assets/small-logo.svg +17 -0
  22. package/assets/.agent/skills/convex-cron-jobs/SKILL.md +604 -0
  23. package/assets/.agent/skills/convex-cron-jobs/agents/openai.yaml +3 -0
  24. package/assets/.agent/skills/convex-cron-jobs/assets/large-logo.png +0 -0
  25. package/assets/.agent/skills/convex-cron-jobs/assets/small-logo.svg +17 -0
  26. package/assets/.agent/skills/convex-file-storage/SKILL.md +467 -0
  27. package/assets/.agent/skills/convex-file-storage/agents/openai.yaml +3 -0
  28. package/assets/.agent/skills/convex-file-storage/assets/large-logo.png +0 -0
  29. package/assets/.agent/skills/convex-file-storage/assets/small-logo.svg +17 -0
  30. package/assets/.agent/skills/convex-functions/SKILL.md +458 -0
  31. package/assets/.agent/skills/convex-functions/agents/openai.yaml +3 -0
  32. package/assets/.agent/skills/convex-functions/assets/large-logo.png +0 -0
  33. package/assets/.agent/skills/convex-functions/assets/small-logo.svg +17 -0
  34. package/assets/.agent/skills/convex-http-actions/SKILL.md +733 -0
  35. package/assets/.agent/skills/convex-http-actions/agents/openai.yaml +3 -0
  36. package/assets/.agent/skills/convex-http-actions/assets/large-logo.png +0 -0
  37. package/assets/.agent/skills/convex-http-actions/assets/small-logo.svg +17 -0
  38. package/assets/.agent/skills/convex-migrations/SKILL.md +712 -0
  39. package/assets/.agent/skills/convex-migrations/agents/openai.yaml +3 -0
  40. package/assets/.agent/skills/convex-migrations/assets/large-logo.png +0 -0
  41. package/assets/.agent/skills/convex-migrations/assets/small-logo.svg +17 -0
  42. package/assets/.agent/skills/convex-realtime/SKILL.md +443 -0
  43. package/assets/.agent/skills/convex-realtime/agents/openai.yaml +3 -0
  44. package/assets/.agent/skills/convex-realtime/assets/large-logo.png +0 -0
  45. package/assets/.agent/skills/convex-realtime/assets/small-logo.svg +17 -0
  46. package/assets/.agent/skills/convex-schema-validator/SKILL.md +400 -0
  47. package/assets/.agent/skills/convex-schema-validator/agents/openai.yaml +3 -0
  48. package/assets/.agent/skills/convex-schema-validator/assets/large-logo.png +0 -0
  49. package/assets/.agent/skills/convex-schema-validator/assets/small-logo.svg +17 -0
  50. package/assets/.agent/skills/convex-security-audit/SKILL.md +539 -0
  51. package/assets/.agent/skills/convex-security-audit/agents/openai.yaml +3 -0
  52. package/assets/.agent/skills/convex-security-audit/assets/large-logo.png +0 -0
  53. package/assets/.agent/skills/convex-security-audit/assets/small-logo.svg +17 -0
  54. package/assets/.agent/skills/convex-security-check/SKILL.md +378 -0
  55. package/assets/.agent/skills/convex-security-check/agents/openai.yaml +3 -0
  56. package/assets/.agent/skills/convex-security-check/assets/large-logo.png +0 -0
  57. package/assets/.agent/skills/convex-security-check/assets/small-logo.svg +17 -0
  58. package/assets/.agent/skills/github-ops/SKILL.md +4 -4
  59. package/assets/.agent/skills/google-trends/SKILL.md +7 -7
  60. package/assets/.agent/skills/optimize-agent-context/SKILL.md +97 -0
  61. package/assets/.agent/skills/youtube-pipeline/SKILL.md +10 -10
  62. package/assets/.agent/workflows/LEGACY/init_smart_ops.md +2 -2
  63. package/assets/.agent/workflows/agent_reset.md +2 -2
  64. package/assets/.agent/workflows/mode-orchestrator.md +114 -640
  65. package/assets/.agent/workflows/mode-visionary.md +192 -0
  66. package/assets/.agent/workflows/optimize-agent-context.md +54 -0
  67. package/assets/.agent/workflows/remotion-build.md +17 -17
  68. package/assets/.agent/workflows/stitch.md +4 -4
  69. package/assets/VibeCode-Agents/custom_modes.yaml +1257 -0
  70. package/assets/VibeCode-Agents/vibe-orchestrator.yaml +427 -145
  71. package/assets/VibeCode-Agents/vibe-visionary.yaml +617 -0
  72. package/package.json +2 -2
  73. package/src/cli.js +416 -20
  74. package/src/harness.js +281 -0
  75. package/src/store.js +239 -0
@@ -0,0 +1,457 @@
1
+ ---
2
+ name: convex-component-authoring
3
+ displayName: Convex Component Authoring
4
+ description: How to create, structure, and publish self-contained Convex components with proper isolation, exports, and dependency management
5
+ version: 1.0.0
6
+ author: Convex
7
+ tags: [convex, components, reusable, packages, npm]
8
+ ---
9
+
10
+ # Convex Component Authoring
11
+
12
+ Create self-contained, reusable Convex components with proper isolation, exports, and dependency management for sharing across projects.
13
+
14
+ ## Documentation Sources
15
+
16
+ Before implementing, do not assume; fetch the latest documentation:
17
+
18
+ - Primary: https://docs.convex.dev/components
19
+ - Component Authoring: https://docs.convex.dev/components/authoring
20
+ - For broader context: https://docs.convex.dev/llms.txt
21
+
22
+ ## Instructions
23
+
24
+ ### What Are Convex Components?
25
+
26
+ Convex components are self-contained packages that include:
27
+ - Database tables (isolated from the main app)
28
+ - Functions (queries, mutations, actions)
29
+ - TypeScript types and validators
30
+ - Optional frontend hooks
31
+
32
+ ### Component Structure
33
+
34
+ ```
35
+ my-convex-component/
36
+ ├── package.json
37
+ ├── tsconfig.json
38
+ ├── README.md
39
+ ├── src/
40
+ │ ├── index.ts # Main exports
41
+ │ ├── component.ts # Component definition
42
+ │ ├── schema.ts # Component schema
43
+ │ └── functions/
44
+ │ ├── queries.ts
45
+ │ ├── mutations.ts
46
+ │ └── actions.ts
47
+ └── convex.config.ts # Component configuration
48
+ ```
49
+
50
+ ### Creating a Component
51
+
52
+ #### 1. Component Configuration
53
+
54
+ ```typescript
55
+ // convex.config.ts
56
+ import { defineComponent } from "convex/server";
57
+
58
+ export default defineComponent("myComponent");
59
+ ```
60
+
61
+ #### 2. Component Schema
62
+
63
+ ```typescript
64
+ // src/schema.ts
65
+ import { defineSchema, defineTable } from "convex/server";
66
+ import { v } from "convex/values";
67
+
68
+ export default defineSchema({
69
+ // Tables are isolated to this component
70
+ items: defineTable({
71
+ name: v.string(),
72
+ data: v.any(),
73
+ createdAt: v.number(),
74
+ }).index("by_name", ["name"]),
75
+
76
+ config: defineTable({
77
+ key: v.string(),
78
+ value: v.any(),
79
+ }).index("by_key", ["key"]),
80
+ });
81
+ ```
82
+
83
+ #### 3. Component Definition
84
+
85
+ ```typescript
86
+ // src/component.ts
87
+ import { defineComponent, ComponentDefinition } from "convex/server";
88
+ import schema from "./schema";
89
+ import * as queries from "./functions/queries";
90
+ import * as mutations from "./functions/mutations";
91
+
92
+ const component = defineComponent("myComponent", {
93
+ schema,
94
+ functions: {
95
+ ...queries,
96
+ ...mutations,
97
+ },
98
+ });
99
+
100
+ export default component;
101
+ ```
102
+
103
+ #### 4. Component Functions
104
+
105
+ ```typescript
106
+ // src/functions/queries.ts
107
+ import { query } from "../_generated/server";
108
+ import { v } from "convex/values";
109
+
110
+ export const list = query({
111
+ args: {
112
+ limit: v.optional(v.number()),
113
+ },
114
+ returns: v.array(v.object({
115
+ _id: v.id("items"),
116
+ name: v.string(),
117
+ data: v.any(),
118
+ createdAt: v.number(),
119
+ })),
120
+ handler: async (ctx, args) => {
121
+ return await ctx.db
122
+ .query("items")
123
+ .order("desc")
124
+ .take(args.limit ?? 10);
125
+ },
126
+ });
127
+
128
+ export const get = query({
129
+ args: { name: v.string() },
130
+ returns: v.union(v.object({
131
+ _id: v.id("items"),
132
+ name: v.string(),
133
+ data: v.any(),
134
+ }), v.null()),
135
+ handler: async (ctx, args) => {
136
+ return await ctx.db
137
+ .query("items")
138
+ .withIndex("by_name", (q) => q.eq("name", args.name))
139
+ .unique();
140
+ },
141
+ });
142
+ ```
143
+
144
+ ```typescript
145
+ // src/functions/mutations.ts
146
+ import { mutation } from "../_generated/server";
147
+ import { v } from "convex/values";
148
+
149
+ export const create = mutation({
150
+ args: {
151
+ name: v.string(),
152
+ data: v.any(),
153
+ },
154
+ returns: v.id("items"),
155
+ handler: async (ctx, args) => {
156
+ return await ctx.db.insert("items", {
157
+ name: args.name,
158
+ data: args.data,
159
+ createdAt: Date.now(),
160
+ });
161
+ },
162
+ });
163
+
164
+ export const update = mutation({
165
+ args: {
166
+ id: v.id("items"),
167
+ data: v.any(),
168
+ },
169
+ returns: v.null(),
170
+ handler: async (ctx, args) => {
171
+ await ctx.db.patch(args.id, { data: args.data });
172
+ return null;
173
+ },
174
+ });
175
+
176
+ export const remove = mutation({
177
+ args: { id: v.id("items") },
178
+ returns: v.null(),
179
+ handler: async (ctx, args) => {
180
+ await ctx.db.delete(args.id);
181
+ return null;
182
+ },
183
+ });
184
+ ```
185
+
186
+ #### 5. Main Exports
187
+
188
+ ```typescript
189
+ // src/index.ts
190
+ export { default as component } from "./component";
191
+ export * from "./functions/queries";
192
+ export * from "./functions/mutations";
193
+
194
+ // Export types for consumers
195
+ export type { Id } from "./_generated/dataModel";
196
+ ```
197
+
198
+ ### Using a Component
199
+
200
+ ```typescript
201
+ // In the consuming app's convex/convex.config.ts
202
+ import { defineApp } from "convex/server";
203
+ import myComponent from "my-convex-component";
204
+
205
+ const app = defineApp();
206
+
207
+ app.use(myComponent, { name: "myComponent" });
208
+
209
+ export default app;
210
+ ```
211
+
212
+ ```typescript
213
+ // In the consuming app's code
214
+ import { useQuery, useMutation } from "convex/react";
215
+ import { api } from "../convex/_generated/api";
216
+
217
+ function MyApp() {
218
+ // Access component functions through the app's API
219
+ const items = useQuery(api.myComponent.list, { limit: 10 });
220
+ const createItem = useMutation(api.myComponent.create);
221
+
222
+ return (
223
+ <div>
224
+ {items?.map((item) => (
225
+ <div key={item._id}>{item.name}</div>
226
+ ))}
227
+ <button onClick={() => createItem({ name: "New", data: {} })}>
228
+ Add Item
229
+ </button>
230
+ </div>
231
+ );
232
+ }
233
+ ```
234
+
235
+ ### Component Configuration Options
236
+
237
+ ```typescript
238
+ // convex/convex.config.ts
239
+ import { defineApp } from "convex/server";
240
+ import myComponent from "my-convex-component";
241
+
242
+ const app = defineApp();
243
+
244
+ // Basic usage
245
+ app.use(myComponent);
246
+
247
+ // With custom name
248
+ app.use(myComponent, { name: "customName" });
249
+
250
+ // Multiple instances
251
+ app.use(myComponent, { name: "instance1" });
252
+ app.use(myComponent, { name: "instance2" });
253
+
254
+ export default app;
255
+ ```
256
+
257
+ ### Providing Component Hooks
258
+
259
+ ```typescript
260
+ // src/hooks.ts
261
+ import { useQuery, useMutation } from "convex/react";
262
+ import { FunctionReference } from "convex/server";
263
+
264
+ // Type-safe hooks for component consumers
265
+ export function useMyComponent(api: {
266
+ list: FunctionReference<"query">;
267
+ create: FunctionReference<"mutation">;
268
+ }) {
269
+ const items = useQuery(api.list, {});
270
+ const createItem = useMutation(api.create);
271
+
272
+ return {
273
+ items,
274
+ createItem,
275
+ isLoading: items === undefined,
276
+ };
277
+ }
278
+ ```
279
+
280
+ ### Publishing a Component
281
+
282
+ #### package.json
283
+
284
+ ```json
285
+ {
286
+ "name": "my-convex-component",
287
+ "version": "1.0.0",
288
+ "description": "A reusable Convex component",
289
+ "main": "dist/index.js",
290
+ "types": "dist/index.d.ts",
291
+ "files": [
292
+ "dist",
293
+ "convex.config.ts"
294
+ ],
295
+ "scripts": {
296
+ "build": "tsc",
297
+ "prepublishOnly": "npm run build"
298
+ },
299
+ "peerDependencies": {
300
+ "convex": "^1.0.0"
301
+ },
302
+ "devDependencies": {
303
+ "convex": "^1.17.0",
304
+ "typescript": "^5.0.0"
305
+ },
306
+ "keywords": [
307
+ "convex",
308
+ "component"
309
+ ]
310
+ }
311
+ ```
312
+
313
+ #### tsconfig.json
314
+
315
+ ```json
316
+ {
317
+ "compilerOptions": {
318
+ "target": "ES2020",
319
+ "module": "ESNext",
320
+ "moduleResolution": "bundler",
321
+ "declaration": true,
322
+ "outDir": "dist",
323
+ "strict": true,
324
+ "esModuleInterop": true,
325
+ "skipLibCheck": true
326
+ },
327
+ "include": ["src/**/*"],
328
+ "exclude": ["node_modules", "dist"]
329
+ }
330
+ ```
331
+
332
+ ## Examples
333
+
334
+ ### Rate Limiter Component
335
+
336
+ ```typescript
337
+ // rate-limiter/src/schema.ts
338
+ import { defineSchema, defineTable } from "convex/server";
339
+ import { v } from "convex/values";
340
+
341
+ export default defineSchema({
342
+ requests: defineTable({
343
+ key: v.string(),
344
+ timestamp: v.number(),
345
+ })
346
+ .index("by_key", ["key"])
347
+ .index("by_key_and_time", ["key", "timestamp"]),
348
+ });
349
+ ```
350
+
351
+ ```typescript
352
+ // rate-limiter/src/functions/mutations.ts
353
+ import { mutation } from "../_generated/server";
354
+ import { v } from "convex/values";
355
+
356
+ export const checkLimit = mutation({
357
+ args: {
358
+ key: v.string(),
359
+ limit: v.number(),
360
+ windowMs: v.number(),
361
+ },
362
+ returns: v.object({
363
+ allowed: v.boolean(),
364
+ remaining: v.number(),
365
+ resetAt: v.number(),
366
+ }),
367
+ handler: async (ctx, args) => {
368
+ const now = Date.now();
369
+ const windowStart = now - args.windowMs;
370
+
371
+ // Clean old entries
372
+ const oldEntries = await ctx.db
373
+ .query("requests")
374
+ .withIndex("by_key_and_time", (q) =>
375
+ q.eq("key", args.key).lt("timestamp", windowStart)
376
+ )
377
+ .collect();
378
+
379
+ for (const entry of oldEntries) {
380
+ await ctx.db.delete(entry._id);
381
+ }
382
+
383
+ // Count current window
384
+ const currentRequests = await ctx.db
385
+ .query("requests")
386
+ .withIndex("by_key", (q) => q.eq("key", args.key))
387
+ .collect();
388
+
389
+ const remaining = Math.max(0, args.limit - currentRequests.length);
390
+ const allowed = remaining > 0;
391
+
392
+ if (allowed) {
393
+ await ctx.db.insert("requests", {
394
+ key: args.key,
395
+ timestamp: now,
396
+ });
397
+ }
398
+
399
+ const oldestRequest = currentRequests[0];
400
+ const resetAt = oldestRequest
401
+ ? oldestRequest.timestamp + args.windowMs
402
+ : now + args.windowMs;
403
+
404
+ return { allowed, remaining: remaining - (allowed ? 1 : 0), resetAt };
405
+ },
406
+ });
407
+ ```
408
+
409
+ ```typescript
410
+ // Usage in consuming app
411
+ import { useMutation } from "convex/react";
412
+ import { api } from "../convex/_generated/api";
413
+
414
+ function useRateLimitedAction() {
415
+ const checkLimit = useMutation(api.rateLimiter.checkLimit);
416
+
417
+ return async (action: () => Promise<void>) => {
418
+ const result = await checkLimit({
419
+ key: "user-action",
420
+ limit: 10,
421
+ windowMs: 60000,
422
+ });
423
+
424
+ if (!result.allowed) {
425
+ throw new Error(`Rate limited. Try again at ${new Date(result.resetAt)}`);
426
+ }
427
+
428
+ await action();
429
+ };
430
+ }
431
+ ```
432
+
433
+ ## Best Practices
434
+
435
+ - Never run `npx convex deploy` unless explicitly instructed
436
+ - Never run any git commands unless explicitly instructed
437
+ - Keep component tables isolated (don't reference main app tables)
438
+ - Export clear TypeScript types for consumers
439
+ - Document all public functions and their arguments
440
+ - Use semantic versioning for component releases
441
+ - Include comprehensive README with examples
442
+ - Test components in isolation before publishing
443
+
444
+ ## Common Pitfalls
445
+
446
+ 1. **Cross-referencing tables** - Component tables should be self-contained
447
+ 2. **Missing type exports** - Export all necessary types
448
+ 3. **Hardcoded configuration** - Use component options for customization
449
+ 4. **No versioning** - Follow semantic versioning
450
+ 5. **Poor documentation** - Document all public APIs
451
+
452
+ ## References
453
+
454
+ - Convex Documentation: https://docs.convex.dev/
455
+ - Convex LLMs.txt: https://docs.convex.dev/llms.txt
456
+ - Components: https://docs.convex.dev/components
457
+ - Component Authoring: https://docs.convex.dev/components/authoring
@@ -0,0 +1,3 @@
1
+ interface:
2
+ icon_small: "./assets/small-logo.svg"
3
+ icon_large: "./assets/large-logo.png"
@@ -0,0 +1,17 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_3_23)">
3
+ <g clip-path="url(#clip1_3_23)">
4
+ <path d="M10.0643 12.5735C12.3769 12.3166 14.5572 11.0843 15.7577 9.02756C15.1892 14.1148 9.62646 17.3302 5.08583 15.356C4.66743 15.1746 4.30728 14.8728 4.06013 14.4848C3.03973 12.8825 2.7043 10.8437 3.18626 8.99344C4.56327 11.37 7.3632 12.8267 10.0643 12.5735Z" fill="#F3B01C"/>
5
+ <path d="M3.1018 7.50072C2.16436 9.66714 2.12376 12.2034 3.27303 14.2907C-0.771507 11.2479 -0.72737 4.7362 3.2236 1.72378C3.58904 1.44535 4.02333 1.2801 4.47881 1.25494C6.3519 1.15614 8.25501 1.88006 9.58963 3.22909C6.87799 3.25604 4.23695 4.99308 3.1018 7.50072Z" fill="#8D2676"/>
6
+ <path d="M10.8974 3.89562C9.52924 1.98794 7.38779 0.68921 5.04156 0.649695C9.57686 -1.40888 15.1555 1.92867 15.7629 6.86314C15.8194 7.32119 15.7452 7.78824 15.5421 8.20138C14.6948 9.92223 13.1236 11.2569 11.2876 11.7508C12.6328 9.25579 12.4668 6.20748 10.8974 3.89562Z" fill="#EE342F"/>
7
+ </g>
8
+ </g>
9
+ <defs>
10
+ <clipPath id="clip0_3_23">
11
+ <rect width="16" height="16" fill="white"/>
12
+ </clipPath>
13
+ <clipPath id="clip1_3_23">
14
+ <rect width="16" height="16" fill="white"/>
15
+ </clipPath>
16
+ </defs>
17
+ </svg>