core-developmentlisted
Install: claude install-skill aiskillstore/marketplace
# Core Package Development
The core package (`packages/core/`) is dependency-free and handles all DSL processing.
## Data Flow
```
DSL (YAML input) → validate() → normalize() → IR → diff() → Patch
```
## Key Files
| File | Purpose | Exports |
|------|---------|---------|
| `types.ts` | Type definitions | DSL*, IR*, Patch, WebSocket protocol |
| `validate.ts` | YAML validation | `validate(dsl): ValidationResult` |
| `normalize.ts` | DSL → IR conversion | `normalize(dsl): IRDocument` |
| `diff.ts` | IR diff calculation | `diff(prev, next): Patch` |
## Type Hierarchy
```
DSL Types (user input) IR Types (normalized)
───────────────────── ────────────────────
DSLDocument IRDocument
├─ version: number ├─ version: number
├─ docId: string ├─ docId: string
├─ title?: string ├─ title: string
├─ nodes: DSLNode[] ├─ nodes: Record<string, IRNode>
└─ edges?: DSLEdge[] └─ edges: Record<string, IREdge>
DSLNode IRNode
├─ id: string ├─ id: string
├─ provider: string ├─ provider: string
├─ kind: string ├─ kind: string
├─ label?: string ├─ label: string (default: id)
├─ parent?: string ├─ parent: string | null
└─ layout: DSLLayout └─ layout: { x, y, w, h }
DSLEdge IREdge
├─ id: string ├─ id: string
├─ from: string ├─ from: string
├─ to: string ├─ to: