sdd-toolkit 2.1.0 → 3.1.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.
- package/README.md +22 -22
- package/definitions/AGENTS.md +114 -0
- package/definitions/RULES.md +248 -0
- package/definitions/sdd-backend.yaml +427 -0
- package/definitions/sdd-coder.yaml +237 -161
- package/definitions/sdd-feature.yaml +272 -140
- package/definitions/sdd-frontend.yaml +423 -0
- package/definitions/sdd-log.yaml +70 -70
- package/definitions/sdd-project.yaml +298 -179
- package/definitions/sdd-prompt.yaml +334 -0
- package/definitions/sdd-requirements.yaml +323 -136
- package/definitions/sdd-review.yaml +197 -105
- package/definitions/sdd-security.yaml +335 -0
- package/definitions/sdd-test.yaml +369 -0
- package/definitions/skills/brownfield-setup/SKILL.md +119 -0
- package/definitions/skills/detect-manifest/SKILL.md +97 -0
- package/definitions/skills/feature-templates/SKILL.md +136 -0
- package/definitions/skills/handover-protocol/SKILL.md +62 -0
- package/definitions/skills/stack-interview/SKILL.md +124 -0
- package/package.json +1 -1
- package/src/index.js +28 -192
- package/src/lib/handlers/antigravity.js +34 -0
- package/src/lib/handlers/claude.js +40 -0
- package/src/lib/handlers/cursor.js +34 -0
- package/src/lib/handlers/gemini.js +34 -0
- package/src/lib/handlers/index.js +17 -0
- package/src/lib/handlers/kilo.js +34 -0
- package/src/lib/handlers/opencode.js +36 -0
- package/src/lib/handlers/roo.js +27 -0
- package/src/lib/transformers.js +235 -3
- package/definitions/sdd.yaml +0 -29
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const fsp = require('fs/promises');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { toCursorMDC, toCursorSkill } = require('../transformers');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Handles installation for Cursor
|
|
7
|
+
* @param {Array} agents - List of agents to install
|
|
8
|
+
* @param {Object} options - Installation options
|
|
9
|
+
*/
|
|
10
|
+
async function install(agents, options) {
|
|
11
|
+
const commandsDir = path.join(process.cwd(), '.cursor', 'commands');
|
|
12
|
+
const skillsDir = path.join(process.cwd(), '.cursor', 'skills');
|
|
13
|
+
|
|
14
|
+
await fsp.mkdir(commandsDir, { recursive: true });
|
|
15
|
+
await fsp.mkdir(skillsDir, { recursive: true });
|
|
16
|
+
|
|
17
|
+
await Promise.all(
|
|
18
|
+
agents.map(async (agent) => {
|
|
19
|
+
const skillName = agent.slug.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
20
|
+
|
|
21
|
+
// Generate Commands (.mdc)
|
|
22
|
+
const mdc = toCursorMDC(agent, options);
|
|
23
|
+
await fsp.writeFile(path.join(commandsDir, `${agent.slug}.mdc`), mdc);
|
|
24
|
+
|
|
25
|
+
// Generate Skills (SKILL.md)
|
|
26
|
+
const skillDir = path.join(skillsDir, skillName);
|
|
27
|
+
await fsp.mkdir(skillDir, { recursive: true });
|
|
28
|
+
const skill = toCursorSkill(agent, options);
|
|
29
|
+
await fsp.writeFile(path.join(skillDir, 'SKILL.md'), skill);
|
|
30
|
+
})
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
module.exports = { install };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const fsp = require('fs/promises');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { toGeminiTOML, toGeminiSkill } = require('../transformers');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Handles installation for Gemini
|
|
7
|
+
* @param {Array} agents - List of agents to install
|
|
8
|
+
* @param {Object} options - Installation options
|
|
9
|
+
*/
|
|
10
|
+
async function install(agents, options) {
|
|
11
|
+
const commandsDir = path.join(process.cwd(), '.gemini', 'commands', 'dev');
|
|
12
|
+
const skillsDir = path.join(process.cwd(), '.gemini', 'skills');
|
|
13
|
+
|
|
14
|
+
await fsp.mkdir(commandsDir, { recursive: true });
|
|
15
|
+
await fsp.mkdir(skillsDir, { recursive: true });
|
|
16
|
+
|
|
17
|
+
await Promise.all(
|
|
18
|
+
agents.map(async (agent) => {
|
|
19
|
+
// Generate Command (TOML)
|
|
20
|
+
const toml = toGeminiTOML(agent, options);
|
|
21
|
+
const fileName = `${agent.originalName}.toml`;
|
|
22
|
+
await fsp.writeFile(path.join(commandsDir, fileName), toml);
|
|
23
|
+
|
|
24
|
+
// Generate Skill
|
|
25
|
+
const skillName = agent.slug.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
26
|
+
const agentSkillDir = path.join(skillsDir, skillName);
|
|
27
|
+
await fsp.mkdir(agentSkillDir, { recursive: true });
|
|
28
|
+
const skillContent = toGeminiSkill(agent, options);
|
|
29
|
+
await fsp.writeFile(path.join(agentSkillDir, 'SKILL.md'), skillContent);
|
|
30
|
+
})
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
module.exports = { install };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const gemini = require('./gemini');
|
|
2
|
+
const roo = require('./roo');
|
|
3
|
+
const claude = require('./claude');
|
|
4
|
+
const cursor = require('./cursor');
|
|
5
|
+
const kilo = require('./kilo');
|
|
6
|
+
const opencode = require('./opencode');
|
|
7
|
+
const antigravity = require('./antigravity');
|
|
8
|
+
|
|
9
|
+
module.exports = {
|
|
10
|
+
gemini,
|
|
11
|
+
roo,
|
|
12
|
+
claude,
|
|
13
|
+
cursor,
|
|
14
|
+
kilo,
|
|
15
|
+
opencode,
|
|
16
|
+
antigravity
|
|
17
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const fsp = require('fs/promises');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { toKiloMarkdown, toKiloSkill } = require('../transformers');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Handles installation for Kilo Code
|
|
7
|
+
* @param {Array} agents - List of agents to install
|
|
8
|
+
* @param {Object} options - Installation options
|
|
9
|
+
*/
|
|
10
|
+
async function install(agents, options) {
|
|
11
|
+
const workflowsDir = path.join(process.cwd(), '.kilocode', 'workflows');
|
|
12
|
+
const skillsDir = path.join(process.cwd(), '.kilocode', 'skills');
|
|
13
|
+
|
|
14
|
+
await fsp.mkdir(workflowsDir, { recursive: true });
|
|
15
|
+
await fsp.mkdir(skillsDir, { recursive: true });
|
|
16
|
+
|
|
17
|
+
await Promise.all(
|
|
18
|
+
agents.map(async (agent) => {
|
|
19
|
+
const skillName = agent.slug.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
20
|
+
|
|
21
|
+
// Generate Workflow
|
|
22
|
+
const workflow = toKiloMarkdown(agent, options);
|
|
23
|
+
await fsp.writeFile(path.join(workflowsDir, `${agent.slug}.md`), workflow);
|
|
24
|
+
|
|
25
|
+
// Generate Skill
|
|
26
|
+
const agentSkillDir = path.join(skillsDir, skillName);
|
|
27
|
+
await fsp.mkdir(agentSkillDir, { recursive: true });
|
|
28
|
+
const skill = toKiloSkill(agent, options);
|
|
29
|
+
await fsp.writeFile(path.join(agentSkillDir, 'SKILL.md'), skill);
|
|
30
|
+
})
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
module.exports = { install };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const fsp = require('fs/promises');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { toOpenCodeSkill, toOpenCodeSubagent } = require('../transformers');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Handles installation for OpenCode
|
|
7
|
+
* @param {Array} agents - List of agents to install
|
|
8
|
+
* @param {Object} options - Installation options
|
|
9
|
+
*/
|
|
10
|
+
async function install(agents, options) {
|
|
11
|
+
const skillsDir = path.join(process.cwd(), '.opencode', 'skills');
|
|
12
|
+
const agentsDir = path.join(process.cwd(), '.opencode', 'agents');
|
|
13
|
+
|
|
14
|
+
// Ensure base directories exist
|
|
15
|
+
await fsp.mkdir(skillsDir, { recursive: true });
|
|
16
|
+
await fsp.mkdir(agentsDir, { recursive: true });
|
|
17
|
+
|
|
18
|
+
await Promise.all(
|
|
19
|
+
agents.map(async (agent) => {
|
|
20
|
+
// Ensure compatibility with naming rules (lowercase, alphanumeric, single hyphens)
|
|
21
|
+
const skillName = agent.slug.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
22
|
+
|
|
23
|
+
// Generate Skill: .opencode/skills/[agent-slug]/SKILL.md
|
|
24
|
+
const agentSkillDir = path.join(skillsDir, skillName);
|
|
25
|
+
await fsp.mkdir(agentSkillDir, { recursive: true });
|
|
26
|
+
const skillContent = toOpenCodeSkill(agent, options);
|
|
27
|
+
await fsp.writeFile(path.join(agentSkillDir, 'SKILL.md'), skillContent);
|
|
28
|
+
|
|
29
|
+
// Generate Subagent: .opencode/agents/[agent-slug].md
|
|
30
|
+
const subagentContent = toOpenCodeSubagent(agent, options);
|
|
31
|
+
await fsp.writeFile(path.join(agentsDir, `${skillName}.md`), subagentContent);
|
|
32
|
+
})
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
module.exports = { install };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const fsp = require('fs/promises');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { toRooSkill } = require('../transformers');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Handles installation for Roo Code
|
|
7
|
+
* @param {Array} agents - List of agents to install
|
|
8
|
+
* @param {Object} options - Installation options
|
|
9
|
+
*/
|
|
10
|
+
async function install(agents, options) {
|
|
11
|
+
const skillsDir = path.join(process.cwd(), '.roo', 'skills');
|
|
12
|
+
await fsp.mkdir(skillsDir, { recursive: true });
|
|
13
|
+
|
|
14
|
+
await Promise.all(
|
|
15
|
+
agents.map(async (agent) => {
|
|
16
|
+
const skillName = agent.slug.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
17
|
+
|
|
18
|
+
// Generate Skill: .roo/skills/[agent-slug]/SKILL.md
|
|
19
|
+
const agentSkillDir = path.join(skillsDir, skillName);
|
|
20
|
+
await fsp.mkdir(agentSkillDir, { recursive: true });
|
|
21
|
+
const skillContent = toRooSkill(agent, options);
|
|
22
|
+
await fsp.writeFile(path.join(agentSkillDir, 'SKILL.md'), skillContent);
|
|
23
|
+
})
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
module.exports = { install };
|
package/src/lib/transformers.js
CHANGED
|
@@ -66,6 +66,32 @@ function toGeminiTOML(agent, options = {}) {
|
|
|
66
66
|
return toml;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Converte para Gemini CLI Skill (.gemini/skills/<name>/SKILL.md)
|
|
71
|
+
* Ref: https://github.com/google-gemini/gemini-cli
|
|
72
|
+
*/
|
|
73
|
+
function toGeminiSkill(agent, options = {}) {
|
|
74
|
+
const languageRule = getLanguageRule(options.locale);
|
|
75
|
+
const allRules = [languageRule, ...(agent.rules || [])];
|
|
76
|
+
|
|
77
|
+
// Generate trigger description for Gemini to know when to activate
|
|
78
|
+
const triggerHints = `Use when working on ${agent.role.toLowerCase()} tasks.`;
|
|
79
|
+
|
|
80
|
+
return `---
|
|
81
|
+
name: ${agent.slug.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '')}
|
|
82
|
+
description: ${agent.description || agent.role}. ${triggerHints}
|
|
83
|
+
---
|
|
84
|
+
# ${agent.name} ${agent.emoji}
|
|
85
|
+
|
|
86
|
+
**Role**: ${agent.role}
|
|
87
|
+
|
|
88
|
+
## Instructions
|
|
89
|
+
${agent.systemPrompt.trim()}
|
|
90
|
+
|
|
91
|
+
${allRules.length > 0 ? '## Rules & Guidelines\n' + allRules.map(r => `- ${r}`).join('\n') : ''}
|
|
92
|
+
`;
|
|
93
|
+
}
|
|
94
|
+
|
|
69
95
|
/**
|
|
70
96
|
* Converte para configuração de Custom Mode do Roo Code / Cline (JSON)
|
|
71
97
|
*/
|
|
@@ -89,6 +115,34 @@ function toRooConfig(agent, slug, options = {}) {
|
|
|
89
115
|
};
|
|
90
116
|
}
|
|
91
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Converte para Roo Code Skill (.roo/skills/<nome>/SKILL.md)
|
|
120
|
+
* Ref: https://docs.roocode.com/features/skills
|
|
121
|
+
*/
|
|
122
|
+
function toRooSkill(agent, options = {}) {
|
|
123
|
+
const languageRule = getLanguageRule(options.locale);
|
|
124
|
+
const allRules = [languageRule, ...(agent.rules || [])];
|
|
125
|
+
const skillName = agent.slug.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
126
|
+
|
|
127
|
+
return `---
|
|
128
|
+
name: ${skillName}
|
|
129
|
+
description: ${agent.description || agent.role}. Use when working on ${agent.role.toLowerCase()} tasks.
|
|
130
|
+
---
|
|
131
|
+
# ${agent.name} ${agent.emoji}
|
|
132
|
+
|
|
133
|
+
**Role**: ${agent.role}
|
|
134
|
+
|
|
135
|
+
## When to Use
|
|
136
|
+
- Use this skill when working on ${agent.role.toLowerCase()} tasks
|
|
137
|
+
- This skill is helpful for ${agent.description || agent.role}
|
|
138
|
+
|
|
139
|
+
## Instructions
|
|
140
|
+
${agent.systemPrompt.trim()}
|
|
141
|
+
|
|
142
|
+
${allRules.length > 0 ? '## Rules & Guidelines\n' + allRules.map(r => `- ${r}`).join('\n') : ''}
|
|
143
|
+
`;
|
|
144
|
+
}
|
|
145
|
+
|
|
92
146
|
/**
|
|
93
147
|
* Converte para Markdown do Kilo Code
|
|
94
148
|
*/
|
|
@@ -113,6 +167,30 @@ function toKiloMarkdown(agent, options = {}) {
|
|
|
113
167
|
return parts.join('\n');
|
|
114
168
|
}
|
|
115
169
|
|
|
170
|
+
/**
|
|
171
|
+
* Converte para Kilo Code Skill (.kilocode/skills/<name>/SKILL.md)
|
|
172
|
+
* Ref: https://kilo.ai/docs/skills
|
|
173
|
+
*/
|
|
174
|
+
function toKiloSkill(agent, options = {}) {
|
|
175
|
+
const languageRule = getLanguageRule(options.locale);
|
|
176
|
+
const allRules = [languageRule, ...(agent.rules || [])];
|
|
177
|
+
const skillName = agent.slug.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
178
|
+
|
|
179
|
+
return `---
|
|
180
|
+
name: ${skillName}
|
|
181
|
+
description: ${agent.description || agent.role}. Use when working on ${agent.role.toLowerCase()} tasks.
|
|
182
|
+
---
|
|
183
|
+
# ${agent.name} ${agent.emoji}
|
|
184
|
+
|
|
185
|
+
**Role**: ${agent.role}
|
|
186
|
+
|
|
187
|
+
## Instructions
|
|
188
|
+
${agent.systemPrompt.trim()}
|
|
189
|
+
|
|
190
|
+
${allRules.length > 0 ? '## Rules & Guidelines\n' + allRules.map(r => `- ${r}`).join('\n') : ''}
|
|
191
|
+
`;
|
|
192
|
+
}
|
|
193
|
+
|
|
116
194
|
/**
|
|
117
195
|
* Converte para Instruções do GitHub Copilot (.github/copilot-instructions.md)
|
|
118
196
|
*/
|
|
@@ -174,6 +252,34 @@ ${allRules.length > 0 ? '## Rules\n' + allRules.map(r => `- ${r}`).join('\n') :
|
|
|
174
252
|
`;
|
|
175
253
|
}
|
|
176
254
|
|
|
255
|
+
/**
|
|
256
|
+
* Converte para Cursor Skill (.cursor/skills/<nome>/SKILL.md)
|
|
257
|
+
* Formato oficial: https://cursor.com/docs/context/skills
|
|
258
|
+
*/
|
|
259
|
+
function toCursorSkill(agent, options = {}) {
|
|
260
|
+
const languageRule = getLanguageRule(options.locale);
|
|
261
|
+
const allRules = [languageRule, ...(agent.rules || [])];
|
|
262
|
+
const skillName = agent.slug.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
263
|
+
|
|
264
|
+
return `---
|
|
265
|
+
name: ${skillName}
|
|
266
|
+
description: ${agent.description || agent.role}. Use when working on ${agent.role.toLowerCase()} tasks.
|
|
267
|
+
---
|
|
268
|
+
# ${agent.name} ${agent.emoji}
|
|
269
|
+
|
|
270
|
+
**Role**: ${agent.role}
|
|
271
|
+
|
|
272
|
+
## When to Use
|
|
273
|
+
- Use this skill when working on ${agent.role.toLowerCase()} tasks
|
|
274
|
+
- This skill is helpful for ${agent.description || agent.role}
|
|
275
|
+
|
|
276
|
+
## Instructions
|
|
277
|
+
${agent.systemPrompt.trim()}
|
|
278
|
+
|
|
279
|
+
${allRules.length > 0 ? '## Rules & Guidelines\\n' + allRules.map(r => `- ${r}`).join('\\n') : ''}
|
|
280
|
+
`;
|
|
281
|
+
}
|
|
282
|
+
|
|
177
283
|
/**
|
|
178
284
|
* Converte para Windsurf Workflow (.windsurf/workflows/*.md)
|
|
179
285
|
* Cascade reconhece esses arquivos como comandos de workflow
|
|
@@ -216,6 +322,60 @@ ${allRules.length > 0 ? '## Rules\n' + allRules.map(r => `- ${r}`).join('\n') :
|
|
|
216
322
|
`;
|
|
217
323
|
}
|
|
218
324
|
|
|
325
|
+
/**
|
|
326
|
+
* Converte para Claude Code Skill (.claude/skills/<name>/SKILL.md)
|
|
327
|
+
* Ref: https://docs.anthropic.com/en/docs/claude-code/skills
|
|
328
|
+
*/
|
|
329
|
+
function toClaudeSkill(agent, options = {}) {
|
|
330
|
+
const languageRule = getLanguageRule(options.locale);
|
|
331
|
+
const allRules = [languageRule, ...(agent.rules || [])];
|
|
332
|
+
const skillName = agent.slug.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
333
|
+
|
|
334
|
+
return `---
|
|
335
|
+
name: ${skillName}
|
|
336
|
+
description: ${agent.description || agent.role}. Use when working on ${agent.role.toLowerCase()} tasks.
|
|
337
|
+
---
|
|
338
|
+
# ${agent.name} ${agent.emoji}
|
|
339
|
+
|
|
340
|
+
**Role**: ${agent.role}
|
|
341
|
+
|
|
342
|
+
## Instructions
|
|
343
|
+
${agent.systemPrompt.trim()}
|
|
344
|
+
|
|
345
|
+
${allRules.length > 0 ? '## Rules & Guidelines\n' + allRules.map(r => `- ${r}`).join('\n') : ''}
|
|
346
|
+
`;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Converte para Claude Code Subagent (.claude/agents/<name>.md)
|
|
351
|
+
* Ref: https://docs.anthropic.com/en/docs/claude-code/sub-agents
|
|
352
|
+
*/
|
|
353
|
+
function toClaudeSubagent(agent, options = {}) {
|
|
354
|
+
const languageRule = getLanguageRule(options.locale);
|
|
355
|
+
const allRules = [languageRule, ...(agent.rules || [])];
|
|
356
|
+
|
|
357
|
+
// Determine tool permissions based on agent role
|
|
358
|
+
const roleLower = (agent.slug || '').toLowerCase();
|
|
359
|
+
const isReadOnly = roleLower.includes('review') || roleLower.includes('security') || roleLower.includes('qa');
|
|
360
|
+
const tools = isReadOnly ? 'Read, Glob, Grep' : 'Read, Edit, Write, Bash';
|
|
361
|
+
|
|
362
|
+
return `---
|
|
363
|
+
name: ${agent.slug.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '')}
|
|
364
|
+
description: ${agent.description || agent.role}
|
|
365
|
+
tools: ${tools}
|
|
366
|
+
model: sonnet
|
|
367
|
+
---
|
|
368
|
+
# ${agent.name} ${agent.emoji}
|
|
369
|
+
|
|
370
|
+
**Role**: ${agent.role}
|
|
371
|
+
|
|
372
|
+
## Instructions
|
|
373
|
+
${agent.systemPrompt.trim()}
|
|
374
|
+
|
|
375
|
+
${allRules.length > 0 ? '## Rules & Guidelines\n' + allRules.map(r => `- ${r}`).join('\n') : ''}
|
|
376
|
+
`;
|
|
377
|
+
}
|
|
378
|
+
|
|
219
379
|
/**
|
|
220
380
|
* Converte para System Prompt Puro (OpenAI/Claude/Web)
|
|
221
381
|
*/
|
|
@@ -304,15 +464,79 @@ ${allRules.length > 0 ? '## Constraints\n' + allRules.map(r => `- ${r}`).join('\
|
|
|
304
464
|
|
|
305
465
|
|
|
306
466
|
/**
|
|
307
|
-
* Converte para Antigravity Skill (SKILL.md)
|
|
467
|
+
* Converte para Antigravity Skill (.agent/skills/<nome>/SKILL.md)
|
|
468
|
+
* Ref: https://antigravity.google/docs/skills
|
|
308
469
|
*/
|
|
309
470
|
function toAntigravitySkill(agent, options = {}) {
|
|
310
471
|
const languageRule = getLanguageRule(options.locale);
|
|
311
472
|
const allRules = [languageRule, ...(agent.rules || [])];
|
|
473
|
+
const skillName = agent.slug.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
474
|
+
|
|
475
|
+
return `---
|
|
476
|
+
name: ${skillName}
|
|
477
|
+
description: ${agent.description || agent.role}. Use when working on ${agent.role.toLowerCase()} tasks.
|
|
478
|
+
---
|
|
479
|
+
# ${agent.name} ${agent.emoji}
|
|
480
|
+
|
|
481
|
+
**Role**: ${agent.role}
|
|
482
|
+
|
|
483
|
+
## When to Use
|
|
484
|
+
- Use this skill when working on ${agent.role.toLowerCase()} tasks
|
|
485
|
+
- This skill is helpful for ${agent.description || agent.role}
|
|
486
|
+
|
|
487
|
+
## Instructions
|
|
488
|
+
${agent.systemPrompt.trim()}
|
|
489
|
+
|
|
490
|
+
${allRules.length > 0 ? '## Rules & Guidelines\n' + allRules.map(r => `- ${r}`).join('\n') : ''}
|
|
491
|
+
`;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Converte para Antigravity Workflow (.agent/workflows/<nome>.md)
|
|
496
|
+
* Workflows são invocáveis via /workflow-name
|
|
497
|
+
* Ref: https://antigravity.google/docs/rules-workflows
|
|
498
|
+
*/
|
|
499
|
+
function toAntigravityWorkflow(agent, options = {}) {
|
|
500
|
+
const languageRule = getLanguageRule(options.locale);
|
|
501
|
+
const allRules = [languageRule, ...(agent.rules || [])];
|
|
502
|
+
|
|
503
|
+
return `# ${agent.name} ${agent.emoji}
|
|
504
|
+
|
|
505
|
+
${agent.description || agent.role}
|
|
506
|
+
|
|
507
|
+
## Steps
|
|
508
|
+
|
|
509
|
+
1. **Understand the Context**: Review the current codebase and requirements
|
|
510
|
+
2. **Apply Role**: Act as ${agent.role}
|
|
511
|
+
3. **Follow Instructions**: Execute according to the guidelines below
|
|
512
|
+
|
|
513
|
+
## Instructions
|
|
514
|
+
|
|
515
|
+
${agent.systemPrompt.trim()}
|
|
516
|
+
|
|
517
|
+
${allRules.length > 0 ? '## Rules & Guidelines\n' + allRules.map(r => `- ${r}`).join('\n') : ''}
|
|
518
|
+
`;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Converte para OpenCode Subagent (.opencode/agents/*.md)
|
|
523
|
+
* Ref: https://opencode.ai/docs/agents
|
|
524
|
+
*/
|
|
525
|
+
function toOpenCodeSubagent(agent, options = {}) {
|
|
526
|
+
const languageRule = getLanguageRule(options.locale);
|
|
527
|
+
const allRules = [languageRule, ...(agent.rules || [])];
|
|
528
|
+
|
|
529
|
+
// Determine tool permissions based on agent role
|
|
530
|
+
const roleLower = (agent.slug || '').toLowerCase();
|
|
531
|
+
const isReadOnly = roleLower.includes('review') || roleLower.includes('security') || roleLower.includes('qa');
|
|
312
532
|
|
|
313
533
|
return `---
|
|
314
|
-
name: ${agent.name}
|
|
315
534
|
description: ${agent.description || agent.role}
|
|
535
|
+
mode: subagent
|
|
536
|
+
tools:
|
|
537
|
+
write: ${!isReadOnly}
|
|
538
|
+
edit: ${!isReadOnly}
|
|
539
|
+
bash: ${!isReadOnly}
|
|
316
540
|
---
|
|
317
541
|
# ${agent.name} ${agent.emoji}
|
|
318
542
|
|
|
@@ -327,14 +551,22 @@ ${allRules.length > 0 ? '## Rules & Guidelines\n' + allRules.map(r => `- ${r}`).
|
|
|
327
551
|
|
|
328
552
|
module.exports = {
|
|
329
553
|
toGeminiTOML,
|
|
554
|
+
toGeminiSkill,
|
|
330
555
|
toRooConfig,
|
|
556
|
+
toRooSkill,
|
|
331
557
|
toKiloMarkdown,
|
|
558
|
+
toKiloSkill,
|
|
332
559
|
toCopilotInstructions,
|
|
333
560
|
toCursorMDC,
|
|
561
|
+
toCursorSkill,
|
|
334
562
|
toWindsurfRules,
|
|
335
563
|
toClaudeCommand,
|
|
564
|
+
toClaudeSkill,
|
|
565
|
+
toClaudeSubagent,
|
|
336
566
|
toPlainSystemPrompt,
|
|
337
567
|
toOpenCodeSkill,
|
|
568
|
+
toOpenCodeSubagent,
|
|
338
569
|
toTraeRules,
|
|
339
|
-
toAntigravitySkill
|
|
570
|
+
toAntigravitySkill,
|
|
571
|
+
toAntigravityWorkflow
|
|
340
572
|
};
|
package/definitions/sdd.yaml
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
name: SDD Helper
|
|
2
|
-
role: Agent Access Gateway
|
|
3
|
-
emoji: 🔑
|
|
4
|
-
systemPrompt: |
|
|
5
|
-
# Identity
|
|
6
|
-
You are the **SDD Helper** 🔑, providing quick access to all installed agents.
|
|
7
|
-
|
|
8
|
-
# Core Instructions
|
|
9
|
-
You are the central hub for accessing SDD Toolkit agents. When activated via "/sdd", provide an overview of available agents and how to use them.
|
|
10
|
-
|
|
11
|
-
## Available Agents
|
|
12
|
-
- **/sdd.project**: Project Architect 🏛️ - Defines project scope and vision.
|
|
13
|
-
- **/sdd.requirements**: Requirements Engineer 🔍 - Analyzes stack and technical requirements.
|
|
14
|
-
- **/sdd.feature**: Feature Manager ✨ - Manages features, milestones, and tasks.
|
|
15
|
-
- **/sdd.coder**: Coder 💻 - Implements code following SOLID principles.
|
|
16
|
-
- **/sdd.review**: QA Engineer 🔍 - Reviews and validates code quality.
|
|
17
|
-
- **/sdd.log**: Release Manager 📦 - Consolidates logs and manages changelog.
|
|
18
|
-
|
|
19
|
-
## Usage
|
|
20
|
-
- Type "/sdd" to see this help.
|
|
21
|
-
- Type "/<agent>" to activate a specific agent (e.g., "/project" for Project Architect).
|
|
22
|
-
- For workflows: Use "/flow:debug", "/flow:tdd", "/flow:refactor", etc., within the coding context.
|
|
23
|
-
|
|
24
|
-
Always respond in the user's language. If no specific command is given, display this help.
|
|
25
|
-
|
|
26
|
-
rules:
|
|
27
|
-
- "Respond in the user's language (English by default)."
|
|
28
|
-
- "Provide concise, actionable guidance."
|
|
29
|
-
- "Do not execute code or make changes; only guide access."
|