You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(spacecraft-cli-shell): add Brush as first-class shell per Standard §7 (v1.22)
The Steelbore Standard v1.22 added §7 Shell Environment, naming Nushell,
Ion, Brush, and Bash as the four first-class shells. spacecraft-cli-shell
covered Nushell/Ion/PowerShell/ash/POSIX/Bash but had zero mention of
Brush.
- Add references/brush.md: treat Brush as Bash for syntax (it accepts
POSIX + Bash), with the Brush-vs-Bash compatibility-matrix gaps called
out (exotic builtins, special vars, unset $BASH_VERSION).
- SKILL.md: add Brush to the description, the Bash-family framing, the
detect signals (shebang / explicit mention; no distinct extension),
the rank-3 priority note, and the Step 3 reference routing.
- Add a §7 tie-in to the Standard Requirements section.
Note (not changed here): SKILL.md Step 3 also lists references/ash.md and
references/powershell.md, which do not exist on disk — a pre-existing
dangling-reference gap, left untouched to keep this commit scoped to Brush.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
process substitution, `${var^^}`, Bash arrays, `function` keyword, `source` for
13
13
POSIX), and routes to the correct per-shell reference. Syntax priority — POSIX sh
@@ -30,12 +30,14 @@ Sibling skill to `spacecraft-cli-preference`. That skill decides **which tool**
30
30
31
31
Four non-Bash shells matter most here: **Nushell** (Mohamed's primary interactive + Bravais/Spacecraft Software default), **Ion** (Redox default, secondary), **PowerShell** (Windows-first, cross-platform), and **ash** (Alpine Linux / embedded POSIX). Nushell and Ion are Rust-written and neither accepts Bash scripts as-is. Bashisms that "always worked" in Bash will fail — sometimes loudly, sometimes silently — in any of them.
32
32
33
+
**Brush** (Bourne RUsty SHell) is a fifth Rust shell, but it sits in the *Bash family*: unlike Nushell and Ion, it is built to accept POSIX and Bash syntax, so for this skill's purposes **treat Brush as Bash** — write POSIX first, and confirm any exotic Bash feature against Brush's still-maturing compatibility matrix. The Steelbore Standard §7 names the four first-class shell environments as **Nushell, Ion, Brush, and Bash**; this skill additionally guards PowerShell and ash because they show up as real operational targets. See `references/brush.md` for the Brush-vs-Bash gaps.
34
+
33
35
## When to consult
34
36
35
37
-**First shell command in a conversation** — always, regardless of how trivial it looks.
36
38
- Any time work involves `.nu`, `.ion`, `.ps1`, or `.sh` files (reading, writing, editing).
37
39
- Any CI block, Makefile/`justfile` recipe, README snippet, or doc example containing shell.
38
-
- Any time the user names a shell (Nushell, Ion, PowerShell, ash, bash, dash, zsh) or says "POSIX", "portable script", "bashism".
40
+
- Any time the user names a shell (Nushell, Ion, Brush, PowerShell, ash, bash, dash, zsh) or says "POSIX", "portable script", "bashism".
39
41
40
42
After the first consult in a session, trust the decision and proceed — don't re-load on every command unless the target shell changes or a new script file is opened.
3.**Explicit user mention***(evidence)* — "in Nushell", "my Ion script", "Brush", "PowerShell", "in ash", "POSIX-compatible", "bash one-liner".
53
55
4.**Environmental inference***(announce)* — state the assumption in a short sentence before/alongside the command, e.g. "Assuming Nushell (your primary) — say the word for Ion, PowerShell, or POSIX.":
54
56
-`bash_tool` in an agent environment runs **Bash**. Commands executed here and now should target **POSIX** (Bash accepts all POSIX).
55
57
- Spacecraft Software / Bravais / "my shell" context with no other signal → **Nushell** (Mohamed's primary). When "my shell" is used explicitly, consider offering an **Ion** secondary since Mohamed runs both.
@@ -67,7 +69,7 @@ Within the detected shell, emit constructs in this preference order:
| 2 |**Shell-native** (PowerShell / Ion / Nushell / ash) | Target is a shell that diverges from or rejects POSIX. Use PowerShell syntax for `.ps1`; Ion syntax when target is Ion; Nushell syntax for `.nu`; ash is POSIX-compatible — stay at rank 1 unless an ash-specific extension is explicitly needed. |
70
-
| 3 |**Bash extensions**| Last resort. Only when the target is confirmed Bash *and* no POSIX or native equivalent works. |
72
+
| 3 |**Bash extensions**| Last resort. Only when the target is confirmed Bash (or Brush) *and* no POSIX or native equivalent works. Under Brush, prefer the widely-implemented subset (`[[ ]]`, indexed arrays, `local`) over exotic features (`declare -A`, `mapfile`, `$PIPESTATUS`) that its compatibility matrix may not yet cover — see `references/brush.md`. |
71
73
72
74
"POSIX first" means *prefer constructs that happen to be both POSIX and valid in the target shell* — not *write POSIX into a `.nu` file*. Nushell scripts get Nushell syntax; Ion scripts get Ion syntax; PowerShell scripts get PowerShell syntax; the POSIX preference applies to sh / bash / dash / zsh / ash targets and to any portability crossroads.
73
75
@@ -81,6 +83,7 @@ Once the target is known, read the matching file **before** writing the command.
81
83
82
84
-**Nushell** → `references/nushell.md`
83
85
-**Ion** → `references/ion.md`
86
+
-**Brush** (Bash-family Rust shell) → `references/brush.md` (then `references/posix-safe.md` for the syntax itself — Brush accepts POSIX)
84
87
-**PowerShell** → `references/powershell.md`
85
88
-**ash** → `references/ash.md`
86
89
-**POSIX sh / dash / bash-in-POSIX-mode** → `references/posix-safe.md`
@@ -127,6 +130,16 @@ CLI tools, daemons, and system utilities must be POSIX-compliant. Platform-speci
127
130
extensions must go behind feature flags and must not be required for core
128
131
functionality. This skill's rank-1 POSIX-first priority order directly enforces §6.1.
129
132
133
+
### §7 — Shell Environment (v1.22)
134
+
135
+
The Standard names four first-class shell environments — **Nushell, Ion, Brush,
136
+
and Bash** — and §7.1 mandates POSIX-compatible scripts by default, Nushell/Ion
137
+
native variants where shell-native idioms are required, and **no Bashisms in
138
+
shared scripts**. This skill *is* the operational enforcement of §7.1: the
0 commit comments