oneie 3.6.4 → 3.6.6
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/.claude/commands/one copy.md +565 -0
- package/.claude/hooks/README-knowledge-hooks.md +265 -0
- package/.claude/hooks/__pycache__/knowledge-post.cpython-313.pyc +0 -0
- package/.claude/hooks/__pycache__/knowledge-pre.cpython-313.pyc +0 -0
- package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
- package/.claude/hooks/check-filenames.py +40 -0
- package/.claude/hooks/clean-post.py +301 -0
- package/.claude/hooks/clean-pre.py +308 -0
- package/.claude/hooks/done.py +175 -0
- package/.claude/hooks/format-hook.sh +75 -0
- package/.claude/hooks/hook-logger.sh +59 -0
- package/.claude/hooks/knowledge-post.py +251 -0
- package/.claude/hooks/knowledge-pre.py +150 -0
- package/.claude/hooks/notification-hook.sh +112 -0
- package/.claude/hooks/security-hook.sh +157 -0
- package/.claude/hooks/tag-all-docs.py +338 -0
- package/.claude/hooks/todo.py +298 -0
- package/.claude/hooks/validate-ontology-structure.py +455 -0
- package/.claude/skills/astro/add-content-collection.md +30 -0
- package/.claude/skills/astro/check-build.md +29 -0
- package/.claude/skills/astro/create-component.md +29 -0
- package/.claude/skills/astro/create-page.md +30 -0
- package/.claude/skills/astro/optimize-performance.md +21 -0
- package/.claude/skills/convex/check-deployment.md +46 -0
- package/.claude/skills/convex/create-mutation.md +405 -0
- package/.claude/skills/convex/create-query.md +52 -0
- package/.claude/skills/convex/read-schema.md +373 -0
- package/.claude/skills/convex/test-function.md +50 -0
- package/.claude/skills/deployment/check-deployment-health.md +20 -0
- package/.claude/skills/deployment/create-release.md +21 -0
- package/.claude/skills/deployment/deploy-cloudflare.md +31 -0
- package/.claude/skills/deployment/deploy-convex.md +30 -0
- package/.claude/skills/deployment/sync-repositories.md +19 -0
- package/.claude/skills/design/check-accessibility.md +21 -0
- package/.claude/skills/design/create-component-spec.md +27 -0
- package/.claude/skills/design/generate-design-tokens.md +24 -0
- package/.claude/skills/design/generate-wireframe.md +30 -0
- package/.claude/skills/documentation/create-migration-guide.md +20 -0
- package/.claude/skills/documentation/generate-api-docs.md +27 -0
- package/.claude/skills/documentation/generate-readme.md +22 -0
- package/.claude/skills/documentation/update-knowledge.md +20 -0
- package/.claude/skills/integration/connect-external-system.md +21 -0
- package/.claude/skills/integration/implement-a2a.md +20 -0
- package/.claude/skills/integration/implement-acp.md +20 -0
- package/.claude/skills/integration/verify-integration.md +20 -0
- package/.claude/skills/ontology/README.md +255 -0
- package/.claude/skills/ontology/check-dimension.md +307 -0
- package/.claude/skills/ontology/generate-entity-type.md +339 -0
- package/.claude/skills/ontology/validate-schema.md +229 -0
- package/.claude/skills/ontology/verify-relationships.md +310 -0
- package/.claude/skills/problem-solving/analyze-test-failure.md +21 -0
- package/.claude/skills/problem-solving/identify-root-cause.md +20 -0
- package/.claude/skills/problem-solving/propose-solution.md +29 -0
- package/.claude/skills/problem-solving/verify-fix.md +21 -0
- package/.claude/skills/sales/generate-demo-script.md +21 -0
- package/.claude/skills/sales/qualify-lead.md +30 -0
- package/.claude/skills/sales/track-trial.md +20 -0
- package/.claude/skills/sales/verify-kyc.md +20 -0
- package/.claude/skills/testing/analyze-coverage.md +24 -0
- package/.claude/skills/testing/generate-tests.md +24 -0
- package/.claude/skills/testing/run-tests.md +27 -0
- package/.claude/skills/testing/validate-e2e.md +25 -0
- package/.mcp.json +30 -3
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +13 -6
- package/dist/commands/init.js.map +1 -1
- package/dist/utils/installation-setup.d.ts.map +1 -1
- package/dist/utils/installation-setup.js +9 -0
- package/dist/utils/installation-setup.js.map +1 -1
- package/dist/utils/launch-claude.d.ts +3 -2
- package/dist/utils/launch-claude.d.ts.map +1 -1
- package/dist/utils/launch-claude.js +64 -29
- package/dist/utils/launch-claude.js.map +1 -1
- package/one/.obsidian/workspace.json +22 -22
- package/one/events/CREATE-WEBSITE.md +442 -0
- package/one/events/CUSTOM-DOMAIN.md +357 -0
- package/one/events/DEPLOYMENT copy.md +426 -0
- package/one/events/ECOMMERCE-BEFORE-AFTER.md +251 -0
- package/one/events/ECOMMERCE-ENHANCEMENTS.md +576 -0
- package/one/events/ECOMMERCE-HIGH-CONVERTING-ELEMENTS.md +421 -0
- package/one/events/ECOMMERCE-REFACTOR-SUMMARY.md +196 -0
- package/one/events/ECOMMERCE-SETUP-SUMMARY.md +396 -0
- package/one/events/INSTALLATION_FOLDERS.md +516 -0
- package/one/events/INSTALLATION_FOLDERS_FILES.md +205 -0
- package/one/events/INSTALLATION_FOLDERS_SUMMARY.md +419 -0
- package/one/events/LICENSE.md +89 -0
- package/one/events/MCP-CONFIGURATION.md +336 -0
- package/one/events/MCP-SETUP-COMPLETE.md +205 -0
- package/one/events/NODE-UPGRADE.md +111 -0
- package/one/events/PACKAGE-STRUCTURE.md +310 -0
- package/one/events/PLAYBOOK-SETUP-SUMMARY.md +331 -0
- package/one/events/PROMPT_FIX_FRONTEND_ONLY.md +567 -0
- package/one/events/SIMPLE_FIX_FRONTEND_ONLY.md +262 -0
- package/one/events/STRIPE-INTEGRATION.md +414 -0
- package/one/events/STRIPE-SETUP-GUIDE.md +462 -0
- package/one/events/TRANSPARENCY-FIXES.md +275 -0
- package/package.json +4 -2
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
# Read and Parse Convex Schema
|
|
2
|
+
|
|
3
|
+
**Category:** convex
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Used By:** agent-backend, agent-builder, agent-quality, agent-director, agent-integrator
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Reads and parses a Convex schema file to extract table definitions, field types, indexes, and relationships for use by other skills and agents.
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
- **schemaPath** (string): Path to schema file. Default: `backend/convex/schema.ts`
|
|
14
|
+
- **tableFilter** (array, optional): Only return specific tables. Default: all tables
|
|
15
|
+
|
|
16
|
+
## Outputs
|
|
17
|
+
|
|
18
|
+
- **tables** (object): Map of table name → table definition
|
|
19
|
+
- **tableCount** (number): Total number of tables
|
|
20
|
+
- **indexes** (object): Map of table → array of indexes
|
|
21
|
+
- **relationships** (array): Foreign key relationships detected
|
|
22
|
+
- **schemaVersion** (string): Convex schema version used
|
|
23
|
+
- **raw** (string): Raw schema file content (for advanced usage)
|
|
24
|
+
|
|
25
|
+
## Prerequisites
|
|
26
|
+
|
|
27
|
+
- Schema file exists at specified path
|
|
28
|
+
- Schema follows Convex `defineSchema` format
|
|
29
|
+
- TypeScript/JavaScript syntax is valid
|
|
30
|
+
|
|
31
|
+
## Steps
|
|
32
|
+
|
|
33
|
+
1. **Read Schema File**
|
|
34
|
+
- Use Read tool to load file from schemaPath
|
|
35
|
+
- Handle file not found gracefully
|
|
36
|
+
- Verify file contains `defineSchema`
|
|
37
|
+
|
|
38
|
+
2. **Parse Schema Structure**
|
|
39
|
+
- Extract `defineSchema({ ... })` block
|
|
40
|
+
- Identify all table definitions (defineTable)
|
|
41
|
+
- Parse each table's field definitions
|
|
42
|
+
- Extract validator types (v.string(), v.number(), etc.)
|
|
43
|
+
|
|
44
|
+
3. **Extract Table Definitions**
|
|
45
|
+
- For each table:
|
|
46
|
+
- Table name
|
|
47
|
+
- Field names and types
|
|
48
|
+
- Required vs optional fields
|
|
49
|
+
- Default values
|
|
50
|
+
- Validator constraints
|
|
51
|
+
|
|
52
|
+
4. **Parse Indexes**
|
|
53
|
+
- Find all `.index()` calls
|
|
54
|
+
- Extract index name
|
|
55
|
+
- Extract indexed fields
|
|
56
|
+
- Determine index type (single field, compound, search)
|
|
57
|
+
|
|
58
|
+
5. **Detect Relationships**
|
|
59
|
+
- Find all `v.id("tableName")` references
|
|
60
|
+
- Map foreign key fields to target tables
|
|
61
|
+
- Identify relationship type (one-to-one, one-to-many)
|
|
62
|
+
- Note bidirectional relationships
|
|
63
|
+
|
|
64
|
+
6. **Determine Schema Version**
|
|
65
|
+
- Check import statement for Convex version
|
|
66
|
+
- Look for version-specific features
|
|
67
|
+
- Default to latest known version
|
|
68
|
+
|
|
69
|
+
7. **Apply Table Filter** (if provided)
|
|
70
|
+
- Filter tables object to only requested tables
|
|
71
|
+
- Maintain relationships for filtered tables
|
|
72
|
+
- Update tableCount
|
|
73
|
+
|
|
74
|
+
8. **Return Parsed Schema**
|
|
75
|
+
- Structured data ready for other skills
|
|
76
|
+
- Include raw content for advanced parsing
|
|
77
|
+
- Provide metadata about schema
|
|
78
|
+
|
|
79
|
+
## Examples
|
|
80
|
+
|
|
81
|
+
### Example 1: Read Full Schema
|
|
82
|
+
|
|
83
|
+
**Input:**
|
|
84
|
+
```typescript
|
|
85
|
+
schemaPath: "backend/convex/schema.ts"
|
|
86
|
+
tableFilter: null
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Schema Content:**
|
|
90
|
+
```typescript
|
|
91
|
+
import { defineSchema, defineTable } from "convex/server";
|
|
92
|
+
import { v } from "convex/values";
|
|
93
|
+
|
|
94
|
+
export default defineSchema({
|
|
95
|
+
groups: defineTable({
|
|
96
|
+
name: v.string(),
|
|
97
|
+
type: v.union(
|
|
98
|
+
v.literal("friend_circle"),
|
|
99
|
+
v.literal("business"),
|
|
100
|
+
v.literal("community"),
|
|
101
|
+
v.literal("dao"),
|
|
102
|
+
v.literal("government"),
|
|
103
|
+
v.literal("organization")
|
|
104
|
+
),
|
|
105
|
+
parentGroupId: v.optional(v.id("groups")),
|
|
106
|
+
properties: v.any(),
|
|
107
|
+
status: v.union(v.literal("draft"), v.literal("active"), v.literal("archived")),
|
|
108
|
+
createdAt: v.number(),
|
|
109
|
+
updatedAt: v.number(),
|
|
110
|
+
})
|
|
111
|
+
.index("by_type", ["type"])
|
|
112
|
+
.index("by_parent", ["parentGroupId"]),
|
|
113
|
+
|
|
114
|
+
things: defineTable({
|
|
115
|
+
groupId: v.id("groups"),
|
|
116
|
+
type: v.string(),
|
|
117
|
+
name: v.string(),
|
|
118
|
+
properties: v.any(),
|
|
119
|
+
status: v.union(v.literal("draft"), v.literal("active"), v.literal("published"), v.literal("archived")),
|
|
120
|
+
createdAt: v.number(),
|
|
121
|
+
updatedAt: v.number(),
|
|
122
|
+
})
|
|
123
|
+
.index("by_group", ["groupId"])
|
|
124
|
+
.index("by_type", ["type"])
|
|
125
|
+
.index("by_group_and_type", ["groupId", "type"]),
|
|
126
|
+
|
|
127
|
+
connections: defineTable({
|
|
128
|
+
groupId: v.id("groups"),
|
|
129
|
+
sourceId: v.id("things"),
|
|
130
|
+
targetId: v.id("things"),
|
|
131
|
+
type: v.string(),
|
|
132
|
+
metadata: v.any(),
|
|
133
|
+
validFrom: v.optional(v.number()),
|
|
134
|
+
validTo: v.optional(v.number()),
|
|
135
|
+
createdAt: v.number(),
|
|
136
|
+
updatedAt: v.number(),
|
|
137
|
+
})
|
|
138
|
+
.index("by_group", ["groupId"])
|
|
139
|
+
.index("by_source", ["sourceId"])
|
|
140
|
+
.index("by_target", ["targetId"])
|
|
141
|
+
.index("by_type", ["type"]),
|
|
142
|
+
});
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Output:**
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"tables": {
|
|
149
|
+
"groups": {
|
|
150
|
+
"fields": {
|
|
151
|
+
"_id": { "type": "Id<'groups'>", "required": true },
|
|
152
|
+
"name": { "type": "string", "required": true },
|
|
153
|
+
"type": { "type": "union", "values": ["friend_circle", "business", "community", "dao", "government", "organization"], "required": true },
|
|
154
|
+
"parentGroupId": { "type": "Id<'groups'>", "required": false },
|
|
155
|
+
"properties": { "type": "any", "required": true },
|
|
156
|
+
"status": { "type": "union", "values": ["draft", "active", "archived"], "required": true },
|
|
157
|
+
"createdAt": { "type": "number", "required": true },
|
|
158
|
+
"updatedAt": { "type": "number", "required": true }
|
|
159
|
+
},
|
|
160
|
+
"indexes": ["by_type", "by_parent"]
|
|
161
|
+
},
|
|
162
|
+
"things": {
|
|
163
|
+
"fields": {
|
|
164
|
+
"_id": { "type": "Id<'things'>", "required": true },
|
|
165
|
+
"groupId": { "type": "Id<'groups'>", "required": true },
|
|
166
|
+
"type": { "type": "string", "required": true },
|
|
167
|
+
"name": { "type": "string", "required": true },
|
|
168
|
+
"properties": { "type": "any", "required": true },
|
|
169
|
+
"status": { "type": "union", "values": ["draft", "active", "published", "archived"], "required": true },
|
|
170
|
+
"createdAt": { "type": "number", "required": true },
|
|
171
|
+
"updatedAt": { "type": "number", "required": true }
|
|
172
|
+
},
|
|
173
|
+
"indexes": ["by_group", "by_type", "by_group_and_type"]
|
|
174
|
+
},
|
|
175
|
+
"connections": {
|
|
176
|
+
"fields": {
|
|
177
|
+
"_id": { "type": "Id<'connections'>", "required": true },
|
|
178
|
+
"groupId": { "type": "Id<'groups'>", "required": true },
|
|
179
|
+
"sourceId": { "type": "Id<'things'>", "required": true },
|
|
180
|
+
"targetId": { "type": "Id<'things'>", "required": true },
|
|
181
|
+
"type": { "type": "string", "required": true },
|
|
182
|
+
"metadata": { "type": "any", "required": true },
|
|
183
|
+
"validFrom": { "type": "number", "required": false },
|
|
184
|
+
"validTo": { "type": "number", "required": false },
|
|
185
|
+
"createdAt": { "type": "number", "required": true },
|
|
186
|
+
"updatedAt": { "type": "number", "required": true }
|
|
187
|
+
},
|
|
188
|
+
"indexes": ["by_group", "by_source", "by_target", "by_type"]
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"tableCount": 3,
|
|
192
|
+
"indexes": {
|
|
193
|
+
"groups": [
|
|
194
|
+
{ "name": "by_type", "fields": ["type"] },
|
|
195
|
+
{ "name": "by_parent", "fields": ["parentGroupId"] }
|
|
196
|
+
],
|
|
197
|
+
"things": [
|
|
198
|
+
{ "name": "by_group", "fields": ["groupId"] },
|
|
199
|
+
{ "name": "by_type", "fields": ["type"] },
|
|
200
|
+
{ "name": "by_group_and_type", "fields": ["groupId", "type"] }
|
|
201
|
+
],
|
|
202
|
+
"connections": [
|
|
203
|
+
{ "name": "by_group", "fields": ["groupId"] },
|
|
204
|
+
{ "name": "by_source", "fields": ["sourceId"] },
|
|
205
|
+
{ "name": "by_target", "fields": ["targetId"] },
|
|
206
|
+
{ "name": "by_type", "fields": ["type"] }
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"relationships": [
|
|
210
|
+
{
|
|
211
|
+
"fromTable": "groups",
|
|
212
|
+
"fromField": "parentGroupId",
|
|
213
|
+
"toTable": "groups",
|
|
214
|
+
"toField": "_id",
|
|
215
|
+
"type": "self-reference",
|
|
216
|
+
"optional": true
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"fromTable": "things",
|
|
220
|
+
"fromField": "groupId",
|
|
221
|
+
"toTable": "groups",
|
|
222
|
+
"toField": "_id",
|
|
223
|
+
"type": "many-to-one",
|
|
224
|
+
"optional": false
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"fromTable": "connections",
|
|
228
|
+
"fromField": "groupId",
|
|
229
|
+
"toTable": "groups",
|
|
230
|
+
"toField": "_id",
|
|
231
|
+
"type": "many-to-one",
|
|
232
|
+
"optional": false
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"fromTable": "connections",
|
|
236
|
+
"fromField": "sourceId",
|
|
237
|
+
"toTable": "things",
|
|
238
|
+
"toField": "_id",
|
|
239
|
+
"type": "many-to-one",
|
|
240
|
+
"optional": false
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"fromTable": "connections",
|
|
244
|
+
"fromField": "targetId",
|
|
245
|
+
"toTable": "things",
|
|
246
|
+
"toField": "_id",
|
|
247
|
+
"type": "many-to-one",
|
|
248
|
+
"optional": false
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"schemaVersion": "1.0",
|
|
252
|
+
"raw": "[full schema file content]"
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Example 2: Read Specific Tables
|
|
257
|
+
|
|
258
|
+
**Input:**
|
|
259
|
+
```typescript
|
|
260
|
+
schemaPath: "backend/convex/schema.ts"
|
|
261
|
+
tableFilter: ["things", "connections"]
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Output:**
|
|
265
|
+
```json
|
|
266
|
+
{
|
|
267
|
+
"tables": {
|
|
268
|
+
"things": { "fields": {...}, "indexes": [...] },
|
|
269
|
+
"connections": { "fields": {...}, "indexes": [...] }
|
|
270
|
+
},
|
|
271
|
+
"tableCount": 2,
|
|
272
|
+
"indexes": {
|
|
273
|
+
"things": [...],
|
|
274
|
+
"connections": [...]
|
|
275
|
+
},
|
|
276
|
+
"relationships": [
|
|
277
|
+
{
|
|
278
|
+
"fromTable": "things",
|
|
279
|
+
"fromField": "groupId",
|
|
280
|
+
"toTable": "groups",
|
|
281
|
+
"toField": "_id",
|
|
282
|
+
"type": "many-to-one",
|
|
283
|
+
"optional": false
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"fromTable": "connections",
|
|
287
|
+
"fromField": "sourceId",
|
|
288
|
+
"toTable": "things",
|
|
289
|
+
"toField": "_id",
|
|
290
|
+
"type": "many-to-one",
|
|
291
|
+
"optional": false
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
"schemaVersion": "1.0",
|
|
295
|
+
"raw": "[full schema file content]"
|
|
296
|
+
}
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
## Error Handling
|
|
300
|
+
|
|
301
|
+
- **File Not Found:** Return clear error with correct path
|
|
302
|
+
- **Parse Error:** Return line number and syntax error description
|
|
303
|
+
- **Invalid Schema:** Explain what's wrong with schema structure
|
|
304
|
+
- **No Tables Found:** Check if defineSchema is present
|
|
305
|
+
|
|
306
|
+
## Dependencies
|
|
307
|
+
|
|
308
|
+
- **Tools:** Read (to load schema file), Grep (optional, for pattern matching)
|
|
309
|
+
- **Skills:** None (foundational Convex skill)
|
|
310
|
+
- **Docs:**
|
|
311
|
+
- `https://docs.convex.dev/database/schemas` - Convex schema documentation
|
|
312
|
+
- `/one/knowledge/ontology.md` - ONE ontology for expected tables
|
|
313
|
+
|
|
314
|
+
## Tests
|
|
315
|
+
|
|
316
|
+
1. **Test Valid Schema:** Parse complete 6-dimension schema successfully
|
|
317
|
+
2. **Test Minimal Schema:** Parse schema with single table
|
|
318
|
+
3. **Test Complex Types:** Parse nested objects, arrays, unions
|
|
319
|
+
4. **Test Relationships:** Detect all foreign key references
|
|
320
|
+
5. **Test Indexes:** Extract all index definitions correctly
|
|
321
|
+
6. **Test Table Filter:** Return only requested tables
|
|
322
|
+
7. **Test Invalid Syntax:** Handle malformed schema gracefully
|
|
323
|
+
|
|
324
|
+
## Performance
|
|
325
|
+
|
|
326
|
+
- **Parse Time:** < 500ms for typical schema (5-10 tables)
|
|
327
|
+
- **Caching:** Cache parsed schema (invalidate on file change)
|
|
328
|
+
- **Optimization:** Parse incrementally for large schemas
|
|
329
|
+
|
|
330
|
+
## Usage Patterns
|
|
331
|
+
|
|
332
|
+
### In Other Skills
|
|
333
|
+
|
|
334
|
+
```markdown
|
|
335
|
+
## In create-mutation.md
|
|
336
|
+
|
|
337
|
+
1. USE SKILL: `skills/convex/read-schema.md`
|
|
338
|
+
- Input: schemaPath
|
|
339
|
+
- SAVE result as SCHEMA
|
|
340
|
+
|
|
341
|
+
2. Check if target table exists
|
|
342
|
+
- IF SCHEMA.tables["targetTable"] is undefined
|
|
343
|
+
- RETURN error: "Table not found in schema"
|
|
344
|
+
|
|
345
|
+
3. Get field types from schema
|
|
346
|
+
- Use SCHEMA.tables["targetTable"].fields
|
|
347
|
+
- Validate input types match schema
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### In Agents
|
|
351
|
+
|
|
352
|
+
```markdown
|
|
353
|
+
## In agent-backend
|
|
354
|
+
|
|
355
|
+
Before creating mutation:
|
|
356
|
+
|
|
357
|
+
1. USE SKILL: `skills/convex/read-schema.md`
|
|
358
|
+
- Understand current schema structure
|
|
359
|
+
- Identify available tables and fields
|
|
360
|
+
- Check relationships for validation logic
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
## Lessons Learned
|
|
364
|
+
|
|
365
|
+
- **Parse AST, Not Strings:** Use proper TypeScript parser for robust parsing
|
|
366
|
+
- **Cache Aggressively:** Schema doesn't change often, cache parsed result
|
|
367
|
+
- **Relationships Are Key:** Foreign keys drive query patterns and validation
|
|
368
|
+
- **Index Awareness:** Knowing indexes helps generate efficient queries
|
|
369
|
+
- **Version Matters:** Different Convex versions have different features
|
|
370
|
+
|
|
371
|
+
## Version History
|
|
372
|
+
|
|
373
|
+
- **1.0.0** (2025-10-18): Initial implementation with relationship detection
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Test Convex Function
|
|
2
|
+
|
|
3
|
+
**Category:** convex
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Used By:** agent-quality, agent-backend
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Tests Convex mutations and queries with mocked context and data.
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
- **functionPath** (string): Path to function file
|
|
14
|
+
- **functionName** (string): Function to test
|
|
15
|
+
- **testCases** (array): Test scenarios
|
|
16
|
+
|
|
17
|
+
## Outputs
|
|
18
|
+
|
|
19
|
+
- **testCode** (string): Complete test file
|
|
20
|
+
- **passed** (number): Tests that passed
|
|
21
|
+
- **failed** (number): Tests that failed
|
|
22
|
+
- **coverage** (number): Code coverage percentage
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { test, expect } from "vitest";
|
|
28
|
+
import { convexTest } from "convex-test";
|
|
29
|
+
import { api } from "./_generated/api";
|
|
30
|
+
|
|
31
|
+
test("create blog post", async () => {
|
|
32
|
+
const t = convexTest();
|
|
33
|
+
|
|
34
|
+
const postId = await t.mutation(api.mutations.entities.createBlogPost, {
|
|
35
|
+
groupId: t.toId("groups"),
|
|
36
|
+
title: "Test Post",
|
|
37
|
+
content: "Test content",
|
|
38
|
+
authorId: t.toId("things"),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
expect(postId).toBeDefined();
|
|
42
|
+
|
|
43
|
+
const post = await t.query(api.queries.entities.get, { id: postId });
|
|
44
|
+
expect(post.name).toBe("Test Post");
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Version History
|
|
49
|
+
|
|
50
|
+
- **1.0.0** (2025-10-18): Initial implementation
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Check Deployment Health
|
|
2
|
+
|
|
3
|
+
**Category:** deployment
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Used By:** agent-ops, agent-quality
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Verifies deployment is healthy.
|
|
10
|
+
|
|
11
|
+
## Checks
|
|
12
|
+
|
|
13
|
+
- HTTP 200 responses
|
|
14
|
+
- Function endpoints working
|
|
15
|
+
- Database connections
|
|
16
|
+
- No errors in logs
|
|
17
|
+
|
|
18
|
+
## Version History
|
|
19
|
+
|
|
20
|
+
- **1.0.0** (2025-10-18): Initial implementation
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Create GitHub Release
|
|
2
|
+
|
|
3
|
+
**Category:** deployment
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Used By:** agent-ops
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Creates GitHub release with changelog.
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
gh release create v1.0.0 \
|
|
15
|
+
--title "v1.0.0" \
|
|
16
|
+
--notes "Release notes here"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Version History
|
|
20
|
+
|
|
21
|
+
- **1.0.0** (2025-10-18): Initial implementation
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Deploy to Cloudflare Pages
|
|
2
|
+
|
|
3
|
+
**Category:** deployment
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Used By:** agent-ops
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Deploys Astro site to Cloudflare Pages.
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cd web/
|
|
15
|
+
bun run build
|
|
16
|
+
wrangler pages deploy dist --project-name=web
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Output
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"url": "https://web.one.ie",
|
|
24
|
+
"deploymentId": "abc123",
|
|
25
|
+
"status": "success"
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Version History
|
|
30
|
+
|
|
31
|
+
- **1.0.0** (2025-10-18): Initial implementation
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Deploy Convex Backend
|
|
2
|
+
|
|
3
|
+
**Category:** deployment
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Used By:** agent-ops
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Deploys Convex backend to production.
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cd backend/
|
|
15
|
+
npx convex deploy --prod
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Output
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"deployment": "prod:shocking-falcon-870",
|
|
23
|
+
"functions": 42,
|
|
24
|
+
"status": "deployed"
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Version History
|
|
29
|
+
|
|
30
|
+
- **1.0.0** (2025-10-18): Initial implementation
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Sync Repositories
|
|
2
|
+
|
|
3
|
+
**Category:** deployment
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Used By:** agent-ops
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Syncs files to multiple repositories.
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
- Sync /one/* to cli/one/
|
|
14
|
+
- Sync /web/* to apps/one/web/
|
|
15
|
+
- Sync root docs to all repos
|
|
16
|
+
|
|
17
|
+
## Version History
|
|
18
|
+
|
|
19
|
+
- **1.0.0** (2025-10-18): Initial implementation
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Check Accessibility
|
|
2
|
+
|
|
3
|
+
**Category:** design
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Used By:** agent-quality, agent-designer
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Verifies WCAG compliance.
|
|
10
|
+
|
|
11
|
+
## Checks
|
|
12
|
+
|
|
13
|
+
- Color contrast ratios
|
|
14
|
+
- Keyboard navigation
|
|
15
|
+
- Screen reader support
|
|
16
|
+
- ARIA labels
|
|
17
|
+
- Semantic HTML
|
|
18
|
+
|
|
19
|
+
## Version History
|
|
20
|
+
|
|
21
|
+
- **1.0.0** (2025-10-18): Initial implementation
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Create Component Spec
|
|
2
|
+
|
|
3
|
+
**Category:** design
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Used By:** agent-designer, agent-frontend
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Defines component specifications.
|
|
10
|
+
|
|
11
|
+
## Output
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
interface PricingCardProps {
|
|
15
|
+
tier: string;
|
|
16
|
+
price: number;
|
|
17
|
+
features: string[];
|
|
18
|
+
highlighted: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// States: default, hover, selected
|
|
22
|
+
// Events: onClick, onHover
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Version History
|
|
26
|
+
|
|
27
|
+
- **1.0.0** (2025-10-18): Initial implementation
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Generate Design Tokens
|
|
2
|
+
|
|
3
|
+
**Category:** design
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Used By:** agent-designer
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Creates design token definitions.
|
|
10
|
+
|
|
11
|
+
## Output
|
|
12
|
+
|
|
13
|
+
```css
|
|
14
|
+
@theme {
|
|
15
|
+
--color-primary: 220 90% 50%;
|
|
16
|
+
--color-background: 0 0% 100%;
|
|
17
|
+
--spacing-unit: 4px;
|
|
18
|
+
--font-heading: "Inter", sans-serif;
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Version History
|
|
23
|
+
|
|
24
|
+
- **1.0.0** (2025-10-18): Initial implementation
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Generate Wireframe
|
|
2
|
+
|
|
3
|
+
**Category:** design
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Used By:** agent-designer
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Creates wireframe from feature spec.
|
|
10
|
+
|
|
11
|
+
## Output
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
# Landing Page Wireframe
|
|
15
|
+
|
|
16
|
+
## Layout
|
|
17
|
+
- Header (logo, nav)
|
|
18
|
+
- Hero (heading, CTA)
|
|
19
|
+
- Features (3-col grid)
|
|
20
|
+
- Pricing (table)
|
|
21
|
+
- Footer
|
|
22
|
+
|
|
23
|
+
## Components
|
|
24
|
+
- Button (primary, secondary)
|
|
25
|
+
- Card (with image, title, description)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Version History
|
|
29
|
+
|
|
30
|
+
- **1.0.0** (2025-10-18): Initial implementation
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Create Migration Guide
|
|
2
|
+
|
|
3
|
+
**Category:** documentation
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Used By:** agent-documenter
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Creates migration documentation.
|
|
10
|
+
|
|
11
|
+
## Sections
|
|
12
|
+
|
|
13
|
+
- Breaking changes
|
|
14
|
+
- Migration steps
|
|
15
|
+
- Code examples (before/after)
|
|
16
|
+
- Troubleshooting
|
|
17
|
+
|
|
18
|
+
## Version History
|
|
19
|
+
|
|
20
|
+
- **1.0.0** (2025-10-18): Initial implementation
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Generate API Documentation
|
|
2
|
+
|
|
3
|
+
**Category:** documentation
|
|
4
|
+
**Version:** 1.0.0
|
|
5
|
+
**Used By:** agent-documenter
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Generates API reference from code.
|
|
10
|
+
|
|
11
|
+
## Output
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
## createBlogPost
|
|
15
|
+
|
|
16
|
+
Creates a new blog post.
|
|
17
|
+
|
|
18
|
+
**Parameters:**
|
|
19
|
+
- `title` (string): Post title
|
|
20
|
+
- `content` (string): Post content
|
|
21
|
+
|
|
22
|
+
**Returns:** `Id<"things">`
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Version History
|
|
26
|
+
|
|
27
|
+
- **1.0.0** (2025-10-18): Initial implementation
|