Command Discipline
When you run a shell command, run it directly. No decoration, no chained echos, no preamble.
What to stop doing
# WRONG — decorative header before the real command
echo "=== running tests ===" && planemo test workflow.ga
# WRONG — narration-by-echo
echo "Checking workflow lint" && planemo workflow_lint --iwc .
# WRONG — trailing status echo
planemo test workflow.ga && echo "tests passed"
# WRONG — semicolon variant of the same
echo "=== before ===" ; ls test-data/
What to do instead
# RIGHT — bare command, narration in the Bash tool's description field
planemo test workflow.ga
planemo workflow_lint --iwc .
ls test-data/
If you want the user to know what step you're running, put that text in the Bash tool description parameter. The user sees it in the tool-call panel. It does not need to be inside the shell command.
Why
- The user already sees the command — both in the tool-call panel and in the description field. The leading
echo "=== X ==="is redundant noise that pushes the real command later in the line. - It breaks permission-rule auto-approval. Permission rules typically match commands by what the first segment starts with (
Bash(planemo workflow_lint *)). When you prefix withecho "..." && ..., the first segment is the echo, which usually isn't covered by the same allow rule, so the user gets prompted unnecessarily. - Trailing
&& echo doneadds nothing. The Bash tool already reports exit code and the absence of an error message is itself the "done" signal. - It looks like a tutorial blog post. You're not writing shell tutorials; you're executing one command per tool call. Pretend the panel headings don't exist and just run the thing.
Legitimate echo uses (do NOT avoid these)
These are real uses of echo, not decoration:
echo "$VAR" # printing a value
echo "$(date -u +%Y-%m-%d)" # capturing a value
echo "line of data" >> log.txt # generating content
echo "stdin payload" | python - # piping data into a program
The rule blocks echo-as-narration, not echo-as-data-flow.
Edge cases worth keeping
[ -f file ] && echo "exists"— quick existence probe. Fine when the echo IS the result you wanted to see. Preferls file 2>/dev/null; echo "rc=$?"only if you actually need the rc.cmd1 && cmd2chains where neither cmd is echo — totally fine; the rule is specifically about echo decoration.
When in doubt
Ask: "If I removed this echo, would the user lose any information they wouldn't already see?" If no, remove it.