013. Shell Support Tier Strategy¶
Date: 2026-02-15
Status¶
Accepted
Context¶
This repository supports both zsh and bash, but previous behavior did not clearly define support tiers. A custom Bash Enter key remap caused unstable terminal behavior and showed that shell customization boundaries were not explicit enough.
We need a long-term strategy that:
- Keeps advanced interactive UX where it is strongest.
- Keeps server and homelab shells stable and predictable.
- Prevents shell-specific features from leaking into shared paths.
Decision¶
We adopt a tiered shell strategy:
- Tier 1 (Full Interactive UX):
zsh - Primary shell for workstation environments.
-
Advanced prompt/plugins/keybindings live in
dot_zshrc.tmpl. -
Tier 2 (Stable Baseline):
bash - First-class supported baseline for servers/homelabs and minimal environments.
-
dot_bashrcmust prioritize terminal safety and compatibility. -
Boundary Rules
- Shell-specific behavior must remain in shell-specific files.
- Shared files (for example
dot_aliases) must avoid shell-breaking assumptions. -
Bash must not remap Enter (
Ctrl-M) viabind -x. -
Install and Health-Check Behavior
- Workstation installs may set default shell to
zshwhen allowed. - Server-mode installs keep current shell unchanged by default.
- Doctor accepts both
bashandzshas supported shells.
Consequences¶
Positive¶
- Better reliability for headless/server environments.
- Clear UX expectations by environment.
- Lower risk from shell-hook regressions.
- Keeps existing
zshproductivity investment.
Negative¶
- Requires ongoing discipline to maintain boundaries.
- Some features are intentionally unavailable in baseline Bash mode.
Compliance¶
- Shell support tiers documented in installation and troubleshooting docs.
- Agent guidance updated with shell policy.
- Installer behavior aligned with server-mode defaults.
- Test guardrails added for Bash safety rules.
Addendum (2026-02-17): Bash Baseline Hardening¶
To better align baseline Bash reliability with established shell policy:
- Optional Bash tool initialization must be guarded (
mise,zoxide,direnv,atuin) so missing binaries do not break shell startup. - Bash sessions identified as AI/agent contexts must use isolated history and disable Atuin sync for that session.
- Bash baseline history defaults should favor durability and low-noise history (append, dedup, ignore-space, prompt-time persistence).
- These behaviors must be covered by tests to prevent regressions.
Addendum (2026-02-16): Public Task API Stability¶
To reduce shell and automation drift, we treat top-level mise task names as the public task API:
- Public API examples:
install,update,doctor,test,lint,setup-secrets. - Internal namespaces (
maintain:*,dev:*,setup:*) are implementation details. - Docs, scripts, and workflows must prefer public names for user-facing flows.
Deprecation Policy¶
When task internals change:
- Keep existing public task names stable by updating wrapper delegation.
- If a public name must be renamed, keep a compatibility wrapper for at least one minor release.
- Mark the old name as deprecated in docs and changelog before removal.
- Enforce compliance in CI with contract checks and shell smoke tests.