Software design is greatly a matter of good organization. Legacy software projects are often lacking in that very quality. Although the topic is very large, this article will focus on a smaller area.
Constants and types are essential to good design. The scope of these declarations is worth more consideration than it is often given.
First of all, making constants and simple types global exacts no penalty on the code. As they do not generate code, the question of scope is of limited concern. However, you may wish to create multiple files for constants and multiple files for small types, to better manage their organization, and reflect that some may be global, and others may apply only in smaller areas of the application.
You may wonder why this is important. One reason is that in legacy projects, you may need to be battling against unit dependency cycles (UDCs). The presence of many UDCs slows the build, and adds substantial complexity. Moreover, they are almost entirely evidence of design errors.
If your project suffers from an abundance of UDCs, then when you add a module to a uses clause, you may be multiplying the UDC population. And sometimes, the reference may be added only to gain access to a constant or an enumeration. Hence this article.
You may do well to begin moving the constants and simple types into separate modules. Do this a few at a time, and then fix the resulting build errors. After you achieve a build, Use the CnPack (https://cnpack.org) Uses Cleaner to process each of the modules to which you added references to the new modules of constants and types. CnPack will identify the modules which you no longer need to reference.
You may also wish to use MMX (https://www.mmx-delphi.de) to analyze the unit dependencies, and keep some record of them reducing.
As with almost any aspect of legacy project work, this will be a marathon, not a sprint. If you have many hundreds of modules, don’t expect to complete the work in a few days. And recognize that as you proceed, units already cleaned will need to be cleaned again. But in the end, these actions, simple as they are, will bear fruit.
You duplicated the phrase “do not generate code” in the third paragraph.