|
AWK Minifier
Conservative AWK source minification
|
Accepted
This ADR refines how derived projects should interpret the modular/plugin example established by ADR-004.
The starter's runtime plugin registry and noop plugin remain useful executable teaching material for command-oriented projects. Experience deriving bashlog showed, however, that the more broadly reusable architectural lesson is not "every Bash project should have runtime plugins." It is that maintainers benefit from responsibility-focused source modules, explicit dependency order, deterministic additive assembly, and standalone consumer artifacts.
This distinction should be visible in the starter so derived projects do not preserve runtime indirection merely because it was inherited.
ADR-004 established:
lib/plugins/*.bash;That combination is appropriate for the starter's example CLI because the example needs concrete executable behavior and demonstrates additive dispatch.
bashlog inherited this design and intentionally retained the build-time modularity while removing the runtime registry and noop behavior. Its public API consists of directly callable Bash functions. Registry lookup would have added state, indirection, documentation, and failure modes without solving an actual runtime problem.
The experience exposed a general template lesson: build-time modularity and runtime extensibility are separate decisions.
The template SHALL distinguish modular maintained source and deterministic assembly from runtime plugin architecture.
The following principles are broadly reusable and SHOULD normally survive into derived projects:
vendor/ at runtime unless the derived project explicitly chooses otherwise.The template MAY continue to ship the runtime registry and noop plugin as concrete starter behavior.
Derived projects SHALL treat that runtime plugin model as an example to evaluate, not as a mandatory inherited architecture. A derived project MAY:
lib/plugins/ as build-time additive modules without runtime registration;A derived project SHOULD record a consequential departure from ADR-004 when the change affects its runtime extension model, public API, trust boundary, or build architecture.
Runtime directory scanning, dynamic sourcing, hot-loading, or third-party plugin installation are separate architectural capabilities. They MUST NOT be inferred merely from the existence of modular source files or the starter's lib/plugins/ directory.
lib/plugins/.This decision addresses architecture drift and accidental complexity such as:
The decision assumes maintained source committed to the derived repository is trusted project code. Third-party runtime extension is outside this decision.
This would keep projects structurally uniform. It was rejected because uniform indirection is not a benefit when a project exposes direct functions or has no runtime extension requirement.
This would make the template more neutral. It was rejected because the current registry/noop implementation remains a useful concrete example of additive extension, testing, and modular source assembly for projects that need it.
This is maximally transparent and remains a good option for many derived projects. The template retains deterministic additive discovery because it demonstrates a useful pattern, while this ADR makes clear that projects may choose explicit enumeration instead.
The starter keeps its executable plugin example but documents it more honestly as one runtime pattern rather than the definition of modularity.
Derived projects gain permission, and explicit encouragement, to simplify inherited architecture when their public model does not need runtime dispatch. That reduces the chance that template code becomes cargo-cult infrastructure.
Reviewers must distinguish between a change to source assembly and a change to the runtime extension model, since those concerns no longer travel together by default.
This decision is directly informed by bashlog ADR-016, which retained explicit core ordering, deterministic assembly, whitespace-free maintained source paths, and standalone artifacts while rejecting the inherited runtime registry and noop plugin for a sourceable function library.
It refines, rather than replaces, the starter behavior established by ADR-004.
This ADR does not remove ADR-004 from the template itself. It supersedes only an implicit interpretation that ADR-004's runtime registry/noop requirements should be carried unchanged into every derived project.
lib/plugins/ if accumulated derived projects show that a more neutral lib/modules/ convention teaches the pattern better without weakening the executable starter example.