vibes-plug 1.0.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.
Files changed (183) hide show
  1. package/.claude/rules/vibes-plug-core.md +32 -0
  2. package/.cursor/rules/vibes-plug-core.mdc +51 -0
  3. package/.cursorrules +42 -0
  4. package/AGENTS.md +96 -0
  5. package/BLUEPRINT.md +309 -125
  6. package/CHANGELOG.md +183 -1
  7. package/CLAUDE.md +70 -0
  8. package/LICENSE +1 -1
  9. package/README.md +641 -263
  10. package/index.js +19 -0
  11. package/package.json +61 -25
  12. package/plugin.json +24 -7
  13. package/scripts/generate_swarm_gif.py +295 -0
  14. package/scripts/install.js +201 -0
  15. package/skills/accessibility-testing-expert/SKILL.md +116 -0
  16. package/skills/ai-cost-token-optimizer/SKILL.md +82 -0
  17. package/skills/ai-evals-benchmark-expert/SKILL.md +188 -0
  18. package/skills/ai-llm-integration-expert/SKILL.md +147 -122
  19. package/skills/ai-media-generation-expert/SKILL.md +172 -0
  20. package/skills/ai-prompt-engineering-expert/SKILL.md +84 -0
  21. package/skills/angular-expert/SKILL.md +148 -0
  22. package/skills/api-design-expert/SKILL.md +316 -309
  23. package/skills/api-gateway-proxy-expert/SKILL.md +81 -0
  24. package/skills/app-analyzer-optimizer/SKILL.md +195 -188
  25. package/skills/apple-ecosystem-expert/SKILL.md +145 -0
  26. package/skills/{asisten_ramah → asisten-ramah}/SKILL.md +7 -1
  27. package/skills/astro-framework-expert/SKILL.md +200 -0
  28. package/skills/async-queue-temporal-expert/SKILL.md +240 -0
  29. package/skills/authentication-identity-expert/SKILL.md +279 -45
  30. package/skills/auto-doc-updater/SKILL.md +219 -203
  31. package/skills/autonomous-chaos-monkey/SKILL.md +63 -0
  32. package/skills/autonomous-red-teamer/SKILL.md +203 -0
  33. package/skills/autonomous-tdd-debugger/SKILL.md +71 -0
  34. package/skills/background-jobs-queue-expert/SKILL.md +235 -0
  35. package/skills/biome-linter-formatter-expert/SKILL.md +89 -0
  36. package/skills/blockchain-web3-expert/SKILL.md +115 -0
  37. package/skills/bootstrap-to-modern/SKILL.md +93 -86
  38. package/skills/brainstorming/SKILL.md +381 -353
  39. package/skills/browser-automation-expert/SKILL.md +222 -0
  40. package/skills/bun-runtime-expert/SKILL.md +7 -1
  41. package/skills/chatbot-messaging-expert/SKILL.md +114 -0
  42. package/skills/ci-cd-devops-architect/SKILL.md +81 -45
  43. package/skills/cloud-hosting-expert/SKILL.md +249 -243
  44. package/skills/coderabbit/SKILL.md +197 -191
  45. package/skills/compliance-gdpr-privacy-expert/SKILL.md +85 -0
  46. package/skills/cron-scheduler-expert/SKILL.md +304 -0
  47. package/skills/data-pipeline-etl-expert/SKILL.md +84 -0
  48. package/skills/data-telemetry-expert/SKILL.md +218 -212
  49. package/skills/data-visualization-expert/SKILL.md +154 -0
  50. package/skills/database-migration-versioning-expert/SKILL.md +90 -0
  51. package/skills/database-orm-expert/SKILL.md +303 -293
  52. package/skills/dependency-upgrade-migrator/SKILL.md +301 -0
  53. package/skills/design-system-architect/SKILL.md +278 -242
  54. package/skills/desktop-electron-expert/SKILL.md +128 -0
  55. package/skills/documentation-site-expert/SKILL.md +59 -0
  56. package/skills/doku-mcp-server/SKILL.md +257 -0
  57. package/skills/doku-payment-gateway/SKILL.md +233 -0
  58. package/skills/domain-driven-design-expert/SKILL.md +82 -0
  59. package/skills/e2e-testing-expert/SKILL.md +320 -314
  60. package/skills/ecommerce-expert/SKILL.md +87 -0
  61. package/skills/edge-serverless-db-expert/SKILL.md +99 -0
  62. package/skills/email-notification-expert/SKILL.md +368 -0
  63. package/skills/error-resilience-expert/SKILL.md +486 -0
  64. package/skills/event-driven-architect/SKILL.md +86 -80
  65. package/skills/feature-flag-analytics-expert/SKILL.md +66 -0
  66. package/skills/file-upload-media-expert/SKILL.md +437 -0
  67. package/skills/firebase-security-expert/SKILL.md +7 -1
  68. package/skills/form-validation-expert/SKILL.md +407 -0
  69. package/skills/fullstack-expert/SKILL.md +260 -201
  70. package/skills/fullstack-expert/references/api_design_guide.md +466 -466
  71. package/skills/fullstack-expert/references/multi_language_backend.md +528 -528
  72. package/skills/fullstack-expert/scripts/api_contract_validator.py +253 -253
  73. package/skills/fullstack-expert/scripts/architecture_analyzer.py +326 -326
  74. package/skills/gemini-agent-booster/SKILL.md +142 -104
  75. package/skills/geospatial-maps-expert/SKILL.md +80 -0
  76. package/skills/global-a11y-i18n-expert/SKILL.md +86 -80
  77. package/skills/glsl-shader-expert/SKILL.md +107 -0
  78. package/skills/go-programming-expert/SKILL.md +300 -294
  79. package/skills/graph-rag-knowledge-expert/SKILL.md +159 -0
  80. package/skills/graphql-apollo-expert/SKILL.md +114 -0
  81. package/skills/headless-cms-expert/SKILL.md +181 -0
  82. package/skills/hig/SKILL.md +193 -187
  83. package/skills/js-backend-expert/SKILL.md +218 -191
  84. package/skills/legacy-code-translator/SKILL.md +71 -0
  85. package/skills/local-slm-edge-ai-expert/SKILL.md +167 -0
  86. package/skills/logging-error-tracking-expert/SKILL.md +344 -0
  87. package/skills/mcp-client-orchestrator/SKILL.md +76 -0
  88. package/skills/mcp-server-architect/SKILL.md +226 -126
  89. package/skills/micro-frontend-architect/SKILL.md +112 -0
  90. package/skills/mobile-expo-expert/SKILL.md +191 -185
  91. package/skills/mobile-push-notification-expert/SKILL.md +71 -0
  92. package/skills/modern-css-native-expert/SKILL.md +189 -0
  93. package/skills/monday-design-aesthetic/SKILL.md +72 -66
  94. package/skills/monorepo-architect/SKILL.md +232 -226
  95. package/skills/mpa-orchestrator/SKILL.md +120 -101
  96. package/skills/multi-agent-orchestration/SKILL.md +173 -153
  97. package/skills/multiple-entry-points/SKILL.md +91 -55
  98. package/skills/mvc-expert/SKILL.md +237 -231
  99. package/skills/n8n-automation-expert/SKILL.md +89 -0
  100. package/skills/nextjs-app-router-expert/SKILL.md +148 -0
  101. package/skills/openapi-swagger-codegen-expert/SKILL.md +67 -0
  102. package/skills/payment-gateway-expert/SKILL.md +129 -45
  103. package/skills/pdf-document-generation-expert/SKILL.md +91 -0
  104. package/skills/performance-web-vitals/SKILL.md +337 -331
  105. package/skills/post-quantum-crypto-migrator/SKILL.md +57 -0
  106. package/skills/prd-architect/SKILL.md +206 -190
  107. package/skills/proactive-background-watcher/SKILL.md +68 -0
  108. package/skills/production-ready-hardener/PRODUCTION_READINESS_REPORT.md +67 -0
  109. package/skills/production-ready-hardener/SKILL.md +461 -468
  110. package/skills/production-ready-hardener/references/production_checklist.md +161 -161
  111. package/skills/production-ready-hardener/scripts/production_readiness_scanner.py +881 -875
  112. package/skills/project-context-mapper/SKILL.md +85 -0
  113. package/skills/pwa-offline-first-expert/SKILL.md +185 -0
  114. package/skills/python-programming-expert/SKILL.md +407 -270
  115. package/skills/rate-limit-abuse-prevention/SKILL.md +377 -0
  116. package/skills/realtime-collaboration-expert/SKILL.md +99 -45
  117. package/skills/rich-text-editor-expert/SKILL.md +177 -0
  118. package/skills/rust-programming-expert/SKILL.md +240 -234
  119. package/skills/saas-billing/SKILL.md +382 -376
  120. package/skills/saas-multi-tenant/SKILL.md +256 -236
  121. package/skills/saas-mvp-launcher/SKILL.md +30 -1
  122. package/skills/saas-transformer/SKILL.md +499 -445
  123. package/skills/saas-transformer/references/billing_integration_guide.md +401 -401
  124. package/skills/saas-transformer/references/feature_gating_patterns.md +137 -137
  125. package/skills/saas-transformer/references/saas_transformation_checklist.md +121 -121
  126. package/skills/saas-transformer/scripts/saas_transformation_scanner.py +39 -29
  127. package/skills/scalability-clean-code/SKILL.md +234 -228
  128. package/skills/search-engine-expert/SKILL.md +89 -0
  129. package/skills/secure-fuzz-testing/SKILL.md +7 -1
  130. package/skills/self-evolving-memory-graph/SKILL.md +91 -0
  131. package/skills/self-healing-cloud-orchestrator/SKILL.md +57 -0
  132. package/skills/senior-frontend/SKILL.md +85 -105
  133. package/skills/seo/SKILL.md +258 -224
  134. package/skills/session-context-loader/SKILL.md +83 -0
  135. package/skills/session-handoff-resume/SKILL.md +163 -157
  136. package/skills/{skill_baru → skill-baru}/SKILL.md +177 -146
  137. package/skills/solidjs-expert/SKILL.md +80 -0
  138. package/skills/spa-orchestrator/SKILL.md +306 -287
  139. package/skills/sse-websocket-streaming-expert/SKILL.md +93 -0
  140. package/skills/state-management-expert/SKILL.md +277 -271
  141. package/skills/supabase-migration/SKILL.md +47 -1
  142. package/skills/supabase-security-expert/SKILL.md +248 -242
  143. package/skills/svelte-sveltekit-expert/SKILL.md +91 -0
  144. package/skills/svg-animation-motion-expert/SKILL.md +115 -0
  145. package/skills/tailwind-expert/SKILL.md +139 -187
  146. package/skills/tanstack-query-expert/SKILL.md +204 -198
  147. package/skills/tauri-expert/SKILL.md +7 -1
  148. package/skills/token-saver/SKILL.md +118 -110
  149. package/skills/typescript-expert/SKILL.md +329 -278
  150. package/skills/ui-components-expert/SKILL.md +166 -63
  151. package/skills/ui-ux-pro-max/SKILL.md +221 -200
  152. package/skills/vector-db-rag-expert/SKILL.md +208 -0
  153. package/skills/vibe-code-gardener/SKILL.md +180 -172
  154. package/skills/visual-qa-vision-agent/SKILL.md +71 -0
  155. package/skills/voice-ai-realtime-agent/SKILL.md +202 -0
  156. package/skills/vue-frontend-expert/SKILL.md +132 -0
  157. package/skills/wasm-edge-computing-expert/SKILL.md +97 -0
  158. package/skills/web-3d-graphics-expert/SKILL.md +137 -0
  159. package/skills/web-game-engine-expert/SKILL.md +102 -0
  160. package/skills/web-scraper/SKILL.md +98 -146
  161. package/skills/website-design-cloner/SKILL.md +180 -0
  162. package/skills/webxr-ar-vr-expert/SKILL.md +123 -0
  163. package/skills/wordpress-headless-expert/SKILL.md +144 -0
  164. package/skills/zero-to-prod-orchestrator/SKILL.md +231 -180
  165. package/skills/zero-trust-secret-vault/SKILL.md +88 -0
  166. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  167. package/CONTRIBUTING.md +0 -199
  168. package/SECURITY.md +0 -21
  169. package/banner.png +0 -0
  170. package/skills/senior-fullstack/SKILL.md +0 -167
  171. package/skills/senior-fullstack/references/architecture_patterns.md +0 -160
  172. package/skills/senior-fullstack/references/development_workflows.md +0 -222
  173. package/skills/senior-fullstack/references/tech_stack_guide.md +0 -190
  174. package/skills/senior-fullstack/scripts/code_quality_analyzer.py +0 -114
  175. package/skills/senior-fullstack/scripts/fullstack_scaffolder.py +0 -114
  176. package/skills/senior-fullstack/scripts/project_scaffolder.py +0 -114
  177. package/skills/seo-aeo-landing-page-writer/SKILL.md +0 -97
  178. package/skills/seo-geo/SKILL.md +0 -188
  179. package/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-310.pyc +0 -0
  180. package/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-312.pyc +0 -0
  181. package/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-310.pyc +0 -0
  182. package/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-312.pyc +0 -0
  183. package/skills/ui_ux_expert/SKILL.md +0 -114
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: multi-agent-orchestration
3
- description: "Expert guide for designing and orchestrating multi-agent systems, agent swarms, graph-based workflows (LangGraph, CrewAI, AutoGen), shared state memory, and human-in-the-loop guardrails in English and Indonesian."
3
+ version: "2.8.0"
4
+ description: "Expert guide for designing and orchestrating multi-agent systems, agent swarms, 2026 Anthropic agentic design patterns, graph-based workflows (LangGraph, OpenAI Agents SDK, Google ADK, Mastra.ai), shared state memory, and human-in-the-loop guardrails in English and Indonesian."
4
5
  author: "Roedy Rustam"
5
6
  ---
6
7
 
@@ -13,41 +14,69 @@ author: "Roedy Rustam"
13
14
  <a name="english"></a>
14
15
  ## English
15
16
 
17
+ ### Orchestration & Integration
18
+ Connects and orchestrates with relevant domain skills like `brainstorming`, `zero-to-prod-orchestrator`, `ai-llm-integration-expert`, `mcp-server-architect`, and `project-context-mapper` to ensure cohesive execution.
19
+
16
20
  ### Description
17
- Expert guide for designing, building, and deploying production-grade multi-agent AI systems. Covers agent orchestration frameworks (LangGraph, OpenAI Agents SDK, Google ADK, Mastra.ai, CrewAI, AutoGen), shared state and memory management, tool execution, human-in-the-loop (HITL) guardrails, and observability for agentic workflows.
21
+ Expert guide for designing, building, and deploying production-grade multi-agent AI systems. Covers core agentic design patterns (Prompt Chaining, Routing, Parallelization, Orchestrator-Workers, Evaluator-Optimizer), stateful graph engines (LangGraph, OpenAI Agents SDK, Google ADK, Mastra.ai), shared episodic/semantic memory, tool execution sandboxes, and human-in-the-loop (HITL) guardrails.
18
22
 
19
- **Swarm Synergy:** This skill acts as a powerful orchestrator when combined with `mcp-server-architect` (for external tool integration) and `ai-llm-integration-expert` (for foundation model setup). Together, they form a complete, end-to-end **AI Engineering Swarm**.
23
+ **Swarm Synergy:** This skill acts as a master orchestrator when combined with `mcp-server-architect` (for external tool integration) and `ai-llm-integration-expert` (for foundation model setup). Together, they form a complete, end-to-end **AI Engineering Swarm**.
20
24
 
21
25
  ### Trigger Conditions
22
- - Building autonomous AI agents that execute multi-step tasks.
23
- - Designing systems where multiple specialized AI agents collaborate.
24
- - Implementing graph-based agent workflows with LangGraph or similar frameworks.
25
- - Integrating human-in-the-loop checkpoints for high-stakes decisions.
26
- - Building AI pipelines with tool-calling, RAG retrieval, code execution, or browser control.
27
- - Evaluating and selecting agent frameworks (LangGraph vs OpenAI Agents SDK vs Google ADK).
26
+ - Building autonomous AI agents that execute complex, multi-step tasks across several domains.
27
+ - Designing systems where multiple specialized AI agents collaborate, deliberate, and cross-validate.
28
+ - Implementing stateful, graph-based agent workflows with LangGraph, OpenAI Agents SDK, or Google ADK.
29
+ - Implementing Anthropic agentic design patterns: Evaluator-Optimizer loops, Orchestrator-Workers, or Routing.
30
+ - Integrating human-in-the-loop (HITL) pause checkpoints for high-risk actions (code execution, database migrations, financial transactions).
31
+ - Evaluating and selecting agent architectures across Python, TypeScript, and multi-platform swarms.
32
+
33
+ ### Anthropic 2026 Core Agentic Design Patterns
34
+
35
+ Production systems should favor explicit **Workflows** over unbounded autonomous loops where predictability and reliability are required:
36
+
37
+ ```
38
+ 1. PROMPT CHAINING
39
+ [Input] ---> [LLM Step 1] ---> [Gate/Validator] ---> [LLM Step 2] ---> [Output]
40
+
41
+ 2. ROUTING
42
+ [Input] ---> [Classifier/Router] ──┬──> [Specialist Agent A]
43
+ ├──> [Specialist Agent B]
44
+ └──> [Specialist Agent C]
45
+
46
+ 3. PARALLELIZATION (Sectioning & Voting)
47
+ [Input] ──┬──> [Task 1 (Subagent)] ──┐
48
+ ├──> [Task 2 (Subagent)] ──┼──> [Aggregator / Synthesizer]
49
+ └──> [Task 3 (Subagent)] ──┘
50
+
51
+ 4. ORCHESTRATOR-WORKERS (Dynamic Decomposition)
52
+ [Input] ---> [Orchestrator] ──┬──> [Worker 1 (Focused Context)] ──┐
53
+ ├──> [Worker 2 (Focused Context)] ──┼──> [Orchestrator Synthesis]
54
+ └──> [Worker 3 (Focused Context)] ──┘
55
+
56
+ 5. EVALUATOR-OPTIMIZER LOOP (Zero-Tolerance Quality Gate)
57
+ [Input] ---> [Generator Agent] <─────┐ (Feedback Loop)
58
+ │ │
59
+ ▼ │
60
+ [Evaluator / Auditor] ────┘ (Reject / Needs Revision)
61
+
62
+ ▼ (Approved)
63
+ [Output]
64
+ ```
28
65
 
29
66
  ### Agent Framework Comparison (2026)
30
67
 
31
68
  | Framework | Language | Best For | Key Differentiator |
32
69
  |---|---|---|---|
33
- | **LangGraph** | Python / TypeScript | Complex stateful workflows | Graph-based, any LLM, full control |
34
- | **OpenAI Agents SDK** | Python | GPT-5 native agents | Built-in handoffs, tracing, guardrails |
35
- | **Google ADK** | Python | Gemini-powered agents | Multi-agent, Vertex AI, streaming |
36
- | **Mastra.ai** | TypeScript | TS-first agent apps | Built-in memory, evals, RAG, MCP |
37
- | **CrewAI** | Python | Team-of-agents tasks | Role-based agents, easy to start |
38
- | **AutoGen** | Python | Research & LLM evaluation | Conversation-driven agents |
39
-
40
- ### Core Architecture Principles
41
-
42
- #### 1. Agent Roles & Specialization
43
- Design agents with single responsibilities — avoid "do-everything" agents:
44
- - **Orchestrator Agent**: Routes tasks, decomposes goals, delegates to specialists.
45
- - **Specialist Agents**: Domain-specific (research agent, code agent, data analyst, writer).
46
- - **Tool Agents**: Wrap external capabilities (browser agent, SQL agent, file agent).
47
- - **Critic/Validator Agent**: Reviews output of other agents before finalizing.
48
-
49
- #### 2. LangGraph — Stateful Graph Workflows
50
- LangGraph models agent workflows as directed graphs with persistent state — ideal for complex, multi-step tasks with branching logic and HITL:
70
+ | **LangGraph (v0.3+)** | Python / TypeScript | Complex stateful workflows & graphs | Graph-based, persistent checkpointers, time-travel debugging |
71
+ | **OpenAI Agents SDK** | Python | GPT-5 / o-series native agents | Built-in agent handoffs, tracing, and tripwire guardrails |
72
+ | **Google ADK** | Python | Gemini-powered swarms | Native Vertex AI, multi-agent streaming, search grounding |
73
+ | **Mastra.ai** | TypeScript | TS-first web apps & microservices | Built-in memory, evals, RAG, and native MCP support |
74
+ | **CrewAI** | Python | Role-playing business teams | Fast initial prototyping for business analyst teams |
75
+
76
+ ### Core Implementation Guidelines
77
+
78
+ #### 1. LangGraph — Persistent State & HITL Checkpoints
79
+ LangGraph models agent workflows as directed acyclic or cyclic graphs with persistent state:
51
80
  ```python
52
81
  from langgraph.graph import StateGraph, END
53
82
  from langgraph.checkpoint.memory import MemorySaver
@@ -57,178 +86,169 @@ import operator
57
86
  class AgentState(TypedDict):
58
87
  messages: Annotated[list, operator.add]
59
88
  task: str
60
- result: str
61
-
62
- def research_node(state: AgentState):
63
- # Call research agent
64
- return {"messages": [research_agent.invoke(state["task"])]}
65
-
66
- def write_node(state: AgentState):
67
- # Call writing agent with research result
68
- return {"result": writing_agent.invoke(state["messages"])}
69
-
70
- def should_revise(state: AgentState) -> str:
71
- # Conditional routing
72
- return "revise" if needs_revision(state["result"]) else "end"
89
+ code_artifact: str
90
+ audit_feedback: str
91
+ approved: bool
92
+
93
+ def generator_node(state: AgentState):
94
+ # Generates or refactors code based on previous feedback
95
+ code = coder_agent.invoke(state["task"], feedback=state.get("audit_feedback"))
96
+ return {"code_artifact": code}
97
+
98
+ def evaluator_node(state: AgentState):
99
+ # Runs automated linter/tests & security review
100
+ audit = auditor_agent.invoke(state["code_artifact"])
101
+ return {
102
+ "audit_feedback": audit.critique,
103
+ "approved": audit.is_passing
104
+ }
105
+
106
+ def route_next(state: AgentState) -> str:
107
+ return END if state["approved"] else "generator"
73
108
 
74
109
  builder = StateGraph(AgentState)
75
- builder.add_node("research", research_node)
76
- builder.add_node("write", write_node)
77
- builder.add_conditional_edges("write", should_revise, {"revise": "research", "end": END})
78
-
79
- # Persist state for HITL
80
- memory = MemorySaver()
81
- graph = builder.compile(checkpointer=memory, interrupt_before=["write"])
110
+ builder.add_node("generator", generator_node)
111
+ builder.add_node("evaluator", evaluator_node)
112
+ builder.set_entry_point("generator")
113
+ builder.add_edge("generator", "evaluator")
114
+ builder.add_conditional_edges("evaluator", route_next, {"generator": "generator", END: END})
115
+
116
+ # Persist state with checkpointer for HITL interruption before destructive actions
117
+ checkpointer = MemorySaver()
118
+ graph = builder.compile(checkpointer=checkpointer, interrupt_before=["generator"])
82
119
  ```
83
120
 
84
- #### 3. OpenAI Agents SDK — Handoffs & Guardrails
85
- Use the OpenAI Agents SDK for native GPT-5 agent workflows with built-in tracing:
121
+ #### 2. OpenAI Agents SDK — Agent Handoffs & Guardrails
122
+ Implement native agent handoffs where specialized agents transition control cleanly:
86
123
  ```python
87
124
  from agents import Agent, Runner, handoff, input_guardrail, GuardrailFunctionOutput
88
125
 
89
- # Define specialist agents
90
126
  researcher = Agent(
91
127
  name="Researcher",
92
- instructions="Search and retrieve relevant information.",
93
- tools=[web_search, document_retrieval],
128
+ instructions="Research libraries, security advisories, and system specs.",
129
+ tools=[web_search, doc_retrieval],
94
130
  )
95
131
 
96
- writer = Agent(
97
- name="Writer",
98
- instructions="Write high-quality content based on research.",
99
- handoffs=[handoff(researcher, tool_name_override="get_research")],
132
+ architect = Agent(
133
+ name="Architect",
134
+ instructions="Synthesize technical architecture and delegate research when needed.",
135
+ handoffs=[handoff(researcher, tool_name_override="delegate_research")],
100
136
  )
101
137
 
102
- # Input guardrail to prevent harmful requests
103
138
  @input_guardrail
104
- async def content_filter(ctx, agent, input) -> GuardrailFunctionOutput:
105
- if contains_harmful_content(input):
106
- return GuardrailFunctionOutput(output_info="Blocked", tripwire_triggered=True)
107
- return GuardrailFunctionOutput(output_info="OK", tripwire_triggered=False)
139
+ async def safety_guardrail(ctx, agent, input_data) -> GuardrailFunctionOutput:
140
+ if contains_destructive_commands(input_data):
141
+ return GuardrailFunctionOutput(output_info="Blocked destructive payload", tripwire_triggered=True)
142
+ return GuardrailFunctionOutput(output_info="Safe", tripwire_triggered=False)
108
143
 
109
- # Run with tracing
110
- result = await Runner.run(writer, "Write an article about...", guardrails=[content_filter])
144
+ result = await Runner.run(architect, "Design high-throughput ingestion pipeline", guardrails=[safety_guardrail])
111
145
  ```
112
146
 
113
- #### 4. Google ADK — Gemini Multi-Agent
114
- Google Agent Development Kit (ADK) for building Gemini-powered agents with Vertex AI integration:
147
+ #### 3. Google ADK — Gemini Multi-Agent Systems
148
+ Orchestrate Gemini 3.x agents with streaming subagent calls and Vertex AI tooling:
115
149
  ```python
116
150
  from google.adk.agents import Agent
117
151
  from google.adk.tools import google_search, code_execution
118
152
 
119
- root_agent = Agent(
120
- model="gemini-2.5-pro",
121
- name="orchestrator",
122
- instruction="Coordinate research and analysis tasks.",
123
- sub_agents=[research_agent, analysis_agent],
153
+ director = Agent(
154
+ model="gemini-3.1-pro",
155
+ name="director",
156
+ instruction="Coordinate domain specialists and synthesize final deliverables.",
157
+ sub_agents=[frontend_agent, backend_agent, security_agent],
124
158
  tools=[google_search, code_execution],
125
159
  )
126
160
  ```
127
161
 
128
- #### 5. Mastra.ai — TypeScript-First Agents
129
- For TypeScript teams, Mastra provides the most complete agentic framework:
162
+ #### 4. Mastra.ai — TypeScript-Native Agents
163
+ For modern Next.js / Node.js / Bun environments:
130
164
  ```typescript
131
165
  import { Agent, MastraMemory } from '@mastra/core';
132
166
  import { createTool } from '@mastra/core/tools';
167
+ import { z } from 'zod';
133
168
 
134
- const webSearchTool = createTool({
135
- id: 'web-search',
136
- description: 'Search the web for current information',
137
- inputSchema: z.object({ query: z.string() }),
138
- execute: async ({ context: { query } }) => searchWeb(query),
139
- });
140
-
141
- const researchAgent = new Agent({
169
+ const researcher = new Agent({
142
170
  name: 'researcher',
143
- instructions: 'Find and summarize information accurately.',
144
- model: { provider: 'ANTHROPIC', name: 'claude-sonnet-4-5' },
145
- tools: { webSearch: webSearchTool },
171
+ instructions: 'Find and summarize accurate technical documentation.',
172
+ model: { provider: 'ANTHROPIC', name: 'claude-3-7-sonnet-20250219' },
146
173
  memory: new MastraMemory({ storage: supabaseStorage }),
147
174
  });
148
175
  ```
149
176
 
150
- #### 6. Human-in-the-Loop (HITL) Guardrails
151
- Mandatory for high-stakes agent actions (financial transactions, email sending, code deployment):
152
- - **Interrupt Checkpoints**: Pause graph execution before irreversible actions.
153
- - **Approval Flows**: Send pending action to a UI for human review before continuing.
154
- - **Confidence Thresholds**: Auto-approve if confidence > 90%, escalate if < 70%.
155
-
156
- #### 7. Agent Memory Architecture
157
- - **Working Memory (In-context)**: Recent messages and task state in the prompt window.
158
- - **Episodic Memory**: Summarized past sessions stored as embeddings (Mem0, MemGPT).
159
- - **Semantic Memory**: Domain knowledge in a vector store (pgvector, Qdrant).
160
- - **Procedural Memory**: Learned tool-use patterns stored as structured data.
177
+ #### 5. Human-in-the-Loop (HITL) Guardrails
178
+ Mandatory safeguards before executing irreversible operations:
179
+ - **Interrupt Checkpoints**: Halt workflow execution before executing code, migrating databases, or modifying production records.
180
+ - **Approval Dashboards**: Surface diff previews and proposed shell commands to the user or admin before proceeding.
181
+ - **Confidence Gates**: Auto-proceed only when model confidence score is >= 0.90; trigger human escalation otherwise.
161
182
 
162
- #### 8. Observability & Evaluation
163
- - **LangSmith**: Native tracing for LangGraph, LangChain agents.
164
- - **OpenAI Tracing**: Built-in in OpenAI Agents SDK view agent runs, handoffs, tool calls.
165
- - **Mastra Evals**: Built-in evaluation framework for Mastra agents.
166
- - **Custom Metrics**: Track task completion rate, tool call accuracy, latency, and cost per run.
183
+ #### 6. Swarm Circuit Breakers & Fallback Protocols
184
+ - **Retry Caps**: Maximum 2 automated retries per subagent.
185
+ - **Fallback Escalation**: If a specialist agent stalls or loops, the Swarm Director gracefully fallbacks to `fullstack-expert` or requests human guidance.
186
+ - **Checkpoint Persistence**: Always persist intermediate progress to `PROGRESS.md` or `BLUEPRINT.md` so sessions can resume without losing context.
167
187
 
168
188
  ---
169
189
 
170
190
  <a name="bahasa-indonesia"></a>
171
191
  ## Bahasa Indonesia
172
192
 
193
+ ### Integrasi Orkestrasi
194
+ Terhubung dan mengorkestrasi skill domain yang relevan seperti `brainstorming`, `zero-to-prod-orchestrator`, `ai-llm-integration-expert`, `mcp-server-architect`, dan `project-context-mapper` untuk memastikan eksekusi yang kohesif.
195
+
173
196
  ### Deskripsi
174
- Panduan ahli untuk merancang, membangun, dan men-deploy sistem multi-agen AI tingkat produksi. Mencakup framework orkestrasi agen (LangGraph, OpenAI Agents SDK, Google ADK, Mastra.ai), manajemen state dan memori bersama, eksekusi tool, guardrail human-in-the-loop (HITL), dan observabilitas untuk alur kerja agentik.
197
+ Panduan ahli untuk merancang, membangun, dan men-deploy sistem multi-agen AI tingkat produksi. Mencakup pola desain agentik inti (Prompt Chaining, Routing, Parallelization, Orchestrator-Workers, Evaluator-Optimizer), engine graph stateful (LangGraph, OpenAI Agents SDK, Google ADK, Mastra.ai), memori bersama episodik/semantik, sandbox eksekusi tool, dan guardrail human-in-the-loop (HITL).
175
198
 
176
- **Sinergi Swarm:** Skill ini bertindak sebagai orkestrator yang sangat *powerful* jika dikombinasikan dengan `mcp-server-architect` (untuk integrasi eksternal tool) dan `ai-llm-integration-expert` (untuk penyiapan foundation model). Bersama-sama, ketiganya membentuk **AI Engineering Swarm** yang komprehensif dari ujung ke ujung.
199
+ **Sinergi Swarm:** Skill ini bertindak sebagai orkestrator utama jika dipadukan dengan `mcp-server-architect` (untuk integrasi tool eksternal) dan `ai-llm-integration-expert` (untuk konfigurasi foundation model). Bersama-sama, ketiganya membentuk **AI Engineering Swarm** yang tangguh dari awal hingga rilis produksi.
177
200
 
178
201
  ### Kondisi Pemicu
179
- - Membangun agen AI otonom yang mengeksekusi tugas multi-langkah.
180
- - Merancang sistem di mana beberapa agen AI khusus berkolaborasi.
181
- - Mengimplementasikan alur kerja agen berbasis graph dengan LangGraph atau framework serupa.
182
- - Mengintegrasikan checkpoint human-in-the-loop untuk keputusan berisiko tinggi.
183
- - Membangun pipeline AI dengan tool-calling, RAG, eksekusi kode, atau kontrol browser.
184
- - Mengevaluasi dan memilih framework agen yang tepat.
202
+ - Membangun agen AI otonom yang mengeksekusi tugas kompleks multi-langkah lintas domain.
203
+ - Merancang sistem kolaborasi, deliberasi, dan validasi silang antar beberapa agen AI spesialis.
204
+ - Mengimplementasikan alur kerja graph stateful dengan LangGraph, OpenAI Agents SDK, atau Google ADK.
205
+ - Menerapkan 5 pola desain agentik standar: Prompt Chaining, Routing, Parallelization, Orchestrator-Workers, atau Evaluator-Optimizer.
206
+ - Mengintegrasikan pos henti human-in-the-loop (HITL) untuk tindakan berisiko tinggi (eksekusi kode, migrasi database, transaksi keuangan).
207
+ - Memilih dan mengevaluasi arsitektur agen di ekosistem Python, TypeScript, atau multi-platform.
208
+
209
+ ### 5 Pola Desain Agentik Inti (Standar Anthropic 2026)
210
+
211
+ Untuk sistem produksi yang handal, utamakan arsitektur **Workflows** terstruktur daripada loop otonom tanpa batas:
212
+
213
+ 1. **Prompt Chaining**: Memecah tugas menjadi langkah-langkah sekuensial dengan validasi output di setiap transisi.
214
+ 2. **Routing**: Mengklasifikasikan input pengguna dan mengarahkannya ke model atau sub-agen yang memiliki spesialisasi yang tepat.
215
+ 3. **Parallelization (Sectioning & Voting)**: Menjalankan beberapa sub-agen secara simultan untuk tugas independen atau menjalankan ensemble untuk konsensus voting.
216
+ 4. **Orchestrator-Workers**: Agen orkestrator pusat memecah masalah dinamis, mendelegasikannya ke pekerja dengan konteks terfokus, lalu merangkum hasil akhirnya.
217
+ 5. **Evaluator-Optimizer Loop**: Agen pembuat (*generator*) menghasilkan solusi sementara agen penilai (*evaluator*) memberikan audit dan umpan balik hingga standar kualitas terpenuhi.
185
218
 
186
219
  ### Perbandingan Framework Agen (2026)
187
220
 
188
- | Framework | Bahasa | Terbaik Untuk | Diferensiasi Kunci |
221
+ | Framework | Bahasa | Terbaik Untuk | Keunggulan Utama |
189
222
  |---|---|---|---|
190
- | **LangGraph** | Python / TS | Alur kerja stateful kompleks | Berbasis graph, LLM apa saja, kontrol penuh |
191
- | **OpenAI Agents SDK** | Python | Agen GPT-5 native | Handoffs, tracing, guardrails bawaan |
192
- | **Google ADK** | Python | Agen berbasis Gemini | Multi-agen, Vertex AI, streaming |
193
- | **Mastra.ai** | TypeScript | Aplikasi agen TS-first | Memori, evaluasi, RAG, MCP bawaan |
194
- | **CrewAI** | Python | Tugas tim-agen | Agen berbasis peran, mudah dimulai |
195
- | **AutoGen** | Python | Riset & evaluasi LLM | Agen berbasis percakapan |
196
-
197
- ### Prinsip Arsitektur Inti
198
-
199
- #### 1. Peran & Spesialisasi Agen
200
- Rancang agen dengan tanggung jawab tunggal:
201
- - **Orchestrator Agent**: Mendelegasikan tugas ke agen spesialis.
202
- - **Specialist Agents**: Domain-spesifik (agen riset, kode, analis data, penulis).
203
- - **Tool Agents**: Membungkus kemampuan eksternal (browser, SQL, file).
204
- - **Critic/Validator Agent**: Meninjau output agen lain sebelum difinalisasi.
205
-
206
- #### 2. LangGraphAlur Kerja Graf Stateful
207
- LangGraph memodelkan alur kerja agen sebagai graf terarah dengan state persisten ideal untuk tugas kompleks dengan logika percabangan dan HITL. State disimpan di checkpointer (MemorySaver atau PostgreSQL) untuk resume antar sesi.
208
-
209
- #### 3. OpenAI Agents SDK Handoffs & Guardrails
210
- SDK native untuk agen GPT-5 dengan handoffs agen-ke-agen, tracing bawaan, dan guardrails untuk mencegah output berbahaya.
211
-
212
- #### 4. Google ADK — Agen Gemini Multi-Agent
213
- ADK untuk membangun agen Gemini dengan integrasi Vertex AI, sub-agents, dan tool seperti Google Search dan eksekusi kode.
214
-
215
- #### 5. Mastra.ai Agen TypeScript-First
216
- Framework paling lengkap untuk tim TypeScript: memori bawaan, evaluasi, RAG, dan dukungan MCP native.
217
-
218
- #### 6. Human-in-the-Loop (HITL) Guardrails
219
- Wajib untuk aksi agen berisiko tinggi (transaksi keuangan, pengiriman email, deployment kode):
220
- - **Interrupt Checkpoints**: Jeda eksekusi graf sebelum aksi tidak dapat dibalik.
221
- - **Approval Flows**: Kirim aksi yang menunggu ke UI untuk ditinjau manusia.
222
- - **Confidence Thresholds**: Auto-approve jika keyakinan > 90%, eskalasi jika < 70%.
223
-
224
- #### 7. Arsitektur Memori Agen
225
- - **Working Memory**: Riwayat percakapan recent dalam context window.
226
- - **Episodic Memory**: Sesi masa lalu yang diringkas sebagai embedding (Mem0).
227
- - **Semantic Memory**: Pengetahuan domain dalam vector store (pgvector, Qdrant).
228
- - **Procedural Memory**: Pola penggunaan tool yang dipelajari sebagai data terstruktur.
229
-
230
- #### 8. Observabilitas & Evaluasi
231
- - **LangSmith**: Tracing native untuk LangGraph.
232
- - **OpenAI Tracing**: Bawaan di OpenAI Agents SDK — lihat run, handoff, tool call.
233
- - **Mastra Evals**: Framework evaluasi bawaan untuk agen Mastra.
234
- - **Metrik Kustom**: Lacak tingkat penyelesaian tugas, akurasi tool call, latensi, dan biaya per run.
223
+ | **LangGraph (v0.3+)** | Python / TypeScript | Alur kerja graf stateful kompleks | Berbasis graf, checkpointer persisten, time-travel debugging |
224
+ | **OpenAI Agents SDK** | Python | Agen native GPT-5 / o-series | Handoff antar agen bawaan, tracing, dan guardrail otomatis |
225
+ | **Google ADK** | Python | Swarm agen bertenaga Gemini | Integrasi Vertex AI native, streaming multi-agen, search grounding |
226
+ | **Mastra.ai** | TypeScript | Web apps & microservice TS-first | Memori bawaan, evaluasi otomatis, RAG, dan dukungan MCP native |
227
+ | **CrewAI** | Python | Tim simulasi peran | Cepat untuk membuat prototipe kolaborasi tim bisnis |
228
+
229
+ ### Panduan Implementasi Inti
230
+
231
+ #### 1. LangGraph — State Persisten & Checkpoint HITL
232
+ Memodelkan alur agen sebagai graf terarah dengan state bersama dan penyimpanan checkpoint:
233
+ - Simpan state di database (PostgreSQL / MemorySaver) agar alur kerja dapat dijeda dan dilanjutkan kapan saja.
234
+ - Terapkan `interrupt_before` sebelum node yang menjalankan perintah destruktif untuk meminta persetujuan manusia (*Human-in-the-loop*).
235
+
236
+ #### 2. OpenAI Agents SDK Handoffs & Guardrails
237
+ Terapkan transisi kendali yang mulus antar agen dengan fungsi `handoff` bawaan serta pasang filter `guardrail` pada input dan output untuk mencegah eksekusi instruksi berbahaya.
238
+
239
+ #### 3. Google ADK Multi-Agent Gemini
240
+ Bangun hierarki agen dengan model Gemini 3.x, di mana root agent mengoordinasikan sub-agents untuk riset, eksekusi kode, dan pembuatan dokumen.
241
+
242
+ #### 4. Mastra.aiSolusi TypeScript Penuh
243
+ Gunakan Mastra untuk ekosistem Next.js dan Node.js: sediakan memori persisten ke Supabase/PostgreSQL, integrasikan tool MCP secara langsung, dan manfaatkan framework evaluasi bawaan.
244
+
245
+ #### 5. Guardrails Human-in-the-Loop (HITL)
246
+ Pengamanan wajib sebelum melakukan tindakan yang tidak dapat dibatalkan:
247
+ - **Pos Henti Interupsi**: Hentikan eksekusi sebelum menjalankan skrip shell berbahaya, migrasi skema tabel, atau memodifikasi data produksi.
248
+ - **Tinjauan Pratinjau**: Tampilkan ringkasan perbedaan (*diff*) kepada pengguna sebelum modifikasi dieksekusi.
249
+ - **Ambang Keyakinan**: Otomatis lanjutkan hanya jika skor keyakinan model >= 0.90; eskalasikan ke manusia jika berada di bawah ambang batas.
250
+
251
+ #### 6. Circuit Breakers & Protokol Pemulihan Swarm
252
+ - **Batas Percobaan Ulang**: Maksimal 2 kali perbaikan otomatis per sub-agen.
253
+ - **Eskalasi Fallback**: Jika agen spesialis mengalami kendala konteks atau gagal berulang kali, Swarm Director segera mengalihkan tugas ke `fullstack-expert` atau meminta masukan pengguna.
254
+ - **Persistensi Kemajuan**: Simpan selalu checkpoint di `PROGRESS.md` atau `BLUEPRINT.md` agar alur kerja dapat dilanjutkan secara efisien tanpa token berlebih.
@@ -1,55 +1,91 @@
1
- ---
2
- name: multiple-entry-points
3
- description: "Expert guide for designing and implementing Multiple Entry Points architecture in web applications / Panduan ahli untuk merancang dan mengimplementasikan arsitektur Multiple Entry Points pada aplikasi web."
4
- author: "Antigravity"
5
- ---
6
-
7
- # Multiple Entry Points Architecture
8
-
9
- [English](#english) | [Bahasa Indonesia](#bahasa-indonesia)
10
-
11
- ---
12
-
13
- <a name="english"></a>
14
- ## English
15
-
16
- ### Description
17
- This skill outlines the architectural pattern of using Multiple Entry Points in a web application. Instead of forcing all traffic through a single Front Controller (like a monolithic `index.php`), the application separates traffic logically into distinct entry files such as `index.php` (public), `admin.php`, and `api.php`. This provides stronger isolation, optimized loading, and stricter security boundaries.
18
-
19
- ### Core Principles of Multiple Entry Points
20
- 1. **Logical Separation**: Isolate different application domains into their own entry files. For example: `public/index.php` for user-facing pages, `public/admin.php` for back-office operations, and `public/api.php` for stateless API routes.
21
- 2. **Dedicated Bootstrapping**: Each entry point can bootstrap only the necessary dependencies, configurations, and middlewares it requires. For example, `api.php` does not need to initialize HTML template engines or stateful session cookies, while `admin.php` can enforce strict authentication middleware immediately upon execution.
22
- 3. **Security Boundaries**: By physically separating entry points, you can apply distinct server-level security rules (via `.htaccess`, Nginx configurations, or WAF). For example, you can restrict access to `admin.php` to specific internal IP addresses or enforce mutual TLS.
23
- 4. **Frontend Asset Bundling (Vite / Webpack)**: In a modern frontend context (especially for MPAs), define multiple entry points in the bundler configuration. This generates separate, optimized JavaScript and CSS bundles for the public site versus the complex admin dashboard, drastically reducing overall payload sizes for general users.
24
-
25
- ### Orchestration with Other Skills
26
- - **With `mpa-orchestrator`**: In a Multi-Page Application, multiple entry points allow you to split heavy dashboard assets from fast-loading public marketing pages, enhancing both SEO and performance.
27
- - **With `mvc-expert`**: Each entry point acts as a distinct Front Controller, initiating its own lightweight Router instance configured specifically for that domain's controllers (e.g., an AdminRouter vs an ApiRouter).
28
- - **With `saas-multi-tenant`**: You can design a `tenant.php` entry point that strictly mandates a valid `tenant_id` resolution before bootstrapping the app, while a `landing.php` entry point handles anonymous public traffic safely.
29
-
30
- ### Trigger Conditions
31
- - Active when building or refactoring applications that require strict separation between public, admin, and API traffic.
32
- - Active when optimizing frontend bundler configurations (like Vite) for Multi-Page Applications.
33
-
34
- ---
35
-
36
- <a name="bahasa-indonesia"></a>
37
- ## Bahasa Indonesia
38
-
39
- ### Deskripsi
40
- Skill ini menguraikan pola arsitektur menggunakan *Multiple Entry Points* dalam aplikasi web. Alih-alih memaksa semua lalu lintas (traffic) melalui satu Front Controller tunggal (seperti `index.php` monolitik), aplikasi memisahkan lalu lintas secara logis ke dalam file entri yang berbeda seperti `index.php` (publik), `admin.php`, dan `api.php`. Pola ini memberikan isolasi yang lebih kuat, pemuatan (loading) yang dioptimalkan, dan batas keamanan yang lebih ketat.
41
-
42
- ### Prinsip Inti Multiple Entry Points
43
- 1. **Pemisahan Logis**: Isolasi domain aplikasi yang berbeda ke dalam file entrinya masing-masing. Contoh: `public/index.php` untuk pengguna umum, `public/admin.php` untuk operasional *back-office*, dan `public/api.php` untuk rute API yang *stateless*.
44
- 2. **Bootstrapping Terdedikasi**: Setiap titik masuk (entry point) hanya memuat dependensi, konfigurasi, dan middleware yang benar-benar diperlukannya. Contohnya, `api.php` tidak perlu menginisialisasi *template engine* HTML atau *session cookies*, sementara `admin.php` dapat langsung memberlakukan middleware autentikasi secara ketat sejak awal file dieksekusi.
45
- 3. **Batas Keamanan (Security Boundaries)**: Dengan memisahkan titik masuk secara fisik, Anda dapat menerapkan aturan keamanan tingkat server yang berbeda (melalui `.htaccess`, konfigurasi Nginx, atau WAF). Misalnya, membatasi akses ke `admin.php` hanya untuk alamat IP internal tertentu.
46
- 4. **Bundling Aset Frontend (Vite / Webpack)**: Dalam konteks frontend modern (khususnya untuk MPA), tentukan beberapa *entry points* pada konfigurasi *bundler*. Ini akan menghasilkan bundel JavaScript dan CSS yang terpisah dan optimal antara situs publik dan dashboard admin, sehingga secara drastis mengurangi ukuran *payload* bagi pengguna umum.
47
-
48
- ### Orkestrasi dengan Skill Lain
49
- - **Dengan `mpa-orchestrator`**: Dalam aplikasi MPA, penggunaan beberapa *entry point* memungkinkan Anda memisahkan aset dashboard yang berat dari halaman *marketing* publik yang butuh kecepatan muat tinggi, sehingga meningkatkan SEO dan performa sekaligus.
50
- - **Dengan `mvc-expert`**: Setiap *entry point* bertindak sebagai Front Controller yang terpisah, menginisiasi instans Router yang ringan dan dikonfigurasi khusus untuk controller di domain tersebut (misalnya AdminRouter vs ApiRouter).
51
- - **Dengan `saas-multi-tenant`**: Anda dapat memiliki *entry point* `tenant.php` yang secara ketat mewajibkan resolusi `tenant_id` yang valid sebelum memuat aplikasi, sementara *entry point* `landing.php` melayani lalu lintas publik anonim dengan aman.
52
-
53
- ### Kondisi Pemicu
54
- - Aktif saat membangun atau melakukan refaktor aplikasi yang membutuhkan pemisahan ketat antara lalu lintas publik, admin, dan API.
55
- - Aktif saat mengoptimalkan konfigurasi *bundler* frontend (seperti Vite) untuk proyek Multi-Page Application.
1
+ ---
2
+ name: multiple-entry-points
3
+ description: "Expert guide for designing and implementing Multiple Entry Points architecture in web applications / Panduan ahli untuk merancang dan mengimplementasikan arsitektur Multiple Entry Points pada aplikasi web."
4
+ author: "Roedy Rustam"
5
+ ---
6
+
7
+ # Multiple Entry Points Architecture
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
+ This skill outlines the architectural pattern of using Multiple Entry Points in a web application. Instead of forcing all traffic through a single Front Controller (like a monolithic `index.php`), the application separates traffic logically into distinct entry files such as `index.php` (public), `admin.php`, and `api.php`. This provides stronger isolation, optimized loading, and stricter security boundaries.
21
+
22
+ ### Core Principles of Multiple Entry Points
23
+ 1. **Logical Separation**: Isolate different application domains into their own entry files. For example: `public/index.php` for user-facing pages, `public/admin.php` for back-office operations, and `public/api.php` for stateless API routes.
24
+ 2. **Dedicated Bootstrapping**: Each entry point can bootstrap only the necessary dependencies, configurations, and middlewares it requires. For example, `api.php` does not need to initialize HTML template engines or stateful session cookies, while `admin.php` can enforce strict authentication middleware immediately upon execution.
25
+ 3. **Security Boundaries**: By physically separating entry points, you can apply distinct server-level security rules (via `.htaccess`, Nginx configurations, or WAF). For example, you can restrict access to `admin.php` to specific internal IP addresses or enforce mutual TLS.
26
+ 4. **Frontend Asset Bundling (Vite / Webpack)**: In a modern frontend context (especially for MPAs), define multiple entry points in the bundler configuration. This generates separate, optimized JavaScript and CSS bundles for the public site versus the complex admin dashboard, drastically reducing overall payload sizes for general users.
27
+
28
+ ### Implementation Checklist
29
+ - [ ] Create separate HTML entry points in the root/public directory (e.g., `index.html`, `admin.html`).
30
+ - [ ] Configure the frontend bundler (Vite/Webpack) to output multiple bundles.
31
+ - [ ] Set up server-side routing (Nginx or Node.js) to serve the correct entry HTML based on the URL path.
32
+ - [ ] Ensure shared components and utilities are properly tree-shaken and split into common chunks.
33
+
34
+ ### Example: Vite Config for Multiple Entries
35
+ ```javascript
36
+ import { defineConfig } from 'vite';
37
+ import { resolve } from 'path';
38
+
39
+ export default defineConfig({
40
+ build: {
41
+ rollupOptions: {
42
+ input: {
43
+ main: resolve(__dirname, 'index.html'),
44
+ admin: resolve(__dirname, 'admin.html'),
45
+ app: resolve(__dirname, 'app.html')
46
+ }
47
+ }
48
+ }
49
+ });
50
+ ```
51
+
52
+ ### Orchestration with Other Skills
53
+ - **With `mpa-orchestrator`**: In a Multi-Page Application, multiple entry points allow you to split heavy dashboard assets from fast-loading public marketing pages, enhancing both SEO and performance.
54
+ - **With `mvc-expert`**: Each entry point acts as a distinct Front Controller, initiating its own lightweight Router instance configured specifically for that domain's controllers (e.g., an AdminRouter vs an ApiRouter).
55
+ - **With `saas-multi-tenant`**: You can design a `tenant.php` entry point that strictly mandates a valid `tenant_id` resolution before bootstrapping the app, while a `landing.php` entry point handles anonymous public traffic safely.
56
+
57
+ ### Trigger Conditions
58
+ - Active when building or refactoring applications that require strict separation between public, admin, and API traffic.
59
+ - Active when optimizing frontend bundler configurations (like Vite) for Multi-Page Applications.
60
+
61
+ ---
62
+
63
+ <a name="bahasa-indonesia"></a>
64
+ ## Bahasa Indonesia
65
+
66
+ ### Integrasi Orkestrasi
67
+ Terhubung dan mengorkestrasi skill domain yang relevan seperti `brainstorming`, `zero-to-prod-orchestrator`, dan `project-context-mapper` untuk memastikan eksekusi yang kohesif.
68
+
69
+ ### Deskripsi
70
+ Skill ini menguraikan pola arsitektur menggunakan *Multiple Entry Points* dalam aplikasi web. Alih-alih memaksa semua lalu lintas (traffic) melalui satu Front Controller tunggal (seperti `index.php` monolitik), aplikasi memisahkan lalu lintas secara logis ke dalam file entri yang berbeda seperti `index.php` (publik), `admin.php`, dan `api.php`. Pola ini memberikan isolasi yang lebih kuat, pemuatan (loading) yang dioptimalkan, dan batas keamanan yang lebih ketat.
71
+
72
+ ### Prinsip Inti Multiple Entry Points
73
+ 1. **Pemisahan Logis**: Isolasi domain aplikasi yang berbeda ke dalam file entrinya masing-masing. Contoh: `public/index.php` untuk pengguna umum, `public/admin.php` untuk operasional *back-office*, dan `public/api.php` untuk rute API yang *stateless*.
74
+ 2. **Bootstrapping Terdedikasi**: Setiap titik masuk (entry point) hanya memuat dependensi, konfigurasi, dan middleware yang benar-benar diperlukannya. Contohnya, `api.php` tidak perlu menginisialisasi *template engine* HTML atau *session cookies*, sementara `admin.php` dapat langsung memberlakukan middleware autentikasi secara ketat sejak awal file dieksekusi.
75
+ 3. **Batas Keamanan (Security Boundaries)**: Dengan memisahkan titik masuk secara fisik, Anda dapat menerapkan aturan keamanan tingkat server yang berbeda (melalui `.htaccess`, konfigurasi Nginx, atau WAF). Misalnya, membatasi akses ke `admin.php` hanya untuk alamat IP internal tertentu.
76
+ 4. **Bundling Aset Frontend (Vite / Webpack)**: Dalam konteks frontend modern (khususnya untuk MPA), tentukan beberapa *entry points* pada konfigurasi *bundler*. Ini akan menghasilkan bundel JavaScript dan CSS yang terpisah dan optimal antara situs publik dan dashboard admin, sehingga secara drastis mengurangi ukuran *payload* bagi pengguna umum.
77
+
78
+ ### Checklist Implementasi
79
+ - [ ] Buat titik entri HTML terpisah di direktori utama/publik (misal: `index.html`, `admin.html`).
80
+ - [ ] Konfigurasi bundler frontend (Vite/Webpack) untuk menghasilkan multiple bundle.
81
+ - [ ] Siapkan routing di sisi server (Nginx atau Node.js) untuk menyajikan HTML entri yang benar berdasarkan path URL.
82
+ - [ ] Pastikan komponen dan utilitas yang dipakai bersama dioptimalkan (tree-shaking) dan dipisah ke dalam *common chunks*.
83
+
84
+ ### Orkestrasi dengan Skill Lain
85
+ - **Dengan `mpa-orchestrator`**: Dalam aplikasi MPA, penggunaan beberapa *entry point* memungkinkan Anda memisahkan aset dashboard yang berat dari halaman *marketing* publik yang butuh kecepatan muat tinggi, sehingga meningkatkan SEO dan performa sekaligus.
86
+ - **Dengan `mvc-expert`**: Setiap *entry point* bertindak sebagai Front Controller yang terpisah, menginisiasi instans Router yang ringan dan dikonfigurasi khusus untuk controller di domain tersebut (misalnya AdminRouter vs ApiRouter).
87
+ - **Dengan `saas-multi-tenant`**: Anda dapat memiliki *entry point* `tenant.php` yang secara ketat mewajibkan resolusi `tenant_id` yang valid sebelum memuat aplikasi, sementara *entry point* `landing.php` melayani lalu lintas publik anonim dengan aman.
88
+
89
+ ### Kondisi Pemicu
90
+ - Aktif saat membangun atau melakukan refaktor aplikasi yang membutuhkan pemisahan ketat antara lalu lintas publik, admin, dan API.
91
+ - Aktif saat mengoptimalkan konfigurasi *bundler* frontend (seperti Vite) untuk proyek Multi-Page Application.