Skip to content

fix(agent-development): align validate-agent.sh name validation with documented requirements #33

@sjnims

Description

@sjnims

Summary

The validate-agent.sh script's name validation regex allows uppercase letters, but the SKILL.md documentation specifies names should be "lowercase, numbers, hyphens only".

Severity: Minor (documentation/code inconsistency)

Problem

There's an inconsistency between documentation and validation:

SKILL.md states:

Format: lowercase, numbers, hyphens only

But validate-agent.sh allows uppercase:

if ! [[ "$NAME" =~ ^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$ ]]; then

This means the script would accept Code-Reviewer as valid, but the documentation says it should be code-reviewer.

Current State

# Line 63 in validate-agent.sh
if ! [[ "$NAME" =~ ^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$ ]]; then
  echo "❌ name must start/end with alphanumeric and contain only letters, numbers, hyphens"

Expected State

if ! [[ "$NAME" =~ ^[a-z0-9][a-z0-9-]*[a-z0-9]$ ]]; then
  echo "❌ name must start/end with lowercase alphanumeric and contain only lowercase letters, numbers, hyphens"

Location

  • File: plugins/plugin-dev/skills/agent-development/scripts/validate-agent.sh
  • Line: 63

Related

  • The create-agent-skeleton.sh script correctly uses lowercase-only validation at line 27
  • This fix would make both scripts consistent

Acceptance Criteria

  • Regex changed from [a-zA-Z0-9] to [a-z0-9]
  • Error message updated to mention "lowercase"
  • Validation behavior matches SKILL.md documentation
  • Consistent with create-agent-skeleton.sh validation

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions