sdd-toolkit 2.0.2 → 3.0.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 +159 -158
- package/src/lib/messages.js +6 -3
- package/src/lib/transformers.js +272 -26
- package/definitions/sdd.yaml +0 -29
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
|
*/
|
|
@@ -252,44 +412,34 @@ ${allRules.length > 0 ? '## Constraints\n' + allRules.map(r => `- ${r}`).join('\
|
|
|
252
412
|
`;
|
|
253
413
|
}
|
|
254
414
|
|
|
415
|
+
|
|
255
416
|
/**
|
|
256
|
-
* Converte para OpenCode
|
|
417
|
+
* Converte para OpenCode Skill (SKILL.md)
|
|
418
|
+
* Ref: https://opencode.ai/docs/skills/
|
|
257
419
|
*/
|
|
258
|
-
function
|
|
420
|
+
function toOpenCodeSkill(agent, options = {}) {
|
|
259
421
|
const languageRule = getLanguageRule(options.locale);
|
|
260
422
|
const allRules = [languageRule, ...(agent.rules || [])];
|
|
261
423
|
|
|
262
|
-
//
|
|
263
|
-
const
|
|
264
|
-
const tools = {
|
|
265
|
-
write: !isReadOnly,
|
|
266
|
-
edit: !isReadOnly,
|
|
267
|
-
bash: !isReadOnly
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
const frontmatter = {
|
|
271
|
-
description: agent.description || agent.role,
|
|
272
|
-
mode: 'subagent',
|
|
273
|
-
temperature: 0.3,
|
|
274
|
-
tools
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
const frontmatterStr = Object.entries(frontmatter)
|
|
278
|
-
.map(([key, value]) => `${key}: ${JSON.stringify(value)}`)
|
|
279
|
-
.join('\n');
|
|
424
|
+
// Ensure slug is compliant (lowercase, alphanumeric, single hyphens)
|
|
425
|
+
const skillName = agent.slug.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
|
|
280
426
|
|
|
281
427
|
return `---
|
|
282
|
-
${
|
|
428
|
+
name: ${skillName}
|
|
429
|
+
description: ${agent.description || agent.role}
|
|
430
|
+
license: MIT
|
|
431
|
+
compatibility: opencode
|
|
432
|
+
metadata:
|
|
433
|
+
role: ${agent.role}
|
|
283
434
|
---
|
|
284
|
-
|
|
285
435
|
# ${agent.name} ${agent.emoji}
|
|
286
436
|
|
|
287
437
|
**Role**: ${agent.role}
|
|
288
438
|
|
|
439
|
+
## Instructions
|
|
289
440
|
${agent.systemPrompt.trim()}
|
|
290
441
|
|
|
291
|
-
## Rules
|
|
292
|
-
${allRules.map(rule => `- ${rule}`).join('\n')}
|
|
442
|
+
${allRules.length > 0 ? '## Rules & Guidelines\n' + allRules.map(r => `- ${r}`).join('\n') : ''}
|
|
293
443
|
`;
|
|
294
444
|
}
|
|
295
445
|
|
|
@@ -312,15 +462,111 @@ ${allRules.length > 0 ? '## Constraints\n' + allRules.map(r => `- ${r}`).join('\
|
|
|
312
462
|
`;
|
|
313
463
|
}
|
|
314
464
|
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Converte para Antigravity Skill (.agent/skills/<nome>/SKILL.md)
|
|
468
|
+
* Ref: https://antigravity.google/docs/skills
|
|
469
|
+
*/
|
|
470
|
+
function toAntigravitySkill(agent, options = {}) {
|
|
471
|
+
const languageRule = getLanguageRule(options.locale);
|
|
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');
|
|
532
|
+
|
|
533
|
+
return `---
|
|
534
|
+
description: ${agent.description || agent.role}
|
|
535
|
+
mode: subagent
|
|
536
|
+
tools:
|
|
537
|
+
write: ${!isReadOnly}
|
|
538
|
+
edit: ${!isReadOnly}
|
|
539
|
+
bash: ${!isReadOnly}
|
|
540
|
+
---
|
|
541
|
+
# ${agent.name} ${agent.emoji}
|
|
542
|
+
|
|
543
|
+
**Role**: ${agent.role}
|
|
544
|
+
|
|
545
|
+
## Instructions
|
|
546
|
+
${agent.systemPrompt.trim()}
|
|
547
|
+
|
|
548
|
+
${allRules.length > 0 ? '## Rules & Guidelines\n' + allRules.map(r => `- ${r}`).join('\n') : ''}
|
|
549
|
+
`;
|
|
550
|
+
}
|
|
551
|
+
|
|
315
552
|
module.exports = {
|
|
316
553
|
toGeminiTOML,
|
|
554
|
+
toGeminiSkill,
|
|
317
555
|
toRooConfig,
|
|
556
|
+
toRooSkill,
|
|
318
557
|
toKiloMarkdown,
|
|
558
|
+
toKiloSkill,
|
|
319
559
|
toCopilotInstructions,
|
|
320
560
|
toCursorMDC,
|
|
561
|
+
toCursorSkill,
|
|
321
562
|
toWindsurfRules,
|
|
322
563
|
toClaudeCommand,
|
|
564
|
+
toClaudeSkill,
|
|
565
|
+
toClaudeSubagent,
|
|
323
566
|
toPlainSystemPrompt,
|
|
324
|
-
|
|
325
|
-
|
|
567
|
+
toOpenCodeSkill,
|
|
568
|
+
toOpenCodeSubagent,
|
|
569
|
+
toTraeRules,
|
|
570
|
+
toAntigravitySkill,
|
|
571
|
+
toAntigravityWorkflow
|
|
326
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."
|