Legacy Migration Prompts - md file

Analyze legacy application source code, extract modules, features, validations, and domain services, and produce FlexBase-ready Markdown and JSON.

How to Use

Point your AI agent at the legacy project folder. It will auto-detect the platform, load the appropriate analysis patterns, and extract all migration artifacts.

Example prompts you can give your AI agent:

Migrate this legacy application to FlexBase
Analyze this legacy codebase and extract all modules and features
Migrate this PowerBuilder application to FlexBase
Migrate this legacy application to FlexBase — extract stored procedures and triggers too
Convert this Java Spring Boot application to FlexBase

Key Rules (Applied Automatically)

The agent loads migration conventions via MCP tools. Key rules:

  • All names PascalCase — modules, features, validations, events, subscribers, domain services

  • Module names PLURAL (e.g., Orders, Customers, Payments — NOT OrderManagement)

  • Feature names operation-centric (e.g., CreateOrder, UpdateOrder, GetOrderById)

  • All description fields ≤150 characters

  • Domain entities include metadata.originalName — lowercase original table/source name

  • Events include conditionsOnSuccess (primary) or OnFailed (primary)

  • Large files split automatically — per-module Markdown and JSON files


Supported Platforms

The agent auto-detects the legacy platform from project file signatures:

Platform
Detection

PowerBuilder

.pbl, .pbt, .pbproj files

.NET (C#/VB.NET)

.csproj, .sln, .vbproj files

Java / Spring

pom.xml, build.gradle files

Python / Django/Flask

manage.py, requirements.txt files

PHP / Laravel/Symfony

composer.json, artisan files

Ruby on Rails

Gemfile, config/routes.rb files

JavaScript / Node.js

package.json with Express/Nest markers

After detection, the agent reports the detected platform, UI framework, and analysis strategy.


Extraction Modes

With Database Access (Recommended):

  • Agent auto-discovers database connection from config files

  • Complete entity definitions with FK relationships and column metadata

  • FK chain analysis discovers junction tables and lookups

Without Database Access (Artifact-Only):

  • Extracts from source code artifacts only

  • Flags potential gaps for user review


Prompts

The extraction prompts are organized into dedicated files:

File
Contents

Markdown extraction (modules, features, events, domain services)

PB format detection & reading

SP/trigger extraction and mapping


  1. Auto-detect the legacy platform (automatic)

  2. Extract to Markdown first (review & refine)

  3. Generate JSON from reviewed extraction

  4. Import JSON into FlexBase Studio


Last updated