@almadar/skills 2.0.0 → 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.
- package/dist/index.d.ts +671 -0
- package/package.json +3 -2
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,671 @@
|
|
|
1
|
+
import { OrbitalSchema } from '@almadar/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Skill Generator Types
|
|
5
|
+
*
|
|
6
|
+
* Shared types for all skill generators.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Skill frontmatter metadata.
|
|
12
|
+
*/
|
|
13
|
+
interface SkillFrontmatter {
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
allowedTools?: string[];
|
|
17
|
+
version?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Generated skill output.
|
|
21
|
+
*/
|
|
22
|
+
interface GeneratedSkill {
|
|
23
|
+
name: string;
|
|
24
|
+
frontmatter: SkillFrontmatter;
|
|
25
|
+
content: string;
|
|
26
|
+
references?: Record<string, string>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Skill Generator Utilities
|
|
31
|
+
*
|
|
32
|
+
* Shared utilities for formatting and writing skill files.
|
|
33
|
+
*
|
|
34
|
+
* @packageDocumentation
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Format skill frontmatter to YAML.
|
|
39
|
+
*/
|
|
40
|
+
declare function formatFrontmatter(fm: SkillFrontmatter): string;
|
|
41
|
+
/**
|
|
42
|
+
* Write a skill to the filesystem.
|
|
43
|
+
*/
|
|
44
|
+
declare function writeSkill(skill: GeneratedSkill, baseDir: string): void;
|
|
45
|
+
/**
|
|
46
|
+
* Write all skills to the filesystem.
|
|
47
|
+
*/
|
|
48
|
+
declare function writeAllSkills(skills: GeneratedSkill[], baseDir: string): void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* KFlow Orbitals Skill Generator
|
|
52
|
+
*
|
|
53
|
+
* Generates the kflow-orbitals skill for orbital-based schema generation.
|
|
54
|
+
* Uses the orbital skill generator from the orbitals module and adds
|
|
55
|
+
* domain classification, interaction models, and trait-driven UI guidance.
|
|
56
|
+
*
|
|
57
|
+
* v4.0: Reduced from ~49K to ~15K by cutting std dump, schema-updates,
|
|
58
|
+
* custom-traits, and half the errors. Added render-ui design guide with
|
|
59
|
+
* pattern catalog and composition recipes.
|
|
60
|
+
*
|
|
61
|
+
* @packageDocumentation
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Generate the kflow-orbitals skill.
|
|
66
|
+
*
|
|
67
|
+
* Uses the lean orbital skill generator with minimal defaults (~15K).
|
|
68
|
+
* The design guide, top-6 errors, and enriched example are always included.
|
|
69
|
+
*
|
|
70
|
+
* Options:
|
|
71
|
+
* - compact: false (default) - Standard ~15K generation skill
|
|
72
|
+
* - compact: true - Same (compact flag preserved for API compat, no-op now)
|
|
73
|
+
*/
|
|
74
|
+
declare function generateKflowOrbitalsSkill(compact?: boolean): GeneratedSkill;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* KFlow Orbital Fixing Skill Generator
|
|
78
|
+
*
|
|
79
|
+
* Generates the kflow-orbital-fixing skill for fixing validation errors
|
|
80
|
+
* using orbital understanding. Uses the LEAN fixing skill generator from the
|
|
81
|
+
* orbitals module for reduced token usage.
|
|
82
|
+
*
|
|
83
|
+
* @packageDocumentation
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Generate the kflow-orbital-fixing skill.
|
|
88
|
+
*
|
|
89
|
+
* Uses the lean generator which:
|
|
90
|
+
* - Shares sections with lean-orbital-skill-generator
|
|
91
|
+
* - Adds fixing-specific workflow and patterns
|
|
92
|
+
* - ~42% smaller than the original generator
|
|
93
|
+
*/
|
|
94
|
+
declare function generateKflowOrbitalFixingSkill(): GeneratedSkill;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Domain Language Skill Generator
|
|
98
|
+
*
|
|
99
|
+
* Generates the domain-language skill for understanding, generating,
|
|
100
|
+
* and summarizing KFlow domain language.
|
|
101
|
+
*
|
|
102
|
+
* @packageDocumentation
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Generate the domain-language skill.
|
|
107
|
+
*/
|
|
108
|
+
declare function generateDomainLanguageSkill(): GeneratedSkill;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Lean Orbital Skill Generator
|
|
112
|
+
*
|
|
113
|
+
* Generates kflow-lean-orbitals SKILL.md that:
|
|
114
|
+
* 1. Outputs Domain Language text with S-Expression effects
|
|
115
|
+
* 2. Uses minimal token count (~5x fewer than JSON)
|
|
116
|
+
* 3. Imports from @almadar/* packages for schema knowledge
|
|
117
|
+
*
|
|
118
|
+
* @packageDocumentation
|
|
119
|
+
*/
|
|
120
|
+
/**
|
|
121
|
+
* Generate the kflow-lean-orbitals SKILL.md content
|
|
122
|
+
*/
|
|
123
|
+
declare function generateLeanOrbitalSkill$1(): string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Lean Fixing Skill Generator
|
|
127
|
+
*
|
|
128
|
+
* Generates kflow-lean-fixing SKILL.md for fixing validation errors
|
|
129
|
+
* using Domain Language format.
|
|
130
|
+
*
|
|
131
|
+
* @packageDocumentation
|
|
132
|
+
*/
|
|
133
|
+
/**
|
|
134
|
+
* Generate the kflow-lean-fixing SKILL.md content
|
|
135
|
+
*/
|
|
136
|
+
declare function generateLeanFixingSkill$1(): string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Lean Orbital Skill Generator
|
|
140
|
+
*
|
|
141
|
+
* Generates a minimal, focused orbital skill by:
|
|
142
|
+
* 1. Deriving type information directly from @almadar/core
|
|
143
|
+
* 2. Using focused, minimal guidance sections
|
|
144
|
+
* 3. Avoiding verbose explanations and redundancy
|
|
145
|
+
*
|
|
146
|
+
* v4: Reduced from ~49K to ~15K by:
|
|
147
|
+
* - Removing std behaviors JSON dump (21K)
|
|
148
|
+
* - Removing schema-updates (moved to fixing skill)
|
|
149
|
+
* - Removing custom-traits (moved to fixing skill)
|
|
150
|
+
* - Trimming common-errors to top 6
|
|
151
|
+
* - Replacing 380-char render-ui quickref with 2.5K design guide
|
|
152
|
+
* - Using compact decomposition and connectivity variants
|
|
153
|
+
*
|
|
154
|
+
* @packageDocumentation
|
|
155
|
+
*/
|
|
156
|
+
interface LeanSkillOptions {
|
|
157
|
+
/** Include example orbital */
|
|
158
|
+
includeExample?: boolean;
|
|
159
|
+
/** Include tool workflow section */
|
|
160
|
+
includeToolWorkflow?: boolean;
|
|
161
|
+
/** Include std/* library reference (operators + behaviors) */
|
|
162
|
+
includeStdLibrary?: boolean;
|
|
163
|
+
/** Use full std reference (detailed) vs minimal (compact) */
|
|
164
|
+
stdLibraryFull?: boolean;
|
|
165
|
+
/** Include expanded non-game behaviors with state machines for copying */
|
|
166
|
+
includeStdStateMachines?: boolean;
|
|
167
|
+
/** Include schema update guidance section */
|
|
168
|
+
includeSchemaUpdates?: boolean;
|
|
169
|
+
/** Include custom trait examples section */
|
|
170
|
+
includeCustomTraits?: boolean;
|
|
171
|
+
/** Error detail level: 'top6' for generation, 'full' for fixing */
|
|
172
|
+
errorLevel?: 'top6' | 'full';
|
|
173
|
+
/** Include render-ui design guide with pattern catalog and recipes */
|
|
174
|
+
includeDesignGuide?: boolean;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Generate a lean orbital skill.
|
|
178
|
+
*
|
|
179
|
+
* Default options produce a ~15K skill focused on generation quality.
|
|
180
|
+
* Set includeStdStateMachines/includeCustomTraits/errorLevel='full' for
|
|
181
|
+
* the larger ~49K variant used by legacy callers.
|
|
182
|
+
*/
|
|
183
|
+
declare function generateLeanOrbitalSkill(options?: LeanSkillOptions): string;
|
|
184
|
+
/**
|
|
185
|
+
* Get subagent system prompt for orbital generation.
|
|
186
|
+
* This is used by the orbital generator subagent in @almadar/agent.
|
|
187
|
+
* Provides focused guidance on generating complete orbitals with entities.
|
|
188
|
+
*/
|
|
189
|
+
declare function getSubagentSystemPrompt(): string;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Lean Fixing Skill Generator
|
|
193
|
+
*
|
|
194
|
+
* Generates a minimal, focused fixing skill by:
|
|
195
|
+
* 1. Reusing the same sections as lean-orbital-skill-generator
|
|
196
|
+
* 2. Adding fixing-specific guidance on top
|
|
197
|
+
* 3. Keeping the same modular structure
|
|
198
|
+
*
|
|
199
|
+
* @packageDocumentation
|
|
200
|
+
*/
|
|
201
|
+
interface LeanFixingSkillOptions {
|
|
202
|
+
/** Include over-generation detection */
|
|
203
|
+
includeOverGeneration?: boolean;
|
|
204
|
+
/** Include schema update guidance */
|
|
205
|
+
includeSchemaUpdates?: boolean;
|
|
206
|
+
/** Include efficiency guidelines */
|
|
207
|
+
includeEfficiency?: boolean;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Generate a lean fixing skill.
|
|
211
|
+
*
|
|
212
|
+
* This produces a fixing skill that reuses the lean orbital sections
|
|
213
|
+
* and adds fixing-specific guidance.
|
|
214
|
+
*/
|
|
215
|
+
declare function generateLeanFixingSkill(options?: LeanFixingSkillOptions): string;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Skill Generators for Builder Client
|
|
219
|
+
*
|
|
220
|
+
* Re-exports the 5 core skills used by the builder client:
|
|
221
|
+
* 1. kflow-orbitals (standard JSON generation with atomic composition)
|
|
222
|
+
* 2. kflow-orbital-fixing (standard fixing)
|
|
223
|
+
* 3. kflow-lean-orbitals (lean domain language generation)
|
|
224
|
+
* 4. kflow-lean-fixing (lean fixing)
|
|
225
|
+
* 5. domain-language (ODL understanding/summarization)
|
|
226
|
+
*
|
|
227
|
+
* @packageDocumentation
|
|
228
|
+
*/
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Generate all builder client skills.
|
|
232
|
+
* These are the 5 skills actually used by the builder UI.
|
|
233
|
+
*/
|
|
234
|
+
declare function generateAllBuilderSkills(): GeneratedSkill[];
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Skill Architecture Section
|
|
238
|
+
*
|
|
239
|
+
* Core orbital architecture concepts - minimal, essential information only.
|
|
240
|
+
*
|
|
241
|
+
* @packageDocumentation
|
|
242
|
+
*/
|
|
243
|
+
/**
|
|
244
|
+
* Get the core orbital architecture section.
|
|
245
|
+
* This is the foundational understanding needed for orbital generation.
|
|
246
|
+
*/
|
|
247
|
+
declare function getArchitectureSection(): string;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Common Errors Section
|
|
251
|
+
*
|
|
252
|
+
* Critical mistakes to avoid during orbital generation.
|
|
253
|
+
* Keep this focused on the most frequent errors only.
|
|
254
|
+
*
|
|
255
|
+
* @packageDocumentation
|
|
256
|
+
*/
|
|
257
|
+
/**
|
|
258
|
+
* Get common errors section.
|
|
259
|
+
* Supports tiered output: 'top6' for generation skill, 'full' for fixing skill.
|
|
260
|
+
*/
|
|
261
|
+
declare function getCommonErrorsSection(level?: 'top6' | 'full'): string;
|
|
262
|
+
/**
|
|
263
|
+
* Get validation error hints section.
|
|
264
|
+
* Quick reference for common validation errors and fixes.
|
|
265
|
+
*/
|
|
266
|
+
declare function getValidationHintsSection(): string;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Decomposition Protocol Section
|
|
270
|
+
*
|
|
271
|
+
* Step-by-step protocol for breaking requirements into orbital units.
|
|
272
|
+
* Keep this focused on the decision process, not verbose explanations.
|
|
273
|
+
*
|
|
274
|
+
* @packageDocumentation
|
|
275
|
+
*/
|
|
276
|
+
/**
|
|
277
|
+
* Get the decomposition protocol section.
|
|
278
|
+
*/
|
|
279
|
+
declare function getDecompositionSection(): string;
|
|
280
|
+
/**
|
|
281
|
+
* Get minimal decomposition checklist.
|
|
282
|
+
*/
|
|
283
|
+
declare function getDecompositionChecklist(): string;
|
|
284
|
+
/**
|
|
285
|
+
* Get compact decomposition protocol (~1,250 chars).
|
|
286
|
+
* Steps 0-6 without verbose guard examples (guards covered in S-Expr + errors).
|
|
287
|
+
*/
|
|
288
|
+
declare function getDecompositionCompact(): string;
|
|
289
|
+
/**
|
|
290
|
+
* Get compact orbital connectivity (~750 chars).
|
|
291
|
+
* One combined example instead of three separate examples.
|
|
292
|
+
*/
|
|
293
|
+
declare function getConnectivityCompact(): string;
|
|
294
|
+
/**
|
|
295
|
+
* Get flow pattern selection guidance.
|
|
296
|
+
* Maps application types to appropriate user flow patterns.
|
|
297
|
+
*/
|
|
298
|
+
declare function getFlowPatternSection(): string;
|
|
299
|
+
/**
|
|
300
|
+
* Get guidance for outputting orbitals with embedded context.
|
|
301
|
+
*/
|
|
302
|
+
declare function getPortableOrbitalOutputSection(): string;
|
|
303
|
+
/**
|
|
304
|
+
* Get guidance for connecting orbitals together.
|
|
305
|
+
*/
|
|
306
|
+
declare function getOrbitalConnectivitySection(): string;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Atomic Composition Design Guide (v5.0)
|
|
310
|
+
*
|
|
311
|
+
* Teaches the LLM to compose sophisticated views using atomic design principles.
|
|
312
|
+
* Every render-ui effect must satisfy the Five Rules of Sophisticated Composition.
|
|
313
|
+
*
|
|
314
|
+
* v5.0: Added mandatory composition rules, validation checklist, and theme enforcement.
|
|
315
|
+
*
|
|
316
|
+
* @packageDocumentation
|
|
317
|
+
*/
|
|
318
|
+
/**
|
|
319
|
+
* Get the render-ui atomic composition guide with mandatory rules.
|
|
320
|
+
*/
|
|
321
|
+
declare function getRenderUIDesignGuide(): string;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Theme Variable System Guide
|
|
325
|
+
*
|
|
326
|
+
* Teaches the LLM to use CSS theme variables for all visual properties.
|
|
327
|
+
* Enforces consistent theming across all generated schemas.
|
|
328
|
+
*
|
|
329
|
+
* @packageDocumentation
|
|
330
|
+
*/
|
|
331
|
+
/**
|
|
332
|
+
* Get the theme variable system guide.
|
|
333
|
+
* Covers colors, spacing, radius, and shadows with mandatory enforcement rules.
|
|
334
|
+
*/
|
|
335
|
+
declare function getThemeGuide(): string;
|
|
336
|
+
/**
|
|
337
|
+
* Get banned properties that should never be used.
|
|
338
|
+
*/
|
|
339
|
+
declare function getBannedProps(): string;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Custom Trait Guidance Section
|
|
343
|
+
*
|
|
344
|
+
* Comprehensive guidance for creating custom traits.
|
|
345
|
+
* Part of the lean orbital skill.
|
|
346
|
+
*
|
|
347
|
+
* @packageDocumentation
|
|
348
|
+
*/
|
|
349
|
+
/**
|
|
350
|
+
* Get the custom trait guidance section.
|
|
351
|
+
*/
|
|
352
|
+
declare function getCustomTraitSection(): string;
|
|
353
|
+
/**
|
|
354
|
+
* Get a compact version of custom trait guidance.
|
|
355
|
+
*/
|
|
356
|
+
declare function getCustomTraitCompact(): string;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Schema Update Guidance
|
|
360
|
+
*
|
|
361
|
+
* Provides guidance for modifying existing orbital schemas.
|
|
362
|
+
*
|
|
363
|
+
* @packageDocumentation
|
|
364
|
+
*/
|
|
365
|
+
/**
|
|
366
|
+
* Get the full schema update section.
|
|
367
|
+
*/
|
|
368
|
+
declare function getSchemaUpdateSection(): string;
|
|
369
|
+
/**
|
|
370
|
+
* Get compact schema update guidance (shorter version).
|
|
371
|
+
*/
|
|
372
|
+
declare function getSchemaUpdateCompact(): string;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Context Usage Section
|
|
376
|
+
*
|
|
377
|
+
* Guidance for using embedded context when generating orbitals.
|
|
378
|
+
* Small, reusable section for skill generators.
|
|
379
|
+
*
|
|
380
|
+
* @packageDocumentation
|
|
381
|
+
*/
|
|
382
|
+
/**
|
|
383
|
+
* Get guidance for using embedded context during generation.
|
|
384
|
+
*/
|
|
385
|
+
declare function getContextUsageSection(): string;
|
|
386
|
+
/**
|
|
387
|
+
* Get compact context usage for space-constrained prompts.
|
|
388
|
+
*/
|
|
389
|
+
declare function getContextUsageCompact(): string;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Design-Specific Errors Section
|
|
393
|
+
*
|
|
394
|
+
* Common errors specific to the design skill that transforms
|
|
395
|
+
* wireframe schemas into polished applications.
|
|
396
|
+
*
|
|
397
|
+
* @packageDocumentation
|
|
398
|
+
*/
|
|
399
|
+
/**
|
|
400
|
+
* Get design-specific common errors section.
|
|
401
|
+
* These are the most frequent mistakes when beautifying schemas.
|
|
402
|
+
*/
|
|
403
|
+
declare function getDesignErrorsSection(): string;
|
|
404
|
+
/**
|
|
405
|
+
* Get compact design errors for lean skill.
|
|
406
|
+
*/
|
|
407
|
+
declare function getDesignErrorsCompact(): string;
|
|
408
|
+
/**
|
|
409
|
+
* Get icon library reference.
|
|
410
|
+
*/
|
|
411
|
+
declare function getIconLibrarySection(): string;
|
|
412
|
+
/**
|
|
413
|
+
* Get compact icon reference.
|
|
414
|
+
*/
|
|
415
|
+
declare function getIconLibraryCompact(): string;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Fixing Guidance Section
|
|
419
|
+
*
|
|
420
|
+
* Specialized guidance for fixing validation errors in orbital schemas.
|
|
421
|
+
*
|
|
422
|
+
* @packageDocumentation
|
|
423
|
+
*/
|
|
424
|
+
/**
|
|
425
|
+
* Get the fixing workflow section.
|
|
426
|
+
*/
|
|
427
|
+
declare function getFixingWorkflowSection(): string;
|
|
428
|
+
/**
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Get common fix patterns section.
|
|
432
|
+
*/
|
|
433
|
+
declare function getCommonFixPatternsSection(): string;
|
|
434
|
+
/**
|
|
435
|
+
* Get over-generation detection section.
|
|
436
|
+
*/
|
|
437
|
+
declare function getOverGenerationSection(): string;
|
|
438
|
+
/**
|
|
439
|
+
* Get efficiency guidelines section.
|
|
440
|
+
*/
|
|
441
|
+
declare function getEfficiencySection(): string;
|
|
442
|
+
/**
|
|
443
|
+
* Get completion rules section.
|
|
444
|
+
*/
|
|
445
|
+
declare function getCompletionRulesSection(): string;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Game Guidance Section
|
|
449
|
+
*
|
|
450
|
+
* Specialized guidance for generating game orbital schemas.
|
|
451
|
+
*
|
|
452
|
+
* @packageDocumentation
|
|
453
|
+
*/
|
|
454
|
+
/**
|
|
455
|
+
* Get the game as orbitals composition section.
|
|
456
|
+
*/
|
|
457
|
+
declare function getGameAsOrbitalsSection(): string;
|
|
458
|
+
/**
|
|
459
|
+
* Get game entity templates section.
|
|
460
|
+
*/
|
|
461
|
+
declare function getGameEntityTemplatesSection(): string;
|
|
462
|
+
/**
|
|
463
|
+
* Get game traits section.
|
|
464
|
+
*/
|
|
465
|
+
declare function getGameTraitsSection(): string;
|
|
466
|
+
/**
|
|
467
|
+
* Get game patterns section.
|
|
468
|
+
*/
|
|
469
|
+
declare function getGamePatternsSection(): string;
|
|
470
|
+
/**
|
|
471
|
+
* Get asset reference section.
|
|
472
|
+
*/
|
|
473
|
+
declare function getAssetRefSection(): string;
|
|
474
|
+
/**
|
|
475
|
+
* Get multi-file composition section.
|
|
476
|
+
*/
|
|
477
|
+
declare function getMultiFileSection(): string;
|
|
478
|
+
/**
|
|
479
|
+
* Get game types section.
|
|
480
|
+
*/
|
|
481
|
+
declare function getGameTypesSection(): string;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Uses Import System Section
|
|
485
|
+
*
|
|
486
|
+
* Guidance for using the `uses` declaration to import external orbitals.
|
|
487
|
+
*
|
|
488
|
+
* @packageDocumentation
|
|
489
|
+
*/
|
|
490
|
+
/**
|
|
491
|
+
* Get the uses import system section.
|
|
492
|
+
*/
|
|
493
|
+
declare function getUsesImportSection(): string;
|
|
494
|
+
/**
|
|
495
|
+
* Get compact uses guidance.
|
|
496
|
+
*/
|
|
497
|
+
declare function getUsesImportCompact(): string;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Bindings Guide
|
|
501
|
+
*
|
|
502
|
+
* Generates binding documentation from the source of truth in @almadar/core.
|
|
503
|
+
* This ensures the skill guidance matches the actual compiler validation.
|
|
504
|
+
*
|
|
505
|
+
* @packageDocumentation
|
|
506
|
+
*/
|
|
507
|
+
/**
|
|
508
|
+
* Generate binding documentation for skill prompts.
|
|
509
|
+
* Derived from BINDING_DOCS in @almadar/core - single source of truth.
|
|
510
|
+
*/
|
|
511
|
+
declare function getBindingsGuide(): string;
|
|
512
|
+
/**
|
|
513
|
+
* Get compact binding reference (one-liner for tables).
|
|
514
|
+
*/
|
|
515
|
+
declare function getBindingsCompact(): string;
|
|
516
|
+
/**
|
|
517
|
+
* Get binding validation rules for specific contexts.
|
|
518
|
+
*/
|
|
519
|
+
declare function getBindingContextRules(): string;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Generation Prompts
|
|
523
|
+
*
|
|
524
|
+
* Prompts for the generateFullOrbital() function composed from reusable skill sections.
|
|
525
|
+
* These are used by @almadar/agent for programmatic orbital generation.
|
|
526
|
+
*
|
|
527
|
+
* @packageDocumentation
|
|
528
|
+
*/
|
|
529
|
+
/**
|
|
530
|
+
* Get prompt for decomposing a request into orbital units.
|
|
531
|
+
* Used by the main agent before calling generateFullOrbital on each unit.
|
|
532
|
+
*/
|
|
533
|
+
declare function getOrbitalDecompositionPrompt(): string;
|
|
534
|
+
/**
|
|
535
|
+
* Get prompt for expanding a lightweight orbital into a full orbital.
|
|
536
|
+
* This is the main prompt used by generateFullOrbital().
|
|
537
|
+
*/
|
|
538
|
+
declare function getFullOrbitalPrompt(): string;
|
|
539
|
+
/**
|
|
540
|
+
* Get prompt for requirements-aware decomposition.
|
|
541
|
+
* Used when extracted requirements are available from analysis phase.
|
|
542
|
+
*/
|
|
543
|
+
declare function getRequirementsDecomposePrompt(): string;
|
|
544
|
+
/**
|
|
545
|
+
* Get prompt for generating traits from requirements.
|
|
546
|
+
* Used when requirements need to be converted to trait state machines.
|
|
547
|
+
*/
|
|
548
|
+
declare function getRequirementsTraitPrompt(): string;
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Type References
|
|
552
|
+
*
|
|
553
|
+
* Auto-generated type reference sections from @almadar packages.
|
|
554
|
+
* Used to compose generation prompts.
|
|
555
|
+
*
|
|
556
|
+
* @packageDocumentation
|
|
557
|
+
*/
|
|
558
|
+
/**
|
|
559
|
+
* Get minimal type reference for orbital schemas.
|
|
560
|
+
* Covers entities, traits, pages, and basic structure.
|
|
561
|
+
*/
|
|
562
|
+
declare function getMinimalTypeReference(): string;
|
|
563
|
+
/**
|
|
564
|
+
* Get compact pattern types listing.
|
|
565
|
+
*/
|
|
566
|
+
declare function getPatternTypesCompact(): string;
|
|
567
|
+
/**
|
|
568
|
+
* Get S-Expression quick reference.
|
|
569
|
+
*/
|
|
570
|
+
declare function getSExprQuickRef(): string;
|
|
571
|
+
/**
|
|
572
|
+
* Get render-ui quick reference.
|
|
573
|
+
*/
|
|
574
|
+
declare function getRenderUIQuickRef(): string;
|
|
575
|
+
/**
|
|
576
|
+
* Get field types compact reference.
|
|
577
|
+
*/
|
|
578
|
+
declare function getFieldTypesCompact(): string;
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* Behaviors Reference
|
|
582
|
+
*
|
|
583
|
+
* Helper for generating standard behaviors documentation from @almadar/std.
|
|
584
|
+
*
|
|
585
|
+
* @packageDocumentation
|
|
586
|
+
*/
|
|
587
|
+
/**
|
|
588
|
+
* Get key behaviors reference (compact).
|
|
589
|
+
* Uses @almadar/std to generate the behaviors documentation.
|
|
590
|
+
*/
|
|
591
|
+
declare function getKeyBehaviorsReference(): string;
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Composition Quality Evaluation Framework
|
|
595
|
+
*
|
|
596
|
+
* Evaluates LLM providers' ability to generate sophisticated render-ui effects
|
|
597
|
+
* that meet the Five Rules of Sophisticated Composition.
|
|
598
|
+
*
|
|
599
|
+
* @packageDocumentation
|
|
600
|
+
*/
|
|
601
|
+
|
|
602
|
+
interface EvalCase {
|
|
603
|
+
name: string;
|
|
604
|
+
description: string;
|
|
605
|
+
prompt: string;
|
|
606
|
+
expectedPatterns: string[];
|
|
607
|
+
minScore: number;
|
|
608
|
+
domain: 'general' | 'healthcare' | 'ecommerce' | 'project-management';
|
|
609
|
+
rubric?: {
|
|
610
|
+
structure: Record<string, number>;
|
|
611
|
+
composition: Record<string, number>;
|
|
612
|
+
theme: Record<string, number>;
|
|
613
|
+
quality: Record<string, number>;
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
interface EvalResult {
|
|
617
|
+
caseName: string;
|
|
618
|
+
provider: string;
|
|
619
|
+
score: number;
|
|
620
|
+
passed: boolean;
|
|
621
|
+
breakdown: ScoreBreakdown;
|
|
622
|
+
validationErrors: string[];
|
|
623
|
+
validationWarnings: string[];
|
|
624
|
+
schema?: OrbitalSchema;
|
|
625
|
+
}
|
|
626
|
+
interface ScoreBreakdown {
|
|
627
|
+
structure: number;
|
|
628
|
+
composition: number;
|
|
629
|
+
theme: number;
|
|
630
|
+
quality: number;
|
|
631
|
+
}
|
|
632
|
+
interface CompositionMetrics {
|
|
633
|
+
renderUICount: number;
|
|
634
|
+
atomTypes: string[];
|
|
635
|
+
moleculeTypes: string[];
|
|
636
|
+
organismTypes: string[];
|
|
637
|
+
layoutRoot: string | null;
|
|
638
|
+
nestingDepth: number;
|
|
639
|
+
sectionCount: number;
|
|
640
|
+
themeVariableUsage: number;
|
|
641
|
+
hardcodedValues: string[];
|
|
642
|
+
}
|
|
643
|
+
declare const EVAL_CASES: EvalCase[];
|
|
644
|
+
/**
|
|
645
|
+
* Analyze the composition metrics of a schema.
|
|
646
|
+
*/
|
|
647
|
+
declare function analyzeComposition(schema: OrbitalSchema): CompositionMetrics;
|
|
648
|
+
/**
|
|
649
|
+
* Calculate total score (0-100)
|
|
650
|
+
*/
|
|
651
|
+
declare function calculateTotalScore(schema: OrbitalSchema, testCase: EvalCase, validationErrors: string[]): {
|
|
652
|
+
score: number;
|
|
653
|
+
breakdown: ScoreBreakdown;
|
|
654
|
+
};
|
|
655
|
+
interface ProviderComparison {
|
|
656
|
+
provider: string;
|
|
657
|
+
averageScore: number;
|
|
658
|
+
cases: {
|
|
659
|
+
caseName: string;
|
|
660
|
+
score: number;
|
|
661
|
+
passed: boolean;
|
|
662
|
+
}[];
|
|
663
|
+
strengths: string[];
|
|
664
|
+
weaknesses: string[];
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Generate comparison matrix for all providers.
|
|
668
|
+
*/
|
|
669
|
+
declare function generateComparisonMatrix(comparisons: ProviderComparison[]): string;
|
|
670
|
+
|
|
671
|
+
export { type CompositionMetrics, EVAL_CASES, type EvalCase, type EvalResult, type GeneratedSkill, type ProviderComparison, type ScoreBreakdown, type SkillFrontmatter, analyzeComposition, calculateTotalScore, formatFrontmatter, generateAllBuilderSkills, generateComparisonMatrix, generateDomainLanguageSkill, generateKflowOrbitalFixingSkill, generateKflowOrbitalsSkill, generateLeanFixingSkill$1 as generateLeanFixingSkill, generateLeanFixingSkill as generateLeanFixingSkillFull, generateLeanOrbitalSkill$1 as generateLeanOrbitalSkill, generateLeanOrbitalSkill as generateLeanOrbitalSkillFull, getArchitectureSection, getAssetRefSection, getBannedProps, getBindingContextRules, getBindingsCompact, getBindingsGuide, getCommonErrorsSection, getCommonFixPatternsSection, getCompletionRulesSection, getConnectivityCompact, getContextUsageCompact, getContextUsageSection, getCustomTraitCompact, getCustomTraitSection, getDecompositionChecklist, getDecompositionCompact, getDecompositionSection, getDesignErrorsCompact, getDesignErrorsSection, getEfficiencySection, getFieldTypesCompact, getFixingWorkflowSection, getFlowPatternSection, getFullOrbitalPrompt, getGameAsOrbitalsSection, getGameEntityTemplatesSection, getGamePatternsSection, getGameTraitsSection, getGameTypesSection, getIconLibraryCompact, getIconLibrarySection, getKeyBehaviorsReference, getMinimalTypeReference, getMultiFileSection, getOrbitalConnectivitySection, getOrbitalDecompositionPrompt, getOverGenerationSection, getPatternTypesCompact, getPortableOrbitalOutputSection, getRenderUIDesignGuide, getRenderUIQuickRef, getRequirementsDecomposePrompt, getRequirementsTraitPrompt, getSExprQuickRef, getSchemaUpdateCompact, getSchemaUpdateSection, getSubagentSystemPrompt, getThemeGuide, getUsesImportCompact, getUsesImportSection, getValidationHintsSection, writeAllSkills, writeSkill };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/skills",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "AI skill generators and prompts for Orbital schema generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"dotenv": "^16.4.0",
|
|
39
39
|
"tsup": "^8.0.0",
|
|
40
40
|
"tsx": "^4.7.0",
|
|
41
|
-
"typescript": "^5.4.0"
|
|
41
|
+
"typescript": "^5.4.0",
|
|
42
|
+
"@types/node": "^22.0.0"
|
|
42
43
|
},
|
|
43
44
|
"repository": {
|
|
44
45
|
"type": "git",
|