@almadar/skills 2.1.0 → 2.2.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/dist/index.js CHANGED
@@ -4076,6 +4076,647 @@ When answering:
4076
4076
  };
4077
4077
  }
4078
4078
 
4079
+ // src/generators/orb.ts
4080
+ function generateOrbSkill() {
4081
+ const frontmatter = {
4082
+ name: "orb",
4083
+ description: "Generate .orb programs using molecule-first composition. Atoms + molecules only, no organisms.",
4084
+ allowedTools: ["Read", "Write", "Edit", "generate_orbital", "generate_schema_orchestrated", "finish_task", "query_schema_structure", "extract_chunk", "apply_chunk"],
4085
+ version: "1.0.0"
4086
+ };
4087
+ const content = generateOrbSkillContent();
4088
+ return {
4089
+ name: "orb",
4090
+ frontmatter,
4091
+ content
4092
+ };
4093
+ }
4094
+ function generateOrbSkillContent() {
4095
+ return `# Orb Generation Skill (Molecule-First)
4096
+
4097
+ > Generate .orb programs using Orbital Units: Entity x Traits x Patterns
4098
+ > Pattern vocabulary: atoms + molecules only. No organisms.
4099
+
4100
+ ${getArchitectureSection()}
4101
+
4102
+ ---
4103
+
4104
+ ${getSExprQuickRef()}
4105
+
4106
+ ---
4107
+
4108
+ ${getMoleculeFirstDesignGuide()}
4109
+
4110
+ ---
4111
+
4112
+ ${getThemeGuide()}
4113
+
4114
+ ---
4115
+
4116
+ ${getBannedProps()}
4117
+
4118
+ ---
4119
+
4120
+ ${getFlowPatternSection()}
4121
+
4122
+ ---
4123
+
4124
+ ${getDecompositionCompact()}
4125
+
4126
+ ---
4127
+
4128
+ ${getPortableOrbitalOutputSection()}
4129
+
4130
+ ---
4131
+
4132
+ ${getConnectivityCompact()}
4133
+
4134
+ ---
4135
+
4136
+ ${getContextUsageCompact()}
4137
+
4138
+ ---
4139
+
4140
+ ${getCommonErrorsSection("top6")}
4141
+
4142
+ ${getToolWorkflowSection2()}
4143
+
4144
+ ${getCriticalOutputRequirements2()}
4145
+
4146
+ ${getMoleculeFirstExample()}
4147
+ `;
4148
+ }
4149
+ function getMoleculeFirstDesignGuide() {
4150
+ return `## Render-UI Molecule-First Design Guide
4151
+
4152
+ ### The Five Rules of Composition (MANDATORY)
4153
+
4154
+ | Rule | Requirement |
4155
+ |------|-------------|
4156
+ | **1** | **Single Render-UI** per transition |
4157
+ | **2** | **Two Levels**: Atoms (2+) + Molecules (1+) |
4158
+ | **3** | **Layout Wrapper**: Root must be \`stack\`, \`card\`, \`box\`, or \`simple-grid\` |
4159
+ | **4** | **Theme Variables**: ALL visual props use CSS vars |
4160
+ | **5** | **Composable**: Build from small pieces, never use rigid organisms |
4161
+
4162
+ ---
4163
+
4164
+ ### Pattern Vocabulary
4165
+
4166
+ These are the ONLY patterns you may use. They are derived from 104 production behaviors across 18 domains.
4167
+
4168
+ #### Atoms (Basic UI Elements)
4169
+
4170
+ | Pattern | Purpose | Key Props |
4171
+ |---------|---------|-----------|
4172
+ | \`typography\` | All text content | \`variant\` (h1-h6, body, caption), \`text\`, \`color\` |
4173
+ | \`button\` | User actions | \`label\`, \`event\`, \`variant\` (primary, secondary, ghost, destructive) |
4174
+ | \`icon\` | Lucide icons | \`name\`, \`size\`, \`color\` |
4175
+ | \`badge\` | Status indicators | \`text\`, \`variant\` (primary, success, warning, error) |
4176
+ | \`divider\` | Visual separation | \`orientation\` |
4177
+ | \`avatar\` | User/entity images | \`src\`, \`name\`, \`size\` |
4178
+ | \`progress-bar\` | Progress indicators | \`value\`, \`max\`, \`label\` |
4179
+ | \`status-dot\` | Status indicator dots | \`status\`, \`label\` |
4180
+ | \`star-rating\` | Rating display | \`value\`, \`max\` |
4181
+
4182
+ #### Layout Molecules
4183
+
4184
+ | Pattern | Purpose | Key Props |
4185
+ |---------|---------|-----------|
4186
+ | \`stack\` | Flex layout (V/H) | \`direction\` (vertical/horizontal), \`gap\`, \`align\`, \`justify\`, \`wrap\` |
4187
+ | \`card\` | Content grouping | \`padding\`, \`border\`, \`rounded\`, \`shadow\`, \`children\` |
4188
+ | \`box\` | Visual container | \`padding\`, \`bg\`, \`border\`, \`rounded\`, \`shadow\`, \`children\` |
4189
+ | \`simple-grid\` | Grid layout | \`cols\`, \`gap\`, \`children\` |
4190
+
4191
+ #### Data Molecules
4192
+
4193
+ | Pattern | Purpose | Key Props |
4194
+ |---------|---------|-----------|
4195
+ | \`data-grid\` | Tabular data display | \`entity\`, \`fields\`, \`itemActions\`, \`cols\`, \`gap\` |
4196
+ | \`data-list\` | Vertical list display | \`entity\`, \`fields\`, \`itemActions\` |
4197
+ | \`form-section\` | Form input groups | \`entity\`, \`fields\`, \`submitEvent\`, \`cancelEvent\` |
4198
+ | \`search-input\` | Search fields | \`placeholder\`, \`event\` |
4199
+ | \`filter-group\` | Filter controls | \`filters\`, \`event\` |
4200
+ | \`tabs\` | Tabbed content | \`tabs\`, \`activeTab\` |
4201
+
4202
+ #### Metric/Chart Molecules
4203
+
4204
+ | Pattern | Purpose | Key Props |
4205
+ |---------|---------|-----------|
4206
+ | \`stat-display\` | Single KPI display | \`label\`, \`value\`, \`icon\` |
4207
+ | \`stats\` | Multiple stat cards | \`entity\`, \`items\` |
4208
+ | \`stat-badge\` | Stat with badge | \`label\`, \`value\`, \`variant\` |
4209
+ | \`meter\` | Metric gauge | \`value\`, \`max\`, \`label\` |
4210
+ | \`line-chart\` | Line chart | \`entity\`, \`xField\`, \`yField\` |
4211
+ | \`chart\` | Generic chart | \`entity\`, \`type\`, \`fields\` |
4212
+ | \`trend-indicator\` | Trend up/down | \`value\`, \`direction\` |
4213
+ | \`score-display\` | Score/count | \`value\`, \`label\` |
4214
+
4215
+ #### State Molecules
4216
+
4217
+ | Pattern | Purpose | Key Props |
4218
+ |---------|---------|-----------|
4219
+ | \`empty-state\` | No data fallback | \`title\`, \`description\`, \`icon\` |
4220
+ | \`loading-state\` | Loading spinner | \`message\` |
4221
+
4222
+ #### Form Molecules
4223
+
4224
+ | Pattern | Purpose | Key Props |
4225
+ |---------|---------|-----------|
4226
+ | \`textarea\` | Multi-line input | \`placeholder\`, \`rows\` |
4227
+ | \`range-slider\` | Range input | \`min\`, \`max\`, \`step\`, \`value\` |
4228
+ | \`upload-drop-zone\` | File upload | \`accept\`, \`maxSize\` |
4229
+ | \`calendar-grid\` | Date picker grid | \`selectedDate\`, \`event\` |
4230
+
4231
+ #### Navigation Molecules
4232
+
4233
+ | Pattern | Purpose | Key Props |
4234
+ |---------|---------|-----------|
4235
+ | \`wizard-progress\` | Multi-step progress | \`steps\`, \`currentStep\` |
4236
+ | \`wizard-navigation\` | Step navigation | \`steps\`, \`currentStep\` |
4237
+ | \`action-buttons\` | Action button group | \`actions\` |
4238
+
4239
+ #### Specialty Molecules
4240
+
4241
+ | Pattern | Purpose | Key Props |
4242
+ |---------|---------|-----------|
4243
+ | \`lightbox\` | Image/media viewer | \`src\`, \`alt\` |
4244
+ | \`map-view\` | Map display | \`center\`, \`zoom\`, \`markers\` |
4245
+ | \`health-bar\` | Health/HP bar | \`value\`, \`max\` |
4246
+ | \`d-pad\` | Directional pad | \`events\` |
4247
+ | \`combat-log\` | Event log | \`entries\` |
4248
+ | \`dialogue-box\` | Dialogue/chat | \`speaker\`, \`text\` |
4249
+
4250
+ #### Game Canvas Molecules
4251
+
4252
+ | Pattern | Purpose | Key Props |
4253
+ |---------|---------|-----------|
4254
+ | \`isometric-canvas\` | 3D isometric canvas | \`tiles\`, \`units\` |
4255
+ | \`platformer-canvas\` | 2D platformer | \`entities\`, \`viewport\` |
4256
+ | \`simulation-canvas\` | Simulation display | \`entities\`, \`viewport\` |
4257
+ | \`canvas-effect\` | Canvas visual effects | \`effect\`, \`duration\` |
4258
+ | \`game-hud\` | Game HUD overlay | \`stats\`, \`actions\` |
4259
+ | \`game-menu\` | Game menu | \`items\` |
4260
+ | \`game-over-screen\` | End screen | \`score\`, \`message\` |
4261
+ | \`inventory-panel\` | Inventory display | \`items\`, \`slots\` |
4262
+
4263
+ ---
4264
+
4265
+ ### BANNED Patterns (NEVER USE)
4266
+
4267
+ These organism-level patterns are deprecated. Use the molecule equivalents:
4268
+
4269
+ | Banned Pattern | Use Instead |
4270
+ |---------------|-------------|
4271
+ | \`entity-table\` | \`data-grid\` with \`entity\`, \`fields\`, \`itemActions\` |
4272
+ | \`entity-list\` | \`data-list\` with \`entity\`, \`fields\`, \`itemActions\` |
4273
+ | \`entity-cards\` | \`data-grid\` with \`cols: 3\`, or compose with \`card\` children in a \`simple-grid\` |
4274
+ | \`page-header\` | Compose with \`stack\` (horizontal) + \`typography\` (h1) + \`button\` |
4275
+ | \`detail-panel\` | Compose with \`stack\` (vertical) + \`typography\` + \`badge\` + \`divider\` |
4276
+ | \`timeline\` | Compose with \`data-list\` or \`stack\` + timestamp items |
4277
+ | \`crud-template\` | Compose from \`data-grid\` + \`form-section\` + layout molecules |
4278
+ | \`list-template\` | Compose from \`data-list\` + \`search-input\` + layout molecules |
4279
+ | \`detail-template\` | Compose from \`stack\` + \`typography\` + \`badge\` + \`button\` |
4280
+
4281
+ ---
4282
+
4283
+ ### Layout-First Structure (Rule 3)
4284
+
4285
+ Root element MUST be a layout molecule:
4286
+
4287
+ \`\`\`json
4288
+ { "type": "stack", "direction": "vertical", "gap": "lg", "children": [...] }
4289
+ { "type": "stack", "direction": "horizontal", "gap": "md", "children": [...] }
4290
+ { "type": "box", "padding": "lg", "bg": "var(--color-card)", "children": [...] }
4291
+ { "type": "simple-grid", "cols": 3, "gap": "md", "children": [...] }
4292
+ \`\`\`
4293
+
4294
+ #### Layout Props Reference
4295
+
4296
+ **Stack (VStack/HStack)**
4297
+ \`\`\`json
4298
+ {
4299
+ "type": "stack",
4300
+ "direction": "vertical" | "horizontal",
4301
+ "gap": "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl",
4302
+ "align": "start" | "center" | "end" | "stretch",
4303
+ "justify": "start" | "center" | "end" | "between" | "around",
4304
+ "wrap": true | false
4305
+ }
4306
+ \`\`\`
4307
+
4308
+ **Box**
4309
+ \`\`\`json
4310
+ {
4311
+ "type": "box",
4312
+ "padding": "none" | "xs" | "sm" | "md" | "lg" | "xl",
4313
+ "bg": "var(--color-card)" | "var(--color-muted)" | "var(--color-primary)",
4314
+ "border": true | false,
4315
+ "rounded": "var(--radius-md)" | "var(--radius-lg)",
4316
+ "shadow": "var(--shadow-sm)" | "var(--shadow-md)"
4317
+ }
4318
+ \`\`\`
4319
+
4320
+ ---
4321
+
4322
+ ### Composition Pattern: Header Row
4323
+
4324
+ Instead of \`page-header\`, compose with atoms:
4325
+
4326
+ \`\`\`json
4327
+ {
4328
+ "type": "stack", "direction": "horizontal", "justify": "between", "align": "center",
4329
+ "children": [
4330
+ { "type": "typography", "variant": "h1", "text": "Tasks" },
4331
+ { "type": "button", "label": "New Task", "event": "CREATE", "variant": "primary", "icon": "plus" }
4332
+ ]
4333
+ }
4334
+ \`\`\`
4335
+
4336
+ ### Composition Pattern: Stat Cards
4337
+
4338
+ \`\`\`json
4339
+ {
4340
+ "type": "stack", "direction": "horizontal", "gap": "md", "wrap": true,
4341
+ "children": [
4342
+ { "type": "stat-display", "label": "Total", "value": "--", "icon": "list" },
4343
+ { "type": "stat-display", "label": "Active", "value": "--", "icon": "activity" },
4344
+ { "type": "stat-display", "label": "Done", "value": "--", "icon": "check-circle" }
4345
+ ]
4346
+ }
4347
+ \`\`\`
4348
+
4349
+ ### Composition Pattern: Data View with Actions
4350
+
4351
+ \`\`\`json
4352
+ {
4353
+ "type": "data-grid", "entity": "Task", "fields": ["title", "status", "priority"],
4354
+ "itemActions": [
4355
+ { "event": "VIEW", "label": "View" },
4356
+ { "event": "EDIT", "label": "Edit" },
4357
+ { "event": "DELETE", "label": "Delete" }
4358
+ ]
4359
+ }
4360
+ \`\`\`
4361
+
4362
+ ---
4363
+
4364
+ ### Critical Validation Rules
4365
+
4366
+ | Element | Correct Format | Wrong Format | Error |
4367
+ |---------|----------------|--------------|-------|
4368
+ | **Events** | \`{ "key": "INIT", "name": "Init" }\` | \`"INIT"\` | ORB_T_EVT_INVALID_FORMAT |
4369
+ | **Emits** | \`[{ "event": "INIT", "scope": "internal" }]\` | \`["INIT"]\` | ORB_T_UNDEFINED_TRAIT |
4370
+ | **Payload events** | \`{ "key": "SAVE", "payload": [...] }\` | No payload | ORB_BINDING_PAYLOAD_FIELD_UNDECLARED |
4371
+ | **Page traits** | \`{ "ref": "TraitName" }\` | With linkedEntity | ORB_P_INVALID_TRAIT_REF |
4372
+ | **Category** | \`"category": "interaction"\` | Missing | ORB_T_MISSING_CATEGORY |
4373
+
4374
+ ---
4375
+
4376
+ ### Composition Quality Checklist
4377
+
4378
+ Before calling \`finish_task\`, verify:
4379
+
4380
+ \`\`\`
4381
+ [] Single render-ui per transition
4382
+ [] Root element is layout (stack/box/simple-grid)
4383
+ [] Contains 2+ atoms (typography, badge, button, icon)
4384
+ [] Contains 1+ data molecules (data-grid, data-list, form-section, stats)
4385
+ [] NO organism patterns (entity-table, entity-list, page-header, etc.)
4386
+ [] Uses theme variables for ALL visual properties
4387
+ [] Matches production quality from standard behaviors
4388
+ [] Passes orbital validate with zero errors and zero warnings
4389
+ \`\`\`
4390
+
4391
+ ---
4392
+
4393
+ ### BANNED Patterns (Additional)
4394
+
4395
+ | Wrong | Correct |
4396
+ |-------|---------|
4397
+ | Multiple flat render-ui calls | Single composed render-ui |
4398
+ | Root organism without layout | Layout wrapper required |
4399
+ | Hex colors | Theme CSS variables |
4400
+ | Pixel values | Theme spacing variables |
4401
+ | Events as strings \`"INIT"\` | Event objects \`{ "key": "INIT" }\` |
4402
+ | Emits as strings \`["INIT"]\` | Emit objects \`[{ "event": "INIT" }]\` |
4403
+ | \`onSubmit\` / \`onCancel\` | \`submitEvent\` / \`cancelEvent\` |
4404
+ | \`headerActions\` | \`actions\` |
4405
+ | \`entity-table\` | \`data-grid\` |
4406
+ | \`entity-list\` | \`data-list\` |
4407
+ | \`page-header\` | \`stack\` + \`typography\` + \`button\` |
4408
+
4409
+ ---
4410
+
4411
+ ${getBindingsGuide()}
4412
+ `;
4413
+ }
4414
+ function getToolWorkflowSection2() {
4415
+ return `---
4416
+
4417
+ ## Tool Workflow
4418
+
4419
+ ### Phase 1: DECOMPOSE
4420
+ Break requirements into OrbitalUnits (pure reasoning, no tools).
4421
+
4422
+ ### Phase 2: GENERATE
4423
+
4424
+ **Option A: Orchestrated Generation (RECOMMENDED for 3+ orbitals)**
4425
+ Use \`generate_schema_orchestrated\` for automatic complexity-based routing:
4426
+
4427
+ \`\`\`
4428
+ generate_schema_orchestrated({ prompt: "Full app description with all entities and features" })
4429
+ \`\`\`
4430
+
4431
+ **Option B: Per-Orbital Generation (for simple cases or fine-grained control)**
4432
+ Call \`generate_orbital\` for each orbital:
4433
+
4434
+ \`\`\`
4435
+ generate_orbital({ orbital: {...}, orbitalIndex: 0, totalOrbitals: N })
4436
+ \`\`\`
4437
+
4438
+ ### Phase 3: COMBINE
4439
+ Call \`finish_task\` to auto-combine orbitals into schema.orb:
4440
+
4441
+ \`\`\`
4442
+ finish_task({ appName: "App" })
4443
+ \`\`\`
4444
+
4445
+ ### Phase 4: VALIDATE (CRITICAL)
4446
+ After combining, validate the schema:
4447
+
4448
+ \`\`\`
4449
+ validate_schema()
4450
+ \`\`\`
4451
+
4452
+ ### Phase 5: VERIFY COMPOSITION QUALITY
4453
+
4454
+ Before calling \`finish_task\`, verify each INIT transition:
4455
+
4456
+ 1. **Uses a single \`render-ui\` call** with top-level \`stack\` and \`children\`
4457
+ 2. **Has 3+ composed sections**: header (HStack: title + action), metrics (stat-display/stats), data (data-grid/data-list)
4458
+ 3. **Uses domain-appropriate atoms**: \`badge\` for status, \`typography\` for labels/values, \`button\` for actions
4459
+ 4. **NO organisms**: Never \`entity-table\`, \`entity-list\`, \`page-header\`, \`detail-panel\`
4460
+ 5. **Props are correct**: \`submitEvent\` not \`onSubmit\`, \`fields\` not \`fieldNames\`
4461
+ `;
4462
+ }
4463
+ function getCriticalOutputRequirements2() {
4464
+ return `---
4465
+
4466
+ ## CRITICAL: Output Requirements
4467
+
4468
+ Every orbital MUST include:
4469
+
4470
+ ### 1. domainContext (REQUIRED)
4471
+ \`\`\`json
4472
+ "domainContext": {
4473
+ "request": "<original user request>",
4474
+ "requestFragment": "<what part produced THIS orbital>",
4475
+ "category": "business",
4476
+ "vocabulary": { "item": "Task", "create": "Add", "delete": "Remove" }
4477
+ }
4478
+ \`\`\`
4479
+
4480
+ ### 2. design (REQUIRED)
4481
+ \`\`\`json
4482
+ "design": {
4483
+ "style": "modern",
4484
+ "uxHints": {
4485
+ "flowPattern": "crud-cycle",
4486
+ "listPattern": "data-grid",
4487
+ "formPattern": "modal"
4488
+ }
4489
+ }
4490
+ \`\`\`
4491
+
4492
+ ### 3. Business Rule Guards on SAVE (when rules exist)
4493
+ If the user specifies validation constraints, add S-expression guards:
4494
+ \`\`\`json
4495
+ {
4496
+ "from": "Creating", "to": "Browsing", "event": "SAVE",
4497
+ "guard": ["<=", "@payload.data.score", 100],
4498
+ "effects": [["persist", "create", "Entry", "@payload.data"], ...]
4499
+ }
4500
+ \`\`\`
4501
+
4502
+ ### 4. ONE Orbital Per Entity
4503
+
4504
+ ### 5. Entity Field is REQUIRED (CRITICAL)
4505
+ Every orbital MUST have an entity field. No exceptions.`;
4506
+ }
4507
+ function getMoleculeFirstExample() {
4508
+ return `---
4509
+
4510
+ ## Example: Task Manager (Molecule-First - VALIDATED)
4511
+
4512
+ This example passes \`orbital validate\` with zero errors and zero warnings.
4513
+ Uses only atoms and molecules. No organisms.
4514
+
4515
+ \`\`\`json
4516
+ {
4517
+ "name": "Taskly",
4518
+ "version": "1.0.0",
4519
+ "orbitals": [{
4520
+ "name": "Task Management",
4521
+ "entity": {
4522
+ "name": "Task",
4523
+ "collection": "tasks",
4524
+ "fields": [
4525
+ { "name": "title", "type": "string", "required": true },
4526
+ { "name": "description", "type": "string" },
4527
+ { "name": "status", "type": "enum", "values": ["todo", "in-progress", "done"] },
4528
+ { "name": "priority", "type": "enum", "values": ["low", "medium", "high"] }
4529
+ ]
4530
+ },
4531
+ "traits": [{
4532
+ "name": "TaskInteraction",
4533
+ "category": "interaction",
4534
+ "linkedEntity": "Task",
4535
+ "emits": [{ "event": "INIT", "scope": "internal" }],
4536
+ "stateMachine": {
4537
+ "states": [
4538
+ { "name": "Browsing", "isInitial": true },
4539
+ { "name": "Creating" },
4540
+ { "name": "Editing" },
4541
+ { "name": "Viewing" }
4542
+ ],
4543
+ "events": [
4544
+ { "key": "INIT", "name": "Initialize" },
4545
+ { "key": "CREATE", "name": "Create" },
4546
+ { "key": "VIEW", "name": "View", "payload": [{ "name": "id", "type": "string" }] },
4547
+ { "key": "EDIT", "name": "Edit", "payload": [{ "name": "id", "type": "string" }] },
4548
+ { "key": "DELETE", "name": "Delete", "payload": [{ "name": "id", "type": "string" }] },
4549
+ { "key": "SAVE", "name": "Save", "payload": [{ "name": "data", "type": "object" }] },
4550
+ { "key": "CANCEL", "name": "Cancel" },
4551
+ { "key": "CLOSE", "name": "Close" }
4552
+ ],
4553
+ "transitions": [
4554
+ {
4555
+ "from": "Browsing", "to": "Browsing", "event": "INIT",
4556
+ "effects": [
4557
+ ["fetch", "Task"],
4558
+ ["render-ui", "main", {
4559
+ "type": "stack", "direction": "vertical", "gap": "lg",
4560
+ "children": [
4561
+ {
4562
+ "type": "stack", "direction": "horizontal", "justify": "between", "align": "center",
4563
+ "children": [
4564
+ { "type": "typography", "variant": "h1", "text": "Task Management" },
4565
+ { "type": "button", "label": "New Task", "event": "CREATE", "variant": "primary", "icon": "plus" }
4566
+ ]
4567
+ },
4568
+ {
4569
+ "type": "stack", "direction": "horizontal", "gap": "md", "wrap": true,
4570
+ "children": [
4571
+ { "type": "stat-display", "label": "Total Tasks", "value": "--", "icon": "list" },
4572
+ { "type": "stat-display", "label": "In Progress", "value": "--", "icon": "clock" },
4573
+ { "type": "stat-display", "label": "Completed", "value": "--", "icon": "check-circle" }
4574
+ ]
4575
+ },
4576
+ {
4577
+ "type": "search-input", "placeholder": "Search tasks..."
4578
+ },
4579
+ {
4580
+ "type": "data-grid", "entity": "Task",
4581
+ "fields": ["title", "status", "priority"],
4582
+ "itemActions": [
4583
+ { "event": "VIEW", "label": "View" },
4584
+ { "event": "EDIT", "label": "Edit" },
4585
+ { "event": "DELETE", "label": "Delete" }
4586
+ ]
4587
+ }
4588
+ ]
4589
+ }]
4590
+ ]
4591
+ },
4592
+ {
4593
+ "from": "Browsing", "to": "Creating", "event": "CREATE",
4594
+ "effects": [
4595
+ ["render-ui", "modal", {
4596
+ "type": "form-section", "entity": "Task",
4597
+ "fields": ["title", "description", "status", "priority"],
4598
+ "submitEvent": "SAVE", "cancelEvent": "CANCEL"
4599
+ }]
4600
+ ]
4601
+ },
4602
+ {
4603
+ "from": "Browsing", "to": "Viewing", "event": "VIEW",
4604
+ "effects": [
4605
+ ["fetch", "Task", "@payload.id"],
4606
+ ["render-ui", "modal", {
4607
+ "type": "stack", "direction": "vertical", "gap": "md",
4608
+ "children": [
4609
+ { "type": "typography", "variant": "h2", "text": "@entity.title" },
4610
+ { "type": "badge", "text": "@entity.status", "variant": "primary" },
4611
+ { "type": "badge", "text": "@entity.priority", "variant": "secondary" },
4612
+ { "type": "divider" },
4613
+ { "type": "typography", "variant": "body", "text": "@entity.description" },
4614
+ { "type": "stack", "direction": "horizontal", "gap": "sm", "justify": "end",
4615
+ "children": [
4616
+ { "type": "button", "label": "Edit", "event": "EDIT", "variant": "secondary" },
4617
+ { "type": "button", "label": "Close", "event": "CLOSE", "variant": "ghost" }
4618
+ ]
4619
+ }
4620
+ ]
4621
+ }]
4622
+ ]
4623
+ },
4624
+ {
4625
+ "from": "Browsing", "to": "Editing", "event": "EDIT",
4626
+ "effects": [
4627
+ ["fetch", "Task", "@payload.id"],
4628
+ ["render-ui", "modal", {
4629
+ "type": "form-section", "entity": "Task",
4630
+ "fields": ["title", "description", "status", "priority"],
4631
+ "submitEvent": "SAVE", "cancelEvent": "CANCEL"
4632
+ }]
4633
+ ]
4634
+ },
4635
+ {
4636
+ "from": "Creating", "to": "Browsing", "event": "SAVE",
4637
+ "effects": [
4638
+ ["persist", "create", "Task", "@payload.data"],
4639
+ ["render-ui", "modal", null],
4640
+ ["emit", "INIT"]
4641
+ ]
4642
+ },
4643
+ {
4644
+ "from": "Editing", "to": "Browsing", "event": "SAVE",
4645
+ "effects": [
4646
+ ["persist", "update", "Task", "@entity.id", "@payload.data"],
4647
+ ["render-ui", "modal", null],
4648
+ ["emit", "INIT"]
4649
+ ]
4650
+ },
4651
+ {
4652
+ "from": "Creating", "to": "Browsing", "event": "CANCEL",
4653
+ "effects": [["render-ui", "modal", null]]
4654
+ },
4655
+ {
4656
+ "from": "Creating", "to": "Browsing", "event": "CLOSE",
4657
+ "effects": [["render-ui", "modal", null]]
4658
+ },
4659
+ {
4660
+ "from": "Editing", "to": "Browsing", "event": "CANCEL",
4661
+ "effects": [["render-ui", "modal", null]]
4662
+ },
4663
+ {
4664
+ "from": "Editing", "to": "Browsing", "event": "CLOSE",
4665
+ "effects": [["render-ui", "modal", null]]
4666
+ },
4667
+ {
4668
+ "from": "Viewing", "to": "Browsing", "event": "CLOSE",
4669
+ "effects": [["render-ui", "modal", null]]
4670
+ },
4671
+ {
4672
+ "from": "Viewing", "to": "Browsing", "event": "CANCEL",
4673
+ "effects": [["render-ui", "modal", null]]
4674
+ },
4675
+ {
4676
+ "from": "Viewing", "to": "Editing", "event": "EDIT",
4677
+ "effects": [
4678
+ ["render-ui", "modal", {
4679
+ "type": "form-section", "entity": "Task",
4680
+ "fields": ["title", "description", "status", "priority"],
4681
+ "submitEvent": "SAVE", "cancelEvent": "CANCEL"
4682
+ }]
4683
+ ]
4684
+ },
4685
+ {
4686
+ "from": "Browsing", "to": "Browsing", "event": "DELETE",
4687
+ "effects": [
4688
+ ["persist", "delete", "Task", "@payload.id"],
4689
+ ["emit", "INIT"]
4690
+ ]
4691
+ }
4692
+ ]
4693
+ }
4694
+ }],
4695
+ "pages": [{
4696
+ "name": "TasksPage",
4697
+ "path": "/tasks",
4698
+ "viewType": "list",
4699
+ "isInitial": true,
4700
+ "entity": "Task",
4701
+ "traits": [{ "ref": "TaskInteraction" }]
4702
+ }],
4703
+ "emits": [],
4704
+ "listens": []
4705
+ }]
4706
+ }
4707
+ \`\`\`
4708
+
4709
+ **Key points (molecule-first composition):**
4710
+ - **Header**: \`stack\` (horizontal) + \`typography\` (h1) + \`button\` (composed, NOT \`page-header\`)
4711
+ - **Stats**: \`stat-display\` molecules in a horizontal \`stack\` (NOT \`stats\` organism)
4712
+ - **Search**: \`search-input\` molecule
4713
+ - **Data**: \`data-grid\` with \`entity\`, \`fields\`, \`itemActions\` (NOT \`entity-table\`)
4714
+ - **Detail view**: \`stack\` + \`typography\` + \`badge\` + \`divider\` (NOT \`detail-panel\`)
4715
+ - **Forms**: \`form-section\` with \`submitEvent\`/\`cancelEvent\`
4716
+ - **Theme**: All visual props use CSS variables
4717
+ `;
4718
+ }
4719
+
4079
4720
  // src/orbitals-skills-generators/lean/lean-orbital-generator.ts
4080
4721
  var LEAN_CORE_INSTRUCTIONS = `
4081
4722
  ## Core Instructions
@@ -4651,6 +5292,7 @@ Example workflow:
4651
5292
  // src/generators/index.ts
4652
5293
  function generateAllBuilderSkills() {
4653
5294
  return [
5295
+ generateOrbSkill(),
4654
5296
  generateKflowOrbitalsSkill(),
4655
5297
  generateKflowOrbitalFixingSkill(),
4656
5298
  {
@@ -5306,6 +5948,6 @@ function generateComparisonMatrix(comparisons) {
5306
5948
  return markdown;
5307
5949
  }
5308
5950
 
5309
- export { EVAL_CASES, analyzeComposition, calculateTotalScore, formatFrontmatter, generateAllBuilderSkills, generateAlmadarAssistantSkill, generateComparisonMatrix, generateDomainLanguageSkill, generateKflowOrbitalFixingSkill, generateKflowOrbitalsSkill, generateLeanFixingSkill2 as generateLeanFixingSkill, generateLeanFixingSkill as generateLeanFixingSkillFull, generateLeanOrbitalSkill2 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, getKeyBehaviorsReference2 as getKeyBehaviorsReference, getMinimalTypeReference, getMultiFileSection, getOrbitalConnectivitySection, getOrbitalDecompositionPrompt, getOverGenerationSection, getPatternTypesCompact, getPortableOrbitalOutputSection, getRenderUIDesignGuide, getRenderUIQuickRef2 as getRenderUIQuickRef, getRequirementsDecomposePrompt, getRequirementsTraitPrompt, getSExprQuickRef2 as getSExprQuickRef, getSchemaUpdateCompact, getSchemaUpdateSection, getSubagentSystemPrompt, getThemeGuide, getUsesImportCompact, getUsesImportSection, getValidationHintsSection, writeAllSkills, writeSkill };
5951
+ export { EVAL_CASES, analyzeComposition, calculateTotalScore, formatFrontmatter, generateAllBuilderSkills, generateAlmadarAssistantSkill, generateComparisonMatrix, generateDomainLanguageSkill, generateKflowOrbitalFixingSkill, generateKflowOrbitalsSkill, generateLeanFixingSkill2 as generateLeanFixingSkill, generateLeanFixingSkill as generateLeanFixingSkillFull, generateLeanOrbitalSkill2 as generateLeanOrbitalSkill, generateLeanOrbitalSkill as generateLeanOrbitalSkillFull, generateOrbSkill, 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, getKeyBehaviorsReference2 as getKeyBehaviorsReference, getMinimalTypeReference, getMultiFileSection, getOrbitalConnectivitySection, getOrbitalDecompositionPrompt, getOverGenerationSection, getPatternTypesCompact, getPortableOrbitalOutputSection, getRenderUIDesignGuide, getRenderUIQuickRef2 as getRenderUIQuickRef, getRequirementsDecomposePrompt, getRequirementsTraitPrompt, getSExprQuickRef2 as getSExprQuickRef, getSchemaUpdateCompact, getSchemaUpdateSection, getSubagentSystemPrompt, getThemeGuide, getUsesImportCompact, getUsesImportSection, getValidationHintsSection, writeAllSkills, writeSkill };
5310
5952
  //# sourceMappingURL=index.js.map
5311
5953
  //# sourceMappingURL=index.js.map