Project organization
Authorities: the projects/packages contract is carried verbatim in Authorities — this chapter is pedagogical and does not replace it.
A Forma project organizes semantic sources, realization plans, dependencies, targets and verifications. The forma.toml manifest identifies the package and its inputs. The forma.lock file fixes the resolved selection of dependencies to repeat the program’s formation.
Separate the responsibilities
Keep domain declarations in .fsl modules. Group reusable contracts in modules with defined interfaces and place specific applications in consumer modules. The .fsp plans stay separate from the sources, because they select realization mechanisms and resources.
The physical organization must make visible the difference between vocabulary, operations, applications and verifications. It can follow the domain boundaries without requiring that each folder correspond to a region of the metagraph.
Define the targets
A target selects the set of sources and the application that will be verified or executed. Record in the project which targets are destined for the application, for the examples and for the verifications. The manifest reference provided in the version in use determines the accepted fields.
The source selection must contain the declarations the target depends on. In explicit-files mode, the operands provide that set. In project mode, resolution uses the manifest’s sources and dependencies.
Publish small interfaces
Export the declarations other modules need: types, relations, theories and applications. Keep internal details that are not part of the shared contract. The consumer must be able to form its constructs using the published interface.
When there is ambiguity between imported names, use explicit qualification or an alias. This choice is part of the program’s resolution basis.
Record the reproducible basis
Keep the manifest, the lock and the realization plans together with the material needed to reproduce the target. Fix versions of models and external artifacts required by the realization. The history of an execution must identify the revision actually used, instead of depending only on a current name.
Verify per target
The project’s formation must be verified before execution. Then execute the selected applications and examine their typed results. An application with external dependencies also needs admitted realization bindings and the resources required by the contract.
The corresponding commands and formats are gathered in Commands, Formats and Verification.