sdd-toolkit 1.9.2 → 2.0.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.
@@ -1,186 +1,186 @@
1
- /**
2
- * Technical Stack Profiles
3
- * Defines additional rules to be injected into agents
4
- */
5
-
6
- const STACK_PROFILES = {
7
- // --- GENERIC ---
8
- 'generic': {
9
- label: '🌐 Generic / None',
10
- rules: []
11
- },
12
-
13
- // --- FRONTEND ---
14
- 'frontend-react': {
15
- label: '🎨 Frontend: React + Tailwind',
16
- rules: [
17
- "Prefer Functional Components with Hooks.",
18
- "Use Tailwind CSS for styling. Avoid inline styles.",
19
- "Ensure accessibility (a11y) standards are met.",
20
- "Use strict type checking if TypeScript is enabled.",
21
- "Prefer React Query or SWR for data fetching."
22
- ]
23
- },
24
- 'frontend-next': {
25
- label: '🎨 Frontend: Next.js (App Router)',
26
- rules: [
27
- "Use App Router directory structure.",
28
- "Prefer Server Components by default; use 'use client' only when necessary.",
29
- "Optimize images using next/image.",
30
- "Use Server Actions for mutations."
31
- ]
32
- },
33
- 'frontend-vue': {
34
- label: '🎨 Frontend: Vue.js 3 + Pinia',
35
- rules: [
36
- "Use Composition API with <script setup>.",
37
- "Use Pinia for state management.",
38
- "Prefer Tailwind CSS or Scoped CSS.",
39
- "Follow the Vue Style Guide Priority A rules."
40
- ]
41
- },
42
- 'frontend-angular': {
43
- label: '🎨 Frontend: Angular',
44
- rules: [
45
- "Use Standalone Components.",
46
- "Prefer Signals over RxJS for synchronous state.",
47
- "Strictly follow the Angular Style Guide.",
48
- "Use Dependency Injection patterns."
49
- ]
50
- },
51
- 'frontend-svelte': {
52
- label: '🎨 Frontend: SvelteKit',
53
- rules: [
54
- "Use Svelte 5 Runes syntax if available.",
55
- "Leverage SvelteKit's load functions for server-side data.",
56
- "Keep stores simple and derived."
57
- ]
58
- },
59
-
60
- // --- BACKEND ---
61
- 'backend-node': {
62
- label: '⚙️ Backend: Node.js (Express)',
63
- rules: [
64
- "Prefer Async/Await over raw Promises.",
65
- "Follow Error Handling best practices (don't ignore errors).",
66
- "Use Environment Variables for configuration.",
67
- "Adhere to RESTful API standards."
68
- ]
69
- },
70
- 'backend-nest': {
71
- label: '⚙️ Backend: NestJS',
72
- rules: [
73
- "Use Dependency Injection strictly.",
74
- "Follow the module structure.",
75
- "Use DTOs with ValidationPipe for all inputs.",
76
- "Prefer TypeORM or Prisma for database interaction."
77
- ]
78
- },
79
- 'backend-python-fastapi': {
80
- label: '⚙️ Backend: Python (FastAPI)',
81
- rules: [
82
- "Use Pydantic models for data validation.",
83
- "Use Type Hints for function arguments and return values.",
84
- "Implement async/await for I/O bound operations.",
85
- "Follow PEP 8 style guidelines."
86
- ]
87
- },
88
- 'backend-python-django': {
89
- label: '⚙️ Backend: Python (Django)',
90
- rules: [
91
- "Use Class-Based Views (CBVs) where appropriate.",
92
- "Follow the 'Fat Models, Thin Views' philosophy.",
93
- "Use Django ORM optimizations (select_related, prefetch_related).",
94
- "Keep settings separated for dev/prod."
95
- ]
96
- },
97
- 'backend-java-spring': {
98
- label: '⚙️ Backend: Java (Spring Boot)',
99
- rules: [
100
- "Use constructor injection over @Autowired.",
101
- "Follow Google Java Style Guide.",
102
- "Use Lombok to reduce boilerplate code.",
103
- "Handle exceptions with @ControllerAdvice."
104
- ]
105
- },
106
- 'backend-csharp': {
107
- label: '⚙️ Backend: C# (.NET Core)',
108
- rules: [
109
- "Follow Microsoft's C# Coding Conventions.",
110
- "Use Async/Await all the way down.",
111
- "Prefer LINQ for collection manipulation.",
112
- "Use Dependency Injection via IServiceCollection."
113
- ]
114
- },
115
- 'backend-go': {
116
- label: '⚙️ Backend: Go (Golang)',
117
- rules: [
118
- "Handle errors explicitly (if err != nil).",
119
- "Follow strict formatting (gofmt).",
120
- "Prefer standard library over external dependencies when possible.",
121
- "Use context for cancellation and timeouts."
122
- ]
123
- },
124
-
125
- // --- MOBILE ---
126
- 'mobile-react-native': {
127
- label: '📱 Mobile: React Native',
128
- rules: [
129
- "Use Functional Components and Hooks.",
130
- "Avoid bridge passing heavy data.",
131
- "Optimize lists with FlatList or FlashList.",
132
- "Style using StyleSheet objects or styled-components."
133
- ]
134
- },
135
- 'mobile-flutter': {
136
- label: '📱 Mobile: Flutter',
137
- rules: [
138
- "Use const constructors whenever possible.",
139
- "Prefer Composition over Inheritance.",
140
- "Manage state with Riverpod or BLoC.",
141
- "Follow Effective Dart guidelines."
142
- ]
143
- },
144
- 'mobile-ios': {
145
- label: '📱 Mobile: iOS (SwiftUI)',
146
- rules: [
147
- "Use MVVM pattern.",
148
- "Prefer Structs over Classes for data models.",
149
- "Use strict concurrency checking.",
150
- "Follow Apple's Human Interface Guidelines."
151
- ]
152
- },
153
- 'mobile-android': {
154
- label: '📱 Mobile: Android (Kotlin Compose)',
155
- rules: [
156
- "Use Jetpack Compose for UI.",
157
- "Follow Material Design 3 guidelines.",
158
- "Use Coroutines and Flow for async work.",
159
- "Implement Hilt for Dependency Injection."
160
- ]
161
- },
162
-
163
- // --- DATA & AI ---
164
- 'data-python': {
165
- label: '📊 Data Science: Python',
166
- rules: [
167
- "Use Pandas vectorization over loops.",
168
- "Document notebooks with Markdown cells explaining logic.",
169
- "Use Type Hints even in scripts.",
170
- "Prefer Polars for large datasets if possible."
171
- ]
172
- },
173
-
174
- // --- INFRASTRUCTURE ---
175
- 'infra-terraform': {
176
- label: '☁️ Infra: Terraform',
177
- rules: [
178
- "Use modules for reusable resources.",
179
- "Keep state remote and locked.",
180
- "Format code with `terraform fmt`.",
181
- "Avoid hardcoding values; use variables."
182
- ]
183
- }
184
- };
185
-
186
- module.exports = { STACK_PROFILES };
1
+ /**
2
+ * Technical Stack Profiles
3
+ * Defines additional rules to be injected into agents
4
+ */
5
+
6
+ const STACK_PROFILES = {
7
+ // --- GENERIC ---
8
+ 'generic': {
9
+ label: '🌐 Generic / None',
10
+ rules: []
11
+ },
12
+
13
+ // --- FRONTEND ---
14
+ 'frontend-react': {
15
+ label: '🎨 Frontend: React + Tailwind',
16
+ rules: [
17
+ "Prefer Functional Components with Hooks.",
18
+ "Use Tailwind CSS for styling. Avoid inline styles.",
19
+ "Ensure accessibility (a11y) standards are met.",
20
+ "Use strict type checking if TypeScript is enabled.",
21
+ "Prefer React Query or SWR for data fetching."
22
+ ]
23
+ },
24
+ 'frontend-next': {
25
+ label: '🎨 Frontend: Next.js (App Router)',
26
+ rules: [
27
+ "Use App Router directory structure.",
28
+ "Prefer Server Components by default; use 'use client' only when necessary.",
29
+ "Optimize images using next/image.",
30
+ "Use Server Actions for mutations."
31
+ ]
32
+ },
33
+ 'frontend-vue': {
34
+ label: '🎨 Frontend: Vue.js 3 + Pinia',
35
+ rules: [
36
+ "Use Composition API with <script setup>.",
37
+ "Use Pinia for state management.",
38
+ "Prefer Tailwind CSS or Scoped CSS.",
39
+ "Follow the Vue Style Guide Priority A rules."
40
+ ]
41
+ },
42
+ 'frontend-angular': {
43
+ label: '🎨 Frontend: Angular',
44
+ rules: [
45
+ "Use Standalone Components.",
46
+ "Prefer Signals over RxJS for synchronous state.",
47
+ "Strictly follow the Angular Style Guide.",
48
+ "Use Dependency Injection patterns."
49
+ ]
50
+ },
51
+ 'frontend-svelte': {
52
+ label: '🎨 Frontend: SvelteKit',
53
+ rules: [
54
+ "Use Svelte 5 Runes syntax if available.",
55
+ "Leverage SvelteKit's load functions for server-side data.",
56
+ "Keep stores simple and derived."
57
+ ]
58
+ },
59
+
60
+ // --- BACKEND ---
61
+ 'backend-node': {
62
+ label: '⚙️ Backend: Node.js (Express)',
63
+ rules: [
64
+ "Prefer Async/Await over raw Promises.",
65
+ "Follow Error Handling best practices (don't ignore errors).",
66
+ "Use Environment Variables for configuration.",
67
+ "Adhere to RESTful API standards."
68
+ ]
69
+ },
70
+ 'backend-nest': {
71
+ label: '⚙️ Backend: NestJS',
72
+ rules: [
73
+ "Use Dependency Injection strictly.",
74
+ "Follow the module structure.",
75
+ "Use DTOs with ValidationPipe for all inputs.",
76
+ "Prefer TypeORM or Prisma for database interaction."
77
+ ]
78
+ },
79
+ 'backend-python-fastapi': {
80
+ label: '⚙️ Backend: Python (FastAPI)',
81
+ rules: [
82
+ "Use Pydantic models for data validation.",
83
+ "Use Type Hints for function arguments and return values.",
84
+ "Implement async/await for I/O bound operations.",
85
+ "Follow PEP 8 style guidelines."
86
+ ]
87
+ },
88
+ 'backend-python-django': {
89
+ label: '⚙️ Backend: Python (Django)',
90
+ rules: [
91
+ "Use Class-Based Views (CBVs) where appropriate.",
92
+ "Follow the 'Fat Models, Thin Views' philosophy.",
93
+ "Use Django ORM optimizations (select_related, prefetch_related).",
94
+ "Keep settings separated for dev/prod."
95
+ ]
96
+ },
97
+ 'backend-java-spring': {
98
+ label: '⚙️ Backend: Java (Spring Boot)',
99
+ rules: [
100
+ "Use constructor injection over @Autowired.",
101
+ "Follow Google Java Style Guide.",
102
+ "Use Lombok to reduce boilerplate code.",
103
+ "Handle exceptions with @ControllerAdvice."
104
+ ]
105
+ },
106
+ 'backend-csharp': {
107
+ label: '⚙️ Backend: C# (.NET Core)',
108
+ rules: [
109
+ "Follow Microsoft's C# Coding Conventions.",
110
+ "Use Async/Await all the way down.",
111
+ "Prefer LINQ for collection manipulation.",
112
+ "Use Dependency Injection via IServiceCollection."
113
+ ]
114
+ },
115
+ 'backend-go': {
116
+ label: '⚙️ Backend: Go (Golang)',
117
+ rules: [
118
+ "Handle errors explicitly (if err != nil).",
119
+ "Follow strict formatting (gofmt).",
120
+ "Prefer standard library over external dependencies when possible.",
121
+ "Use context for cancellation and timeouts."
122
+ ]
123
+ },
124
+
125
+ // --- MOBILE ---
126
+ 'mobile-react-native': {
127
+ label: '📱 Mobile: React Native',
128
+ rules: [
129
+ "Use Functional Components and Hooks.",
130
+ "Avoid bridge passing heavy data.",
131
+ "Optimize lists with FlatList or FlashList.",
132
+ "Style using StyleSheet objects or styled-components."
133
+ ]
134
+ },
135
+ 'mobile-flutter': {
136
+ label: '📱 Mobile: Flutter',
137
+ rules: [
138
+ "Use const constructors whenever possible.",
139
+ "Prefer Composition over Inheritance.",
140
+ "Manage state with Riverpod or BLoC.",
141
+ "Follow Effective Dart guidelines."
142
+ ]
143
+ },
144
+ 'mobile-ios': {
145
+ label: '📱 Mobile: iOS (SwiftUI)',
146
+ rules: [
147
+ "Use MVVM pattern.",
148
+ "Prefer Structs over Classes for data models.",
149
+ "Use strict concurrency checking.",
150
+ "Follow Apple's Human Interface Guidelines."
151
+ ]
152
+ },
153
+ 'mobile-android': {
154
+ label: '📱 Mobile: Android (Kotlin Compose)',
155
+ rules: [
156
+ "Use Jetpack Compose for UI.",
157
+ "Follow Material Design 3 guidelines.",
158
+ "Use Coroutines and Flow for async work.",
159
+ "Implement Hilt for Dependency Injection."
160
+ ]
161
+ },
162
+
163
+ // --- DATA & AI ---
164
+ 'data-python': {
165
+ label: '📊 Data Science: Python',
166
+ rules: [
167
+ "Use Pandas vectorization over loops.",
168
+ "Document notebooks with Markdown cells explaining logic.",
169
+ "Use Type Hints even in scripts.",
170
+ "Prefer Polars for large datasets if possible."
171
+ ]
172
+ },
173
+
174
+ // --- INFRASTRUCTURE ---
175
+ 'infra-terraform': {
176
+ label: '☁️ Infra: Terraform',
177
+ rules: [
178
+ "Use modules for reusable resources.",
179
+ "Keep state remote and locked.",
180
+ "Format code with `terraform fmt`.",
181
+ "Avoid hardcoding values; use variables."
182
+ ]
183
+ }
184
+ };
185
+
186
+ module.exports = { STACK_PROFILES };
package/src/lib/schema.js CHANGED
@@ -1,13 +1,13 @@
1
- const { z } = require('zod');
2
-
3
- const AgentSchema = z.object({
4
- name: z.string().min(1, "Nome é obrigatório"),
5
- role: z.string().min(1, "Papel (Role) é obrigatório"),
6
- emoji: z.string().optional().default('🤖'),
7
- systemPrompt: z.string().min(10, "System Prompt deve ter pelo menos 10 caracteres"),
8
- rules: z.array(z.string()).optional().default([]),
9
- tools: z.array(z.string()).optional().default([]),
10
- description: z.string().optional()
11
- });
12
-
13
- module.exports = { AgentSchema };
1
+ const { z } = require('zod');
2
+
3
+ const AgentSchema = z.object({
4
+ name: z.string().min(1, "Name is required"),
5
+ role: z.string().min(1, "Role is required"),
6
+ emoji: z.string().optional().default('🤖'),
7
+ systemPrompt: z.string().min(10, "System Prompt must be at least 10 characters"),
8
+ rules: z.array(z.string()).optional().default([]),
9
+ tools: z.array(z.string()).optional().default([]),
10
+ description: z.string().optional()
11
+ });
12
+
13
+ module.exports = { AgentSchema };