legacy-code-analysislisted
Install: claude install-skill YarlisAISolutions/yarlis-modernization
# Legacy code analysis
Produce a knowledge base about an existing system that later documents (BRD, FRD, SRD) and migration
designs can cite. Every claim it makes must point to the source (`path:line`), because requirements
recovered from code are only trusted when someone can check them.
## Outputs (default `docs/analysis/`, next to the requirements docs)
| File | Made by | Contents |
|---|---|---|
| `inventory.json` | script | Everything below in machine-readable form (re-used by `slice`, `domains`, and the modernization mapping) |
| `inventory.md` | script | Counts, entry points (transactions, jobs), program table, unresolved references |
| `callgraph.mmd` | script | Mermaid graph: transaction/job → program → XCTL/LINK/CALL |
| `crud-matrix.md` | script | Program × table/file/dataset with C/R/U/D |
| `data-dictionary.md` | script | DB2 tables (DDL/DCLGEN) and copybook layouts with suggested DB2/Java types |
| `screens.md` | script | BMS maps: fields, role (input/output/label), position, length, attributes |
| `batch-flows.md` | script | One Mermaid flow per JCL job: steps, programs, datasets |
| `programs/<PGM>.md` | script | Program card: callers, callees, data, screens, paragraphs + PERFORM tree, 88-levels, messages, line evidence |
| `domains.md` | script (`domains`) | Candidate business domains (clusters of programs sharing data) |
| `schema-diff.md` | script (`schema-diff`) | Tables, columns, keys and indexes changed between two git refs, the programs that use them