Trovella Wiki

Research Plans View

Admin view for monitoring research plan execution, step progress, artifacts, extractions, and audit trails.

The Research Plans view (/admin/research-plans) provides a list page with health KPIs and a detail page with eight tabbed sub-views for deep inspection of individual plans.

List Page

Route: /admin/research-plans

Health KPI Cards

Five cards summarize overall plan health across the system:

CardMetricSource
Active PlansPlans not in completed or failed statusresearchPlan.healthSummary
StalledPlans in stalled status (requiring attention)researchPlan.healthSummary
CompletedSuccessfully finished plansresearchPlan.healthSummary
FailedPlans that terminated with errorsresearchPlan.healthSummary
Avg Steps/PlanAverage number of steps across all plansresearchPlan.healthSummary

The healthSummary procedure runs five separate count queries against the research_plan table and one subquery averaging step counts from plan_step.

Plans Table

A paginated table (20 rows per page) listing all research plans, sorted by updated_at descending. Each row shows:

  • Name -- linked to the plan detail page (/admin/research-plans/{planId})
  • Status -- color-coded badge (planning, executing, awaiting_review, stalled, completed, failed)
  • Progress -- percentage and step fraction (e.g., "75% (3/4)")
  • Question -- the research question (truncated)
  • Updated -- last update timestamp

The researchPlan.list procedure returns plan rows joined with step counts computed per-plan via grouped queries on plan_step.

Detail Page

Route: /admin/research-plans/{planId}

The detail page shows the plan name, research question, and overview cards, then provides eight tabbed sections for inspecting different aspects of the plan.

Overview Cards

Five cards across the top:

CardContent
StatusColor-coded badge
ProgressPercentage with completed/total step count
CreatedCreation timestamp
CompletedCompletion timestamp (or dash if still running)
SessionTruncated Claude Code session ID that created the plan

Below the cards, a metadata row shows Plan ID, User ID, Organization ID, and last update time. If the plan has output formatting notes, those appear in a separate card.

Skill Execution Card

If the plan has an associated skill execution (queried via researchPlan.skillExecution), a card shows:

  • Skill name and status badge
  • Duration
  • Session ID
  • Expandable metadata JSON
  • Error message (if failed)

Tabbed Sections

Steps Tab

An expandable table of plan steps from researchPlan.stepResults. Each row shows:

ColumnContent
Step OrderNumeric sequence position
TypeStep type badge (e.g., web_search, analyze, synthesize)
StatusColor-coded badge (pending, in_progress, awaiting_input, completed, skipped, failed)
InstructionsTruncated step instructions
ConfidencePercentage (if set)
DurationComputed from started_at to completed_at

Clicking a row with details expands it to show:

  • Start and completion timestamps, step ID
  • Full instructions text
  • Result summary JSON
  • Step execution report JSON
  • Output formatting notes

Artifacts Tab

A paginated, expandable table of research artifacts from researchPlan.artifacts (20 per page). Each row shows:

ColumnContent
TitleArtifact title
TypeColor-coded badge (analysis, synthesis, comparison, summary, source_list, finding)
ConfidencePercentage
SourceSource badge
StepTruncated step ID
CreatedTimestamp

Expanding a row reveals the artifact ID, step ID, user ID, update timestamp, full text content, and structured content JSON.

Extractions Tab

A paginated, expandable table of data extraction results from researchPlan.extractionResults (20 per page). Each row shows:

ColumnContent
StatusBadge (pending, completed, failed, needs_review)
Schema VersionVersion number
ConfidenceOverall confidence percentage
SourceSource URL or artifact ID
CreatedTimestamp

Expanding a row reveals:

  • Extraction ID, step ID, source artifact ID, source URL
  • Error message (in a red alert box if present)
  • Field-level confidence bars -- each extracted field gets a horizontal progress bar color-coded by confidence (green >= 80%, yellow >= 50%, red < 50%)
  • Source location JSON, extracted data JSON, extraction schema JSON

Branching Tab

A flat table of branching conditions from researchPlan.branchingConditions. These control conditional step flow within a plan. Each row shows:

ColumnContent
After StepTruncated step ID that triggers evaluation
ConditionThe condition expression in a code block
If True ActionAction badge
Action ParamsJSON of action parameters
CreatedTimestamp

Tool Calls Tab

A paginated, expandable table of MCP tool call logs from researchPlan.toolCallLog (50 per page). Each row shows:

ColumnContent
ToolTool name badge
DurationMilliseconds
ErrorOK/error badge
SessionTruncated Claude Code session ID
TimeTimestamp

Expanding a row reveals the step ID, skill execution ID, request metadata JSON, and response metadata JSON.

Outputs Tab

A paginated, expandable table of research output deliverables from researchPlan.outputs (20 per page). Each row shows:

ColumnContent
TitleOutput title
Media TypeBadge (e.g., markdown, json)
File SizeHuman-readable size
SessionTruncated session ID
CreatedTimestamp

Expanding a row reveals the content summary, formatting notes used, and the full content (truncated at 2000 characters with a total character count shown).

Feedback Tab

An expandable table of user feedback entries from researchPlan.feedback. Each row shows:

ColumnContent
TypeBadge (initial, closing)
SatisfactionColor-coded badge (positive, neutral, negative)
Follow-upWhether follow-up was requested
CreatedTimestamp

Expanding a row reveals the user feedback summary, improvement suggestions, and follow-up details.

Audit Log Tab

A paginated table of audit events from researchPlan.auditLog (25 per page). Each row shows:

ColumnContent
EventColor-coded badge (step_started, step_completed, step_failed, plan_modified, user_reviewed, session_resumed, skill_started, skill_completed)
StepTruncated step ID
SessionTruncated Claude Code session ID
DataExpandable JSON details
TimeTimestamp

Component Structure

research-plans-content.tsx (list page)
  |-- plan-health-cards.tsx (5 KPI cards)
  |-- Paginated plans table with links to detail

research-plan-detail.tsx (detail page)
  |-- PlanOverviewCards (5 status/progress cards)
  |-- PlanSkillExecutionCard (linked skill execution)
  |-- Tabs
      |-- plan-steps-table.tsx (expandable)
      |-- plan-artifacts-table.tsx (paginated, expandable)
      |-- plan-extractions-table.tsx (paginated, expandable)
      |-- plan-branching-conditions-table.tsx
      |-- plan-tool-call-log-table.tsx (paginated, expandable)
      |-- plan-outputs-table.tsx (paginated, expandable)
      |-- plan-feedback-table.tsx (expandable)
      |-- plan-audit-log-table.tsx (paginated)

On this page