vibes-plug 2.5.0 → 2.11.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/.claude/rules/vibes-plug-core.md +32 -0
- package/.cursor/rules/vibes-plug-core.mdc +51 -0
- package/.cursorrules +42 -0
- package/AGENTS.md +37 -7
- package/BLUEPRINT.md +309 -217
- package/CHANGELOG.md +133 -1
- package/CLAUDE.md +70 -0
- package/LICENSE +1 -1
- package/README.md +641 -415
- package/index.js +19 -0
- package/package.json +44 -8
- package/plugin.json +24 -7
- package/scripts/generate_swarm_gif.py +295 -0
- package/scripts/install.js +201 -0
- package/skills/accessibility-testing-expert/SKILL.md +116 -0
- package/skills/ai-cost-token-optimizer/SKILL.md +82 -52
- package/skills/ai-evals-benchmark-expert/SKILL.md +188 -0
- package/skills/ai-llm-integration-expert/SKILL.md +185 -178
- package/skills/ai-media-generation-expert/SKILL.md +172 -0
- package/skills/ai-prompt-engineering-expert/SKILL.md +84 -0
- package/skills/angular-expert/SKILL.md +148 -0
- package/skills/api-design-expert/SKILL.md +6 -3
- package/skills/api-gateway-proxy-expert/SKILL.md +81 -0
- package/skills/app-analyzer-optimizer/SKILL.md +6 -3
- package/skills/apple-ecosystem-expert/SKILL.md +144 -141
- package/skills/{asisten_ramah → asisten-ramah}/SKILL.md +7 -1
- package/skills/astro-framework-expert/SKILL.md +200 -0
- package/skills/async-queue-temporal-expert/SKILL.md +210 -24
- package/skills/authentication-identity-expert/SKILL.md +278 -275
- package/skills/auto-doc-updater/SKILL.md +7 -1
- package/skills/autonomous-chaos-monkey/SKILL.md +63 -63
- package/skills/autonomous-red-teamer/SKILL.md +172 -28
- package/skills/autonomous-tdd-debugger/SKILL.md +70 -64
- package/skills/background-jobs-queue-expert/SKILL.md +235 -0
- package/skills/biome-linter-formatter-expert/SKILL.md +89 -0
- package/skills/blockchain-web3-expert/SKILL.md +115 -0
- package/skills/bootstrap-to-modern/SKILL.md +9 -6
- package/skills/brainstorming/SKILL.md +58 -50
- package/skills/browser-automation-expert/SKILL.md +197 -21
- package/skills/bun-runtime-expert/SKILL.md +7 -1
- package/skills/chatbot-messaging-expert/SKILL.md +114 -0
- package/skills/ci-cd-devops-architect/SKILL.md +45 -36
- package/skills/cloud-hosting-expert/SKILL.md +7 -1
- package/skills/coderabbit/SKILL.md +7 -1
- package/skills/compliance-gdpr-privacy-expert/SKILL.md +85 -0
- package/skills/cron-scheduler-expert/SKILL.md +303 -297
- package/skills/data-pipeline-etl-expert/SKILL.md +84 -0
- package/skills/data-telemetry-expert/SKILL.md +7 -1
- package/skills/data-visualization-expert/SKILL.md +154 -0
- package/skills/database-migration-versioning-expert/SKILL.md +90 -0
- package/skills/database-orm-expert/SKILL.md +13 -3
- package/skills/dependency-upgrade-migrator/SKILL.md +300 -294
- package/skills/design-system-architect/SKILL.md +278 -259
- package/skills/desktop-electron-expert/SKILL.md +128 -0
- package/skills/documentation-site-expert/SKILL.md +59 -0
- package/skills/doku-mcp-server/SKILL.md +7 -1
- package/skills/doku-payment-gateway/SKILL.md +7 -1
- package/skills/domain-driven-design-expert/SKILL.md +82 -0
- package/skills/e2e-testing-expert/SKILL.md +7 -1
- package/skills/ecommerce-expert/SKILL.md +87 -0
- package/skills/edge-serverless-db-expert/SKILL.md +98 -42
- package/skills/email-notification-expert/SKILL.md +367 -361
- package/skills/error-resilience-expert/SKILL.md +485 -479
- package/skills/event-driven-architect/SKILL.md +7 -1
- package/skills/feature-flag-analytics-expert/SKILL.md +65 -45
- package/skills/file-upload-media-expert/SKILL.md +436 -430
- package/skills/firebase-security-expert/SKILL.md +7 -1
- package/skills/form-validation-expert/SKILL.md +406 -400
- package/skills/fullstack-expert/SKILL.md +60 -1
- package/skills/gemini-agent-booster/SKILL.md +173 -135
- package/skills/geospatial-maps-expert/SKILL.md +80 -0
- package/skills/global-a11y-i18n-expert/SKILL.md +7 -1
- package/skills/glsl-shader-expert/SKILL.md +106 -100
- package/skills/go-programming-expert/SKILL.md +21 -15
- package/skills/graph-rag-knowledge-expert/SKILL.md +159 -0
- package/skills/graphql-apollo-expert/SKILL.md +113 -107
- package/skills/headless-cms-expert/SKILL.md +181 -0
- package/skills/hig/SKILL.md +7 -1
- package/skills/js-backend-expert/SKILL.md +218 -216
- package/skills/legacy-code-translator/SKILL.md +70 -64
- package/skills/local-slm-edge-ai-expert/SKILL.md +167 -0
- package/skills/logging-error-tracking-expert/SKILL.md +343 -337
- package/skills/mcp-client-orchestrator/SKILL.md +75 -69
- package/skills/mcp-server-architect/SKILL.md +294 -194
- package/skills/micro-frontend-architect/SKILL.md +111 -105
- package/skills/mobile-expo-expert/SKILL.md +8 -2
- package/skills/mobile-push-notification-expert/SKILL.md +70 -50
- package/skills/modern-css-native-expert/SKILL.md +189 -0
- package/skills/monday-design-aesthetic/SKILL.md +7 -1
- package/skills/monorepo-architect/SKILL.md +7 -1
- package/skills/mpa-orchestrator/SKILL.md +20 -1
- package/skills/multi-agent-orchestration/SKILL.md +254 -234
- package/skills/multiple-entry-points/SKILL.md +37 -1
- package/skills/mvc-expert/SKILL.md +7 -1
- package/skills/n8n-automation-expert/SKILL.md +89 -0
- package/skills/nextjs-app-router-expert/SKILL.md +148 -0
- package/skills/openapi-swagger-codegen-expert/SKILL.md +67 -0
- package/skills/payment-gateway-expert/SKILL.md +85 -1
- package/skills/pdf-document-generation-expert/SKILL.md +91 -0
- package/skills/performance-web-vitals/SKILL.md +7 -1
- package/skills/post-quantum-crypto-migrator/SKILL.md +57 -57
- package/skills/prd-architect/SKILL.md +7 -1
- package/skills/proactive-background-watcher/SKILL.md +67 -61
- package/skills/production-ready-hardener/SKILL.md +461 -455
- package/skills/project-context-mapper/SKILL.md +84 -78
- package/skills/pwa-offline-first-expert/SKILL.md +185 -0
- package/skills/python-programming-expert/SKILL.md +407 -401
- package/skills/rate-limit-abuse-prevention/SKILL.md +376 -370
- package/skills/realtime-collaboration-expert/SKILL.md +55 -1
- package/skills/rich-text-editor-expert/SKILL.md +177 -0
- package/skills/rust-programming-expert/SKILL.md +7 -1
- package/skills/saas-billing/SKILL.md +7 -1
- package/skills/saas-multi-tenant/SKILL.md +7 -1
- package/skills/saas-mvp-launcher/SKILL.md +20 -1
- package/skills/saas-transformer/SKILL.md +499 -488
- package/skills/scalability-clean-code/SKILL.md +7 -1
- package/skills/search-engine-expert/SKILL.md +89 -0
- package/skills/secure-fuzz-testing/SKILL.md +7 -1
- package/skills/self-evolving-memory-graph/SKILL.md +90 -74
- package/skills/self-healing-cloud-orchestrator/SKILL.md +57 -57
- package/skills/senior-frontend/SKILL.md +141 -161
- package/skills/seo/SKILL.md +41 -17
- package/skills/session-context-loader/SKILL.md +82 -76
- package/skills/session-handoff-resume/SKILL.md +7 -1
- package/skills/{skill_baru → skill-baru}/SKILL.md +8 -2
- package/skills/solidjs-expert/SKILL.md +80 -0
- package/skills/spa-orchestrator/SKILL.md +20 -1
- package/skills/sse-websocket-streaming-expert/SKILL.md +93 -0
- package/skills/state-management-expert/SKILL.md +7 -1
- package/skills/supabase-migration/SKILL.md +47 -1
- package/skills/supabase-security-expert/SKILL.md +7 -1
- package/skills/svelte-sveltekit-expert/SKILL.md +91 -0
- package/skills/svg-animation-motion-expert/SKILL.md +115 -0
- package/skills/tailwind-expert/SKILL.md +88 -136
- package/skills/tanstack-query-expert/SKILL.md +7 -1
- package/skills/tauri-expert/SKILL.md +7 -1
- package/skills/token-saver/SKILL.md +1 -1
- package/skills/typescript-expert/SKILL.md +12 -6
- package/skills/ui-components-expert/SKILL.md +165 -279
- package/skills/ui-ux-pro-max/SKILL.md +23 -3
- package/skills/vector-db-rag-expert/SKILL.md +175 -19
- package/skills/vibe-code-gardener/SKILL.md +1 -1
- package/skills/visual-qa-vision-agent/SKILL.md +70 -64
- package/skills/voice-ai-realtime-agent/SKILL.md +202 -0
- package/skills/vue-frontend-expert/SKILL.md +131 -125
- package/skills/wasm-edge-computing-expert/SKILL.md +97 -0
- package/skills/web-3d-graphics-expert/SKILL.md +136 -130
- package/skills/web-game-engine-expert/SKILL.md +101 -95
- package/skills/web-scraper/SKILL.md +157 -207
- package/skills/website-design-cloner/SKILL.md +179 -173
- package/skills/webxr-ar-vr-expert/SKILL.md +122 -116
- package/skills/wordpress-headless-expert/SKILL.md +144 -0
- package/skills/zero-to-prod-orchestrator/SKILL.md +52 -27
- package/skills/zero-trust-secret-vault/SKILL.md +87 -39
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/workflows/publish.yml +0 -20
- package/CONTRIBUTING.md +0 -199
- package/SECURITY.md +0 -21
- package/banner.png +0 -0
- package/skills/autonomous-swarm-director/SKILL.md +0 -69
- package/skills/hyper-context-synthesizer/SKILL.md +0 -55
- package/skills/llm-cost-arbitrage-router/SKILL.md +0 -59
- package/skills/senior-fullstack/SKILL.md +0 -167
- package/skills/senior-fullstack/references/architecture_patterns.md +0 -160
- package/skills/senior-fullstack/references/development_workflows.md +0 -222
- package/skills/senior-fullstack/references/tech_stack_guide.md +0 -190
- package/skills/senior-fullstack/scripts/code_quality_analyzer.py +0 -114
- package/skills/senior-fullstack/scripts/fullstack_scaffolder.py +0 -114
- package/skills/senior-fullstack/scripts/project_scaffolder.py +0 -114
- package/skills/seo-aeo-landing-page-writer/SKILL.md +0 -97
- package/skills/seo-geo/SKILL.md +0 -188
- package/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-310.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-312.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-310.pyc +0 -0
- package/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-312.pyc +0 -0
- package/skills/ui_ux_expert/SKILL.md +0 -125
- package/vibes-swarm-demo.gif +0 -0
|
@@ -1,402 +1,408 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: python-programming-expert
|
|
3
|
-
description: "Expert-level skill for Python programming (Python 3.13/3.14+). Covers type safety, generic syntax (PEP 695), async/await TaskGroups, FastAPI 0.115+, Pydantic v2, uv package manager, Ruff, and pytest in English and Indonesian."
|
|
1
|
+
---
|
|
2
|
+
name: python-programming-expert
|
|
3
|
+
description: "Expert-level skill for Python programming (Python 3.13/3.14+). Covers type safety, generic syntax (PEP 695), async/await TaskGroups, FastAPI 0.115+, Pydantic v2, uv package manager, Ruff, and pytest in English and Indonesian."
|
|
4
4
|
author: "Roedy Rustam"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Python Programming Expert (3.14 Edition)
|
|
8
|
-
|
|
9
|
-
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<a name="english"></a>
|
|
14
|
-
## English
|
|
15
|
-
|
|
16
|
-
###
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
###
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
|
36
|
-
|
|
37
|
-
| **Python 3.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
uv
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
# Add
|
|
54
|
-
uv add
|
|
55
|
-
|
|
56
|
-
#
|
|
57
|
-
uv
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
uv
|
|
63
|
-
|
|
64
|
-
#
|
|
65
|
-
uv
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
[tool.ruff.lint
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
[tool.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
def
|
|
113
|
-
self._items
|
|
114
|
-
|
|
115
|
-
def
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
├──
|
|
186
|
-
│ ├──
|
|
187
|
-
│ └──
|
|
188
|
-
├──
|
|
189
|
-
│ ├──
|
|
190
|
-
│ └──
|
|
191
|
-
├──
|
|
192
|
-
│
|
|
193
|
-
└──
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
self.
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
"
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
#
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
###
|
|
368
|
-
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
###
|
|
401
|
-
|
|
402
|
-
Gunakan `
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Python Programming Expert (3.14 Edition)
|
|
8
|
+
|
|
9
|
+
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<a name="english"></a>
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
### Orchestration & Integration
|
|
17
|
+
Connects and orchestrates with relevant domain skills like `brainstorming`, `zero-to-prod-orchestrator`, and `project-context-mapper` to ensure cohesive execution.
|
|
18
|
+
|
|
19
|
+
### Description
|
|
20
|
+
Expert-level Python development guidance for **Python 3.13 / 3.14+** covering JIT compilation, free-threaded (no-GIL) mode, modern type safety patterns, async architecture, and the full production stack: **FastAPI 0.115+**, **Pydantic v2**, **SQLAlchemy 2.x / SQLModel**, **uv**, **Ruff**, and **pytest-asyncio**.
|
|
21
|
+
|
|
22
|
+
### Trigger Conditions
|
|
23
|
+
- Writing Python 3.13+ / 3.14+ applications or services.
|
|
24
|
+
- Building **FastAPI 0.115+** REST APIs, **Django 5.x**, or **Litestar** web services.
|
|
25
|
+
- Managing Python projects with the **`uv`** package manager.
|
|
26
|
+
- Implementing async/await patterns with `asyncio.TaskGroup` or structured concurrency.
|
|
27
|
+
- Writing type-safe Python with **Pydantic v2** and modern generics (PEP 695/696).
|
|
28
|
+
- Setting up **Ruff** for linting + formatting; **pytest** with `pytest-asyncio` for testing.
|
|
29
|
+
- Building AI backends integrating with LLM APIs (OpenAI, Anthropic, Google GenAI).
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### Python Version Matrix (2026)
|
|
34
|
+
|
|
35
|
+
| Version | Status | Key Feature |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| **Python 3.14** | Latest (Oct 2025) | PEP 696 defaults, improved JIT, `@` on types |
|
|
38
|
+
| **Python 3.13** | Stable LTS | JIT compiler, free-threaded mode (no GIL) |
|
|
39
|
+
| **Python 3.12** | Supported | PEP 695 generics, `type` alias statement |
|
|
40
|
+
| **Python 3.11** | Security only | `asyncio.TaskGroup`, `ExceptionGroup` |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
### Modern Python Toolchain (2026)
|
|
45
|
+
|
|
46
|
+
#### uv — The Standard Package Manager
|
|
47
|
+
Replace `pip`, `pip-tools`, `virtualenv`, `pyenv`, and `poetry` entirely with **uv** (written in Rust — 10-100x faster):
|
|
48
|
+
```bash
|
|
49
|
+
# Create project
|
|
50
|
+
uv init my-api
|
|
51
|
+
cd my-api
|
|
52
|
+
|
|
53
|
+
# Add runtime dependencies
|
|
54
|
+
uv add fastapi pydantic httpx sqlalchemy[asyncio]
|
|
55
|
+
|
|
56
|
+
# Add dev dependencies
|
|
57
|
+
uv add --dev pytest pytest-asyncio ruff mypy httpx
|
|
58
|
+
|
|
59
|
+
# Run scripts (no activation needed)
|
|
60
|
+
uv run python main.py
|
|
61
|
+
uv run pytest
|
|
62
|
+
uv run fastapi dev main.py # Hot reload dev server
|
|
63
|
+
|
|
64
|
+
# Pin exact Python version
|
|
65
|
+
uv python pin 3.13
|
|
66
|
+
|
|
67
|
+
# Sync all environments
|
|
68
|
+
uv sync
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### `pyproject.toml` — Single Config File
|
|
72
|
+
```toml
|
|
73
|
+
[project]
|
|
74
|
+
name = "my-api"
|
|
75
|
+
version = "0.1.0"
|
|
76
|
+
requires-python = ">=3.13"
|
|
77
|
+
dependencies = [
|
|
78
|
+
"fastapi>=0.115",
|
|
79
|
+
"pydantic>=2.9",
|
|
80
|
+
"sqlalchemy[asyncio]>=2.0",
|
|
81
|
+
"asyncpg>=0.30",
|
|
82
|
+
]
|
|
83
|
+
|
|
84
|
+
[tool.ruff]
|
|
85
|
+
line-length = 88
|
|
86
|
+
target-version = "py313"
|
|
87
|
+
|
|
88
|
+
[tool.ruff.lint]
|
|
89
|
+
select = ["E", "F", "I", "N", "UP", "B", "SIM", "ANN", "ASYNC"]
|
|
90
|
+
|
|
91
|
+
[tool.ruff.lint.per-file-ignores]
|
|
92
|
+
"tests/**/*.py" = ["ANN"] # No type annotations required in tests
|
|
93
|
+
|
|
94
|
+
[tool.pytest.ini_options]
|
|
95
|
+
asyncio_mode = "auto" # pytest-asyncio auto mode
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### Type Safety — Modern Patterns
|
|
101
|
+
|
|
102
|
+
#### PEP 695 — Generic Syntax (Python 3.12+)
|
|
103
|
+
```python
|
|
104
|
+
# Old way (verbose)
|
|
105
|
+
from typing import TypeVar, Generic
|
|
106
|
+
T = TypeVar('T')
|
|
107
|
+
class Stack(Generic[T]):
|
|
108
|
+
def push(self, item: T) -> None: ...
|
|
109
|
+
|
|
110
|
+
# New way (Python 3.12+) — clean, no boilerplate
|
|
111
|
+
class Stack[T]:
|
|
112
|
+
def __init__(self) -> None:
|
|
113
|
+
self._items: list[T] = []
|
|
114
|
+
|
|
115
|
+
def push(self, item: T) -> None:
|
|
116
|
+
self._items.append(item)
|
|
117
|
+
|
|
118
|
+
def pop(self) -> T:
|
|
119
|
+
return self._items.pop()
|
|
120
|
+
|
|
121
|
+
# Generic functions
|
|
122
|
+
def first[T](lst: list[T]) -> T:
|
|
123
|
+
return lst[0]
|
|
124
|
+
|
|
125
|
+
# Type aliases (PEP 695)
|
|
126
|
+
type Vector = list[float]
|
|
127
|
+
type Matrix[T] = list[list[T]]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
#### PEP 696 — TypeVar Defaults (Python 3.14+)
|
|
131
|
+
```python
|
|
132
|
+
# Default generic types — reduces boilerplate in libraries
|
|
133
|
+
class Response[T = dict]: # T defaults to dict if not specified
|
|
134
|
+
def __init__(self, data: T) -> None:
|
|
135
|
+
self.data = data
|
|
136
|
+
|
|
137
|
+
response = Response({"key": "value"}) # T inferred as dict
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
#### Pydantic v2 — Production Data Validation
|
|
141
|
+
```python
|
|
142
|
+
from pydantic import BaseModel, Field, field_validator, model_validator
|
|
143
|
+
from pydantic import EmailStr, SecretStr
|
|
144
|
+
from typing import Annotated
|
|
145
|
+
|
|
146
|
+
# Annotated types for reusability
|
|
147
|
+
PositiveInt = Annotated[int, Field(gt=0)]
|
|
148
|
+
TrimmedStr = Annotated[str, Field(min_length=1, strip_whitespace=True)]
|
|
149
|
+
|
|
150
|
+
class UserCreate(BaseModel):
|
|
151
|
+
model_config = {"str_strip_whitespace": True}
|
|
152
|
+
|
|
153
|
+
name: TrimmedStr = Field(max_length=50)
|
|
154
|
+
email: EmailStr
|
|
155
|
+
age: PositiveInt
|
|
156
|
+
password: SecretStr = Field(min_length=8)
|
|
157
|
+
|
|
158
|
+
@field_validator('name')
|
|
159
|
+
@classmethod
|
|
160
|
+
def validate_name(cls, v: str) -> str:
|
|
161
|
+
if not v.replace(' ', '').isalpha():
|
|
162
|
+
raise ValueError('Name must contain only letters')
|
|
163
|
+
return v.title()
|
|
164
|
+
|
|
165
|
+
@model_validator(mode='after')
|
|
166
|
+
def check_adult_email(self) -> 'UserCreate':
|
|
167
|
+
if self.age < 18 and 'kids' not in self.email:
|
|
168
|
+
raise ValueError('Minors must use a kids account email')
|
|
169
|
+
return self
|
|
170
|
+
|
|
171
|
+
# Usage
|
|
172
|
+
user = UserCreate(name="alice smith", email="alice@example.com", age=25, password="securepassword")
|
|
173
|
+
user.model_dump() # {'name': 'Alice Smith', 'email': 'alice@example.com', 'age': 25}
|
|
174
|
+
user.model_dump(mode='json') # JSON-serializable dict
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
### FastAPI 0.115+ — Production Patterns
|
|
180
|
+
|
|
181
|
+
#### Application Structure
|
|
182
|
+
```
|
|
183
|
+
my_api/
|
|
184
|
+
├── main.py # FastAPI app + lifespan
|
|
185
|
+
├── routers/
|
|
186
|
+
│ ├── users.py # APIRouter for /users
|
|
187
|
+
│ └── posts.py # APIRouter for /posts
|
|
188
|
+
├── models/
|
|
189
|
+
│ ├── user.py # Pydantic request/response models
|
|
190
|
+
│ └── post.py
|
|
191
|
+
├── db/
|
|
192
|
+
│ ├── database.py # SQLAlchemy engine + session
|
|
193
|
+
│ └── models.py # ORM models
|
|
194
|
+
├── services/
|
|
195
|
+
│ └── user_service.py # Business logic layer
|
|
196
|
+
└── core/
|
|
197
|
+
├── config.py # Settings with Pydantic BaseSettings
|
|
198
|
+
└── security.py # JWT, hashing
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
#### Lifespan — Startup & Shutdown
|
|
202
|
+
```python
|
|
203
|
+
from contextlib import asynccontextmanager
|
|
204
|
+
from fastapi import FastAPI
|
|
205
|
+
from sqlalchemy.ext.asyncio import create_async_engine, async_sessionmaker
|
|
206
|
+
|
|
207
|
+
engine = create_async_engine(settings.DATABASE_URL, echo=False, pool_size=10)
|
|
208
|
+
AsyncSessionLocal = async_sessionmaker(engine, expire_on_commit=False)
|
|
209
|
+
|
|
210
|
+
@asynccontextmanager
|
|
211
|
+
async def lifespan(app: FastAPI):
|
|
212
|
+
# Startup
|
|
213
|
+
async with engine.begin() as conn:
|
|
214
|
+
await conn.run_sync(Base.metadata.create_all)
|
|
215
|
+
print("✅ Database connected")
|
|
216
|
+
yield
|
|
217
|
+
# Shutdown
|
|
218
|
+
await engine.dispose()
|
|
219
|
+
print("✅ Database disconnected")
|
|
220
|
+
|
|
221
|
+
app = FastAPI(title="My API", version="1.0.0", lifespan=lifespan)
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
#### Dependency Injection Pattern
|
|
225
|
+
```python
|
|
226
|
+
from typing import Annotated
|
|
227
|
+
from fastapi import Depends, HTTPException, status
|
|
228
|
+
from sqlalchemy.ext.asyncio import AsyncSession
|
|
229
|
+
|
|
230
|
+
async def get_db() -> AsyncSession:
|
|
231
|
+
async with AsyncSessionLocal() as session:
|
|
232
|
+
yield session
|
|
233
|
+
|
|
234
|
+
DbDep = Annotated[AsyncSession, Depends(get_db)]
|
|
235
|
+
|
|
236
|
+
# In routes
|
|
237
|
+
@router.get("/users/{user_id}", response_model=UserResponse)
|
|
238
|
+
async def get_user(user_id: str, db: DbDep):
|
|
239
|
+
user = await db.get(User, user_id)
|
|
240
|
+
if not user:
|
|
241
|
+
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="User not found")
|
|
242
|
+
return user
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
#### Settings with Pydantic BaseSettings
|
|
246
|
+
```python
|
|
247
|
+
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
248
|
+
|
|
249
|
+
class Settings(BaseSettings):
|
|
250
|
+
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
|
|
251
|
+
|
|
252
|
+
DATABASE_URL: str
|
|
253
|
+
SECRET_KEY: str
|
|
254
|
+
ALGORITHM: str = "HS256"
|
|
255
|
+
ACCESS_TOKEN_EXPIRE_MINUTES: int = 15
|
|
256
|
+
ENVIRONMENT: str = "development"
|
|
257
|
+
|
|
258
|
+
@property
|
|
259
|
+
def is_production(self) -> bool:
|
|
260
|
+
return self.ENVIRONMENT == "production"
|
|
261
|
+
|
|
262
|
+
settings = Settings()
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
#### Structured Error Handling (RFC 9457)
|
|
266
|
+
```python
|
|
267
|
+
from fastapi import Request
|
|
268
|
+
from fastapi.responses import JSONResponse
|
|
269
|
+
|
|
270
|
+
class AppException(Exception):
|
|
271
|
+
def __init__(self, *, type: str, title: str, status: int, detail: str):
|
|
272
|
+
self.type = type
|
|
273
|
+
self.title = title
|
|
274
|
+
self.status = status
|
|
275
|
+
self.detail = detail
|
|
276
|
+
|
|
277
|
+
@app.exception_handler(AppException)
|
|
278
|
+
async def app_exception_handler(request: Request, exc: AppException) -> JSONResponse:
|
|
279
|
+
return JSONResponse(
|
|
280
|
+
status_code=exc.status,
|
|
281
|
+
content={
|
|
282
|
+
"type": exc.type,
|
|
283
|
+
"title": exc.title,
|
|
284
|
+
"status": exc.status,
|
|
285
|
+
"detail": exc.detail,
|
|
286
|
+
}
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
# Usage in routes
|
|
290
|
+
raise AppException(
|
|
291
|
+
type="https://myapi.com/errors/user-not-found",
|
|
292
|
+
title="User Not Found",
|
|
293
|
+
status=404,
|
|
294
|
+
detail=f"User with id '{user_id}' does not exist",
|
|
295
|
+
)
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
### Async Patterns
|
|
301
|
+
|
|
302
|
+
#### asyncio.TaskGroup (Python 3.11+)
|
|
303
|
+
```python
|
|
304
|
+
import asyncio
|
|
305
|
+
|
|
306
|
+
async def main():
|
|
307
|
+
# Better than asyncio.gather — propagates exceptions immediately
|
|
308
|
+
async with asyncio.TaskGroup() as tg:
|
|
309
|
+
task_users = tg.create_task(fetch_users())
|
|
310
|
+
task_posts = tg.create_task(fetch_posts())
|
|
311
|
+
task_stats = tg.create_task(fetch_stats())
|
|
312
|
+
# All tasks complete here — exception in any task cancels all others
|
|
313
|
+
return task_users.result(), task_posts.result(), task_stats.result()
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
#### Python 3.13 — JIT & Free-Threaded Mode
|
|
317
|
+
```bash
|
|
318
|
+
# JIT compiler — 10-20% speedup on CPU-bound code
|
|
319
|
+
PYTHON_JIT=1 python3.13 compute_heavy.py
|
|
320
|
+
|
|
321
|
+
# Free-threaded build (no GIL) — true CPU parallelism
|
|
322
|
+
uv python install 3.13t # install free-threaded build
|
|
323
|
+
python3.13t -X gil=0 parallel_app.py
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
### Testing with pytest + pytest-asyncio
|
|
329
|
+
```python
|
|
330
|
+
# conftest.py
|
|
331
|
+
import pytest
|
|
332
|
+
from httpx import AsyncClient, ASGITransport
|
|
333
|
+
from sqlalchemy.ext.asyncio import create_async_engine, async_sessionmaker
|
|
334
|
+
|
|
335
|
+
TEST_DATABASE_URL = "sqlite+aiosqlite:///:memory:"
|
|
336
|
+
|
|
337
|
+
@pytest.fixture
|
|
338
|
+
async def db_session():
|
|
339
|
+
engine = create_async_engine(TEST_DATABASE_URL)
|
|
340
|
+
async with engine.begin() as conn:
|
|
341
|
+
await conn.run_sync(Base.metadata.create_all)
|
|
342
|
+
async with async_sessionmaker(engine)() as session:
|
|
343
|
+
yield session
|
|
344
|
+
await engine.dispose()
|
|
345
|
+
|
|
346
|
+
@pytest.fixture
|
|
347
|
+
async def client(db_session):
|
|
348
|
+
app.dependency_overrides[get_db] = lambda: db_session
|
|
349
|
+
async with AsyncClient(
|
|
350
|
+
transport=ASGITransport(app=app), base_url="http://test"
|
|
351
|
+
) as ac:
|
|
352
|
+
yield ac
|
|
353
|
+
|
|
354
|
+
# test_users.py
|
|
355
|
+
async def test_create_user(client: AsyncClient):
|
|
356
|
+
response = await client.post("/users", json={"name": "Alice", "email": "alice@test.com", "age": 25, "password": "password123"})
|
|
357
|
+
assert response.status_code == 201
|
|
358
|
+
data = response.json()
|
|
359
|
+
assert data["email"] == "alice@test.com"
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
<a name="bahasa-indonesia"></a>
|
|
365
|
+
## Bahasa Indonesia
|
|
366
|
+
|
|
367
|
+
### Integrasi Orkestrasi
|
|
368
|
+
Terhubung dan mengorkestrasi skill domain yang relevan seperti `brainstorming`, `zero-to-prod-orchestrator`, dan `project-context-mapper` untuk memastikan eksekusi yang kohesif.
|
|
369
|
+
|
|
370
|
+
### Deskripsi
|
|
371
|
+
Panduan pengembangan Python tingkat ahli untuk **Python 3.13/3.14+** mencakup JIT compilation, mode free-threaded (tanpa GIL), pola keamanan tipe modern, arsitektur async, dan stack produksi lengkap: **FastAPI 0.115+**, **Pydantic v2**, **SQLAlchemy 2.x**, **uv**, **Ruff**, dan **pytest-asyncio**.
|
|
372
|
+
|
|
373
|
+
### Kondisi Pemicu
|
|
374
|
+
- Menulis aplikasi atau layanan Python 3.13+/3.14+.
|
|
375
|
+
- Membangun REST API FastAPI 0.115+, Django 5.x, atau Litestar.
|
|
376
|
+
- Mengelola proyek Python dengan manajer paket `uv`.
|
|
377
|
+
- Mengimplementasikan pola async/await dengan `asyncio.TaskGroup`.
|
|
378
|
+
- Menulis Python type-safe dengan Pydantic v2 dan generik modern (PEP 695/696).
|
|
379
|
+
- Menyiapkan Ruff untuk linting + formatting; pytest-asyncio untuk pengujian.
|
|
380
|
+
|
|
381
|
+
### Toolchain Modern (2026)
|
|
382
|
+
|
|
383
|
+
**`uv`** menggantikan `pip`, `pip-tools`, `virtualenv`, `pyenv`, dan `poetry` — ditulis dalam Rust, 10-100x lebih cepat. Gunakan satu file `pyproject.toml` untuk semua konfigurasi.
|
|
384
|
+
|
|
385
|
+
### Keamanan Tipe — Pola Modern
|
|
386
|
+
|
|
387
|
+
**PEP 695** (Python 3.12+): Sintaksis generic baru yang bersih tanpa boilerplate `TypeVar`. Gunakan `type` statement untuk alias tipe.
|
|
388
|
+
|
|
389
|
+
**PEP 696** (Python 3.14+): Default untuk TypeVar — mengurangi boilerplate lebih lanjut pada library dan class generic.
|
|
390
|
+
|
|
391
|
+
**Pydantic v2**: Gunakan `BaseModel`, `Field`, `@field_validator`, dan `@model_validator` untuk validasi data yang ketat. `model_dump()` dan `model_validate()` menggantikan metode v1.
|
|
392
|
+
|
|
393
|
+
### FastAPI 0.115+ — Pola Produksi
|
|
394
|
+
|
|
395
|
+
- **Lifespan**: Gunakan `@asynccontextmanager` dengan `lifespan=` di `FastAPI()` untuk startup/shutdown yang bersih.
|
|
396
|
+
- **Dependency Injection**: Gunakan `Depends()` dengan `Annotated` untuk sesi database, autentikasi, dll.
|
|
397
|
+
- **BaseSettings**: Gunakan `pydantic-settings` untuk konfigurasi dari environment variables dengan validasi tipe.
|
|
398
|
+
- **Error RFC 9457**: Format error yang konsisten dengan `type`, `title`, `status`, `detail`.
|
|
399
|
+
|
|
400
|
+
### Pola Async
|
|
401
|
+
|
|
402
|
+
Gunakan `asyncio.TaskGroup` (Python 3.11+) sebagai pengganti `asyncio.gather()` — lebih aman karena propagasi exception langsung dan membatalkan semua task lain saat ada yang gagal.
|
|
403
|
+
|
|
404
|
+
Python 3.13 JIT: Aktifkan dengan `PYTHON_JIT=1` untuk kode CPU-bound. Free-threaded mode (`python3.13t -X gil=0`) untuk paralelisme CPU sejati.
|
|
405
|
+
|
|
406
|
+
### Pengujian
|
|
407
|
+
|
|
408
|
+
Gunakan `pytest-asyncio` dengan `asyncio_mode = "auto"` di `pyproject.toml`. Gunakan `AsyncClient` dari `httpx` dengan `ASGITransport` untuk pengujian endpoint async yang bersih dan terisolasi tanpa perlu menjalankan server.
|