# Ibmi Sourceanalysis Playbook

> Analyze IBM i legacy source exports under SourceAnalysis_prod. Use when tracing RPG, RPGLE, CL, display files, DSPFD exports, file references, program dependencies, field impact, green-screen behavior, or IBM i source analysis in /home/hcantor/Projects.

- Skill: `hugocantor/ibmi-sourceanalysis-playbook` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add hugocantor/ibmi-sourceanalysis-playbook`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hugocantor/ibmi-sourceanalysis-playbook/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: hugocantor (https://skillmd.com/u/hugocantor)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/hugocantor/ibmi-sourceanalysis-playbook

---


# IBM i SourceAnalysis Playbook

## Purpose

Use this skill for read-only discovery and impact analysis over exported IBM i source, especially under `/home/hcantor/Projects/SourceAnalysis/SourceAnalysis_prod`.

## Observed SourceAnalysis Layout

The top-level folders under `SourceAnalysis_prod` are library-style exports. Do not assume every library has the same shape.

- `AI2` has a `source/` subfolder with RPGLE, CL, CLLE, and related source members. It also has `tables.sql`.
- `fedpgms` has a large `source/` subfolder with RPG, RPGLE, CLLE, SQLRPGLE, and other source artifacts.
- `PRGMSTD` has no `source/` subfolder; its RPG/RPGLE source members live directly in the `PRGMSTD` folder.
- `fedfiles` has table and logical-file metadata: `tables.sql`, `indexes.sql`, and `DSPFD_LOGICALS.txt`.
- `convfiles`, `SENTRY`, and `WSFILE001` have `tables.sql` and `DSPFD_LOGICALS.txt`.
- `WSLIBE001` has IBM i source-physical-file style subfolders: `qrpgsrc` and `qclsrc`, both containing program source.

When analyzing a library, first classify it as a source library, metadata library, or mixed library before searching for members.

## Workflow

1. Start by identifying the exact object, field, file, program, menu, or screen the user cares about.
2. Inspect the library layout before broad searching. Check for a `source/` subfolder, IBM i source-physical-file style folders such as `qrpgsrc` and `qclsrc`, root-level source members, and metadata files such as `tables.sql`, `indexes.sql`, and `DSPFD_LOGICALS.txt`. See [reference.md](reference.md).
3. For program impact, search `source/` subfolders, IBM i source folders such as `qrpgsrc` and `qclsrc`, and root-level source folders such as `PRGMSTD`.
4. For file, table, index, or logical-file impact, check the metadata libraries before interpreting program references.
5. For file or field impact, check:
   - RPG/RPGLE F-specs and SQL statements.
   - READ, CHAIN, WRITE, UPDATE, DELETE, EXCPT, and embedded SQL usage.
   - CALL, CALLB, bound module, and menu references.
   - Display-file fields and DSPFD exports when screen behavior matters.
6. If normal workspace search returns no results, assume exported or nested trees may be ignored. Use exact paths, narrower reads, or ask for permission before using unrestricted filesystem search.
7. Separate evidence from inference. Report which files were observed directly and what remains uncertain.

## Output Format

For impact analysis, return:

- Target: the object, field, file, or program analyzed.
- Evidence: source paths and relevant symbols or statements.
- Access pattern: reads, writes, updates, deletes, calls, display usage, or unknown.
- Dependency chain: upstream callers and downstream files/programs when found.
- Confidence: high, medium, or low, with the reason.

## Guardrails

- Do not edit exported production source unless the user explicitly asks.
- Do not treat generated exports as complete truth when a source member, DSPFD export, and SQL catalog artifact disagree; call out the mismatch.
- Prefer small, cited findings over large undifferentiated dumps.

