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
skills: retarget spacecraft-cli-preference at the local host
Companion to 6a01665, which did the same for spacecraft-missing-pkg. The
preference stack is unchanged — no tool is re-ranked. What changes is that a
substitution is now conditional on the machine it lands on.
Three gates, applied before anything is emitted:
- Availability (§1.1). Substituting to a tool that isn't installed turns a
working command into `command not found`. Probe once, then route: present ->
substitute; preferred absent but legacy present -> legacy plus a
`# preferred: <tool>` note; both absent -> ephemeral run via
spacecraft-missing-pkg. On this host that last branch is real: the table
maps dig -> dog and neither is installed.
- Execution class (§1.2). The agent's shell has no TTY, yet ~20 entries are
full-screen TUIs. Each now names its headless sibling (bottom -> procs,
gitui -> git/jj, trip -> trip --mode report) or is marked hand-off. A
separate class covers system-mutating tools, including two with destructive
*defaults*: `kondo -a` deletes with no confirmation and `fclones remove`
deletes files. sudo-rs is never run by the agent.
- Target (§1.0). One table, three audiences: what the agent runs, what gets
committed to a repo, and what the user is handed to run. A committed `eza`
breaks the build for everyone without it.
Also:
- Install hints across all 110 reference mastheads rewritten to defer to
spacecraft-missing-pkg while keeping package identity. They previously
carried 92 x `cargo install`, 6 x `paru -S`, 3 x `pacman -S`, 3 x
`npm install -g`, 2 x `pip install`, `nix-env` and `nix profile install` --
every one of them a prohibition in the sibling skill.
- Shell-integration tools (zoxide, atuin, starship, broot, gitway) route to
`programs.<tool>.enable`; hand-editing an rc file stays prohibited.
- Package rows gated on host type: paru is Arch-only, and topgrade/omni/zap/am
drift a declaratively managed host rather than serving it.
- Consent banners added to kondo, fclones, gptman, disktui, topgrade, paru.
- §1.3 separates the shell the agent invokes from the shell a script is
authored for -- §1.5's Nushell/Ion cascade governs the latter only.
New reference: local-execution.md. Version 1.1, description 985 chars
(cap 1000). Bundles rebuilt at 114 files.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ the rules re-attached to every prompt.
38
38
|[`spacecraft-carbon-guidelines`](spacecraft-carbon-guidelines/)| Type-safe highly-interoperable Carbon guidance — introducers (`let`/`var`), null safety (`Optional(T)`), bidirectional C++ interoperability (`import Cpp`), safety build profiles (debug/hardened), and C++ thread/atomic integrations. |
39
39
|[`spacecraft-chez-guidelines`](spacecraft-chez-guidelines/)| Functional, safe, concurrent Chez Scheme guidance — R6RS libraries + Akku, pure-first design, `optimize-level` as the safety lever (level 3 = `unsafe`), hand-built mailboxes/channels over real threads (no Fibers), the FFI + AOT/whole-program compilation, and Guile-habit guardrails. |
40
40
|[`spacecraft-clang-guidelines`](spacecraft-clang-guidelines/)| Memory-safe highly-hardened C guidance — NASA Power of 10 Rules (no runtime heap allocation, bounded loops, small functions, high assertion density), MISRA C safety subsets, CERT C secure coding rules, Clang `-fbounds-safety` compiler extensions, and C11 atomics. |
41
-
|[`spacecraft-cli-preference`](spacecraft-cli-preference/)| Modern CLI substitutions: `eza` for `ls`, `rg` for `grep`, `gitway` for Git SSH, etc. |
41
+
|[`spacecraft-cli-preference`](spacecraft-cli-preference/)| Modern CLI substitutions: `eza` for `ls`, `rg` for `grep`, `gitway` for Git SSH, etc. Conditional on the local host — substitute only when the tool is installed, fall back to the legacy tool with a note when it isn't, never launch a TUI in the agent's TTY-less shell, and get consent before anything that mutates or deletes. |
42
42
|[`spacecraft-cli-standard`](spacecraft-cli-standard/)| Enforces the Spacecraft Software Dual-Mode Self-Documenting CLI Standard (v1.0.0) on every CLI. |
43
43
|[`spacecraft-cli-shell`](spacecraft-cli-shell/)| Syntax-compliance guard for Nushell / Ion / POSIX / Bash commands. |
44
44
|[`spacecraft-clojure-guidelines`](spacecraft-clojure-guidelines/)| Functional, safe-concurrent Clojure guidance — immutable-first design, reference-type decision tree (atoms / refs+STM / agents / core.async), transducers, lazy-seq discipline, ClojureScript and Babashka platform notes, and `standard-clj` formatting. |
If §3 has no specific row for the legacy tool, apply the cascading fallback in
46
48
§1.5 (`uutils` for GNU coreutils, Brush for Bash-only scripts).
47
49
48
-
### Shell-syntax awareness
50
+
**This runs on the user's own machine.** The preference stack below is
51
+
unchanged, but on a real host a substitution is only correct if the tool is
52
+
actually installed, the agent's shell can actually execute it, and the command
53
+
does not silently change or delete something. §1.1–§1.3 are those three gates;
54
+
apply them before emitting anything.
49
55
50
-
Mohamed's primary shells are **Nushell** and **Ion**. Some command patterns
51
-
(piping into `xargs`, command substitution `$(…)`, `&&`/`||` chaining) behave
52
-
differently in those shells. When in doubt, prefer the portable POSIX form,
53
-
but flag it if the user is clearly working inside a specific non-Bash shell.
56
+
### §1.0 — Substitution depends on the target
57
+
58
+
The same mapping table serves three audiences that need different behaviour:
59
+
60
+
| Target | Rule |
61
+
|---|---|
62
+
| A command **the agent runs** in its own shell | Substitute only if the tool is present (§1.1), the command is headless-safe (§1.2), and it is non-destructive (§1.2). The agent's shell is a non-interactive Bash with no TTY — regardless of the user's interactive shell. |
63
+
| A command **written into the user's repo** — script, CI job, `Justfile`, docs | Substitute only if the repo's own environment guarantees the tool: a devShell, a documented prerequisite, a CI image that ships it. Otherwise keep the portable form and add `# preferred: <tool>`. A committed `eza` breaks the build for every contributor without it. |
64
+
| A command **suggested for the user to run** interactively | Full preference applies, TUIs included — this is where `gitui`, `yazi`, `bottom`, and `helix` belong. Hand it over with the `!` prefix rather than running it. |
65
+
66
+
### §1.1 — Check availability before substituting
67
+
68
+
A substitution to a tool that isn't installed is worse than no substitution:
69
+
it turns a working command into `command not found`. Probe first, then route:
70
+
71
+
| Preferred | Legacy | Action |
72
+
|---|---|---|
73
+
| present | — |**Substitute.** The happy path. |
74
+
| present | absent |**Substitute** — it is the only option (e.g. `jaq` where `jq` was never installed). |
75
+
| absent | present |**Use the legacy tool** and append `# preferred: <tool> — see references/<tool>.md`. Do not fail, do not silently install. |
76
+
| absent | absent |**Route to `spacecraft-missing-pkg`** for an ephemeral run (`nix run nixpkgs#<pkg> -- …`). Neither form exists, so provisioning is the only way through. |
Universal LLM REPL + CLI. One tool for OpenAI, Claude, Gemini, local Ollama, llama.cpp, Azure, Bedrock, and more. Supports RAG, agents, function-calling.
0 commit comments