@almadar/skills 1.2.0 → 1.2.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 +126 -9
- package/dist/index.js +1017 -273
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { OrbitalSchema } from '@almadar/core';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Skill Generator Types
|
|
3
5
|
*
|
|
@@ -298,23 +300,38 @@ declare function getPortableOrbitalOutputSection(): string;
|
|
|
298
300
|
declare function getOrbitalConnectivitySection(): string;
|
|
299
301
|
|
|
300
302
|
/**
|
|
301
|
-
* Atomic Composition Design Guide
|
|
303
|
+
* Atomic Composition Design Guide (v5.0)
|
|
302
304
|
*
|
|
303
|
-
* Teaches the LLM to compose
|
|
304
|
-
*
|
|
305
|
+
* Teaches the LLM to compose sophisticated views using atomic design principles.
|
|
306
|
+
* Every render-ui effect must satisfy the Five Rules of Sophisticated Composition.
|
|
305
307
|
*
|
|
306
|
-
*
|
|
307
|
-
* design composition — the same approach used by template authors in
|
|
308
|
-
* packages/almadar-ui/components/templates/.
|
|
308
|
+
* v5.0: Added mandatory composition rules, validation checklist, and theme enforcement.
|
|
309
309
|
*
|
|
310
310
|
* @packageDocumentation
|
|
311
311
|
*/
|
|
312
312
|
/**
|
|
313
|
-
* Get the render-ui atomic composition guide.
|
|
314
|
-
* Covers syntax, slot strategy, atomic hierarchy, composition rules, and domain recipes.
|
|
313
|
+
* Get the render-ui atomic composition guide with mandatory rules.
|
|
315
314
|
*/
|
|
316
315
|
declare function getRenderUIDesignGuide(): string;
|
|
317
316
|
|
|
317
|
+
/**
|
|
318
|
+
* Theme Variable System Guide
|
|
319
|
+
*
|
|
320
|
+
* Teaches the LLM to use CSS theme variables for all visual properties.
|
|
321
|
+
* Enforces consistent theming across all generated schemas.
|
|
322
|
+
*
|
|
323
|
+
* @packageDocumentation
|
|
324
|
+
*/
|
|
325
|
+
/**
|
|
326
|
+
* Get the theme variable system guide.
|
|
327
|
+
* Covers colors, spacing, radius, and shadows with mandatory enforcement rules.
|
|
328
|
+
*/
|
|
329
|
+
declare function getThemeGuide(): string;
|
|
330
|
+
/**
|
|
331
|
+
* Get banned properties that should never be used.
|
|
332
|
+
*/
|
|
333
|
+
declare function getBannedProps(): string;
|
|
334
|
+
|
|
318
335
|
/**
|
|
319
336
|
* Custom Trait Guidance Section
|
|
320
337
|
*
|
|
@@ -471,6 +488,28 @@ declare function getUsesImportSection(): string;
|
|
|
471
488
|
*/
|
|
472
489
|
declare function getUsesImportCompact(): string;
|
|
473
490
|
|
|
491
|
+
/**
|
|
492
|
+
* Bindings Guide
|
|
493
|
+
*
|
|
494
|
+
* Generates binding documentation from the source of truth in @almadar/core.
|
|
495
|
+
* This ensures the skill guidance matches the actual compiler validation.
|
|
496
|
+
*
|
|
497
|
+
* @packageDocumentation
|
|
498
|
+
*/
|
|
499
|
+
/**
|
|
500
|
+
* Generate binding documentation for skill prompts.
|
|
501
|
+
* Derived from BINDING_DOCS in @almadar/core - single source of truth.
|
|
502
|
+
*/
|
|
503
|
+
declare function getBindingsGuide(): string;
|
|
504
|
+
/**
|
|
505
|
+
* Get compact binding reference (one-liner for tables).
|
|
506
|
+
*/
|
|
507
|
+
declare function getBindingsCompact(): string;
|
|
508
|
+
/**
|
|
509
|
+
* Get binding validation rules for specific contexts.
|
|
510
|
+
*/
|
|
511
|
+
declare function getBindingContextRules(): string;
|
|
512
|
+
|
|
474
513
|
/**
|
|
475
514
|
* Generation Prompts
|
|
476
515
|
*
|
|
@@ -543,4 +582,82 @@ declare function getFieldTypesCompact(): string;
|
|
|
543
582
|
*/
|
|
544
583
|
declare function getKeyBehaviorsReference(): string;
|
|
545
584
|
|
|
546
|
-
|
|
585
|
+
/**
|
|
586
|
+
* Composition Quality Evaluation Framework
|
|
587
|
+
*
|
|
588
|
+
* Evaluates LLM providers' ability to generate sophisticated render-ui effects
|
|
589
|
+
* that meet the Five Rules of Sophisticated Composition.
|
|
590
|
+
*
|
|
591
|
+
* @packageDocumentation
|
|
592
|
+
*/
|
|
593
|
+
|
|
594
|
+
interface EvalCase {
|
|
595
|
+
name: string;
|
|
596
|
+
description: string;
|
|
597
|
+
prompt: string;
|
|
598
|
+
expectedPatterns: string[];
|
|
599
|
+
minScore: number;
|
|
600
|
+
domain: 'general' | 'healthcare' | 'ecommerce' | 'project-management';
|
|
601
|
+
rubric?: {
|
|
602
|
+
structure: Record<string, number>;
|
|
603
|
+
composition: Record<string, number>;
|
|
604
|
+
theme: Record<string, number>;
|
|
605
|
+
quality: Record<string, number>;
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
interface EvalResult {
|
|
609
|
+
caseName: string;
|
|
610
|
+
provider: string;
|
|
611
|
+
score: number;
|
|
612
|
+
passed: boolean;
|
|
613
|
+
breakdown: ScoreBreakdown;
|
|
614
|
+
validationErrors: string[];
|
|
615
|
+
validationWarnings: string[];
|
|
616
|
+
schema?: OrbitalSchema;
|
|
617
|
+
}
|
|
618
|
+
interface ScoreBreakdown {
|
|
619
|
+
structure: number;
|
|
620
|
+
composition: number;
|
|
621
|
+
theme: number;
|
|
622
|
+
quality: number;
|
|
623
|
+
}
|
|
624
|
+
interface CompositionMetrics {
|
|
625
|
+
renderUICount: number;
|
|
626
|
+
atomTypes: string[];
|
|
627
|
+
moleculeTypes: string[];
|
|
628
|
+
organismTypes: string[];
|
|
629
|
+
layoutRoot: string | null;
|
|
630
|
+
nestingDepth: number;
|
|
631
|
+
sectionCount: number;
|
|
632
|
+
themeVariableUsage: number;
|
|
633
|
+
hardcodedValues: string[];
|
|
634
|
+
}
|
|
635
|
+
declare const EVAL_CASES: EvalCase[];
|
|
636
|
+
/**
|
|
637
|
+
* Analyze the composition metrics of a schema.
|
|
638
|
+
*/
|
|
639
|
+
declare function analyzeComposition(schema: OrbitalSchema): CompositionMetrics;
|
|
640
|
+
/**
|
|
641
|
+
* Calculate total score (0-100)
|
|
642
|
+
*/
|
|
643
|
+
declare function calculateTotalScore(schema: OrbitalSchema, testCase: EvalCase, validationErrors: string[]): {
|
|
644
|
+
score: number;
|
|
645
|
+
breakdown: ScoreBreakdown;
|
|
646
|
+
};
|
|
647
|
+
interface ProviderComparison {
|
|
648
|
+
provider: string;
|
|
649
|
+
averageScore: number;
|
|
650
|
+
cases: {
|
|
651
|
+
caseName: string;
|
|
652
|
+
score: number;
|
|
653
|
+
passed: boolean;
|
|
654
|
+
}[];
|
|
655
|
+
strengths: string[];
|
|
656
|
+
weaknesses: string[];
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Generate comparison matrix for all providers.
|
|
660
|
+
*/
|
|
661
|
+
declare function generateComparisonMatrix(comparisons: ProviderComparison[]): string;
|
|
662
|
+
|
|
663
|
+
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, getThemeGuide, getUsesImportCompact, getUsesImportSection, getValidationHintsSection, writeAllSkills, writeSkill };
|