Start with the Overview tab, then explore the Source programs & EDI, Process requirements, Scenarios and Field requirements tabs. Source programs & EDI shows which legacy programs and EDI messages were read for each domain. Process requirements shows how the manifest is created, how it is published to CBP (EDI 309 and 353) and how a CBP response is processed, step by step. The Requirement matrix shows which fields each manifest type requires. Scenarios shows end-to-end flows built from the extracted rules, each with an interactive diagram and its validations: the waybill to manifest flow (a good waybill, or what is wrong with it) the CBP status response (a release, a hold, or something that cannot be applied) and the CBP acknowledgement (accepted, rejected or not matched). Field requirements holds the completed, verified business-requirement documents for all manifest fields (creation, publish and response). The Rule explorer tab is still in progress and is not yet complete.
Narrows the field list to the fields of one stage and shows which acceptance criteria of the field belong to it.
Pick a field first. The manifest types offered are the ones that field's rules use; most rules apply to every type ("common").
Pick a domain, then a field (e.g. GCX111 › Country Code), and optionally narrow the rules to one manifest type. Requirements are derived from the COBOL by depth-first walk.
Process Requirements Explorer
How the business process happens, step by step: who starts it, who acts (the user or the system), the decisions and the outcome. Every step rests on acceptance criteria that you can open in Field requirements.
Steps that do not apply to the selected type(s) are dimmed.
Loading the process data…
Overview: what this tool does
CPKC's customs system is old and its rules are buried in program code. We read that code and turned it into plain-language requirements in one tool. The BA team, the business, the technical SMEs, the dev team and QA can all review the same output here, without opening the COBOL code.
Where we focused: the US Cargo Manifest sent to US Customs (CBP). Other areas are mapped but not yet extracted.
Scenarios: end-to-end flows built from the extracted rules, with an interactive diagram and the validations of each step. Three so far: a waybill from billing to a manifest (good, or with something wrong), a CBP status answer, and a CBP acknowledgement; more will be added.
One tool, five audiences
Business
They can see how the manifest process works and what the rules are, in plain language.
- 142 manifest fields with their rules.
- A matrix of which fields each manifest type requires.
- Process views that walk through the flow step by step: how a manifest is created, and how a CBP response is processed.
- Open business questions flagged where the old behaviour is unclear, so they can make the decisions.
BA team
They get a ready starting point for requirements instead of reading code.
- 689 acceptance criteria, which are the testable “the system must do this” statements.
- Each criterion is traced to its source.
- The BAs review, correct and sign off the drafts with the business, and own the answers to the open questions.
Dev team
They can understand the system's behaviour without going to the BA each time.
- The process views show the order of steps, the decisions and the errors.
- The field documents give the rules, defaults and edge cases for each field.
- The open questions and the defect register show what is still undecided.
Technical SMEs
They can verify against the source in the same place.
- The Source programs & EDI tab shows every legacy program read, its call tree and what was extracted from it.
- It also shows the EDI messages (309, 350, 353, 355, 358) with their segments, elements and the fields they map to.
- The Rule explorer shows rules with the verbatim code.
QA
The same material is the starting point for test cases.
- Each acceptance criterion is a checkable condition.
- Each process path is a scenario: automated, manual, derived, a status received from CBP, and so on.
- Formal test cases are not yet a separate output.
How we kept it trustworthy
- Every statement cites the criterion it comes from.
- Drafts written by agents were checked by independent reviewers, fixed and re-checked.
- Where the old documents and the code disagree, it is labelled for the BA and the business to decide. We do not guess.
What we found along the way
- Legacy behaviour that looks wrong or unclear, logged as business questions and a defect register.
- No CBP response creates a new 309 manifest. What leaves the system after a response is the 353 arrival report, the waybill update, a partner copy and e-mails.
This is ongoing work. What is next in the pipeline
- BA and business review of the drafts and their open questions. The process views stay labelled “draft” until agreed.
- Process views for the remaining stages: Publish, Update, Cancel, Delete and Movement events.
- More scenarios in the Scenarios tab (for example the export status, the internal release actions, a manual add, a special manifest).
- Splitting the longest creation paths so each reads in about a minute.
- An Excel export of the process view.
- Formal test cases, built from the acceptance criteria and process paths.
- The other domains: Canada cargo, the train domains, and the supporting areas (screens, batch reports, reference data, housekeeping, migrations).
- Adding the other walked US programs to the Rule explorer, which today covers only the five entry programs.
One caveat on the Rule explorer: it shows the verbatim code for those five programs only. For the other US programs the rules sit in Field requirements, and the code behind them is traced in the Source programs & EDI tab.
Source Programs and EDI Explorer
Which legacy programs and EDI messages were read for each domain, so that the SMEs can check what the requirements rest on. The tree shows the process stages, their programs and the modules each program calls; the detail shows what was extracted. Program names are the legacy names.
Loading the program data…
Scenarios
More scenarios will be added here. Each one is built from the business rules that were extracted.
Pick a scenario on the left. Its flow is loaded when you pick it.
Work in progress. This is a technical view of the rules extracted from the entry programs that were walked first (depth-first walk, verbatim code), by domain and manifest type, for checking a rule against the source. For the finished, verified results use the Source programs & EDI, Process requirements, Field requirements and Requirement matrix tabs.
Done
- US cargo requirements are complete in the other tabs: all manifest fields with their acceptance criteria, the seven process stages and the manifest-type matrix.
- Process requirements are drafted for Manifest Creation and for the Response from CBP (EDI 350 / 355), including the scenarios where a response creates or changes a manifest.
- Source programs & EDI lists every walked program with its call tree and the extracted EDI messages for each domain.
Pending
- Only the entry programs listed above are in this view. The other walked US programs (the EDI 350 and 355 response handlers, release actions, update, cancel, delete, movement events, special, bunch and diversion bills, MQ delivery, AAR 76 arrival, idler cars) have their rules in Field requirements and are shown in Source programs & EDI, not here.
- Canada cargo and the train domains: creation is walked and listed here; their publish and response parts are not yet extracted into fields.
- Process requirements for Publish, Update, Cancel, Delete and Movement events are not drafted yet.
- Screens, batch reports, reference data, housekeeping and one-off migrations are not planned yet.
Loading domain data…
| Step | Rule | Target field | Category | Paragraph | Line |
|---|
First DFS invocation of each paragraph is extracted in full; later call sites are cross-references (→ seq).
| Seq | Unit | Lines | Rules | Re-invoked from (xref) |
|---|
How the data was produced
- Expansion: every
COPY/++INCLUDE/EXEC SQL INCLUDEis expanded; Line is the physical post-expansion line (the Source column in a rule shows the original file and relative line, orCopybook: NAME, Line n). - Execution order: a Depth-First walk of
PERFORM/GO TO/CALLstarting at the firstPROCEDURE DIVISIONstatement – never DATA DIVISION or source order. A paragraph reached again is a cross-reference (“also invoked from”). - Step numbers are display-only (sub-steps
n.k= several rules / branches inside one paragraph). The Rule IDBR-DOMAIN-TYPE-FIELD-HASHis derived from program, paragraph and normalized statement text and survives re-extraction. - Guardrails: every rule carries the verbatim COBOL lines; a script rejected any rule whose quoted code did not match the expanded listing. Sentences that interpret intent are tagged [Inferred].
- Manifest types come from
US Border Clearance Manifest.xlsx(Type 00, 15, 23-26, 69, 88, TR, IT, TE …) plus 88-level names in code; “All Manifest Types” marks type-independent rules. - Unmapped items: dynamic calls without a VALUE, missing copybooks and programs without source are logged under Open questions – nothing is guessed.
Which fields does each US manifest type need?
Rows are the manifest fields, columns are manifest types. Each cell says whether the field is required, conditional, optional, system-derived or not sent – based on the CBP EDI 309 guide and what the legacy code enforces. Click a cell for the reason, the evidence and the rule ids.
Overall summary
Loading the summary…
What do the manifest-type columns mean?
Loading the matrix…