Afunana
Afunana Documentation

Executive Summary

The business case for documenting and de-risking your IBM i estate.

← All docs

The Challenge

IBM i, mainframe, and Oracle systems run critical business operations at thousands of enterprises worldwide. These systems work — but the people who built them are leaving. Retirements, attrition, and decades of undocumented changes have created a knowledge gap that grows every year.

The consequences are measurable: longer change cycles, failed audits, stalled modernization projects, and production incidents caused by changes to code nobody fully understands. Manual documentation efforts are expensive, slow, and outdated before they finish.

The Solution

Afunana is an on-premise AI platform that reads the source code running your business — COBOL, RPG, CL, DDS, SQL, and PL/SQL — and reconstructs the knowledge inside it automatically. It connects to your IBM i or Oracle system, extracts the source, and builds a persistent, queryable knowledge graph of how every program, file, and field connects. On top of that graph it generates business-level documentation, an AI assistant that cites the exact source line behind every answer, a layer that detects hidden defects, and a workflow that can plan and — under human approval — apply a change back to the live system.

This is the important distinction: Afunana is not a chat window over a context window. A general AI model can explain a snippet shown to it; it does not maintain a cross-referenced map of an entire system, kept current as the system changes. That map is the asset.

Afunana works across the enterprise platforms and languages that run core operations: IBM i (AS/400) (COBOL, RPG, CL, DDS), Oracle (PL/SQL), and plain SQL — all supported and extracted into the same knowledge graph — with IBM z/OS mainframe on the near-term roadmap using the same approach.

Business Value

Risk reduction. Every undocumented program is a liability. Afunana documents your entire codebase systematically, eliminating single points of knowledge failure. When a senior developer leaves, their knowledge stays — captured from the code itself, including the business rules and intent that usually live only in an expert's memory.

Catches the costliest defects before they ship. Some bugs never throw an error — a caller and callee that disagree about a parameter's size, a move that silently truncates an amount, an unhandled file status. They pass every test until real data triggers them, and in financial systems they corrupt amounts or account numbers silently. Afunana finds these structurally, before they reach production.

Time savings. Most maintenance time goes into reading and understanding existing code. Afunana's AI chat, call trees, and multi-level documentation shorten that — a developer can understand an unfamiliar program without reading it line by line, and new team members ramp up faster.

Compliance readiness. SOC 2, ISO 27001, and regulatory audits require documentation of system behavior, data handling, and access controls. Afunana generates audit-ready documents with full field lineage and processing logic, backed by a tamper-evident audit trail, exportable to DOCX and PDF.

What You Get

Structured documentation. Three levels per program — business specification, systems analysis, and program specification — plus a system-wide architecture narrative and a data dictionary with field lineage.

Intelligent, cited search. AI chat powered by hybrid retrieval (vector + keyword) lets any authorized team member ask questions about the codebase in plain language and get answers grounded in the actual source, every claim linked to the line it came from.

Silent-failure detection. Deterministic, no-error-message defect checks: cross-program parameter and byte-size mismatches, data-truncating moves, unhandled I/O status, unsafe control flow, and (for Oracle) swallowed exceptions, DML without a WHERE clause, and dynamic-SQL injection.

Change planning and optional execution. Validated, step-by-step modification plans grounded in the live codebase — and the option to write the approved change back to the system in its own coding style, through an approval-gated workflow.

Interactive visualizations. Call trees, business-logic flowcharts, sequence diagrams, data-flow diagrams, ERDs, and field-lineage maps — generated automatically, navigable in the browser.

Bring Your Own Documents. Fold your existing specs, manuals, and analysts' notes into the same searchable, cited knowledge base.

Cost metering. Every build and query is metered per model call — token usage priced against rates held in the database — and the running spend is surfaced in a Costs view, so AI cost stays visible per collection and per role instead of arriving as a surprise cloud bill.

Integrations. An authenticated MCP server so AI tools (Claude, Cursor, Copilot, claude.ai) can query the codebase, and a VS Code extension for in-editor documentation, chat, and source editing.

Flexible infrastructure. Runs on Docker or Podman, with the bundled SQL Server 2022 container or a customer-supplied external SQL Server, and the built-in Caddy proxy or your own managed reverse proxy. LLM routing is configurable per role across Anthropic, OpenAI, Azure OpenAI, and Ollama, with admin-selectable model presets and an advisor that flags when a newer model is worth adopting.

One AI Hub — no single-vendor bet

Every model call routes through a single governed gateway. The organization controls cost, access, and data; each role (documentation, chat, code generation, and so on) has a primary provider and automatic fallbacks; and switching providers or models is a configuration change, not a rebuild. A disruption to any one model provider becomes a setting to adjust, not a business-continuity event — directly answering the vendor-lock-in risk that enterprise buyers raise.

Deployment and Security

Afunana runs entirely on your infrastructure. There is no SaaS component and no data-exfiltration risk.

Attribute Detail
Deployment On-premise, single Docker/Podman command
Installation A single one-line installer command run on the host
Supported OS RHEL, AlmaLinux, Rocky Linux, Ubuntu, Debian
Data residency All data stays on your servers; embeddings computed locally
Authentication SSO/OIDC (Azure AD, Okta, Google, generic), local accounts, role-based access across four roles — admin, user, read-only viewer, and a read-only qa review role
Audit trails Tamper-evident SHA-256 hash chain, database-enforced immutability, SIEM forwarding
Air-gapped option Local Ollama model + offline install tar; no internet required
Compliance Controls mapped to OWASP Top 10, ISO/IEC 27001:2022, and SOC 2 (formal certification in progress)

No source code or analysis results leave your environment unless you explicitly configure a cloud LLM provider.

What changes

Afunana turns undocumented, hard-to-read source into a documented, searchable, navigable asset:

Afunana converts your legacy code from a liability into a documented, searchable, navigable asset — and keeps it that way.