HeLa MCP Ecosystem: Workflows & Integration Guide
Referensi
docs/workflows.md
Isi dalam bahasa sumber. Unduh sumber · Semua dokumen

This document defines the standard operational workflows and cross-MCP coordination patterns enabled by the HeLa MCP Ecosystem.
1. Architectural Foundation: Dual-Backbone Coordination
Every profile in the HeLa MCP Ecosystem is anchored by two coordinating backbone servers:
flowchart TB
Agent["Agent / LLM Orchestrator"]
Mitosis["HeLa Mitosis<br/>(Orchestrator)<br/>- Dynamic Routing<br/>- Step Reasoning<br/>- Tool Planning"]
Genome["HeLa Genome<br/>(State & Memory)<br/>- Knowledge Graph<br/>- Entities / Relations<br/>- Observations"]
Membrane["HeLa Membrane<br/>Workspace FS"]
Nucleus["HeLa Nucleus<br/>Command Exec"]
Ribosome["HeLa Ribosome<br/>PTY Harness"]
Enzyme["HeLa Enzyme<br/>Research / Wiki"]
Cytosol["HeLa Cytosol<br/>Browser DOM"]
Agent --> Mitosis & Genome
Mitosis <-->|"Shared Context"| Genome
Mitosis & Genome --> Membrane & Nucleus & Ribosome & Enzyme & Cytosol
- HeLa Mitosis (
hela-mitosis): Acts as the cognitive orchestrator. It decomposes complex prompts, analyzes tool performance, and runs Needle-backedsequentialthinkingstep-by-step logic (each thought is an observe → decide → execute agent step recorded in AgentState). - HeLa Genome (
hela-genome): Acts as the immutable project memory. It stores entities, relations, observations, and session milestones inmemory.db.
2. Canonical Workflows Catalog
Workflow A: Autonomous Feature Engineering
Primary Profiles: dev-workspace, headless-server
Components: hela-genome → hela-mitosis → hela-membrane → hela-nucleus → hela-genome
sequenceDiagram
participant Agent
participant Genome as HeLa Genome
participant Mitosis as HeLa Mitosis
participant Membrane as HeLa Membrane
participant Nucleus as HeLa Nucleus
Agent->>Genome: get_session_context / search_nodes(task)
Genome-->>Agent: Previous architecture & constraints
Agent->>Mitosis: analyze_with_sequential_thinking(feature_req)
Mitosis-->>Agent: Step-by-step implementation plan
Agent->>Membrane: read_file / write_file(source_code)
Membrane-->>Agent: Code written to workspace
Agent->>Nucleus: execute_command("npm test" / "pytest")
Nucleus-->>Agent: Test run output
Agent->>Genome: memory_edit(action="add_observations", observations=[…])
Step-by-Step Tool Sequence:
- Context Restoration: Call
get_session_contextonhela-genometo retrieve active architectural decisions and dependencies. - Decomposition: Call
llm_decompose_taskorsequentialthinkingonhela-mitosisto generate an execution plan. - Workspace Modification: Call
read_fileandwrite_fileonhela-membraneto apply minimal, production-ready code changes. - Validation: Call
execute_commandonhela-nucleus(orrtkwrapper) to run automated unit tests. - State Recording: Call
memory_editonhela-genometo commit progress to the knowledge graph.
Workflow B: Deep Research & Architecture Synthesis
Primary Profiles: research, dev-workspace
Components: hela-enzyme → hela-cytosol → hela-mitosis → hela-genome → hela-membrane
sequenceDiagram
participant Agent
participant Enzyme as HeLa Enzyme
participant Cytosol as HeLa Cytosol
participant Mitosis as HeLa Mitosis
participant Genome as HeLa Genome
participant Membrane as HeLa Membrane
Agent->>Enzyme: wikipedia_search / google_search(query)
Enzyme-->>Agent: Structured technical summaries & citations
Agent->>Cytosol: browser_navigate(spec_url) -> browser_get_content(format=markdown)
Cytosol-->>Agent: Live technical documentation content
Agent->>Mitosis: llm_summarize(extracted_data)
Mitosis-->>Agent: Synthesized architectural comparison
Agent->>Genome: memory_edit(action="create_entities") + memory_edit(action="add_observations")
Agent->>Membrane: write_file("docs/architecture/spec-x.md")
Step-by-Step Tool Sequence:
- Knowledge Retrieval: Query
wikipedia_searchorgoogle_searchviahela-enzymefor background literature and reference APIs. - Live Web Extraction: Use
browser_navigateandbrowser_get_content(format=markdown)viahela-cytosolto extract documentation from official docs sites. - Synthesis: Run
llm_summarizeandanalyze_with_sequential_thinkingonhela-mitosisto synthesize key architectural trade-offs. - Knowledge Ingestion: Call
memory_editonhela-genomelinking findings to existing system components. - Artifact Generation: Save the final report using
write_fileonhela-membrane.
Workflow C: End-to-End Web Feature with Design & Browser Verification
Primary Profiles: web-devops, dev-workspace
Components: hela-phenotype → hela-membrane → hela-nucleus → hela-cytosol → hela-genome
sequenceDiagram
participant Agent
participant Phenotype as HeLa Phenotype
participant Membrane as HeLa Membrane
participant Nucleus as HeLa Nucleus
participant Cytosol as HeLa Cytosol
participant Genome as HeLa Genome
Agent->>Phenotype: design_tokens(action="theme") / design_tokens(action="tailwind")
Phenotype-->>Agent: Design tokens & OKLCH color palette
Agent->>Membrane: write_file("tailwind.config.js" & component files)
Agent->>Nucleus: execute_command("npm run dev")
Nucleus-->>Agent: Local dev server active on port 3000
Agent->>Cytosol: browser_navigate("http://localhost:3000") -> browser_screenshot
Cytosol-->>Agent: Rendered visual screenshot & accessibility tree
Agent->>Genome: memory_edit(action="add_observations", observations=["Design verified on DOM & visual snapshot"])
Step-by-Step Tool Sequence:
- Design System Token Generation: Call
design_tokens,palette, orlogo_workflowonhela-phenotype. - Component Implementation: Write JSX/Tailwind files using
write_fileonhela-membrane. - Dev Server Launch: Launch background local web server using
execute_commandonhela-nucleus. - Visual & Accessibility Verification: Navigate to
http://localhost:3000viabrowser_navigateonhela-cytosol, verify DOM viabrowser_get_content(format=axtree), and take visual snapshot withbrowser_screenshot. - Milestone Recording: Save verification screenshot path and milestone to
hela-genome.
Live Production References Generated by HeLa Phenotype (
the-designer):
- Ellis UI Archive / The Collection — 24 bespoke anti-slop design systems (Game Boy 8-bit, Top Secret Dossier, Nutrition Facts, Library Card, Gothic Tome, Swiss Archival).
Workflow D: Mobile App Test Automation & Verification
Primary Profiles: android-testing, all
Components: hela-genome → hela-nucleus → hela-receptor → hela-genome
sequenceDiagram
participant Agent
participant Genome as HeLa Genome
participant Nucleus as HeLa Nucleus
participant Receptor as HeLa Receptor
Agent->>Genome: get_session_context (device test suite)
Agent->>Nucleus: execute_command("adb devices")
Nucleus-->>Agent: Connected device ID detected
Agent->>Receptor: start_session(deviceId) -> ui_dump
Receptor-->>Agent: XML/axtree hierarchy of active mobile screen
Agent->>Receptor: tap(element_id) / input_text("user_input")
Receptor-->>Agent: UI transition complete
Agent->>Receptor: screenshot("artifacts/test-pass.png")
Agent->>Genome: memory_edit(action="add_observations", observations=["Mobile flow X verified on physical Android"])
Step-by-Step Tool Sequence:
- Device Discovery: Call
device_listonhela-receptororexecute_command("adb devices")onhela-nucleus. - Session Initialization: Call
start_sessiononhela-receptor. - UI Hierarchy Inspection: Call
ui_dumporui_find_elementto inspect Android view hierarchy token-efficiently via XML rather than screenshots. - Interaction: Execute
tap,input_text,scroll, orkey_eventto execute test scenario. - Visual Proof & Persistence: Call
screenshotand record test result observation inhela-genome.
Workflow E: Autonomous 3D Asset Creation & Render Pipeline
Primary Profiles: 3d-modeling, all
Components: hela-genome → hela-mitosis → hela-plastid → hela-membrane → hela-genome
sequenceDiagram
participant Agent
participant Genome as HeLa Genome
participant Mitosis as HeLa Mitosis
participant Plastid as HeLa Plastid
participant Membrane as HeLa Membrane
Agent->>Genome: search_nodes("3D Assets")
Agent->>Mitosis: generate_route_suggestions("Procedural chair generation")
Agent->>Plastid: generate_modeling_plan("Modern lounge chair")
Plastid-->>Agent: Phased Python Blender script
Agent->>Plastid: execute_blender_code(script) -> render_output
Plastid-->>Agent: High-resolution render output PNG
Agent->>Plastid: save_blend("assets/chair.blend")
Agent->>Genome: memory_edit(action="add_observations", observations=["Generated 3D chair asset and render"])
Step-by-Step Tool Sequence:
- Asset Requirement Analysis: Retrieve scene requirements from
hela-genome. - Plan Synthesis: Call
generate_modeling_planonhela-plastid. - Procedural Execution: Run
execute_blender_codeto generate geometry, apply materials, and setup lights. - Render Output: Trigger
render_outputandget_fast_feedbackfor visual QA. - Persistence: Save
.blendfile viasave_blendand register the asset entity inhela-genome.
Workflow F: Long-Horizon Complex Refactor with PTY Harness
Primary Profiles: dev-workspace, headless-server
Components: hela-ribosome → hela-nucleus → hela-genome
sequenceDiagram
participant Agent
participant Ribosome as HeLa Ribosome
participant Nucleus as HeLa Nucleus
participant Genome as HeLa Genome
Agent->>Ribosome: session_spawn("long-build", "mvn clean install -T 4")
Ribosome-->>Agent: Session spawned (ID: sess-101)
Agent->>Ribosome: session_read("sess-101") (bounded polling)
Ribosome-->>Agent: Streamed stdout/stderr chunk
Agent->>Nucleus: execute_command("git status")
Agent->>Genome: memory_edit(action="add_observations", observations=["Long refactor build verified via PTY session"])
Agent->>Ribosome: session_close("sess-101")
Step-by-Step Tool Sequence:
- Interactive Session Creation: Call
session_spawnonhela-ribosomefor interactive, long-running processes (compilers, debuggers, REPLs). - Session Monitoring: Read process output with
session_reador send input withsession_write. - Session Termination: Clean up process with
session_close. - Memory Recording: Log completed refactor state to
hela-genome.
3. Best Practices & Token Economy
- Structured Memory Over Raw History: Always record key findings and milestones to
hela-genomeso subsequent agent turns do not need to re-read thousands of lines of raw logs. - Hierarchy Inspection Over Full Screenshots: For web (
hela-cytosol) and mobile (hela-receptor), prefer accessibility trees and XML dumps for element location, reserving bitmap screenshots for final visual verification. - Fail-Fast Pre-Validation: Always verify prerequisite binary availability via
./setup.sh doctorbefore launching complex cross-MCP pipelines.