create-genia-os 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-genia-os",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "GEN.IA OS — Transforma o Claude Code em um time completo de especialistas. 9 agentes de desenvolvimento + Squads Xquads de negócio, Synapse Engine, governança automática e docs profissional obrigatório.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -132,14 +132,16 @@ function removeSessionFlag(cwd) {
132
132
  function detectActiveAgent(prompt) {
133
133
  if (!prompt) return null;
134
134
  const lower = prompt.toLowerCase();
135
- // Prioridade 1: slash commands explícitos (/dev, /pm, etc.)
136
- for (const [slash, domain] of Object.entries(SLASH_COMMAND_DOMAINS)) {
135
+ // Prioridade 1: slash commands ordenados por comprimento desc para evitar /dev matchear /devops
136
+ const slashEntries = Object.entries(SLASH_COMMAND_DOMAINS).sort((a, b) => b[0].length - a[0].length);
137
+ for (const [slash, domain] of slashEntries) {
137
138
  if (lower.startsWith(slash) || lower.includes(` ${slash}`) || lower.includes(`\n${slash}`)) {
138
139
  return domain;
139
140
  }
140
141
  }
141
- // Prioridade 2: @mentions no texto
142
- for (const [mention, domain] of Object.entries(AGENT_DOMAINS)) {
142
+ // Prioridade 2: @mentions ordenados por comprimento desc para evitar @dev matchear @devops
143
+ const mentionEntries = Object.entries(AGENT_DOMAINS).sort((a, b) => b[0].length - a[0].length);
144
+ for (const [mention, domain] of mentionEntries) {
143
145
  if (lower.includes(mention)) {
144
146
  return domain;
145
147
  }