{"id":100997,"plugin_id":"plugins_6aed3278a3848191925fc74753ecbe72","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-17T06:15:21.838Z","digest":"63f741718dfca732dcea719172544eee104949ffee936ab4b1e03faf96c03612","against":null,"payload":{"description":"IDMP panel build workflow. Resolve owner, reserve names, create panel objects, verify query and SQL output, place panels into dashboards, and clean up safely.","included_files":[{"relative_path":"references/panel-build.md","size_in_bytes":12149}],"name":"idmp-workflow-panel-build","skill_md_contents":"---\nname: idmp-workflow-panel-build\ndescription: \"IDMP panel build workflow. Resolve owner, reserve names, create panel objects, verify query and SQL output, place panels into dashboards, and clean up safely.\"\nmetadata:\n  author: \"TAOS Data\"\n  version: \"0.7.1\"\n  owner_team: \"AI\"\n  requires:\n    bins:\n      - idmp-cli\n  cliHelp: \"idmp-cli panel --help\"\n---\n\n# workflow: panel build\n\n**Read [`../idmp-shared/SKILL.md`](../idmp-shared/SKILL.md) first.**\n\n## Recommended references\n\n- [`references/panel-build.md`](references/panel-build.md)\n- [`../idmp-panel/SKILL.md`](../idmp-panel/SKILL.md)\n\n## Missing context to resolve first\n\n- Whether the request is natural-language friendly enough for AI-first panel drafting.\n- Candidate panel name.\n- Placement plan.\n- AI create prompt seed.\n- `idmp-cli ai create create-post --ack-risk --data '{\"elementId\":123,\"prompt\":\"demo panel prompt\",\"record\":true}'`\n- `idmp-cli panel panels new-name --params '{\"elementId\":123,\"name\":\"demo-panel\"}'`\n- Candidate dashboard name.\n- `idmp-cli dashboard dashboards new-name --params '{\"elementId\":123,\"name\":\"demo-dashboard\"}'`\n- Hierarchy persistence plan.\n- Whether the goal is leaf self, middle self, child aggregation, or a text/manual panel.\n\n## Constrained live behaviors\n\n- Prefer AI draft-first create for natural-language panel requests: `POST /api/v1/ai/panels/create` first, then persist the returned draft through `panel.panels.create`.\n- `panel verify create` is the time-range-only validator and does not take owner `--params`.\n- `panel verify create-post` validates advanced SQL entries.\n- Creating a panel does not place it into a dashboard.\n- `panel.params` owns the panel time range.\n- `dashboard.params` owns dashboard refresh settings.\n- For query-backed panels, if generated SQL is empty, stop before persistence. For panels with no SQL query by design, such as text panels, verify saved content and type instead.\n- Every advanced fallback must keep a valid `advancedQueryType`.\n- `panel.panels.query` and `panel.panels.create` use the panel DTO shape.\n- Keep `checked` boolean and `dimensions` as an array of strings.\n- Standard child-scope roundtrips can collapse back to self scope.\n- Persist the advanced fallback only after reread shows `enableAdvanced=true`; save that SQL with `enableAdvanced=true`. A verified advanced fallback still counts as first-attempt success for child-scope panel work.\n- Empty-body `400` responses usually mean the payload shape is wrong.\n- AI panel drafts can include an `id`; remove it before persistence. If the AI draft collapses child scope, loses required placement fields, or fails to persist, fall back to the existing structured workflow.\n\n## Execution flow\n\n1. Lock the owner and current shells with `idmp-cli element elements get --params`, `idmp-cli panel panels list --params`, and `idmp-cli dashboard dashboards list --params`.\n2. For natural-language requests, try AI draft-first create with `idmp-cli ai create create-post --ack-risk --data`, then persist the returned draft through `idmp-cli panel panels create --ack-risk --params` after removing `id`.\n3. If the AI draft is unsuitable, persistence fails, or reread/query proves the draft collapsed scope, fall back to the current structured panel path.\n4. Reserve names with `idmp-cli panel panels new-name --params` and `idmp-cli dashboard dashboards new-name --params` when the AI path is skipped or unsuitable.\n5. Create or inspect the dashboard shell through `idmp-cli dashboard dashboards create --ack-risk --params` when placement is required.\n6. Create the panel object with `idmp-cli panel panels create --ack-risk --params`, then reread with `idmp-cli panel panels get --params`.\n7. For panels with no SQL query by design, such as text panels, verify the saved content and type on reread and skip query/SQL validation. For query-backed panels, validate query behavior in three separate branches: use `idmp-cli panel panels query --ack-risk --params` and `idmp-cli panel panels sqls --ack-risk --params` for the full panel DTO, use `idmp-cli panel verify create --ack-risk --data` only for time-range validation, and use `idmp-cli panel verify create-post --ack-risk --params` only for the advanced child-scope fallback DTO. In the current generated schema, `panel.panels.query` is readonly so `--ack-risk` is optional there, but `panel.panels.sqls` and both `panel.verify.*` commands are still generated as write-risk commands and keep `--ack-risk`. If the no-code child-scope DTO collapses on reread or returns empty-body `400`, keep the verified SQL and persist the advanced fallback instead of restarting the workflow.\n8. Attach or update placement with `idmp-cli dashboard dashboards update --ack-risk --params` after the panel is stable.\n\n## Exception paths\n\n- For query-backed panels, if child-scope query results collapse or SQL is empty, stop and switch to the advanced fallback deliberately.\n- If the AI panel draft is malformed, unsuitable for the owner scope, or fails the applicable verification (`get` for all panels, plus `query/sqls` for query-backed panels), stop using that draft and continue with the structured DTO family.\n- Do not mix dashboard refresh settings into the panel DTO.\n- If the advanced fallback rereads with `enableAdvanced=true` and the SQL still matches the intended child scope, count the workflow as successful even when the original no-code DTO did not survive reread.\n- Delete temporary dashboard shells or panels when the workflow is only exploratory.\n\n## Validation scenarios\n\n### 1. Leaf self query-backed panel\nUse `idmp-cli panel panels create --ack-risk --params`, then `idmp-cli panel panels get --params`. The persisted panel must still query and render on reread.\n\n### 2. Middle self query-backed panel\nKeep the same panel DTO family, but verify the middle owner really has metric-bearing context. Query and SQL reads should still succeed.\n\n### 3. Middle child aggregation with advanced-query fallback\nUse `idmp-cli panel panels sqls --ack-risk --params` first, then `idmp-cli panel verify create-post --ack-risk --params`. Persist only after the advanced payload is verified, and treat that advanced persistence as the success path whenever the original no-code child-scope DTO collapses on reread.\n\n### 4. Text or manual panel shell\nIf no SQL-backed panel is needed, keep the object simple and skip query, SQL, and advanced verification. Reread after create and verify the saved content and type.\n\n### 5. Panel plus dashboard placement and cleanup\nAfter `idmp-cli dashboard dashboards update --ack-risk --params`, reread the dashboard after `dashboard.dashboards.update`. Remove temporary shells if the workflow was only a probe.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}