posted an update

Add AI Routing, Analysis Upgrade Flow, and Visual Product Understanding

Overview

Introduced per-task AI routing, stale-analysis upgrade support, enhanced visual product understanding, and several UI and engine improvements.


AI Provider Routing

Added

  • normalizeAiProviderChoice
  • AiProviderChoice support across the application

Integrated Into

  • Scan API
  • Stream API
  • Component API
  • Prompt API
  • Story API

UI Updates

  • Added ProviderSelector component
  • Persist aiProviderChoice in analysis history records

Capabilities

  • Support for auto routing across configured AI models/providers
  • Consistent provider selection throughout analysis workflows

Analysis Upgrade Flow

New Endpoint

  • POST /api/analyze/upgrade

Purpose

Provides an upgrade path for older saved analyses that were generated before product-level understanding and story layers existed.

Client-Side Upgrade Process

  • Detect browser-recovered stale analyses
  • Run ensureAnalysisLayers
  • Regenerate missing:
    • Product-level Actual App Flow
    • Product-level Story Mode

Result

Older analyses automatically gain newer visualization and storytelling capabilities without requiring a full re-scan.


Analyzer Enhancements

Stream & Scan Updates

  • Accept aiProvider
  • Surface model and agent metadata

Timeline Improvements

  • Display model/agent information in stream events
  • Added micro-status badges in StreamTimeline

Product Understanding & Visualization

New Components

AppUnderstandingPanel

Provides high-level product understanding and business-oriented explanations.

RuntimeFlowVisual

Visualizes actual runtime application behavior and flow.

StoryThreeStage

Three.js-powered story visualization for human-focused product understanding.

ProviderSelector

Unified AI provider selection UI.


Story Mode Improvements

Updated Components

  • StoryModePanel
  • Scene renderer

Enhancements

  • Use structured visual specifications
  • Safer rendering pipeline
  • Better story visualization consistency

Dashboard Improvements

Result Dashboard

  • Added App Understanding section
  • Build display summaries from productSummary
  • Improved product-centric presentation

History Records

  • Persist selected AI provider
  • Support future re-analysis and upgrades

Analysis Engine Enhancements

New Libraries & Systems

Analysis Layer Management

  • ensureAnalysisLayers

Product Understanding

  • productSummary

Visual Planning

  • visualSpecPlanner

Folder Analysis

  • Parallel folder agents
  • Folder-specific analyzers

Flow Generation

  • Flow synthesizer

Safety Improvements

  • Safe JSON visual specifications
  • More reliable visual rendering pipeline

Outcome

These changes enable:

  • Automatic AI provider routing (auto mode)
  • Product-level application understanding
  • Human-friendly story generation
  • Safer visual rendering
  • Parallelized analysis workflows
  • Rich runtime flow visualization
  • Backward-compatible upgrades for older saved analyses

Log in or sign up for Devpost to join the conversation.