atx-mainframe-bre-analyzer


Nameatx-mainframe-bre-analyzer JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryMCP server for analyzing ATX Business Rules Extraction (BRE) output and mainframe modernization planning
upload_time2025-09-02 19:42:45
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords mainframe bre business-rules-extraction mcp atx modernization analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AWS Transform for mainframe (ATX) - Mainframe BRE Analyzer

[![PyPI version](https://img.shields.io/pypi/v/atx-mainframe-bre-analyzer.svg)](https://pypi.org/project/atx-mainframe-bre-analyzer/)
[![PyPI Downloads](https://img.shields.io/pypi/dm/atx-mainframe-bre-analyzer.svg?label=PyPI%20downloads)](https://pypi.org/project/atx-mainframe-bre-analyzer/)
[![Python versions](https://img.shields.io/pypi/pyversions/atx-mainframe-bre-analyzer.svg)](https://pypi.org/project/atx-mainframe-bre-analyzer/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A comprehensive tool for analyzing ATX Business Rules Extraction (BRE) output as part of **[AWS Transform for mainframe (ATX)](https://aws.amazon.com/transform/mainframe/)** initiatives. Can be used as both an MCP server and a Python library.

## Overview

This tool extends the **[AWS Transform for mainframe (ATX)](https://aws.amazon.com/transform/mainframe/) analysis workflow** by providing advanced Business Rules Extraction analysis capabilities for mainframe applications. It works with the BRE output produced by the ATX analysis step to enable deeper insights into business logic and modernization planning.

### ATX Integration Workflow

```
ATX Analysis → BRE Output + Application/Component Analysis → ATX Mainframe BRE Analyzer → Business Rules Analysis
```

1. **ATX Analysis**: Analyzes your mainframe codebase and produces BRE output
2. **ATX Mainframe BRE Analyzer**: Uses the BRE analysis results for business rules exploration
3. **Business Rules Analysis**: Provides tools for business function mapping, component discovery, and modernization planning

## Features

- **Business Function Analysis**: Navigate business functions and their entry points
- **Component Mapping**: Map business functions to COBOL and JCL components  
- **Search and Discovery**: Find components by pattern or program name
- **BRE Overview**: Get comprehensive statistics about your business rules
- **Modernization Planning**: Support microservices architecture planning
- **Dual Usage**: Works as both MCP server and Python library

## Prerequisites

- **ATX Analysis**: Must be completed first to generate the BRE output
- **BRE Directories**: Application Level and Component Level BRE analysis results
- **Same Codebase**: Use the identical codebase that was analyzed by ATX

## Installation

### For MCP Server Usage
No installation needed! The MCP configuration with `uvx` will automatically download and run the package.

### For Python Library Usage
```bash
pip install atx-mainframe-bre-analyzer
```

## Quick Start

### Configuration

Set these environment variables to point to your ATX BRE analysis outputs:

```bash
export ATX_MF_APPLICATION_LEVEL_BRE="/path/to/application/level/bre"
export ATX_MF_COMPONENT_LEVEL_BRE="/path/to/component/level/bre"
```

### As MCP Server

```json
{
  "mcpServers": {
    "atx-mainframe-bre-analyzer": {
      "command": "uvx",
      "args": ["atx-mainframe-bre-analyzer"],
      "env": {
        "ATX_MF_APPLICATION_LEVEL_BRE": "/path/to/application/level/bre",
        "ATX_MF_COMPONENT_LEVEL_BRE": "/path/to/component/level/bre"
      }
    }
  }
}
```

### As Python Library

```python
from atx_mainframe_bre_analyzer.server import BRENavigator
import os

# Set environment variables
os.environ['ATX_MF_APPLICATION_LEVEL_BRE'] = "/path/to/application/level/bre"
os.environ['ATX_MF_COMPONENT_LEVEL_BRE'] = "/path/to/component/level/bre"

# Initialize and analyze
navigator = BRENavigator()
functions = navigator.get_business_functions()
components = navigator.get_all_component_files()
```

## Available Tools

### Business Function Analysis
- `list_business_functions` - List all business functions with entry points
- `get_business_function_details` - Get detailed information about a specific business function
- `get_business_function_rules` - Get comprehensive rule count and analysis for a business function
- `get_all_business_function_rule_counts` - Get rule counts for all business functions

### Component Discovery  
- `list_all_components` - List all COBOL and JCL component files
- `search_components` - Search for component files by pattern or program name
- `read_component_bre_content` - Read the complete content of a component BRE JSON file
- `get_component_rule_analysis` - Get detailed rule analysis for a specific component

### System Analysis
- `get_bre_overview` - Get complete BRE hierarchy overview with statistics

## Usage Examples

### Basic Analysis

```python
# Get all business functions
functions = navigator.get_business_functions()
print(f"Found {len(functions)} business functions")

# Get component overview
components = navigator.get_all_component_files()
print(f"COBOL: {len(components['cobol'])}, JCL: {len(components['jcl'])}")

# Search for specific components
results = navigator.search_components_by_pattern("COACT")
print(f"Found {len(results['cobol'])} COBOL matches")
```

### Rule Analysis

```python
# Get rule analysis for a specific component
rule_analysis = navigator.count_rules_in_bre_file(Path("component.json"))
print(f"Total rules: {rule_analysis['total_rules']}")
print(f"Business rules: {rule_analysis['business_rules']}")

# Get comprehensive rule analysis for a business function
function_rules = navigator.get_business_function_rule_count("AccountManagement")
print(f"Function rules: {function_rules['total_rules']}")
print(f"Components analyzed: {len(function_rules['components'])}")

# Read complete BRE content for a component
content = navigator.read_component_bre_file("PROGRAM1", "cbl")
if "error" not in content:
    print(f"File size: {content['file_size']} bytes")
    print(f"Data keys: {list(content['data'].keys())}")
```

### Business Function Discovery

```python
# Get details for a specific business function
for func in functions:
    if "Account" in func["name"]:
        print(f"Function: {func['name']}")
        print(f"Entry Points: {len(func['entry_points'])}")
        for ep in func['entry_points']:
            print(f"  - {ep['name']}: {ep['component_dependencies']}")
```

## ATX BRE Output Format

The BRE analysis is produced by the ATX analysis step and follows this structure:

**Application Level BRE:**
```
ApplicationLevelAnalysis/
├── BusinessFunction1/
│   ├── BusinessFunction1.json
│   ├── entrypoint-PROGRAM1/
│   └── entrypoint-PROGRAM2/
└── BusinessFunction2/
    └── ...
```

**Component Level BRE:**
```
ComponentLevelAnalysis/
├── cbl/
│   ├── PROGRAM1.json
│   └── PROGRAM2.json
└── jcl/
    ├── JOB1.json
    └── JOB2.json
```

**Note**: These directories are automatically generated by ATX analysis - you don't need to create them manually.

## AWS Transform Integration

This tool is designed to work seamlessly with [AWS Transform for mainframe (ATX)](https://aws.amazon.com/transform/mainframe/) workflows:

1. **Run ATX Analysis** on your mainframe codebase
2. **Use the BRE output** directories generated by ATX
3. **Launch this tool** (as MCP server or library) for business rules analysis
4. **Plan modernization** using business function insights
5. **Map to microservices** based on business logic boundaries

## License

MIT License - see LICENSE file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "atx-mainframe-bre-analyzer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "mainframe, bre, business-rules-extraction, mcp, atx, modernization, analysis",
    "author": null,
    "author_email": "Arunkumar Selvam <aruninfy123@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/db/a6/2964fd53258bcd8d0a377c9e2be16abc04ddf90dd66f5902e54f05bcf78b/atx_mainframe_bre_analyzer-0.2.0.tar.gz",
    "platform": null,
    "description": "# AWS Transform for mainframe (ATX) - Mainframe BRE Analyzer\n\n[![PyPI version](https://img.shields.io/pypi/v/atx-mainframe-bre-analyzer.svg)](https://pypi.org/project/atx-mainframe-bre-analyzer/)\n[![PyPI Downloads](https://img.shields.io/pypi/dm/atx-mainframe-bre-analyzer.svg?label=PyPI%20downloads)](https://pypi.org/project/atx-mainframe-bre-analyzer/)\n[![Python versions](https://img.shields.io/pypi/pyversions/atx-mainframe-bre-analyzer.svg)](https://pypi.org/project/atx-mainframe-bre-analyzer/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA comprehensive tool for analyzing ATX Business Rules Extraction (BRE) output as part of **[AWS Transform for mainframe (ATX)](https://aws.amazon.com/transform/mainframe/)** initiatives. Can be used as both an MCP server and a Python library.\n\n## Overview\n\nThis tool extends the **[AWS Transform for mainframe (ATX)](https://aws.amazon.com/transform/mainframe/) analysis workflow** by providing advanced Business Rules Extraction analysis capabilities for mainframe applications. It works with the BRE output produced by the ATX analysis step to enable deeper insights into business logic and modernization planning.\n\n### ATX Integration Workflow\n\n```\nATX Analysis \u2192 BRE Output + Application/Component Analysis \u2192 ATX Mainframe BRE Analyzer \u2192 Business Rules Analysis\n```\n\n1. **ATX Analysis**: Analyzes your mainframe codebase and produces BRE output\n2. **ATX Mainframe BRE Analyzer**: Uses the BRE analysis results for business rules exploration\n3. **Business Rules Analysis**: Provides tools for business function mapping, component discovery, and modernization planning\n\n## Features\n\n- **Business Function Analysis**: Navigate business functions and their entry points\n- **Component Mapping**: Map business functions to COBOL and JCL components  \n- **Search and Discovery**: Find components by pattern or program name\n- **BRE Overview**: Get comprehensive statistics about your business rules\n- **Modernization Planning**: Support microservices architecture planning\n- **Dual Usage**: Works as both MCP server and Python library\n\n## Prerequisites\n\n- **ATX Analysis**: Must be completed first to generate the BRE output\n- **BRE Directories**: Application Level and Component Level BRE analysis results\n- **Same Codebase**: Use the identical codebase that was analyzed by ATX\n\n## Installation\n\n### For MCP Server Usage\nNo installation needed! The MCP configuration with `uvx` will automatically download and run the package.\n\n### For Python Library Usage\n```bash\npip install atx-mainframe-bre-analyzer\n```\n\n## Quick Start\n\n### Configuration\n\nSet these environment variables to point to your ATX BRE analysis outputs:\n\n```bash\nexport ATX_MF_APPLICATION_LEVEL_BRE=\"/path/to/application/level/bre\"\nexport ATX_MF_COMPONENT_LEVEL_BRE=\"/path/to/component/level/bre\"\n```\n\n### As MCP Server\n\n```json\n{\n  \"mcpServers\": {\n    \"atx-mainframe-bre-analyzer\": {\n      \"command\": \"uvx\",\n      \"args\": [\"atx-mainframe-bre-analyzer\"],\n      \"env\": {\n        \"ATX_MF_APPLICATION_LEVEL_BRE\": \"/path/to/application/level/bre\",\n        \"ATX_MF_COMPONENT_LEVEL_BRE\": \"/path/to/component/level/bre\"\n      }\n    }\n  }\n}\n```\n\n### As Python Library\n\n```python\nfrom atx_mainframe_bre_analyzer.server import BRENavigator\nimport os\n\n# Set environment variables\nos.environ['ATX_MF_APPLICATION_LEVEL_BRE'] = \"/path/to/application/level/bre\"\nos.environ['ATX_MF_COMPONENT_LEVEL_BRE'] = \"/path/to/component/level/bre\"\n\n# Initialize and analyze\nnavigator = BRENavigator()\nfunctions = navigator.get_business_functions()\ncomponents = navigator.get_all_component_files()\n```\n\n## Available Tools\n\n### Business Function Analysis\n- `list_business_functions` - List all business functions with entry points\n- `get_business_function_details` - Get detailed information about a specific business function\n- `get_business_function_rules` - Get comprehensive rule count and analysis for a business function\n- `get_all_business_function_rule_counts` - Get rule counts for all business functions\n\n### Component Discovery  \n- `list_all_components` - List all COBOL and JCL component files\n- `search_components` - Search for component files by pattern or program name\n- `read_component_bre_content` - Read the complete content of a component BRE JSON file\n- `get_component_rule_analysis` - Get detailed rule analysis for a specific component\n\n### System Analysis\n- `get_bre_overview` - Get complete BRE hierarchy overview with statistics\n\n## Usage Examples\n\n### Basic Analysis\n\n```python\n# Get all business functions\nfunctions = navigator.get_business_functions()\nprint(f\"Found {len(functions)} business functions\")\n\n# Get component overview\ncomponents = navigator.get_all_component_files()\nprint(f\"COBOL: {len(components['cobol'])}, JCL: {len(components['jcl'])}\")\n\n# Search for specific components\nresults = navigator.search_components_by_pattern(\"COACT\")\nprint(f\"Found {len(results['cobol'])} COBOL matches\")\n```\n\n### Rule Analysis\n\n```python\n# Get rule analysis for a specific component\nrule_analysis = navigator.count_rules_in_bre_file(Path(\"component.json\"))\nprint(f\"Total rules: {rule_analysis['total_rules']}\")\nprint(f\"Business rules: {rule_analysis['business_rules']}\")\n\n# Get comprehensive rule analysis for a business function\nfunction_rules = navigator.get_business_function_rule_count(\"AccountManagement\")\nprint(f\"Function rules: {function_rules['total_rules']}\")\nprint(f\"Components analyzed: {len(function_rules['components'])}\")\n\n# Read complete BRE content for a component\ncontent = navigator.read_component_bre_file(\"PROGRAM1\", \"cbl\")\nif \"error\" not in content:\n    print(f\"File size: {content['file_size']} bytes\")\n    print(f\"Data keys: {list(content['data'].keys())}\")\n```\n\n### Business Function Discovery\n\n```python\n# Get details for a specific business function\nfor func in functions:\n    if \"Account\" in func[\"name\"]:\n        print(f\"Function: {func['name']}\")\n        print(f\"Entry Points: {len(func['entry_points'])}\")\n        for ep in func['entry_points']:\n            print(f\"  - {ep['name']}: {ep['component_dependencies']}\")\n```\n\n## ATX BRE Output Format\n\nThe BRE analysis is produced by the ATX analysis step and follows this structure:\n\n**Application Level BRE:**\n```\nApplicationLevelAnalysis/\n\u251c\u2500\u2500 BusinessFunction1/\n\u2502   \u251c\u2500\u2500 BusinessFunction1.json\n\u2502   \u251c\u2500\u2500 entrypoint-PROGRAM1/\n\u2502   \u2514\u2500\u2500 entrypoint-PROGRAM2/\n\u2514\u2500\u2500 BusinessFunction2/\n    \u2514\u2500\u2500 ...\n```\n\n**Component Level BRE:**\n```\nComponentLevelAnalysis/\n\u251c\u2500\u2500 cbl/\n\u2502   \u251c\u2500\u2500 PROGRAM1.json\n\u2502   \u2514\u2500\u2500 PROGRAM2.json\n\u2514\u2500\u2500 jcl/\n    \u251c\u2500\u2500 JOB1.json\n    \u2514\u2500\u2500 JOB2.json\n```\n\n**Note**: These directories are automatically generated by ATX analysis - you don't need to create them manually.\n\n## AWS Transform Integration\n\nThis tool is designed to work seamlessly with [AWS Transform for mainframe (ATX)](https://aws.amazon.com/transform/mainframe/) workflows:\n\n1. **Run ATX Analysis** on your mainframe codebase\n2. **Use the BRE output** directories generated by ATX\n3. **Launch this tool** (as MCP server or library) for business rules analysis\n4. **Plan modernization** using business function insights\n5. **Map to microservices** based on business logic boundaries\n\n## License\n\nMIT License - see LICENSE file for details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "MCP server for analyzing ATX Business Rules Extraction (BRE) output and mainframe modernization planning",
    "version": "0.2.0",
    "project_urls": {
        "Bug Reports": "https://github.com/arunkumars-mf/atx-mainframe-bre-analyzer/issues",
        "Homepage": "https://github.com/arunkumars-mf/atx-mainframe-bre-analyzer",
        "Source": "https://github.com/arunkumars-mf/atx-mainframe-bre-analyzer"
    },
    "split_keywords": [
        "mainframe",
        " bre",
        " business-rules-extraction",
        " mcp",
        " atx",
        " modernization",
        " analysis"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "36063cb4fee315c7c3c1590e6d6314c7fdee00fd644bb9c20ecf2739b76f3f00",
                "md5": "f38459f99b74f9e312b5f14508e26734",
                "sha256": "5ece69e49af4d0b40107727a0b710fd58d52c663147d4196b7a4611082622844"
            },
            "downloads": -1,
            "filename": "atx_mainframe_bre_analyzer-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f38459f99b74f9e312b5f14508e26734",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9583,
            "upload_time": "2025-09-02T19:42:44",
            "upload_time_iso_8601": "2025-09-02T19:42:44.736181Z",
            "url": "https://files.pythonhosted.org/packages/36/06/3cb4fee315c7c3c1590e6d6314c7fdee00fd644bb9c20ecf2739b76f3f00/atx_mainframe_bre_analyzer-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dba62964fd53258bcd8d0a377c9e2be16abc04ddf90dd66f5902e54f05bcf78b",
                "md5": "2461610a44d6d1075d81c5ebc5e2406b",
                "sha256": "a0260ff8975c6abc4b79ed8964883e56185367d95e9add2c5e914a2717fcd8eb"
            },
            "downloads": -1,
            "filename": "atx_mainframe_bre_analyzer-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2461610a44d6d1075d81c5ebc5e2406b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 11841,
            "upload_time": "2025-09-02T19:42:45",
            "upload_time_iso_8601": "2025-09-02T19:42:45.533888Z",
            "url": "https://files.pythonhosted.org/packages/db/a6/2964fd53258bcd8d0a377c9e2be16abc04ddf90dd66f5902e54f05bcf78b/atx_mainframe_bre_analyzer-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-02 19:42:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "arunkumars-mf",
    "github_project": "atx-mainframe-bre-analyzer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "atx-mainframe-bre-analyzer"
}
        
Elapsed time: 0.55360s