@almadar/skills 1.0.13 → 1.1.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 CHANGED
@@ -52,18 +52,22 @@ declare function writeAllSkills(skills: GeneratedSkill[], baseDir: string): void
52
52
  * Uses the orbital skill generator from the orbitals module and adds
53
53
  * domain classification, interaction models, and trait-driven UI guidance.
54
54
  *
55
+ * v4.0: Reduced from ~49K to ~15K by cutting std dump, schema-updates,
56
+ * custom-traits, and half the errors. Added render-ui design guide with
57
+ * pattern catalog and composition recipes.
58
+ *
55
59
  * @packageDocumentation
56
60
  */
57
61
 
58
62
  /**
59
63
  * Generate the kflow-orbitals skill.
60
64
  *
61
- * Uses the lean orbital skill generator which produces a ~90% smaller skill
62
- * by deriving prompts from types and using focused, minimal sections.
65
+ * Uses the lean orbital skill generator with minimal defaults (~15K).
66
+ * The design guide, top-6 errors, and enriched example are always included.
63
67
  *
64
68
  * Options:
65
- * - compact: false (default) - Include full std/* state machine examples (49K chars)
66
- * - compact: true - Exclude std/* examples for minimal size (24K chars)
69
+ * - compact: false (default) - Standard ~15K generation skill
70
+ * - compact: true - Same (compact flag preserved for API compat, no-op now)
67
71
  */
68
72
  declare function generateKflowOrbitalsSkill(compact?: boolean): GeneratedSkill;
69
73
 
@@ -101,6 +105,35 @@ declare function generateKflowOrbitalFixingSkill(): GeneratedSkill;
101
105
  */
102
106
  declare function generateDomainLanguageSkill(): GeneratedSkill;
103
107
 
108
+ /**
109
+ * KFlow Design Skill Generator
110
+ *
111
+ * Generates the kflow-design skill for render-ui authoring.
112
+ * This is a focused ~10K skill that operates at the transition level,
113
+ * producing rich render-ui effects using the full pattern catalog.
114
+ *
115
+ * Unlike kflow-orbitals (which focuses on structure), this skill
116
+ * focuses entirely on UI design decisions: pattern selection,
117
+ * slot composition, layout nesting, and domain-aware styling.
118
+ *
119
+ * @packageDocumentation
120
+ */
121
+
122
+ /**
123
+ * Generate the kflow-design skill.
124
+ *
125
+ * Produces a focused ~10K skill for render-ui authoring.
126
+ * Used by the design_transition tool to produce rich UI effects.
127
+ */
128
+ declare function generateKflowDesignSkill(): GeneratedSkill;
129
+ /**
130
+ * Get design skill stats for comparison.
131
+ */
132
+ declare function getDesignSkillStats(): {
133
+ lines: number;
134
+ chars: number;
135
+ };
136
+
104
137
  /**
105
138
  * Lean Orbital Skill Generator
106
139
  *
@@ -137,7 +170,13 @@ declare function generateLeanFixingSkill$1(): string;
137
170
  * 2. Using focused, minimal guidance sections
138
171
  * 3. Avoiding verbose explanations and redundancy
139
172
  *
140
- * Target: <1000 lines output (vs 4000+ in original)
173
+ * v4: Reduced from ~49K to ~15K by:
174
+ * - Removing std behaviors JSON dump (21K)
175
+ * - Removing schema-updates (moved to fixing skill)
176
+ * - Removing custom-traits (moved to fixing skill)
177
+ * - Trimming common-errors to top 6
178
+ * - Replacing 380-char render-ui quickref with 2.5K design guide
179
+ * - Using compact decomposition and connectivity variants
141
180
  *
142
181
  * @packageDocumentation
143
182
  */
@@ -154,12 +193,19 @@ interface LeanSkillOptions {
154
193
  includeStdStateMachines?: boolean;
155
194
  /** Include schema update guidance section */
156
195
  includeSchemaUpdates?: boolean;
196
+ /** Include custom trait examples section */
197
+ includeCustomTraits?: boolean;
198
+ /** Error detail level: 'top6' for generation, 'full' for fixing */
199
+ errorLevel?: 'top6' | 'full';
200
+ /** Include render-ui design guide with pattern catalog and recipes */
201
+ includeDesignGuide?: boolean;
157
202
  }
158
203
  /**
159
204
  * Generate a lean orbital skill.
160
205
  *
161
- * This produces a skill that is ~75% smaller than the original while
162
- * containing all essential information for orbital generation.
206
+ * Default options produce a ~15K skill focused on generation quality.
207
+ * Set includeStdStateMachines/includeCustomTraits/errorLevel='full' for
208
+ * the larger ~49K variant used by legacy callers.
163
209
  */
164
210
  declare function generateLeanOrbitalSkill(options?: LeanSkillOptions): string;
165
211
 
@@ -192,19 +238,20 @@ declare function generateLeanFixingSkill(options?: LeanFixingSkillOptions): stri
192
238
  /**
193
239
  * Skill Generators for Builder Client
194
240
  *
195
- * Re-exports the 5 core skills used by the builder client:
241
+ * Re-exports the 6 core skills used by the builder client:
196
242
  * 1. kflow-orbitals (standard JSON generation)
197
243
  * 2. kflow-orbital-fixing (standard fixing)
198
244
  * 3. kflow-lean-orbitals (lean domain language generation)
199
245
  * 4. kflow-lean-fixing (lean fixing)
200
246
  * 5. domain-language (ODL understanding/summarization)
247
+ * 6. kflow-design (render-ui design for transitions)
201
248
  *
202
249
  * @packageDocumentation
203
250
  */
204
251
 
205
252
  /**
206
253
  * Generate all builder client skills.
207
- * These are the 5 skills actually used by the builder UI.
254
+ * These are the 6 skills actually used by the builder UI.
208
255
  */
209
256
  declare function generateAllBuilderSkills(): GeneratedSkill[];
210
257
 
@@ -231,9 +278,9 @@ declare function getArchitectureSection(): string;
231
278
  */
232
279
  /**
233
280
  * Get common errors section.
234
- * These are the most frequent mistakes made during generation.
281
+ * Supports tiered output: 'top6' for generation skill, 'full' for fixing skill.
235
282
  */
236
- declare function getCommonErrorsSection(): string;
283
+ declare function getCommonErrorsSection(level?: 'top6' | 'full'): string;
237
284
  /**
238
285
  * Get validation error hints section.
239
286
  * Quick reference for common validation errors and fixes.
@@ -256,6 +303,16 @@ declare function getDecompositionSection(): string;
256
303
  * Get minimal decomposition checklist.
257
304
  */
258
305
  declare function getDecompositionChecklist(): string;
306
+ /**
307
+ * Get compact decomposition protocol (~1,250 chars).
308
+ * Steps 0-6 without verbose guard examples (guards covered in S-Expr + errors).
309
+ */
310
+ declare function getDecompositionCompact(): string;
311
+ /**
312
+ * Get compact orbital connectivity (~750 chars).
313
+ * One combined example instead of three separate examples.
314
+ */
315
+ declare function getConnectivityCompact(): string;
259
316
  /**
260
317
  * Get flow pattern selection guidance.
261
318
  * Maps application types to appropriate user flow patterns.
@@ -270,6 +327,23 @@ declare function getPortableOrbitalOutputSection(): string;
270
327
  */
271
328
  declare function getOrbitalConnectivitySection(): string;
272
329
 
330
+ /**
331
+ * Pattern Design Guide Section
332
+ *
333
+ * Replaces the 380-char getRenderUIQuickRef() with actionable guidance
334
+ * on pattern selection, composition recipes, and slot strategy.
335
+ *
336
+ * Target: ~2,500 chars — focused entirely on helping the LLM produce
337
+ * rich, varied render-ui effects instead of defaulting to entity-table.
338
+ *
339
+ * @packageDocumentation
340
+ */
341
+ /**
342
+ * Get the render-ui design guide.
343
+ * Covers syntax, slot strategy, pattern-by-intent, and composition recipes.
344
+ */
345
+ declare function getRenderUIDesignGuide(): string;
346
+
273
347
  /**
274
348
  * Custom Trait Guidance Section
275
349
  *
@@ -498,4 +572,4 @@ declare function getFieldTypesCompact(): string;
498
572
  */
499
573
  declare function getKeyBehaviorsReference(): string;
500
574
 
501
- export { type GeneratedSkill, type SkillFrontmatter, formatFrontmatter, generateAllBuilderSkills, generateDomainLanguageSkill, generateKflowOrbitalFixingSkill, generateKflowOrbitalsSkill, generateLeanFixingSkill$1 as generateLeanFixingSkill, generateLeanFixingSkill as generateLeanFixingSkillFull, generateLeanOrbitalSkill$1 as generateLeanOrbitalSkill, generateLeanOrbitalSkill as generateLeanOrbitalSkillFull, getArchitectureSection, getAssetRefSection, getCommonErrorsSection, getCommonFixPatternsSection, getCompletionRulesSection, getContextUsageCompact, getContextUsageSection, getCustomTraitCompact, getCustomTraitSection, getDecompositionChecklist, getDecompositionSection, getDesignErrorsCompact, getDesignErrorsSection, getEfficiencySection, getFieldTypesCompact, getFixingWorkflowSection, getFlowPatternSection, getFullOrbitalPrompt, getGameAsOrbitalsSection, getGameEntityTemplatesSection, getGamePatternsSection, getGameTraitsSection, getGameTypesSection, getIconLibraryCompact, getIconLibrarySection, getKeyBehaviorsReference, getMinimalTypeReference, getMultiFileSection, getOrbitalConnectivitySection, getOrbitalDecompositionPrompt, getOverGenerationSection, getPatternTypesCompact, getPortableOrbitalOutputSection, getRenderUIQuickRef, getRequirementsDecomposePrompt, getRequirementsTraitPrompt, getSExprQuickRef, getSchemaUpdateCompact, getSchemaUpdateSection, getUsesImportCompact, getUsesImportSection, getValidationHintsSection, writeAllSkills, writeSkill };
575
+ export { type GeneratedSkill, type SkillFrontmatter, formatFrontmatter, generateAllBuilderSkills, generateDomainLanguageSkill, generateKflowDesignSkill, generateKflowOrbitalFixingSkill, generateKflowOrbitalsSkill, generateLeanFixingSkill$1 as generateLeanFixingSkill, generateLeanFixingSkill as generateLeanFixingSkillFull, generateLeanOrbitalSkill$1 as generateLeanOrbitalSkill, generateLeanOrbitalSkill as generateLeanOrbitalSkillFull, getArchitectureSection, getAssetRefSection, getCommonErrorsSection, getCommonFixPatternsSection, getCompletionRulesSection, getConnectivityCompact, getContextUsageCompact, getContextUsageSection, getCustomTraitCompact, getCustomTraitSection, getDecompositionChecklist, getDecompositionCompact, getDecompositionSection, getDesignErrorsCompact, getDesignErrorsSection, getDesignSkillStats, 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, getUsesImportCompact, getUsesImportSection, getValidationHintsSection, writeAllSkills, writeSkill };