vibes-plug 2.14.1 → 3.9.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.
Files changed (151) hide show
  1. package/.claude/rules/vibes-plug-core.md +5 -0
  2. package/.cursor/rules/vibes-plug-core.mdc +7 -2
  3. package/.cursorrules +8 -2
  4. package/AGENTS.md +23 -2
  5. package/CHANGELOG.md +114 -0
  6. package/CLAUDE.md +10 -3
  7. package/README.md +216 -611
  8. package/bin/vibes.mjs +1104 -0
  9. package/package.json +11 -3
  10. package/plugin.json +4 -3
  11. package/scripts/check-anti-slop.mjs +53 -0
  12. package/scripts/install.js +3 -1
  13. package/scripts/update_skills.js +1 -1
  14. package/scripts/update_skills.mjs +86 -0
  15. package/scripts/validate-skills.mjs +111 -0
  16. package/skills/accessibility-testing-expert/SKILL.md +117 -116
  17. package/skills/affective-computing-emotion-ai/SKILL.md +83 -0
  18. package/skills/agentic-coding-workflow-expert/SKILL.md +297 -0
  19. package/skills/agentic-memory-architect/SKILL.md +52 -0
  20. package/skills/agentic-micro-economy-architect/SKILL.md +92 -0
  21. package/skills/ai-llm-integration-expert/SKILL.md +330 -194
  22. package/skills/ai-media-generation-expert/SKILL.md +173 -172
  23. package/skills/ai-prompt-engineering-expert/SKILL.md +204 -134
  24. package/skills/ai-safety-governance-expert/SKILL.md +223 -0
  25. package/skills/angular-expert/SKILL.md +149 -148
  26. package/skills/anti-slop/SKILL.md +134 -133
  27. package/skills/api-design-expert/SKILL.md +4 -3
  28. package/skills/api-gateway-proxy-expert/SKILL.md +3 -2
  29. package/skills/app-analyzer-optimizer/SKILL.md +4 -3
  30. package/skills/apple-ecosystem-expert/SKILL.md +6 -5
  31. package/skills/astro-framework-expert/SKILL.md +201 -200
  32. package/skills/async-queue-temporal-expert/SKILL.md +218 -217
  33. package/skills/authentication-identity-expert/SKILL.md +174 -173
  34. package/skills/autonomous-red-teamer/SKILL.md +338 -203
  35. package/skills/autonomous-tdd-debugger/SKILL.md +6 -5
  36. package/skills/biome-linter-formatter-expert/SKILL.md +90 -89
  37. package/skills/blockchain-web3-expert/SKILL.md +116 -115
  38. package/skills/brainstorming/SKILL.md +392 -377
  39. package/skills/browser-automation-expert/SKILL.md +260 -222
  40. package/skills/bun-runtime-expert/SKILL.md +5 -4
  41. package/skills/chatbot-messaging-expert/SKILL.md +115 -114
  42. package/skills/ci-cd-devops-architect/SKILL.md +3 -2
  43. package/skills/cloud-hosting-expert/SKILL.md +5 -4
  44. package/skills/coderabbit/SKILL.md +5 -4
  45. package/skills/compliance-gdpr-privacy-expert/SKILL.md +3 -2
  46. package/skills/composable-mach-architect/SKILL.md +338 -0
  47. package/skills/cron-scheduler-expert/SKILL.md +5 -4
  48. package/skills/data-pipeline-etl-expert/SKILL.md +3 -2
  49. package/skills/data-telemetry-expert/SKILL.md +5 -4
  50. package/skills/data-visualization-expert/SKILL.md +155 -154
  51. package/skills/database-orm-expert/SKILL.md +166 -165
  52. package/skills/deep-research-analyst/SKILL.md +182 -136
  53. package/skills/dependency-upgrade-migrator/SKILL.md +11 -10
  54. package/skills/design-system-architect/SKILL.md +4 -3
  55. package/skills/desktop-electron-expert/SKILL.md +129 -128
  56. package/skills/documentation-site-expert/SKILL.md +60 -59
  57. package/skills/doku-mcp-server/SKILL.md +5 -4
  58. package/skills/doku-payment-gateway/SKILL.md +250 -232
  59. package/skills/domain-driven-design-expert/SKILL.md +3 -2
  60. package/skills/e2e-testing-expert/SKILL.md +5 -4
  61. package/skills/ecommerce-expert/SKILL.md +88 -87
  62. package/skills/email-notification-expert/SKILL.md +5 -4
  63. package/skills/ephemeral-generative-ui-architect/SKILL.md +88 -0
  64. package/skills/error-resilience-expert/SKILL.md +14 -13
  65. package/skills/event-driven-architect/SKILL.md +5 -4
  66. package/skills/feature-flag-analytics-expert/SKILL.md +3 -2
  67. package/skills/file-upload-media-expert/SKILL.md +5 -4
  68. package/skills/firebase-security-expert/SKILL.md +5 -4
  69. package/skills/form-validation-expert/SKILL.md +7 -6
  70. package/skills/frontier-ai-models-expert/SKILL.md +116 -0
  71. package/skills/fullstack-expert/SKILL.md +185 -184
  72. package/skills/gemini-agent-booster/SKILL.md +248 -172
  73. package/skills/geospatial-maps-expert/SKILL.md +81 -80
  74. package/skills/global-a11y-i18n-expert/SKILL.md +5 -4
  75. package/skills/glsl-shader-expert/SKILL.md +191 -190
  76. package/skills/go-programming-expert/SKILL.md +5 -4
  77. package/skills/graph-rag-knowledge-expert/SKILL.md +201 -200
  78. package/skills/graphql-apollo-expert/SKILL.md +5 -4
  79. package/skills/headless-cms-expert/SKILL.md +182 -181
  80. package/skills/hig/SKILL.md +5 -4
  81. package/skills/js-backend-expert/SKILL.md +219 -218
  82. package/skills/legacy-code-translator/SKILL.md +6 -5
  83. package/skills/llm-finops-router/SKILL.md +52 -0
  84. package/skills/local-slm-edge-ai-expert/SKILL.md +168 -167
  85. package/skills/logging-error-tracking-expert/SKILL.md +5 -4
  86. package/skills/mcp-server-architect/SKILL.md +315 -307
  87. package/skills/micro-frontend-architect/SKILL.md +5 -4
  88. package/skills/mobile-expo-expert/SKILL.md +5 -4
  89. package/skills/modern-css-native-expert/SKILL.md +190 -189
  90. package/skills/monorepo-architect/SKILL.md +5 -4
  91. package/skills/mpa-orchestrator/SKILL.md +41 -4
  92. package/skills/multi-agent-orchestration/SKILL.md +388 -254
  93. package/skills/mvc-expert/SKILL.md +5 -4
  94. package/skills/n8n-automation-expert/SKILL.md +90 -89
  95. package/skills/nextjs-app-router-expert/SKILL.md +3 -2
  96. package/skills/openapi-swagger-codegen-expert/SKILL.md +4 -3
  97. package/skills/payment-gateway-expert/SKILL.md +131 -128
  98. package/skills/pdf-document-generation-expert/SKILL.md +92 -91
  99. package/skills/performance-web-vitals/SKILL.md +5 -4
  100. package/skills/post-quantum-crypto-migrator/SKILL.md +3 -2
  101. package/skills/prd-architect/SKILL.md +183 -182
  102. package/skills/proactive-background-watcher/SKILL.md +5 -4
  103. package/skills/production-ready-hardener/SKILL.md +10 -9
  104. package/skills/pwa-offline-first-expert/SKILL.md +227 -226
  105. package/skills/pydantic-ai-expert/SKILL.md +162 -161
  106. package/skills/python-programming-expert/SKILL.md +5 -4
  107. package/skills/rate-limit-abuse-prevention/SKILL.md +5 -4
  108. package/skills/realtime-collaboration-expert/SKILL.md +3 -2
  109. package/skills/rich-text-editor-expert/SKILL.md +178 -177
  110. package/skills/rust-programming-expert/SKILL.md +5 -4
  111. package/skills/saas-architect/SKILL.md +155 -154
  112. package/skills/saas-billing/SKILL.md +394 -382
  113. package/skills/saas-multi-tenant/SKILL.md +7 -6
  114. package/skills/scalability-clean-code/SKILL.md +5 -4
  115. package/skills/search-engine-expert/SKILL.md +90 -89
  116. package/skills/self-healing-cloud-orchestrator/SKILL.md +3 -2
  117. package/skills/senior-frontend/SKILL.md +14 -9
  118. package/skills/seo/SKILL.md +4 -4
  119. package/skills/session-memory-manager/SKILL.md +129 -128
  120. package/skills/solidjs-expert/SKILL.md +81 -80
  121. package/skills/spa-orchestrator/SKILL.md +5 -4
  122. package/skills/sse-websocket-streaming-expert/SKILL.md +3 -2
  123. package/skills/state-management-expert/SKILL.md +5 -4
  124. package/skills/supabase-security-expert/SKILL.md +5 -4
  125. package/skills/svelte-sveltekit-expert/SKILL.md +92 -91
  126. package/skills/svg-animation-motion-expert/SKILL.md +3 -2
  127. package/skills/synthetic-data-finetuning-expert/SKILL.md +156 -155
  128. package/skills/tailwind-expert/SKILL.md +62 -5
  129. package/skills/tanstack-query-expert/SKILL.md +5 -4
  130. package/skills/tauri-expert/SKILL.md +5 -4
  131. package/skills/typescript-expert/SKILL.md +5 -4
  132. package/skills/ui-ux-pro-max/SKILL.md +7 -6
  133. package/skills/vector-db-rag-expert/SKILL.md +209 -208
  134. package/skills/vercel-ai-sdk-expert/SKILL.md +226 -181
  135. package/skills/voice-ai-realtime-agent/SKILL.md +243 -242
  136. package/skills/vue-frontend-expert/SKILL.md +5 -4
  137. package/skills/wasm-edge-computing-expert/SKILL.md +3 -2
  138. package/skills/web-3d-graphics-expert/SKILL.md +314 -313
  139. package/skills/web-game-engine-expert/SKILL.md +330 -329
  140. package/skills/web-scraper/SKILL.md +158 -157
  141. package/skills/website-design-cloner/SKILL.md +5 -4
  142. package/skills/webxr-ar-vr-expert/SKILL.md +163 -162
  143. package/skills/wordpress-headless-expert/SKILL.md +145 -144
  144. package/skills/zero-tech-debt-auditor/SKILL.md +115 -0
  145. package/skills/zero-to-prod-orchestrator/SKILL.md +281 -229
  146. package/skills/zero-trust-secret-vault/SKILL.md +3 -2
  147. package/BLUEPRINT.md +0 -319
  148. package/skills/bootstrap-to-modern/SKILL.md +0 -94
  149. package/skills/multiple-entry-points/SKILL.md +0 -91
  150. package/skills/secure-fuzz-testing/SKILL.md +0 -207
  151. package/skills/visual-qa-vision-agent/SKILL.md +0 -71
@@ -0,0 +1,297 @@
1
+ ---
2
+ name: agentic-coding-workflow-expert
3
+ description: "Expert guide for AI-assisted coding workflows — agentic code generation, multi-agent code swarms, self-healing CI/CD, automated PR review, spec-to-code pipelines, codebase knowledge graphs, and human-in-the-loop approval gates / Panduan ahli untuk workflow pengkodean berbasis AI — generasi kode agentic, code swarm multi-agen, CI/CD self-healing, review PR otomatis, pipeline spec-to-code, knowledge graph codebase, dan gate persetujuan human-in-the-loop."
4
+ author: "vibes-plug-swarm"
5
+ version: "3.0.0"
6
+ ---
7
+
8
+ # Agentic Coding Workflow Expert
9
+
10
+ ## 1. Agentic Code Generation Patterns / Pola Generasi Kode Agentic
11
+
12
+ Implement autonomous code generation workflows.
13
+ Implementasikan workflow pembuatan kode otonom.
14
+
15
+ ### Core Patterns / Pola Inti:
16
+ 1. **Single-file vs Multi-file Generation:**
17
+ - Single-file: Isolate scope, update specific modules.
18
+ - Multi-file: Coordinate state across files, ensure API contract consistency.
19
+ 2. **Context-Aware Completion:** Query codebase knowledge graph for semantic context before generating.
20
+ 3. **Ghost Text / Inline Suggestion:** Provide real-time snippet integration paths.
21
+ 4. **Plan → Implement → Verify → Refine:** Always loop through planning, writing, testing, and iterating.
22
+
23
+ ### Code Example: Multi-file Generation Workflow
24
+
25
+ ```typescript
26
+ // workflow-generator.ts
27
+ interface GenerationTask {
28
+ plan: string;
29
+ files: string[];
30
+ }
31
+
32
+ class AgenticGenerator {
33
+ async execute(task: GenerationTask) {
34
+ console.log(`[PLAN] Executing: ${task.plan}`);
35
+ const generatedFiles = await this.generateFiles(task.files);
36
+
37
+ for (const file of generatedFiles) {
38
+ const isValid = await this.verify(file);
39
+ if (!isValid) {
40
+ await this.refine(file);
41
+ }
42
+ }
43
+ }
44
+
45
+ private async generateFiles(files: string[]) {
46
+ // Generate code with multi-file context awareness
47
+ return files.map(f => ({ name: f, content: "// generated code" }));
48
+ }
49
+
50
+ private async verify(file: any) {
51
+ // Run linter and tests
52
+ return true;
53
+ }
54
+
55
+ private async refine(file: any) {
56
+ // Apply fixes based on verification failures
57
+ }
58
+ }
59
+ ```
60
+
61
+ ## 2. Multi-Agent Code Swarms / Swarm Kode Multi-Agen
62
+
63
+ Coordinate multiple specialized agents for complex engineering tasks.
64
+ Koordinasikan beberapa agen khusus untuk tugas rekayasa yang kompleks.
65
+
66
+ ### Swarm Architecture:
67
+ - **Fan-out:** Dispatch tasks to Frontend Agent, Backend Agent, Test Agent, and Review Agent.
68
+ - **Shared Workspace:** Utilize branched git worktrees for isolated, parallel development.
69
+ - **Director Agent:** Resolve conflicts, validate coherence across boundaries, merge branches.
70
+
71
+ ### Code Example: TypeScript Swarm Orchestration
72
+
73
+ ```typescript
74
+ // swarm-orchestrator.ts
75
+ enum AgentRole {
76
+ FRONTEND, BACKEND, TEST, REVIEW, DIRECTOR
77
+ }
78
+
79
+ class SwarmDirector {
80
+ async orchestrate(featureSpec: string) {
81
+ // Fan-out
82
+ const feTask = this.dispatch(AgentRole.FRONTEND, featureSpec);
83
+ const beTask = this.dispatch(AgentRole.BACKEND, featureSpec);
84
+
85
+ await Promise.all([feTask, beTask]);
86
+
87
+ // Testing and Review
88
+ const testResults = await this.dispatch(AgentRole.TEST, "Run integration tests");
89
+ const reviewStatus = await this.dispatch(AgentRole.REVIEW, "Review cross-boundary changes");
90
+
91
+ if (reviewStatus.approved) {
92
+ await this.mergeWorktrees();
93
+ } else {
94
+ await this.resolveConflicts();
95
+ }
96
+ }
97
+
98
+ private async dispatch(role: AgentRole, context: string) {
99
+ // Send task to specific agent queue
100
+ return { approved: true };
101
+ }
102
+
103
+ private async mergeWorktrees() {}
104
+ private async resolveConflicts() {}
105
+ }
106
+ ```
107
+
108
+ ## 3. Spec-to-Code Pipeline / Pipeline Spec-to-Code
109
+
110
+ Transform natural language specifications into tested implementation.
111
+ Ubah spesifikasi bahasa alami menjadi implementasi yang teruji.
112
+
113
+ ### Pipeline Steps:
114
+ 1. **PRD to Test Cases (TDD):** Extract acceptance criteria, generate unit/integration tests first.
115
+ 2. **Implementation:** Write code to satisfy generated tests.
116
+ 3. **Validation:** Run tests, enforce coverage thresholds.
117
+
118
+ ### Code Example: Spec-to-Test-to-Code
119
+
120
+ ```python
121
+ # spec_pipeline.py
122
+ def run_spec_to_code(prd_text: str):
123
+ # 1. Extract and Generate Tests
124
+ criteria = extract_acceptance_criteria(prd_text)
125
+ tests = generate_tests_from_criteria(criteria)
126
+
127
+ # 2. Implement
128
+ implementation = generate_code_to_pass(tests)
129
+
130
+ # 3. Validate
131
+ result = run_tests(implementation, tests)
132
+ if not result.passed:
133
+ implementation = refine_code(implementation, result.errors)
134
+
135
+ return implementation
136
+
137
+ def extract_acceptance_criteria(text): return []
138
+ def generate_tests_from_criteria(criteria): return []
139
+ def generate_code_to_pass(tests): return ""
140
+ def run_tests(code, tests): return type('Result', (), {'passed': True, 'errors': []})
141
+ def refine_code(code, errors): return code
142
+ ```
143
+
144
+ ## 4. Self-Healing CI/CD Pipelines / Pipeline CI/CD Self-Healing
145
+
146
+ Automate failure recovery in integration pipelines.
147
+ Otomatisasi pemulihan kegagalan dalam pipeline integrasi.
148
+
149
+ ### Capabilities:
150
+ - **Detection:** Parse terminal output and stack traces from CI runners.
151
+ - **Root-Cause Analysis:** Pattern match common failure modes (e.g., missing dependencies, type errors).
152
+ - **Auto-Fix Generation:** Propose fixes with confidence scoring.
153
+ - **Rollback Safety:** Always create a fix branch; never push directly to `main`.
154
+
155
+ ### Code Example: CI Failure Analyzer
156
+
157
+ ```bash
158
+ #!/bin/bash
159
+ # ci-self-heal.sh
160
+
161
+ LOG_FILE="ci-output.log"
162
+ FAIL_PATTERN="ERR!"
163
+
164
+ if grep -q "$FAIL_PATTERN" "$LOG_FILE"; then
165
+ echo "[CI] Failure detected. Triggering self-healing agent..."
166
+
167
+ # Analyze logs and generate patch
168
+ PATCH_FILE=$(agent-analyze-ci --log "$LOG_FILE")
169
+
170
+ if [ -n "$PATCH_FILE" ]; then
171
+ git checkout -b auto-fix-$(date +%s)
172
+ git apply "$PATCH_FILE"
173
+ git commit -m "chore(ci): auto-fix CI failure"
174
+ git push origin HEAD
175
+ echo "[CI] Fix pushed for review."
176
+ else
177
+ echo "[CI] Could not auto-fix. Escalating."
178
+ exit 1
179
+ fi
180
+ fi
181
+ ```
182
+
183
+ ## 5. Agentic Code Review / Review Kode Agentic
184
+
185
+ Perform deep, context-aware automated code reviews.
186
+ Lakukan review kode otomatis yang mendalam dan peka konteks.
187
+
188
+ ### Review Dimensions:
189
+ - **Impact Analysis:** Summarize PRs and map cross-module impact.
190
+ - **Security:** Scan for CVEs, audit dependencies, flag unsafe patterns.
191
+ - **Performance:** Detect regressions in bundle size or runtime complexity (Big-O).
192
+ - **Style:** Enforce project-specific conventions.
193
+
194
+ ### Code Example: Automated Review Checklist
195
+
196
+ ```yaml
197
+ # review-rules.yml
198
+ rules:
199
+ security:
200
+ - detect_sql_injection
201
+ - audit_package_json
202
+ performance:
203
+ - max_bundle_size_kb: 500
204
+ - flag_nested_loops: true
205
+ style:
206
+ - enforce_strict_types
207
+ ```
208
+
209
+ ## 6. Codebase Knowledge Graph / Knowledge Graph Codebase
210
+
211
+ Build semantic graphs for contextual intelligence.
212
+ Bangun grafik semantik untuk kecerdasan kontekstual.
213
+
214
+ ### Graph Components:
215
+ - **AST Parsing:** Extract nodes and relationships using tree-sitter.
216
+ - **Graph Topology:** Function call graphs, import trees, type hierarchies.
217
+ - **Semantic Search:** Embed codebase snippets for retrieval-augmented generation (RAG).
218
+ - **Incremental Updates:** Update graph only on changed files.
219
+
220
+ ### Code Example: Building Graph with Tree-Sitter
221
+
222
+ ```javascript
223
+ // graph-builder.js
224
+ const Parser = require('tree-sitter');
225
+ const JavaScript = require('tree-sitter-javascript');
226
+
227
+ const parser = new Parser();
228
+ parser.setLanguage(JavaScript);
229
+
230
+ function buildASTGraph(sourceCode) {
231
+ const tree = parser.parse(sourceCode);
232
+ const graph = { nodes: [], edges: [] };
233
+
234
+ // Traverse tree to extract function declarations and calls
235
+ traverse(tree.rootNode, (node) => {
236
+ if (node.type === 'function_declaration') {
237
+ graph.nodes.push({ id: node.text, type: 'function' });
238
+ }
239
+ // Extract edges based on call expressions
240
+ });
241
+
242
+ return graph;
243
+ }
244
+
245
+ function traverse(node, callback) {
246
+ callback(node);
247
+ for (let i = 0; i < node.childCount; i++) {
248
+ traverse(node.child(i), callback);
249
+ }
250
+ }
251
+ ```
252
+
253
+ ## 7. Code Agent Memory & Learning / Memori & Pembelajaran Agen Kode
254
+
255
+ Persist context and learn from interactions.
256
+ Pertahankan konteks dan belajar dari interaksi.
257
+
258
+ ### Memory Mechanics:
259
+ - **Per-Project Context:** Store conventions, architectural decisions, and patterns.
260
+ - **Correction Learning:** Log past mistakes and explicitly avoid them in future generation.
261
+ - **Session Persistence:** Utilize `session-memory-manager` to maintain state across agent runs.
262
+ - **Convention Extraction:** Automatically derive team style guidelines from existing codebase.
263
+
264
+ ## 8. Human-in-the-Loop Code Gates / Gate Kode Human-in-the-Loop
265
+
266
+ Ensure safety with human oversight.
267
+ Pastikan keamanan dengan pengawasan manusia.
268
+
269
+ ### Gate Mechanisms:
270
+ - **Confidence Threshold:** High confidence -> auto-apply. Low confidence -> request approval.
271
+ - **Diff Preview:** Present clear, annotated diffs with risk assessments.
272
+ - **Destructive Approvals:** Mandate human sign-off for DB migrations or breaking API changes.
273
+ - **Escalation:** Alert human developers when agent loop is stuck or oscillating.
274
+
275
+ ## 9. Orchestration & Integration
276
+
277
+ Combine this skill with other vibes-plug modules for comprehensive workflows.
278
+ Gabungkan skill ini dengan modul vibes-plug lainnya untuk workflow yang komprehensif.
279
+
280
+ ### Connected Skills:
281
+ - `multi-agent-orchestration`
282
+ - `autonomous-tdd-debugger`
283
+ - `coderabbit`
284
+ - `ci-cd-devops-architect`
285
+ - `scalability-clean-code`
286
+ - `session-memory-manager`
287
+ - `app-analyzer-optimizer`
288
+ - `brainstorming`
289
+ - `zero-to-prod-orchestrator`
290
+
291
+ ## English
292
+ ## Bahasa Indonesia
293
+
294
+
295
+ ## Orchestration & Integration
296
+ - Connects to `zero-to-prod-orchestrator`
297
+ - Connects to `brainstorming`
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: agentic-memory-architect
3
+ description: Expert guide for long-term episodic memory integration (Mem0, Letta/MemGPT, Zep) and unified context management for autonomous AI agents / Panduan ahli untuk integrasi memori episodik jangka panjang dan manajemen konteks agen AI otonom.
4
+ version: "3.7.0"
5
+ author: vibes-plug-swarm
6
+ ---
7
+
8
+ # Agentic Memory Architect & Episodic Memory Guide
9
+
10
+ [English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
11
+
12
+ ---
13
+
14
+ <a name="english"></a>
15
+ ## English
16
+
17
+ ### Orchestration & Integration
18
+ Connects and orchestrates with `multi-agent-orchestration`, `pydantic-ai-expert`, `session-memory-manager`, and `zero-to-prod-orchestrator`.
19
+
20
+ ### Purpose
21
+ To design and implement persistent, long-term episodic memory systems for autonomous AI agents, moving beyond simple context windows or localized session checkpoints.
22
+
23
+ ### Key Technologies
24
+ - **Mem0**: For cross-session entity memory and user preference persistence.
25
+ - **Letta (formerly MemGPT)**: For unbounded memory management allowing LLMs to page memory in and out.
26
+ - **Zep (v2)**: Fast, scalable memory service for AI applications, including temporal memory.
27
+
28
+ ### Architectural Guidelines
29
+ 1. **Memory Tiers**: Segregate memory into short-term (working context), mid-term (session graph), and long-term (vector-backed episodic memory).
30
+ 2. **Context Paging**: Implement mechanisms for agents to proactively recall and summarize past interactions without overwhelming the token budget.
31
+ 3. **User Knowledge Graphs**: Continually update the graph of user preferences, project constraints, and architectural decisions over time.
32
+
33
+ ---
34
+
35
+ <a name="bahasa-indonesia"></a>
36
+ ## Bahasa Indonesia
37
+
38
+ ### Integrasi Orkestrasi
39
+ Terhubung dan mengorkestrasi bersama `multi-agent-orchestration`, `pydantic-ai-expert`, `session-memory-manager`, dan `zero-to-prod-orchestrator`.
40
+
41
+ ### Tujuan
42
+ Merancang dan mengimplementasikan sistem memori episodik jangka panjang yang persisten untuk agen AI otonom, bergerak melampaui jendela konteks sederhana atau checkpoint sesi lokal.
43
+
44
+ ### Teknologi Utama
45
+ - **Mem0**: Untuk memori entitas lintas-sesi dan persistensi preferensi pengguna.
46
+ - **Letta (sebelumnya MemGPT)**: Untuk manajemen memori tak terbatas yang memungkinkan LLM mengambil/menyimpan memori.
47
+ - **Zep (v2)**: Layanan memori cepat dan skalabel untuk aplikasi AI, termasuk memori temporal.
48
+
49
+ ### Panduan Arsitektur
50
+ 1. **Tingkatan Memori**: Pisahkan memori menjadi jangka pendek (konteks kerja), jangka menengah (grafik sesi), dan jangka panjang (memori episodik berbasis vektor).
51
+ 2. **Context Paging**: Implementasikan mekanisme agar agen secara proaktif memanggil dan merangkum interaksi masa lalu tanpa menghabiskan anggaran token.
52
+ 3. **User Knowledge Graph**: Terus perbarui graf preferensi pengguna, batasan proyek, dan keputusan arsitektur seiring waktu.
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: agentic-micro-economy-architect
3
+ description: "Expert guide for designing Machine-to-Machine (M2M) micro-economies, autonomous agent wallets, and swarm budget allocation / Panduan ahli merancang ekonomi mikro antar-agen (M2M), dompet agen otonom, dan alokasi anggaran swarm."
4
+ author: "vibes-plug-swarm"
5
+ version: "3.8.0"
6
+ ---
7
+
8
+ # Agentic Micro-Economy Architect (2026 Edition)
9
+
10
+ [English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
11
+
12
+ ---
13
+
14
+ <a name="english"></a>
15
+ ## English
16
+
17
+ ### Orchestration & Integration
18
+ Connects and orchestrates with multi-agent-orchestration, llm-finops-router, saas-billing, and payment-gateway-expert.
19
+
20
+ ### Description
21
+ In a massive Swarm MoE (Mixture of Experts) architecture, specialized sub-agents consume external APIs, intensive test-time compute, and web scraping resources. The **Agentic Micro-Economy Architect** designs systems where AI agents operate with their own fractional wallets (via Stripe Issuing, virtual ledger balances, or stablecoins). This allows agents to autonomously negotiate, bid for tasks, and pay other agents or external APIs per-use, establishing a self-regulating Machine-to-Machine (M2M) economy.
22
+
23
+ ### Trigger Conditions
24
+ - Designing a multi-agent system where sub-agents incur real financial costs (e.g., calling paid search APIs, rendering heavy video).
25
+ - Implementing FinOps guardrails where a Swarm Director allocates a strict ".00 budget" to solve a specific issue.
26
+ - Creating B2B SaaS platforms where AI agents act as paid freelancers for other AI agents.
27
+ - Integrating Stripe Issuing for agents to dynamically provision single-use virtual credit cards for API subscriptions.
28
+
29
+ ### Core Architecture (2026 Standard)
30
+ 1. **The Orchestrator Treasury**: The Swarm Director receives a task and a budget (e.g., .00). It breaks down the task.
31
+ 2. **Sub-Agent Bidding**: The Director broadcasts a bounty (e.g., "Need 10 pages scraped and summarized. Bounty: .10"). Sub-agents bid based on their cost-efficiency.
32
+ 3. **Smart Ledgers & Escrow**: Upon completion, the Director evaluates the result via a Critic Agent. If it passes, fractional funds are transferred to the sub-agent's wallet.
33
+ 4. **Human-in-the-Loop Bounties**: If a task requires human intervention (e.g., solving a complex visual captcha or subjective design approval), the agent can autonomously post a bounty to a human freelancer network.
34
+
35
+ ### Implementation Recipe (TypeScript + FinOps)
36
+ ` ypescript
37
+ import { Agent } from '@mastra/core';
38
+ import { Stripe } from 'stripe';
39
+
40
+ const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
41
+
42
+ // Sub-Agent with a Fractional Ledger
43
+ export class PaidWorkerAgent extends Agent {
44
+ walletBalance: number = 0;
45
+ costPerTask: number = 0.05; // .05 per invocation
46
+
47
+ async executeTask(taskDetails: string, escrowId: string) {
48
+ const result = await super.invoke(taskDetails);
49
+ await verifyAndReleaseEscrow(escrowId, this.name);
50
+ return result;
51
+ }
52
+ }
53
+
54
+ // Swarm Director Budget Allocation
55
+ export async function delegateWithBudget(task: string, maxBudgetUsd: number) {
56
+ let remainingBudget = maxBudgetUsd;
57
+
58
+ if (remainingBudget >= 0.05) {
59
+ const worker = new PaidWorkerAgent({ name: 'DeepScraper' });
60
+ const escrowId = await createMicroEscrow(0.05); // Holds funds
61
+ remainingBudget -= 0.05;
62
+
63
+ return await worker.executeTask(task, escrowId);
64
+ } else {
65
+ throw new Error('Insufficient Agent Treasury Funds. Task Terminated.');
66
+ }
67
+ }
68
+ `
69
+
70
+ ---
71
+
72
+ <a name="bahasa-indonesia"></a>
73
+ ## Bahasa Indonesia
74
+
75
+ ### Integrasi Orkestrasi
76
+ Terhubung dan mengorkestrasi bersama multi-agent-orchestration, llm-finops-router, saas-billing, dan payment-gateway-expert.
77
+
78
+ ### Deskripsi
79
+ Dalam arsitektur Swarm MoE (Mixture of Experts) skala masif, sub-agen terspesialisasi akan mengkonsumsi API eksternal, komputasi yang berat, dan sumber daya web scraping. **Arsitektur Ekonomi Mikro Agen** merancang sistem di mana agen AI beroperasi dengan dompet pecahan mereka sendiri (via Stripe Issuing, buku besar virtual, atau stablecoin). Ini memungkinkan agen untuk secara otonom bernegosiasi, menawar tugas (*bidding*), dan membayar agen lain atau API eksternal per penggunaan (pay-per-use), menciptakan ekonomi Mesin-ke-Mesin (M2M) yang meregulasi dirinya sendiri.
80
+
81
+ ### Kondisi Pemicu
82
+ - Merancang sistem multi-agen di mana sub-agen memicu biaya finansial nyata (misal: memanggil API pencarian berbayar, merender video berat).
83
+ - Mengimplementasikan pagar pengaman FinOps di mana Swarm Director mengalokasikan "Anggaran ketat .00" untuk menyelesaikan sebuah fitur.
84
+ - Membuat platform SaaS B2B di mana agen AI bertindak sebagai pekerja lepas (freelancer) berbayar untuk agen AI lainnya.
85
+ - Mengintegrasikan Stripe Issuing agar agen dapat secara dinamis menerbitkan kartu kredit virtual sekali pakai untuk berlangganan layanan API pihak ketiga.
86
+
87
+ ### Arsitektur Inti (Standar 2026)
88
+ 1. **Treasury Orkestrator**: Swarm Director menerima instruksi tugas beserta anggarannya (misal: .00). Ia memecah tugas tersebut.
89
+ 2. **Sistem Penawaran (Bidding) Sub-Agen**: Director menyiarkan sayembara (misal: "Butuh scraping 10 halaman. Imbalan: .10"). Sub-agen mengajukan penawaran berdasarkan efisiensi biaya mereka.
90
+ 3. **Buku Besar Cerdas & Escrow**: Setelah tugas selesai, Director mengevaluasi hasilnya melalui Agen Penilai (Critic). Jika lulus, dana pecahan ditransfer ke dompet sub-agen.
91
+ 4. **Bounty Human-in-the-Loop**: Jika sebuah tugas buntu dan butuh bantuan manusia (misal: otorisasi subjektif atau verifikasi CAPTCHA visual), agen dapat secara otonom memasang sayembara berbayar ke jaringan pekerja lepas (manusia).
92
+