Designing Modular Bash: Functions, Namespaces, and Library Patterns