Problem or Need
Some validator scripts use Basic Regular Expressions (BRE) with escaped alternation, which is less readable and more error-prone than Extended Regular Expressions (ERE).
Example in validate-agent.sh:200:
# Current (BRE with escaped alternation)
if ! echo "$SYSTEM_PROMPT" | grep -q "You are\|You will\|Your"; then
This works but:
- Escaped pipes (
\|) are easy to forget or get wrong
- Different grep implementations may handle BRE alternation differently
- ERE is more widely understood
Proposed Solution
Use grep -E (or grep -Eq) for patterns with alternation:
# Clearer (ERE with unescaped alternation)
if ! echo "$SYSTEM_PROMPT" | grep -Eq "You are|You will|Your"; then
Which component would this affect?
Specific Component (if applicable)
plugins/plugin-dev/skills/agent-development/scripts/validate-agent.sh
- Potentially other scripts using similar patterns
Alternatives Considered
- Keep BRE: Works but less readable
- Use
egrep: Deprecated alias for grep -E
Additional Context
This is a minor maintainability improvement. The current code works correctly but could confuse contributors unfamiliar with BRE escaping rules.
How important is this feature to you?
Problem or Need
Some validator scripts use Basic Regular Expressions (BRE) with escaped alternation, which is less readable and more error-prone than Extended Regular Expressions (ERE).
Example in
validate-agent.sh:200:This works but:
\|) are easy to forget or get wrongProposed Solution
Use
grep -E(orgrep -Eq) for patterns with alternation:Which component would this affect?
Specific Component (if applicable)
plugins/plugin-dev/skills/agent-development/scripts/validate-agent.shAlternatives Considered
egrep: Deprecated alias forgrep -EAdditional Context
This is a minor maintainability improvement. The current code works correctly but could confuse contributors unfamiliar with BRE escaping rules.
How important is this feature to you?