@@ -98,14 +98,31 @@ jobs:
9898 print(f"✅ provides.commands has {len(commands)} command(s)")
9999
100100 # --- Command naming convention: speckit.{ext-id}.{command} ---
101+ cmd_pattern = f'^speckit\\.{re.escape(ext_id)}\\.[a-z0-9-]+$'
101102 for cmd in commands:
102103 name = cmd.get('name', '')
103- pattern = f'^speckit\\.{re.escape(ext_id)}\\.[a-z0-9-]+$'
104- if not re.match(pattern, name):
104+ if not re.match(cmd_pattern, name):
105105 errors.append(f"Command name '{name}' must match pattern speckit.{ext_id}.<command>")
106106 else:
107107 print(f"✅ Command '{name}' follows naming convention")
108108
109+ # --- Alias naming convention: speckit.{ext-id}.{alias} ---
110+ for cmd in commands:
111+ aliases = cmd.get('aliases', [])
112+ if aliases is None:
113+ aliases = []
114+ if not isinstance(aliases, list):
115+ errors.append(f"Aliases for command '{cmd.get('name', '')}' must be a list")
116+ continue
117+ for alias in aliases:
118+ if not isinstance(alias, str):
119+ errors.append(f"Alias in command '{cmd.get('name', '')}' must be a string")
120+ continue
121+ if not re.match(cmd_pattern, alias):
122+ errors.append(f"Alias '{alias}' must match pattern speckit.{ext_id}.<command>")
123+ else:
124+ print(f"✅ Alias '{alias}' follows naming convention")
125+
109126 # --- Command file existence ---
110127 for cmd in commands:
111128 cmd_file = cmd.get('file', '')
0 commit comments