{"id":100991,"plugin_id":"plugins_6aed3278a3848191925fc74753ecbe72","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-17T06:15:21.694Z","digest":"5ddc7c4988dbd1477a363b7168d496f7ee6065664dcbfb94122bf1a31cb7b6b8","against":null,"payload":{"description":"IDMP alert creation workflow. Prepare the event template, create the Event-trigger analysis, and treat reread plus Running as success without actively triggering alerts.","included_files":[{"relative_path":"references/alert-create.md","size_in_bytes":5396}],"name":"idmp-workflow-alert-create","skill_md_contents":"---\nname: idmp-workflow-alert-create\ndescription: \"IDMP alert creation workflow. Prepare the event template, create the Event-trigger analysis, and treat reread plus Running as success without actively triggering alerts.\"\nmetadata:\n  author: \"TAOS Data\"\n  version: \"0.7.2\"\n  owner_team: \"AI\"\n  requires:\n    bins:\n      - idmp-cli\n  cliHelp: \"idmp-cli analysis --help\"\n---\n\n# workflow: alert create\n\n**Read [`../idmp-shared/SKILL.md`](../idmp-shared/SKILL.md) first.**\n\n## Recommended references\n\n- [`references/alert-create.md`](references/alert-create.md)\n- [`../idmp-workflow-analysis-create/SKILL.md`](../idmp-workflow-analysis-create/SKILL.md)\n\n## Missing context to resolve first\n\n- Whether the alert intent is natural-language friendly enough for AI-first analysis drafting.\n- Candidate analysis name.\n- Whether downstream notification routing is in scope after create success.\n- Notify target when routing is in scope.\n- AI alert prompt seed.\n- `idmp-cli ai create create --ack-risk --data '{\"elementId\":123,\"prompt\":\"alert when ...\",\"record\":true}'`\n- `idmp-cli event-template events get --params '{\"id\":789}'`\n- `idmp-cli analysis analyses new-name --ack-risk --params '{\"elementId\":123,\"name\":\"demo-alert\"}'`\n- Trigger source.\n- Non-leaf proof boundary.\n- Whether the operator wants only create success or an extra downstream-debug pass later.\n\n## Constrained live behaviors\n\n- `try-send` is not part of create success.\n- Write-chain boundary.\n- Prefer AI draft-first create for the Event-trigger analysis when the operator starts from natural language; fall back to the structured alert chain when the AI draft is unsuitable or persistence fails.\n- `event-template events get` uses `id`.\n- `analysis.analyses.new-name` needs a candidate `name` and `--ack-risk`.\n- Create or resume the analysis before you write the notify rule.\n- If `analysis trigger-types list` for `applyOnSelf=false` does not include `Event`, stop instead of forcing child-scope alert creation.\n- Trigger types gate create eligibility; they do not require a real event during create proof.\n- Keep `escalationInterval` aligned with the actual notify-rule DTO.\n- Create success means the analysis is created, reread, and `Running`.\n- Do not write source attributes or replay history just to prove alert creation.\n- Real event materialization and notification delivery are optional downstream diagnostics, not part of create success.\n\n## Execution flow\n\n1. Prepare the template side with `idmp-cli event-template events list`, `idmp-cli event-template events get --params`, and `idmp-cli event-template events create --ack-risk` only when no reusable template exists.\n2. For natural-language alert requests, try AI draft-first create for the analysis portion with `idmp-cli ai create create --ack-risk --data '{\"elementId\":123,\"prompt\":\"alert when ...\",\"record\":true,\"deepThinking\":false,\"deviceDocument\":false}'`, then persist the returned draft through `idmp-cli analysis analyses create --ack-risk --params` after removing `id` and injecting `rootElementId`.\n3. If the AI draft does not preserve the required event template, severity, scope, or output bindings, fall back to the current structured alert flow.\n4. Reserve the analysis name with `idmp-cli analysis analyses new-name --ack-risk --params`, then prove scope support with `idmp-cli analysis trigger-types list --params`.\n5. Create the missing output attribute only if required by using `idmp-cli attribute elements attributes-post --ack-risk --params`.\n6. Create and reread the alert analysis via `idmp-cli analysis analyses create --ack-risk --params` and `idmp-cli analysis analyses get --params`.\n7. Resume the analysis with `idmp-cli analysis analyses resume --ack-risk --params`. Success means `analysis analyses get` reread plus `analysis analyses resume` reaching `Running`.\n8. If downstream routing is explicitly in scope after the analysis is already `Running`, inspect or add notify-rule coverage with `idmp-cli notification notify-rules list --params`, `idmp-cli notification notify-rules create --ack-risk --params`, and `idmp-cli notification notify-rules update --ack-risk --params`.\n9. Clean up abandoned drafts with `idmp-cli analysis analyses delete --ack-risk --params`.\n\nFor command-family coverage, the core create flow touches these steps in order: `idmp-cli event-template events list`, `idmp-cli event-template events get --params`, `idmp-cli analysis analyses new-name --ack-risk --params`, `idmp-cli analysis trigger-types list --params`, `idmp-cli attribute elements attributes-post --ack-risk --params`, `idmp-cli analysis analyses create --ack-risk --params`, `idmp-cli analysis analyses get --params`, and `idmp-cli analysis analyses resume --ack-risk --params`. Optional post-create routing can also use `idmp-cli notification notify-rules list --params`, `idmp-cli notification notify-rules create --ack-risk --params`, and `idmp-cli notification notify-rules update --ack-risk --params` after the analysis is already `Running`.\n\n## Exception paths\n\n- Stop immediately when child-scope trigger types do not include `Event`.\n- If the AI draft does not survive persistence or comes back without the required Event-trigger fields, clean any draft-only output attributes and resume from the structured alert path.\n- If `analysis analyses get --params` succeeds but `analysis analyses resume --ack-risk --params` does not leave the analysis in `Running`, classify the attempt as create incomplete or runtime-start boundary.\n- A missing real event is not a create failure for this skill.\n- `analysis attribute list`, `attribute write-data create`, `analysis analyses fill-history`, `event events list`, `event events confirm`, and `notification try-send create` belong to later debugging or delivery validation, not to create proof.\n- Delete temporary output attributes, notify rules, or draft analyses when a proof attempt is abandoned.\n\n## Validation scenarios\n\n### 1. Leaf owner strict live proof\nUse the chain from `idmp-cli analysis analyses create --ack-risk --params` through `idmp-cli analysis analyses resume --ack-risk --params`. Success is create + reread + `Running`; do not replay source data just to open a real event.\n\n### 2. Middle owner strict replay proof\nKeep the same create chain, but require only explicit evidence that the non-leaf self analysis was created, reread, and reached `Running`. Trigger support gates create eligibility; it does not require event materialization.\n\n### 3. Middle child aggregation must stop when `Event` is unavailable\nRun `idmp-cli analysis trigger-types list --params` first. If `Event` is absent for `applyOnSelf=false`, stop and report the boundary without forcing create.\n\n### 4. New event template plus notify-rule reuse\nRead event-template and notify-rule state separately before writing. Reuse a working notify rule when possible instead of duplicating it, but treat notify-rule work as optional follow-up after create success.\n\n### 5. Template-mode alert workflow\nPreserve the same proof discipline in template mode: scope check, create, reread, and `Running`. Do not call the workflow successful on template reads alone, and do not require real event materialization.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}