@joktec/skills 0.1.2 → 0.1.4

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 (88) hide show
  1. package/README.md +20 -4
  2. package/bin/joktec-skills.mjs +33 -27
  3. package/dist/claude/skills/joktec-adapter-skill/SKILL.md +5 -0
  4. package/dist/claude/skills/joktec-adapter-skill/references/adapters.md +28 -0
  5. package/dist/claude/skills/joktec-broker-skill/SKILL.md +5 -0
  6. package/dist/claude/skills/joktec-broker-skill/references/brokers.md +29 -0
  7. package/dist/claude/skills/joktec-common-skill/SKILL.md +4 -0
  8. package/dist/claude/skills/joktec-common-skill/references/core.md +56 -0
  9. package/dist/claude/skills/joktec-common-skill/references/utils-cron.md +28 -0
  10. package/dist/claude/skills/joktec-database-extended-skill/SKILL.md +5 -0
  11. package/dist/claude/skills/joktec-database-extended-skill/references/extended-databases.md +24 -0
  12. package/dist/claude/skills/joktec-framework-skill/SKILL.md +1 -0
  13. package/dist/claude/skills/joktec-framework-skill/references/framework-map.md +34 -0
  14. package/dist/claude/skills/joktec-integration-skill/SKILL.md +5 -0
  15. package/dist/claude/skills/joktec-integration-skill/references/integrations.md +29 -0
  16. package/dist/claude/skills/joktec-mongo-skill/SKILL.md +5 -0
  17. package/dist/claude/skills/joktec-mongo-skill/references/repository.md +43 -0
  18. package/dist/claude/skills/joktec-mongo-skill/references/schema-and-plugins.md +29 -0
  19. package/dist/claude/skills/joktec-mysql-skill/SKILL.md +7 -1
  20. package/dist/claude/skills/joktec-mysql-skill/references/entities.md +100 -0
  21. package/dist/claude/skills/joktec-mysql-skill/references/repository.md +49 -0
  22. package/dist/claude/skills/joktec-tool-skill/SKILL.md +5 -0
  23. package/dist/claude/skills/joktec-tool-skill/references/tools.md +35 -0
  24. package/dist/codex/skills/joktec-adapter-skill/SKILL.md +5 -0
  25. package/dist/codex/skills/joktec-adapter-skill/references/adapters.md +28 -0
  26. package/dist/codex/skills/joktec-broker-skill/SKILL.md +5 -0
  27. package/dist/codex/skills/joktec-broker-skill/references/brokers.md +29 -0
  28. package/dist/codex/skills/joktec-common-skill/SKILL.md +4 -0
  29. package/dist/codex/skills/joktec-common-skill/references/core.md +56 -0
  30. package/dist/codex/skills/joktec-common-skill/references/utils-cron.md +28 -0
  31. package/dist/codex/skills/joktec-database-extended-skill/SKILL.md +5 -0
  32. package/dist/codex/skills/joktec-database-extended-skill/references/extended-databases.md +24 -0
  33. package/dist/codex/skills/joktec-framework-skill/SKILL.md +1 -0
  34. package/dist/codex/skills/joktec-framework-skill/references/framework-map.md +34 -0
  35. package/dist/codex/skills/joktec-integration-skill/SKILL.md +5 -0
  36. package/dist/codex/skills/joktec-integration-skill/references/integrations.md +29 -0
  37. package/dist/codex/skills/joktec-mongo-skill/SKILL.md +5 -0
  38. package/dist/codex/skills/joktec-mongo-skill/references/repository.md +43 -0
  39. package/dist/codex/skills/joktec-mongo-skill/references/schema-and-plugins.md +29 -0
  40. package/dist/codex/skills/joktec-mysql-skill/SKILL.md +7 -1
  41. package/dist/codex/skills/joktec-mysql-skill/references/entities.md +100 -0
  42. package/dist/codex/skills/joktec-mysql-skill/references/repository.md +49 -0
  43. package/dist/codex/skills/joktec-tool-skill/SKILL.md +5 -0
  44. package/dist/codex/skills/joktec-tool-skill/references/tools.md +35 -0
  45. package/dist/copilot/.github/copilot-instructions.md +495 -1
  46. package/dist/cursor/.cursor/rules/joktec-adapter-skill.mdc +29 -0
  47. package/dist/cursor/.cursor/rules/joktec-broker-skill.mdc +30 -0
  48. package/dist/cursor/.cursor/rules/joktec-common-skill.mdc +85 -0
  49. package/dist/cursor/.cursor/rules/joktec-database-extended-skill.mdc +25 -0
  50. package/dist/cursor/.cursor/rules/joktec-framework-skill.mdc +35 -0
  51. package/dist/cursor/.cursor/rules/joktec-integration-skill.mdc +30 -0
  52. package/dist/cursor/.cursor/rules/joktec-mongo-skill.mdc +73 -0
  53. package/dist/cursor/.cursor/rules/joktec-mysql-skill.mdc +152 -1
  54. package/dist/cursor/.cursor/rules/joktec-tool-skill.mdc +36 -0
  55. package/dist/gemini/GEMINI.md +495 -1
  56. package/dist/windsurf/.windsurf/rules/joktec-adapter-skill.md +29 -0
  57. package/dist/windsurf/.windsurf/rules/joktec-broker-skill.md +30 -0
  58. package/dist/windsurf/.windsurf/rules/joktec-common-skill.md +85 -0
  59. package/dist/windsurf/.windsurf/rules/joktec-database-extended-skill.md +25 -0
  60. package/dist/windsurf/.windsurf/rules/joktec-framework-skill.md +35 -0
  61. package/dist/windsurf/.windsurf/rules/joktec-integration-skill.md +30 -0
  62. package/dist/windsurf/.windsurf/rules/joktec-mongo-skill.md +73 -0
  63. package/dist/windsurf/.windsurf/rules/joktec-mysql-skill.md +152 -1
  64. package/dist/windsurf/.windsurf/rules/joktec-tool-skill.md +36 -0
  65. package/package.json +1 -1
  66. package/scripts/validate-skills.mjs +32 -0
  67. package/skill-pack.json +261 -52
  68. package/skills/joktec-adapter-skill/SKILL.md +5 -0
  69. package/skills/joktec-adapter-skill/references/adapters.md +28 -0
  70. package/skills/joktec-broker-skill/SKILL.md +5 -0
  71. package/skills/joktec-broker-skill/references/brokers.md +29 -0
  72. package/skills/joktec-common-skill/SKILL.md +4 -0
  73. package/skills/joktec-common-skill/references/core.md +56 -0
  74. package/skills/joktec-common-skill/references/utils-cron.md +28 -0
  75. package/skills/joktec-database-extended-skill/SKILL.md +5 -0
  76. package/skills/joktec-database-extended-skill/references/extended-databases.md +24 -0
  77. package/skills/joktec-framework-skill/SKILL.md +1 -0
  78. package/skills/joktec-framework-skill/references/framework-map.md +34 -0
  79. package/skills/joktec-integration-skill/SKILL.md +5 -0
  80. package/skills/joktec-integration-skill/references/integrations.md +29 -0
  81. package/skills/joktec-mongo-skill/SKILL.md +5 -0
  82. package/skills/joktec-mongo-skill/references/repository.md +43 -0
  83. package/skills/joktec-mongo-skill/references/schema-and-plugins.md +29 -0
  84. package/skills/joktec-mysql-skill/SKILL.md +7 -1
  85. package/skills/joktec-mysql-skill/references/entities.md +100 -0
  86. package/skills/joktec-mysql-skill/references/repository.md +49 -0
  87. package/skills/joktec-tool-skill/SKILL.md +5 -0
  88. package/skills/joktec-tool-skill/references/tools.md +35 -0
package/skill-pack.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joktec/skills",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "sourceOfTruth": "../joktec-framework",
5
5
  "frameworkBaseline": {
6
6
  "repo": "https://github.com/joktec/joktec-framework",
@@ -41,106 +41,315 @@
41
41
  "requiredByDefault": true,
42
42
  "dependencies": [],
43
43
  "recommended": [],
44
- "packages": ["@joktec/*"],
45
- "scope": { "paths": ["**/*"] },
46
- "triggers": ["joktec", "@joktec", "framework", "package selection"],
47
- "outputs": { "codex": true, "claude": true, "cursor": true, "gemini": true, "copilot": true, "windsurf": true }
44
+ "packages": [
45
+ "@joktec/*"
46
+ ],
47
+ "scope": {
48
+ "paths": [
49
+ "**/*"
50
+ ]
51
+ },
52
+ "triggers": [
53
+ "joktec",
54
+ "@joktec",
55
+ "framework",
56
+ "package selection"
57
+ ],
58
+ "outputs": {
59
+ "codex": true,
60
+ "claude": true,
61
+ "cursor": true,
62
+ "gemini": true,
63
+ "copilot": true,
64
+ "windsurf": true
65
+ }
48
66
  },
49
67
  {
50
68
  "id": "joktec-common-skill",
51
69
  "title": "JokTec Common Skill",
52
70
  "role": "foundation",
53
71
  "requiredByDefault": true,
54
- "dependencies": ["joktec-framework-skill"],
72
+ "dependencies": [
73
+ "joktec-framework-skill"
74
+ ],
55
75
  "recommended": [],
56
- "packages": ["@joktec/core", "@joktec/utils", "@joktec/cron", "@joktec/types"],
57
- "scope": { "paths": ["packages/common/**"] },
58
- "triggers": ["BaseController", "BaseService", "pagination", "config", "cron", "utils"],
59
- "outputs": { "codex": true, "claude": true, "cursor": true, "gemini": true, "copilot": true, "windsurf": true }
76
+ "packages": [
77
+ "@joktec/core",
78
+ "@joktec/utils",
79
+ "@joktec/cron",
80
+ "@joktec/types"
81
+ ],
82
+ "scope": {
83
+ "paths": [
84
+ "packages/common/**"
85
+ ]
86
+ },
87
+ "triggers": [
88
+ "BaseController",
89
+ "BaseService",
90
+ "pagination",
91
+ "config",
92
+ "cron",
93
+ "utils"
94
+ ],
95
+ "outputs": {
96
+ "codex": true,
97
+ "claude": true,
98
+ "cursor": true,
99
+ "gemini": true,
100
+ "copilot": true,
101
+ "windsurf": true
102
+ }
60
103
  },
61
104
  {
62
105
  "id": "joktec-mongo-skill",
63
106
  "title": "JokTec Mongo Skill",
64
107
  "role": "focused",
65
108
  "requiredByDefault": false,
66
- "dependencies": ["joktec-framework-skill"],
67
- "recommended": ["joktec-common-skill"],
68
- "packages": ["@joktec/mongo"],
69
- "scope": { "paths": ["packages/databases/mongo/**"] },
70
- "triggers": ["mongo", "mongoose", "typegoose", "MongoRepo", "cursor pagination"],
71
- "outputs": { "codex": true, "claude": true, "cursor": true, "gemini": true, "copilot": true, "windsurf": true }
109
+ "dependencies": [
110
+ "joktec-framework-skill",
111
+ "joktec-common-skill"
112
+ ],
113
+ "recommended": [],
114
+ "packages": [
115
+ "@joktec/mongo"
116
+ ],
117
+ "scope": {
118
+ "paths": [
119
+ "packages/databases/mongo/**"
120
+ ]
121
+ },
122
+ "triggers": [
123
+ "mongo",
124
+ "mongoose",
125
+ "typegoose",
126
+ "MongoRepo",
127
+ "cursor pagination"
128
+ ],
129
+ "outputs": {
130
+ "codex": true,
131
+ "claude": true,
132
+ "cursor": true,
133
+ "gemini": true,
134
+ "copilot": true,
135
+ "windsurf": true
136
+ }
72
137
  },
73
138
  {
74
139
  "id": "joktec-mysql-skill",
75
140
  "title": "JokTec MySQL Skill",
76
141
  "role": "focused",
77
142
  "requiredByDefault": false,
78
- "dependencies": ["joktec-framework-skill"],
79
- "recommended": ["joktec-common-skill"],
80
- "packages": ["@joktec/mysql"],
81
- "scope": { "paths": ["packages/databases/mysql/**"] },
82
- "triggers": ["mysql", "typeorm", "MysqlRepo", "schema-first decorators", "uuidv7"],
83
- "outputs": { "codex": true, "claude": true, "cursor": true, "gemini": true, "copilot": true, "windsurf": true }
143
+ "dependencies": [
144
+ "joktec-framework-skill",
145
+ "joktec-common-skill"
146
+ ],
147
+ "recommended": [],
148
+ "packages": [
149
+ "@joktec/mysql"
150
+ ],
151
+ "scope": {
152
+ "paths": [
153
+ "packages/databases/mysql/**"
154
+ ]
155
+ },
156
+ "triggers": [
157
+ "mysql",
158
+ "typeorm",
159
+ "MysqlRepo",
160
+ "schema-first decorators",
161
+ "uuidv7"
162
+ ],
163
+ "outputs": {
164
+ "codex": true,
165
+ "claude": true,
166
+ "cursor": true,
167
+ "gemini": true,
168
+ "copilot": true,
169
+ "windsurf": true
170
+ }
84
171
  },
85
172
  {
86
173
  "id": "joktec-broker-skill",
87
174
  "title": "JokTec Broker Skill",
88
175
  "role": "grouped",
89
176
  "requiredByDefault": false,
90
- "dependencies": ["joktec-framework-skill"],
91
- "recommended": ["joktec-common-skill"],
92
- "packages": ["@joktec/kafka", "@joktec/rabbit", "@joktec/sqs", "@joktec/redcast"],
93
- "scope": { "paths": ["packages/brokers/**"] },
94
- "triggers": ["kafka", "rabbit", "sqs", "redcast", "broker", "message pattern"],
95
- "outputs": { "codex": true, "claude": true, "cursor": true, "gemini": true, "copilot": true, "windsurf": true }
177
+ "dependencies": [
178
+ "joktec-framework-skill",
179
+ "joktec-common-skill"
180
+ ],
181
+ "recommended": [],
182
+ "packages": [
183
+ "@joktec/kafka",
184
+ "@joktec/rabbit",
185
+ "@joktec/sqs",
186
+ "@joktec/redcast"
187
+ ],
188
+ "scope": {
189
+ "paths": [
190
+ "packages/brokers/**"
191
+ ]
192
+ },
193
+ "triggers": [
194
+ "kafka",
195
+ "rabbit",
196
+ "sqs",
197
+ "redcast",
198
+ "broker",
199
+ "message pattern"
200
+ ],
201
+ "outputs": {
202
+ "codex": true,
203
+ "claude": true,
204
+ "cursor": true,
205
+ "gemini": true,
206
+ "copilot": true,
207
+ "windsurf": true
208
+ }
96
209
  },
97
210
  {
98
211
  "id": "joktec-adapter-skill",
99
212
  "title": "JokTec Adapter Skill",
100
213
  "role": "grouped",
101
214
  "requiredByDefault": false,
102
- "dependencies": ["joktec-framework-skill"],
103
- "recommended": ["joktec-common-skill"],
104
- "packages": ["@joktec/cacher", "@joktec/mailer", "@joktec/notifier", "@joktec/storage"],
105
- "scope": { "paths": ["packages/adapters/**"] },
106
- "triggers": ["cache", "mail", "notification", "storage", "adapter"],
107
- "outputs": { "codex": true, "claude": true, "cursor": true, "gemini": true, "copilot": true, "windsurf": true }
215
+ "dependencies": [
216
+ "joktec-framework-skill",
217
+ "joktec-common-skill"
218
+ ],
219
+ "recommended": [],
220
+ "packages": [
221
+ "@joktec/cacher",
222
+ "@joktec/mailer",
223
+ "@joktec/notifier",
224
+ "@joktec/storage"
225
+ ],
226
+ "scope": {
227
+ "paths": [
228
+ "packages/adapters/**"
229
+ ]
230
+ },
231
+ "triggers": [
232
+ "cache",
233
+ "mail",
234
+ "notification",
235
+ "storage",
236
+ "adapter"
237
+ ],
238
+ "outputs": {
239
+ "codex": true,
240
+ "claude": true,
241
+ "cursor": true,
242
+ "gemini": true,
243
+ "copilot": true,
244
+ "windsurf": true
245
+ }
108
246
  },
109
247
  {
110
248
  "id": "joktec-database-extended-skill",
111
249
  "title": "JokTec Extended Database Skill",
112
250
  "role": "grouped",
113
251
  "requiredByDefault": false,
114
- "dependencies": ["joktec-framework-skill"],
115
- "recommended": ["joktec-common-skill"],
116
- "packages": ["@joktec/elastic", "@joktec/arango", "@joktec/bigquery"],
117
- "scope": { "paths": ["packages/databases/elastic/**", "packages/databases/arango/**", "packages/databases/bigquery/**"] },
118
- "triggers": ["elastic", "arango", "bigquery", "extended database"],
119
- "outputs": { "codex": true, "claude": true, "cursor": true, "gemini": true, "copilot": true, "windsurf": true }
252
+ "dependencies": [
253
+ "joktec-framework-skill",
254
+ "joktec-common-skill"
255
+ ],
256
+ "recommended": [],
257
+ "packages": [
258
+ "@joktec/elastic",
259
+ "@joktec/arango",
260
+ "@joktec/bigquery"
261
+ ],
262
+ "scope": {
263
+ "paths": [
264
+ "packages/databases/elastic/**",
265
+ "packages/databases/arango/**",
266
+ "packages/databases/bigquery/**"
267
+ ]
268
+ },
269
+ "triggers": [
270
+ "elastic",
271
+ "arango",
272
+ "bigquery",
273
+ "extended database"
274
+ ],
275
+ "outputs": {
276
+ "codex": true,
277
+ "claude": true,
278
+ "cursor": true,
279
+ "gemini": true,
280
+ "copilot": true,
281
+ "windsurf": true
282
+ }
120
283
  },
121
284
  {
122
285
  "id": "joktec-integration-skill",
123
286
  "title": "JokTec Integration Skill",
124
287
  "role": "grouped",
125
288
  "requiredByDefault": false,
126
- "dependencies": ["joktec-framework-skill"],
127
- "recommended": ["joktec-common-skill"],
128
- "packages": ["@joktec/firebase", "@joktec/gpt"],
129
- "scope": { "paths": ["packages/integrations/**"] },
130
- "triggers": ["firebase", "gpt", "openai", "integration"],
131
- "outputs": { "codex": true, "claude": true, "cursor": true, "gemini": true, "copilot": true, "windsurf": true }
289
+ "dependencies": [
290
+ "joktec-framework-skill",
291
+ "joktec-common-skill"
292
+ ],
293
+ "recommended": [],
294
+ "packages": [
295
+ "@joktec/firebase",
296
+ "@joktec/gpt"
297
+ ],
298
+ "scope": {
299
+ "paths": [
300
+ "packages/integrations/**"
301
+ ]
302
+ },
303
+ "triggers": [
304
+ "firebase",
305
+ "gpt",
306
+ "openai",
307
+ "integration"
308
+ ],
309
+ "outputs": {
310
+ "codex": true,
311
+ "claude": true,
312
+ "cursor": true,
313
+ "gemini": true,
314
+ "copilot": true,
315
+ "windsurf": true
316
+ }
132
317
  },
133
318
  {
134
319
  "id": "joktec-tool-skill",
135
320
  "title": "JokTec Tool Skill",
136
321
  "role": "grouped",
137
322
  "requiredByDefault": false,
138
- "dependencies": ["joktec-framework-skill"],
139
- "recommended": ["joktec-common-skill"],
140
- "packages": ["@joktec/http", "@joktec/file", "@joktec/alert"],
141
- "scope": { "paths": ["packages/tools/**"] },
142
- "triggers": ["http", "axios", "file", "alert", "tool"],
143
- "outputs": { "codex": true, "claude": true, "cursor": true, "gemini": true, "copilot": true, "windsurf": true }
323
+ "dependencies": [
324
+ "joktec-framework-skill",
325
+ "joktec-common-skill"
326
+ ],
327
+ "recommended": [],
328
+ "packages": [
329
+ "@joktec/http",
330
+ "@joktec/file",
331
+ "@joktec/alert"
332
+ ],
333
+ "scope": {
334
+ "paths": [
335
+ "packages/tools/**"
336
+ ]
337
+ },
338
+ "triggers": [
339
+ "http",
340
+ "axios",
341
+ "file",
342
+ "alert",
343
+ "tool"
344
+ ],
345
+ "outputs": {
346
+ "codex": true,
347
+ "claude": true,
348
+ "cursor": true,
349
+ "gemini": true,
350
+ "copilot": true,
351
+ "windsurf": true
352
+ }
144
353
  }
145
354
  ]
146
355
  }
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: joktec-adapter-skill
3
3
  description: Use when wiring or using JokTec adapter packages @joktec/cacher, @joktec/mailer, @joktec/notifier, or @joktec/storage for cache, mail delivery, push notifications, object storage, config-driven clients, and app-neutral adapter services.
4
+ metadata:
5
+ dependencies:
6
+ - joktec-framework-skill
7
+ - joktec-common-skill
4
8
  ---
5
9
 
6
10
  # JokTec Adapter Skill
@@ -20,6 +24,7 @@ Use this skill for pluggable external capability adapters.
20
24
  - Use validated config and `conId` where supported.
21
25
  - Keep secrets and credentials in app config or runtime environment, never in code.
22
26
  - Prefer adapter services over direct SDK usage in app services.
27
+ - If guidance is insufficient, read this skill's references and inspect `../joktec-framework` package source or GitHub fallback before assuming APIs.
23
28
 
24
29
  ## Reference
25
30
 
@@ -1,12 +1,40 @@
1
1
  # Adapter Usage
2
2
 
3
+ ## Source Lookup
4
+
5
+ When blocked, inspect:
6
+
7
+ - `packages/adapters/README.md`
8
+ - `packages/adapters/AGENTS.md`
9
+ - `packages/adapters/<package>/README.md`
10
+ - `packages/adapters/<package>/src/index.ts`
11
+ - package module/config/service files under `src/`
12
+
3
13
  ## Runtime Pattern
4
14
 
5
15
  Adapters are global Nest modules. Services own native client creation and expose package-specific operations.
6
16
 
17
+ Most adapters follow `AbstractClientService`: config is validated, native clients are created by the service, `conId` selects the connection, and shutdown/retry/debug behavior should remain package-owned.
18
+
7
19
  ## Package Notes
8
20
 
9
21
  - Cacher: choose local, Redis, or Memcached stores based on runtime config.
10
22
  - Mailer: centralize mail transport configuration in the service that owns outbound email.
11
23
  - Notifier: keep push provider configuration outside app business logic.
12
24
  - Storage: keep storage metadata and object operations behind the adapter service.
25
+
26
+ ## Best Practices
27
+
28
+ - Import adapter modules in the application layer, then inject services into domain services.
29
+ - Keep provider credentials, endpoints, bucket names, SMTP secrets, and push credentials in runtime config.
30
+ - Keep business payload composition in the consuming app. The adapter should send/cache/store, not decide product semantics.
31
+ - Use `conId` for multiple providers or tenants instead of creating ad-hoc service instances.
32
+ - Normalize provider errors at the package/app boundary so controllers do not branch on SDK-specific messages.
33
+ - Mock SDK clients in unit tests; run live provider checks only in explicit integration or consumer harness tests.
34
+
35
+ ## Anti-Patterns
36
+
37
+ - Do not put email template business rules inside `@joktec/mailer`.
38
+ - Do not hardcode S3 buckets, Redis URLs, SMTP credentials, or notification tokens in source.
39
+ - Do not bypass adapter services by importing provider SDK clients directly throughout the app.
40
+ - Do not assume every adapter has identical method names; read each package README/source before calling.
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: joktec-broker-skill
3
3
  description: Use when wiring or using JokTec broker packages @joktec/kafka, @joktec/rabbit, @joktec/sqs, or @joktec/redcast, including client config, producer decorators, consumer loaders, message handlers, auto-binding, and app-level broker flows.
4
+ metadata:
5
+ dependencies:
6
+ - joktec-framework-skill
7
+ - joktec-common-skill
4
8
  ---
5
9
 
6
10
  # JokTec Broker Skill
@@ -20,6 +24,7 @@ Use this skill for message broker packages.
20
24
  - Use broker decorators for transport wiring, not for domain policy.
21
25
  - Preserve config-driven client selection and `conId` when available.
22
26
  - Keep topic, queue, and routing names explicit in app configuration or decorators.
27
+ - If guidance is insufficient, read this skill's references and inspect `../joktec-framework` package source or GitHub fallback before assuming APIs.
23
28
 
24
29
  ## Reference
25
30
 
@@ -1,12 +1,41 @@
1
1
  # Broker Usage
2
2
 
3
+ ## Source Lookup
4
+
5
+ When blocked, inspect:
6
+
7
+ - `packages/brokers/README.md`
8
+ - `packages/brokers/AGENTS.md`
9
+ - `packages/brokers/<package>/README.md`
10
+ - `packages/brokers/<package>/src/index.ts`
11
+ - package decorators, loaders, config, and service files under `src/`
12
+
3
13
  ## Runtime Pattern
4
14
 
5
15
  Broker services follow `AbstractClientService` lifecycle. Loader classes discover decorator metadata after module initialization. Apps define producers, consumers, and message semantics.
6
16
 
17
+ Use broker packages for transport wiring, not for business workflow ownership. The consuming app owns event names, payload contracts, idempotency, retry policy, dead-letter behavior, and handler semantics.
18
+
7
19
  ## Package Notes
8
20
 
9
21
  - Kafka: check topic existence and broker advertised listeners in local development.
10
22
  - RabbitMQ: use module options and decorators for exchanges, queues, and bindings.
11
23
  - SQS: local ElasticMQ-style environments may require queues to exist before consumers start.
12
24
  - Redcast: use Redis-backed list, stream, or pub/sub behavior when a lightweight broker is enough.
25
+
26
+ ## Best Practices
27
+
28
+ - Start consumers only in processes that should own subscriptions.
29
+ - Keep producer and consumer payload DTOs versionable and explicit.
30
+ - Use config paths or module options for topic/queue names when supported.
31
+ - Make handlers idempotent; brokers may redeliver.
32
+ - Add observable effects for consumer tests rather than asserting log text.
33
+ - Keep broker health/preflight checks separate from business request handling.
34
+ - In local stacks, verify broker-specific infrastructure: Kafka topics, Rabbit exchanges/queues, SQS queues, Redis password/db.
35
+
36
+ ## Anti-Patterns
37
+
38
+ - Do not hide domain workflows inside decorators or broker package services.
39
+ - Do not assume auto-create topic/queue behavior unless the package and local broker support it.
40
+ - Do not run the same consumer group/queue owner in every process by accident.
41
+ - Do not swallow message handling errors without retry/dead-letter visibility.
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  name: joktec-common-skill
3
3
  description: Use when implementing or wiring @joktec/core, @joktec/utils, or @joktec/cron in a consumer app, especially BaseController, BaseService, pagination, config, client lifecycle, bootstrap, cron decorators, or utility helpers.
4
+ metadata:
5
+ dependencies:
6
+ - joktec-framework-skill
4
7
  ---
5
8
 
6
9
  # JokTec Common Skill
@@ -21,6 +24,7 @@ Use this skill for shared framework primitives, low-level helpers, cron utilitie
21
24
  - Use page, offset, or cursor pagination contracts from core; let database packages execute storage-specific pagination.
22
25
  - Use `AbstractClientService` patterns for client packages that need config, lifecycle, retry, and `conId`.
23
26
  - Use `@joktec/utils` for shared helpers instead of duplicating conversion, validation, hashing, or UUID logic.
27
+ - If guidance is insufficient, read this skill's references and inspect `../joktec-framework` package source or GitHub fallback before assuming APIs.
24
28
 
25
29
  ## References
26
30
 
@@ -1,19 +1,75 @@
1
1
  # Common Core Usage
2
2
 
3
+ ## Source Lookup
4
+
5
+ When blocked, inspect these framework files before guessing:
6
+
7
+ - `packages/common/core/README.md`
8
+ - `packages/common/core/AGENTS.md`
9
+ - `packages/common/core/src/index.ts`
10
+ - `packages/common/core/src/abstractions/*`
11
+ - `packages/common/core/src/models/base.request.ts`
12
+ - `packages/common/core/src/models/base.response.ts`
13
+ - `packages/common/core/src/models/paginations/*`
14
+ - `packages/common/core/src/client/abstract-client.service.ts`
15
+ - `packages/common/core/src/infras/application.ts`
16
+ - `packages/common/core/src/modules/*`
17
+
3
18
  ## Runtime Bootstrap
4
19
 
5
20
  Use the application bootstrap helpers from `@joktec/core` for gateway and microservice runtimes. Keep runtime behavior config-driven.
6
21
 
22
+ Best practice:
23
+
24
+ - Use `Application.bootstrap(AppModule)` instead of hand-rolling Nest bootstrap unless the consumer app has a specific runtime reason.
25
+ - Keep gateway-only behavior in gateway runtime modules and microservice-only behavior in micro runtime modules.
26
+ - Register framework modules through their dynamic module APIs when provided.
27
+ - Do not duplicate config parsing, logger setup, metrics setup, or process lifecycle hooks in consumer apps.
28
+
7
29
  ## CRUD Abstractions
8
30
 
9
31
  - `BaseController` creates standard REST CRUD endpoints for DTO-backed resources.
10
32
  - `BaseService` delegates repository operations through the shared repository contract.
11
33
  - `ClientController` and `ClientService` provide generated microservice CRUD patterns.
12
34
 
35
+ Use BaseController/BaseService when the resource follows standard CRUD. Avoid them when the endpoint has domain-specific command semantics, multi-step transactions, or non-standard authorization that would make the generic abstraction obscure behavior.
36
+
37
+ Controller checklist:
38
+
39
+ - choose the DTO/entity class intentionally
40
+ - set `paginationMode` for the representative Swagger response shape
41
+ - use `customDto.paginationDto` only when the built-in page/offset/cursor response does not represent the API
42
+ - keep auth/guards/interceptors consistent with app conventions
43
+ - avoid putting business branching in controller methods when it belongs in the service
44
+
13
45
  ## Pagination
14
46
 
15
47
  Request priority is cursor, then offset, then page. `BaseController.paginationMode` affects Swagger response shape; runtime selection remains request-driven unless the app service narrows it.
16
48
 
49
+ Best practice:
50
+
51
+ - Use page pagination for admin tables and simple back-office views.
52
+ - Use offset pagination for mobile-style load-more when the data set is moderate and stable enough.
53
+ - Use cursor pagination for feeds, timelines, frequently inserted lists, or large tables.
54
+ - Do not document cursor support for a resource unless the underlying repository package actually supports it.
55
+ - When using cursor mode, ensure the database layer has stable sort keys and tie-breakers.
56
+
17
57
  ## Client Lifecycle
18
58
 
19
59
  Use `ClientConfig`, `AbstractClientService`, and `conId` when building or consuming packages that support multiple client connections.
60
+
61
+ Client package checklist:
62
+
63
+ - config class validates all required runtime options
64
+ - service startup fails clearly when the native client cannot initialize
65
+ - shutdown closes native connections only when initialized
66
+ - `conId` is preserved through service/repository calls
67
+ - logs do not leak credentials or full connection strings
68
+ - retries and debug behavior are config-driven
69
+
70
+ ## Do Not
71
+
72
+ - Do not import concrete package or app code into `@joktec/core`.
73
+ - Do not bypass shared pagination contracts with ad-hoc response shapes for standard CRUD.
74
+ - Do not add new public symbols without exporting them through `src/index.ts`.
75
+ - Do not silently swallow bootstrap/client initialization failures.
@@ -6,12 +6,40 @@ Use `@joktec/utils` for common generators, validators, converters, hashing helpe
6
6
 
7
7
  Prefer package helpers over app-local reimplementation when behavior should stay consistent across services.
8
8
 
9
+ Source lookup:
10
+
11
+ - `packages/common/utils/README.md`
12
+ - `packages/common/utils/src/index.ts`
13
+ - `packages/common/utils/src/helpers/*`
14
+ - `packages/common/utils/src/validators/*`
15
+ - `packages/common/utils/src/constants/*`
16
+
17
+ Best practice:
18
+
19
+ - Use shared validators from `@joktec/utils` when building schema-first entity/schema decorators.
20
+ - Use shared generators for IDs, tokens, random values, and hashes when consistency matters.
21
+ - Keep utility usage deterministic in tests; mock time/randomness where needed.
22
+ - Do not add framework-level dependencies to `utils`.
23
+
9
24
  ## Cron
10
25
 
11
26
  Use `@joktec/cron` when a consumer app needs scheduled jobs, job worker contracts, or decorator-driven cron registration.
12
27
 
13
28
  Keep job business logic in the consumer app. The package provides scheduling abstractions, not domain behavior.
14
29
 
30
+ Source lookup:
31
+
32
+ - `packages/common/cron/README.md`
33
+ - `packages/common/cron/src/index.ts`
34
+ - cron decorators, models, scheduler services, and worker contracts under `src/`
35
+
36
+ Best practice:
37
+
38
+ - Keep job names, schedules, concurrency, and retry behavior visible in the consumer app.
39
+ - Make cron handlers idempotent.
40
+ - Avoid enabling the same cron owner in multiple processes unless the package/app has explicit locking semantics.
41
+ - Treat cron runtime as infrastructure orchestration; domain writes still belong in app services/repositories.
42
+
15
43
  ## Types
16
44
 
17
45
  Use `@joktec/types` when a consumer workflow needs generated JokTec package config schema/type artifacts. Treat the framework repository as source-of-truth for the generated schema shape.
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: joktec-database-extended-skill
3
3
  description: Use when working with extended JokTec database packages @joktec/elastic, @joktec/arango, or @joktec/bigquery in a consumer app, including app-neutral client setup, config-driven lifecycle, and package-specific query/service usage.
4
+ metadata:
5
+ dependencies:
6
+ - joktec-framework-skill
7
+ - joktec-common-skill
4
8
  ---
5
9
 
6
10
  # JokTec Extended Database Skill
@@ -19,6 +23,7 @@ Use this skill for database clients that are not Mongo or MySQL.
19
23
  - Use package services for client lifecycle and connection config.
20
24
  - Do not claim parity with Mongo/MySQL repository behavior unless the package implements it.
21
25
  - Use package README and source as final truth before adding advanced behavior.
26
+ - If guidance is insufficient, read this skill's references and inspect `../joktec-framework` package source or GitHub fallback before assuming APIs.
22
27
 
23
28
  ## Reference
24
29