Skip to content

Commit 8ab5e3e

Browse files
committed
Improve agentic development skill
1 parent 647ea4a commit 8ab5e3e

1 file changed

Lines changed: 36 additions & 5 deletions

File tree

  • .cursor/skills/asset-registry-endpoints

.cursor/skills/asset-registry-endpoints/SKILL.md

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ $CLI config export --packageKeys <key1> [<key2> ...] --unzip
5151
Key options:
5252
- `--packageKeys <keys...>` — exports the latest **deployed** version only
5353
- `--keysByVersion <keys...>` — export a specific version (use this to export
54-
non-deployed/staging versions that were just imported)
54+
non-deployed/staging versions that were just imported). **Always wrap each
55+
value in quotes** because the format contains dots, e.g.
56+
`--keysByVersion "packageKey.1.0.0"`
5557
- `--unzip` — unzip the export into a directory (recommended for inspection)
5658
- `--withDependencies` — include variables and dependencies
5759

@@ -114,6 +116,35 @@ The user must provide:
114116
- The **space ID** where the package should live (set `spaceId` on each node)
115117
- The **package key** they want to use
116118

119+
## PIG (OCDM flavored) packages
120+
121+
When the user refers to a **Pig** or **pi-graph**, they mean an **OCDM flavored
122+
package**. Prompts like "create me the Pig for <some context>" map to creating
123+
an OCDM flavored package — not a standalone asset type.
124+
125+
OCDM flavored packages have specific requirements:
126+
127+
- **`spaceId` is always `"pi-graphs"`** for every node in the package and for
128+
the package itself. Do not ask the user for a space ID on PIG packages — use
129+
`pi-graphs`.
130+
- **A data pool ID variable is always required.** The variable binds the PIG to
131+
exactly one Data Pool. Every PIG is connected to a single Data Pool.
132+
- If the user's initial prompt for PIG creation does **not** provide the
133+
data pool ID, you **must** prompt the user for it as a required value
134+
before proceeding. Do not invent or default it.
135+
- The data pool ID goes into `package.json` under `variables` as a package
136+
variable, and assets inside the PIG reference it through the variable
137+
binding.
138+
139+
Quick checklist when creating a PIG:
140+
141+
1. Confirm the user provided a **data pool ID** — if not, ask for it before
142+
doing anything else.
143+
2. Set `spaceId: "pi-graphs"` on the package and on every node.
144+
3. Add the data pool ID as a package variable in `package.json` and `variables.json`.
145+
4. Follow the normal "Creating a new package" flow for everything else
146+
(structure, node JSONs, import).
147+
117148
## Node JSON structure
118149

119150
The `configuration` property holds the actual asset content. The asset-type
@@ -149,13 +180,13 @@ Field reference:
149180
| `parentNodeKey` | Key of the parent asset. If directly under the package, use the package key | Yes |
150181
| `packageNodeKey` | Key of the package | Yes |
151182
| `name` | Display name shown in the UI | Yes |
152-
| `type` | Asset type (e.g. `BOARD_V2`) — matches the asset registry | Yes |
183+
| `type` | Asset type (e.g. `BOARD_V2`) — matches the asset registry. **Must be the exact `type` returned by the asset descriptor (`asset-registry get`).** The type determines which configuration schema applies — do not copy a type from an unrelated example or invent one | Yes |
153184
| `configuration` | **The actual asset content.** Schema root = this object | Yes |
154-
| `schemaVersion` | Use the version from the asset descriptor's `assetSchema.version` field (returned by `asset-registry get`). Do not invent a value | Yes |
185+
| `schemaVersion` | **Must be taken from the asset descriptor's `assetSchema.version` field (returned by `asset-registry get`).** Do not invent, guess, or copy from an unrelated example | Yes |
155186
| `dependenciesConfiguration` | Dependencies to other assets in the package. Each entry has `key` (target asset key) and `type` (target asset type). Use `{ "dependencies": [] }` when there are none | Yes |
156187
| `nodeType` | `ASSET` for all assets, `PACKAGE` for the package node | Yes |
157-
| `assetType` | Same as `type`redundant resolver field | Yes |
158-
| `spaceId` | Space ID. Ask the user for this. Must match the package's space. Omitting causes 500 errors on import | Yes (for import) |
188+
| `assetType` | **Same as `type`must also match the asset descriptor's type.** Do not set a random value | Yes |
189+
| `spaceId` | Space ID. Ask the user for this. Must match the package's space. Omitting causes 500 errors on import. **For PIG (OCDM flavored) packages, always use `"pi-graphs"`** — see the PIG section above | Yes (for import) |
159190
| `showInViewerMode` | Copy from example if available, otherwise `false` | No |
160191
| `order` | Display order in the UI tree | No |
161192

0 commit comments

Comments
 (0)