Skip to content

acn-cobol-modernization — Pipeline

The four skills compose into two pipelines that share a starting point.

flowchart LR
    Repo[(COBOL repo)] --> RE["re<br/>9-section deliverable"]
    RE --> Bugfix["bugfix<br/>diff + reproducer"]
    RE --> Docgen["docgen<br/>onboarding doc"]
    Bugfix -->|.patch| DV["deploy-validate<br/>EC2 + screens"]
    DV --> Report[(Deploy report)]
    Docgen --> Onboarding[(Onboarding doc)]

Both re and bugfix depend on caches the first invocation builds:

  • <repo>/.lineage/lineage.json — dependency graph (programs, copybooks, BMS, JCL, edges)
  • <repo>/.lineage/copybooks.json — copybook content index with field structure

Cache builders run via:

Terminal window
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/extract_lineage.py --repo <repo_path>
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/index_copybooks.py --repo <repo_path>

Caches refresh automatically when older than 1 day. The .lineage/ directory is meant to be gitignored.

Fix path: re → bugfix → deploy-validate

Section titled “Fix path: re → bugfix → deploy-validate”
  1. re BBANK10P — produces <repo>/.lineage/re-BBANK10P.md (the structured deliverable). Reading this surfaces business rules and code-quality observations that are prime suspects for any bug.
  2. bugfix BBANK10P --bug "GUEST auth bypass" — produces <repo>/.lineage/bugfix-BBANK10P.md plus <repo>/.lineage/bugfix-BBANK10P.patch. The .patch is git-applicable and ready for deployment.
  3. deploy-validate <repo> <repo>/.lineage/bugfix-BBANK10P.patch — applies the patch to a feature branch, deploys to the UniKix EC2 (direct SSH or GitHub Actions), runs validate-e2e.sh, captures before/after 3270 screens, produces a structured deploy report with PASS/FAIL/PARTIAL verdict.

Each stage’s output is the next stage’s input — no manual stitching.

  1. re BBANK10P — same as fix path
  2. docgen <repo>/.lineage/re-BBANK10P.md — produces <repo>/.lineage/re-BBANK10P-onboarding.md, restructured for new-developer onboarding (TL;DR, first-day checklist, glossary, FAQs). Migration-analysis sections are dropped.

Use this path when the COBOL program is already documented for migration but you also need a clean onboarding doc for new joiners on a maintenance team.

deploy-validate runs in one of four mode combinations:

direct-ssh transportactions transport
live capturersync + ssh + s3270. ~30-90s when SG allows :22.git push + gh workflow run + gh run watch + s3270. ~3-5 min. Use when SG locked.
code-only capturersync + ssh, skip 3270 capture.gh workflow run, skip 3270 capture.

Default: live for CardDemo (signon reachable), code-only for BankDemo (region wiring deferred). Override with --capture live or --capture code-only.

The actions transport is functionally identical to direct-ssh — both end up calling the same deploy-on-unikix.sh + validate-e2e.sh over SSH on EC2. The Actions runner authorizes its own IP, runs the scripts, then revokes its rule on cleanup.