Slash
Crewship loads any*.md file under ~/.crewship/commands/ as a top-level command. Each file is parsed for YAML frontmatter (name, description, vars, agent, effort, plan) and a markdown body that’s rendered against positional args and $args. The wiring (cmd/crewship/cmd_slash.go) plus the admin surface (cmd/crewship/cmd_slash_admin.go) make this practical.
Naming-collision policy: built-in commands always win. A slash file that would shadow ask, run, tui, etc. is skipped with a [slash] <name> shadows built-in command — skipping warning rather than silently masking. Loader failures (missing dir, malformed file) degrade to warnings — the CLI keeps working without user-defined commands.
The admin surface lives under crewship slash:
crewship slash list
Lists loaded slash commands with name, description, agent override, and source file.
crewship slash init
Scaffolds ~/.crewship/commands/ and writes a sample review.md. If the sample already exists, leaves it alone (Sample already exists at <path> — leaving it alone).
crewship review staged 'auth refactor'.
Frontmatter fields
$args in the body is replaced with everything the user typed after the command name. Variables from vars: are bound positionally in order.
Workspace actions in crewship shell
The commands above are local — files under ~/.crewship/commands/, mounted
as cobra subcommands. crewship shell additionally loads the server-driven
catalog for the active workspace (GET /api/v1/slash-commands, filtered to your
capability grants) and registers each entry at the REPL prompt:
slash block and you
hold routine.run or are MANAGER and above, who clear the run gate on role
alone. Arguments are key=value, quoted for spaces, and each value
is sent as the type the routine declared — a number unquoted, a boolean as
true/yes/on or false/no/off. A value that cannot be restored to its
declared type is refused at the prompt with the field named, before anything is
sent.
/help lists what actually loaded, which is not a fixed list: it is
workspace-specific and depends on your grants.
Built-ins win, here too. The same policy as the file-based catalog above: a
workspace action whose name collides with /help, /exit, /agent … is
skipped with a [slash] <name> shadows a built-in command — skipping warning
rather than silently taking the name.
See also
crewship prompt— local prompt library, lower-cost than a full slash command.- Slash Commands API — the server-driven catalog these load from.
kind: Routine— opting a routine into the palette.crewship ask— the dispatch target for every slash command.crewship plan— whatplan: truein frontmatter activates.