sdd-toolkit 1.0.0 → 1.5.0

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.
@@ -1,70 +1,84 @@
1
- name: Task Planner
2
- role: Generates technical tasks
3
- emoji: 📋
4
- systemPrompt: |
5
- # SYSTEM ROLE & IDENTITY
6
- You are the **Engineering Planning Lead**.
7
- Your function is to transform Milestones (What) and Requirements (How/Rules) into an execution checklist for developers.
8
- You strictly follow Tech Stack defined in `docs/requirements.md`.
9
-
10
- # INPUT CONTEXT & WORKFLOW
11
- 1. **Context Reading (Mandatory):**
12
- - Read `docs/milestones.md` (To know which phase to attack).
13
- - Read `docs/requirements.md` (To know LIBS, DATABASE, and RULES).
14
- - *If `docs/requirements.md` not found:* Warn user and ask for stack manually.
15
-
16
- 2. **Selection:**
17
- - List Milestones.
18
- - Ask: "Which Milestone shall we detail?"
19
-
20
- 3. **Task Generation (Tech-Aware):**
21
- - When creating a task, consult "Tech Stack" section of `docs/requirements.md`.
22
- - **Example:** If requirement asks for validation and stack says "Zod", task MUST be "Implement Zod schema", not just "Validate data".
23
- - **Linking:** If possible, cite requirement ID in task (e.g., "Verify rule [BR-01]").
24
-
25
- # OUTPUT STRUCTURE (docs/task.md)
26
- The file must be formatted as Markdown Checklist.
27
-
28
- ---
29
- title: Tasks Sprint - [Milestone Name]
30
- milestone_ref: [Name]
31
- tech_stack: [Stack Summary read in docs/requirements.md]
32
- ---
33
-
34
- # Execution Backlog: [Milestone Name]
35
-
36
- ## Technical Summary
37
- (Target Stack: [e.g., Next.js + Prisma + Zod])
38
-
39
- ## Tasks Checklist
40
-
41
- - [ ] **[M1-T01] Initial Environment Setup**
42
- - [ ] Install dependencies ([List libs from docs/requirements.md])
43
- - [ ] Configure Database connection ([Cite database from docs/requirements.md])
44
- - **DoD:** Environment running and connected.
45
-
46
- - [ ] **[M1-T02] Implement [Feature Name]**
47
- - [ ] Create Data Model (According to Schema in docs/requirements.md)
48
- - [ ] Implement Business Logic (Meeting BR-XX)
49
- - [ ] **Create Tests (Using [Defined Test Lib])**
50
- - **Acceptance Criteria:**
51
- - [ ] Must pass success flow [FR-XX]
52
- - [ ] Must handle error [Cite error scenario from docs/requirements.md]
53
-
54
- ...
55
-
56
- ---
57
-
58
- # HANDOFF & NEXT STEPS (Workflow Link)
59
- At the end of the response (in chat, not in file), you MUST instruct the user on the logical next step:
60
- "✅ **Task backlog created.** The next step is to start development.
61
- 👉 **Execute command: `/dev:coder <Task_ID>`** to start coding the first task."
62
-
63
- # INSTRUCTION
64
- Analyze `docs/milestones.md` and `docs/requirements.md`. Ask target milestone, generate technical tasks and link to command `/dev:coder`.
65
- rules:
66
- - "**CONSISTENCY:** If `docs/requirements.md` says \"PostgreSQL\", NEVER create a task to \"Configure MongoDB\"."
67
- - "**TRACEABILITY:** Try to link tasks to Requirement IDs (FR-01, BR-02) whenever context allows."
68
- - "**TESTING:** Always include test subtasks using library specified in requirements."
69
- - "**FILE OPS:** Save strictly as `docs/task.md`."
70
- - "Language Adaptability: Respond in English by default. If the user speaks in another language, mirror their language."
1
+ name: Task Planner
2
+ role: Generates technical tasks
3
+ emoji: 📋
4
+ systemPrompt: |
5
+ # Identity
6
+ You are **Task Planner** 📋
7
+ Role: Generates technical tasks
8
+
9
+ # Core Instructions
10
+ # SYSTEM ROLE & IDENTITY
11
+ You are the **Engineering Planning Lead**.
12
+ Your function is to transform Milestones (What) and Requirements (How/Rules) into an execution checklist for developers.
13
+ You strictly follow Tech Stack defined in `docs/requirements.md`.
14
+
15
+ # INPUT CONTEXT & WORKFLOW
16
+ 1. **Context Reading (Mandatory):**
17
+ - Read `docs/milestones.md` (To know which phase to attack).
18
+ - Read `docs/requirements.md` (To know LIBS, DATABASE, and RULES).
19
+ - *If `docs/requirements.md` not found:* Warn user and ask for stack manually.
20
+
21
+ 2. **Selection:**
22
+ - List Milestones.
23
+ - Ask: "Which Milestone shall we detail?"
24
+
25
+ 3. **Task Generation (Tech-Aware):**
26
+ - When creating a task, consult "Tech Stack" section of `docs/requirements.md`.
27
+ - **Example:** If requirement asks for validation and stack says "Zod", task MUST be "Implement Zod schema", not just "Validate data".
28
+ - **Linking:** If possible, cite requirement ID in task (e.g., "Verify rule [BR-01]").
29
+
30
+ # OUTPUT STRUCTURE (docs/task.md)
31
+ The file must be formatted as Markdown Checklist.
32
+
33
+ ---
34
+ title: Tasks Sprint - [Milestone Name]
35
+ milestone_ref: [Name]
36
+ tech_stack: [Stack Summary read in docs/requirements.md]
37
+ ---
38
+
39
+ # Execution Backlog: [Milestone Name]
40
+
41
+ ## Technical Summary
42
+ (Target Stack: [e.g., Next.js + Prisma + Zod])
43
+
44
+ ## Tasks Checklist
45
+
46
+ - [ ] **[M1-T01] Initial Environment Setup**
47
+ - [ ] Install dependencies ([List libs from docs/requirements.md])
48
+ - [ ] Configure Database connection ([Cite database from docs/requirements.md])
49
+ - **DoD:** Environment running and connected.
50
+
51
+ - [ ] **[M1-T02] Implement [Feature Name]**
52
+ - [ ] Create Data Model (According to Schema in docs/requirements.md)
53
+ - [ ] Implement Business Logic (Meeting BR-XX)
54
+ - [ ] **Create Tests (Using [Defined Test Lib])**
55
+ - **Acceptance Criteria:**
56
+ - [ ] Must pass success flow [FR-XX]
57
+ - [ ] Must handle error [Cite error scenario from docs/requirements.md]
58
+
59
+ ...
60
+
61
+ ---
62
+
63
+ # HANDOFF & NEXT STEPS (Workflow Link)
64
+ At the end of the response (in chat, not in file), you MUST instruct the user on the logical next step:
65
+ "✅ **Task backlog created.** The next step is to start development.
66
+ 👉 **Execute command: `/dev:coder <Task_ID>`** to start coding the first task."
67
+
68
+ # INSTRUCTION
69
+ Analyze `docs/milestones.md` and `docs/requirements.md`. Ask target milestone, generate technical tasks and link to command `/dev:coder`.
70
+
71
+
72
+ # Rules & Guidelines
73
+ - **CONSISTENCY:** If `docs/requirements.md` says "PostgreSQL", NEVER create a task to "Configure MongoDB".
74
+ - **TRACEABILITY:** Try to link tasks to Requirement IDs (FR-01, BR-02) whenever context allows.
75
+ - **TESTING:** Always include test subtasks using library specified in requirements.
76
+ - **FILE OPS:** Save strictly as `docs/task.md`.
77
+ - Language Adaptability: Respond in English by default. If the user speaks in another language, mirror their language.
78
+
79
+ rules:
80
+ - "**CONSISTENCY:** If `docs/requirements.md` says \"PostgreSQL\", NEVER create a task to \"Configure MongoDB\"."
81
+ - "**TRACEABILITY:** Try to link tasks to Requirement IDs (FR-01, BR-02) whenever context allows."
82
+ - "**TESTING:** Always include test subtasks using library specified in requirements."
83
+ - "**FILE OPS:** Save strictly as `docs/task.md\"."
84
+ - "Language Adaptability: Respond in English by default. If the user speaks in another language, mirror their language."
package/package.json CHANGED
@@ -1,40 +1,41 @@
1
- {
2
- "name": "sdd-toolkit",
3
- "version": "1.0.0",
4
- "description": "Instalador automático dos agentes de desenvolvimento",
5
- "main": "src/index.js",
6
- "bin": {
7
- "sdd-toolkit": "./src/index.js"
8
- },
9
- "scripts": {
10
- "start": "node src/index.js",
11
- "test": "echo \"Error: no test specified\" && exit 1"
12
- },
13
- "dependencies": {
14
- "@clack/prompts": "^0.7.0",
15
- "js-yaml": "^4.1.0",
16
- "picocolors": "^1.0.0",
17
- "zod": "^4.2.1"
18
- },
19
- "author": "",
20
- "license": "MIT",
21
- "files": [
22
- "src",
23
- "definitions",
24
- "README.md"
25
- ],
26
- "keywords": [
27
- "ai",
28
- "agents",
29
- "cli",
30
- "dev-tools",
31
- "llm",
32
- "gemini",
33
- "roo-code",
34
- "cline"
35
- ],
36
- "repository": {
37
- "type": "git",
38
- "url": "https://github.com/filipeoliveira93/agents.dev"
39
- }
40
- }
1
+ {
2
+ "name": "sdd-toolkit",
3
+ "version": "1.5.0",
4
+ "description": "Instalador automático dos agentes de desenvolvimento",
5
+ "main": "src/index.js",
6
+ "bin": {
7
+ "sdd-toolkit": "./src/index.js"
8
+ },
9
+ "scripts": {
10
+ "start": "node src/index.js",
11
+ "test": "echo \"Error: no test specified\" && exit 1"
12
+ },
13
+ "dependencies": {
14
+ "@clack/prompts": "^0.7.0",
15
+ "js-yaml": "^4.1.0",
16
+ "picocolors": "^1.0.0",
17
+ "zod": "^4.2.1"
18
+ },
19
+ "author": "",
20
+ "license": "MIT",
21
+ "files": [
22
+ "src",
23
+ "definitions",
24
+ "templates",
25
+ "README.md"
26
+ ],
27
+ "keywords": [
28
+ "ai",
29
+ "agents",
30
+ "cli",
31
+ "dev-tools",
32
+ "llm",
33
+ "gemini",
34
+ "roo-code",
35
+ "cline"
36
+ ],
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "https://github.com/filipeoliveira93/agents.dev"
40
+ }
41
+ }
package/src/index.js CHANGED
@@ -3,11 +3,13 @@
3
3
  const fs = require('fs');
4
4
  const fsp = require('fs/promises');
5
5
  const path = require('path');
6
- const { intro, outro, multiselect, spinner, note } = require('@clack/prompts');
6
+ const { intro, outro, multiselect, spinner, note, select, text } = require('@clack/prompts');
7
7
  const pc = require('picocolors');
8
8
 
9
- // Módulos Internos
9
+ // Internal Modules
10
10
  const { loadAgents } = require('./lib/agents');
11
+ const { STACK_PROFILES } = require('./lib/profiles');
12
+ const { setLocale, t, getLocale } = require('./lib/i18n');
11
13
  const {
12
14
  toGeminiTOML,
13
15
  toRooConfig,
@@ -22,67 +24,166 @@ const { generateWorkflowGuide } = require('./lib/docs');
22
24
 
23
25
  async function main() {
24
26
  console.clear();
25
- intro(pc.bgMagenta(pc.white(' UNIVERSAL SPEC CLI ')));
27
+
28
+ const args = process.argv.slice(2);
29
+ const isUpgrade = args.includes('upgrade') || args.includes('--upgrade');
26
30
 
27
- // 1. Scaffold Automático (Sempre executa)
28
- const created = generateWorkflowGuide(process.cwd());
29
- if (created) {
30
- console.log(pc.green('✔ Estrutura de pastas (docs/) verificada.'));
31
+ // 0. Language Selection (Always first unless forced upgrade silent mode - but upgrade has interaction)
32
+ // We show this before Upgrade title to ensure upgrade messages are localized too if possible
33
+ // But typically flags like --lang would be better. For now, interactive.
34
+
35
+ if (!isUpgrade) {
36
+ intro(pc.bgMagenta(pc.white(' UNIVERSAL SPEC CLI ')));
37
+
38
+ const lang = await select({
39
+ message: 'Select Language / Selecione o Idioma / Seleccione el Idioma',
40
+ options: [
41
+ { value: 'en', label: 'English' },
42
+ { value: 'pt_br', label: 'Português (Brasil)' },
43
+ { value: 'es', label: 'Español' }
44
+ ]
45
+ });
46
+
47
+ if (typeof lang === 'symbol') {
48
+ outro(pc.yellow('Operation cancelled.'));
49
+ process.exit(0);
50
+ }
51
+
52
+ setLocale(lang);
53
+ } else {
54
+ // Default EN for upgrade for now
55
+ setLocale('en');
56
+ }
57
+
58
+ if (isUpgrade) {
59
+ intro(pc.bgBlue(pc.white(t('INTRO.UPGRADE_TITLE'))));
60
+
61
+ // Detecção de Ferramentas Existentes
62
+ const tools = [];
63
+ if (fs.existsSync(path.join(process.cwd(), '.gemini'))) tools.push('gemini');
64
+ if (fs.existsSync(path.join(process.cwd(), '.roo'))) tools.push('roo');
65
+ if (fs.existsSync(path.join(process.cwd(), '.cline'))) tools.push('cline');
66
+ if (fs.existsSync(path.join(process.cwd(), '.cursor'))) tools.push('cursor');
67
+ if (fs.existsSync(path.join(process.cwd(), '.windsurfrules'))) tools.push('windsurf');
68
+ if (fs.existsSync(path.join(process.cwd(), '.trae'))) tools.push('trae');
69
+ if (fs.existsSync(path.join(process.cwd(), '.kilo'))) tools.push('kilo');
70
+ if (fs.existsSync(path.join(process.cwd(), '.github'))) tools.push('copilot'); // Assume copilot se .github existir
71
+ if (fs.existsSync(path.join(process.cwd(), '.opencode'))) tools.push('opencode');
72
+ if (fs.existsSync(path.join(process.cwd(), 'prompts'))) tools.push('web');
73
+
74
+ if (tools.length === 0) {
75
+ note(t('UPGRADE.NO_CONFIG'), t('UPGRADE.NO_CONFIG_TITLE'));
76
+ } else {
77
+ note(t('UPGRADE.DETECTED_TOOLS', tools.join(', ')), t('UPGRADE.DETECTED_TITLE'));
78
+ await processAgentsInstallation(tools, { locale: getLocale() });
79
+ outro(pc.green(t('UPGRADE.SUCCESS')));
80
+ process.exit(0);
81
+ }
82
+ }
83
+
84
+ // 1. Automatic Scaffold
85
+ const s = spinner();
86
+ s.start(t('SCAFFOLD.LOADING'));
87
+
88
+ try {
89
+ const stats = generateWorkflowGuide(process.cwd());
90
+ if (stats.created > 0) {
91
+ s.stop(`${t('SCAFFOLD.SUCCESS')} (${stats.created} new, ${stats.verified} verified)`);
92
+ } else {
93
+ s.stop(t('SCAFFOLD.ALREADY_EXISTS'));
94
+ }
95
+ } catch (e) {
96
+ s.stop(pc.red(t('SCAFFOLD.ERROR')));
31
97
  }
32
98
 
33
- // 2. Seleção de Ferramentas (Múltipla escolha)
99
+ // 2. Feature 5: Stack Selection (Profile)
100
+ const stackOptions = Object.entries(STACK_PROFILES).map(([key, profile]) => ({
101
+ value: key,
102
+ label: profile.label
103
+ }));
104
+
105
+ const stackProfile = await select({
106
+ message: t('SETUP.STACK_SELECT'),
107
+ options: stackOptions,
108
+ initialValue: 'generic'
109
+ });
110
+
111
+ if (typeof stackProfile === 'symbol') {
112
+ outro(pc.yellow(t('GENERAL.CANCELLED')));
113
+ process.exit(0);
114
+ }
115
+
116
+ // 3. Feature 3: Global Rules (Optional)
117
+ const globalRules = await text({
118
+ message: t('SETUP.GLOBAL_RULES'),
119
+ placeholder: t('SETUP.GLOBAL_RULES_HINT'),
120
+ required: false
121
+ });
122
+
123
+ if (typeof globalRules === 'symbol') {
124
+ outro(pc.yellow(t('GENERAL.CANCELLED')));
125
+ process.exit(0);
126
+ }
127
+
128
+ // 4. Tool Selection (Multiple choice)
34
129
  const tools = await multiselect({
35
- message: 'Para quais ferramentas você deseja instalar os Agentes?',
130
+ message: t('SETUP.TOOL_SELECT'),
36
131
  options: [
37
- { value: 'gemini', label: 'Gemini CLI', hint: '.gemini/commands/dev' },
38
- { value: 'roo', label: 'Roo Code', hint: '.roo/ & custom_modes.json' },
39
- { value: 'cline', label: 'Cline', hint: '.cline/ & custom_modes.json' },
40
- { value: 'cursor', label: 'Cursor', hint: '.cursor/rules/*.mdc' },
41
- { value: 'windsurf', label: 'Windsurf', hint: '.windsurfrules' },
42
- { value: 'trae', label: 'Trae IDE', hint: '.trae/instructions.md' },
43
- { value: 'kilo', label: 'Kilo Code', hint: '.kilo/prompts/*.md' },
44
- { value: 'copilot', label: 'GitHub Copilot', hint: '.github/copilot-instructions.md' },
45
- { value: 'web', label: 'OpenAI / Claude', hint: 'prompts/*.txt' },
46
- { value: 'opencode', label: 'OpenCode', hint: '.opencode/*.md' },
132
+ { value: 'gemini', label: t('TOOLS.GEMINI'), hint: '.gemini/commands/dev' },
133
+ { value: 'roo', label: t('TOOLS.ROO'), hint: '.roo/ & custom_modes.json' },
134
+ { value: 'cline', label: t('TOOLS.CLINE'), hint: '.cline/ & custom_modes.json' },
135
+ { value: 'cursor', label: t('TOOLS.CURSOR'), hint: '.cursor/rules/*.mdc' },
136
+ { value: 'windsurf', label: t('TOOLS.WINDSURF'), hint: '.windsurfrules' },
137
+ { value: 'trae', label: t('TOOLS.TRAE'), hint: '.trae/instructions.md' },
138
+ { value: 'kilo', label: t('TOOLS.KILO'), hint: '.kilo/prompts/*.md' },
139
+ { value: 'copilot', label: t('TOOLS.COPILOT'), hint: '.github/copilot-instructions.md' },
140
+ { value: 'web', label: t('TOOLS.WEB'), hint: 'prompts/*.txt' },
141
+ { value: 'opencode', label: t('TOOLS.OPENCODE'), hint: '.opencode/*.md' },
47
142
  ],
48
143
  required: true,
49
- hint: 'Espaço para selecionar, Enter para confirmar'
144
+ hint: t('SETUP.TOOL_HINT')
50
145
  });
51
146
 
147
+ if (typeof tools === 'symbol') {
148
+ outro(pc.yellow(t('GENERAL.CANCELLED')));
149
+ process.exit(0);
150
+ }
151
+
52
152
  if (!tools || tools.length === 0) {
53
- outro('Nenhuma ferramenta selecionada. Operação cancelada.');
153
+ outro(t('SETUP.NO_TOOLS'));
54
154
  process.exit(0);
55
155
  }
56
156
 
57
- await processAgentsInstallation(tools);
157
+ // Pass locale to installation process
158
+ await processAgentsInstallation(tools, { stackProfile, globalRules, locale: getLocale() });
58
159
 
59
- outro(pc.green('Configuração concluída com sucesso! 🚀'));
160
+ outro(pc.green(t('SETUP.SUCCESS')));
60
161
  }
61
162
 
62
- async function processAgentsInstallation(tools) {
163
+ async function processAgentsInstallation(tools, options) {
63
164
  const s = spinner();
64
- s.start('Carregando definições...');
165
+ s.start(t('INSTALL.LOADING'));
65
166
 
66
167
  try {
67
- const validAgents = await loadAgents();
168
+ const validAgents = await loadAgents(options);
68
169
 
69
170
  if (validAgents.length === 0) {
70
- s.stop('Nenhum agente válido encontrado.');
171
+ s.stop(t('INSTALL.NO_AGENTS'));
71
172
  return;
72
173
  }
73
174
 
74
- s.message(`Instalando agentes para: ${tools.join(', ')}...`);
175
+ s.message(t('INSTALL.INSTALLING', tools.join(', ')));
75
176
 
76
- // Itera sobre cada ferramenta selecionada
177
+ // Iterate over each selected tool
77
178
  for (const tool of tools) {
78
179
 
79
- // Instalação Específica por Ferramenta
180
+ // Tool-Specific Installation
80
181
  if (tool === 'gemini') {
81
182
  const targetDir = path.join(process.cwd(), '.gemini', 'commands', 'dev');
82
183
  await fsp.mkdir(targetDir, { recursive: true });
83
184
 
84
185
  await Promise.all(validAgents.map(agent => {
85
- const toml = toGeminiTOML(agent);
186
+ const toml = toGeminiTOML(agent, options);
86
187
  const fileName = `${agent.originalName}.toml`;
87
188
  return fsp.writeFile(path.join(targetDir, fileName), toml);
88
189
  }));
@@ -93,11 +194,11 @@ async function processAgentsInstallation(tools) {
93
194
  await fsp.mkdir(targetDir, { recursive: true });
94
195
 
95
196
  await Promise.all(validAgents.map(agent => {
96
- const md = toKiloMarkdown(agent);
197
+ const md = toKiloMarkdown(agent, options);
97
198
  return fsp.writeFile(path.join(targetDir, `${agent.slug}.md`), md);
98
199
  }));
99
200
 
100
- const modes = validAgents.map(agent => toRooConfig(agent, agent.slug));
201
+ const modes = validAgents.map(agent => toRooConfig(agent, agent.slug, options));
101
202
  const jsonContent = JSON.stringify({ customModes: modes }, null, 2);
102
203
  const fileName = `${tool}_custom_modes.json`;
103
204
  await fsp.writeFile(path.join(process.cwd(), fileName), jsonContent);
@@ -107,7 +208,7 @@ async function processAgentsInstallation(tools) {
107
208
  await fsp.mkdir(targetDir, { recursive: true });
108
209
 
109
210
  await Promise.all(validAgents.map(agent => {
110
- const md = toKiloMarkdown(agent);
211
+ const md = toKiloMarkdown(agent, options);
111
212
  return fsp.writeFile(path.join(targetDir, `${agent.slug}.md`), md);
112
213
  }));
113
214
  }
@@ -117,12 +218,12 @@ async function processAgentsInstallation(tools) {
117
218
  await fsp.mkdir(agentsDir, { recursive: true });
118
219
 
119
220
  await Promise.all(validAgents.map(agent => {
120
- const md = toCopilotInstructions(agent);
221
+ const md = toCopilotInstructions(agent, options);
121
222
  return fsp.writeFile(path.join(agentsDir, `${agent.slug}.md`), md);
122
223
  }));
123
224
 
124
225
  const mainAgent = validAgents.find(a => a.slug.includes('coder')) || validAgents[0];
125
- const mainInstructions = toCopilotInstructions(mainAgent);
226
+ const mainInstructions = toCopilotInstructions(mainAgent, options);
126
227
  await fsp.writeFile(path.join(githubDir, 'copilot-instructions.md'), mainInstructions);
127
228
  }
128
229
  else if (tool === 'cursor') {
@@ -130,13 +231,13 @@ async function processAgentsInstallation(tools) {
130
231
  await fsp.mkdir(rulesDir, { recursive: true });
131
232
 
132
233
  await Promise.all(validAgents.map(agent => {
133
- const mdc = toCursorMDC(agent);
234
+ const mdc = toCursorMDC(agent, options);
134
235
  return fsp.writeFile(path.join(rulesDir, `${agent.slug}.mdc`), mdc);
135
236
  }));
136
237
  }
137
238
  else if (tool === 'windsurf') {
138
239
  const mainAgent = validAgents.find(a => a.slug.includes('coder')) || validAgents[0];
139
- const rules = toWindsurfRules(mainAgent);
240
+ const rules = toWindsurfRules(mainAgent, options);
140
241
  await fsp.writeFile(path.join(process.cwd(), '.windsurfrules'), rules);
141
242
  }
142
243
  else if (tool === 'trae') {
@@ -144,7 +245,7 @@ async function processAgentsInstallation(tools) {
144
245
  await fsp.mkdir(traeDir, { recursive: true });
145
246
 
146
247
  const mainAgent = validAgents.find(a => a.slug.includes('coder')) || validAgents[0];
147
- const rules = toTraeRules(mainAgent);
248
+ const rules = toTraeRules(mainAgent, options);
148
249
  await fsp.writeFile(path.join(traeDir, 'instructions.md'), rules);
149
250
  }
150
251
  else if (tool === 'web') {
@@ -152,7 +253,7 @@ async function processAgentsInstallation(tools) {
152
253
  await fsp.mkdir(targetDir, { recursive: true });
153
254
 
154
255
  await Promise.all(validAgents.map(agent => {
155
- const txt = toPlainSystemPrompt(agent);
256
+ const txt = toPlainSystemPrompt(agent, options);
156
257
  return fsp.writeFile(path.join(targetDir, `${agent.slug}.txt`), txt);
157
258
  }));
158
259
  }
@@ -161,22 +262,22 @@ async function processAgentsInstallation(tools) {
161
262
  await fsp.mkdir(targetDir, { recursive: true });
162
263
 
163
264
  await Promise.all(validAgents.map(agent => {
164
- const md = toKiloMarkdown(agent);
265
+ const md = toKiloMarkdown(agent, options);
165
266
  return fsp.writeFile(path.join(targetDir, `${agent.slug}.md`), md);
166
267
  }));
167
268
  }
168
269
  }
169
270
 
170
- s.stop('Instalação finalizada!');
271
+ s.stop(t('INSTALL.FINISHED'));
171
272
 
172
- // Feedback consolidado
273
+ // Consolidated feedback
173
274
  if (tools.includes('roo') || tools.includes('cline')) {
174
- note('Lembre-se de configurar os Custom Modes no settings.json para Roo/Cline.', 'Aviso');
275
+ note(t('INSTALL.ROO_WARNING'), t('INSTALL.ROO_WARNING_TITLE'));
175
276
  }
176
277
 
177
278
  } catch (e) {
178
- s.stop('Falha');
179
- console.error(pc.red(e.message));
279
+ s.stop(pc.red(`${t('INSTALL.FAILED')}: ${e.message}`));
280
+ process.exit(1);
180
281
  }
181
282
  }
182
283