S234 Jarvis Phase1 Progress Report
Documentation for Sessions
S234: From Vitto to Jarvis — Phase 1 Progress Report
Audience: Non-developers, stakeholders, product team Date: 2026-03-18 Session: S234.2 Status: Phase 1 Complete
What Is This Project?
Vitto is our AI assistant. Today, when Vitto receives a complex task, it handles everything one step at a time — like a single employee working alone on a big project. The "Jarvis Evolution" makes Vitto smarter by giving it the ability to deploy multiple sub-agents simultaneously to work on different parts of a task in parallel, like a manager delegating work to a team.
This is Phase 1 of an 8-week plan that will ultimately give Vitto:
- Parallel sub-agent execution (Phase 1 — done)
- Virtual machine environments for running code (Phase 2)
- The ability to use your Google, GitHub, Slack accounts on your behalf via OAuth (Phase 3)
- Expert sub-agents you can train for specific tasks (Phase 4)
- A "soul" — personality that adapts to how you work (Phase 5)
- Microsoft Teams integration (Phase 4)
What Was Built in Phase 1
The Sub-Vitto Engine
Before: Vitto could only do one thing at a time. If it needed to search for security patterns AND analyze code structure AND look up past decisions, it did each sequentially — slow.
After: Vitto can now deploy up to 5 "sub-Vittos" that work simultaneously. Each sub-Vitto is a focused specialist that:
- Gets a specific task ("search for security patterns in auth module")
- Works independently with its own tools
- Reports back results
- Doesn't interfere with other sub-Vittos running in parallel
Think of it like a meeting where the manager says: "Alice, research X. Bob, analyze Y. Carol, look up Z. Report back in 5 minutes." — instead of the manager doing all three tasks themselves.
What Users Will See
In the chat panel, when Vitto deploys sub-agents, users see a collapsible card showing:
- How many agents were deployed
- What each one is doing
- Real-time status (running, completed, failed)
- How long each took
- A synthesis of all results
┌─────────────────────────────────────┐
│ Deployed 3 agents 2.3s │
│ │
│ ✓ Security Review (in-process) │
│ ✓ Pattern Search (in-process) │
│ ✗ Code Analysis (failed) │
│ │
│ Synthesis: 2 tasks completed... │
└─────────────────────────────────────┘
Safety Built In
- No infinite loops: Sub-Vittos cannot deploy their own sub-Vittos (recursion blocked)
- Budget controls: Each sub-Vitto has its own token/iteration limits
- Concurrency cap: Maximum 5 parallel sub-Vittos (configurable)
- Graceful failures: If one sub-Vitto fails, others continue working
Timeline of Changes
Step 1: Event Scoping System (SubVittoSSEProxy)
What: Created a system to keep sub-Vitto activity separate from the main Vitto's activity stream. Why: Without this, when 3 sub-Vittos run simultaneously, their status updates would mix with the main Vitto's updates — creating confusion in the user interface. This proxy labels each event so the frontend knows which sub-Vitto sent it.
Step 2: Type Definitions
What: Defined the data structures for sub-Vitto tasks, tiers (in-process, VM, browser), and results. Why: These are the "contracts" that ensure all parts of the system speak the same language. Every component references these shared definitions.
Step 3: Orchestrator Service (Core Engine)
What: Built the central service that manages parallel execution — receives a list of tasks, assigns them to sub-Vittos, monitors progress, handles failures, and synthesizes results. Why: This is the brain of the operation. It decides how many sub-Vittos to run simultaneously, ensures budget limits are respected, and produces a unified summary when all sub-tasks complete.
Step 4: Deploy Agents Tool
What: Created the deploy_agents tool that Vitto's AI can call when it decides a task would benefit from parallel execution.
Why: Vitto needs a way to actually trigger parallel execution. This tool follows the same plugin pattern as all other Vitto tools (memory recall, web search, etc.) — it's registered in the tool system and available during conversations.
Step 5: System Wiring
What: Connected all the new pieces together — registered the orchestrator service, plugged the tool into the registry, and made the deployment pipeline aware of the new capabilities. Why: The individual components work in isolation, but they need to be wired into the existing system to function as a whole.
Step 6: Engine Refactoring (Most Critical)
What: Replaced the old, duplicated execution loop in the sub-agent system with a call to the shared engine that powers all of Vitto. Why: Previously, sub-agents had their own 160-line execution loop that missed features like automatic stuck detection, crash recovery, and real-time streaming. By using the shared engine, sub-agents now get all of these for free — reducing code, eliminating bugs, and ensuring consistency. This is the "one engine, many contexts" architecture principle.
Step 7: Chat Panel Renderer
What: Built the visual component that shows sub-Vitto activity in the chat interface. Why: Users need to see what's happening when Vitto deploys parallel agents. This card group shows real-time status with completion indicators, timing, and error details.
Step 8: Integration Verification
What: Ran comprehensive tests to verify all pieces work together. Why: With 22 files changed across backend and frontend, we need confidence that nothing is broken.
Numbers
| Metric | Value |
|---|---|
| Commits | 10 |
| Files changed | 22 |
| Lines added | 1,297 |
| Lines removed | 324 |
| New test files | 3 |
| New test cases | ~20 |
| Total tests passing | 996 / 1,026 (97%) |
| Pre-existing failures | 30 (not caused by this work) |
What's Next
| Phase | What | When | Status |
|---|---|---|---|
| Phase 1 | Sub-Vitto Engine (parallel agents) | Week 1-2 | Complete |
| Phase 2 | VM Agent Tier + MongoDB Cleanup | Week 3-4 | Starting now |
| Phase 3 | OAuth Infrastructure (Google, GitHub) | Week 4-5 | Planned |
| Phase 4 | Expert Sub-Agent UX + Teams Channel | Week 5-6 | Planned |
| Phase 5 | Vitto's Soul (personality + evolution) | Week 6-7 | Planned |
| Phase 6 | Integration + Polish | Week 7-8 | Planned |
Phase 2 Preview
- VM Agents: Sub-Vittos that can actually write code, run tests, and install packages in sandboxed virtual machines (not just search/analyze)
- MongoDB Cleanup: Removing 2 orphaned database collections and their ghost references
Known Issues (Pre-Existing)
These test failures existed BEFORE Phase 1 work began and are unrelated to the sub-Vitto engine:
- phase-executor.spec.ts (20 failures) — Missing
UserDossierServiceprovider in test setup - vitto-core.controller.spec.ts (10 failures) — Same root cause: missing
UserDossierService - daily-digest-rich.spec.ts (suite failure) — Constructor expects 6 arguments, test provides 5 (missing
VittoObservabilityService)
A separate handoff has been created for another agent to fix these.
Key Decisions Made
| Decision | Choice | Why |
|---|---|---|
| Sub-agent execution model | Use shared engine (AgentLoopService) | Eliminates 160 lines of duplicated code; inherits stuck detection, checkpoints, SSE for free |
| Parallel execution strategy | Promise.allSettled() with chunked batches | Simplest correct approach; no external libraries needed; partial failures don't block others |
| SSE event scoping | SubVittoSSEProxy wrapper | Clean separation without modifying the shared engine; extensible for future event types |
| Recursion safety | MAX_DEPTH=1 enforced at orchestrator | Prevents infinite sub-Vitto spawning; safety invariant, not configurable |
| VM/Browser tier in Phase 1 | Fallback to in-process | Allows the system to work end-to-end now; VM infrastructure added in Phase 2 |
Owner: fguijarro Session: S234.2 Branch: session-234-235 Spec: docs/superpowers/specs/2026-03-18-vitto-jarvis-comprehensive-evolution-design.md