From e3acb3e95cd5233f33692219f2e7b12ce03432c4 Mon Sep 17 00:00:00 2001 From: Ramesh Padmanabhaiah Date: Fri, 19 Jun 2026 17:01:17 -0700 Subject: [PATCH] Link shell library standards --- CONTRIBUTING.md | 5 +++++ STANDARDS.md | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 STANDARDS.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 189269b..ba853f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,11 @@ Thank you for improving this project. +For coding and documentation standards, see [STANDARDS.md](STANDARDS.md). This +repository inherits Base's shell-library standards, including the convention +that each sourceable shell library remains a single file at its library +boundary. + ## Workflow 1. Create or choose a GitHub issue before starting implementation work. diff --git a/STANDARDS.md b/STANDARDS.md new file mode 100644 index 0000000..4f642f6 --- /dev/null +++ b/STANDARDS.md @@ -0,0 +1,27 @@ +# base-bash-libs Standards + +`base-bash-libs` inherits the Base shell standards as its upstream policy. See +[Base Standards](https://github.com/basefoundry/base/blob/master/STANDARDS.md), +especially the +[single-file library boundary](https://github.com/basefoundry/base/blob/master/STANDARDS.md#single-file-library-boundary) +guidance. + +## Shell Library Shape + +Each public sourceable Bash library in this repository should remain a single +physical `.sh` file at its library boundary: + +- `lib/bash/std/lib_std.sh` +- `lib/bash/file/lib_file.sh` +- `lib/bash/git/lib_git.sh` + +Do not split one library into internal concern files such as separate logging, +path, string, prompt, or command-runner fragments. That kind of split adds a +source-order and import graph for callers without improving the public library +contract. + +A new library file is appropriate when the repository adds a distinct reusable +library boundary, such as the existing `file` and `git` libraries. Large +libraries should stay navigable through section ordering, consistent function +prefixes, README coverage, and focused tests rather than a shell module loader +or chained source fragments.