750 lines
28 KiB
HTML
750 lines
28 KiB
HTML
|
|
<!DOCTYPE HTML>
|
|||
|
|
<html lang="en" class="light sidebar-visible" dir="ltr">
|
|||
|
|
<head>
|
|||
|
|
<!-- Book generated using mdBook -->
|
|||
|
|
<meta charset="UTF-8">
|
|||
|
|
<title>Multi-Agent Workflows - VAPORA Platform Documentation</title>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<!-- Custom HTML head -->
|
|||
|
|
|
|||
|
|
<meta name="description" content="Comprehensive documentation for VAPORA, an intelligent development orchestration platform built entirely in Rust.">
|
|||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|||
|
|
<meta name="theme-color" content="#ffffff">
|
|||
|
|
|
|||
|
|
<link rel="icon" href="../favicon.svg">
|
|||
|
|
<link rel="shortcut icon" href="../favicon.png">
|
|||
|
|
<link rel="stylesheet" href="../css/variables.css">
|
|||
|
|
<link rel="stylesheet" href="../css/general.css">
|
|||
|
|
<link rel="stylesheet" href="../css/chrome.css">
|
|||
|
|
<link rel="stylesheet" href="../css/print.css" media="print">
|
|||
|
|
|
|||
|
|
<!-- Fonts -->
|
|||
|
|
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
|
|||
|
|
<link rel="stylesheet" href="../fonts/fonts.css">
|
|||
|
|
|
|||
|
|
<!-- Highlight.js Stylesheets -->
|
|||
|
|
<link rel="stylesheet" id="highlight-css" href="../highlight.css">
|
|||
|
|
<link rel="stylesheet" id="tomorrow-night-css" href="../tomorrow-night.css">
|
|||
|
|
<link rel="stylesheet" id="ayu-highlight-css" href="../ayu-highlight.css">
|
|||
|
|
|
|||
|
|
<!-- Custom theme stylesheets -->
|
|||
|
|
|
|||
|
|
|
|||
|
|
<!-- Provide site root and default themes to javascript -->
|
|||
|
|
<script>
|
|||
|
|
const path_to_root = "../";
|
|||
|
|
const default_light_theme = "light";
|
|||
|
|
const default_dark_theme = "dark";
|
|||
|
|
</script>
|
|||
|
|
<!-- Start loading toc.js asap -->
|
|||
|
|
<script src="../toc.js"></script>
|
|||
|
|
</head>
|
|||
|
|
<body>
|
|||
|
|
<div id="mdbook-help-container">
|
|||
|
|
<div id="mdbook-help-popup">
|
|||
|
|
<h2 class="mdbook-help-title">Keyboard shortcuts</h2>
|
|||
|
|
<div>
|
|||
|
|
<p>Press <kbd>←</kbd> or <kbd>→</kbd> to navigate between chapters</p>
|
|||
|
|
<p>Press <kbd>S</kbd> or <kbd>/</kbd> to search in the book</p>
|
|||
|
|
<p>Press <kbd>?</kbd> to show this help</p>
|
|||
|
|
<p>Press <kbd>Esc</kbd> to hide this help</p>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div id="body-container">
|
|||
|
|
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
|||
|
|
<script>
|
|||
|
|
try {
|
|||
|
|
let theme = localStorage.getItem('mdbook-theme');
|
|||
|
|
let sidebar = localStorage.getItem('mdbook-sidebar');
|
|||
|
|
|
|||
|
|
if (theme.startsWith('"') && theme.endsWith('"')) {
|
|||
|
|
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
|
|||
|
|
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
|
|||
|
|
}
|
|||
|
|
} catch (e) { }
|
|||
|
|
</script>
|
|||
|
|
|
|||
|
|
<!-- Set the theme before any content is loaded, prevents flash -->
|
|||
|
|
<script>
|
|||
|
|
const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
|
|||
|
|
let theme;
|
|||
|
|
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
|||
|
|
if (theme === null || theme === undefined) { theme = default_theme; }
|
|||
|
|
const html = document.documentElement;
|
|||
|
|
html.classList.remove('light')
|
|||
|
|
html.classList.add(theme);
|
|||
|
|
html.classList.add("js");
|
|||
|
|
</script>
|
|||
|
|
|
|||
|
|
<input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
|
|||
|
|
|
|||
|
|
<!-- Hide / unhide sidebar before it is displayed -->
|
|||
|
|
<script>
|
|||
|
|
let sidebar = null;
|
|||
|
|
const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
|
|||
|
|
if (document.body.clientWidth >= 1080) {
|
|||
|
|
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
|
|||
|
|
sidebar = sidebar || 'visible';
|
|||
|
|
} else {
|
|||
|
|
sidebar = 'hidden';
|
|||
|
|
}
|
|||
|
|
sidebar_toggle.checked = sidebar === 'visible';
|
|||
|
|
html.classList.remove('sidebar-visible');
|
|||
|
|
html.classList.add("sidebar-" + sidebar);
|
|||
|
|
</script>
|
|||
|
|
|
|||
|
|
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
|
|||
|
|
<!-- populated by js -->
|
|||
|
|
<mdbook-sidebar-scrollbox class="sidebar-scrollbox"></mdbook-sidebar-scrollbox>
|
|||
|
|
<noscript>
|
|||
|
|
<iframe class="sidebar-iframe-outer" src="../toc.html"></iframe>
|
|||
|
|
</noscript>
|
|||
|
|
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
|
|||
|
|
<div class="sidebar-resize-indicator"></div>
|
|||
|
|
</div>
|
|||
|
|
</nav>
|
|||
|
|
|
|||
|
|
<div id="page-wrapper" class="page-wrapper">
|
|||
|
|
|
|||
|
|
<div class="page">
|
|||
|
|
<div id="menu-bar-hover-placeholder"></div>
|
|||
|
|
<div id="menu-bar" class="menu-bar sticky">
|
|||
|
|
<div class="left-buttons">
|
|||
|
|
<label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
|||
|
|
<i class="fa fa-bars"></i>
|
|||
|
|
</label>
|
|||
|
|
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
|
|||
|
|
<i class="fa fa-paint-brush"></i>
|
|||
|
|
</button>
|
|||
|
|
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
|
|||
|
|
<li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
|
|||
|
|
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
|
|||
|
|
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
|
|||
|
|
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
|
|||
|
|
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
|
|||
|
|
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
|
|||
|
|
</ul>
|
|||
|
|
<button id="search-toggle" class="icon-button" type="button" title="Search (`/`)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="/ s" aria-controls="searchbar">
|
|||
|
|
<i class="fa fa-search"></i>
|
|||
|
|
</button>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<h1 class="menu-title">VAPORA Platform Documentation</h1>
|
|||
|
|
|
|||
|
|
<div class="right-buttons">
|
|||
|
|
<a href="../print.html" title="Print this book" aria-label="Print this book">
|
|||
|
|
<i id="print-button" class="fa fa-print"></i>
|
|||
|
|
</a>
|
|||
|
|
<a href="https://github.com/vapora-platform/vapora" title="Git repository" aria-label="Git repository">
|
|||
|
|
<i id="git-repository-button" class="fa fa-github"></i>
|
|||
|
|
</a>
|
|||
|
|
<a href="https://github.com/vapora-platform/vapora/edit/main/docs/src/../architecture/multi-agent-workflows.md" title="Suggest an edit" aria-label="Suggest an edit">
|
|||
|
|
<i id="git-edit-button" class="fa fa-edit"></i>
|
|||
|
|
</a>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div id="search-wrapper" class="hidden">
|
|||
|
|
<form id="searchbar-outer" class="searchbar-outer">
|
|||
|
|
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
|
|||
|
|
</form>
|
|||
|
|
<div id="searchresults-outer" class="searchresults-outer hidden">
|
|||
|
|
<div id="searchresults-header" class="searchresults-header"></div>
|
|||
|
|
<ul id="searchresults">
|
|||
|
|
</ul>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
|||
|
|
<script>
|
|||
|
|
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
|||
|
|
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
|||
|
|
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
|
|||
|
|
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
|
|||
|
|
});
|
|||
|
|
</script>
|
|||
|
|
|
|||
|
|
<div id="content" class="content">
|
|||
|
|
<main>
|
|||
|
|
<h1 id="-multi-agent-workflows"><a class="header" href="#-multi-agent-workflows">🔄 Multi-Agent Workflows</a></h1>
|
|||
|
|
<h2 id="end-to-end-parallel-task-orchestration"><a class="header" href="#end-to-end-parallel-task-orchestration">End-to-End Parallel Task Orchestration</a></h2>
|
|||
|
|
<p><strong>Version</strong>: 0.1.0
|
|||
|
|
<strong>Status</strong>: Specification (VAPORA v1.0 - Workflows)
|
|||
|
|
<strong>Purpose</strong>: Workflows where 10+ agents work in parallel, coordinated automatically</p>
|
|||
|
|
<hr />
|
|||
|
|
<h2 id="-objetivo"><a class="header" href="#-objetivo">🎯 Objetivo</a></h2>
|
|||
|
|
<p>Orquestar workflows donde múltiples agentes trabajan <strong>en paralelo</strong> en diferentes aspectos de una tarea, sin intervención manual:</p>
|
|||
|
|
<pre><code>Feature Request
|
|||
|
|
↓
|
|||
|
|
ProjectManager crea task
|
|||
|
|
↓ (paralelo)
|
|||
|
|
Architect diseña ────────┐
|
|||
|
|
Developer implementa ────├─→ Reviewer revisa ──┐
|
|||
|
|
Tester escribe tests ────┤ ├─→ DecisionMaker aprueba
|
|||
|
|
Documenter prepara docs ─┤ ├─→ DevOps deploya
|
|||
|
|
Security audita ────────┘ │
|
|||
|
|
↓
|
|||
|
|
Marketer promociona
|
|||
|
|
</code></pre>
|
|||
|
|
<hr />
|
|||
|
|
<h2 id="-workflow-feature-compleja-end-to-end"><a class="header" href="#-workflow-feature-compleja-end-to-end">📋 Workflow: Feature Compleja End-to-End</a></h2>
|
|||
|
|
<h3 id="fase-1-planificación-serial---requiere-aprobación"><a class="header" href="#fase-1-planificación-serial---requiere-aprobación">Fase 1: Planificación (Serial - Requiere aprobación)</a></h3>
|
|||
|
|
<p><strong>Agentes</strong>: Architect, ProjectManager, DecisionMaker</p>
|
|||
|
|
<p><strong>Timeline</strong>: 1-2 horas</p>
|
|||
|
|
<pre><code class="language-yaml">Workflow: feature-auth-mfa
|
|||
|
|
Status: planning
|
|||
|
|
Created: 2025-11-09T10:00:00Z
|
|||
|
|
|
|||
|
|
Steps:
|
|||
|
|
1_architect_designs:
|
|||
|
|
agent: architect
|
|||
|
|
input: feature_request, project_context
|
|||
|
|
task_type: ArchitectureDesign
|
|||
|
|
quality: Critical
|
|||
|
|
estimated_duration: 45min
|
|||
|
|
output:
|
|||
|
|
- design_doc.md
|
|||
|
|
- adr-001-mfa-strategy.md
|
|||
|
|
- architecture_diagram.svg
|
|||
|
|
|
|||
|
|
2_pm_validates:
|
|||
|
|
dependencies: [1_architect_designs]
|
|||
|
|
agent: project-manager
|
|||
|
|
task_type: GeneralQuery
|
|||
|
|
input: design_doc, project_timeline
|
|||
|
|
action: validate_feasibility
|
|||
|
|
|
|||
|
|
3_decision_maker_approves:
|
|||
|
|
dependencies: [2_pm_validates]
|
|||
|
|
agent: decision-maker
|
|||
|
|
task_type: GeneralQuery
|
|||
|
|
input: design, feasibility_report
|
|||
|
|
approval_required: true
|
|||
|
|
escalation_if: ["too risky", "breaks roadmap"]
|
|||
|
|
</code></pre>
|
|||
|
|
<p><strong>Output</strong>: ADR aprobado, design doc, go/no-go decision</p>
|
|||
|
|
<hr />
|
|||
|
|
<h3 id="fase-2-implementación-paralelo---máxima-concurrencia"><a class="header" href="#fase-2-implementación-paralelo---máxima-concurrencia">Fase 2: Implementación (Paralelo - Máxima concurrencia)</a></h3>
|
|||
|
|
<p><strong>Agentes</strong>: Developer (×3), Tester, Security, Documenter (async)</p>
|
|||
|
|
<p><strong>Timeline</strong>: 3-5 días</p>
|
|||
|
|
<pre><code class="language-yaml"> 4_frontend_dev:
|
|||
|
|
dependencies: [3_decision_maker_approves]
|
|||
|
|
agent: developer-frontend
|
|||
|
|
skill_match: frontend
|
|||
|
|
input: design_doc, api_spec
|
|||
|
|
tasks:
|
|||
|
|
- implement_mfa_ui
|
|||
|
|
- add_totp_input
|
|||
|
|
- add_webauthn_button
|
|||
|
|
parallel_with: [4_backend_dev, 5_security_setup, 6_docs_start]
|
|||
|
|
max_duration: 4days
|
|||
|
|
|
|||
|
|
4_backend_dev:
|
|||
|
|
dependencies: [3_decision_maker_approves]
|
|||
|
|
agent: developer-backend
|
|||
|
|
skill_match: backend, security
|
|||
|
|
input: design_doc, database_schema
|
|||
|
|
tasks:
|
|||
|
|
- implement_mfa_service
|
|||
|
|
- add_totp_verification
|
|||
|
|
- add_webauthn_endpoint
|
|||
|
|
parallel_with: [4_frontend_dev, 5_security_setup, 6_docs_start]
|
|||
|
|
max_duration: 4days
|
|||
|
|
|
|||
|
|
5_security_audit:
|
|||
|
|
dependencies: [3_decision_maker_approves]
|
|||
|
|
agent: security
|
|||
|
|
input: design_doc, threat_model
|
|||
|
|
tasks:
|
|||
|
|
- threat_modeling
|
|||
|
|
- security_review
|
|||
|
|
- vulnerability_scan_plan
|
|||
|
|
parallel_with: [4_frontend_dev, 4_backend_dev, 6_docs_start]
|
|||
|
|
can_block_deployment: true
|
|||
|
|
|
|||
|
|
6_docs_start:
|
|||
|
|
dependencies: [3_decision_maker_approves]
|
|||
|
|
agent: documenter
|
|||
|
|
input: design_doc
|
|||
|
|
tasks:
|
|||
|
|
- create_adr_doc
|
|||
|
|
- start_implementation_guide
|
|||
|
|
parallel_with: [4_frontend_dev, 4_backend_dev, 5_security_audit]
|
|||
|
|
low_priority: true
|
|||
|
|
|
|||
|
|
Status: in_progress
|
|||
|
|
Parallel_agents: 5
|
|||
|
|
Progress: 60%
|
|||
|
|
Blockers: none
|
|||
|
|
</code></pre>
|
|||
|
|
<p><strong>Output</strong>:</p>
|
|||
|
|
<ul>
|
|||
|
|
<li>Frontend implementation + PRs</li>
|
|||
|
|
<li>Backend implementation + PRs</li>
|
|||
|
|
<li>Security audit report</li>
|
|||
|
|
<li>Initial documentation</li>
|
|||
|
|
</ul>
|
|||
|
|
<hr />
|
|||
|
|
<h3 id="fase-3-código-review-paralelo-pero-gated"><a class="header" href="#fase-3-código-review-paralelo-pero-gated">Fase 3: Código Review (Paralelo pero gated)</a></h3>
|
|||
|
|
<p><strong>Agentes</strong>: CodeReviewer (×2), Security, Tester</p>
|
|||
|
|
<p><strong>Timeline</strong>: 1-2 días</p>
|
|||
|
|
<pre><code class="language-yaml"> 7a_frontend_review:
|
|||
|
|
dependencies: [4_frontend_dev]
|
|||
|
|
agent: code-reviewer-frontend
|
|||
|
|
input: frontend_pr
|
|||
|
|
actions: [comment, request_changes, approve]
|
|||
|
|
must_pass: 1 # At least 1 reviewer
|
|||
|
|
can_block_merge: true
|
|||
|
|
|
|||
|
|
7b_backend_review:
|
|||
|
|
dependencies: [4_backend_dev]
|
|||
|
|
agent: code-reviewer-backend
|
|||
|
|
input: backend_pr
|
|||
|
|
actions: [comment, request_changes, approve]
|
|||
|
|
must_pass: 1
|
|||
|
|
security_required: true # Security must also approve
|
|||
|
|
|
|||
|
|
7c_security_review:
|
|||
|
|
dependencies: [4_backend_dev, 5_security_audit]
|
|||
|
|
agent: security
|
|||
|
|
input: backend_pr, security_audit
|
|||
|
|
actions: [scan, approve_or_block]
|
|||
|
|
critical_vulns_block_merge: true
|
|||
|
|
high_vulns_require_mitigation: true
|
|||
|
|
|
|||
|
|
7d_test_coverage:
|
|||
|
|
dependencies: [4_frontend_dev, 4_backend_dev]
|
|||
|
|
agent: tester
|
|||
|
|
input: frontend_pr, backend_pr
|
|||
|
|
actions: [run_tests, check_coverage, benchmark]
|
|||
|
|
must_pass: tests_passing && coverage > 85%
|
|||
|
|
|
|||
|
|
Status: in_progress
|
|||
|
|
Parallel_reviewers: 4
|
|||
|
|
Approved: frontend_review
|
|||
|
|
Pending: backend_review (awaiting security_review)
|
|||
|
|
Blockers: security_review
|
|||
|
|
</code></pre>
|
|||
|
|
<p><strong>Output</strong>:</p>
|
|||
|
|
<ul>
|
|||
|
|
<li>Approved PRs (if all pass)</li>
|
|||
|
|
<li>Comments & requested changes</li>
|
|||
|
|
<li>Test coverage report</li>
|
|||
|
|
<li>Security clearance</li>
|
|||
|
|
</ul>
|
|||
|
|
<hr />
|
|||
|
|
<h3 id="fase-4-merge--deploy-serial---ordered"><a class="header" href="#fase-4-merge--deploy-serial---ordered">Fase 4: Merge & Deploy (Serial - Ordered)</a></h3>
|
|||
|
|
<p><strong>Agentes</strong>: CodeReviewer, DevOps, Monitor</p>
|
|||
|
|
<p><strong>Timeline</strong>: 1-2 horas</p>
|
|||
|
|
<pre><code class="language-yaml"> 8_merge_to_dev:
|
|||
|
|
dependencies: [7a_frontend_review, 7b_backend_review, 7c_security_review, 7d_test_coverage]
|
|||
|
|
agent: code-reviewer
|
|||
|
|
action: merge_to_dev
|
|||
|
|
requires: all_approved
|
|||
|
|
|
|||
|
|
9_deploy_staging:
|
|||
|
|
dependencies: [8_merge_to_dev]
|
|||
|
|
agent: devops
|
|||
|
|
environment: staging
|
|||
|
|
actions: [trigger_ci, deploy_manifests, smoke_test]
|
|||
|
|
automatic_after_merge: true
|
|||
|
|
timeout: 30min
|
|||
|
|
|
|||
|
|
10_smoke_test:
|
|||
|
|
dependencies: [9_deploy_staging]
|
|||
|
|
agent: tester
|
|||
|
|
test_type: smoke
|
|||
|
|
environments: [staging]
|
|||
|
|
must_pass: all
|
|||
|
|
|
|||
|
|
11_monitor_staging:
|
|||
|
|
dependencies: [9_deploy_staging]
|
|||
|
|
agent: monitor
|
|||
|
|
duration: 1hour
|
|||
|
|
metrics: [error_rate, latency, cpu, memory]
|
|||
|
|
alert_if: error_rate > 1% or p99_latency > 500ms
|
|||
|
|
|
|||
|
|
Status: in_progress
|
|||
|
|
Completed: 8_merge_to_dev
|
|||
|
|
In_progress: 9_deploy_staging (20min elapsed)
|
|||
|
|
Pending: 10_smoke_test, 11_monitor_staging
|
|||
|
|
</code></pre>
|
|||
|
|
<p><strong>Output</strong>:</p>
|
|||
|
|
<ul>
|
|||
|
|
<li>Code merged to dev</li>
|
|||
|
|
<li>Deployed to staging</li>
|
|||
|
|
<li>Smoke tests pass</li>
|
|||
|
|
<li>Monitoring active</li>
|
|||
|
|
</ul>
|
|||
|
|
<hr />
|
|||
|
|
<h3 id="fase-5-final-validation--release"><a class="header" href="#fase-5-final-validation--release">Fase 5: Final Validation & Release</a></h3>
|
|||
|
|
<p><strong>Agentes</strong>: DecisionMaker, DevOps, Marketer, Monitor</p>
|
|||
|
|
<p><strong>Timeline</strong>: 1-3 horas</p>
|
|||
|
|
<pre><code class="language-yaml"> 12_final_approval:
|
|||
|
|
dependencies: [10_smoke_test, 11_monitor_staging]
|
|||
|
|
agent: decision-maker
|
|||
|
|
input: test_results, monitoring_report, security_clearance
|
|||
|
|
action: approve_for_production
|
|||
|
|
if_blocked: defer_to_next_week
|
|||
|
|
|
|||
|
|
13_deploy_production:
|
|||
|
|
dependencies: [12_final_approval]
|
|||
|
|
agent: devops
|
|||
|
|
environment: production
|
|||
|
|
deployment_strategy: blue_green # 0 downtime
|
|||
|
|
actions: [deploy, health_check, traffic_switch]
|
|||
|
|
rollback_on: any_error
|
|||
|
|
|
|||
|
|
14_monitor_production:
|
|||
|
|
dependencies: [13_deploy_production]
|
|||
|
|
agent: monitor
|
|||
|
|
duration: 24hours
|
|||
|
|
alert_thresholds: [error_rate > 0.5%, p99 > 300ms, cpu > 80%]
|
|||
|
|
auto_rollback_if: critical_error
|
|||
|
|
|
|||
|
|
15_announce_release:
|
|||
|
|
dependencies: [13_deploy_production] # Can start once deployed
|
|||
|
|
agent: marketer
|
|||
|
|
async: true
|
|||
|
|
actions: [draft_blog_post, announce_on_twitter, create_demo_video]
|
|||
|
|
|
|||
|
|
16_update_docs:
|
|||
|
|
dependencies: [13_deploy_production]
|
|||
|
|
agent: documenter
|
|||
|
|
async: true
|
|||
|
|
actions: [update_changelog, publish_guide, update_roadmap]
|
|||
|
|
|
|||
|
|
Status: completed
|
|||
|
|
Deployed: 2025-11-10T14:00:00Z
|
|||
|
|
Monitoring: Active
|
|||
|
|
Release_notes: docs/releases/v1.2.0.md
|
|||
|
|
</code></pre>
|
|||
|
|
<p><strong>Output</strong>:</p>
|
|||
|
|
<ul>
|
|||
|
|
<li>Deployed to production</li>
|
|||
|
|
<li>24h monitoring active</li>
|
|||
|
|
<li>Blog post + social media</li>
|
|||
|
|
<li>Docs updated</li>
|
|||
|
|
<li>Release notes published</li>
|
|||
|
|
</ul>
|
|||
|
|
<hr />
|
|||
|
|
<h2 id="-workflow-state-machine"><a class="header" href="#-workflow-state-machine">🔄 Workflow State Machine</a></h2>
|
|||
|
|
<pre><code>Created
|
|||
|
|
↓
|
|||
|
|
Planning (serial, approval-gated)
|
|||
|
|
├─ Architect designs
|
|||
|
|
├─ PM validates
|
|||
|
|
└─ DecisionMaker approves → GO / NO-GO
|
|||
|
|
↓
|
|||
|
|
Implementation (parallel)
|
|||
|
|
├─ Frontend dev
|
|||
|
|
├─ Backend dev
|
|||
|
|
├─ Security audit
|
|||
|
|
├─ Tester setup
|
|||
|
|
└─ Documenter start
|
|||
|
|
↓
|
|||
|
|
Review (parallel but gated)
|
|||
|
|
├─ Code review
|
|||
|
|
├─ Security review
|
|||
|
|
├─ Test execution
|
|||
|
|
└─ Coverage check
|
|||
|
|
↓
|
|||
|
|
Merge & Deploy (serial, ordered)
|
|||
|
|
├─ Merge to dev
|
|||
|
|
├─ Deploy staging
|
|||
|
|
├─ Smoke test
|
|||
|
|
└─ Monitor staging
|
|||
|
|
↓
|
|||
|
|
Release (parallel async)
|
|||
|
|
├─ Final approval
|
|||
|
|
├─ Deploy production
|
|||
|
|
├─ Monitor 24h
|
|||
|
|
├─ Marketing announce
|
|||
|
|
└─ Docs update
|
|||
|
|
↓
|
|||
|
|
Completed / Rolled back
|
|||
|
|
|
|||
|
|
Transitions:
|
|||
|
|
- Blocked → can escalate to DecisionMaker
|
|||
|
|
- Failed → auto-rollback if production
|
|||
|
|
- Waiting → timeout after N hours
|
|||
|
|
</code></pre>
|
|||
|
|
<hr />
|
|||
|
|
<h2 id="-workflow-dsl-yamltoml"><a class="header" href="#-workflow-dsl-yamltoml">🎯 Workflow DSL (YAML/TOML)</a></h2>
|
|||
|
|
<h3 id="minimal-example"><a class="header" href="#minimal-example">Minimal Example</a></h3>
|
|||
|
|
<pre><code class="language-yaml">workflow:
|
|||
|
|
id: feature-auth
|
|||
|
|
title: Implement MFA
|
|||
|
|
agents:
|
|||
|
|
architect:
|
|||
|
|
role: Architect
|
|||
|
|
parallel_with: [pm]
|
|||
|
|
pm:
|
|||
|
|
role: ProjectManager
|
|||
|
|
depends_on: [architect]
|
|||
|
|
developer:
|
|||
|
|
role: Developer
|
|||
|
|
depends_on: [pm]
|
|||
|
|
parallelizable: true
|
|||
|
|
|
|||
|
|
approval_required_at: [architecture, deploy_production]
|
|||
|
|
allow_concurrent_agents: 10
|
|||
|
|
timeline_hours: 48
|
|||
|
|
</code></pre>
|
|||
|
|
<h3 id="complex-example-feature-complete"><a class="header" href="#complex-example-feature-complete">Complex Example (Feature-complete)</a></h3>
|
|||
|
|
<pre><code class="language-yaml">workflow:
|
|||
|
|
id: feature-user-preferences
|
|||
|
|
title: User Preferences System
|
|||
|
|
created_at: 2025-11-09T10:00:00Z
|
|||
|
|
|
|||
|
|
phases:
|
|||
|
|
phase_1_design:
|
|||
|
|
duration_hours: 2
|
|||
|
|
serial: true
|
|||
|
|
steps:
|
|||
|
|
- name: architect_designs
|
|||
|
|
agent: architect
|
|||
|
|
input: feature_spec
|
|||
|
|
output: design_doc
|
|||
|
|
|
|||
|
|
- name: architect_creates_adr
|
|||
|
|
agent: architect
|
|||
|
|
depends_on: architect_designs
|
|||
|
|
output: adr-017.md
|
|||
|
|
|
|||
|
|
- name: pm_reviews
|
|||
|
|
agent: project-manager
|
|||
|
|
depends_on: architect_creates_adr
|
|||
|
|
approval_required: true
|
|||
|
|
|
|||
|
|
phase_2_implementation:
|
|||
|
|
duration_hours: 48
|
|||
|
|
parallel: true
|
|||
|
|
max_concurrent_agents: 6
|
|||
|
|
|
|||
|
|
steps:
|
|||
|
|
- name: frontend_dev
|
|||
|
|
agent: developer
|
|||
|
|
skill_match: frontend
|
|||
|
|
depends_on: [architect_designs]
|
|||
|
|
|
|||
|
|
- name: backend_dev
|
|||
|
|
agent: developer
|
|||
|
|
skill_match: backend
|
|||
|
|
depends_on: [architect_designs]
|
|||
|
|
|
|||
|
|
- name: db_migration
|
|||
|
|
agent: devops
|
|||
|
|
depends_on: [architect_designs]
|
|||
|
|
|
|||
|
|
- name: security_review
|
|||
|
|
agent: security
|
|||
|
|
depends_on: [architect_designs]
|
|||
|
|
|
|||
|
|
- name: docs_start
|
|||
|
|
agent: documenter
|
|||
|
|
depends_on: [architect_creates_adr]
|
|||
|
|
priority: low
|
|||
|
|
|
|||
|
|
phase_3_review:
|
|||
|
|
duration_hours: 16
|
|||
|
|
gate: all_tests_pass && all_reviews_approved
|
|||
|
|
|
|||
|
|
steps:
|
|||
|
|
- name: frontend_review
|
|||
|
|
agent: code-reviewer
|
|||
|
|
depends_on: frontend_dev
|
|||
|
|
|
|||
|
|
- name: backend_review
|
|||
|
|
agent: code-reviewer
|
|||
|
|
depends_on: backend_dev
|
|||
|
|
|
|||
|
|
- name: tests
|
|||
|
|
agent: tester
|
|||
|
|
depends_on: [frontend_dev, backend_dev]
|
|||
|
|
|
|||
|
|
- name: deploy_staging
|
|||
|
|
agent: devops
|
|||
|
|
depends_on: [frontend_review, backend_review, tests]
|
|||
|
|
|
|||
|
|
phase_4_release:
|
|||
|
|
duration_hours: 4
|
|||
|
|
|
|||
|
|
steps:
|
|||
|
|
- name: final_approval
|
|||
|
|
agent: decision-maker
|
|||
|
|
depends_on: phase_3_review
|
|||
|
|
|
|||
|
|
- name: deploy_production
|
|||
|
|
agent: devops
|
|||
|
|
depends_on: final_approval
|
|||
|
|
strategy: blue_green
|
|||
|
|
|
|||
|
|
- name: announce
|
|||
|
|
agent: marketer
|
|||
|
|
depends_on: deploy_production
|
|||
|
|
async: true
|
|||
|
|
</code></pre>
|
|||
|
|
<hr />
|
|||
|
|
<h2 id="-runtime-monitoring--adjustment"><a class="header" href="#-runtime-monitoring--adjustment">🔧 Runtime: Monitoring & Adjustment</a></h2>
|
|||
|
|
<h3 id="dashboard-real-time"><a class="header" href="#dashboard-real-time">Dashboard (Real-Time)</a></h3>
|
|||
|
|
<pre><code>Workflow: feature-auth-mfa
|
|||
|
|
Status: in_progress (Phase 2/5)
|
|||
|
|
Progress: 45%
|
|||
|
|
Timeline: 2/4 days remaining
|
|||
|
|
|
|||
|
|
Active Agents (5/12):
|
|||
|
|
├─ architect-001 🟢 Designing (80% done)
|
|||
|
|
├─ developer-frontend-001 🟢 Implementing (60% done)
|
|||
|
|
├─ developer-backend-001 🟢 Implementing (50% done)
|
|||
|
|
├─ security-001 🟢 Auditing (70% done)
|
|||
|
|
└─ documenter-001 🟡 Waiting for PR links
|
|||
|
|
|
|||
|
|
Pending Agents (4):
|
|||
|
|
├─ code-reviewer-001 ⏳ Waiting for frontend_dev
|
|||
|
|
├─ code-reviewer-002 ⏳ Waiting for backend_dev
|
|||
|
|
├─ tester-001 ⏳ Waiting for dev completion
|
|||
|
|
└─ devops-001 ⏳ Waiting for reviews
|
|||
|
|
|
|||
|
|
Blockers: none
|
|||
|
|
Issues: none
|
|||
|
|
Risks: none
|
|||
|
|
|
|||
|
|
Timeline Projection:
|
|||
|
|
- Design: ✅ 2h (completed)
|
|||
|
|
- Implementation: 3d (50% done, on track)
|
|||
|
|
- Review: 1d (scheduled)
|
|||
|
|
- Deploy: 4h (scheduled)
|
|||
|
|
Total ETA: 4d (vs 5d planned, 1d early!)
|
|||
|
|
</code></pre>
|
|||
|
|
<h3 id="workflow-adjustments"><a class="header" href="#workflow-adjustments">Workflow Adjustments</a></h3>
|
|||
|
|
<pre><pre class="playground"><code class="language-rust"><span class="boring">#![allow(unused)]
|
|||
|
|
</span><span class="boring">fn main() {
|
|||
|
|
</span>pub enum WorkflowAdjustment {
|
|||
|
|
// Add more agents if progress slow
|
|||
|
|
AddAgent { agent_role: AgentRole, count: u32 },
|
|||
|
|
|
|||
|
|
// Parallelize steps that were serial
|
|||
|
|
Parallelize { step_ids: Vec<String> },
|
|||
|
|
|
|||
|
|
// Skip optional steps to save time
|
|||
|
|
SkipOptionalSteps { step_ids: Vec<String> },
|
|||
|
|
|
|||
|
|
// Escalate blocker to DecisionMaker
|
|||
|
|
EscalateBlocker { step_id: String },
|
|||
|
|
|
|||
|
|
// Pause workflow for manual review
|
|||
|
|
Pause { reason: String },
|
|||
|
|
|
|||
|
|
// Cancel workflow if infeasible
|
|||
|
|
Cancel { reason: String },
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Example: If timeline too tight, add agents
|
|||
|
|
if projected_timeline > planned_timeline {
|
|||
|
|
workflow.adjust(WorkflowAdjustment::AddAgent {
|
|||
|
|
agent_role: AgentRole::Developer,
|
|||
|
|
count: 2,
|
|||
|
|
}).await?;
|
|||
|
|
}
|
|||
|
|
<span class="boring">}</span></code></pre></pre>
|
|||
|
|
<hr />
|
|||
|
|
<h2 id="-implementation-checklist"><a class="header" href="#-implementation-checklist">🎯 Implementation Checklist</a></h2>
|
|||
|
|
<ul>
|
|||
|
|
<li><input disabled="" type="checkbox"/>
|
|||
|
|
Workflow YAML/TOML parser</li>
|
|||
|
|
<li><input disabled="" type="checkbox"/>
|
|||
|
|
State machine executor (Created→Completed)</li>
|
|||
|
|
<li><input disabled="" type="checkbox"/>
|
|||
|
|
Parallel task scheduler</li>
|
|||
|
|
<li><input disabled="" type="checkbox"/>
|
|||
|
|
Dependency resolution (topological sort)</li>
|
|||
|
|
<li><input disabled="" type="checkbox"/>
|
|||
|
|
Gate evaluation (all_passed, any_approved, etc.)</li>
|
|||
|
|
<li><input disabled="" type="checkbox"/>
|
|||
|
|
Blocking & escalation logic</li>
|
|||
|
|
<li><input disabled="" type="checkbox"/>
|
|||
|
|
Rollback on failure</li>
|
|||
|
|
<li><input disabled="" type="checkbox"/>
|
|||
|
|
Real-time dashboard</li>
|
|||
|
|
<li><input disabled="" type="checkbox"/>
|
|||
|
|
Audit trail (who did what, when, why)</li>
|
|||
|
|
<li><input disabled="" type="checkbox"/>
|
|||
|
|
CLI: <code>vapora workflow run feature-auth.yaml</code></li>
|
|||
|
|
<li><input disabled="" type="checkbox"/>
|
|||
|
|
CLI: <code>vapora workflow status --id feature-auth</code></li>
|
|||
|
|
<li><input disabled="" type="checkbox"/>
|
|||
|
|
Monitoring & alerting</li>
|
|||
|
|
</ul>
|
|||
|
|
<hr />
|
|||
|
|
<h2 id="-success-metrics"><a class="header" href="#-success-metrics">📊 Success Metrics</a></h2>
|
|||
|
|
<p>✅ 10+ agents coordinated without errors
|
|||
|
|
✅ Parallel execution actual (not serial)
|
|||
|
|
✅ Dependencies respected
|
|||
|
|
✅ Approval gates enforce correctly
|
|||
|
|
✅ Rollback works on failure
|
|||
|
|
✅ Dashboard updates real-time
|
|||
|
|
✅ Workflow completes in <5% over estimated time</p>
|
|||
|
|
<hr />
|
|||
|
|
<p><strong>Version</strong>: 0.1.0
|
|||
|
|
<strong>Status</strong>: ✅ Specification Complete (VAPORA v1.0)
|
|||
|
|
<strong>Purpose</strong>: Multi-agent parallel workflow orchestration</p>
|
|||
|
|
|
|||
|
|
</main>
|
|||
|
|
|
|||
|
|
<nav class="nav-wrapper" aria-label="Page navigation">
|
|||
|
|
<!-- Mobile navigation buttons -->
|
|||
|
|
<a rel="prev" href="../../architecture/multi-ia-router.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
|||
|
|
<i class="fa fa-angle-left"></i>
|
|||
|
|
</a>
|
|||
|
|
|
|||
|
|
<a rel="next prefetch" href="../../architecture/task-agent-doc-manager.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
|||
|
|
<i class="fa fa-angle-right"></i>
|
|||
|
|
</a>
|
|||
|
|
|
|||
|
|
<div style="clear: both"></div>
|
|||
|
|
</nav>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<nav class="nav-wide-wrapper" aria-label="Page navigation">
|
|||
|
|
<a rel="prev" href="../../architecture/multi-ia-router.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
|
|||
|
|
<i class="fa fa-angle-left"></i>
|
|||
|
|
</a>
|
|||
|
|
|
|||
|
|
<a rel="next prefetch" href="../../architecture/task-agent-doc-manager.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
|
|||
|
|
<i class="fa fa-angle-right"></i>
|
|||
|
|
</a>
|
|||
|
|
</nav>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
<script>
|
|||
|
|
window.playground_copyable = true;
|
|||
|
|
</script>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<script src="../elasticlunr.min.js"></script>
|
|||
|
|
<script src="../mark.min.js"></script>
|
|||
|
|
<script src="../searcher.js"></script>
|
|||
|
|
|
|||
|
|
<script src="../clipboard.min.js"></script>
|
|||
|
|
<script src="../highlight.js"></script>
|
|||
|
|
<script src="../book.js"></script>
|
|||
|
|
|
|||
|
|
<!-- Custom JS scripts -->
|
|||
|
|
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
</body>
|
|||
|
|
</html>
|