{
  "schema_version": 1,
  "type": "skill",
  "slug": "adom-layouts",
  "title": "Workcell Layouts",
  "brief": "When modifying a layout file (e.g. to add, remove, or move molecules), use this structure and these rules.",
  "version": "1.0.0",
  "tags": [],
  "license": "MIT",
  "source_path": "SKILL.md",
  "readme": "---\nname: adom-layouts\nuser-invokable: true\ndescription: Spec for editing workcell layout JSON (molecules and wires). Use when the user wants to add, remove, or change molecules or wires in a layout file.\n---\n\n# Layout JSON Spec\n\nWhen modifying a layout file (e.g. to add, remove, or move molecules), use this structure and these rules.\n\n## Full example\n\n```json\n{\n    \"molecules\": {\n        \"BHI385_Molecule v12\": {\n            \"sku\": \"adom/BHI385_Molecule v12/v1\",\n            \"name\": \"BHI385_Molecule v12\",\n            \"position\": {\n                \"x\": 16,\n                \"y\": 16,\n                \"z\": 0\n            },\n            \"rotation\": {\n                \"z\": 0\n            },\n            \"scale\": {\n                \"x\": 1,\n                \"y\": 1,\n                \"z\": 1\n            },\n            \"pins\": {\n                \"FL\": {\n                    \"x\": 10,\n                    \"y\": 10,\n                    \"z\": 41.2\n                },\n                \"FR\": {\n                    \"x\": 10,\n                    \"y\": 10,\n                    \"z\": 41.2\n                },\n                \"BL\": {\n                    \"x\": 10,\n                    \"y\": 10,\n                    \"z\": 41.2\n                },\n                \"BR\": {\n                    \"x\": 10,\n                    \"y\": 10,\n                    \"z\": 41.2\n                }\n            },\n            \"pinType\": 5.6\n        },\n        \"TXS0108E_8bitLevelShifter\": {\n            \"sku\": \"adom/TXS0108E_8bitLevelShifter/v1\",\n            \"name\": \"TXS0108E_8bitLevelShifter\",\n            \"position\": {\n                \"x\": 16,\n                \"y\": 48,\n                \"z\": 0\n            },\n            \"rotation\": {\n                \"z\": 0\n            },\n            \"scale\": {\n                \"x\": 1,\n                \"y\": 1,\n                \"z\": 1\n            },\n            \"pins\": {\n                \"FL\": {\n                    \"x\": 10,\n                    \"y\": 10,\n                    \"z\": 41.2\n                },\n                \"FR\": {\n                    \"x\": 10,\n                    \"y\": 10,\n                    \"z\": 41.2\n                },\n                \"BL\": {\n                    \"x\": 10,\n                    \"y\": 10,\n                    \"z\": 41.2\n                },\n                \"BR\": {\n                    \"x\": 10,\n                    \"y\": 10,\n                    \"z\": 41.2\n                }\n            },\n            \"pinType\": 5.6\n        }\n    },\n    \"wires\": [\n        {\n            \"name\": \"Wire 1\",\n            \"startReference\": {\n                \"moleculeName\": \"BHI385_Molecule v12\",\n                \"contactPosition\": {\n                    \"x\": 6,\n                    \"y\": 8,\n                    \"z\": 2.8\n                },\n                \"contactName\": \"P$1\"\n            },\n            \"endReference\": {\n                \"moleculeName\": \"TXS0108E_8bitLevelShifter\",\n                \"contactPosition\": {\n                    \"x\": 8,\n                    \"y\": 6,\n                    \"z\": 2.8\n                },\n                \"contactName\": \"P$1\"\n            },\n            \"manualBendPoints\": [],\n            \"segments\": [\n                {\n                    \"vector\": {\n                        \"x\": 0,\n                        \"y\": 0,\n                        \"z\": 7.599999999999994\n                    },\n                    \"startPoint\": {\n                        \"x\": 22,\n                        \"y\": 24,\n                        \"z\": 0.8000000000000114\n                    },\n                    \"endPoint\": {\n                        \"x\": 22,\n                        \"y\": 24,\n                        \"z\": 8.400000000000006\n                    },\n                    \"length\": 7.599999999999994\n                },\n                {\n                    \"vector\": {\n                        \"x\": 2,\n                        \"y\": 0,\n                        \"z\": 0\n                    },\n                    \"startPoint\": {\n                        \"x\": 22,\n                        \"y\": 24,\n                        \"z\": 8.400000000000006\n                    },\n                    \"endPoint\": {\n                        \"x\": 24,\n                        \"y\": 24,\n                        \"z\": 8.400000000000006\n                    },\n                    \"length\": 2\n                },\n                {\n                    \"vector\": {\n                        \"x\": 0,\n                        \"y\": 30,\n                        \"z\": 0\n                    },\n                    \"startPoint\": {\n                        \"x\": 24,\n                        \"y\": 24,\n                        \"z\": 8.400000000000006\n                    },\n                    \"endPoint\": {\n                        \"x\": 24,\n                        \"y\": 54,\n                        \"z\": 8.400000000000006\n                    },\n                    \"length\": 30\n                },\n                {\n                    \"vector\": {\n                        \"x\": 0,\n                        \"y\": 0,\n                        \"z\": -7.599999999999994\n                    },\n                    \"startPoint\": {\n                        \"x\": 24,\n                        \"y\": 54,\n                        \"z\": 8.400000000000006\n                    },\n                    \"endPoint\": {\n                        \"x\": 24,\n                        \"y\": 54,\n                        \"z\": 0.8000000000000114\n                    },\n                    \"length\": 7.599999999999994\n                }\n            ],\n            \"color\": {\n                \"r\": 1,\n                \"g\": 0,\n                \"b\": 0\n            },\n            \"diameter\": 0.51,\n            \"routingType\": \"auto\",\n            \"initialRaiseHeight\": 2,\n            \"gauge\": \"24 AWG\"\n        }\n    ]\n}\n```\n\n- **molecules**: Object. Each key is the molecule’s **unique name**. Value is a molecule object (see below).\n- **wires**: Array of wire objects. Each wire has `name`, `startReference`, `endReference` (each can use `moleculeName` + `pinType` or `moleculeName` + `contactPosition`/`contactName`), `manualBendPoints`, `segments`, `color`, `diameter` or `gauge`, `routingType`, `initialRaiseHeight`. If you rename a molecule, update every wire’s `startReference.moleculeName` and `endReference.moleculeName` that point to it.\n\nIf the file has no `molecules` or `wires` at the root, the whole root is treated as the molecules object and wires are empty.\n\n## One molecule object\n\nEach entry in `molecules` must look like this:\n\n```json\n{\n  \"name\": \"MyMolecule_1\",\n  \"sku\": \"owner/moleculeName\",\n  \"position\": { \"x\": 0, \"y\": 0, \"z\": 0 },\n  \"rotation\": { \"z\": 0 },\n  \"scale\": { \"x\": 1, \"y\": 1, \"z\": 1 },\n  \"pins\": {\n    \"FL\": { \"x\": 10, \"y\": 10, \"z\": 41.2 },\n    \"FR\": { \"x\": 10, \"y\": 10, \"z\": 41.2 },\n    \"BL\": { \"x\": 10, \"y\": 10, \"z\": 41.2 },\n    \"BR\": { \"x\": 10, \"y\": 10, \"z\": 41.2 }\n  },\n  \"pinType\": 5.6\n}\n```\n\n| Field | Type | Notes |\n|-------|------|--------|\n| **name** | string | Display name; should match the key in `molecules`. Must be unique. |\n| **sku** | string | Id for the 3D asset. Format: `owner/moleculeName` or `owner/moleculeName/version`. |\n| **position** | `{ x, y, z }` | Numbers. Position on the workcell. |\n| **rotation** | `{ z }` | **Degrees** (not radians). Only z is used. Must be 0, 90, 180, -90, -180|\n| **scale** | `{ x, y, z }` | Numbers. Usually 1,1,1. |\n| **pins** | object | FL, FR, BL, BR, each `{ x, y, z }`. Used when the molecule has no footprint file. |\n| **pinType** | number | e.g. 5.6 or 2.6. Used with pins. |\n\n## Editing rules\n\n- **Add a molecule**: Add a new key to `molecules` (unique name) with a full molecule object. Copy the shape above and set name, sku, position, rotation, scale, pins, pinType.\n- **Remove a molecule**: Delete that key from `molecules`.\n- **Move a molecule**: Change `position.x`, `position.y`, and/or `position.z` for that molecule.\n- **Rotate**: Change `rotation.z` in **degrees**.\n- **Rename**: Change both the **key** in `molecules` and the **name** field inside the object so they match. Any wires referencing the old name must be updated to the new name.\n- **Duplicate**: Add a new key (e.g. `Name_2`) with the same object but a unique `name` and adjusted `position` so it doesn’t overlap.\n\n## Wires\n\nEach item in `wires` matches the wire object in the full example above: `name`, `startReference`, `endReference`, `manualBendPoints`, `segments`, `color`, `diameter` or `gauge`, `routingType`, `initialRaiseHeight`. References use either `moleculeName` + `pinType` (e.g. `\"BR\"`) or `moleculeName` + `contactPosition` + `contactName`. When renaming a molecule, update every wire’s `startReference.moleculeName` and `endReference.moleculeName` that reference it. If you’re only editing molecules, leave `wires` unchanged.\n",
  "author": {
    "name": "Kyle Bergstedt",
    "email": "[email protected]"
  },
  "visibility": {
    "public": true
  },
  "hero": null,
  "sample_prompts": [],
  "discovery_triggers": [],
  "discovery_pitch": null,
  "metadata": {},
  "created_at": "2026-05-28T05:30:23.305Z",
  "updated_at": "2026-05-28T05:30:23.305Z",
  "sub_skills": [],
  "parent_app": null,
  "org": "adom"
}