|
Bootstrap
Bash-based bootstrap engine reference documentation
|
Accepted
This Architecture Decision Record establishes the internal architectural boundaries of the bootstrap engine.
The engine shall be organized as a sequence of well-defined responsibilities, with each layer performing a single primary function before handing control to the next.
Previous ADRs established several architectural principles independently:
Taken together, these decisions naturally form an execution pipeline.
Making those layers explicit improves maintainability, testing, and future evolution of the project.
The bootstrap engine shall be organized around the following conceptual responsibilities:
Each layer should consume the output of the previous layer rather than reinterpreting user input independently.
Responsibilities should remain clearly separated.
For example:
A layered architecture reduces coupling.
Each responsibility can evolve independently provided its interface remains stable.
Testing also becomes significantly simpler.
Parser tests need not invoke the package manager.
Planning tests need not parse manifests.
Backend tests need not exercise parser behavior.
Diagnostics can identify which architectural layer detected a problem, improving both debugging and user understanding.
The bootstrap engine could process manifests procedurally from top to bottom, interleaving parsing, validation, planning, execution, and reporting.
This was rejected because responsibilities become intertwined and future features become progressively more difficult to implement.
The project could organize the engine around large stateful objects.
This was rejected because the project intentionally favors a straightforward functional Bash implementation over object-like abstractions.
Future features should extend existing architectural layers before introducing new ones.
Contributors should identify which layer owns a proposed behavior before implementing it.
Documentation should describe the execution pipeline consistently with this layered model.
This ADR does not prescribe specific Bash functions or source files.
It does not define internal data structures exchanged between layers.
Those remain implementation details.
Additional layers may be introduced if justified by substantial new capabilities.
Such additions should preserve the principle that each layer has one primary responsibility and one clear interface to adjacent layers.
The bootstrap engine is organized as a pipeline of distinct responsibilities.
Each layer should perform one job well, communicate through well-defined interfaces, and avoid duplicating the responsibilities of other layers.