Problem
Wash has a fixed warn-only list for Bash commands with structured equivalents. Over time, users may repeatedly run project-specific shell commands that produce large output and could benefit from structured handling or stronger nudges. Auto-blocking unknown Bash patterns would be risky, but surfacing candidates is useful.
Goal
Teach the learning layer to discover repeated high-waste Bash patterns and present them for explicit approval.
Scope
- Observe Bash commands that match no existing redirect pattern.
- Redact or normalize sensitive command parts.
- Group commands into pattern candidates.
- Estimate output waste from command result size when available.
- Write candidates to
pendingBashPatterns in the profile.
- Add an approval command that promotes selected patterns into active redirect hints.
Approval flow
Suggested commands:
wash learn bash-candidates
wash learn approve-pattern <id>
wash learn reject-pattern <id>
Suggested slash command:
Safety rules
- Never auto-block a discovered pattern.
- Never store full commands that include quoted secrets or obvious token values.
- Prefer normalized patterns such as
docker logs <arg> over raw command strings.
- Approval should be reversible.
Acceptance criteria
- Repeated unmatched Bash commands are grouped into candidates.
- Candidates include count, estimated output bytes, and suggested structured replacement when known.
- Approved patterns produce warn-only hints in PreToolUse.
- Tests cover grouping, redaction, approval, rejection, and profile persistence.
Problem
Wash has a fixed warn-only list for Bash commands with structured equivalents. Over time, users may repeatedly run project-specific shell commands that produce large output and could benefit from structured handling or stronger nudges. Auto-blocking unknown Bash patterns would be risky, but surfacing candidates is useful.
Goal
Teach the learning layer to discover repeated high-waste Bash patterns and present them for explicit approval.
Scope
pendingBashPatternsin the profile.Approval flow
Suggested commands:
wash learn bash-candidateswash learn approve-pattern <id>wash learn reject-pattern <id>Suggested slash command:
/wash-approve-patternsSafety rules
docker logs <arg>over raw command strings.Acceptance criteria