Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/acdeveloper-sci/fortriage/llms.txt

Use this file to discover all available pages before exploring further.

The AI Insights tab automatically generates an executive summary of every analysis run using Google Gemini. It converts raw prioritization data into plain-language findings, key risks, and recommended actions — then lets you ask follow-up questions in a chat interface. All other tabs in ForTriage work fully without AI Insights; this tab is the only feature that requires an external API connection.
AI Insights requires a Gemini API key configured in .streamlit/secrets.toml under the key GEMINI_API_KEY. The rest of the dashboard operates completely without it. See AI Setup for configuration instructions.

Auto-Generation

AI Insights runs automatically at the end of every successful analysis — there is no button to trigger it manually. The generation happens immediately after the Forti4D pipeline completes, while the spinner labeled Generating AI Insights... is still shown in the Overview tab. If generation fails for any reason (network error, rate limit, invalid or missing API key, malformed response), the tab displays a generic error message and a Retry button. Clicking Retry re-runs the generation against the existing pipeline result without requiring a new analysis run.
AI-generated content reflects statistical patterns in the analysis data, not deep semantic understanding of your Fortran code. Always verify findings against the underlying reports in the Report Explorer and Drill-down tabs before making migration decisions.

KPI Row

Five KPI cards are displayed at the top of the AI Insights tab. These values are computed deterministically from the analysis data — not by the language model:
CardSourceDescription
Units analyzedunits_analyzedTotal number of program units in the corpus
Legacy code (avg)legacy_pct_avgMean Pct_Legacy across all units, formatted as a percentage
Dead code unitsdead_code_unitsCount of units with Reachability_Status = UNREACHABLE
Critical risk unitscritical_risk_unitsCount of units with Priority = CRITICAL
Direct migration candidatesdirect_migration_candidatesCount of units with Strategy = DIRECT_MIGRATION and Reachability_Status ≠ UNREACHABLE
“Direct migration candidates” intentionally excludes UNREACHABLE units even if Forti4D assigned them a DIRECT_MIGRATION strategy. Because Strategy is computed before reachability analysis, an unreachable unit with that strategy is better treated as an elimination candidate than a migration target.

Summary Sections

Below the KPI row, the Gemini-generated summary is rendered in three sub-sections:

Overview

Two or three declarative sentences describing the overall health of the corpus — tier distribution, dominant risk patterns, and general migration outlook.

Key Risks

A bulleted list of specific, data-grounded risks identified in the prioritization results — such as high-CC core knots, widespread COMMON block coupling, or a large proportion of CRITICAL-tier units.

Recommended Actions

One to three prioritized, numbered modernization steps tailored to the actual findings from this run.

Follow-up Chat

After insights are generated, a chat input appears below the summary sections. You can ask follow-up questions about the analysis results in plain language.

Example Questions

Why is this module classified as CRITICAL?
What should we refactor first?
Which components are migration blockers?
Explain this risk to a project manager.
Compare these two risky modules.

Chat Context

Every message is sent with the full analysis context attached:
  • The prioritization data (tiers, scores, strategies, reachability)
  • The Executive Summary text from PROJECT_SUMMARY.md
  • Drilldown metrics for the top 15 units by Score — detailed per-unit data including CC, Fan-In, Fan-Out, Pct_Legacy, and reachability
  • The AI Insights summary text itself (Overview, Key Risks, Recommended Actions)
This context is assembled once per run and reused for the entire chat session — no new analysis is triggered by a chat message.
AI Insights and the follow-up chat send aggregated metrics (not raw Fortran source code) to Google’s Gemini API. However, those metrics include unit names, file names, complexity scores, and strategy classifications derived from your codebase. Review AI Privacy before using this feature on a confidential or proprietary codebase.

For setup instructions, see AI Setup. For data handling details, see AI Privacy.

Build docs developers (and LLMs) love