@deimoscloud/coreai 0.1.9 → 0.1.10
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/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -1
- package/.prettierrc +0 -9
- package/AGENT_SPEC.md +0 -347
- package/ARCHITECTURE.md +0 -547
- package/DRAFT_PRD.md +0 -1440
- package/IMPLEMENTATION_PLAN.md +0 -256
- package/PRODUCT.md +0 -473
- package/WORKFLOWS.md +0 -295
- package/commands/core/check-inbox.md +0 -34
- package/commands/core/delegate.md +0 -30
- package/commands/core/git-commit.md +0 -144
- package/commands/core/pr-create.md +0 -193
- package/commands/core/review.md +0 -56
- package/commands/core/sprint-status.md +0 -65
- package/commands/optional/docs-update.md +0 -200
- package/commands/optional/jira-create.md +0 -200
- package/commands/optional/jira-transition.md +0 -184
- package/commands/optional/worktree-cleanup.md +0 -167
- package/commands/optional/worktree-setup.md +0 -110
- package/eslint.config.js +0 -29
- package/jest.config.js +0 -22
- package/knowledge-library/README.md +0 -118
- package/knowledge-library/android-engineer/context/current.txt +0 -42
- package/knowledge-library/android-engineer/control/decisions.txt +0 -9
- package/knowledge-library/android-engineer/control/dependencies.txt +0 -19
- package/knowledge-library/android-engineer/control/objectives.txt +0 -26
- package/knowledge-library/android-engineer/history/.gitkeep +0 -0
- package/knowledge-library/android-engineer/inbox/processed/.gitkeep +0 -0
- package/knowledge-library/android-engineer/outbox/.gitkeep +0 -0
- package/knowledge-library/android-engineer/tech/.gitkeep +0 -0
- package/knowledge-library/architecture.txt +0 -61
- package/knowledge-library/backend-engineer/context/current.txt +0 -42
- package/knowledge-library/backend-engineer/control/decisions.txt +0 -9
- package/knowledge-library/backend-engineer/control/dependencies.txt +0 -19
- package/knowledge-library/backend-engineer/control/objectives.txt +0 -26
- package/knowledge-library/backend-engineer/history/.gitkeep +0 -0
- package/knowledge-library/backend-engineer/inbox/processed/.gitkeep +0 -0
- package/knowledge-library/backend-engineer/outbox/.gitkeep +0 -0
- package/knowledge-library/backend-engineer/tech/.gitkeep +0 -0
- package/knowledge-library/context.txt +0 -52
- package/knowledge-library/devops-engineer/context/current.txt +0 -42
- package/knowledge-library/devops-engineer/control/decisions.txt +0 -9
- package/knowledge-library/devops-engineer/control/dependencies.txt +0 -19
- package/knowledge-library/devops-engineer/control/objectives.txt +0 -26
- package/knowledge-library/devops-engineer/history/.gitkeep +0 -0
- package/knowledge-library/devops-engineer/inbox/processed/.gitkeep +0 -0
- package/knowledge-library/devops-engineer/outbox/.gitkeep +0 -0
- package/knowledge-library/devops-engineer/tech/.gitkeep +0 -0
- package/knowledge-library/engineering-manager/context/current.txt +0 -40
- package/knowledge-library/engineering-manager/control/decisions.txt +0 -9
- package/knowledge-library/engineering-manager/control/objectives.txt +0 -27
- package/knowledge-library/engineering-manager/history/.gitkeep +0 -0
- package/knowledge-library/engineering-manager/inbox/processed/.gitkeep +0 -0
- package/knowledge-library/engineering-manager/outbox/.gitkeep +0 -0
- package/knowledge-library/engineering-manager/tech/.gitkeep +0 -0
- package/knowledge-library/prd.txt +0 -81
- package/knowledge-library/product-manager/context/current.txt +0 -42
- package/knowledge-library/product-manager/control/decisions.txt +0 -9
- package/knowledge-library/product-manager/control/dependencies.txt +0 -19
- package/knowledge-library/product-manager/control/objectives.txt +0 -26
- package/knowledge-library/product-manager/history/.gitkeep +0 -0
- package/knowledge-library/product-manager/inbox/processed/.gitkeep +0 -0
- package/knowledge-library/product-manager/outbox/.gitkeep +0 -0
- package/knowledge-library/product-manager/tech/.gitkeep +0 -0
- package/knowledge-library/qa-engineer/context/current.txt +0 -42
- package/knowledge-library/qa-engineer/control/decisions.txt +0 -9
- package/knowledge-library/qa-engineer/control/dependencies.txt +0 -19
- package/knowledge-library/qa-engineer/control/objectives.txt +0 -26
- package/knowledge-library/qa-engineer/history/.gitkeep +0 -0
- package/knowledge-library/qa-engineer/inbox/processed/.gitkeep +0 -0
- package/knowledge-library/qa-engineer/outbox/.gitkeep +0 -0
- package/knowledge-library/qa-engineer/tech/.gitkeep +0 -0
- package/knowledge-library/security-engineer/context/current.txt +0 -42
- package/knowledge-library/security-engineer/control/decisions.txt +0 -9
- package/knowledge-library/security-engineer/control/dependencies.txt +0 -19
- package/knowledge-library/security-engineer/control/objectives.txt +0 -26
- package/knowledge-library/security-engineer/history/.gitkeep +0 -0
- package/knowledge-library/security-engineer/inbox/processed/.gitkeep +0 -0
- package/knowledge-library/security-engineer/outbox/.gitkeep +0 -0
- package/knowledge-library/security-engineer/tech/.gitkeep +0 -0
- package/knowledge-library/solutions-architect/context/current.txt +0 -42
- package/knowledge-library/solutions-architect/control/decisions.txt +0 -9
- package/knowledge-library/solutions-architect/control/dependencies.txt +0 -19
- package/knowledge-library/solutions-architect/control/objectives.txt +0 -26
- package/knowledge-library/solutions-architect/history/.gitkeep +0 -0
- package/knowledge-library/solutions-architect/inbox/processed/.gitkeep +0 -0
- package/knowledge-library/solutions-architect/outbox/.gitkeep +0 -0
- package/knowledge-library/solutions-architect/tech/.gitkeep +0 -0
- package/knowledge-library/wearos-engineer/context/current.txt +0 -42
- package/knowledge-library/wearos-engineer/control/decisions.txt +0 -9
- package/knowledge-library/wearos-engineer/control/dependencies.txt +0 -19
- package/knowledge-library/wearos-engineer/control/objectives.txt +0 -26
- package/knowledge-library/wearos-engineer/history/.gitkeep +0 -0
- package/knowledge-library/wearos-engineer/inbox/processed/.gitkeep +0 -0
- package/knowledge-library/wearos-engineer/outbox/.gitkeep +0 -0
- package/knowledge-library/wearos-engineer/tech/.gitkeep +0 -0
- package/scripts/add-agent.sh +0 -323
- package/scripts/install.sh +0 -354
- package/src/adapters/factory.test.ts +0 -386
- package/src/adapters/factory.ts +0 -305
- package/src/adapters/index.ts +0 -113
- package/src/adapters/interfaces.ts +0 -268
- package/src/adapters/mcp/client.test.ts +0 -130
- package/src/adapters/mcp/client.ts +0 -451
- package/src/adapters/mcp/discovery.test.ts +0 -315
- package/src/adapters/mcp/discovery.ts +0 -340
- package/src/adapters/mcp/index.ts +0 -66
- package/src/adapters/mcp/mapper.test.ts +0 -218
- package/src/adapters/mcp/mapper.ts +0 -536
- package/src/adapters/mcp/registry.test.ts +0 -433
- package/src/adapters/mcp/registry.ts +0 -550
- package/src/adapters/mcp/types.ts +0 -258
- package/src/adapters/native/filesystem.test.ts +0 -350
- package/src/adapters/native/filesystem.ts +0 -393
- package/src/adapters/native/github.test.ts +0 -173
- package/src/adapters/native/github.ts +0 -627
- package/src/adapters/native/index.ts +0 -22
- package/src/adapters/native/selector.test.ts +0 -224
- package/src/adapters/native/selector.ts +0 -150
- package/src/adapters/types.ts +0 -270
- package/src/agents/compiler.test.ts +0 -410
- package/src/agents/compiler.ts +0 -424
- package/src/agents/index.ts +0 -37
- package/src/agents/loader.test.ts +0 -319
- package/src/agents/loader.ts +0 -143
- package/src/agents/resolver.test.ts +0 -282
- package/src/agents/resolver.ts +0 -262
- package/src/agents/types.ts +0 -97
- package/src/cache/index.ts +0 -38
- package/src/cache/interfaces.ts +0 -283
- package/src/cache/manager.test.ts +0 -266
- package/src/cache/manager.ts +0 -388
- package/src/cache/provider.test.ts +0 -485
- package/src/cache/provider.ts +0 -745
- package/src/cache/types.test.ts +0 -192
- package/src/cache/types.ts +0 -313
- package/src/cli/commands/build.test.ts +0 -248
- package/src/cli/commands/build.ts +0 -284
- package/src/cli/commands/cache.test.ts +0 -221
- package/src/cli/commands/cache.ts +0 -229
- package/src/cli/commands/index.ts +0 -63
- package/src/cli/commands/init.test.ts +0 -173
- package/src/cli/commands/init.ts +0 -296
- package/src/cli/commands/skills.test.ts +0 -272
- package/src/cli/commands/skills.ts +0 -348
- package/src/cli/commands/status.test.ts +0 -392
- package/src/cli/commands/status.ts +0 -332
- package/src/cli/commands/sync.test.ts +0 -213
- package/src/cli/commands/sync.ts +0 -251
- package/src/cli/commands/validate.test.ts +0 -216
- package/src/cli/commands/validate.ts +0 -340
- package/src/cli/index.test.ts +0 -190
- package/src/cli/index.ts +0 -493
- package/src/commands/context.test.ts +0 -163
- package/src/commands/context.ts +0 -111
- package/src/commands/index.ts +0 -56
- package/src/commands/loader.test.ts +0 -273
- package/src/commands/loader.ts +0 -355
- package/src/commands/registry.test.ts +0 -384
- package/src/commands/registry.ts +0 -248
- package/src/commands/runner.test.ts +0 -297
- package/src/commands/runner.ts +0 -222
- package/src/commands/types.ts +0 -361
- package/src/config/index.ts +0 -19
- package/src/config/loader.test.ts +0 -262
- package/src/config/loader.ts +0 -188
- package/src/config/types.ts +0 -154
- package/src/context/index.ts +0 -14
- package/src/context/loader.test.ts +0 -334
- package/src/context/loader.ts +0 -357
- package/src/index.test.ts +0 -13
- package/src/index.ts +0 -268
- package/src/knowledge-library/index.ts +0 -44
- package/src/knowledge-library/manager.test.ts +0 -536
- package/src/knowledge-library/manager.ts +0 -804
- package/src/knowledge-library/types.ts +0 -432
- package/src/skills/generator.test.ts +0 -602
- package/src/skills/generator.ts +0 -491
- package/src/skills/index.ts +0 -27
- package/src/skills/templates.ts +0 -520
- package/src/skills/types.ts +0 -251
- package/templates/completion-report.md +0 -72
- package/templates/feedback.md +0 -56
- package/templates/project-files/CLAUDE.md.template +0 -109
- package/templates/project-files/coreai.json.example +0 -47
- package/templates/project-files/mcp.json.template +0 -20
- package/templates/review-complete.md +0 -64
- package/templates/review-request.md +0 -67
- package/templates/task-assignment.md +0 -51
- package/tsconfig.build.json +0 -4
- package/tsconfig.json +0 -26
- package/tsup.config.ts +0 -23
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Skills Command
|
|
3
|
-
*
|
|
4
|
-
* Generates Claude skills from templates based on project configuration.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { configExists, loadConfig, ConfigError } from '../../config/loader.js';
|
|
8
|
-
import type { ResolvedCoreAIConfig } from '../../config/types.js';
|
|
9
|
-
import {
|
|
10
|
-
generateSkills,
|
|
11
|
-
formatGenerateResult,
|
|
12
|
-
builtInSkills,
|
|
13
|
-
loadCustomTemplates,
|
|
14
|
-
type GenerateSkillsOptions,
|
|
15
|
-
type GenerateSkillsResult,
|
|
16
|
-
} from '../../skills/index.js';
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Options for skills generate command
|
|
20
|
-
*/
|
|
21
|
-
export interface SkillsGenerateOptions {
|
|
22
|
-
/**
|
|
23
|
-
* Project root directory
|
|
24
|
-
*/
|
|
25
|
-
projectRoot?: string;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Output directory for generated skills
|
|
29
|
-
*/
|
|
30
|
-
outputDir?: string;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Directory containing custom skill templates
|
|
34
|
-
*/
|
|
35
|
-
customTemplatesDir?: string;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Only generate specific skills
|
|
39
|
-
*/
|
|
40
|
-
skills?: string[];
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Include core skills (default: true)
|
|
44
|
-
*/
|
|
45
|
-
includeCoreSkills?: boolean;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Include optional skills (default: true)
|
|
49
|
-
*/
|
|
50
|
-
includeOptionalSkills?: boolean;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Overwrite existing skill files
|
|
54
|
-
*/
|
|
55
|
-
overwrite?: boolean;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Additional variables for template substitution
|
|
59
|
-
*/
|
|
60
|
-
variables?: Record<string, string>;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Result of skills generate command
|
|
65
|
-
*/
|
|
66
|
-
export interface SkillsGenerateResult {
|
|
67
|
-
success: boolean;
|
|
68
|
-
result?: GenerateSkillsResult;
|
|
69
|
-
config?: ResolvedCoreAIConfig;
|
|
70
|
-
error?: string;
|
|
71
|
-
warnings?: string[];
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Generate skills from templates
|
|
76
|
-
*/
|
|
77
|
-
export function skillsGenerate(options: SkillsGenerateOptions = {}): SkillsGenerateResult {
|
|
78
|
-
const projectRoot = options.projectRoot ?? process.cwd();
|
|
79
|
-
const warnings: string[] = [];
|
|
80
|
-
|
|
81
|
-
// Load config if available
|
|
82
|
-
let config: ResolvedCoreAIConfig | undefined;
|
|
83
|
-
if (configExists(projectRoot)) {
|
|
84
|
-
try {
|
|
85
|
-
config = loadConfig(projectRoot);
|
|
86
|
-
} catch (error) {
|
|
87
|
-
if (error instanceof ConfigError) {
|
|
88
|
-
return {
|
|
89
|
-
success: false,
|
|
90
|
-
error: `Configuration error: ${error.message}`,
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
return {
|
|
94
|
-
success: false,
|
|
95
|
-
error: `Failed to load config: ${error instanceof Error ? error.message : String(error)}`,
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
} else {
|
|
99
|
-
warnings.push('No configuration file found. Generating skills with defaults.');
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Set up generate options
|
|
103
|
-
const generateOptions: GenerateSkillsOptions = {
|
|
104
|
-
projectRoot,
|
|
105
|
-
includeCoreSkills: options.includeCoreSkills ?? true,
|
|
106
|
-
includeOptionalSkills: options.includeOptionalSkills ?? true,
|
|
107
|
-
overwrite: options.overwrite ?? false,
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
if (options.outputDir) {
|
|
111
|
-
generateOptions.outputDir = options.outputDir;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (options.customTemplatesDir) {
|
|
115
|
-
generateOptions.customTemplatesDir = options.customTemplatesDir;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if (options.skills && options.skills.length > 0) {
|
|
119
|
-
generateOptions.skills = options.skills;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if (options.variables) {
|
|
123
|
-
generateOptions.variables = options.variables;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// Generate skills
|
|
127
|
-
try {
|
|
128
|
-
const result = generateSkills(config, generateOptions);
|
|
129
|
-
|
|
130
|
-
// Check for errors
|
|
131
|
-
if (result.errors.length > 0) {
|
|
132
|
-
return {
|
|
133
|
-
success: false,
|
|
134
|
-
result,
|
|
135
|
-
config,
|
|
136
|
-
error: `Failed to generate ${result.errors.length} skill(s)`,
|
|
137
|
-
warnings: warnings.length > 0 ? warnings : undefined,
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
return {
|
|
142
|
-
success: true,
|
|
143
|
-
result,
|
|
144
|
-
config,
|
|
145
|
-
warnings: warnings.length > 0 ? warnings : undefined,
|
|
146
|
-
};
|
|
147
|
-
} catch (error) {
|
|
148
|
-
return {
|
|
149
|
-
success: false,
|
|
150
|
-
error: `Skill generation failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
151
|
-
warnings: warnings.length > 0 ? warnings : undefined,
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Format skills generate result for display
|
|
158
|
-
*/
|
|
159
|
-
export function formatSkillsGenerateResult(result: SkillsGenerateResult): string {
|
|
160
|
-
const lines: string[] = [];
|
|
161
|
-
|
|
162
|
-
// Warnings
|
|
163
|
-
if (result.warnings && result.warnings.length > 0) {
|
|
164
|
-
for (const warning of result.warnings) {
|
|
165
|
-
lines.push(`⚠ ${warning}`);
|
|
166
|
-
}
|
|
167
|
-
lines.push('');
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
if (!result.success) {
|
|
171
|
-
lines.push(`Skill generation failed: ${result.error}`);
|
|
172
|
-
|
|
173
|
-
// Show individual errors
|
|
174
|
-
if (result.result?.errors && result.result.errors.length > 0) {
|
|
175
|
-
lines.push('');
|
|
176
|
-
for (const error of result.result.errors) {
|
|
177
|
-
lines.push(` ✗ ${error.name}: ${error.error}`);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
return lines.join('\n');
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// Use the generator's format function for the detailed output
|
|
185
|
-
if (result.result) {
|
|
186
|
-
return formatGenerateResult(result.result);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
lines.push('No skills to generate.');
|
|
190
|
-
return lines.join('\n');
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* List available skills
|
|
195
|
-
*/
|
|
196
|
-
export interface SkillsListOptions {
|
|
197
|
-
/**
|
|
198
|
-
* Project root directory
|
|
199
|
-
*/
|
|
200
|
-
projectRoot?: string;
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Directory containing custom skill templates
|
|
204
|
-
*/
|
|
205
|
-
customTemplatesDir?: string;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Include core skills
|
|
209
|
-
*/
|
|
210
|
-
includeCoreSkills?: boolean;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Include optional skills
|
|
214
|
-
*/
|
|
215
|
-
includeOptionalSkills?: boolean;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Information about an available skill
|
|
220
|
-
*/
|
|
221
|
-
export interface SkillInfo {
|
|
222
|
-
name: string;
|
|
223
|
-
description: string;
|
|
224
|
-
category: string;
|
|
225
|
-
dependencies?: string[];
|
|
226
|
-
argumentHint?: string;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Result of skills list command
|
|
231
|
-
*/
|
|
232
|
-
export interface SkillsListResult {
|
|
233
|
-
success: boolean;
|
|
234
|
-
skills?: SkillInfo[];
|
|
235
|
-
error?: string;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* List available skills
|
|
240
|
-
*/
|
|
241
|
-
export function skillsList(options: SkillsListOptions = {}): SkillsListResult {
|
|
242
|
-
try {
|
|
243
|
-
const skills: SkillInfo[] = [];
|
|
244
|
-
|
|
245
|
-
// Add built-in skills
|
|
246
|
-
const includeCoreSkills = options.includeCoreSkills ?? true;
|
|
247
|
-
const includeOptionalSkills = options.includeOptionalSkills ?? true;
|
|
248
|
-
|
|
249
|
-
for (const skill of builtInSkills) {
|
|
250
|
-
if (skill.category === 'core' && !includeCoreSkills) continue;
|
|
251
|
-
if (skill.category === 'optional' && !includeOptionalSkills) continue;
|
|
252
|
-
|
|
253
|
-
skills.push({
|
|
254
|
-
name: skill.name,
|
|
255
|
-
description: skill.description,
|
|
256
|
-
category: skill.category,
|
|
257
|
-
dependencies: skill.dependencies?.filter((d) => d.required).map((d) => d.type),
|
|
258
|
-
argumentHint: skill.argumentHint,
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// Add custom skills if directory specified
|
|
263
|
-
if (options.customTemplatesDir) {
|
|
264
|
-
const customSkills = loadCustomTemplates(options.customTemplatesDir);
|
|
265
|
-
for (const skill of customSkills) {
|
|
266
|
-
skills.push({
|
|
267
|
-
name: skill.name,
|
|
268
|
-
description: skill.description,
|
|
269
|
-
category: skill.category,
|
|
270
|
-
dependencies: skill.dependencies?.filter((d) => d.required).map((d) => d.type),
|
|
271
|
-
argumentHint: skill.argumentHint,
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
return {
|
|
277
|
-
success: true,
|
|
278
|
-
skills,
|
|
279
|
-
};
|
|
280
|
-
} catch (error) {
|
|
281
|
-
return {
|
|
282
|
-
success: false,
|
|
283
|
-
error: `Failed to list skills: ${error instanceof Error ? error.message : String(error)}`,
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* Format skills list result for display
|
|
290
|
-
*/
|
|
291
|
-
export function formatSkillsListResult(result: SkillsListResult): string {
|
|
292
|
-
if (!result.success) {
|
|
293
|
-
return `Error: ${result.error}`;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
if (!result.skills || result.skills.length === 0) {
|
|
297
|
-
return 'No skills available.';
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
const lines: string[] = [];
|
|
301
|
-
lines.push('Available skills:\n');
|
|
302
|
-
|
|
303
|
-
// Group by category
|
|
304
|
-
const coreSkills = result.skills.filter((s) => s.category === 'core');
|
|
305
|
-
const optionalSkills = result.skills.filter((s) => s.category === 'optional');
|
|
306
|
-
const customSkills = result.skills.filter((s) => s.category === 'custom');
|
|
307
|
-
|
|
308
|
-
if (coreSkills.length > 0) {
|
|
309
|
-
lines.push('Core skills:');
|
|
310
|
-
for (const skill of coreSkills) {
|
|
311
|
-
lines.push(` ${skill.name}`);
|
|
312
|
-
lines.push(` ${skill.description}`);
|
|
313
|
-
if (skill.argumentHint) {
|
|
314
|
-
lines.push(` Argument: ${skill.argumentHint}`);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
lines.push('');
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
if (optionalSkills.length > 0) {
|
|
321
|
-
lines.push('Optional skills:');
|
|
322
|
-
for (const skill of optionalSkills) {
|
|
323
|
-
const deps = skill.dependencies?.length
|
|
324
|
-
? ` (requires: ${skill.dependencies.join(', ')})`
|
|
325
|
-
: '';
|
|
326
|
-
lines.push(` ${skill.name}${deps}`);
|
|
327
|
-
lines.push(` ${skill.description}`);
|
|
328
|
-
if (skill.argumentHint) {
|
|
329
|
-
lines.push(` Argument: ${skill.argumentHint}`);
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
lines.push('');
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
if (customSkills.length > 0) {
|
|
336
|
-
lines.push('Custom skills:');
|
|
337
|
-
for (const skill of customSkills) {
|
|
338
|
-
lines.push(` ${skill.name}`);
|
|
339
|
-
lines.push(` ${skill.description}`);
|
|
340
|
-
if (skill.argumentHint) {
|
|
341
|
-
lines.push(` Argument: ${skill.argumentHint}`);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
lines.push('');
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
return lines.join('\n');
|
|
348
|
-
}
|