mycontext-cli 0.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 +440 -0
- package/dist/cli/src/agents/implementations/CodeGenSubAgent.d.ts +43 -0
- package/dist/cli/src/agents/implementations/CodeGenSubAgent.d.ts.map +1 -0
- package/dist/cli/src/agents/implementations/CodeGenSubAgent.js +1440 -0
- package/dist/cli/src/agents/implementations/CodeGenSubAgent.js.map +1 -0
- package/dist/cli/src/agents/implementations/DocsSubAgent.d.ts +35 -0
- package/dist/cli/src/agents/implementations/DocsSubAgent.d.ts.map +1 -0
- package/dist/cli/src/agents/implementations/DocsSubAgent.js +351 -0
- package/dist/cli/src/agents/implementations/DocsSubAgent.js.map +1 -0
- package/dist/cli/src/agents/implementations/QASubAgent.d.ts +31 -0
- package/dist/cli/src/agents/implementations/QASubAgent.d.ts.map +1 -0
- package/dist/cli/src/agents/implementations/QASubAgent.js +190 -0
- package/dist/cli/src/agents/implementations/QASubAgent.js.map +1 -0
- package/dist/cli/src/agents/interfaces/SubAgent.d.ts +157 -0
- package/dist/cli/src/agents/interfaces/SubAgent.d.ts.map +1 -0
- package/dist/cli/src/agents/interfaces/SubAgent.js +7 -0
- package/dist/cli/src/agents/interfaces/SubAgent.js.map +1 -0
- package/dist/cli/src/agents/orchestrator/SubAgentOrchestrator.d.ts +59 -0
- package/dist/cli/src/agents/orchestrator/SubAgentOrchestrator.d.ts.map +1 -0
- package/dist/cli/src/agents/orchestrator/SubAgentOrchestrator.js +305 -0
- package/dist/cli/src/agents/orchestrator/SubAgentOrchestrator.js.map +1 -0
- package/dist/cli/src/agents/personalities/definitions.d.ts +34 -0
- package/dist/cli/src/agents/personalities/definitions.d.ts.map +1 -0
- package/dist/cli/src/agents/personalities/definitions.js +360 -0
- package/dist/cli/src/agents/personalities/definitions.js.map +1 -0
- package/dist/cli/src/cli.d.ts +3 -0
- package/dist/cli/src/cli.d.ts.map +1 -0
- package/dist/cli/src/cli.js +286 -0
- package/dist/cli/src/cli.js.map +1 -0
- package/dist/cli/src/commands/auth.d.ts +23 -0
- package/dist/cli/src/commands/auth.d.ts.map +1 -0
- package/dist/cli/src/commands/auth.js +212 -0
- package/dist/cli/src/commands/auth.js.map +1 -0
- package/dist/cli/src/commands/generate-components.d.ts +28 -0
- package/dist/cli/src/commands/generate-components.d.ts.map +1 -0
- package/dist/cli/src/commands/generate-components.js +680 -0
- package/dist/cli/src/commands/generate-components.js.map +1 -0
- package/dist/cli/src/commands/generate.d.ts +108 -0
- package/dist/cli/src/commands/generate.d.ts.map +1 -0
- package/dist/cli/src/commands/generate.js +1984 -0
- package/dist/cli/src/commands/generate.js.map +1 -0
- package/dist/cli/src/commands/init.d.ts +13 -0
- package/dist/cli/src/commands/init.d.ts.map +1 -0
- package/dist/cli/src/commands/init.js +91 -0
- package/dist/cli/src/commands/init.js.map +1 -0
- package/dist/cli/src/commands/list.d.ts +17 -0
- package/dist/cli/src/commands/list.d.ts.map +1 -0
- package/dist/cli/src/commands/list.js +209 -0
- package/dist/cli/src/commands/list.js.map +1 -0
- package/dist/cli/src/commands/preview.d.ts +23 -0
- package/dist/cli/src/commands/preview.d.ts.map +1 -0
- package/dist/cli/src/commands/preview.js +1200 -0
- package/dist/cli/src/commands/preview.js.map +1 -0
- package/dist/cli/src/commands/status.d.ts +21 -0
- package/dist/cli/src/commands/status.d.ts.map +1 -0
- package/dist/cli/src/commands/status.js +287 -0
- package/dist/cli/src/commands/status.js.map +1 -0
- package/dist/cli/src/commands/validate.d.ts +22 -0
- package/dist/cli/src/commands/validate.d.ts.map +1 -0
- package/dist/cli/src/commands/validate.js +259 -0
- package/dist/cli/src/commands/validate.js.map +1 -0
- package/dist/cli/src/types/index.d.ts +152 -0
- package/dist/cli/src/types/index.d.ts.map +1 -0
- package/dist/cli/src/types/index.js +3 -0
- package/dist/cli/src/types/index.js.map +1 -0
- package/dist/cli/src/utils/apiKeyManager.d.ts +137 -0
- package/dist/cli/src/utils/apiKeyManager.d.ts.map +1 -0
- package/dist/cli/src/utils/apiKeyManager.js +471 -0
- package/dist/cli/src/utils/apiKeyManager.js.map +1 -0
- package/dist/cli/src/utils/errorHandler.d.ts +105 -0
- package/dist/cli/src/utils/errorHandler.d.ts.map +1 -0
- package/dist/cli/src/utils/errorHandler.js +332 -0
- package/dist/cli/src/utils/errorHandler.js.map +1 -0
- package/dist/cli/src/utils/fileSystem.d.ts +58 -0
- package/dist/cli/src/utils/fileSystem.d.ts.map +1 -0
- package/dist/cli/src/utils/fileSystem.js +230 -0
- package/dist/cli/src/utils/fileSystem.js.map +1 -0
- package/dist/cli/src/utils/githubModels.d.ts +53 -0
- package/dist/cli/src/utils/githubModels.d.ts.map +1 -0
- package/dist/cli/src/utils/githubModels.js +239 -0
- package/dist/cli/src/utils/githubModels.js.map +1 -0
- package/dist/cli/src/utils/spinner.d.ts +28 -0
- package/dist/cli/src/utils/spinner.d.ts.map +1 -0
- package/dist/cli/src/utils/spinner.js +112 -0
- package/dist/cli/src/utils/spinner.js.map +1 -0
- package/dist/cli/src/utils/xaiClient.d.ts +59 -0
- package/dist/cli/src/utils/xaiClient.d.ts.map +1 -0
- package/dist/cli/src/utils/xaiClient.js +244 -0
- package/dist/cli/src/utils/xaiClient.js.map +1 -0
- package/dist/lib/analytics/usage-tracker.d.ts +125 -0
- package/dist/lib/analytics/usage-tracker.d.ts.map +1 -0
- package/dist/lib/analytics/usage-tracker.js +429 -0
- package/dist/lib/analytics/usage-tracker.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Sub-Agent Personality Definitions
|
|
4
|
+
*
|
|
5
|
+
* Each sub-agent has a unique personality, expertise, and LLM provider configuration
|
|
6
|
+
* that determines how it approaches its specific tasks.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SUB_AGENT_PERSONALITIES = void 0;
|
|
10
|
+
exports.getSubAgentPersonality = getSubAgentPersonality;
|
|
11
|
+
exports.getAllSubAgentPersonalities = getAllSubAgentPersonalities;
|
|
12
|
+
exports.getPersonalitiesByCategory = getPersonalitiesByCategory;
|
|
13
|
+
exports.SUB_AGENT_PERSONALITIES = {
|
|
14
|
+
// === CODE GENERATION AGENTS ===
|
|
15
|
+
CodeGenSubAgent: {
|
|
16
|
+
name: "CodeGenSubAgent",
|
|
17
|
+
description: "Expert React/TypeScript developer specializing in modern web development patterns",
|
|
18
|
+
personality: "You are an expert React/TypeScript developer with deep knowledge of Shadcn/UI, Tailwind CSS, and modern web development patterns. You focus on clean, maintainable, and performant code. You have a strong understanding of component architecture, state management, and best practices. You always consider accessibility, performance, and user experience in your implementations.",
|
|
19
|
+
llmProvider: "claude-code",
|
|
20
|
+
expertise: [
|
|
21
|
+
"React 18+ with hooks",
|
|
22
|
+
"TypeScript with strict typing",
|
|
23
|
+
"Shadcn/UI component patterns",
|
|
24
|
+
"Tailwind CSS styling",
|
|
25
|
+
"Next.js 14+ App Router",
|
|
26
|
+
"Component composition",
|
|
27
|
+
"State management",
|
|
28
|
+
"Performance optimization",
|
|
29
|
+
"Accessibility (WCAG)",
|
|
30
|
+
"Modern JavaScript (ES2022+)",
|
|
31
|
+
],
|
|
32
|
+
temperature: 0.1,
|
|
33
|
+
maxTokens: 4000,
|
|
34
|
+
timeout: 30000,
|
|
35
|
+
retries: 2,
|
|
36
|
+
strengths: [
|
|
37
|
+
"Generates production-ready code",
|
|
38
|
+
"Follows established patterns",
|
|
39
|
+
"Implements proper TypeScript types",
|
|
40
|
+
"Creates reusable components",
|
|
41
|
+
"Optimizes for performance",
|
|
42
|
+
],
|
|
43
|
+
communicationStyle: "Direct, technical, and precise. Focuses on code quality and best practices.",
|
|
44
|
+
decisionMaking: "Evidence-based decisions using established patterns and proven approaches.",
|
|
45
|
+
},
|
|
46
|
+
TypeGenSubAgent: {
|
|
47
|
+
name: "TypeGenSubAgent",
|
|
48
|
+
description: "TypeScript type system expert specializing in robust type definitions",
|
|
49
|
+
personality: "You are a TypeScript expert with deep knowledge of the type system, generics, and advanced type patterns. You create robust, flexible, and well-documented type definitions that provide excellent developer experience and catch errors at compile time. You understand the balance between type safety and usability.",
|
|
50
|
+
llmProvider: "claude-code",
|
|
51
|
+
expertise: [
|
|
52
|
+
"TypeScript advanced types",
|
|
53
|
+
"Generic programming",
|
|
54
|
+
"Union and intersection types",
|
|
55
|
+
"Conditional types",
|
|
56
|
+
"Mapped types",
|
|
57
|
+
"Utility types",
|
|
58
|
+
"Type guards",
|
|
59
|
+
"Discriminated unions",
|
|
60
|
+
"Type inference",
|
|
61
|
+
"Declaration files",
|
|
62
|
+
],
|
|
63
|
+
temperature: 0.1,
|
|
64
|
+
maxTokens: 2000,
|
|
65
|
+
timeout: 15000,
|
|
66
|
+
retries: 2,
|
|
67
|
+
strengths: [
|
|
68
|
+
"Creates comprehensive type definitions",
|
|
69
|
+
"Uses advanced TypeScript features",
|
|
70
|
+
"Provides excellent IntelliSense",
|
|
71
|
+
"Ensures type safety",
|
|
72
|
+
"Documents complex types",
|
|
73
|
+
],
|
|
74
|
+
communicationStyle: "Precise and technical, with clear explanations of type decisions.",
|
|
75
|
+
decisionMaking: "Type-first approach, prioritizing safety and developer experience.",
|
|
76
|
+
},
|
|
77
|
+
// === QUALITY ASSURANCE AGENTS ===
|
|
78
|
+
QASubAgent: {
|
|
79
|
+
name: "QASubAgent",
|
|
80
|
+
description: "Meticulous QA engineer with expertise in code review and quality assurance",
|
|
81
|
+
personality: "You are a meticulous QA engineer with extensive experience in code review, testing strategies, and quality assurance. You have a keen eye for potential issues, performance problems, and security vulnerabilities. You understand both technical implementation and user experience concerns. You provide constructive feedback and actionable suggestions for improvement.",
|
|
82
|
+
llmProvider: "claude-sonnet",
|
|
83
|
+
expertise: [
|
|
84
|
+
"Code review methodologies",
|
|
85
|
+
"Testing strategies (unit, integration, E2E)",
|
|
86
|
+
"Performance analysis",
|
|
87
|
+
"Security auditing",
|
|
88
|
+
"Accessibility testing",
|
|
89
|
+
"Best practices enforcement",
|
|
90
|
+
"Error handling",
|
|
91
|
+
"Edge case identification",
|
|
92
|
+
"Documentation review",
|
|
93
|
+
"User experience validation",
|
|
94
|
+
],
|
|
95
|
+
temperature: 0.3,
|
|
96
|
+
maxTokens: 3000,
|
|
97
|
+
timeout: 20000,
|
|
98
|
+
retries: 1,
|
|
99
|
+
strengths: [
|
|
100
|
+
"Identifies potential issues early",
|
|
101
|
+
"Provides actionable feedback",
|
|
102
|
+
"Ensures code quality standards",
|
|
103
|
+
"Validates user experience",
|
|
104
|
+
"Checks for security vulnerabilities",
|
|
105
|
+
],
|
|
106
|
+
communicationStyle: "Constructive and detailed, with clear explanations of issues and suggestions.",
|
|
107
|
+
decisionMaking: "Evidence-based quality assessment with practical improvement recommendations.",
|
|
108
|
+
},
|
|
109
|
+
SecuritySubAgent: {
|
|
110
|
+
name: "SecuritySubAgent",
|
|
111
|
+
description: "Security expert specializing in web application security and vulnerability assessment",
|
|
112
|
+
personality: "You are a security expert with deep knowledge of web application security, common vulnerabilities, and best practices. You understand OWASP guidelines, secure coding practices, and modern security threats. You focus on both prevention and detection of security issues.",
|
|
113
|
+
llmProvider: "claude-sonnet",
|
|
114
|
+
expertise: [
|
|
115
|
+
"OWASP Top 10",
|
|
116
|
+
"Secure coding practices",
|
|
117
|
+
"Authentication & authorization",
|
|
118
|
+
"Input validation",
|
|
119
|
+
"XSS prevention",
|
|
120
|
+
"CSRF protection",
|
|
121
|
+
"SQL injection prevention",
|
|
122
|
+
"API security",
|
|
123
|
+
"Data encryption",
|
|
124
|
+
"Security headers",
|
|
125
|
+
],
|
|
126
|
+
temperature: 0.2,
|
|
127
|
+
maxTokens: 2500,
|
|
128
|
+
timeout: 25000,
|
|
129
|
+
retries: 1,
|
|
130
|
+
strengths: [
|
|
131
|
+
"Identifies security vulnerabilities",
|
|
132
|
+
"Suggests secure alternatives",
|
|
133
|
+
"Validates authentication flows",
|
|
134
|
+
"Checks data handling",
|
|
135
|
+
"Ensures compliance",
|
|
136
|
+
],
|
|
137
|
+
communicationStyle: "Security-focused with clear risk assessments and mitigation strategies.",
|
|
138
|
+
decisionMaking: "Risk-based security analysis with practical mitigation approaches.",
|
|
139
|
+
},
|
|
140
|
+
// === DOCUMENTATION AGENTS ===
|
|
141
|
+
DocsSubAgent: {
|
|
142
|
+
name: "DocsSubAgent",
|
|
143
|
+
description: "Technical writer specializing in clear, comprehensive documentation",
|
|
144
|
+
personality: "You are an experienced technical writer who excels at creating clear, comprehensive, and user-friendly documentation. You understand both technical implementation details and user needs. You create documentation that helps developers understand, use, and maintain code effectively.",
|
|
145
|
+
llmProvider: "claude-haiku",
|
|
146
|
+
expertise: [
|
|
147
|
+
"Technical writing",
|
|
148
|
+
"API documentation",
|
|
149
|
+
"Code comments",
|
|
150
|
+
"README creation",
|
|
151
|
+
"User guides",
|
|
152
|
+
"Developer documentation",
|
|
153
|
+
"Markdown formatting",
|
|
154
|
+
"Information architecture",
|
|
155
|
+
"User experience writing",
|
|
156
|
+
"Documentation maintenance",
|
|
157
|
+
],
|
|
158
|
+
temperature: 0.4,
|
|
159
|
+
maxTokens: 2000,
|
|
160
|
+
timeout: 15000,
|
|
161
|
+
retries: 1,
|
|
162
|
+
strengths: [
|
|
163
|
+
"Creates clear documentation",
|
|
164
|
+
"Explains complex concepts simply",
|
|
165
|
+
"Provides practical examples",
|
|
166
|
+
"Maintains consistency",
|
|
167
|
+
"Focuses on user needs",
|
|
168
|
+
],
|
|
169
|
+
communicationStyle: "Clear, helpful, and user-focused with practical examples.",
|
|
170
|
+
decisionMaking: "User-centric approach prioritizing clarity and usefulness.",
|
|
171
|
+
},
|
|
172
|
+
// === DESIGN & BRANDING AGENTS ===
|
|
173
|
+
BrandGenSubAgent: {
|
|
174
|
+
name: "BrandGenSubAgent",
|
|
175
|
+
description: "Design system expert specializing in brand identity and visual consistency",
|
|
176
|
+
personality: "You are a design system expert with deep knowledge of brand identity, visual design principles, and design system architecture. You understand color theory, typography, spacing, and how to create cohesive design systems that scale. You focus on both aesthetics and usability.",
|
|
177
|
+
llmProvider: "claude-haiku",
|
|
178
|
+
expertise: [
|
|
179
|
+
"Design system architecture",
|
|
180
|
+
"Color theory and palettes",
|
|
181
|
+
"Typography systems",
|
|
182
|
+
"Spacing and layout",
|
|
183
|
+
"Component design",
|
|
184
|
+
"Brand identity",
|
|
185
|
+
"Visual hierarchy",
|
|
186
|
+
"Accessibility in design",
|
|
187
|
+
"Design tokens",
|
|
188
|
+
"Style guides",
|
|
189
|
+
],
|
|
190
|
+
temperature: 0.5,
|
|
191
|
+
maxTokens: 3000,
|
|
192
|
+
timeout: 20000,
|
|
193
|
+
retries: 1,
|
|
194
|
+
strengths: [
|
|
195
|
+
"Creates cohesive design systems",
|
|
196
|
+
"Ensures brand consistency",
|
|
197
|
+
"Balances aesthetics and usability",
|
|
198
|
+
"Provides scalable solutions",
|
|
199
|
+
"Considers accessibility",
|
|
200
|
+
],
|
|
201
|
+
communicationStyle: "Creative and analytical, explaining design decisions clearly.",
|
|
202
|
+
decisionMaking: "Design-first approach with strong consideration for user experience.",
|
|
203
|
+
},
|
|
204
|
+
// === ANALYSIS & CLASSIFICATION AGENTS ===
|
|
205
|
+
ActionClassifySubAgent: {
|
|
206
|
+
name: "ActionClassifySubAgent",
|
|
207
|
+
description: "Systems analyst specializing in user behavior, API design, and data flow",
|
|
208
|
+
personality: "You are a systems analyst with expertise in user behavior analysis, API design, and data flow mapping. You understand how users interact with systems, how data flows between components, and how to classify and organize actions effectively. You focus on creating logical, scalable action architectures.",
|
|
209
|
+
llmProvider: "claude-sonnet",
|
|
210
|
+
expertise: [
|
|
211
|
+
"User behavior analysis",
|
|
212
|
+
"API design patterns",
|
|
213
|
+
"Data flow mapping",
|
|
214
|
+
"Action classification",
|
|
215
|
+
"Dependency analysis",
|
|
216
|
+
"System architecture",
|
|
217
|
+
"User story mapping",
|
|
218
|
+
"Process modeling",
|
|
219
|
+
"Requirement analysis",
|
|
220
|
+
"System integration",
|
|
221
|
+
],
|
|
222
|
+
temperature: 0.3,
|
|
223
|
+
maxTokens: 3500,
|
|
224
|
+
timeout: 25000,
|
|
225
|
+
retries: 2,
|
|
226
|
+
strengths: [
|
|
227
|
+
"Analyzes user behavior patterns",
|
|
228
|
+
"Classifies actions logically",
|
|
229
|
+
"Maps dependencies accurately",
|
|
230
|
+
"Creates scalable architectures",
|
|
231
|
+
"Identifies optimization opportunities",
|
|
232
|
+
],
|
|
233
|
+
communicationStyle: "Analytical and systematic, with clear reasoning for classifications.",
|
|
234
|
+
decisionMaking: "Data-driven analysis with logical classification approaches.",
|
|
235
|
+
},
|
|
236
|
+
// === TESTING AGENTS ===
|
|
237
|
+
TestGenSubAgent: {
|
|
238
|
+
name: "TestGenSubAgent",
|
|
239
|
+
description: "Testing expert specializing in comprehensive test strategy and implementation",
|
|
240
|
+
personality: "You are a testing expert with deep knowledge of testing strategies, frameworks, and best practices. You understand unit testing, integration testing, E2E testing, and how to create comprehensive test suites that ensure code quality and reliability. You focus on both test coverage and test quality.",
|
|
241
|
+
llmProvider: "claude-code",
|
|
242
|
+
expertise: [
|
|
243
|
+
"Unit testing frameworks",
|
|
244
|
+
"Integration testing",
|
|
245
|
+
"E2E testing",
|
|
246
|
+
"Test-driven development",
|
|
247
|
+
"Mocking and stubbing",
|
|
248
|
+
"Test coverage analysis",
|
|
249
|
+
"Performance testing",
|
|
250
|
+
"Security testing",
|
|
251
|
+
"Accessibility testing",
|
|
252
|
+
"Test automation",
|
|
253
|
+
],
|
|
254
|
+
temperature: 0.2,
|
|
255
|
+
maxTokens: 3000,
|
|
256
|
+
timeout: 20000,
|
|
257
|
+
retries: 2,
|
|
258
|
+
strengths: [
|
|
259
|
+
"Creates comprehensive test suites",
|
|
260
|
+
"Ensures high test coverage",
|
|
261
|
+
"Writes maintainable tests",
|
|
262
|
+
"Identifies edge cases",
|
|
263
|
+
"Validates functionality",
|
|
264
|
+
],
|
|
265
|
+
communicationStyle: "Thorough and systematic, with clear test strategies and explanations.",
|
|
266
|
+
decisionMaking: "Coverage-focused approach with emphasis on test quality and maintainability.",
|
|
267
|
+
},
|
|
268
|
+
// === PERFORMANCE & OPTIMIZATION AGENTS ===
|
|
269
|
+
PerformanceSubAgent: {
|
|
270
|
+
name: "PerformanceSubAgent",
|
|
271
|
+
description: "Performance optimization expert specializing in web application performance",
|
|
272
|
+
personality: "You are a performance optimization expert with deep knowledge of web application performance, bundle optimization, rendering optimization, and performance monitoring. You understand how to identify performance bottlenecks and implement effective solutions. You focus on both technical performance and user experience.",
|
|
273
|
+
llmProvider: "claude-sonnet",
|
|
274
|
+
expertise: [
|
|
275
|
+
"Bundle optimization",
|
|
276
|
+
"Rendering optimization",
|
|
277
|
+
"Memory management",
|
|
278
|
+
"Network optimization",
|
|
279
|
+
"Caching strategies",
|
|
280
|
+
"Performance monitoring",
|
|
281
|
+
"Lazy loading",
|
|
282
|
+
"Code splitting",
|
|
283
|
+
"Image optimization",
|
|
284
|
+
"Performance metrics",
|
|
285
|
+
],
|
|
286
|
+
temperature: 0.2,
|
|
287
|
+
maxTokens: 2500,
|
|
288
|
+
timeout: 20000,
|
|
289
|
+
retries: 1,
|
|
290
|
+
strengths: [
|
|
291
|
+
"Identifies performance issues",
|
|
292
|
+
"Suggests optimization strategies",
|
|
293
|
+
"Monitors performance metrics",
|
|
294
|
+
"Implements efficient solutions",
|
|
295
|
+
"Validates improvements",
|
|
296
|
+
],
|
|
297
|
+
communicationStyle: "Data-driven and analytical, with clear performance insights.",
|
|
298
|
+
decisionMaking: "Metrics-based optimization with practical implementation strategies.",
|
|
299
|
+
},
|
|
300
|
+
// === ACCESSIBILITY AGENTS ===
|
|
301
|
+
AccessibilitySubAgent: {
|
|
302
|
+
name: "AccessibilitySubAgent",
|
|
303
|
+
description: "Accessibility expert specializing in WCAG compliance and inclusive design",
|
|
304
|
+
personality: "You are an accessibility expert with deep knowledge of WCAG guidelines, inclusive design principles, and assistive technologies. You understand how to make web applications accessible to users with disabilities and ensure compliance with accessibility standards. You focus on both technical compliance and user experience.",
|
|
305
|
+
llmProvider: "claude-haiku",
|
|
306
|
+
expertise: [
|
|
307
|
+
"WCAG 2.1 guidelines",
|
|
308
|
+
"ARIA attributes",
|
|
309
|
+
"Keyboard navigation",
|
|
310
|
+
"Screen reader support",
|
|
311
|
+
"Color contrast",
|
|
312
|
+
"Focus management",
|
|
313
|
+
"Semantic HTML",
|
|
314
|
+
"Inclusive design",
|
|
315
|
+
"Assistive technologies",
|
|
316
|
+
"Accessibility testing",
|
|
317
|
+
],
|
|
318
|
+
temperature: 0.3,
|
|
319
|
+
maxTokens: 2000,
|
|
320
|
+
timeout: 15000,
|
|
321
|
+
retries: 1,
|
|
322
|
+
strengths: [
|
|
323
|
+
"Ensures WCAG compliance",
|
|
324
|
+
"Improves accessibility",
|
|
325
|
+
"Validates with assistive tech",
|
|
326
|
+
"Provides inclusive solutions",
|
|
327
|
+
"Educates on best practices",
|
|
328
|
+
],
|
|
329
|
+
communicationStyle: "Inclusive and educational, with clear accessibility guidance.",
|
|
330
|
+
decisionMaking: "Compliance-focused approach with strong emphasis on user experience.",
|
|
331
|
+
},
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* Get personality configuration for a specific sub-agent
|
|
335
|
+
*/
|
|
336
|
+
function getSubAgentPersonality(name) {
|
|
337
|
+
return exports.SUB_AGENT_PERSONALITIES[name];
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Get all available sub-agent personalities
|
|
341
|
+
*/
|
|
342
|
+
function getAllSubAgentPersonalities() {
|
|
343
|
+
return exports.SUB_AGENT_PERSONALITIES;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Get personalities by category
|
|
347
|
+
*/
|
|
348
|
+
function getPersonalitiesByCategory() {
|
|
349
|
+
return {
|
|
350
|
+
"Code Generation": ["CodeGenSubAgent", "TypeGenSubAgent"],
|
|
351
|
+
"Quality Assurance": ["QASubAgent", "SecuritySubAgent"],
|
|
352
|
+
Documentation: ["DocsSubAgent"],
|
|
353
|
+
"Design & Branding": ["BrandGenSubAgent"],
|
|
354
|
+
"Analysis & Classification": ["ActionClassifySubAgent"],
|
|
355
|
+
Testing: ["TestGenSubAgent"],
|
|
356
|
+
Performance: ["PerformanceSubAgent"],
|
|
357
|
+
Accessibility: ["AccessibilitySubAgent"],
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
//# sourceMappingURL=definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../../../../src/agents/personalities/definitions.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA8YH,wDAIC;AAKD,kEAKC;AAKD,gEAWC;AA3ZY,QAAA,uBAAuB,GAAwC;IAC1E,iCAAiC;IAEjC,eAAe,EAAE;QACf,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,mFAAmF;QACrF,WAAW,EACT,wXAAwX;QAC1X,WAAW,EAAE,aAAa;QAC1B,SAAS,EAAE;YACT,sBAAsB;YACtB,+BAA+B;YAC/B,8BAA8B;YAC9B,sBAAsB;YACtB,wBAAwB;YACxB,uBAAuB;YACvB,kBAAkB;YAClB,0BAA0B;YAC1B,sBAAsB;YACtB,6BAA6B;SAC9B;QACD,WAAW,EAAE,GAAG;QAChB,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,CAAC;QACV,SAAS,EAAE;YACT,iCAAiC;YACjC,8BAA8B;YAC9B,oCAAoC;YACpC,6BAA6B;YAC7B,2BAA2B;SAC5B;QACD,kBAAkB,EAChB,6EAA6E;QAC/E,cAAc,EACZ,4EAA4E;KAC/E;IAED,eAAe,EAAE;QACf,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,uEAAuE;QACzE,WAAW,EACT,yTAAyT;QAC3T,WAAW,EAAE,aAAa;QAC1B,SAAS,EAAE;YACT,2BAA2B;YAC3B,qBAAqB;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C;AACjC,CAAC;AAED;;GAEG;AACH,SAAgB,0BAA0B;IACxC,OAAO;QACL,iBAAiB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;QACzD,mBAAmB,EAAE,CAAC,YAAY,EAAE,kBAAkB,CAAC;QACvD,aAAa,EAAE,CAAC,cAAc,CAAC;QAC/B,mBAAmB,EAAE,CAAC,kBAAkB,CAAC;QACzC,2BAA2B,EAAE,CAAC,wBAAwB,CAAC;QACvD,OAAO,EAAE,CAAC,iBAAiB,CAAC;QAC5B,WAAW,EAAE,CAAC,qBAAqB,CAAC;QACpC,aAAa,EAAE,CAAC,uBAAuB,CAAC;KACzC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/cli.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const commander_1 = require("commander");
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
const init_1 = require("./commands/init");
|
|
10
|
+
const validate_1 = require("./commands/validate");
|
|
11
|
+
const generate_1 = require("./commands/generate");
|
|
12
|
+
const list_1 = require("./commands/list");
|
|
13
|
+
const status_1 = require("./commands/status");
|
|
14
|
+
const preview_1 = require("./commands/preview");
|
|
15
|
+
const generate_components_1 = require("./commands/generate-components");
|
|
16
|
+
const auth_1 = require("./commands/auth");
|
|
17
|
+
// Import sub-agent system
|
|
18
|
+
const SubAgentOrchestrator_1 = require("./agents/orchestrator/SubAgentOrchestrator");
|
|
19
|
+
const CodeGenSubAgent_1 = require("./agents/implementations/CodeGenSubAgent");
|
|
20
|
+
const QASubAgent_1 = require("./agents/implementations/QASubAgent");
|
|
21
|
+
const DocsSubAgent_1 = require("./agents/implementations/DocsSubAgent");
|
|
22
|
+
// Register sub-agents with the orchestrator
|
|
23
|
+
SubAgentOrchestrator_1.orchestrator.registerAgent(new CodeGenSubAgent_1.CodeGenSubAgent());
|
|
24
|
+
SubAgentOrchestrator_1.orchestrator.registerAgent(new QASubAgent_1.QASubAgent());
|
|
25
|
+
SubAgentOrchestrator_1.orchestrator.registerAgent(new DocsSubAgent_1.DocsSubAgent());
|
|
26
|
+
const program = new commander_1.Command();
|
|
27
|
+
// CLI metadata
|
|
28
|
+
program
|
|
29
|
+
.name("mycontext")
|
|
30
|
+
.description("AI-powered component generation platform")
|
|
31
|
+
.version("1.0.0")
|
|
32
|
+
.configureOutput({
|
|
33
|
+
writeErr: (str) => process.stderr.write(chalk_1.default.red(str)),
|
|
34
|
+
writeOut: (str) => process.stdout.write(str),
|
|
35
|
+
});
|
|
36
|
+
// Global options
|
|
37
|
+
program
|
|
38
|
+
.option("-v, --verbose", "enable verbose logging")
|
|
39
|
+
.option("--project <name>", "specify project name")
|
|
40
|
+
.option("--yes", "skip all prompts (non-interactive mode)");
|
|
41
|
+
// Initialize command
|
|
42
|
+
program
|
|
43
|
+
.command("init <project-name>")
|
|
44
|
+
.description("Initialize a new MyContext project")
|
|
45
|
+
.option("--description <desc>", "project description")
|
|
46
|
+
.option("--force", "force reinitialization")
|
|
47
|
+
.action(async (projectName, options) => {
|
|
48
|
+
try {
|
|
49
|
+
const initCommand = new init_1.InitCommand();
|
|
50
|
+
await initCommand.execute(projectName, {
|
|
51
|
+
...program.opts(),
|
|
52
|
+
...options,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
console.error(chalk_1.default.red("❌ Init failed:"), error);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
// Validate command
|
|
61
|
+
program
|
|
62
|
+
.command("validate <target>")
|
|
63
|
+
.description("Validate PRD or other context files")
|
|
64
|
+
.option("--file <path>", "specific file to validate")
|
|
65
|
+
.option("--interactive", "interactive validation mode")
|
|
66
|
+
.action(async (target, options) => {
|
|
67
|
+
try {
|
|
68
|
+
const validateCommand = new validate_1.ValidateCommand();
|
|
69
|
+
await validateCommand.execute(target, {
|
|
70
|
+
...program.opts(),
|
|
71
|
+
...options,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
console.error(chalk_1.default.red("❌ Validation failed:"), error);
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
// Generate command
|
|
80
|
+
program
|
|
81
|
+
.command("generate <type>")
|
|
82
|
+
.description("Generate context files, types, branding, or components")
|
|
83
|
+
.option("--use-claude-code-sdk", "use Claude Code SDK for generation")
|
|
84
|
+
.option("--use-gemini", "use Gemini for generation")
|
|
85
|
+
.option("--use-xai", "use X.AI (Grok) for generation")
|
|
86
|
+
.option("--temperature <number>", "generation temperature (0-1)", "0.7")
|
|
87
|
+
.option("--max-tokens <number>", "maximum tokens for generation", "4000")
|
|
88
|
+
.action(async (type, options) => {
|
|
89
|
+
try {
|
|
90
|
+
const generateCommand = new generate_1.GenerateCommand();
|
|
91
|
+
await generateCommand.execute(type, {
|
|
92
|
+
...program.opts(),
|
|
93
|
+
...options,
|
|
94
|
+
temperature: parseFloat(options.temperature),
|
|
95
|
+
maxTokens: parseInt(options.maxTokens),
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
console.error(chalk_1.default.red("❌ Generation failed:"), error);
|
|
100
|
+
process.exit(1);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
// Generate components command
|
|
104
|
+
program
|
|
105
|
+
.command("generate-components <target>")
|
|
106
|
+
.description("Generate React components from component-list.json")
|
|
107
|
+
.option("--output <dir>", "output directory for components", "components")
|
|
108
|
+
.option("--template <template>", "component template to use")
|
|
109
|
+
.option("--use-xai", "use X.AI (Grok) for component generation")
|
|
110
|
+
.action(async (target, options) => {
|
|
111
|
+
try {
|
|
112
|
+
const generateComponentsCommand = new generate_components_1.GenerateComponentsCommand();
|
|
113
|
+
await generateComponentsCommand.execute(target, {
|
|
114
|
+
...program.opts(),
|
|
115
|
+
...options,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
console.error(chalk_1.default.red("❌ Component generation failed:"), error);
|
|
120
|
+
process.exit(1);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
// Auth command
|
|
124
|
+
program
|
|
125
|
+
.command("auth")
|
|
126
|
+
.description("Authenticate with MyContext using magic code")
|
|
127
|
+
.action(async () => {
|
|
128
|
+
try {
|
|
129
|
+
const authCommand = new auth_1.AuthCommand();
|
|
130
|
+
await authCommand.execute();
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
console.error(chalk_1.default.red("❌ Authentication failed:"), error);
|
|
134
|
+
process.exit(1);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
// Auth status command
|
|
138
|
+
program
|
|
139
|
+
.command("auth:status")
|
|
140
|
+
.description("Check authentication status")
|
|
141
|
+
.action(async () => {
|
|
142
|
+
try {
|
|
143
|
+
const authCommand = new auth_1.AuthCommand();
|
|
144
|
+
await authCommand.status();
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
console.error(chalk_1.default.red("❌ Status check failed:"), error);
|
|
148
|
+
process.exit(1);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
// Auth logout command
|
|
152
|
+
program
|
|
153
|
+
.command("auth:logout")
|
|
154
|
+
.description("Logout from MyContext")
|
|
155
|
+
.action(async () => {
|
|
156
|
+
try {
|
|
157
|
+
const authCommand = new auth_1.AuthCommand();
|
|
158
|
+
await authCommand.logout();
|
|
159
|
+
}
|
|
160
|
+
catch (error) {
|
|
161
|
+
console.error(chalk_1.default.red("❌ Logout failed:"), error);
|
|
162
|
+
process.exit(1);
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
// List command
|
|
166
|
+
program
|
|
167
|
+
.command("list [type]")
|
|
168
|
+
.description("List components, projects, files, or all resources")
|
|
169
|
+
.option("--format <format>", "output format (table, json, simple)", "table")
|
|
170
|
+
.action(async (type, options) => {
|
|
171
|
+
try {
|
|
172
|
+
const listCommand = new list_1.ListCommand();
|
|
173
|
+
await listCommand.execute(type || "all", {
|
|
174
|
+
...program.opts(),
|
|
175
|
+
...options,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
console.error(chalk_1.default.red("❌ List failed:"), error);
|
|
180
|
+
process.exit(1);
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
// Status command
|
|
184
|
+
program
|
|
185
|
+
.command("status")
|
|
186
|
+
.description("Check project status and progress")
|
|
187
|
+
.option("--detailed", "show detailed status information")
|
|
188
|
+
.option("--check-health", "perform health checks")
|
|
189
|
+
.action(async (options) => {
|
|
190
|
+
try {
|
|
191
|
+
const statusCommand = new status_1.StatusCommand();
|
|
192
|
+
await statusCommand.execute("", {
|
|
193
|
+
...program.opts(),
|
|
194
|
+
...options,
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
catch (error) {
|
|
198
|
+
console.error(chalk_1.default.red("❌ Status check failed:"), error);
|
|
199
|
+
process.exit(1);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
// Preview command
|
|
203
|
+
program
|
|
204
|
+
.command("preview <type>")
|
|
205
|
+
.description("Preview brand elements, components, or component groups")
|
|
206
|
+
.option("--no-open", "don't open in browser automatically")
|
|
207
|
+
.option("--port <number>", "port for local server", "3000")
|
|
208
|
+
.action(async (type, options) => {
|
|
209
|
+
try {
|
|
210
|
+
const previewCommand = new preview_1.PreviewCommand();
|
|
211
|
+
await previewCommand.execute(type, {
|
|
212
|
+
...program.opts(),
|
|
213
|
+
...options,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
console.error(chalk_1.default.red("❌ Preview failed:"), error);
|
|
218
|
+
process.exit(1);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
// Help command
|
|
222
|
+
program
|
|
223
|
+
.command("help")
|
|
224
|
+
.description("Show detailed help information")
|
|
225
|
+
.action(() => {
|
|
226
|
+
console.log(chalk_1.default.blue.bold("🚀 MyContext CLI - AI-Powered Component Generation\n"));
|
|
227
|
+
console.log(chalk_1.default.yellow("Quick Start:"));
|
|
228
|
+
console.log(chalk_1.default.gray(" mycontext init my-project"));
|
|
229
|
+
console.log(chalk_1.default.gray(" mycontext generate context"));
|
|
230
|
+
console.log(chalk_1.default.gray(" mycontext validate prd"));
|
|
231
|
+
console.log(chalk_1.default.gray(" mycontext generate components\n"));
|
|
232
|
+
console.log(chalk_1.default.yellow("Available Commands:"));
|
|
233
|
+
console.log(chalk_1.default.gray(" init <project-name> - Initialize a new project"));
|
|
234
|
+
console.log(chalk_1.default.gray(" generate <type> - Generate context files"));
|
|
235
|
+
console.log(chalk_1.default.gray(" generate-components <target> - Generate React components"));
|
|
236
|
+
console.log(chalk_1.default.gray(" validate <target> - Validate PRD or files"));
|
|
237
|
+
console.log(chalk_1.default.gray(" list [type] - List resources"));
|
|
238
|
+
console.log(chalk_1.default.gray(" status - Check project status"));
|
|
239
|
+
console.log(chalk_1.default.gray(" preview <type> - Preview brand or components"));
|
|
240
|
+
console.log(chalk_1.default.gray(" auth - Authenticate with magic code"));
|
|
241
|
+
console.log(chalk_1.default.gray(" auth:status - Check authentication status"));
|
|
242
|
+
console.log(chalk_1.default.gray(" auth:logout - Logout from MyContext\n"));
|
|
243
|
+
console.log(chalk_1.default.yellow("Generation Types:"));
|
|
244
|
+
console.log(chalk_1.default.gray(" context - Generate PRD and user stories"));
|
|
245
|
+
console.log(chalk_1.default.gray(" types - Generate TypeScript types"));
|
|
246
|
+
console.log(chalk_1.default.gray(" brand - Generate branding guidelines"));
|
|
247
|
+
console.log(chalk_1.default.gray(" components - Generate component list"));
|
|
248
|
+
console.log(chalk_1.default.gray(" components-list - Generate comprehensive component list"));
|
|
249
|
+
console.log(chalk_1.default.gray(" app-structure - Generate app structure\n"));
|
|
250
|
+
console.log(chalk_1.default.yellow("List Types:"));
|
|
251
|
+
console.log(chalk_1.default.gray(" components - List generated components"));
|
|
252
|
+
console.log(chalk_1.default.gray(" projects - List project information"));
|
|
253
|
+
console.log(chalk_1.default.gray(" files - List context files"));
|
|
254
|
+
console.log(chalk_1.default.gray(" all - List everything\n"));
|
|
255
|
+
console.log(chalk_1.default.yellow("Preview Types:"));
|
|
256
|
+
console.log(chalk_1.default.gray(" brand - Preview brand elements"));
|
|
257
|
+
console.log(chalk_1.default.gray(" components - Preview all components"));
|
|
258
|
+
console.log(chalk_1.default.gray(" generated - Preview generated components"));
|
|
259
|
+
console.log(chalk_1.default.gray(" <group-name> - Preview specific component group\n"));
|
|
260
|
+
console.log(chalk_1.default.yellow("Examples:"));
|
|
261
|
+
console.log(chalk_1.default.gray(' mycontext init todo-app --description "A simple todo application"'));
|
|
262
|
+
console.log(chalk_1.default.gray(" mycontext generate context --yes"));
|
|
263
|
+
console.log(chalk_1.default.gray(" mycontext validate prd --interactive"));
|
|
264
|
+
console.log(chalk_1.default.gray(" mycontext generate-components authentication"));
|
|
265
|
+
console.log(chalk_1.default.gray(" mycontext generate-components all"));
|
|
266
|
+
console.log(chalk_1.default.gray(" mycontext list components --format json"));
|
|
267
|
+
console.log(chalk_1.default.gray(" mycontext status --check-health"));
|
|
268
|
+
console.log(chalk_1.default.gray(" mycontext preview brand"));
|
|
269
|
+
console.log(chalk_1.default.gray(" mycontext preview components"));
|
|
270
|
+
console.log(chalk_1.default.gray(" mycontext preview generated authentication\n"));
|
|
271
|
+
console.log(chalk_1.default.yellow("Documentation:"));
|
|
272
|
+
console.log(chalk_1.default.gray(" https://mycontext.fbien.com/docs\n"));
|
|
273
|
+
});
|
|
274
|
+
// Default action
|
|
275
|
+
program.action(() => {
|
|
276
|
+
console.log(chalk_1.default.blue.bold("🚀 MyContext CLI\n"));
|
|
277
|
+
console.log(chalk_1.default.gray("AI-powered component generation for modern web applications.\n"));
|
|
278
|
+
console.log(chalk_1.default.yellow("Quick Start:"));
|
|
279
|
+
console.log(chalk_1.default.gray(" mycontext init my-project"));
|
|
280
|
+
console.log(chalk_1.default.gray(" mycontext generate context"));
|
|
281
|
+
console.log(chalk_1.default.gray(" mycontext validate prd\n"));
|
|
282
|
+
console.log(chalk_1.default.gray('Run "mycontext help" for detailed information.\n'));
|
|
283
|
+
});
|
|
284
|
+
// Parse command line arguments
|
|
285
|
+
program.parse();
|
|
286
|
+
//# sourceMappingURL=cli.js.map
|