vibes-plug 2.5.0 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +319 -217
- package/CHANGELOG.md +170 -1
- package/CLAUDE.md +70 -0
- package/LICENSE +1 -1
- package/README.md +611 -415
- package/index.js +19 -0
- package/package.json +44 -8
- package/plugin.json +24 -7
- package/scripts/check-anti-slop.js +53 -0
- 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-llm-integration-expert/SKILL.md +192 -178
- package/skills/ai-media-generation-expert/SKILL.md +172 -0
- package/skills/ai-prompt-engineering-expert/SKILL.md +134 -0
- package/skills/angular-expert/SKILL.md +148 -0
- package/skills/anti-slop/SKILL.md +133 -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/astro-framework-expert/SKILL.md +200 -0
- package/skills/async-queue-temporal-expert/SKILL.md +189 -26
- package/skills/authentication-identity-expert/SKILL.md +78 -181
- package/skills/autonomous-red-teamer/SKILL.md +172 -28
- package/skills/autonomous-tdd-debugger/SKILL.md +70 -64
- 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 +60 -52
- 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-orm-expert/SKILL.md +165 -294
- package/skills/deep-research-analyst/SKILL.md +136 -0
- package/skills/dependency-upgrade-migrator/SKILL.md +300 -294
- package/skills/design-system-architect/SKILL.md +309 -260
- 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/email-notification-expert/SKILL.md +393 -360
- package/skills/error-resilience-expert/SKILL.md +506 -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 +184 -202
- 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 +158 -69
- package/skills/go-programming-expert/SKILL.md +21 -15
- package/skills/graph-rag-knowledge-expert/SKILL.md +200 -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-server-architect/SKILL.md +308 -194
- package/skills/micro-frontend-architect/SKILL.md +111 -105
- package/skills/mobile-expo-expert/SKILL.md +8 -2
- package/skills/modern-css-native-expert/SKILL.md +189 -0
- 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 +182 -201
- package/skills/proactive-background-watcher/SKILL.md +67 -61
- package/skills/production-ready-hardener/SKILL.md +459 -456
- package/skills/pwa-offline-first-expert/SKILL.md +226 -0
- package/skills/pydantic-ai-expert/SKILL.md +161 -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-architect/SKILL.md +154 -0
- package/skills/saas-billing/SKILL.md +7 -1
- package/skills/saas-multi-tenant/SKILL.md +7 -1
- 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-healing-cloud-orchestrator/SKILL.md +57 -57
- package/skills/senior-frontend/SKILL.md +139 -161
- package/skills/senior-frontend/scripts/frontend_scaffolder.py +1 -1
- package/skills/seo/SKILL.md +41 -17
- package/skills/session-memory-manager/SKILL.md +128 -0
- 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-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/synthetic-data-finetuning-expert/SKILL.md +155 -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/typescript-expert/SKILL.md +12 -6
- package/skills/ui-ux-pro-max/SKILL.md +25 -3
- package/skills/vector-db-rag-expert/SKILL.md +175 -19
- package/skills/vercel-ai-sdk-expert/SKILL.md +181 -0
- package/skills/visual-qa-vision-agent/SKILL.md +70 -64
- package/skills/voice-ai-realtime-agent/SKILL.md +242 -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 +262 -80
- package/skills/web-game-engine-expert/SKILL.md +281 -48
- 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 +108 -63
- package/skills/wordpress-headless-expert/SKILL.md +144 -0
- package/skills/zero-to-prod-orchestrator/SKILL.md +65 -38
- 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/ai-cost-token-optimizer/SKILL.md +0 -52
- package/skills/asisten_ramah/SKILL.md +0 -41
- package/skills/auto-doc-updater/SKILL.md +0 -214
- package/skills/autonomous-chaos-monkey/SKILL.md +0 -63
- package/skills/autonomous-swarm-director/SKILL.md +0 -69
- package/skills/edge-serverless-db-expert/SKILL.md +0 -43
- package/skills/hyper-context-synthesizer/SKILL.md +0 -55
- package/skills/llm-cost-arbitrage-router/SKILL.md +0 -59
- package/skills/mcp-client-orchestrator/SKILL.md +0 -70
- package/skills/mobile-push-notification-expert/SKILL.md +0 -51
- package/skills/monday-design-aesthetic/SKILL.md +0 -67
- package/skills/project-context-mapper/SKILL.md +0 -79
- package/skills/saas-mvp-launcher/SKILL.md +0 -241
- package/skills/saas-transformer/SKILL.md +0 -489
- package/skills/saas-transformer/references/billing_integration_guide.md +0 -401
- package/skills/self-evolving-memory-graph/SKILL.md +0 -75
- 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/session-context-loader/SKILL.md +0 -77
- package/skills/session-handoff-resume/SKILL.md +0 -158
- package/skills/skill_baru/SKILL.md +0 -172
- package/skills/supabase-migration/SKILL.md +0 -45
- package/skills/token-saver/SKILL.md +0 -119
- package/skills/ui-components-expert/SKILL.md +0 -280
- 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/skills/vibe-code-gardener/SKILL.md +0 -181
- package/vibes-swarm-demo.gif +0 -0
- /package/skills/{saas-transformer → saas-architect}/references/feature_gating_patterns.md +0 -0
- /package/skills/{saas-transformer → saas-architect}/references/saas_transformation_checklist.md +0 -0
- /package/skills/{saas-transformer → saas-architect}/scripts/saas_transformation_scanner.py +0 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: voice-ai-realtime-agent
|
|
3
|
+
description: "Expert guide for Ultra-Low Latency Conversational Voice AI (<300ms), WebRTC bidirectional streaming, OpenAI Realtime API, Gemini Multimodal Live Audio, LiveKit Agents, and Semantic VAD / Panduan ahli AI suara percakapan real-time berlatensi ultra-rendah."
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Voice AI Realtime Agent (2026 Edition)
|
|
8
|
+
|
|
9
|
+
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<a name="english"></a>
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
### Description
|
|
17
|
+
Expert guide for building ultra-low-latency (<300ms), bi-directional conversational voice AI applications. Covers WebRTC, full-duplex WebSocket audio streaming (PCM 24kHz), OpenAI Realtime API, Gemini Multimodal Live API, LiveKit Agents SDK, and smart interruption (barge-in) handling.
|
|
18
|
+
|
|
19
|
+
### Trigger Conditions
|
|
20
|
+
- Applications requiring sub-second, spoken conversation with an AI agent.
|
|
21
|
+
- Voice customer service bots, verbal copilots, language tutors, and interactive voice assistants.
|
|
22
|
+
- Implementation of WebRTC audio streaming, full-duplex WebSocket audio (PCM 24kHz), and Silero VAD.
|
|
23
|
+
- Setting up OpenAI Realtime API (`gpt-4o-realtime-preview`) or Gemini Multimodal Live API.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 1. Core Architecture: Full-Duplex Speech-to-Speech
|
|
28
|
+
|
|
29
|
+
Traditional voice pipelines chain STT ➔ LLM ➔ TTS with cumulative latency exceeding 1,200ms–2,500ms. Modern 2026 voice agents use **native speech-to-speech** or **streamable full-duplex WebRTC pipelines** achieving natural, human-like reaction times (~250–350ms).
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
User Mic ──► [WebRTC / WebSocket] ──► [VAD: Silero / WebRTC VAD]
|
|
33
|
+
│
|
|
34
|
+
▼
|
|
35
|
+
User Speaks <── [Audio Output] ◄── [Native Audio Stream / Cartesia] ◄── [OpenAI Realtime / Gemini Live]
|
|
36
|
+
│
|
|
37
|
+
└── User Interrupts (Barge-in) ──► Instant Buffer Flush & Cancel Audio Frame Emission
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 2. Production Recipe: LiveKit Agents + OpenAI Realtime (Python)
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
# agent.py - Production Voice Agent Worker with LiveKit & OpenAI Realtime
|
|
46
|
+
import asyncio
|
|
47
|
+
import os
|
|
48
|
+
from livekit import rtc
|
|
49
|
+
from livekit.agents import (
|
|
50
|
+
AutoSubscribe,
|
|
51
|
+
JobContext,
|
|
52
|
+
JobProcess,
|
|
53
|
+
WorkerOptions,
|
|
54
|
+
cli,
|
|
55
|
+
llm,
|
|
56
|
+
)
|
|
57
|
+
from livekit.agents.pipeline import VoicePipelineAgent
|
|
58
|
+
from livekit.plugins import deepgram, openai, silero
|
|
59
|
+
|
|
60
|
+
async def entrypoint(ctx: JobContext):
|
|
61
|
+
# Connect to room with audio only to minimize bandwidth & latency
|
|
62
|
+
await ctx.connect(auto_subscribe=AutoSubscribe.AUDIO_ONLY)
|
|
63
|
+
|
|
64
|
+
# Wait for the user participant to join
|
|
65
|
+
participant = await ctx.wait_for_participant()
|
|
66
|
+
|
|
67
|
+
# Define agent instructions and tools
|
|
68
|
+
initial_ctx = llm.ChatContext().append(
|
|
69
|
+
role="system",
|
|
70
|
+
text=(
|
|
71
|
+
"You are a helpful, concise voice assistant. "
|
|
72
|
+
"Respond naturally in 1-2 short sentences. Never output markdown, bullet points, or emojis."
|
|
73
|
+
)
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# Realtime Voice Pipeline: Deepgram (STT) + OpenAI (LLM) + Cartesia/OpenAI (TTS)
|
|
77
|
+
# Or use native OpenAI Realtime Model: gpt-4o-realtime-preview
|
|
78
|
+
agent = VoicePipelineAgent(
|
|
79
|
+
vad=silero.VAD.load(
|
|
80
|
+
min_speech_duration=0.1,
|
|
81
|
+
min_silence_duration=0.3, # Snappy turn-taking
|
|
82
|
+
prefix_padding_duration=0.2,
|
|
83
|
+
),
|
|
84
|
+
stt=deepgram.STT(model="nova-2", language="id"), # Multi-language support
|
|
85
|
+
llm=openai.LLM(model="gpt-4o-mini"),
|
|
86
|
+
tts=openai.TTS(voice="alloy"),
|
|
87
|
+
chat_ctx=initial_ctx,
|
|
88
|
+
allow_interruptions=True, # Barge-in capability
|
|
89
|
+
interrupt_speech_duration=0.3, # Immediate cutoff when user talks
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
agent.start(ctx.room, participant)
|
|
93
|
+
|
|
94
|
+
# Greet user immediately
|
|
95
|
+
await agent.say("Halo! Ada yang bisa saya bantu hari ini?", now=True)
|
|
96
|
+
|
|
97
|
+
if __name__ == "__main__":
|
|
98
|
+
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint))
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 3. Production Recipe: Gemini Multimodal Live Audio (TypeScript / Node.js)
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
// gemini-live-audio.ts - Bidirectional WebSocket PCM 24kHz
|
|
107
|
+
import WebSocket from 'ws';
|
|
108
|
+
|
|
109
|
+
interface GeminiAudioConfig {
|
|
110
|
+
apiKey: string;
|
|
111
|
+
model?: string;
|
|
112
|
+
systemInstruction?: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export class GeminiVoiceAgent {
|
|
116
|
+
private ws: WebSocket | null = null;
|
|
117
|
+
private isConnected = false;
|
|
118
|
+
|
|
119
|
+
constructor(private config: GeminiAudioConfig) {}
|
|
120
|
+
|
|
121
|
+
public async connect(): Promise<void> {
|
|
122
|
+
const url = `wss://generativelanguage.googleapis.com/ws/google.ai.generativelanguage.v1alpha.GenerativeService.BidiGenerateContent?key=${this.config.apiKey}`;
|
|
123
|
+
|
|
124
|
+
this.ws = new WebSocket(url);
|
|
125
|
+
|
|
126
|
+
this.ws.on('open', () => {
|
|
127
|
+
this.isConnected = true;
|
|
128
|
+
this.sendInitialHandshake();
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
this.ws.on('message', (data: WebSocket.Data) => {
|
|
132
|
+
this.handleIncomingAudio(data);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
private sendInitialHandshake(): void {
|
|
137
|
+
const setupMessage = {
|
|
138
|
+
setup: {
|
|
139
|
+
model: `models/${this.config.model || 'gemini-2.0-flash-exp'}`,
|
|
140
|
+
generationConfig: {
|
|
141
|
+
responseModalities: ["AUDIO"],
|
|
142
|
+
speechConfig: {
|
|
143
|
+
voiceConfig: {
|
|
144
|
+
prebuiltVoiceConfig: { voiceName: "Puck" }
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
systemInstruction: {
|
|
149
|
+
parts: [{ text: this.config.systemInstruction || "You are a conversational voice agent. Keep answers brief." }]
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
this.ws?.send(JSON.stringify(setupMessage));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Stream raw PCM 16-bit 24kHz mono audio from mic
|
|
157
|
+
public sendAudioChunk(pcm16Chunk: Buffer): void {
|
|
158
|
+
if (!this.isConnected || !this.ws) return;
|
|
159
|
+
|
|
160
|
+
const base64Audio = pcm16Chunk.toString('base64');
|
|
161
|
+
const msg = {
|
|
162
|
+
realtimeInput: {
|
|
163
|
+
mediaChunks: [
|
|
164
|
+
{
|
|
165
|
+
mimeType: "audio/pcm;rate=24000",
|
|
166
|
+
data: base64Audio
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
this.ws.send(JSON.stringify(msg));
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
private handleIncomingAudio(data: WebSocket.Data): void {
|
|
175
|
+
try {
|
|
176
|
+
const response = JSON.parse(data.toString());
|
|
177
|
+
const parts = response.serverContent?.modelTurn?.parts;
|
|
178
|
+
if (parts) {
|
|
179
|
+
for (const part of parts) {
|
|
180
|
+
if (part.inlineData?.data) {
|
|
181
|
+
const pcmBuffer = Buffer.from(part.inlineData.data, 'base64');
|
|
182
|
+
this.playAudioSpeaker(pcmBuffer);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
} catch {
|
|
187
|
+
// Binary PCM frame handler
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
private playAudioSpeaker(pcmChunk: Buffer): void {
|
|
192
|
+
// Send to WebRTC audio track or audio output device
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## 4. Key 2026 Performance Guardrails
|
|
200
|
+
|
|
201
|
+
1. **Barge-in Latency Budget (<150ms)**: When the user speaks while the bot is talking, cancel outgoing audio immediately. Do not wait for the LLM to finish streaming its chunk.
|
|
202
|
+
2. **Audio Sample Rates**:
|
|
203
|
+
- Mic Input: 16kHz or 24kHz 16-bit Linear PCM Mono.
|
|
204
|
+
- Bot Output: 24kHz PCM for crystal-clear natural prosody.
|
|
205
|
+
3. **Turn-Taking Jitter Prevention**: Use minimum silence thresholds between `300ms` and `450ms`. Lower thresholds cause the bot to interrupt users when they pause to think; higher thresholds make the conversation feel robotic.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Orchestration & Integration
|
|
210
|
+
|
|
211
|
+
- **`ai-llm-integration-expert`**: For base LLM prompt routing and function calling during conversation.
|
|
212
|
+
- **`realtime-collaboration-expert`**: For syncing WebRTC tracks and room states with client applications.
|
|
213
|
+
- **`gemini-agent-booster`**: Connects Gemini 3.x / 2.0 Flash thinking models to live voice agents.
|
|
214
|
+
- **`mobile-expo-expert`**: Audio streaming implementation in React Native with `expo-av` and WebRTC shim.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
<a name="bahasa-indonesia"></a>
|
|
219
|
+
## Bahasa Indonesia
|
|
220
|
+
|
|
221
|
+
### Deskripsi
|
|
222
|
+
Panduan ahli untuk membangun aplikasi AI suara percakapan dua arah berlatensi ultra-rendah (<300ms). Mencakup integrasi WebRTC, streaming audio WebSocket full-duplex (PCM 24kHz), OpenAI Realtime API, Gemini Multimodal Live API, LiveKit Agents SDK, dan penanganan interupsi cerdas (*barge-in*).
|
|
223
|
+
|
|
224
|
+
### Kondisi Pemicu
|
|
225
|
+
- Kebutuhan interaksi percakapan verbal instan di bawah satu detik dengan agen AI.
|
|
226
|
+
- Bot layanan pelanggan berbasis suara, asisten verbal, tutor bahasa interaktif.
|
|
227
|
+
- Implementasi streaming audio WebRTC, WebSocket PCM 24kHz dua arah, dan Silero Voice Activity Detection (VAD).
|
|
228
|
+
- Konfigurasi OpenAI Realtime API (`gpt-4o-realtime-preview`) atau Gemini Multimodal Live API.
|
|
229
|
+
|
|
230
|
+
### Panduan Inti Arsitektur Suara Real-time
|
|
231
|
+
1. **Full-Duplex Speech-to-Speech**: Mengganti pipeline sekuensial tradisional (STT ➔ LLM ➔ TTS) dengan pipeline streamable WebRTC atau model native speech-to-speech untuk memangkas latensi dari ~2000ms menjadi ~300ms.
|
|
232
|
+
2. **Penanganan Interupsi (Barge-In)**: Saat VAD mendeteksi suara pengguna baru saat bot sedang berbicara, buffer audio keluar harus di-flush dalam waktu <150ms tanpa menunggu LLM menyelesaikan kalimatnya.
|
|
233
|
+
3. **Standar Format Audio**: Input mikrofon PCM 16-bit 16kHz/24kHz Mono, dan output speaker 24kHz untuk intonasi yang alami dan jernih.
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Integrasi Orkestrasi
|
|
238
|
+
|
|
239
|
+
- **`ai-llm-integration-expert`**: Routing instruksi sistem dasar dan pemanggilan tool fungsi selama percakapan suara.
|
|
240
|
+
- **`realtime-collaboration-expert`**: Sinkronisasi track audio WebRTC dan status room pengguna.
|
|
241
|
+
- **`gemini-agent-booster`**: Integrasi model multimodal Gemini 2.0/3.x Flash untuk live audio.
|
|
242
|
+
- **`mobile-expo-expert`**: Implementasi audio streaming di React Native menggunakan `expo-av` dan WebRTC shim.
|
|
@@ -1,126 +1,132 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: vue-frontend-expert
|
|
3
|
-
description: "Expert guide for Vue 3 (Composition API), Nuxt 3, and Pinia. Covers advanced reactive state management, `<script setup>` syntax, Vue Router, VueUse, and SPA/SSR architectural patterns in English and Indonesian."
|
|
1
|
+
---
|
|
2
|
+
name: vue-frontend-expert
|
|
3
|
+
description: "Expert guide for Vue 3 (Composition API), Nuxt 3, and Pinia. Covers advanced reactive state management, `<script setup>` syntax, Vue Router, VueUse, and SPA/SSR architectural patterns in English and Indonesian."
|
|
4
4
|
author: "Roedy Rustam"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Vue Frontend Expert (Vue 3 / Nuxt 3)
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
###
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
|
|
126
|
-
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Vue Frontend Expert (Vue 3 / Nuxt 3)
|
|
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
|
+
Production-grade guidance for building highly reactive and scalable frontend applications using **Vue 3 (Composition API)** and **Nuxt 3**. Covers the latest ecosystem tools including **Pinia** for state management, **VueUse** for composables, and **Tailwind CSS v4** integration.
|
|
21
|
+
|
|
22
|
+
### Trigger Conditions
|
|
23
|
+
Activate this skill when the user is:
|
|
24
|
+
- Scaffolding a new Vue 3 or Nuxt 3 project.
|
|
25
|
+
- Writing or refactoring Vue components using `<script setup>` and Composition API.
|
|
26
|
+
- Managing global state with Pinia.
|
|
27
|
+
- Handling client-side routing with Vue Router or Nuxt's file-based routing.
|
|
28
|
+
- Implementing SSR (Server-Side Rendering) or SSG (Static Site Generation) using Nuxt 3.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
### Core Concepts
|
|
33
|
+
|
|
34
|
+
#### 1. Vue 3 Composition API & `<script setup>`
|
|
35
|
+
Use the `<script setup>` syntax by default. It provides better type inference, less boilerplate, and superior performance compared to the Options API.
|
|
36
|
+
|
|
37
|
+
```vue
|
|
38
|
+
<script setup lang="ts">
|
|
39
|
+
import { ref, computed, onMounted } from 'vue'
|
|
40
|
+
|
|
41
|
+
const count = ref(0)
|
|
42
|
+
const doubleCount = computed(() => count.value * 2)
|
|
43
|
+
|
|
44
|
+
function increment() {
|
|
45
|
+
count.value++
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
onMounted(() => {
|
|
49
|
+
console.log('Component is mounted!')
|
|
50
|
+
})
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<button @click="increment">Count is: {{ count }} (Double: {{ doubleCount }})</button>
|
|
55
|
+
</template>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
#### 2. Global State Management (Pinia)
|
|
59
|
+
Pinia is the official state management library for Vue. Avoid Vuex in modern applications.
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
// stores/counter.ts
|
|
63
|
+
import { defineStore } from 'pinia'
|
|
64
|
+
import { ref, computed } from 'vue'
|
|
65
|
+
|
|
66
|
+
export const useCounterStore = defineStore('counter', () => {
|
|
67
|
+
const count = ref(0)
|
|
68
|
+
const doubleCount = computed(() => count.value * 2)
|
|
69
|
+
function increment() {
|
|
70
|
+
count.value++
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return { count, doubleCount, increment }
|
|
74
|
+
})
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### 3. Nuxt 3 Architecture
|
|
78
|
+
For SSR, SEO optimization, and file-based routing, use Nuxt 3.
|
|
79
|
+
- Data fetching: Use `useAsyncData` or `useFetch` to prevent hydration mismatches.
|
|
80
|
+
- Server API: Utilize the `server/api/` directory for Nitro API routes.
|
|
81
|
+
|
|
82
|
+
#### 4. The VueUse Collection
|
|
83
|
+
Always leverage [VueUse](https://vueuse.org/) for common composables (e.g., `useWindowSize`, `onClickOutside`, `useStorage`) instead of writing custom composables from scratch.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### Best Practices
|
|
88
|
+
1. **Ref vs Reactive:** Prefer `ref` for primitive values and `reactive` for deeply nested objects. When in doubt, default to `ref`.
|
|
89
|
+
2. **Define Macros:** Use `defineProps` and `defineEmits` in `<script setup>` for typed props and events.
|
|
90
|
+
3. **Avoid Watchers when possible:** Rely on `computed` properties instead of `watch` to derive state. Use `watch` only for side-effects (e.g., API calls, DOM manipulation).
|
|
91
|
+
4. **V-Model:** Use the updated `v-model` binding in Vue 3.4+ with `defineModel()` for cleaner two-way data binding between components.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
### Integration with Other Skills (MANDATORY)
|
|
96
|
+
|
|
97
|
+
This skill works best when combined with:
|
|
98
|
+
- `design-system-architect` — To build headless UI components using Radix Vue or VueUse components.
|
|
99
|
+
- `tailwind-expert` — For styling Vue/Nuxt components with Tailwind CSS v4.
|
|
100
|
+
- `performance-web-vitals` — To optimize Nuxt 3 SSR metrics (LCP, INP).
|
|
101
|
+
|
|
102
|
+
### Referenced By Orchestrators (MANDATORY)
|
|
103
|
+
|
|
104
|
+
This skill should be referenced by the following orchestrators:
|
|
105
|
+
- `brainstorming` — Add to "Frontend Frameworks" row in the Matrix.
|
|
106
|
+
- `zero-to-prod-orchestrator` — Phase 5 (Frontend Implementation).
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
<a name="bahasa-indonesia"></a>
|
|
111
|
+
## Bahasa Indonesia
|
|
112
|
+
|
|
113
|
+
### Integrasi Orkestrasi
|
|
114
|
+
Terhubung dan mengorkestrasi skill domain yang relevan seperti `brainstorming`, `zero-to-prod-orchestrator`, dan `project-context-mapper` untuk memastikan eksekusi yang kohesif.
|
|
115
|
+
|
|
116
|
+
### Deskripsi
|
|
117
|
+
Panduan tingkat produksi untuk membangun aplikasi frontend reaktif dan terukur menggunakan **Vue 3 (Composition API)** dan **Nuxt 3**. Mencakup pengelolaan state dengan **Pinia**, utilitas **VueUse**, dan integrasi **Tailwind CSS v4**.
|
|
118
|
+
|
|
119
|
+
### Kondisi Pemicu
|
|
120
|
+
Aktifkan skill ini ketika pengguna sedang:
|
|
121
|
+
- Memulai proyek Vue 3 atau Nuxt 3 baru.
|
|
122
|
+
- Menulis ulang (refactoring) komponen ke `<script setup>` dan Composition API.
|
|
123
|
+
- Mengelola state global dengan Pinia (bukan Vuex).
|
|
124
|
+
- Menerapkan SSR (Server-Side Rendering) dengan Nuxt 3.
|
|
125
|
+
|
|
126
|
+
### Panduan Singkat
|
|
127
|
+
|
|
128
|
+
- **Composition API Default:** Selalu gunakan sintaks `<script setup lang="ts">`. Lebih ringkas, type-safe, dan efisien.
|
|
129
|
+
- **Pinia:** Gunakan Pinia dengan pola *Setup Store* (mirip Composition API) alih-alih pola Options (state, getters, actions).
|
|
130
|
+
- **Nuxt 3 Fetching:** Gunakan `useFetch` atau `useAsyncData` di dalam komponen Nuxt untuk pengambilan data saat SSR, bukan `onMounted` dengan `fetch` biasa.
|
|
131
|
+
- **Reaktivitas:** Gunakan `ref` untuk nilai primitif (string, number) dan `reactive` untuk objek bersarang yang kompleks. Utamakan `computed` daripada `watch` untuk state turunan.
|
|
132
|
+
- **VueUse:** Jangan menulis fungsi utilitas dari nol jika sudah ada di *library* VueUse (contoh: `useIntersectionObserver`, `useLocalStorage`).
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wasm-edge-computing-expert
|
|
3
|
+
description: "Expert guide for WebAssembly (WASM) and Edge Computing. Covers WASI preview 2, Spin/Fermyon, Cloudflare Workers WASM, and high-performance browser computing / Panduan ahli untuk WebAssembly (WASM) dan Edge Computing. Mencakup WASI preview 2, Spin/Fermyon, Cloudflare Workers WASM, dan komputasi performa tinggi di browser."
|
|
4
|
+
author: "Roedy Rustam"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# WASM & Edge Computing Expert
|
|
8
|
+
|
|
9
|
+
[English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<a name="english"></a>
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
### Description
|
|
17
|
+
A specialized guide for writing, compiling, and deploying WebAssembly (WASM) modules both on the Edge and in the browser. Covers the new WebAssembly System Interface (WASI) Preview 2, serverless execution environments (Spin, Cloudflare Workers, Fastly Compute), and bidirectional JavaScript-to-WASM interop.
|
|
18
|
+
|
|
19
|
+
### Trigger Conditions
|
|
20
|
+
- When porting heavy computational tasks (image processing, video encoding, cryptography) from JavaScript to Rust/Go via WASM.
|
|
21
|
+
- When deploying ultra-fast, cold-start-free serverless functions on Cloudflare Workers or Fermyon Spin.
|
|
22
|
+
- When the user asks about "WASI", "WebAssembly", or "Edge computing performance".
|
|
23
|
+
- When bridging legacy C/C++ libraries to run in the browser using Emscripten.
|
|
24
|
+
|
|
25
|
+
### Core Architectural Guidelines
|
|
26
|
+
|
|
27
|
+
#### 1. Language Choice & Toolchain
|
|
28
|
+
- **Rust (Recommended)**: Use `wasm-pack` for browser modules and `cargo component` for WASI Preview 2. Rust offers the smallest binary sizes and no garbage collector overhead.
|
|
29
|
+
- **Go**: Go 1.21+ has native WASI support (`GOOS=wasip1 GOARCH=wasm`), but binaries are larger due to the included runtime. Use TinyGo for smaller binaries.
|
|
30
|
+
- **AssemblyScript**: Use when the team only knows TypeScript, though performance is slightly less than Rust.
|
|
31
|
+
|
|
32
|
+
#### 2. Browser Integration (`wasm-bindgen`)
|
|
33
|
+
When writing Rust for the browser, minimize crossings between JS and WASM, as serialization is expensive.
|
|
34
|
+
```rust
|
|
35
|
+
use wasm_bindgen::prelude::*;
|
|
36
|
+
|
|
37
|
+
#[wasm_bindgen]
|
|
38
|
+
pub fn compute_heavy_task(input: &[u8]) -> Vec<u8> {
|
|
39
|
+
// Process data entirely in WASM before returning
|
|
40
|
+
input.iter().map(|&b| b.wrapping_add(1)).collect()
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### 3. Edge & WASI Preview 2
|
|
45
|
+
WASI Preview 2 introduces the Component Model, allowing WASM modules to securely access system resources (HTTP, Filesystem) without being tied to a specific language.
|
|
46
|
+
- Deploying to Cloudflare Workers:
|
|
47
|
+
```toml
|
|
48
|
+
# wrangler.toml
|
|
49
|
+
main = "./build/worker.js"
|
|
50
|
+
[wasm_modules]
|
|
51
|
+
MODULE = "./build/module.wasm"
|
|
52
|
+
```
|
|
53
|
+
- Deploying to Fermyon Spin: Use the `spin` CLI to build microservices entirely in WASM that start in under 1 millisecond.
|
|
54
|
+
|
|
55
|
+
#### 4. Shared Memory & Atomics
|
|
56
|
+
For multi-threaded browser WASM, use `SharedArrayBuffer` and Web Workers. Ensure your server sends the correct headers:
|
|
57
|
+
- `Cross-Origin-Opener-Policy: same-origin`
|
|
58
|
+
- `Cross-Origin-Embedder-Policy: require-corp`
|
|
59
|
+
|
|
60
|
+
## Orchestration & Integration
|
|
61
|
+
- Enhances `api-gateway-proxy-expert` for running custom logic at the edge (Cloudflare/Kong).
|
|
62
|
+
- Integrates with `rust-programming-expert` or `go-programming-expert` for module compilation.
|
|
63
|
+
- Pairs with `performance-web-vitals` to offload main-thread blocking tasks.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
<a name="bahasa-indonesia"></a>
|
|
68
|
+
## Bahasa Indonesia
|
|
69
|
+
|
|
70
|
+
### Deskripsi
|
|
71
|
+
Panduan khusus untuk menulis, mengompilasi, dan mendeploy modul WebAssembly (WASM) baik di Edge maupun di browser. Mencakup WebAssembly System Interface (WASI) Preview 2, lingkungan serverless (Spin, Cloudflare Workers), dan interoperabilitas JavaScript-ke-WASM dua arah.
|
|
72
|
+
|
|
73
|
+
### Kondisi Pemicu
|
|
74
|
+
- Saat memindahkan tugas komputasi berat (pemrosesan gambar, kriptografi) dari JavaScript ke Rust/Go melalui WASM.
|
|
75
|
+
- Saat mendeploy fungsi serverless ultra-cepat tanpa *cold start* di Cloudflare Workers atau Fermyon Spin.
|
|
76
|
+
- Saat menjembatani library C/C++ lama untuk dijalankan di browser menggunakan Emscripten.
|
|
77
|
+
|
|
78
|
+
### Panduan Arsitektur Inti
|
|
79
|
+
|
|
80
|
+
#### 1. Pilihan Bahasa & Toolchain
|
|
81
|
+
- **Rust (Direkomendasikan)**: Menghasilkan ukuran biner terkecil. Gunakan `wasm-pack` untuk web dan `cargo component` untuk WASI.
|
|
82
|
+
- **Go**: Gunakan TinyGo untuk ukuran modul yang lebih kecil, atau Go native `GOOS=wasip1` untuk dukungan WASI penuh (namun biner akan lebih besar).
|
|
83
|
+
- **AssemblyScript**: Jika tim hanya menguasai TypeScript.
|
|
84
|
+
|
|
85
|
+
#### 2. Integrasi Browser
|
|
86
|
+
Minimalkan pertukaran data (crossing) antara JavaScript dan WASM karena biaya serialisasinya tinggi. Kirim array besar (seperti `Uint8Array`) sekali, proses seluruhnya di WASM, lalu kembalikan hasilnya.
|
|
87
|
+
|
|
88
|
+
#### 3. Edge & WASI Preview 2 (Component Model)
|
|
89
|
+
WASI Preview 2 memungkinkan modul WASM mengakses resource sistem (HTTP, File) secara aman. Anda dapat mendeploy service WASM murni ke infrastruktur edge seperti Fermyon Spin atau Fastly dengan waktu mulai (startup time) di bawah 1 milidetik, jauh lebih cepat daripada container Docker tradisional.
|
|
90
|
+
|
|
91
|
+
#### 4. Shared Memory & Web Workers
|
|
92
|
+
Untuk performa multi-threading sejati di browser menggunakan WASM, gunakan `SharedArrayBuffer`. Pastikan server Anda mengirimkan header keamanan COOP dan COEP yang diwajibkan oleh browser modern.
|
|
93
|
+
|
|
94
|
+
## Integrasi Orkestrasi
|
|
95
|
+
- Memperkuat `api-gateway-proxy-expert` untuk logika kustom di edge.
|
|
96
|
+
- Terintegrasi dengan `rust-programming-expert` untuk kompilasi modul.
|
|
97
|
+
- Melengkapi `performance-web-vitals` dengan memindahkan komputasi berat dari *main thread* JavaScript.
|