> For the complete documentation index, see [llms.txt](https://docs.flexbase.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flexbase.in/flexbase-mcp-ai-prompts.md).

# Flexbase MCP AI Prompts

This directory contains ready-to-use prompt templates for working with FlexBase applications through the **FlexBase MCP Server** (Model Context Protocol). Copy any prompt into your AI agent (GitHub Copilot, Cursor, etc.) and replace placeholders with your values.

## Prerequisites

Your AI agent must have the **FlexBase MCP server** configured. The MCP server provides guides, conventions, and prompt templates that the agent loads automatically when processing your requests.

## How to Use

1. Pick the prompt guide that matches your task
2. Copy the relevant prompt from the guide
3. Replace placeholders (`[EntityName]`, `[ModuleName]`, `@[BRD_FILE].md`) with your values
4. Paste into your AI agent — the MCP tools load all patterns and conventions automatically

**Or, use the agent orchestration tool:**

* Just tell your AI agent what you want (e.g., "analyze this BRD", "complete the implementation")
* The agent auto-detects the workflow and drives the pipeline

## Index

### 0. Agent Orchestration — Start Here (Easiest Way)

* [**Agent Orchestration**](/flexbase-mcp-ai-prompts/agent-orchestration-prompts.md) — Tell the agent what you want and it orchestrates the entire pipeline. Auto-detects extraction vs implementation, entry point (Legacy/BRD/New App), and drives all tasks autonomously. Includes stored procedure extraction, DataStore/Provider integration, and workflow state extraction.

### 1. Implementation Completion (Post Code-Generation)

* [**Implementation Completion**](/flexbase-mcp-ai-prompts/implementation-completion-prompts.md) — Complete API business logic and generate UI pages after FlexBase Studio code generation, driven by extraction JSON/Markdown artifacts — works for **all entry points** (Legacy Migration, BRD Extraction, New Application).

### 1a. Domain Original Names (Standalone — Optional)

* [**Domain Original Names**](/flexbase-mcp-ai-prompts/domain-original-names-prompts.md) — Apply `[Table]` and `[Column]` EF Core annotations to domain models for legacy database compatibility. Standalone prompt — run independently at any time.

### 2. API Development

* [**FlexBase API Patterns**](/flexbase-mcp-ai-prompts/flexbase-api-guide-prompts.md) — DTOs, mappers, queries, handlers, providers, workflow states, concurrency, DataStore/Provider integration.
* [**HIPAA Compliance**](/flexbase-mcp-ai-prompts/hipaa-compliance-prompts.md) — HIPAA applicability review, PHI touchpoint analysis, minimum-necessary access, auditability, disclosure control, and remediation planning using FlexBase standards.

### 3. UI Framework Guides

* [**Blazor FluentUI Patterns**](/flexbase-mcp-ai-prompts/blazor-fluent-ui-guide-prompts.md) — FluentUI Blazor v4.x pages, dialogs, REST clients, design system, module generation.
* [**Angular UI Patterns**](/flexbase-mcp-ai-prompts/angular-ui-guide-prompts.md) — Angular services, components, forms, auth, routing.
* [**React UI Patterns**](/flexbase-mcp-ai-prompts/react-js-ui-guide-prompts.md) — React hooks, services, forms, auth, routing.

### 4. Legacy Application Migration

* [**Legacy Migration → Markdown**](/flexbase-mcp-ai-prompts/legacy-migration-prompts-md-file.md) — Analyze legacy code and extract to Markdown (supports all platforms including PowerBuilder/4GL).
* [**Legacy Migration → JSON**](/flexbase-mcp-ai-prompts/legacy-migration-prompts-json-file.md) — Generate FlexBase JSON from legacy applications.
* [**PowerBuilder Project Analysis**](/flexbase-mcp-ai-prompts/legacy-migration-pb-analysis-prompts.md) — Auto-detect PB project format and read source files.
* [**Stored Procedure & Trigger Extraction**](/flexbase-mcp-ai-prompts/legacy-migration-stored-procedures-prompts.md) — Extract and map stored procedures, triggers, and embedded SQL from databases.

### 5. Business Requirements Extraction

* [**BRD Extraction → Markdown**](/flexbase-mcp-ai-prompts/brd-extraction-prompts-md-file.md) — Extract modules, features, validations, events from BRDs to Markdown.
* [**BRD Extraction → JSON**](/flexbase-mcp-ai-prompts/brd-extraction-prompts-json-file.md) — Generate FlexBase JSON import files from BRDs.

### 6. New Application Development

* [**New Application → Markdown**](/flexbase-mcp-ai-prompts/new-application-add-moduels-features-to-existing-application-prompts-md-file.md) — Design new applications using DDD principles.
* [**New Application → JSON**](/flexbase-mcp-ai-prompts/new-application-add-moduels-features-to-existing-application-prompts-json-file.md) — Generate FlexBase JSON for new applications.

### 7. Project Estimation

* [**Estimation Prompts**](/flexbase-mcp-ai-prompts/estimation-prompts.md) — Generate detailed per-module, per-feature project estimates with complexity classification (Simple/Medium/Complex/Very Complex), API + UI split, unit test and manual test case effort, delivery phasing, and output as Markdown, Excel, or HTML.

**Available guide (loaded automatically by MCP when you use the prompts below):**

* **Estimation Guide** (`getGuideSection("estimation", ...)`) — Complexity tiers, hour benchmarks per operation type, UI page estimation with/without wireframes, testing formulas, phase-based delivery grouping, real project benchmarks (SSW 25 modules, KG 13 modules)

### 8. Manual Test Case Generation (QA)

* [**Test Cases Prompts**](/flexbase-mcp-ai-prompts/test-cases-prompts.md) — All module-based, page-based, Excel workbook, and Postman collection prompt templates for manual test case generation.

Generate comprehensive manual test cases from **any requirement source** — BRDs, extraction JSON/Markdown, legacy application artifacts, or design documents. Test cases are organized by FlexBase modules and features, with concrete sample data, assumptions, and expected results that a manual QA tester can execute.

**Available guides (loaded automatically by MCP when you use the prompts below):**

* **Manual Test Case Guide** (`getGuideSection("manual-test-cases", ...)`) — Core test case structure, categories per operation type, organization modes
* **Postman Collection Guide** (`getGuideSection("postman-collection", ...)`) — Generate Postman v2.1 collections with test scripts, pre-request scripts, Newman CI/CD integration
* **Excel Workbook Guide** (`getGuideSection("excel-test-workbook", ...)`) — Generate Excel workbooks with priority colors, status dropdowns, per-module sheets
* **Conventions** (`getCodeConventions("manual-test-case")`) — Naming rules, field validation derivation, styling rules

**Quick prompts — copy, replace placeholders, paste into your AI agent:**

#### From a BRD or Requirement Document

```
Analyze this BRD and generate manual test cases organized by module with concrete sample data, assumptions, and expected results for each feature

@[BRD_FILE].md
```

```
Generate manual test cases for the [ModuleName] module from this requirements document. Include positive, negative, boundary, and validation test cases for every feature

@[REQUIREMENTS_FILE].md
```

#### From FlexBase Extraction JSON

```
Parse this FlexBase extraction JSON and generate manual test cases for every feature. Derive field validations from domainServices attributes (required, maxLength, type). Include sample test data for every field

@[PROJECT]_Import.json
```

```
Generate manual test cases for the [ModuleName] module from this extraction JSON. Cover all features including events, subscribers, and workflow state transitions

@[PROJECT]_[ModuleName]_Features.json
```

#### From FlexBase Extraction Markdown

```
Parse this FlexBase extraction Markdown and generate manual test cases for all modules. Use entity attribute tables to derive field validation tests and sample data

@[PROJECT]_Summary.md
```

```
Generate manual test cases from this per-module extraction Markdown. Include cross-module integration tests for any subscriber chains

@[PROJECT]_[ModuleName].md
```

#### From Legacy Application Analysis

```
Analyze this legacy application output and generate manual test cases including data migration verification, trigger-to-subscriber mapping tests, and screen equivalence tests

@[LEGACY_ANALYSIS_FILE].md
```

```
Generate manual test cases from this legacy database schema. Map each table to a module, each CRUD operation to a feature, and each trigger to a subscriber test case

@[DATABASE_SCHEMA].sql
```

#### Single Feature — Quick

```
Generate all manual test cases for the [FeatureName] feature in the [ModuleName] module.
Operation type: [CREATE/UPDATE/DELETE/GETBYID/GETPAGEDLIST]
Entity fields: [Field1] (string, max 100, required), [Field2] (int, required), [Field3] (datetime, optional)
Validations: [Validation1 description], [Validation2 description]
Events: [EventName] → Subscribers: [Subscriber1], [Subscriber2]
```

#### Gap Analysis — Review Existing Test Cases

```
Review these test cases against the source requirements and identify gaps — missing test categories, uncovered validations, missing event/subscriber tests, and placeholder data that needs concrete values

Requirements: @[REQUIREMENTS_FILE].md
Test Cases: @[TESTCASES_FILE].md
```

#### Complete Module Test Suite

```
Generate a complete manual test suite for the [ModuleName] module from this extraction. Output:
1. Summary file with test distribution and global assumptions
2. Test cases for every feature (CREATE, UPDATE, DELETE, GET, GETPAGEDLIST)
3. Cross-module integration tests for events/subscribers
4. Reference data setup needed before testing

@[PROJECT]_Import.json
```

**What gets generated:**

* Test case ID convention: `TC-[MODULE]-[FEATURE]-[NNN]` (module-based) or `TC-PAGE-[GROUP]-[NNN]` (page-based)
* Priority levels: P0 (Critical), P1 (High), P2 (Medium), P3 (Low)
* Every test includes: preconditions, assumptions, sample data table, steps, expected results
* Minimum test counts: CREATE (14), UPDATE (10), DELETE (7), GETBYID (6), GETPAGEDLIST (9)
* Validation tests always in pass/fail pairs
* Event and subscriber verification tests
* Workflow state transition tests (valid + invalid)
* Files split per module when output is large
* **Output formats:** Markdown files (default) or Excel workbook (.xlsx) with priority colors, status dropdowns, and per-module sheets

#### Page-Based Test Cases (UI / UX Perspective)

```
Analyze this page inventory and generate page-based test cases organized by page group (PublicCMS, BookingFlow, GuestAccount, AdminCalendar, etc.) with responsive and accessibility checks

@[PAGE_INVENTORY_OR_ESTIMATION_DOC].md
```

```
Generate page-based test cases for the [GroupName] page group. Include page load, user interaction, responsive layout (375px / 768px / 1200px+), and accessibility (tab order, ARIA labels, contrast) checks

@[UI_DESIGNS_OR_WIREFRAMES].md
```

```
Generate both module-based test cases (by API feature) AND page-based test cases (by UI page) from this BRD. Output separate file sets for each perspective

@[BRD_FILE].md
```

#### Excel Workbook Output

```
Analyze this BRD and generate an Excel workbook (.xlsx) with all manual test cases organized by module — include priority colors (P0=red, P1=yellow, P2=green, P3=grey), frozen headers, auto-filters, and status dropdown columns

@[BRD_FILE].md
```

```
Generate a Node.js ExcelJS script that parses all Markdown test case files in TestCases/ and produces a multi-sheet Excel workbook with per-module sheets, priority colors, status dropdowns, and a summary sheet

@TestCases/
```

```
Convert these existing Markdown test case files to an Excel workbook with frozen headers, color-coded priorities, status tracking dropdowns, and per-module sheets

@[PROJECT]_TestCases_*.md
```

#### Markdown → Excel Conversion (Existing Test Cases)

```
Parse all page-based test case files in PageTestCases/ and produce an Excel workbook with per-page-group sheets, responsive/accessibility columns, and a summary sheet

@PageTestCases/
```

```
Generate a combined Excel workbook with both module-based tests (from TestCases/) and page-based tests (from PageTestCases/) on separate sheet groups, plus a unified summary sheet

@TestCases/ @PageTestCases/
```

#### Postman Collection Output (API Tests)

```
Generate a Postman Collection v2.1 JSON from these module test case Markdown files — map each test case to an HTTP request with test scripts asserting expected status codes and response bodies. Include environment file with baseUrl and auth token

@TestCases/
```

```
Analyze this BRD and generate a Postman collection with API test requests for every feature — include happy path, validation, boundary, and negative test cases with concrete sample data and test script assertions

@[BRD_FILE].md
```

```
Parse this FlexBase extraction JSON and generate a Postman collection with requests for every feature. Derive request bodies from domainServices attributes and test scripts from expected validation messages

@[PROJECT]_Import.json
```

```
Generate a Postman collection for the [ModuleName] module with requests for all features (CREATE, UPDATE, DELETE, GET, GETPAGEDLIST) including positive, negative, and boundary test cases. Include pre-request scripts for dynamic data and test scripts for assertions

@[PROJECT]_TestCases_[ModuleName].md
```

### 9. Endpoints Configuration & DevOps

* [**Endpoints Configuration and DevOps Prompts**](/flexbase-mcp-ai-prompts/endpoints-configuration-and-devops-prompts.md) — Configuration of API endpoints, environment setup, CI/CD pipelines, deployment strategies, and DevOps best practices for FlexBase applications.

## Related Documentation

* [Core Concepts](/core-concepts.md)
* [Solution Structure](https://github.com/sumeru-flexbase/flexbase-docs/blob/main/solution-structure/README.md)
* [Thinking in Flexbase](/thinking-in-flexbase.md)
