Research & Intelligence
Plan orchestration, AI reasoning, skills framework, and the MCP tool protocol that power Trovella's research engine.
The Research & Intelligence domain covers how Trovella orchestrates multi-step research through external AI platforms. Trovella acts as the project manager -- structuring plans, tracking state, persisting artifacts -- while AI platforms (Claude Code, ChatGPT) do the reasoning. This inversion is the founding product hypothesis: users bring their own subsidized AI subscriptions (~$200/month for ~$2,500/month equivalent in API compute), and Trovella adds structure, memory, and durability.
The research engine is a three-layer system:
- Layer 1 -- Skills (the instructor): Markdown prompt files in
.claude/skills/research/that teach the AI platform how to research. These are not code. Zero server involvement. - Layer 2 -- The AI Platform (the researcher): Claude Code, ChatGPT, or Gemini does all reasoning, web searches, and synthesis. Zero LLM API calls happen on Trovella's server during the research phase (except
extract_datawhich uses Haiku for structured extraction). - Layer 3 -- Trovella's MCP Tools (the project manager): Stores plans, provides step instructions, validates results, enforces structure, and enables cross-session resume.
The AI platform drives execution (pull-based), not the server. The loop: get_next_step returns instructions, the AI platform does reasoning, submit_step_result records findings and advances the state machine, repeat until complete.
Topics
Skills
Skill definitions, execution flow, routing logic (quick scan vs deep dive), and lifecycle tracking. Skills are markdown prompts that teach the AI platform how to conduct structured research -- from interviewing the user through plan creation, step execution, output delivery, and feedback capture.
Plan Orchestration
The plan and step state machines, branching condition evaluation, stall detection, progress tracking, and the pull-based execution loop. This is the core coordination layer that keeps multi-step research plans on track across sessions, stalls, and partial failures.
Reasoning
LLM integration via the @repo/ai wrapper, prompt patterns, model selection, batch processing, and usage tracking. All AI calls flow through this layer -- it is the single entry point for both Anthropic (Claude chat) and Google (Gemini embeddings).
Key Packages
| Package | Role |
|---|---|
@repo/mcp | MCP server, plan engine state machines, 18 research tools, audit logging |
@repo/ai | Claude API integration for extract_data and embedding generation |
Cross-Domain References
- Data & Storage --
research_plan,plan_step,plan_branching_condition, and other research tables live in the schema; plan queries use tenant context - Identity & Access -- RLS tenant isolation on all plan data; PAT authentication for MCP connections
- Search & Retrieval -- MCP tools emit events that trigger the hybrid search indexing pipeline;
search_sourcestool queries the fusion pipeline - Application -- Admin dashboard provides the research plans view for monitoring active and historical plans
- Infrastructure -- Stateless MCP transport via Next.js route on the Compute Engine VM