The Problem
Afunana is an enterprise platform that uses AI to automatically analyze, document, and make searchable the legacy COBOL, RPG, and CL codebases running on IBM i (AS/400) systems — without modifying any production code.
Organizations running IBM i systems face compounding risks:
- Knowledge loss — The developers who wrote these systems are retiring. Their knowledge leaves with them.
- Undocumented code — Decades of programs with no documentation, no architecture diagrams, no formal specifications. Changes are made by tribal knowledge.
- Change paralysis — Without understanding dependencies, any modification risks breaking interconnected systems.
- Compliance exposure — Regulatory frameworks (SOX, GDPR, ISO 27001, SOC 2) require documented controls over systems that process sensitive data.
- Modernization barriers — Every modernization initiative starts with "understand what we have." Without documentation, this phase alone can take months.
What Afunana Does
Afunana connects to your IBM i system, extracts all source code and metadata, and uses AI to produce complete documentation — automatically, in days rather than months.
Source Extraction
Connects directly to IBM i via JDBC. Extracts source members, call relationships, file structures, and field definitions automatically.
AI-Powered Documentation
Uses large language models (Claude, GPT-4) to generate three levels of documentation for every program:
| Level | Audience | Content |
|---|---|---|
| Business Specification | Stakeholders, auditors | What the program does in business terms |
| Systems Analysis | Analysts, PMs | Data flows, business rules, file usage |
| Program Specs | Developers | IO structures, call graphs, error handling, change impact |
System-Level Analysis
Generates a complete system overview: architecture narrative, module identification, call hierarchy and dependency graphs, data dictionary with field lineage, cross-reference and impact analysis, and risk identification (dead code, circular dependencies).
AI Chat Interface
Ask questions about your codebase in natural language. The chat uses hybrid RAG (semantic + full-text search) to find relevant programs and generates answers with line-level citations.
Interactive Visualizations
| Visualization | Description |
|---|---|
| Call Tree | Interactive expandable call hierarchy with lazy loading |
| Flowcharts | IPO model, business logic, data flow, sequence diagrams |
| Field Lineage | Trace any field across programs and files |
| ERD | File relationships and key structures |
| Cross-Reference | Impact analysis sorted by dependency count |
VS Code Extension
The Afunana VS Code extension brings AI-generated documentation directly into the IDE. Developers can view program analysis, look up field definitions by right-clicking, and navigate source code — all without leaving VS Code. Install via VSIX from the admin panel.
| Command | Description |
|---|---|
Afunana: Login | Authenticate with your server |
Afunana: Show Program | Display program documentation in sidebar |
Afunana: Lookup Field | Look up field definition and cross-system usage |
Afunana: Pop Out | Open docs in a full editor tab |
Afunana: Open Full App | Launch web app in browser for current program |
Business Value
| Area | Impact |
|---|---|
| Knowledge Preservation | Captures institutional knowledge in permanent, searchable documentation before it's lost to attrition |
| Onboarding Acceleration | New developers understand systems in days instead of months via self-service documentation |
| Change Confidence | Impact analysis shows exactly what breaks when you change a program, file, or field |
| Compliance Readiness | Generated documentation satisfies auditor requirements for system documentation and data flow mapping |
| Modernization Enablement | Complete dependency maps and business logic extraction — prerequisites for any migration |
| Risk Reduction | Dead code identification, circular dependency detection, and missing documentation flags |
ROI Indicators
- Manual documentation cost — Industry benchmarks: 2–5 days per program. For a 3,000-program system, that's 6,000–15,000 person-days. Afunana documents the same system in 2–5 days of automated processing.
- Knowledge loss cost — Replacing a senior IBM i developer costs $150K–$300K in recruitment, training, and lost productivity.
- Audit remediation — SOX/ISO findings related to undocumented systems typically cost $50K–$200K per finding.
Who Uses Afunana
| Role | Value |
|---|---|
| IT Management | Visibility into legacy systems, risk assessment, compliance documentation |
| Business Analysts | Understand what programs do without reading COBOL |
| Developers | Navigate unfamiliar code, understand impact of changes |
| QA Teams | Identify test coverage gaps, understand data flows |
| Auditors | Access complete system documentation with audit trails |
| Modernization Teams | Map dependencies before migration projects |
Technology Stack
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, Tailwind CSS, Shadcn UI |
| Backend | Python FastAPI, Uvicorn |
| Database | SQL Server 2022 (containerized or external) |
| AI / LLM | Anthropic Claude Sonnet 4.6 / Haiku 4.5, OpenAI GPT-4.1 / GPT-4.1-mini, Ollama (local models) |
| Search | ChromaDB (semantic), BM25 (full-text) |
| AS/400 | JDBC via jt400.jar (jaydebeapi) |
| Deployment | Docker Compose, Caddy reverse proxy |
| IDE | VS Code Extension (TypeScript) |
Deployment Model
Afunana runs on-premise inside your network. No data leaves your environment unless you choose cloud LLM providers. For air-gapped environments, local models via Ollama are supported.
curl -sL https://afunana.io/install.sh | bash
One-command installation on Linux (Ubuntu, Debian, AlmaLinux, Rocky, RHEL). The installer handles Docker, SQL Server, secrets generation, initial configuration, and admin user creation. The platform is self-contained — no ongoing vendor access is required after installation.
Getting Started
- Install — Run the one-line installer on a Linux server with 16GB+ RAM
- Connect — Configure your IBM i connection in the admin panel
- Extract — Submit an extraction job (30–60 minutes for a typical library)
- Build — Trigger AI analysis (1–4 hours depending on program count and LLM speed)
- Use — Browse documentation, ask questions, explore visualizations