Every Fortran unit analyzed by ForTriage is assigned a risk tier based on a numeric Score computed by Forti4D. The tier determines display color, sort order, and priority in AI Insights recommendations. Understanding how tiers map to modernization actions is essential for interpreting the Overview dashboard, the Drill-down view, and the AI-generated summaries.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 Five Tiers
ForTriage surfaces five tiers in canonical priority order. Each tier carries a distinct color used consistently across summary cards, bar charts, table badges, and the Drill-down modal.| Tier | Color | Hex | Meaning | Recommended Action |
|---|---|---|---|---|
| CRITICAL | 🔴 Red | #D64545 | Highest composite risk score. Likely a core knot (high CC × high Fan-In) or a unit with severe legacy constructs. | Immediate attention required — address before any modernization sprint begins. |
| HIGH | 🟠 Orange | #E8874A | Significant risk — high complexity, high coupling, or extensive legacy constructs. | Address in the next modernization sprint. |
| MEDIUM | 🟡 Yellow | #E8C547 | Moderate risk — notable issues but not blocking other work. | Schedule for refactoring; deprioritize relative to CRITICAL and HIGH. |
| LOW | 🔵 Blue | #5B9BD5 | Low risk — minimal complexity and coupling concerns. | Monitor; deprioritize until higher-tier units are resolved. |
| DEAD_CODE | ⬜ Grey | #9AA5B1 | Unit is unreachable from any entry point — never called in a known execution path. | Verify with domain experts, then eliminate if confirmed unused. |
TIER_ORDER in config.py defines the canonical list: ["CRITICAL", "HIGH", "MEDIUM", "LOW", "DEAD_CODE"]. This ordering governs chart axis domains, table sort defaults, and the AI Insights context sent to the model.Reachability Status
In addition to a risk tier, every unit carries a Reachability Status badge visible in the Overview table and the Drill-down header. Three statuses exist:| Status | Color | Hex | Meaning |
|---|---|---|---|
| REACHABLE | 🔵 Blue | #5B9BD5 | Unit is reachable from at least one entry point in the call graph. |
| UNREACHABLE | 🔴 Red | #D64545 | Unit has no calling path from any entry point — likely dead code. |
| ENTRY_POINT | 🟠 Orange | #E8874A | Unit is itself an entry point to the call graph (e.g. a program unit or exported interface). |
Score
Each unit has a numeric Score visible in the Overview table header column and the Drill-down metric bar. Score is the primary sort key for the prioritization report. Score is computed by Forti4D’s cross-analysis step, combining multiple signals:- CC — Cyclomatic Complexity (branching complexity within the unit)
- Fan_In — number of callers (how many other units depend on this one)
- Fan_Out — number of callees (how many units this one depends on)
- Pct_Legacy — percentage of legacy constructs (COMMON blocks, EQUIVALENCE, implicit typing, etc.)
- N_Common_Blocks — count of COMMON block references
- Clone status — whether the unit is a known duplicate
- Reachability — whether the unit is reachable from an entry point
Migration Strategies
Forti4D assigns a Strategy per unit, visible in the Report Explorer and Overview table. Strategies represent recommended modernization actions computed by Forti4D’s cross-analysis:ELIMINATE
ELIMINATE
Remove this unit from the codebase entirely. Typically assigned to UNREACHABLE units with no callers. Verify with domain experts before deleting — some entry points may not be visible to static analysis.
ANALYZE_UTILITY
ANALYZE_UTILITY
Needs deeper investigation before a migration decision can be made. Usually assigned to units with ambiguous coupling or undetermined reachability.
DIRECT_MIGRATION
DIRECT_MIGRATION
Can be migrated as-is to modern Fortran with minimal structural changes. Typically low CC, low coupling, and few legacy constructs.
REPLACE_LIB
REPLACE_LIB
Replace with an equivalent standard library call (e.g., LAPACK, BLAS, or a modern intrinsic). Typically assigned to units reimplementing well-known algorithms.
REFACTOR_CORE
REFACTOR_CORE
Significant refactoring needed before migration. Typically assigned to units with high CC or deep COMMON block entanglement.
REWRITE_ISOLATED
REWRITE_ISOLATED
Rewrite from scratch. The unit is isolated enough (low Fan-In) that rewriting is safer than incremental refactoring.
STANDARD_MIGRATION
STANDARD_MIGRATION
Standard modernization path — update syntax and constructs to modern Fortran without structural redesign.