-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
component:skillSkills layerSkills layereffort:small< 1 hour< 1 hourenhancementNew feature or requestNew feature or request
Description
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"; thenThis 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"; thenWhich component would this affect?
- Skill
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 forgrep -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?
- Low - Just a suggestion
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component:skillSkills layerSkills layereffort:small< 1 hour< 1 hourenhancementNew feature or requestNew feature or request