Before implementing a new tool or feature:
- Check https://github.com/amcbstudio for existing repositories.
- Do not duplicate functionality.
- Prefer extending an existing tool only if it does not break its contract.
-
If a script uses
#!/bin/sh, it MUST be strictly POSIX-compliant.- No bashisms (
local, arrays,[[ ]], process substitution, etc). - If bash is required, the shebang MUST explicitly be
#!/usr/bin/env bash.
- No bashisms (
-
jq programs MUST NOT interpolate shell variables directly.
- Always pass data via
--arg/--argjson. - This avoids injection bugs and preserves determinism.
- Always pass data via
-
stdout is reserved for machine-readable output only.
- Human-oriented messages, diagnostics, and errors go to stderr.
- Small tools > large tools
- One responsibility per tool
- Clear input/output boundaries
- Avoid cleverness
- Prefer clarity over brevity if forced to choose
- Include simple, reproducible test cases.
- Tests should be runnable locally without external services.
- Golden-file tests are preferred where applicable.
- Documentation should explain what the tool does, not why it is interesting.
- Examples must be copy-pasteable.
- Do not include long explanations or narratives.