@uipath/skills 1.200.0 → 1.201.0-preview.433
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +32 -0
- package/CODEOWNERS +25 -4
- package/README.md +1 -0
- package/assets/skill-status.json +8 -0
- package/assets/uip-catalog-snapshot.json +113 -41
- package/assets/uipath-icon.png +0 -0
- package/commands/install-permissions.md +1 -0
- package/package.json +3 -2
- package/skills/uipath-admin/SKILL.md +1 -1
- package/skills/uipath-admin/references/authorization/permission-catalog.md +61 -1
- package/skills/uipath-admin/references/authorization/role-management.md +3 -1
- package/skills/uipath-admin/references/diagnose/references/failure-modes.md +29 -4
- package/skills/uipath-admin/references/diagnose/references/troubleshooting-guide.md +13 -0
- package/skills/uipath-agents/SKILL.md +1 -0
- package/skills/uipath-agents/references/coded/capabilities/context-grounding.md +3 -3
- package/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails-recommend.md +6 -1
- package/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails.md +89 -1
- package/skills/uipath-agents/references/coded/embedding-in-flows.md +17 -1
- package/skills/uipath-agents/references/coded/frameworks/llamaindex-integration.md +64 -2
- package/skills/uipath-agents/references/coded/lifecycle/deployment.md +3 -0
- package/skills/uipath-agents/references/coded/lifecycle/environment-variables.md +90 -0
- package/skills/uipath-agents/references/coded/lifecycle/file-sync.md +3 -1
- package/skills/uipath-agents/references/coded/quickstart.md +10 -6
- package/skills/uipath-agents/references/lowcode/capabilities/guardrails/guardrails-recommend.md +20 -5
- package/skills/uipath-agents/references/lowcode/capabilities/guardrails/guardrails.md +13 -0
- package/skills/uipath-agents/references/lowcode/capabilities/inline-in-flow/inline-in-flow.md +1 -3
- package/skills/uipath-api-workflow/references/operating-published-workflows.md +17 -6
- package/skills/uipath-automationhub/SKILL.md +58 -0
- package/skills/uipath-automationhub/references/api-endpoints.md +140 -0
- package/skills/uipath-automationhub/references/get-process.md +69 -0
- package/skills/uipath-automationhub/references/publish-process.md +171 -0
- package/skills/uipath-coded-apps/SKILL.md +24 -11
- package/skills/uipath-coded-apps/references/commands-reference.md +29 -29
- package/skills/uipath-coded-apps/references/create-action-app.md +4 -0
- package/skills/uipath-coded-apps/references/create-web-app.md +10 -0
- package/skills/uipath-coded-apps/references/debug.md +16 -0
- package/skills/uipath-coded-apps/references/oauth-client-setup.md +3 -1
- package/skills/uipath-coded-apps/references/oauth-scopes.md +39 -4
- package/skills/uipath-coded-apps/references/pack-publish-deploy.md +37 -21
- package/skills/uipath-coded-apps/references/sdk/conversational-agent.md +2 -0
- package/skills/uipath-coded-apps/references/sdk/data-fabric.md +2 -0
- package/skills/uipath-coded-apps/references/sdk/orchestrator.md +2 -0
- package/skills/uipath-coded-apps/references/widgets/conversational-agent-chat.md +90 -0
- package/skills/uipath-coded-apps/references/widgets/datatable.md +97 -0
- package/skills/uipath-coded-apps/references/widgets/external-auth.md +97 -0
- package/skills/uipath-coded-apps/references/widgets/multi-file-upload.md +98 -0
- package/skills/uipath-coded-apps/references/widgets/pdf-viewer.md +122 -0
- package/skills/uipath-coded-apps/references/widgets/validation-station.md +1 -1
- package/skills/uipath-functions/SKILL.md +11 -0
- package/skills/uipath-insights/SKILL.md +52 -247
- package/skills/uipath-insights/references/filter-discovery-guide.md +106 -0
- package/skills/uipath-insights/references/investigation-playbook-guide.md +24 -16
- package/skills/uipath-insights/references/jobs-commands-guide.md +196 -53
- package/skills/uipath-ixp/SKILL.md +10 -4
- package/skills/uipath-ixp/references/cli-reference.md +59 -5
- package/skills/uipath-ixp/references/label-documents-guide.md +12 -5
- package/skills/uipath-maestro-bpmn/SKILL.md +27 -9
- package/skills/uipath-maestro-bpmn/references/diagnose/references/failure-modes.md +6 -3
- package/skills/uipath-maestro-bpmn/references/operate/CAPABILITY.md +1 -1
- package/skills/uipath-maestro-bpmn/references/operate/references/ship.md +9 -3
- package/skills/uipath-maestro-bpmn/references/registry-workflow.md +1 -1
- package/skills/uipath-maestro-bpmn/references/shared/local-metadata-regeneration-guide.md +18 -11
- package/skills/uipath-maestro-bpmn/references/structural-bpmn.md +13 -7
- package/skills/uipath-maestro-case/SKILL.md +138 -170
- package/skills/uipath-maestro-case/references/bindings-and-expressions.md +14 -1
- package/skills/uipath-maestro-case/references/bindings-v2-sync.md +25 -1
- package/skills/uipath-maestro-case/references/brownfield.md +7 -3
- package/skills/uipath-maestro-case/references/case-commands.md +63 -8
- package/skills/uipath-maestro-case/references/case-editing-operations.md +11 -8
- package/skills/uipath-maestro-case/references/case-schema.md +5 -3
- package/skills/uipath-maestro-case/references/case-spec-input-details.md +4 -0
- package/skills/uipath-maestro-case/references/connector-integration.md +3 -1
- package/skills/uipath-maestro-case/references/connector-trigger-impl.md +236 -0
- package/skills/uipath-maestro-case/references/connector-trigger-planning.md +300 -0
- package/skills/uipath-maestro-case/references/entry-points-sync.md +2 -0
- package/skills/uipath-maestro-case/references/evals/evals.json +33 -40
- package/skills/uipath-maestro-case/references/implementation.md +58 -13
- package/skills/uipath-maestro-case/references/phased-execution.md +87 -20
- package/skills/uipath-maestro-case/references/placeholder-tasks.md +3 -1
- package/skills/uipath-maestro-case/references/planning.md +26 -16
- package/skills/uipath-maestro-case/references/plugins/case/impl-json.md +2 -5
- package/skills/uipath-maestro-case/references/plugins/case/planning.md +3 -1
- package/skills/uipath-maestro-case/references/plugins/conditions/case-exit-conditions/impl-json.md +3 -1
- package/skills/uipath-maestro-case/references/plugins/conditions/case-exit-conditions/planning.md +5 -3
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-entry-conditions/impl-json.md +4 -2
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-entry-conditions/planning.md +6 -4
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-exit-conditions/impl-json.md +6 -4
- package/skills/uipath-maestro-case/references/plugins/conditions/stage-exit-conditions/planning.md +6 -4
- package/skills/uipath-maestro-case/references/plugins/conditions/task-entry-conditions/impl-json.md +42 -3
- package/skills/uipath-maestro-case/references/plugins/conditions/task-entry-conditions/planning.md +6 -4
- package/skills/uipath-maestro-case/references/plugins/logging/impl-json.md +50 -32
- package/skills/uipath-maestro-case/references/plugins/sla/impl-json.md +2 -4
- package/skills/uipath-maestro-case/references/plugins/sla/planning.md +3 -1
- package/skills/uipath-maestro-case/references/plugins/stages/impl-json.md +1 -4
- package/skills/uipath-maestro-case/references/plugins/stages/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/action/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/action/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/agent/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/agent/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/api-workflow/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/api-workflow/planning.md +5 -3
- package/skills/uipath-maestro-case/references/plugins/tasks/case-management/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/case-management/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-activity/impl-json.md +43 -13
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-activity/planning.md +4 -2
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-trigger/impl-json.md +10 -7
- package/skills/uipath-maestro-case/references/plugins/tasks/connector-trigger/planning.md +5 -3
- package/skills/uipath-maestro-case/references/plugins/tasks/create-inline-common.md +3 -1
- package/skills/uipath-maestro-case/references/plugins/tasks/process/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/process/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/rpa/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/rpa/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/wait-for-timer/impl-json.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/tasks/wait-for-timer/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/triggers/event/impl-json.md +9 -6
- package/skills/uipath-maestro-case/references/plugins/triggers/event/planning.md +5 -3
- package/skills/uipath-maestro-case/references/plugins/triggers/manual/impl-json.md +1 -4
- package/skills/uipath-maestro-case/references/plugins/triggers/manual/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/triggers/timer/impl-json.md +1 -4
- package/skills/uipath-maestro-case/references/plugins/triggers/timer/planning.md +2 -0
- package/skills/uipath-maestro-case/references/plugins/variables/bindings/impl-json.md +3 -1
- package/skills/uipath-maestro-case/references/plugins/variables/global-vars/impl-json.md +40 -2
- package/skills/uipath-maestro-case/references/plugins/variables/global-vars/planning.md +12 -2
- package/skills/uipath-maestro-case/references/plugins/variables/io-binding/impl-json.md +8 -6
- package/skills/uipath-maestro-case/references/plugins/variables/io-binding/planning.md +17 -3
- package/skills/uipath-maestro-case/references/registry-discovery.md +9 -5
- package/skills/uipath-maestro-case/references/sla-response-shapes.md +3 -1
- package/skills/uipath-maestro-case/references/troubleshooting-guide.md +2 -0
- package/skills/uipath-maestro-case/scripts/audit_plan.py +231 -0
- package/skills/uipath-maestro-flow/references/author/CAPABILITY.md +8 -4
- package/skills/uipath-maestro-flow/references/author/references/editing-operations-cli.md +5 -3
- package/skills/uipath-maestro-flow/references/author/references/editing-operations-json.md +14 -4
- package/skills/uipath-maestro-flow/references/author/references/editing-operations.md +3 -3
- package/skills/uipath-maestro-flow/references/author/references/greenfield.md +12 -3
- package/skills/uipath-maestro-flow/references/author/references/planning-arch.md +17 -13
- package/skills/uipath-maestro-flow/references/author/references/planning-impl.md +1 -1
- package/skills/uipath-maestro-flow/references/author/references/plugins/agent/impl.md +49 -4
- package/skills/uipath-maestro-flow/references/author/references/plugins/connector/impl.md +59 -17
- package/skills/uipath-maestro-flow/references/author/references/plugins/connector-trigger/impl.md +3 -3
- package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl-connector.md +3 -1
- package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl-manual.md +3 -1
- package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl.md +5 -2
- package/skills/uipath-maestro-flow/references/author/references/plugins/inline-agent/impl.md +31 -16
- package/skills/uipath-maestro-flow/references/author/references/plugins/ixp/impl.md +13 -4
- package/skills/uipath-maestro-flow/references/author/references/plugins/loop/impl.md +185 -25
- package/skills/uipath-maestro-flow/references/author/references/plugins/loop/planning.md +18 -10
- package/skills/uipath-maestro-flow/references/author/references/plugins/rpa/impl.md +9 -3
- package/skills/uipath-maestro-flow/references/author/references/plugins/terminate/impl.md +6 -3
- package/skills/uipath-maestro-flow/references/diagnose/references/failure-modes.md +68 -0
- package/skills/uipath-maestro-flow/references/shared/cli-commands.md +2 -1
- package/skills/uipath-maestro-flow/references/shared/file-format.md +36 -9
- package/skills/uipath-maestro-flow/references/shared/node-output-wiring.md +1 -1
- package/skills/uipath-maestro-flow/references/shared/ux-narration-and-todos.md +1 -1
- package/skills/uipath-maestro-flow/references/shared/variables-and-expressions.md +77 -20
- package/skills/uipath-planner/SKILL.md +30 -12
- package/skills/{uipath-maestro-case/assets/templates/sdd-template-examples.md → uipath-planner/assets/templates/case-sdd-examples.md} +18 -32
- package/skills/uipath-planner/assets/templates/case-sdd-template.md +289 -309
- package/skills/uipath-planner/references/case-design-lane-guide.md +288 -0
- package/skills/uipath-planner/references/multi-skill-patterns-guide.md +1 -1
- package/skills/uipath-planner/references/package-selection-guide.md +2 -2
- package/skills/uipath-planner/references/pdd-driven-lane-guide.md +5 -1
- package/skills/uipath-planner/references/product-selection-guide.md +2 -2
- package/skills/uipath-planner/references/sdd-generation-guide.md +16 -15
- package/skills/uipath-planner/scripts/audit_sdd.py +437 -0
- package/skills/uipath-platform/SKILL.md +7 -2
- package/skills/uipath-platform/references/data-fabric/choice-sets.md +1 -1
- package/skills/uipath-platform/references/data-fabric/data-fabric.md +1 -1
- package/skills/uipath-platform/references/data-fabric/entity-schema.md +37 -21
- package/skills/uipath-platform/references/data-fabric/file-attachments.md +1 -1
- package/skills/uipath-platform/references/guardrails/byo-configurations.md +205 -0
- package/skills/uipath-platform/references/traces/feedback.md +4 -2
- package/skills/uipath-platform/references/uip-commands.md +2 -2
- package/skills/uipath-review/SKILL.md +55 -52
- package/skills/uipath-review/references/agents/agent-grading-rubric.md +62 -40
- package/skills/uipath-review/references/agents/agents-coded-rules.md +7 -1
- package/skills/uipath-review/references/agents/agents-lowcode-rules.md +21 -2
- package/skills/uipath-review/references/agents/guardrails/coded-guardrails-review.md +78 -13
- package/skills/uipath-review/references/agents/guardrails/guardrails-review.md +11 -4
- package/skills/uipath-review/references/architecture-assessment-guide.md +1 -1
- package/skills/uipath-review/references/review-workflow-guide.md +19 -10
- package/skills/uipath-review/references/rule-catalog-workflow.md +6 -6
- package/skills/uipath-review/references/rule-format.md +1 -1
- package/skills/uipath-rpa/SKILL.md +1 -1
- package/skills/uipath-solution/SKILL.md +4 -4
- package/skills/uipath-solution/references/solution-overview.md +7 -2
- package/skills/uipath-tasks/SKILL.md +27 -1
- package/skills/uipath-tasks/references/task-catalogs.md +79 -0
- package/skills/uipath-tasks/references/task-data.md +45 -0
- package/skills/uipath-tasks/references/task-metadata.md +69 -0
- package/skills/uipath-test/SKILL.md +3 -3
- package/skills/uipath-test/references/test-result-report-guide.md +16 -1
- package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/ambiguous-selector.md +1 -1
- package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/scope-container-wrong-page.md +1 -1
- package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/verify-execution-failure.md +2 -2
- package/skills/uipath-troubleshoot/references/products/agents/playbooks/guardrail-violation.md +12 -0
- package/version-manifest.json +2 -2
- package/skills/uipath-maestro-case/assets/templates/sdd-template.md +0 -667
- package/skills/uipath-maestro-case/references/connector-trigger-common.md +0 -511
- package/skills/uipath-maestro-case/references/phase-0-interview.md +0 -279
- package/skills/uipath-maestro-case/references/sdd-generation-rules.md +0 -1026
- package/skills/uipath-review/references/agents/agent-common-issues.md +0 -401
- package/skills/uipath-review/references/agents/agent-review-checklist.md +0 -379
- /package/skills/{uipath-maestro-case → uipath-planner}/assets/templates/sdd-viewer.html +0 -0
|
@@ -1,1026 +0,0 @@
|
|
|
1
|
-
# SDD Generation Rules
|
|
2
|
-
|
|
3
|
-
Content-quality contract for Phase 0's `sdd.md`. The interview in [phase-0-interview.md](phase-0-interview.md) owns the **conversation flow** (Listen / Sketch / Confirm / Build start). This file owns the **content rules** the in-memory case model must satisfy before the confirmation is presented — and therefore before `sdd.md` renders from it. Where older wording says "Approve" or "the Approve summary", read the §Confirm checkpoint and its `Decisions I Made` table.
|
|
4
|
-
|
|
5
|
-
Phase 1 trusts `sdd.md` as written (SKILL.md Rule 2). These rules make that trust safe.
|
|
6
|
-
|
|
7
|
-
## Mental model: stages, secondary stages, tasks
|
|
8
|
-
|
|
9
|
-
Reason the case shape from the process the user describes — **do not reach for the template first.** The template renders a shape you already decided; it does not decide it for you. Build the model in this order: stages → tasks → types → sweep other paths. Each concept below is a question to ask of the user's process, not a slot to fill.
|
|
10
|
-
|
|
11
|
-
**Stage** — a phase the case works through: a bounded milestone with an *entry* (when it starts), *tasks* (the work done inside it), and a *completion/exit* (when it's done and where the case goes next). Stages are the backbone; they run in sequence (or parallel), wired by **entry/exit conditions** (the case has no edges — transitions are condition-driven). Derive one stage per milestone the user names ("intake", "underwriting", "funding"). Ask: *what is the case working toward right now, and what makes that done?* A stage that "marks the case complete" is on the main flow (`isRequired: true`).
|
|
12
|
-
|
|
13
|
-
**Secondary stage** (a `case-management:Stage` node carrying `data.stageType: "secondary"` — the `case-management:ExceptionStage` node type is removed at v22) — an **interrupting** lane for work that is **not a fixed step on the line**: it can fire at many points and only under a condition. Errors, escalations, rejections, rework loops, cancellations. If the work is just an optional one-off inside the current stage, keep it as a task with an `adhoc` entry condition instead of promoting it to a secondary stage. Four rules define secondary stages, all CLI-enforced:
|
|
14
|
-
|
|
15
|
-
- **No edges** — reached and exited purely by conditions, never wired by an edge (true of every stage — edges retired). It is detached from any flow graph.
|
|
16
|
-
- **Entered by its own condition**, never by an edge — but the entry shape depends on the lane's trigger:
|
|
17
|
-
- **(a) Mid-stage interrupt** — user-launched (`user-selected-stage`, paired with a `wait-for-user` exit) or external (`wait-for-connector`). Fires *while the origin is still active* and genuinely interrupts it.
|
|
18
|
-
- **(b) Decision/signal divert** — the **origin** stage carries a **gated diverting exit** (`Marks Stage Complete: No`, `IF` on the decision/signal, `exitToStageId` → this lane), and this lane's `selected-stage-exited(origin) + IF` entry **matches** it. Fires when the origin *exits* — a divert-and-return, NOT a true mid-stage interrupt. The secondary lane still carries `Interrupting: Yes`; a variable-driven mid-stage interrupt is not expressible without a connector, so a decision- or signal-gated lane MUST use shape (b). See [§ Logical integrity step 5](#logical-integrity--stage-graph).
|
|
19
|
-
- **(c) SLA status response (`enter-stage` only)** — `sla-status-change` references the target SLA rule, plus one of its at-risk escalation rules when the status is at-risk. It can fire while any stage in that SLA's scope is active. Interrupting or not depends on what the response does to active work — see § SLA response model. The other SLA response that creates work, `start-task`, is **not** a secondary-stage shape at all: it is a task-entry rule inside the breached stage, so it never reaches this list.
|
|
20
|
-
- **Every secondary-stage entry is interrupting — one carve-out.** Set the stage-level `Interrupting` field to `Yes` and set every Stage Entry Conditions row for that secondary stage to `Interrupting: Yes`. A secondary stage with `Interrupting: No` is misclassified; make it a regular parallel stage or an `adhoc` task instead. **Carve-out:** when an `sla-status-change` response is *parallel oversight* — the breached work keeps running, nothing is paused, taken over, or rerouted — the stage-level `Interrupting` field **and** that entry row both read `No` (§ SLA response model). Never render `Interrupting: Yes` on the stage while its only entry row reads `No`; that contradiction is a blocking render error. The lane stays `stageType: secondary`, `isRequired: false`, and out of the happy-path completion set; do NOT promote it to a regular stage, which would make it required for case completion. This carve-out is scoped to `sla-status-change` only: `wait-for-connector`, `user-selected-stage`, and diverting `selected-stage-exited` rows are always `Yes`.
|
|
21
|
-
- **Exits by intent** — returning/rework lanes use `return-to-origin` to route back to the origin stage; terminal lanes use `exit-only` plus a root case-exit row. Neither shape uses a new edge. Both shapes require `Interrupting: Yes` on the stage and every entry row, except the non-diverting `sla-status-change` oversight row carved out above.
|
|
22
|
-
|
|
23
|
-
Ask: *does this work belong at one fixed point (regular stage), or could it happen at several points / only on a condition (secondary stage)?* "Handle rejected application", "escalate on SLA breach", "rework loop" → secondary. Returning work uses `return-to-origin`; terminal rejection/withdrawal/cancel work uses `exit-only` plus a case-exit row. Pull these out of the main flow; do not string them inline as ordinary stages.
|
|
24
|
-
|
|
25
|
-
**Global-event normalization.** When an external status event (for example, a withdrawal received from a portal) or an SLA status change may happen at any point **and requires case work/routing**, define it once on the destination response, not once per primary stage. Use `wait-for-connector` for the external event and `sla-status-change` for a case/stage SLA response that enters a stage. Do **not** add the same task or exit rule to every primary stage: a true interrupting secondary-stage entry exits whichever stage is active. A recoverable lane returns with `return-to-origin`; a terminal lane uses `exit-only` plus a root case-exit rule.
|
|
26
|
-
|
|
27
|
-
**SLA response model.** Two SLA scopes exist: **case** and **stage**. Separate the clock from the response, and pick the response from the source — not from the scope. Emit-side contract (rule JSON, task-vs-stage entry, CLI-verified shapes): [sla-response-shapes.md](sla-response-shapes.md).
|
|
28
|
-
|
|
29
|
-
| Response | Choose when the source says | Shape | Interrupting |
|
|
30
|
-
|---|---|---|---|
|
|
31
|
-
| `notify-only` | notify / alert / email / page a person or group | SLA escalation notification only — no stage, no task | n/a |
|
|
32
|
-
| `start-task` | local work inside the **same** breached stage: reminder, reassignment, manager check, extra approval, follow-up | the follow-up task lives in the breached stage and carries the `sla-status-change` rule on **its own task-entry** row, referencing that stage's own SLA. **No stage-entry row, no new stage** — a stage-entry rule would re-enter the stage and re-run its other tasks | `—` (a task entry interrupts nothing) |
|
|
33
|
-
| `enter-stage` | ownership change, escalation lane, recovery, or a visible lifecycle step | a separate stage carries the `sla-status-change` entry | `Yes` when the response takes over, pauses, exits, or reroutes active work; `No` for parallel oversight while work continues |
|
|
34
|
-
| `exit-stage` | the current stage should end, fail, or route away | stage-exit row | per exit semantics |
|
|
35
|
-
| `exit-case` | the whole case should close, cancel, fail, or reach an alternate terminal outcome | §1.4a case-exit row | per exit semantics |
|
|
36
|
-
|
|
37
|
-
A **case**-level SLA response that changes the graph enters a separate stage. A **stage**-level SLA response may either start a task in the breached stage (`start-task`, a task-entry rule) or route to a separate stage (`enter-stage`, a stage-entry rule that may interrupt or not).
|
|
38
|
-
|
|
39
|
-
**`start-task` vs `enter-stage` is decided by WHERE the work lives — not by whether it interrupts.** `enter-stage` can itself be non-interrupting, so "the team keeps working" does not point to either one. Ask instead: does the source put the follow-up **inside the breached stage's own work**, or does it hand the case to a **separate lane**?
|
|
40
|
-
|
|
41
|
-
| Source wording | Response | What you author |
|
|
42
|
-
|---|---|---|
|
|
43
|
-
| "as part of the assessment", "inside the review", "the assessor/reviewer keeps working and also does X", a named task for a manager or peer | `start-task` | one task in the breached stage, carrying `sla-status-change` as its **task-entry** row against that stage's own SLA. **No new stage, and no stage-entry row.** |
|
|
44
|
-
| "hand it to", "a lane/team takes it over", "escalate into <Lane>", "a director tracks it", a named *stage* or lane | `enter-stage` | a separate stage carrying the `sla-status-change` entry row |
|
|
45
|
-
|
|
46
|
-
A named **task** ("raise a Senior Assessor Check approval") is never a reason to mint a stage. If the `Target` you are about to write is the name of a task rather than a stage that the source describes as its own lane, the response is `start-task`, the `Target` cell holds that task name, and the task goes in the breached stage.
|
|
47
|
-
|
|
48
|
-
**Status rides on the escalation reference.** A breach response references the SLA alone — an absent escalation reference *is* how a breach rule is stored. An at-risk response also names one concrete at-risk escalation on that SLA, which must exist: an SLA with no at-risk escalation cannot carry an at-risk response. Never author the Case Designer's `any`-escalation shorthand — released `validate` rejects it as a missing escalation.
|
|
49
|
-
|
|
50
|
-
**Action-task SLA** is not a case/stage `slaRules[]` entry: configure the action task's own timer/SLA fields, and add `sla-status-change` case behavior only when the missed task must change the case graph.
|
|
51
|
-
|
|
52
|
-
**No stated response → default:** at-risk `notify-only` to the owning persona/group; breached `notify-only` to the next escalation tier. Do not invent a stage, task, or routing change unless the source says the breach creates work or changes routing.
|
|
53
|
-
|
|
54
|
-
Expose every choice in the **SLA Response Map** (`Scope | SLA | Status | Response | Target | Interrupting | Rationale`). Never hide breach behavior inside SLA duration text.
|
|
55
|
-
|
|
56
|
-
**Other-path sweep.** Before Phase 0 confirmation, actively look beyond the primary flow. Consider rework / needs-info loops; rejection, withdrawal, and cancellation; SLA escalation; external-system failure; manual override or worker-selected side work; optional side work; and terminal outcomes that differ from successful completion. Do not force every item into a secondary stage: choose the smallest faithful model, such as a secondary stage, terminal case exit, non-completing case exit, task-level branch, `adhoc` task, or SLA notification-only row. Clear source signals are modeled by best assumption and disclosed in the confirmation's **Other Paths Considered** table. When the source has no signal at all, Phase 0 asks one bounded question before confirmation; if the user chooses primary-flow-only, record that as an intentional decision and do not invent a path.
|
|
57
|
-
|
|
58
|
-
**Case execution patterns.** Classify these before choosing rule types:
|
|
59
|
-
|
|
60
|
-
| Pattern | Signal | Case model |
|
|
61
|
-
|---|---|---|
|
|
62
|
-
| Strict sequence | "then", "after", "before", direct prerequisite | consecutive single-task sets; every task uses `runs-sequentially` |
|
|
63
|
-
| Parallel after predecessor | "after A, do B and C", both independent | one next task set containing B and C; do not create duplicate `selected-tasks-completed("A")` task entries |
|
|
64
|
-
| Race | confirmation vs timeout/cancellation/withdrawal | listener and clock active while the obligation is pending; downstream work gated by the winning fact |
|
|
65
|
-
| Optional side work | "may", "can manually", "if needed" and no required downstream dependency | `adhoc`, `Required: No`, not selected by required/fan-in rules |
|
|
66
|
-
|
|
67
|
-
For any non-start stage/task entry, identify its concrete producer before the Case Review: source stage exit/completion, source task completion, connector event detail, paired `wait-for-user`, or SLA scope/display name/status/escalation intent. A rule without a producer is a design defect, even if the rule name is schema-valid.
|
|
68
|
-
|
|
69
|
-
**Task** — one unit of work inside a stage, owned by a *persona* (a human role) or by the *system* (automation / AI / API). It has an entry condition (when it runs within the stage), inputs, outputs, and a **type** that says *how* the work gets done. One verb in the user's description ≈ one task. Ask: *who or what performs this, and how?* The "how" answer is the task type — see [§ Choosing the task type](#choosing-the-task-type).
|
|
70
|
-
|
|
71
|
-
Once stages, secondary stages, and tasks are reasoned, the [§ Render contract](#render-contract) below turns each decision into exact cells. Reason first; render second.
|
|
72
|
-
|
|
73
|
-
### Lifecycle rules — entry / completion / exit
|
|
74
|
-
|
|
75
|
-
The case, each stage, and each task move through a lifecycle gated by **rules** (DNF — an OR of AND-clauses). The CLI fixes exactly which rule types are legal at each gate (`packages/case-tool/src/utils/schema-helpers.ts` → the `VALID_*_RULE_TYPES` sets; mirrored in [case-schema.md § Rules](case-schema.md)). **Pick from the set for the gate — never invent a rule type, never use a rule type from the wrong gate.**
|
|
76
|
-
|
|
77
|
-
| Gate | What it answers | Legal rule types (CLI) |
|
|
78
|
-
|---|---|---|
|
|
79
|
-
| **Case entry** | how does a case instance begin? | No case-entry condition object — a **trigger** starts the case; the root stage carries `case-entered`. |
|
|
80
|
-
| **Stage entry** | when does this stage activate? | `case-entered` (root only) · `selected-stage-completed` · `selected-stage-exited` · `wait-for-connector` · `user-selected-stage` · `sla-status-change` |
|
|
81
|
-
| **Stage completion** (`Marks Stage Complete: Yes`) | when is the stage done, on the main flow, a returning lane, or a terminal secondary lane? | `required-tasks-completed` · `wait-for-connector`; exit `type`: `exit-only` / `wait-for-user` / `return-to-origin` |
|
|
82
|
-
| **Stage exit** (`Marks Stage Complete: No`) | early hand-off / route without completing | `selected-tasks-completed` · `wait-for-connector`; exit `type`: `exit-only` / `wait-for-user` |
|
|
83
|
-
| **Task entry** | when does this task start inside its stage? | `current-stage-entered` (stage-started/default tasks) · `selected-tasks-completed` · `wait-for-connector` · `sla-status-change` (the `start-task` SLA response) · `adhoc` · `runs-sequentially` |
|
|
84
|
-
| **Task completion / exit** | — | A task has **no** exit/completion condition. It completes when its own work finishes; downstream stages/tasks key off that via `required-tasks-completed` / `selected-tasks-completed`. |
|
|
85
|
-
| **Case completion** (`Marks Case Complete: Yes`) | when does the case close successfully? | `required-stages-completed` · `wait-for-connector` |
|
|
86
|
-
| **Case exit** (`Marks Case Complete: No`) | alternate disposition (cancel / route out) | `selected-stage-completed` · `selected-stage-exited` · `wait-for-connector` |
|
|
87
|
-
|
|
88
|
-
How to reason with these:
|
|
89
|
-
|
|
90
|
-
- **`required-*` vs `selected-*`.** `required-tasks-completed` / `required-stages-completed` = "all items flagged required are done" (the `isRequired` flow). `selected-tasks-completed` / `selected-stage-completed` / `selected-stage-exited` = "these *specific named* items." Pairing rule (Key Rule 4): `Marks Complete: Yes` pairs only with `required-*`; `selected-*` is for `No` (routing / early exit / alternate disposition). A `Yes` + `selected-*` pair is a schema error.
|
|
91
|
-
- **Secondary stage** uses **stage-entry + stage-exit rules only, never edges** (true of every stage — edges retired). Its entry rules are always interrupting (`isInterrupting: true`). Returning exits use the canonical completion shape `return-to-origin` + `Marks Stage Complete: Yes` + `required-tasks-completed` to rejoin the flow they left; terminal exits use `exit-only` + `Marks Stage Complete: Yes` plus a root case-exit row. **For a decision/signal-routed lane, the routing lives on the *origin* stage:** a gated diverting exit (`Marks Stage Complete: No`, `IF` on the decision/signal, `exitToStageId` → the lane), with the origin's completion exit gated by the inverse `IF` so the two paths are mutually exclusive. **For a global connector/SLA event, routing lives only on the destination secondary stage:** no per-origin exit rule is needed. See [§ Logical integrity step 5](#logical-integrity--stage-graph).
|
|
92
|
-
- **Task-entry mode is exclusive.** Use `current-stage-entered` only for stage-started/default tasks. Event-triggered tasks carry the explicit event rule (`wait-for-connector` with connector configuration), adhoc tasks carry only `adhoc`, and sequential tasks carry only `runs-sequentially`; do not add `current-stage-entered` to those tasks just because they are first in a stage. For sequential chains, the first task's `runs-sequentially` means current-stage-entered, and later tasks use it as the preceding-task-completed trigger. `wait-for-connector` makes a gate pause for an inbound connector callback — its `conditionExpression` gates on **case state** only (no `event` payload; in-rule extract-then-gate is unsupported at runtime — gate a downstream condition instead); `adhoc` lets a *task* fire manually from the case app (task-entry only — never a stage-entry rule). A `start-task` SLA response is event-triggered: the task carries `sla-status-change` as its only entry rule, never alongside `current-stage-entered`.
|
|
93
|
-
- **Thresholded role / work gates are executable, not descriptive.** A source rule like "Credit Analyst only over $5M; otherwise Underwriter" must produce a rule, task-entry condition, recipient expression, or computed owner field that references both the threshold and the gated actor/work. Preserve the reviewer-facing phrase close to the expression in the SDD, for example `Credit Analyst route when loanAmount > 5000000`. A persona row alone, or a generic note that does not tie `Credit Analyst` to `>$5M`, is not a modeled gate.
|
|
94
|
-
|
|
95
|
-
**Frontend task-mode mapping.** The UI's `sequential`, `event-triggered`, and `manually-triggered` choices are not interchangeable: sequential means the task-only `runs-sequentially` rule; event-triggered means an explicit event/condition rule (use `wait-for-connector` for an external connector callback); manually-triggered means an `adhoc`-only task with `isRequired: false`. `adhoc` decides how the task starts; it does not decide the task type. A manually triggered task may still be `action`, `agent`, `api-workflow`, `process`, etc. Do not infer one mode from `data.tasks` lanes, and do not add a second entry rule that changes the selected mode. Downstream plans preserve the confirmed SDD mode and rule exactly: a singleton `parallel` + `current-stage-entered` task stays that way, while `sequential` + `runs-sequentially` requires an explicit order or dependency in the source.
|
|
96
|
-
- **`user-selected-stage`** (stage entry) starts a stage on demand by a user rather than by flow. The CLI validator requires it to pair with a `wait-for-user` stage exit elsewhere: a `wait-for-user` exit with no `user-selected-stage` entry — or a `user-selected-stage` entry with no `wait-for-user` exit — fails `validate`.
|
|
97
|
-
|
|
98
|
-
Exact cell formats live in [§ Stage content rules](#stage-content-rules) and [§ Task content rules](#task-content-rules) — this table is the conceptual map of *which rule belongs where*.
|
|
99
|
-
|
|
100
|
-
### Triggers, connectors, variables — how the case meets the world
|
|
101
|
-
|
|
102
|
-
**Trigger** — how a case instance is *born* (`TriggerNode`, `uipath.case.trigger`, field `data.inputs.serviceType`):
|
|
103
|
-
|
|
104
|
-
- `None` → **Manual**: a user or API call starts the case.
|
|
105
|
-
- `timer` → **Timer**: a schedule starts it. (SDD author token: `Intsvc.TimerTrigger`.)
|
|
106
|
-
- `Intsvc.EventTrigger` → **Connector Event**: an external system fires it.
|
|
107
|
-
|
|
108
|
-
One trigger is the root; additional triggers are secondary. Reason: *what makes a new case appear?* A portal signup, inbound form, or schedule is NEVER Manual — assume the event/timer trigger per the playbook and disclose the decision the moment such a source is named.
|
|
109
|
-
|
|
110
|
-
**Connector** — the case's hands into an external system (an Integration Service connection). It surfaces three ways: an `execute-connector-activity` task (perform one operation — push), a `wait-for-connector` task/rule (pause for an inbound event — pull), or an `Intsvc.EventTrigger` (start on an event). Identity (`typeId` + `connectionId`) resolves from the registry — never fabricate IDs (SKILL.md Rule 8). Ask: *which system, and does the case call it (push) or wait for it (pull)?*
|
|
111
|
-
|
|
112
|
-
**Variable** — the case's memory; data flowing across tasks and stages (`UiPathVariable` / `UiPathAllVariables`). Two axes:
|
|
113
|
-
|
|
114
|
-
- **Category** = its role: `In` = supplied at case start (caller / trigger), `Out` = returned at case end, `Variable` = internal state (including trigger-payload extraction via `sourceTriggers` + `sourceFields`).
|
|
115
|
-
- **Type** ∈ `string` · `integer` · `float` · `double` · `boolean` · `date` · `datetime` · `jsonSchema` · `file` (a `file` is a JobAttachment record). Use `string` for JSON-shaped values; never emit `json`.
|
|
116
|
-
|
|
117
|
-
A task Output *produces* a variable (`-> =vars.<id>`); a task Input *consumes* one (binds from a variable or an upstream task's output). Ask: *where does each piece of data come from, and who consumes it?* Never introduce a variable whose only producer runs after its consumer — that breaks lineage closure (§Variable lineage closure).
|
|
118
|
-
|
|
119
|
-
### Worked reasoning (one pass)
|
|
120
|
-
|
|
121
|
-
> *"Vendors sign up through our portal. We screen them, run a compliance check, set them up in our finance system, then activate. If compliance fails it goes back for remediation."*
|
|
122
|
-
|
|
123
|
-
Reason the shape; do not template it:
|
|
124
|
-
|
|
125
|
-
- **Milestones → stages:** Intake → Screening → Compliance → Finance Setup → Activation — regular stages on the main flow.
|
|
126
|
-
- **"goes back for remediation" → secondary stage.** Remediation fires only on a condition (compliance failed) and routes back — model it as a secondary stage (condition-entered, `return-to-origin`), **not** a sixth inline primary stage.
|
|
127
|
-
- **"sign up through portal" → trigger.** A portal signup is an inbound event, not Manual — assume the event trigger and disclose it.
|
|
128
|
-
- **Tasks + types** (read verb + actor, ask the [§ Choosing](#choosing-the-task-type) question):
|
|
129
|
-
- *screen them* → AI judges unstructured docs → `agent`
|
|
130
|
-
- *compliance check* → ambiguous: a connector call (`execute-connector-activity`) vs human sign-off (`action`); decide per the assumption playbook, and a "licensed officer signs off" phrase forces `action`.
|
|
131
|
-
- *set them up in finance system* → SAP connector operation → `execute-connector-activity`; if a deployed process packages it → `process`.
|
|
132
|
-
- *activate* → one connector op or a human flip → confirm with the user.
|
|
133
|
-
|
|
134
|
-
The shape fell out of the process. The template then renders it.
|
|
135
|
-
|
|
136
|
-
## Inputs
|
|
137
|
-
|
|
138
|
-
| Input | Purpose |
|
|
139
|
-
|---|---|
|
|
140
|
-
| User chat messages | Primary source — verbatim values, types, exits, SLAs |
|
|
141
|
-
| User-supplied docs (paths, paste, attachments) | Secondary — read on Listen, parsed for case shape |
|
|
142
|
-
| [`assets/templates/sdd-template.md`](../assets/templates/sdd-template.md) | Structural mold for the rendered `sdd.md` |
|
|
143
|
-
| [`references/case-schema.md`](case-schema.md) | Platform schema — what `caseplan.json` accepts downstream |
|
|
144
|
-
| [`references/registry-discovery.md`](registry-discovery.md) | Cache file map for Resolve |
|
|
145
|
-
| Tenant registry (`~/.uip/case-resources/`) | Resolves deployed processes / agents / actions / connectors |
|
|
146
|
-
| Tenant IS cache (`~/.uipath/cache/integrationservice/`) | Resolves connector identity, connections, activities, triggers |
|
|
147
|
-
|
|
148
|
-
`case-schema.md` is platform-truth. Choices conflicting with it are schema-invalid regardless of source — see §Content authority hierarchy.
|
|
149
|
-
|
|
150
|
-
## Content authority hierarchy
|
|
151
|
-
|
|
152
|
-
When signals conflict, apply this priority — top wins:
|
|
153
|
-
|
|
154
|
-
1. **Platform schema constraints** ([case-schema.md](case-schema.md)) — schema-invalid values never ship, regardless of source. Examples: task `type` outside the 9-value enum (SKILL.md Rule 16); `Marks Stage Complete: Yes` paired with `selected-tasks-completed` (sdd-template Key Rule 4).
|
|
155
|
-
2. **Regulatory / compliance constraint** stated or implied by the user (ECOA, NCQA, GDPR, HIPAA, SOC 2, FCRA, FINRA, etc.). Forces specific types — see §Task-type override priority.
|
|
156
|
-
3. **Tenant evidence** from the registry cache — a deployed Action App, process, agent, API workflow, connector activity/trigger, or enabled connection that already matches work the user described. Prefer that resource's type/identity, but never add stages/tasks or rename business work merely because the tenant has a resource.
|
|
157
|
-
4. **User-stated preference** in chat (verbatim "set the task to agent", "trigger = portal event").
|
|
158
|
-
5. **Doc-extracted values** from user-shared docs.
|
|
159
|
-
6. **Inferred defaults** per the assumption playbook in [phase-0-interview.md § Sketch](phase-0-interview.md#sketch--best-assumption-every-field).
|
|
160
|
-
7. **General-practice fallback.**
|
|
161
|
-
|
|
162
|
-
When a higher tier overrides a lower one, apply it and surface it in the confirmation's `Decisions I Made` table with provenance `(source: <higher-tier>-override)`.
|
|
163
|
-
|
|
164
|
-
## Choosing the task type
|
|
165
|
-
|
|
166
|
-
The `type` says **how the work gets done**, not what it's about. Read the verb + the actor in the user's description, ask the matching question, pick the type. The enum is closed — 9 values (SKILL.md Rule 16). Pick the baseline here; [§ Task-type override priority](#task-type-override-priority) then resolves conflicts (compliance, tenant evidence) on top of this pick.
|
|
167
|
-
|
|
168
|
-
| Type | Pick when the work is… | The question that selects it |
|
|
169
|
-
|---|---|---|
|
|
170
|
-
| `action` | a **person** must do, decide, approve, review, or sign off — in a form (human-in-the-loop) | Does a human need to act or judge here? |
|
|
171
|
-
| `agent` | an **AI agent** reasons over unstructured input: classify, extract, summarize, draft, score | Is this judgment over unstructured content an AI can do unattended? |
|
|
172
|
-
| `rpa` | deterministic **UI / desktop** automation of a legacy app with no API (an existing RPA process) | Is this clicking through a UI / legacy system that has no API? |
|
|
173
|
-
| `process` | invoking a **deployed orchestration process** that already packages this automation | Is there a deployed process that already does this end-to-end? |
|
|
174
|
-
| `api-workflow` | calling a **coded / API workflow** directly (HTTP, serverless business logic) | Is this an API / coded workflow we call directly? |
|
|
175
|
-
| `execute-connector-activity` | one **operation on an Integration Service connector** (e.g. Salesforce create record, send email) | Is this a single connector operation against a SaaS system? |
|
|
176
|
-
| `wait-for-connector` | the case **pauses until an external system calls back** (webhook, inbound message, event) | Is the case waiting for an external system to respond? |
|
|
177
|
-
| `wait-for-timer` | the case **pauses for a duration or until a datetime** | Is the case just waiting on time? |
|
|
178
|
-
| `case-management` | the step **launches / coordinates a child case** | Does this spin up a sub-case? |
|
|
179
|
-
|
|
180
|
-
**Tie-breakers:** SaaS integration with a tenant connector → `execute-connector-activity` over `api-workflow`. "Approve / review / decide" verbs are ambiguous between `action` (human) and `agent` (AI) — decide per the assumption playbook in [phase-0-interview.md § Sketch](phase-0-interview.md#sketch--best-assumption-every-field) and disclose the decision in the confirmation. A compliance trigger phrase forces `action` regardless of the pick above (see below).
|
|
181
|
-
|
|
182
|
-
## Task-type override priority
|
|
183
|
-
|
|
184
|
-
Extends the assumption playbook. Apply in this order when picking task `type`:
|
|
185
|
-
|
|
186
|
-
1. **User decision pinned to a type** — honor unless schema-invalid (Rule 16) or conflicting with (2).
|
|
187
|
-
2. **Regulatory constraint requiring human sign-off** — task MUST be `action`. Trigger phrases that force `action` (regardless of user preference):
|
|
188
|
-
- "only a licensed X may decide / sign off / certify / approve"
|
|
189
|
-
- "regulation requires human review"
|
|
190
|
-
- "ECOA adverse-action notice" / "FCRA adverse action"
|
|
191
|
-
- "NCQA UM 3 adverse determination"
|
|
192
|
-
- "HIPAA-protected approval"
|
|
193
|
-
- "SOC 2 attestation"
|
|
194
|
-
- any `<role>-licensed` or `<role>-credentialed` gate ("licensed underwriter", "credentialed clinician")
|
|
195
|
-
- "fiduciary review", "legal sign-off", "auditor review"
|
|
196
|
-
|
|
197
|
-
If the user proposes any non-`action` type AND any of the above appears in the conversation → Ask to confirm; do not silently accept. The Ask phrasing: name the regulation and propose `action` with the LLM/agent work bound to the action's form/recipient.
|
|
198
|
-
|
|
199
|
-
3. **Tenant evidence** — if the registry cache resolves a deployed Action App / process / agent / api-workflow / RPA that fits, prefer that resource's type and surface the match.
|
|
200
|
-
4. **Connector availability** — when an IS connector matches the integration, choose `execute-connector-activity` over `api-workflow`.
|
|
201
|
-
5. **Verb signal** — fall through to the assumption playbook in [phase-0-interview.md § Sketch](phase-0-interview.md#sketch--best-assumption-every-field).
|
|
202
|
-
6. **Fallback** — keep the user's stated value if any; otherwise emit a placeholder per SKILL.md Rule 8 and pair it with a high-severity review item (§Review items).
|
|
203
|
-
|
|
204
|
-
**Worked examples:**
|
|
205
|
-
|
|
206
|
-
| Case context | User stated | Override fires | Final type |
|
|
207
|
-
|---|---|---|---|
|
|
208
|
-
| Adverse-action notice (lending) — "ECOA mandates licensed compliance officer signs off" | `agent` (LLM drafts notice) | Yes — tier 2 | `action` (Compliance Officer recipient; LLM-drafted body bound to the action's form context) |
|
|
209
|
-
| Vendor scoring on intake | `agent` (LLM scores docs) | No — no regulation, no licensed role | `agent` |
|
|
210
|
-
| Underwriting decision on mortgage | `agent` (LLM applies criteria) | Maybe — jurisdiction-dependent; no tier-2 trigger phrase in transcript → keep user's `agent`, disclose the compliance caveat as a decision line | `agent` (disclosed) |
|
|
211
|
-
| Inbound webhook from Salesforce | `api-workflow` | No — but tier 4 says prefer connector | `execute-connector-activity` if Salesforce connector exists in tenant; else `api-workflow` |
|
|
212
|
-
| Process orchestration call | `process` | No | `process` |
|
|
213
|
-
|
|
214
|
-
**Compliance trigger detection.** Scan the entire Listen + Ask transcript for the trigger phrases above before recording any non-`action` task type. If a phrase is detected after a non-`action` type was already provisionally recorded, re-Ask the user before continuing to Resolve.
|
|
215
|
-
|
|
216
|
-
## Render contract
|
|
217
|
-
|
|
218
|
-
Reason the shape first — [§ Mental model](#mental-model-stages-secondary-stages-tasks) — then apply this contract; it governs *how* a decided stage / secondary stage / task is written, not *whether* it should exist.
|
|
219
|
-
|
|
220
|
-
Phase 1 reads `sdd.md` as written (Rule 2). The following three sections define **what each case / stage / task element MUST contain** before the model may render to `sdd.md`. Every block specifies required vs optional cells, allowed values, source of truth, and the fallback when a value is missing — in Phase 0, "Ask" fallbacks are settled by playbook assumption first and the one clarifying call only when no assumption is defensible.
|
|
221
|
-
|
|
222
|
-
**Template shape is part of the render contract.** A valid model is not enough if the written file collapses into a prose summary. The rendered `sdd.md` must preserve the structure in `assets/templates/sdd-template.md`: title, table of contents, Section 1/2/3/4 headings, case metadata/triggers/variables, the SLA Response Map when any SLA is configured (§1.2b), one full stage block per modeled stage, one full task detail block per modeled task, personas/app views, and integration/resource inventory. The compact Phase 0 confirmation is not an SDD substitute.
|
|
223
|
-
|
|
224
|
-
**Allowed `—`** (cells the user did not touch and Phase 1 can default safely): case-level Description, variable defaults, persona scope notes, app-view detail, secondary-stage description, optional `IF` conditionExpressions, business calendars on timers.
|
|
225
|
-
|
|
226
|
-
**Allowed `<UNRESOLVED>`** (gaps Phase 1 / post-build can resolve): registry IDs (`taskTypeId`, `connectionId`, `actionAppId`, `agentId`, `processOrchestrationId`) when Resolve was skipped or returned 0 matches. Pair every `<UNRESOLVED>` with a review item (§Review items).
|
|
227
|
-
|
|
228
|
-
**Banned `—` or `<UNRESOLVED>`** on every required cell named in the rules below. Either populate with a concrete value, emit a placeholder per Rule 8, or Ask the user.
|
|
229
|
-
|
|
230
|
-
## Case content rules
|
|
231
|
-
|
|
232
|
-
Defines what `sdd.md` Section 1 (Case Definition) must contain.
|
|
233
|
-
|
|
234
|
-
### 1.1 Case Metadata
|
|
235
|
-
|
|
236
|
-
| Field | Required? | Value shape | If missing |
|
|
237
|
-
|---|---|---|---|
|
|
238
|
-
| Case Name | yes | PascalCase identifier (e.g., `MortgageLoanOrigination`) | Block Approve. Ask. |
|
|
239
|
-
| Description | optional | One prose sentence | `—` |
|
|
240
|
-
| Identifier prefix | yes | UPPER, 2-4 chars (e.g., `MLO`) | Default mechanically from PascalCase first letters; record in source ledger. |
|
|
241
|
-
| Case SLA | conditional | Duration (e.g., `5 business days`) | `—` when case has no SLA; otherwise block Approve. |
|
|
242
|
-
| SLA Type | conditional | `time-based` (single unconditional duration) / `condition-based` (one or more conditionExpression-keyed overrides + a default time-based row) | Default `time-based` when Case SLA set with no per-condition overrides. The FE persists `condition-based` whenever ≥ 1 `slaRules[]` entry carries a non-empty `conditionExpression` (see PO.Frontend `CaseManagementSlaProperties.tsx:27-30`). `condition-based` requires populating the §Variable SLA Rules table; `time-based` omits it. |
|
|
243
|
-
| SLA Title | conditional | Non-empty root-unique SLA rule title, no `:` | Omit the row when Case SLA is `—` (never render `—` here). Else default `SLA Rule 1` and record in source ledger; a title a `sla-status-change` references must be concrete (§ Logical integrity step 6). |
|
|
244
|
-
| Case App | optional | `Enabled` / `Disabled` — whether the in-product Case App UI is on (`metadata.caseAppEnabled`). | Default `Disabled`; record in source ledger. |
|
|
245
|
-
| Task-output passing | optional | `Direct` / `Shared` — `metadata.caseDirectlyPassTaskOutputs`. `Direct` passes a task's outputs straight to downstream tasks (default). | Default `Direct`. |
|
|
246
|
-
|
|
247
|
-
**PO.Frontend validation parity plus safe generated names.** Before Approve, apply the same name and SLA checks that the Case App applies, then apply the skill's stricter safe-display-name contract to anything the skill generates or carries into Case Designer display/title fields.
|
|
248
|
-
|
|
249
|
-
| Surface | Required checks |
|
|
250
|
-
|---|---|
|
|
251
|
-
| Stage label | Non-empty; unique across stages; safe display characters only. A non-Case-Manager stage also cannot reuse the reserved default Case Manager stage label when a Case Manager stage exists. |
|
|
252
|
-
| Task display name | Safe display characters only for materialized tasks. |
|
|
253
|
-
| Rule display name | Safe display characters only for entry, exit, task-entry, and case-exit condition display names. |
|
|
254
|
-
| SLA rule title (`displayName`) | Non-empty; unique within the root or stage target; safe display characters only. |
|
|
255
|
-
| Escalation title (`displayName`) | Non-empty; unique across escalations on the target; safe display characters only. |
|
|
256
|
-
| SLA duration | `count > 0`; when `unit: min`, `15 ≤ count ≤ 1000`. Supported units are `min`, `h`, `d`, `w`, and `m`. |
|
|
257
|
-
| Conditional SLA | Every non-default SLA rule has a non-empty expression/condition. |
|
|
258
|
-
| Escalation payload | Every escalation has at least one recipient; an `at-risk` escalation has an `atRiskPercentage` value. |
|
|
259
|
-
|
|
260
|
-
Safe display characters are letters, numbers, spaces, hyphen (`-`), and underscore (`_`) only. Do not generate colons (`:`), periods (`.`), slashes, backslashes, quotes, parentheses, ampersands, commas, semicolons, emoji, or other symbols in stage/task/rule/SLA/escalation display names. Repair unsafe generated or user-carried display names mechanically by replacing runs of disallowed characters with one space, collapsing spaces, and trimming. Preserve words and casing. If the result is empty or collides, pick a safe qualifier or numeric suffix and disclose it in the Case Review.
|
|
261
|
-
|
|
262
|
-
These are blocking authoring errors, not optional style warnings. Do not normalize external registry or tenant lookup names (Action App titles, process names, connector names, API names, queue/bucket names); those are matching keys. Keep separate safe Case Designer display names when a lookup name contains punctuation.
|
|
263
|
-
|
|
264
|
-
The same rule governs **numeric** violations: never silently clamp, round, or substitute an out-of-range value to satisfy validation. A minute-based SLA authored below 15 or above 1000 is not repaired to the nearest legal bound — surface the violation and Ask for a replacement duration (or a different `unit`), naming the original value. This applies whether the value came from the interview or from an SDD supplied on disk: rewriting a user-authored duration to pass validation is a silent requirements change, not a fix.
|
|
265
|
-
|
|
266
|
-
### 1.2 Case-level SLA escalation
|
|
267
|
-
|
|
268
|
-
Required when Case SLA is set. Always renders with both rows; no `—` allowed in any cell.
|
|
269
|
-
|
|
270
|
-
| Threshold | Trigger | Recipient | Display Name |
|
|
271
|
-
|---|---|---|---|
|
|
272
|
-
| At-risk | `<pct>%` of case SLA (defaults below) | `UserGroup: <owner-group>` or `User: <name>` | Non-empty root-unique escalation title, no `:` |
|
|
273
|
-
| Breached | 100% of case SLA | One tier up — leadership group; Compliance for regulation-driven cases | Non-empty root-unique escalation title, no `:` |
|
|
274
|
-
|
|
275
|
-
`Display Name` defaults to `Escalation Rule {N}` only when no `sla-status-change` entry references that escalation.
|
|
276
|
-
|
|
277
|
-
**Default thresholds** when user did not name them:
|
|
278
|
-
|
|
279
|
-
- SLA ≤ 3 days → 75% at-risk
|
|
280
|
-
- 3 days < SLA ≤ 10 days → 70% at-risk
|
|
281
|
-
- SLA > 10 days → 80% at-risk
|
|
282
|
-
|
|
283
|
-
**Default recipients:** at-risk → stage/case owner persona's user group; breached → leadership group. Record substitutions in source ledger with reason `default applied — user did not name recipient`.
|
|
284
|
-
|
|
285
|
-
### 1.2b SLA Response Map
|
|
286
|
-
|
|
287
|
-
Required whenever **any** SLA is configured — case, stage, or `action` task. One row per `(Scope, SLA, Status)`; render the table per [`sdd-template.md` § SLA Response Map](../assets/templates/sdd-template.md). Columns: `Scope | SLA | Status | Response | Target | Interrupting | Rationale`.
|
|
288
|
-
|
|
289
|
-
| Field | Required? | Value |
|
|
290
|
-
|---|---|---|
|
|
291
|
-
| Scope | yes | `case`, `stage: <StageName>`, or `task: <TaskName>` |
|
|
292
|
-
| SLA | yes | the target's `SLA Title` (or a Variable SLA Rules `Display Name`) |
|
|
293
|
-
| Status | yes | `At-Risk` or `Breached` — one row each |
|
|
294
|
-
| Response | yes | `notify-only` \| `start-task` \| `enter-stage` \| `exit-stage` \| `exit-case` (§ SLA response model) |
|
|
295
|
-
| Target | yes | `—` for `notify-only`; the **task name** for `start-task` (the task lives in the breached stage); the stage name for `enter-stage`; the exit row it produces for `exit-stage` / `exit-case` |
|
|
296
|
-
| Interrupting | yes | `—` for `notify-only` and for every `start-task` (it is a task-entry rule, and a task entry interrupts nothing); otherwise `Yes`/`No`, matching the `Interrupting` cell of the stage-entry row it produces. `start-task` is never `Yes` or `No`. |
|
|
297
|
-
| Rationale | yes | why this response fits the source |
|
|
298
|
-
|
|
299
|
-
**Closure both ways (blocking):** every non-`notify-only` row has its matching rule elsewhere in the SDD (an `sla-status-change` **task-entry** row for `start-task`, an `sla-status-change` **stage-entry** row for `enter-stage`, a stage-exit row, or a §1.4a case-exit row), and every `sla-status-change` entry row in the SDD — task or stage scope — has a row here. A mismatch between this map's `Interrupting` cell and the produced entry row's `Interrupting` cell is a blocking error.
|
|
300
|
-
|
|
301
|
-
**Default:** no stated response → both statuses `notify-only`, `Target` and `Interrupting` `—`. Never invent a stage, task, or routing change to fill this table.
|
|
302
|
-
|
|
303
|
-
### 1.3 Triggers
|
|
304
|
-
|
|
305
|
-
≥ 1 trigger required. One row per triggering event. Number triggers sequentially starting at **T02** (T01 reserved for the case file). The T-number is the reference key used by Case Variables rows whose value comes from this trigger's payload (§1.5).
|
|
306
|
-
|
|
307
|
-
| Field | Required? | Value |
|
|
308
|
-
|---|---|---|
|
|
309
|
-
| T# | yes | `T<N>` — sequential, starts at `T02` |
|
|
310
|
-
| Trigger Type | yes | `Manual` / `Intsvc.TimerTrigger` / `Intsvc.EventTrigger` (`Manual` is author shorthand — see note) |
|
|
311
|
-
| Source | conditional | Connector or system for `Intsvc.EventTrigger`; schedule expression for `Intsvc.TimerTrigger`; `Manual` literal for `Manual` |
|
|
312
|
-
| Configuration | conditional | User-stated intent only — see Configuration rules below. `Intsvc.EventTrigger` MUST have a concrete operation phrase. |
|
|
313
|
-
|
|
314
|
-
> **`Manual` is not a `serviceType`.** The on-disk serviceType enum (`data.inputs.serviceType`) is `None` / `Intsvc.EventTrigger` / `timer` — the SDD's `Intsvc.TimerTrigger` author token maps to on-disk `serviceType: "timer"`. A manual trigger carries **no** `serviceType` in `caseplan.json` (absence = manual — see [`plugins/triggers/manual/impl-json.md`](plugins/triggers/manual/impl-json.md)). Author `Manual` in the SDD; never emit `serviceType: "Manual"`.
|
|
315
|
-
|
|
316
|
-
**Configuration cell — what to write (user intent only, business terms):**
|
|
317
|
-
|
|
318
|
-
| Trigger type | Write |
|
|
319
|
-
|---|---|
|
|
320
|
-
| Event | The operation in business terms (`Calendar created`, `Email received`, `Record created`). For tenant case-entity / business data-object starts, preserve the object name in Source (`expense_requests`) and write the business event in Configuration (`Record created`). Append a filter clause when the user wants filtering (`Email received in Inbox; filter: subject contains "URGENT"`). Append a required event-param ONLY when the user supplies it (`Email received in folder "<folder name>"`). |
|
|
321
|
-
| Timer | Cycle or duration (`every 24 hours`, `daily at 09:00 UTC`). |
|
|
322
|
-
| Manual | `N/A` or omit. |
|
|
323
|
-
|
|
324
|
-
**Forbidden in Configuration** (skill resolves these at planning time — not author surface):
|
|
325
|
-
|
|
326
|
-
- CLI enum values like `CALENDAR_CREATED`, `createdRecord`.
|
|
327
|
-
- Default modes (`polling` vs `webhook`).
|
|
328
|
-
- Meta notes like `No required event parameters` or `No user filter` (absence IS the default).
|
|
329
|
-
- Connector activity slug, HTTP method, spec-discovered detail.
|
|
330
|
-
|
|
331
|
-
> Variable mapping (which trigger payload field populates which case variable) is declared in **§1.5 Case Variables** via the `sourceTriggers` / `sourceFields` columns — NOT in this table. The Triggers table only identifies and configures each trigger; payload extraction is owned by Case Variables.
|
|
332
|
-
|
|
333
|
-
> **Tenant object starts are not Manual.** If the user says a case starts when a tenant case-entity / data-object record is created, record an `Intsvc.EventTrigger` row with the object name as Source. Missing tenant provisioning, absent local registry data, or unresolved connection details become an unresolved event trigger / placeholder later; they are never a reason to change the SDD trigger type to `Manual`.
|
|
334
|
-
|
|
335
|
-
Unresolved `Intsvc.EventTrigger` resolution (`connectionId` / `activityTypeId` missing) → `high`-severity review item.
|
|
336
|
-
|
|
337
|
-
### 1.3a Trigger Filter (conditional)
|
|
338
|
-
|
|
339
|
-
Renders ONLY when ≥1 trigger declares a filter. AND/OR tree.
|
|
340
|
-
|
|
341
|
-
Operators (case-sensitive PascalCase): `Equals`, `NotEquals`, `Contains`, `NotContains`, `StartsWith`, `EndsWith`, `GreaterThan`, `GreaterThanOrEqual`, `LessThan`, `LessThanOrEqual`, `In`, `NotIn`, `IsNull`, `IsNotNull`.
|
|
342
|
-
|
|
343
|
-
| Field | Operator | Value | Literal? |
|
|
344
|
-
|---|---|---|---|
|
|
345
|
-
| `<payload field>` | `<operator>` | `<value>` | `Yes` / `No` |
|
|
346
|
-
|
|
347
|
-
Nested `{op, clauses}` groups flatten in the rendered table. Avoid `Literal: No` for unverified runtime expressions — it forces Phase 1 into JMESPath fallback (lossy). Prefer literal values or open a review item.
|
|
348
|
-
|
|
349
|
-
### 1.4 Case Completion Conditions
|
|
350
|
-
|
|
351
|
-
≥ 1 row required. `Marks Case Complete: Yes`.
|
|
352
|
-
|
|
353
|
-
| WHEN | IF | Marks Case Complete | Exit Type | Display Name |
|
|
354
|
-
|---|---|---|---|---|
|
|
355
|
-
| `required-stages-completed` / `wait-for-connector` | optional `conditionExpression` | `Yes` | `exit-only` | optional |
|
|
356
|
-
|
|
357
|
-
> **Display Name** (optional, every condition table — entry, exit, task-entry, case-exit): human-readable label. Carry the author's value verbatim; leave blank / `—` to let the skill default it: entry / task-entry → `Entry Rule {N}`; stage-exit / case-exit → `Complete Rule {N}` (Marks Complete `Yes`) / `Exit Rule {N}` (`No`). `N` = 1-based index within the same label kind in the container. Never invent a label when the cell is blank.
|
|
358
|
-
|
|
359
|
-
**Allowed WHEN:** `required-stages-completed`, `wait-for-connector`.
|
|
360
|
-
**Forbidden WHEN:** `selected-stage-completed`, `selected-stage-exited` (sdd-template Key Rule 4 — `Yes` + `selected-stage-*` is a schema-pairing error → block Approve).
|
|
361
|
-
|
|
362
|
-
### 1.4a Case Exit Conditions (alternate disposition)
|
|
363
|
-
|
|
364
|
-
Optional. `Marks Case Complete: No`. Used for secondary-stage terminals (Withdrawn / Rejected / Cancelled).
|
|
365
|
-
|
|
366
|
-
| WHEN | IF | Marks Case Complete | Exit Type | Display Name |
|
|
367
|
-
|---|---|---|---|---|
|
|
368
|
-
| `selected-stage-completed("<Stage Name>")` / `selected-stage-exited("<Stage Name>")` / `wait-for-connector` | optional | `No` | `exit-only` / `wait-for-user` | optional |
|
|
369
|
-
|
|
370
|
-
**When the case has ≥ 1 secondary stage AND Section 1.4a is empty** → emit a `high`-severity review item (`Alt-disposition exits missing`). The case cannot exit non-happy paths cleanly.
|
|
371
|
-
|
|
372
|
-
### 1.5 Case Variables
|
|
373
|
-
|
|
374
|
-
**What goes in §1.5 (the declare-vs-xref decision — apply per candidate value):** ONLY (a) `In` / `Out` arguments, (b) trigger-payload `Variable`s (`sourceTriggers` + `sourceFields`), and (c) case-level state read by a condition (`IF`) or consumed in **≥ 2 places**. **An input that is just one upstream task's output is NOT a §1.5 variable** — reference it directly (whole-value `<- "Stage"."Task".out`, or in-expression `vars.$xref('Stage','Task','out')`); the emitting task self-declares the output and is its own producer (see [§ Variable lineage closure → Task-output direct reference](#variable-lineage-closure) and [§ Resolved-resource I/O completeness → xref carve-out](#resolved-resource-io-completeness)). Minting a row to relay one task's output into one downstream consumer is the **case-var relay anti-pattern** — declare a row for an output only to rename it, set a custom `Default` / `Type` / `Description`, or expose it as case-level state read in multiple places.
|
|
375
|
-
|
|
376
|
-
A variable used anywhere in the plan that meets the test above appears in this table. Authoring is **declarative** — the row's `Category` + `sourceTriggers` + `sourceFields` columns drive build-time classification. Inference from prose or other columns is no longer supported.
|
|
377
|
-
|
|
378
|
-
| Column | Required? | Notes |
|
|
379
|
-
|---|---|---|
|
|
380
|
-
| Name | yes | camelCase, no role suffix |
|
|
381
|
-
| Category | yes | `In` / `Out` / `Variable` — NEVER `—`. Drives the [`global-vars` plugin's](plugins/variables/global-vars/impl-json.md) pattern shape. |
|
|
382
|
-
| Type | yes | Platform type enum (see [case-schema.md](case-schema.md)): `string`, `integer`, `float`, `double`, `boolean`, `datetime`, `date`, `jsonSchema`, `file`. **`file`** is a JobAttachment record (`{ID, FullName, MimeType, Metadata}`) — see `[sdd-template-examples.md](../assets/templates/sdd-template-examples.md)` Use Cases 9–11 for caller-pre-upload, connector-download, and multipart-send patterns. File-typed In-args carry an implicit caller obligation (see §1.5 In semantics + Approve summary reminder). Use `string` for JSON-shaped values; never emit `json` or `jsonSchema`. |
|
|
383
|
-
| sourceTriggers | conditional | `Variable`: single `T<N>` or comma-separated CSV (`T02, T03`) when multiple triggers feed the same slot. `In`: optional single `T<N>` selecting the bound trigger (blank = primary trigger T02; never a CSV). Empty for pure state and `Out`. |
|
|
384
|
-
| sourceFields | conditional | `Variable` only: single bare payload path when one trigger; **keyed format** `T<N>: <path>; T<M>: <path>` when `sourceTriggers` is CSV. Empty on `In` rows even when `sourceTriggers` names a trigger (`In` selects a trigger, extracts no field). Dot-paths only — no array indexing in v1. |
|
|
385
|
-
| Default | optional | Concrete default or empty. |
|
|
386
|
-
| Description | yes | One-line meaning. |
|
|
387
|
-
|
|
388
|
-
**Category semantics** (canonical definition in [`global-vars/impl-json.md`](plugins/variables/global-vars/impl-json.md)):
|
|
389
|
-
|
|
390
|
-
- **`In`** — caller-supplied case argument (manual trigger via API) OR `Default`-initialized (event / timer triggers, which have no caller). `sourceTriggers`: blank → binds the primary trigger (T02; default); a single `T<N>` → binds that trigger — never a CSV (one trigger only). `sourceFields` MUST stay empty — an In-arg selects a trigger but does not extract a payload field; for payload-extraction use `Variable` + `sourceTriggers` + `sourceFields` (see Use Case 2 in [sdd-template-examples.md](../assets/templates/sdd-template-examples.md)). **`In` of `Type: file`** — programmatic caller must pre-create a JobAttachment (`POST /odata/Attachments` then `PUT` bytes) and pass `{ID, FullName, MimeType, Metadata}` plus `StartProcessDto.Attachments[]`. Maestro Studio Web's "Start case" dialog does this automatically; non-Studio callers do it themselves. Surface this obligation in the Approve summary whenever any file-In-arg exists; see §Finalization step 11.
|
|
391
|
-
- **`Out`** — case argument returned to caller. Value comes from a producer (a task's Outputs row that targets this Name via `-> {name}` or `{name} = {expr}`) OR from `Default` when no producer fires. `sourceTriggers` MUST be empty (direction mismatch: trigger → case is forbidden for `Out`).
|
|
392
|
-
- **`Variable`** — case-internal state. Populated by one trigger's payload (`T<N>` + single path), multiple triggers sharing the same slot (CSV + keyed `T<N>: <path>` format), a task's Outputs row, or `Default` only.
|
|
393
|
-
|
|
394
|
-
**Config-as-`In` pattern.** Business rules the case needs at runtime — priority bands, approval thresholds, exception taxonomy, payment controls — can be carried as a single `In` variable of `Type: string` whose `Default` is a JSON object, overridable at case start and consumed by agents (e.g. `businessRulesJson`). This gives business logic a first-class, replicable home in the SDD instead of scattering it across prose. Use `string` for the JSON-shaped value (never `json`). For a genuinely structured payload that the FE picker must navigate, use `Type: jsonSchema` and carry its schema in the variable's `body` — a `jsonSchema`/`file` variable without a `body` cannot have its sub-fields picked.
|
|
395
|
-
|
|
396
|
-
**`sourceFields` notation:**
|
|
397
|
-
|
|
398
|
-
- **Single-trigger:** bare path. `response.subject`, `response.user.id`, `Error.code`.
|
|
399
|
-
- **Multi-trigger:** keyed `T<N>: <path>; T<M>: <path>` — every T-number listed in `sourceTriggers` MUST have a matching keyed entry. Mismatch = Phase 2 validator error. Example: `T02: response.user; T03: response.initiator`.
|
|
400
|
-
|
|
401
|
-
**Out-arg producer rule.** Every `Out` row MUST have at least one of:
|
|
402
|
-
|
|
403
|
-
1. A `Default` value, OR
|
|
404
|
-
2. A task whose Outputs table has a row that targets this Out-arg's Name via `-> {name}` or `{name} = {expr}`.
|
|
405
|
-
|
|
406
|
-
If neither, the io-binding validator surfaces the misalignment at end of Phase 3. Phase 0's Approve gate pre-checks this — see §Variable lineage closure.
|
|
407
|
-
|
|
408
|
-
**`->` vs `=` operators in Outputs rows** (used by every task's Outputs table — defined in §Task content rules):
|
|
409
|
-
|
|
410
|
-
| Operator | Meaning | `Field` column |
|
|
411
|
-
|---|---|---|
|
|
412
|
-
| `-> caseVar` | Extract: value at the runtime path in `Field` is written to `vars.<caseVar>`. The skill emits `source: "=<Field>"` verbatim — no envelope inference. | Non-empty full runtime path (`response.status`, `Action`, `Error.code`). |
|
|
413
|
-
| `caseVar = <expr>` | Set / compute / copy: case variable receives the expression result at task completion. Expression may be a literal (`"InReview"`, `5`), computed (`=js:(vars.count + 1)`), or copy (`=vars.X.Y`). | `—` |
|
|
414
|
-
|
|
415
|
-
For worked patterns by Category and operator (single-trigger, multi-trigger, `In` / `Out` / `Variable`, sub-field consumer, Out-arg with Default fallback), see [`sdd-template-examples.md`](../assets/templates/sdd-template-examples.md).
|
|
416
|
-
|
|
417
|
-
Lineage closure rules in §Variable lineage closure.
|
|
418
|
-
|
|
419
|
-
## Stage content rules
|
|
420
|
-
|
|
421
|
-
Defines what each stage in Section 2 must contain. Same rules apply to primary and secondary stages — both are `Stage` nodes; a secondary stage carries `data.stageType: "secondary"` — unless noted.
|
|
422
|
-
|
|
423
|
-
### Stage heading
|
|
424
|
-
|
|
425
|
-
- Primary: `` ### Stage {N}: {Stage Name} (`{stage_id}`) `` — N is 1-based sequence number
|
|
426
|
-
- Secondary: `` ### Secondary Stage: {Stage Name} (`{stage_id}`) `` — renders a `Stage` node + `Stage Kind: secondary`
|
|
427
|
-
|
|
428
|
-
The trailing `` `{stage_id}` `` (e.g., `` `stage-intake` ``) MUST appear so readers can grep cross-references. Anywhere a stage is referenced by name in a table cell (`Selected Stage`, `Required Stages`, case-exit selected stage), append the stage id in code-formatted parens.
|
|
429
|
-
|
|
430
|
-
### Stage fields (per stage)
|
|
431
|
-
|
|
432
|
-
| Field | Required? | Value |
|
|
433
|
-
|---|---|---|
|
|
434
|
-
| Type | yes | `Stage` |
|
|
435
|
-
| Stage Kind | optional | `primary` (default — omit the line) / `secondary` (emits `data.stageType: "secondary"`; replaces the old `ExceptionStage` type) |
|
|
436
|
-
| Design Rationale | yes | One concrete sentence explaining why this is primary/secondary and why its entry/exit behavior fits the requirement. For global-event lanes, name the event and state that one interrupting entry replaces per-stage duplication. For an SLA-entered lane, name the SLA, the chosen response, and why it interrupts or does not. |
|
|
437
|
-
| Description | yes (primary) / optional (secondary) | One prose sentence |
|
|
438
|
-
| Required for case completion | yes | `Yes` (primary, default) / `No` (secondary stages always `No`) |
|
|
439
|
-
| Interrupting | secondary stages only | `Yes` — secondary stages are interrupting lanes. `No` only on an `sla-status-change` parallel-oversight row (§ mental model carve-out). Otherwise, if the work should not interrupt, model it as a regular stage/parallel path or an `adhoc` task. |
|
|
440
|
-
| Stage SLA | yes when stage has SLA | Default duration + `time-based` or `condition-based` + `SLA Title` (non-empty, stage-unique, no `:`), plus conditional-rule and escalation tables |
|
|
441
|
-
|
|
442
|
-
When the source says every primary phase/stage has an SLA target, every named primary stage MUST render its own `#### Stage SLA` block. Use deterministic titles when the user did not supply names: `**SLA Title:** <Stage Name> SLA`, at-risk display name `<Stage Name> SLA at risk`, and breach display name `<Stage Name> SLA breached`. Any `sla-status-change("<Stage Name>",...)` row for that stage must use those exact strings; a title declared on another stage or only in prose does not resolve.
|
|
443
|
-
|
|
444
|
-
### Stage Entry Conditions table
|
|
445
|
-
|
|
446
|
-
≥ 1 row required.
|
|
447
|
-
|
|
448
|
-
| WHEN | IF | Interrupting | Display Name |
|
|
449
|
-
|---|---|---|---|
|
|
450
|
-
| `case-entered` (root only) / `selected-stage-completed("<Stage>")` / `selected-stage-exited("<Stage>")` / `wait-for-connector` / `user-selected-stage` / `sla-status-change("<SLA target>","<SLA Title>")` (breach) / `sla-status-change("<SLA target>","<SLA Title>","<At-Risk Escalation Display Name>")` (at-risk) | optional `conditionExpression` | `Yes` for every secondary-stage entry row, except an `sla-status-change` parallel-oversight row (`No`); `No` for regular-stage entry | optional |
|
|
451
|
-
|
|
452
|
-
`sla-status-change` args are specified in [sdd-template.md](../assets/templates/sdd-template.md) § Stage Entry Conditions; closure is enforced by § Logical integrity step 6.
|
|
453
|
-
|
|
454
|
-
`user-selected-stage` is valid only when another stage has a `wait-for-user` exit that exposes this target to the user. It is not the rule for deterministic rejection, approval, send-back, or SLA routing. Use decision facts plus guarded stage entry/exit rows for deterministic routes.
|
|
455
|
-
|
|
456
|
-
### Stage Completion Conditions table (`Marks Stage Complete: Yes`)
|
|
457
|
-
|
|
458
|
-
Completion (`Yes`) rows and the §Stage Exit Conditions (`No`) rows below render **together** as the single **Stage Exit Conditions** table in `sdd.md` (per [sdd-template.md](../assets/templates/sdd-template.md)). Shared columns, in order: `WHEN | IF | Exit Type | Marks Stage Complete | Display Name`. ≥ 1 completion row required. **Regular stage-to-stage routing is NOT carried here** — each destination stage declares the link via its own Entry Condition (`selected-stage-completed("This Stage")` / `selected-stage-exited("This Stage")`), so one stage can fan out to N stages.
|
|
459
|
-
|
|
460
|
-
> **Carve-out — routing INTO a decision/signal-routed exception lane IS carried here.** This is the one case where the origin stage carries the route: add a **gated diverting exit row** (`Marks Stage Complete: No`, WHEN `selected-tasks-completed("<decider task>")`, `IF` on the decision/signal, `Exit Type: exit-only`, `exitToStageId` → the secondary stage) AND gate this stage's completion row with the **inverse `IF`** so completion and divert are mutually exclusive. Without the diverting exit, the decision path either dual-fires (ungated completion → both the next stage and the lane enter) or deadlocks (gated completion with no alternative exit). See [§ Logical integrity step 5](#logical-integrity--stage-graph) and the worked example below.
|
|
461
|
-
|
|
462
|
-
| WHEN | IF | Exit Type | Marks Stage Complete | Display Name |
|
|
463
|
-
|---|---|---|---|---|
|
|
464
|
-
| `required-tasks-completed` / `wait-for-connector` | optional | `exit-only` / `return-to-origin` | `Yes` | optional |
|
|
465
|
-
|
|
466
|
-
**Allowed WHEN:** `required-tasks-completed`, `wait-for-connector`.
|
|
467
|
-
**Forbidden WHEN:** `selected-tasks-completed` (Key Rule 4 — `Yes` + `selected-tasks-completed` is a schema-pairing error → block Approve).
|
|
468
|
-
|
|
469
|
-
### Stage Exit Conditions table (`Marks Stage Complete: No`)
|
|
470
|
-
|
|
471
|
-
Optional. Used for early hand-offs / routing. Same columns and order as the completion rows above — one rendered table. The destination of a routing exit is set by the destination stage's Entry Condition, not here.
|
|
472
|
-
|
|
473
|
-
| WHEN | IF | Exit Type | Marks Stage Complete | Display Name |
|
|
474
|
-
|---|---|---|---|---|
|
|
475
|
-
| `selected-tasks-completed("<Task>")` / `wait-for-connector` | optional | `exit-only` / `wait-for-user` | `No` | optional |
|
|
476
|
-
|
|
477
|
-
`return-to-origin` is a completion exit, not a divergent exit: render it in the `Yes` table with `required-tasks-completed` (or `wait-for-connector`). Never generate `return-to-origin` + `No` + `selected-tasks-completed`.
|
|
478
|
-
|
|
479
|
-
### Stage conditional SLA rules table
|
|
480
|
-
|
|
481
|
-
Render when the Stage SLA type is `condition-based`. Each expression-keyed override targets this stage's `data.slaRules[]` and precedes its default row.
|
|
482
|
-
|
|
483
|
-
| Expression | SLA | Unit | Display Name |
|
|
484
|
-
|---|---|---|---|
|
|
485
|
-
| condition evaluated against case variables | positive count | `min` / `h` / `d` / `w` / `m` | non-empty, stage-unique title without `:` |
|
|
486
|
-
|
|
487
|
-
### Stage SLA escalation table
|
|
488
|
-
|
|
489
|
-
Always rendered when Stage SLA is set. Concrete cells in both rows; never `—`.
|
|
490
|
-
|
|
491
|
-
| Threshold | Trigger | Recipient | Display Name |
|
|
492
|
-
|---|---|---|---|
|
|
493
|
-
| At-risk | `<pct>%` of stage SLA (defaults below) | `UserGroup: <owner-group>` / `User: <name>` | Non-empty stage-unique escalation title, no `:` |
|
|
494
|
-
| Breached | 100% of stage SLA | Leadership group; Compliance for regulation-driven stages | Non-empty stage-unique escalation title, no `:` |
|
|
495
|
-
|
|
496
|
-
**Defaults** when user did not name them (mirror §1.2):
|
|
497
|
-
|
|
498
|
-
- 75% at-risk for SLA ≤ 3d; 70% for 3-10d; 80% for >10d.
|
|
499
|
-
- At-risk recipient = stage owner persona's user group; breached = leadership tier (Compliance for regulation-driven stages).
|
|
500
|
-
|
|
501
|
-
Defaults record in source ledger with reason `default applied — user did not name recipient`.
|
|
502
|
-
|
|
503
|
-
### Stage Task Summary table
|
|
504
|
-
|
|
505
|
-
In plan order. ≥ 1 task per stage.
|
|
506
|
-
|
|
507
|
-
| Column | Value |
|
|
508
|
-
|---|---|
|
|
509
|
-
| `#` | 1-based row index |
|
|
510
|
-
| `Task ID` | `` `{source_task_id}` `` (e.g., `` `t11` ``) — code-formatted, greppable |
|
|
511
|
-
| `Task` | Task display name |
|
|
512
|
-
| `Type` | One of the 9-value enum (Rule 16) |
|
|
513
|
-
| `Owner` | Persona name OR `system` |
|
|
514
|
-
|
|
515
|
-
Required-Tasks cells in completion / exit conditions use the bare task ids (`t10, t12, t13`) so readers grep across the document.
|
|
516
|
-
|
|
517
|
-
### Deterministic stage completion (conditional-branch & re-entered stages)
|
|
518
|
-
|
|
519
|
-
When a stage's real work is split across **mutually-exclusive conditional tasks** (e.g. one `action` per reason code, each entered via `current-stage-entered` + an `IF`), those tasks MUST be `Required: No` — only one runs per case, so none can be the stage's required completer (a `required-tasks-completed` exit over only-conditional tasks is the §Finalization step 17 footgun). Add a **single required convergence task** (typically an `api-workflow` that persists the resolution) whose entry condition is a DNF OR covering every path:
|
|
520
|
-
|
|
521
|
-
| WHEN | IF | Display Name |
|
|
522
|
-
|---|---|---|
|
|
523
|
-
| `current-stage-entered` | `=js:(<none of the conditional guards hold>)` | No specialist branch |
|
|
524
|
-
| `selected-tasks-completed("<Conditional Task A>")` | — | — |
|
|
525
|
-
| `selected-tasks-completed("<Conditional Task B>")` | — | — |
|
|
526
|
-
|
|
527
|
-
The convergence task is the stage's only `Required: Yes` task, so `required-tasks-completed` resolves deterministically whichever branch ran — including the no-branch case. (Worked example from a shipping SDD: an Exception-Resolution stage with per-reason-code action tasks + a `Persist exception resolution` api-workflow convergence task carrying exactly the three rows above.)
|
|
528
|
-
|
|
529
|
-
**Re-entry safety (`return-to-origin` loops).** A task in a stage that an exception lane returns to via `return-to-origin` re-runs on re-entry unless flagged `Run Only Once: Yes`. Classify the loop before setting that flag:
|
|
530
|
-
|
|
531
|
-
| Re-entry type | Signal | `Run Only Once` default | State handling |
|
|
532
|
-
|---|---|---|---|
|
|
533
|
-
| New attempt / resubmission | corrected, revised, fixed, resubmitted, retry, re-review, revalidate, appeal, counter-proposal | `No` for request/review/decision/validation producer tasks that must produce a fresh result | Reset live routing variables to a neutral value before the attempt, or write results to attempt-scoped/latest variables |
|
|
534
|
-
| Re-evaluate existing fact | exception lane changes a fact and returns only so the origin can continue routing | `Yes` only on producer tasks whose prior output must be preserved | Preserve the fact deliberately and document which downstream rule re-reads it |
|
|
535
|
-
| Optional repeat work | user may repeat work, but required flow does not depend on it | Usually `adhoc` or non-required | Do not let required flow depend on the optional task |
|
|
536
|
-
|
|
537
|
-
If the requirement says corrected work is resubmitted through a review or decision, the review/request/decision producer tasks must run again on stage re-entry. Do not mark all of them `Run Only Once: Yes`. A stale terminal value such as `SendBack`, `Rejected`, or `NeedsCorrection` must not remain live at re-entry unless the design intentionally re-evaluates that existing fact.
|
|
538
|
-
|
|
539
|
-
## Task content rules
|
|
540
|
-
|
|
541
|
-
Defines per-task detail blocks. Every task opens with an **Entry Condition** block. Additional blocks depend on task type.
|
|
542
|
-
|
|
543
|
-
Every task also declares **Design Rationale**: one concrete sentence explaining why the selected task type fits the actor/work and why the selected activation mode fits the timing. For sequential tasks, name the ordering/dependency evidence; for parallel tasks, state that the work is independent. This rationale is persisted into the matching task and task-entry T-entries in `tasks.md`.
|
|
544
|
-
|
|
545
|
-
### Entry Condition block (every task)
|
|
546
|
-
|
|
547
|
-
```
|
|
548
|
-
**Entry Condition**
|
|
549
|
-
|
|
550
|
-
| WHEN | IF | Display Name |
|
|
551
|
-
|---|---|---|
|
|
552
|
-
| {rule} | {conditionExpression or "—"} | optional |
|
|
553
|
-
```
|
|
554
|
-
|
|
555
|
-
| Rule | When to use |
|
|
556
|
-
|---|---|
|
|
557
|
-
| `current-stage-entered` | Ungated stage-started task that should start when its stage is entered. Do not add this row to event-triggered (`wait-for-connector`), manually triggered (`adhoc`), or sequential (`runs-sequentially`) tasks. When a task intentionally has multiple entry rows and one is stage-started, render this row first. |
|
|
558
|
-
| `selected-tasks-completed("<Task>")` | Explicit sibling gate, fan-in, branch convergence, or conditional handoff where this task should start only after named non-adhoc sibling task(s) complete. Multiple tasks comma-separated inside the parens. Do not use it merely to express the next step in a simple top-to-bottom task list; use `runs-sequentially` for that UI mode. Never select a task whose entry rule is `adhoc`, and never select a task from another stage. |
|
|
559
|
-
| `wait-for-connector` | Async connector callback. Pair with `conditionExpression` to gate on **case state** (`vars.X`); the event payload is not accessible (no `event` namespace). **In-rule extract-then-gate (extract + same-rule `=js:vars.caseVar` gate) does NOT work at runtime** — case-backend evaluates the gate before the extract populates the case var. To condition on payload content: extract `response.field -> caseVar` on the connector rule and place the case-state gate on a DOWNSTREAM stage-entry / task-entry condition. |
|
|
560
|
-
| `sla-status-change("<SLA target>","<SLA Title>")` (breach) / `sla-status-change("<SLA target>","<SLA Title>","<At-Risk Escalation Display Name>")` (at-risk) | The **`start-task` SLA response**: this task fires when the referenced SLA changes status. Reference the containing stage's own SLA for a stage-scoped response, or `"root"` for a case-scoped one. This is the canonical `start-task` shape — the task activates on the SLA event directly, so the stage is not re-entered and its other tasks do not re-run. Never author the equivalent as a stage-entry row. See [sla-response-shapes.md](sla-response-shapes.md). |
|
|
561
|
-
| `adhoc` | Manual fire from the case app. Optional gating expression. Task-entry only; set `Required: No`. It is an activation mode, not a task type. |
|
|
562
|
-
| `runs-sequentially` | Tasks that should run top-to-bottom in their stage declaration order. The frontend toggle writes this as the task's only entry rule; it is not represented by a lane. |
|
|
563
|
-
|
|
564
|
-
Multiple entry conditions render as multiple rows (DNF outer-OR). When `current-stage-entered` is among them, render it first.
|
|
565
|
-
|
|
566
|
-
**Sequential normalization rule.** When the requirement states order/dependency (`then`, `after`, `before`, `in order`, an upstream output prerequisite) for a contiguous set of tasks in one stage, author **each task in that ordered task-set run** with exactly one `runs-sequentially` Entry Condition row. This includes the first task set: do not write `current-stage-entered` for the first item and `selected-tasks-completed("<previous>")` for later items. A strict chain uses consecutive single-task sets; independent siblings after the same predecessor share the same later task set and also use `runs-sequentially`. A missing data binding does not erase stated ordering. Use parallel `current-stage-entered` tasks only when the work is explicitly independent and starts with the stage; use `selected-tasks-completed` for fan-in/non-immediate dependencies. Break an ordered run at tasks that are `adhoc`, condition-gated, intentionally dependent on non-immediate sibling task(s), or whose **entry rule** is `wait-for-connector`. A task merely **typed** `wait-for-connector` does not break the run: when it must arm only after a predecessor creates the obligation, it stays in the ordered task set with `runs-sequentially` and keeps its connector event in its own `data`.
|
|
567
|
-
|
|
568
|
-
**Parallel-after-predecessor rule.** When two or more independent tasks start after the same immediate predecessor task or predecessor task set, put them in the same next task set, mark each `Activation Mode: parallel-after-predecessor`, and give each the `runs-sequentially` entry rule. Do not author duplicate event-driven task entries with identical `selected-tasks-completed("<previous>")` rules. Use `selected-tasks-completed` only for true fan-in, branch convergence, condition-result routing, non-immediate dependencies, or explicit authored gates. For race patterns such as payment confirmation vs payment deadline, start the listener and clock while the payment obligation is pending, then gate downstream success work on the confirmation fact rather than on completion of the whole parallel set.
|
|
569
|
-
|
|
570
|
-
### `action` task — required cells
|
|
571
|
-
|
|
572
|
-
| Cell | Value |
|
|
573
|
-
|---|---|
|
|
574
|
-
| HITL Implementation | `Action App: <deploymentTitle>`, where `<deploymentTitle>` is the concrete intended app name. Use the selected registry entry's canonical title when resolved; otherwise retain the user-requested title. NEVER `<UNRESOLVED>`, never paraphrase, never `—`. |
|
|
575
|
-
| Action App ID | Concrete deployment id from `action-apps-index.json`, or `<UNRESOLVED>` when no live app was selected |
|
|
576
|
-
| Deployment Folder | `deploymentFolder.fullyQualifiedName`, or `<UNRESOLVED>` when Action App ID is unresolved |
|
|
577
|
-
| Recipient | Typed prefix (see table below). NEVER a bare string. |
|
|
578
|
-
| Priority | `Low` / `Medium` / `High` / `Critical` |
|
|
579
|
-
| Task Title | One-line user-visible question/instruction (REQUIRED — Action Center displays it) |
|
|
580
|
-
| Labels | Comma-separated when set; otherwise `—` |
|
|
581
|
-
| Run Only Once | `Yes` / `No` |
|
|
582
|
-
| Required | `Yes` / `No` |
|
|
583
|
-
| Input Schema | Table: `Field | Type | Binding | Required` |
|
|
584
|
-
| Output Schema | Table: `Field | Type | Binding` (arrow form `-> =vars.<id>`) |
|
|
585
|
-
| Buttons | Table only when `is_decision: Yes`: `Button | Maps To | Behavior` |
|
|
586
|
-
|
|
587
|
-
**HITL Implementation:** the Action App title is the portable Phase 0 → Phase 1 lookup name. Establish it before registry lookup and preserve it when the app is unresolved so a different machine can retry discovery without `tasks/registry-resolved.json`. The action plugin still requires a deployed Action App from `action-apps-index.json` to build a resolved task; when no matching app exists, keep the title, set Action App ID + Deployment Folder to `<UNRESOLVED>`, emit a `high` review item, and fall back to a Rule-8 placeholder. Action Apps are not created inline.
|
|
588
|
-
|
|
589
|
-
**Input/Output Schema fidelity.** The Input Schema and Output Schema `Field` cells MUST be a subset of the resolved app's actual schema (from `uip maestro case tasks describe --type action --id <actionAppId>`, fetched at Resolve and persisted in `tasks/registry-resolved.json`). Never author a field the deployed app does not expose — it cannot bind (the io-binding plugin has no `data.inputs[]` slot to write into). A field the user described but the app lacks → Ask (deploy a task-specific app / drop the field / placeholder), never silently author it. **Code-switched app (sanctioned — do NOT flag):** reusing ONE deployed app across many `action` tasks is correct and expected when each task carries a **distinct `actionType`** dispatch value and its declared fields are a **subset of the app's schema**. This is the normalized human-decision-app pattern — a single app whose code-behind switches on `actionType` and renders the right form; a full case routes every human decision through it (the working aged-invoice case uses one app across all 7 of its action tasks). It is the generic-substitute anti-pattern ONLY when tasks reuse the app **without** a distinct `actionType`, or declare a field the app does not expose (won't bind) — see §Architect's lens `rev_substitute_app` and §Finalization step 16.
|
|
590
|
-
|
|
591
|
-
**Recipient encoding** (typed prefix is the only allowed format):
|
|
592
|
-
|
|
593
|
-
| Prefix | Resolved as |
|
|
594
|
-
|---|---|
|
|
595
|
-
| `Email: x@y.com` | `{scope: "User", target: <email>, value: <email>}` |
|
|
596
|
-
| `User: <uuid>` | Resolved tenant user UUID |
|
|
597
|
-
| `UserGroup: <uuid>` | Resolved tenant group UUID |
|
|
598
|
-
| `Role: <name>` | Persona / role name — Phase 1 maps role → group at build time |
|
|
599
|
-
| `Expression: =vars.<id>` | Runtime expression bound at execution |
|
|
600
|
-
|
|
601
|
-
No recipient and no role/email known → drop the cell, emit a `high`-severity review item; Phase 1 will prompt.
|
|
602
|
-
|
|
603
|
-
**Decision flag.** Set `is_decision: Yes` only when the task forks the case path on outcome. `Yes` requires `actions[]` with ≥ 2 buttons; single-button "decisions" are validation errors. Non-decision actions (`Acknowledge`, `Confirm Receipt`) keep `is_decision: No` and render without a Buttons table.
|
|
604
|
-
|
|
605
|
-
**Buttons table** (decision actions only):
|
|
606
|
-
|
|
607
|
-
| Button | Maps To | Behavior |
|
|
608
|
-
|---|---|---|
|
|
609
|
-
| `<label>` (e.g., `Approve`) | `<varName> = "<value>"` | One sentence describing what the button does |
|
|
610
|
-
|
|
611
|
-
`Maps To` LHS MUST reference a declared case variable from §1.5 (matching a row's `Name` cell) OR the conventional `taskOutcome` handle. NEVER an undeclared identifier.
|
|
612
|
-
|
|
613
|
-
### `wait-for-connector` / `execute-connector-activity` task — required cells
|
|
614
|
-
|
|
615
|
-
| Cell | Value | Source |
|
|
616
|
-
|---|---|---|
|
|
617
|
-
| Connector | Connector key (`salesforce`, `slack`) | IS catalog |
|
|
618
|
-
| Connection | Display name | IS connection cache |
|
|
619
|
-
| Connection ID | Concrete `connectionId` | IS connection cache |
|
|
620
|
-
| Activity Type ID | Concrete `activityTypeId` | IS activity/trigger typecache |
|
|
621
|
-
| Service Type | `serviceType` value | IS catalog |
|
|
622
|
-
| Auth Method | `defaultAuthenticationType` | IS catalog |
|
|
623
|
-
| Account / Endpoint | Connection account/endpoint identifier | IS connection cache |
|
|
624
|
-
| Operation / Trigger | Operation or trigger name | IS catalog |
|
|
625
|
-
| Operation Configuration | `essentialConfiguration` carry-through as `=jsonString:<json>` literal | IS activity/trigger typecache |
|
|
626
|
-
| Inputs | Table: `Field | Type | Binding` — `Field` MUST match IS activity schema verbatim; `Binding` per §Binding cell |
|
|
627
|
-
| Outputs | Table: `Field | Binding / Value` — see §Outputs cell operators |
|
|
628
|
-
|
|
629
|
-
**Entry condition.** A connector task that should start when its stage is entered declares `current-stage-entered` as its first entry row, exactly like any other ungated task; additional rules APPEND as further rows. The skill writes these via the task-entry-conditions plugin (Step 10) — there is no task-type auto-injection.
|
|
630
|
-
|
|
631
|
-
**Unresolved IDs.** Missing `connectionId` or `activityTypeId` → `high`-severity review item — Phase 1 cannot resolve the connector at build time without them.
|
|
632
|
-
|
|
633
|
-
### `wait-for-timer` task — required cells
|
|
634
|
-
|
|
635
|
-
| Cell | Value |
|
|
636
|
-
|---|---|
|
|
637
|
-
| Timer Type | `timeDuration` (relative) / `dateTime` (absolute) |
|
|
638
|
-
| Duration / Until | ISO-8601 duration (e.g., `P30D`) or ISO date-time |
|
|
639
|
-
| Business Calendar | Optional — name of business calendar; otherwise `—` |
|
|
640
|
-
|
|
641
|
-
No `<UNRESOLVED>` on Duration / Until — timer cannot fire without it. Block Approve.
|
|
642
|
-
|
|
643
|
-
### `case-management` task — required cells
|
|
644
|
-
|
|
645
|
-
| Cell | Value |
|
|
646
|
-
|---|---|
|
|
647
|
-
| Child Case | Concrete intended child-case resource `name`. Use the selected registry entry's canonical name when resolved; otherwise retain the user-requested name. NEVER `<UNRESOLVED>`. |
|
|
648
|
-
| Folder Path | Exact selected `folders[0].fullyQualifiedName`, or `<UNRESOLVED>` when Resource Identity is unresolved |
|
|
649
|
-
| Resource Identity | Selected `entityKey` from `caseManagement-index.json`, or `<UNRESOLVED>` when no live child case was selected |
|
|
650
|
-
| Child Case Identifier | Identifier prefix of the child case |
|
|
651
|
-
| Data Passed (parent → child) | Table: `Parent Variable | Child Variable` |
|
|
652
|
-
| Wait for Completion | `Yes` / `No` |
|
|
653
|
-
| Data Returned (child → parent) | Table: `Child Variable | Parent Variable` — render only when `Wait for Completion: Yes` |
|
|
654
|
-
|
|
655
|
-
`Child Case` is the portable Phase 0 → Phase 1 lookup name. Establish it before registry lookup and preserve it when unresolved; never substitute the parent task's display name. A missing live child case yields unresolved identity/folder fields + a `high` review item and remains placeholder-only.
|
|
656
|
-
|
|
657
|
-
### `process` / `agent` / `rpa` / `api-workflow` task — required cells
|
|
658
|
-
|
|
659
|
-
These four runnable types share a single render block. The SDD surfaces both portable resource intent and resolution state. `Resolved Resource` is always a concrete intended name; `Resource Identity` alone says whether Resolve selected a live resource. This keeps the document usable when Phase 0 and Phase 1 run on different machines and `tasks/registry-resolved.json` is not transferred.
|
|
660
|
-
|
|
661
|
-
| Cell | Required? | Value |
|
|
662
|
-
|---|---|---|
|
|
663
|
-
| Resolved Resource | yes | A concrete intended resource `name` (the `name`-binding default) — e.g. `AgedInvoiceMockIntegrationApi`, `InvoiceTriageAgent`. Use the selected registry entry's canonical name when resolved; otherwise retain the user-requested name. NEVER write `<UNRESOLVED>` in this cell. |
|
|
664
|
-
| Folder Path | yes | Resolved `folders[0].fullyQualifiedName` (the `folderPath`-binding default), or `<UNRESOLVED>` when `Resource Identity` is unresolved. A concrete value must be the exact resource folder, never a parent path. |
|
|
665
|
-
| Resource Identity | yes | The resolution-status cell. Write the resolved id (+version): `apiWorkflowId` / `agentId` / `processOrchestrationId`, or `<UNRESOLVED>` when no live resource was selected. Also carry it in `tasks/registry-resolved.json` when that optional cache exists. |
|
|
666
|
-
| Binding Sub-Type | yes | `resourceSubType` on the bindings: `Api` (api-workflow) / `Agent` (agent) / `ProcessOrchestration` (process) / `—` (rpa). Omitting it makes Studio Web report the resource as not found. |
|
|
667
|
-
| Dispatch / Operation | conditional | When the resource is a shared façade dispatched by a parameter (e.g. one mock-integration api selected by `requestSource`, one code-switched action app), name the selector + value (`requestSource = "RegisterCaseShell"`). `—` for single-purpose resources. Also appears as an Inputs row (literal binding). |
|
|
668
|
-
| Inputs | yes | Table: `Field | Type | Binding` — `Field` MUST match the runnable's declared In argument name verbatim; `Binding` per §Binding cell |
|
|
669
|
-
| Outputs | yes | Table: `Field | Binding / Value` — `Field` MUST match the runnable's declared Out argument name verbatim for `->` rows (or `—` for `=` rows); see §Outputs cell operators |
|
|
670
|
-
|
|
671
|
-
**Where the rest of the metadata lives.** Deep per-type runtime metadata that does NOT affect replication of the case plan (agent system prompt, RPA package version, api-workflow endpoint URL, process release tag) stays out of the SDD body — it is resolved during Phase 1 discovery ([planning.md](planning.md)) and persisted in `tasks/registry-resolved.json` under the task's resolution entry (per SKILL.md Rule 9 shape). The SDD carries the resource **name + folder + id + sub-type** (above). Phase 1 may reuse deeper metadata only after the cached type/name/folder/identity matches the current SDD per [planning.md § Phase 0 carryover](planning.md#step-2--locate-and-parse-the-design-document); otherwise it re-runs discovery from the SDD and replaces the stale entry. Mapping:
|
|
672
|
-
|
|
673
|
-
| Task type | Registry source | Identity field in `registry-resolved.json` |
|
|
674
|
-
|---|---|---|
|
|
675
|
-
| `process` | `processOrchestration-index.json` | `processOrchestrationId` |
|
|
676
|
-
| `agent` | `agent-index.json` | `agentId` (+ version) |
|
|
677
|
-
| `rpa` | `process-index.json` | `processOrchestrationId` for RPA processes |
|
|
678
|
-
| `api-workflow` | `api-index.json` | `apiWorkflowId` (+ endpoint) |
|
|
679
|
-
|
|
680
|
-
Unresolved registry identity → `high`-severity review item (§Review items). The SDD shows the runnable name + In/Out bindings; the identity flows through the audit trail.
|
|
681
|
-
|
|
682
|
-
**No task SLA.** Per [sdd-template.md](../assets/templates/sdd-template.md) Key Rule 1, SLA is supported on the case, on stages, and on `action` tasks ONLY. Do NOT emit SLA cells on `process`, `agent`, `rpa`, `api-workflow`, `wait-for-timer`, `wait-for-connector`, `execute-connector-activity`, or `case-management` tasks.
|
|
683
|
-
|
|
684
|
-
**Externally-hosted AI agents** (CrewAI, Salesforce Einstein, Databricks, LangChain, etc.) are NOT first-class. Model them as `api-workflow` (system-to-system) or `execute-connector-activity` when a connector exists. Never invent `external-agent`.
|
|
685
|
-
|
|
686
|
-
### Binding cell — allowed expressions (Inputs)
|
|
687
|
-
|
|
688
|
-
Every Inputs `Binding` cell carries one of (case-sensitive):
|
|
689
|
-
|
|
690
|
-
| Form | Meaning |
|
|
691
|
-
|---|---|
|
|
692
|
-
| `<literal>` | Plain string / number / boolean (`"50"`, `0`, `true`) |
|
|
693
|
-
| `=vars.<id>` | Case variable from §1.5 (`<id>` matches a §1.5 row's `Name`), or an upstream task's auto-emitted output field referenced directly (see §Variable lineage closure) |
|
|
694
|
-
| `=vars.<id>.<subfield>` | Sub-field of a structured case variable (dot-path) |
|
|
695
|
-
| `=bindings.<id>` | Registered resource (action app, process, connection) |
|
|
696
|
-
| `=metadata.<key>` | Case metadata |
|
|
697
|
-
| `=metadata.ExternalId` | **The platform-generated case identity** — the canonical binding for any task input named `caseId`. The case external id is minted by the platform (constant prefix or external expression) and exposed as `metadata.ExternalId`; it is **NOT** a task output. Bind `caseId` to `=metadata.ExternalId`; **never** add a `-> caseId` extraction on a workflow whose `data` payload has no `caseId` key — that extraction resolves to runtime null (a documented v4→v5 fix on a working case). Agents, the case mirror, and all write-backs key off `=metadata.ExternalId`. |
|
|
698
|
-
| `=trigger.<field>` | Trigger payload field |
|
|
699
|
-
| `=js:<expr>` | Inline JavaScript (REQUIRED when operators are involved) |
|
|
700
|
-
| `=jsonString:<json>` | JSON literal as string (used for `essentialConfiguration` carry-through) |
|
|
701
|
-
| `=datafabric.<path>` | Data Fabric reference |
|
|
702
|
-
| `=orchestrator.JobAttachments` | File slot |
|
|
703
|
-
| `=response` / `=result` / `=Error` | Conventional handles for connector / agent / process responses |
|
|
704
|
-
| `"<Stage Name>"."<Task Name>".<outputName>` | Cross-task output reference — Phase 1 resolves to `=vars.<id>` at build time |
|
|
705
|
-
|
|
706
|
-
**Bare field-name lists** (`**Inputs:** loanId, borrowerLegalEntity`) are FORBIDDEN. They force Phase 1 into name-match inference — the exact failure mode the table form prevents.
|
|
707
|
-
|
|
708
|
-
### Outputs cell operators
|
|
709
|
-
|
|
710
|
-
Every Outputs `Binding / Value` cell carries one of two operators (case-sensitive). The `Field` column rule differs by operator:
|
|
711
|
-
|
|
712
|
-
| Operator | Cell form | `Field` cell | Purpose |
|
|
713
|
-
|---|---|---|---|
|
|
714
|
-
| Extract | `-> <caseVar>` | **Non-empty** — full runtime path relative to task root (`response.status`, `Action`, `Error.code`). Skill emits `source: "=<Field>"` verbatim. | Capture a runtime response field into a case variable. |
|
|
715
|
-
| Set / compute / copy | `<caseVar> = <expr>` | `—` (em-dash literal) | Assign a literal, computed (`=js:(...)`), or copied (`=vars.X.Y`) value at task completion. |
|
|
716
|
-
|
|
717
|
-
**Authoring rules:**
|
|
718
|
-
|
|
719
|
-
- The LHS case variable (after `->` or before `=`) MUST already be declared in §1.5 Case Variables. Outputs rows DO NOT declare new variables — they wire existing ones.
|
|
720
|
-
- Per task: each target case variable appears in at most one Outputs row. No double-binding. Mixing `->` and `=` for the same target in the same task is rejected.
|
|
721
|
-
- A single task may carry both `->` rows (extract) AND `=` rows (literal / computed) targeting different variables.
|
|
722
|
-
|
|
723
|
-
**Example (any task's Outputs table):**
|
|
724
|
-
|
|
725
|
-
```
|
|
726
|
-
| Field | Binding / Value |
|
|
727
|
-
|-----------------|-------------------------------------------|
|
|
728
|
-
| response.status | -> sendStatus |
|
|
729
|
-
| Action | -> userDecision |
|
|
730
|
-
| — | caseStatus = "InReview" |
|
|
731
|
-
| — | reviewCount = =js:(vars.reviewCount + 1) |
|
|
732
|
-
```
|
|
733
|
-
|
|
734
|
-
For worked patterns by Category and operator, see [`sdd-template-examples.md`](../assets/templates/sdd-template-examples.md).
|
|
735
|
-
|
|
736
|
-
### Resolved-resource I/O completeness
|
|
737
|
-
|
|
738
|
-
When a task resolves to a **live** resource (`process` / `agent` / `rpa` / `api-workflow` / `action` / `execute-connector-activity` / `wait-for-connector` / `case-management`), the SDD's binding contract MUST cover that resource's declared I/O — not merely match names verbatim where rows exist (§Binding cell, §Outputs cell). The declared contract is the one pulled during build-phase discovery (`tasks describe` for runnables, `spec` for connectors — Phase 1 per [planning.md](planning.md), re-verified in Phase 3) and persisted — including each input's `required` flag and the full output-field list — in `tasks/registry-resolved.json`. Coverage is two-directional:
|
|
739
|
-
|
|
740
|
-
**Inputs — required-coverage.** Every **required** declared input has an Inputs row whose `Binding` is non-empty (any allowed form in §Binding cell), OR is explicitly `<UNRESOLVED>` paired with a `high` review item (`rev_unbound_input_<task>_<field>`). A required input silently absent from the Inputs table is the defect this rule catches — it resolves to runtime null and faults the job. **Optional** declared inputs MAY be omitted; an optional input the user described but did not map → `medium` review item (build-phase discovery behavior). Never invent a `Default` to suppress an unmapped required input.
|
|
741
|
-
|
|
742
|
-
**Outputs — field fidelity.** Every Outputs `-> caseVar` (extract) row's `Field` (its top-level leaf) MUST exist verbatim in the resolved output contract. A `Field` the resource does not emit → `high` review item (`rev_phantom_output_<task>_<field>`); it cannot bind. The case still binds outputs **selectively** — only the outputs it consumes need rows; this rule forbids referencing outputs the resource never produces, not under-consuming. (This generalizes the action-app-only fidelity rule, §Finalization step 16, to all runnable/connector types.)
|
|
743
|
-
|
|
744
|
-
**xref carve-out — an upstream-output-fed input is *defined*, NOT a case variable.** When a required input is satisfied by an upstream task's output — whole-value `<- "Stage"."Task".out` (resolves to `=vars.<outputId>`) or in-expression `vars.$xref('Stage','Task','out')` — it counts as covered: do **NOT** raise a "missing variable" finding for it. The emitting task self-declares the output and is its own producer; declare a §1.5 row for it only per the [§ 1.5 declare-vs-xref test](#15-case-variables) (rename / custom `Default` / `Type` / `Description` / case-level state read in ≥ 2 places). See also [§ Variable lineage closure → Task-output direct reference](#variable-lineage-closure).
|
|
745
|
-
|
|
746
|
-
Enforced at build (Phase 1 discovery + Phase 3 io-binding Check 5, [`io-binding/impl-json.md`](plugins/variables/io-binding/impl-json.md#check-5--resolved-resource-io-completeness)) — Phase 0's best-assumption path pulls no I/O contracts, so its `Field` cells reflect the best-known names and Phase 3 discovery reconciles them against the live contract during binding. For a user-authored SDD the rule applies as written. A task whose type-specific identity (`Resource Identity` or `Action App ID`) is `<UNRESOLVED>` has no resolved contract and is skipped by this rule. Its type-specific portable name remains concrete.
|
|
747
|
-
|
|
748
|
-
## Integrations content rules (Section 4)
|
|
749
|
-
|
|
750
|
-
Section 4 is the **de-duplicated resource roll-up** — one subsection per rendered resource family, so the case's integration/resource footprint is replicable from the SDD alone. An unresolved row keeps its concrete intended resource name and writes `<UNRESOLVED>` only for folder and identity. Render only the families whose task type appears; render `> None.` for an absent family when its absence is meaningful (e.g. "no IS connectors — all system calls go through an API workflow").
|
|
751
|
-
|
|
752
|
-
| Subsection | Render when the case has… | Required columns |
|
|
753
|
-
|---|---|---|
|
|
754
|
-
| Integration Service Connectors | `execute-connector-activity` / `wait-for-connector` tasks | Connector, Connector Key, System, Connection (ID), Auth Method, Operations Used, Used By Tasks (+ per-connector Operations: Activity Type ID, Method, I/O fields) |
|
|
755
|
-
| API Workflows | `api-workflow` tasks | Workflow, Folder, Resource ID (+version), Inputs → Outputs, Used By Tasks |
|
|
756
|
-
| Agents | first-class `agent` tasks | Agent, Folder, Resource ID (+version), Inputs → Outputs (or "shared agent contract"), Used By Tasks |
|
|
757
|
-
| Processes & RPA | `process` / `rpa` tasks | Resource, Type, Folder, Resource ID (+version), Used By Tasks |
|
|
758
|
-
| Child Cases | `case-management` tasks | Child Case, Folder, Resource ID, Identifier Prefix, Wait for Completion, Used By Tasks |
|
|
759
|
-
| External Agents | externally-hosted agents modeled as `api-workflow` / `execute-connector-activity` | Agent, Service Type, Endpoint, Used By Tasks |
|
|
760
|
-
|
|
761
|
-
**De-dup rule.** One row per **distinct** resource, not per task. When a façade resource backs many tasks (one mock-integration API selected by `requestSource`, one code-switched action app by `actionType`), list the distinct selector values next to the task names in `Used By Tasks` (e.g. `Start case (requestSource=StartAgedInvoiceCase), Register shell (requestSource=RegisterCaseShell)`). Action apps render in their per-task Action blocks (Section 2), not as a Section 4 subsection — they are HITL surfaces, not system integrations — but the same de-dup + `actionType`-selector discipline applies there.
|
|
762
|
-
|
|
763
|
-
**Resource identity is mandatory.** Every Section 4 row carries the resource's **folder + id** (`<UNRESOLVED>` + a `high` review item when Resolve could not bind it). A reader / coding-agent replicates from these, not from I/O contracts alone (§Finalization step 18).
|
|
764
|
-
|
|
765
|
-
## Variable lineage closure
|
|
766
|
-
|
|
767
|
-
Every variable referenced in `sdd.md` must close — every consumer must have a producer that fires before it, OR the variable must carry a `Default` value that holds at case start.
|
|
768
|
-
|
|
769
|
-
The new SDD shape carries producer / consumer signal across three places (NOT a `Produced By` / `Consumed By` pair of cells — those columns were retired):
|
|
770
|
-
|
|
771
|
-
| Producer signal | Where it lives |
|
|
772
|
-
|---|---|
|
|
773
|
-
| Trigger payload extraction | §1.5 row's `sourceTriggers` (T-number) + `sourceFields` (payload path) |
|
|
774
|
-
| Task-output extraction | Producing task's Outputs row → `-> <caseVar>` |
|
|
775
|
-
| Task-output set / compute / copy | Producing task's Outputs row → `<caseVar> = <expr>` |
|
|
776
|
-
| Case-start default | §1.5 row's `Default` |
|
|
777
|
-
|
|
778
|
-
| Consumer signal | Where it lives |
|
|
779
|
-
|---|---|
|
|
780
|
-
| Task input reads variable | Task's Inputs row `Binding` cell → `=vars.<caseVar>` or `=vars.<caseVar>.<subfield>` |
|
|
781
|
-
| Condition / exit rule reads variable | `IF` column `conditionExpression` → `=vars.<caseVar>` or `=js:` expression referencing `vars.<caseVar>` |
|
|
782
|
-
| Action button writes variable | `Maps To` cell → `<caseVar> = "<value>"` (the button IS a producer for that variable) |
|
|
783
|
-
|
|
784
|
-
**Closure rule.** For every consumer of `vars.<caseVar>`, at least one of these must hold:
|
|
785
|
-
|
|
786
|
-
1. There is a producer earlier in stage order (or earlier in same-stage task order).
|
|
787
|
-
2. The §1.5 row for `<caseVar>` declares `Category: In` (caller-supplied — closure satisfied at case start).
|
|
788
|
-
3. The §1.5 row for `<caseVar>` carries a non-empty `Default` value (closure satisfied at case start, even if no producer fires).
|
|
789
|
-
|
|
790
|
-
Otherwise the variable is open-lineage and Phase 0 cannot Approve.
|
|
791
|
-
|
|
792
|
-
**Task-output direct reference.** A `=vars.<name>` where `<name>` is an upstream task's auto-emitted output field is NOT a §1.5 variable — exempt from closure. The emitting task self-declares it (resolver matches any `task.data.outputs[].id`) and is its own producer; only ordering applies (emitting task before consumer). Declare a §1.5 row only to rename, set custom `Default` / `Type`, or expose case-level state. Unresolvable refs (typo, or a field the task does not emit) are caught later by the io-binding validator (Check 1), not here. See [sdd-template-examples.md § Task-local-only variables](../assets/templates/sdd-template-examples.md).
|
|
793
|
-
|
|
794
|
-
**Self-binding rule.** An Outputs row of the form `caseVar = =vars.caseVar` or `caseVar = =js:vars.caseVar` (LHS and only-referenced-RHS variable are the same `caseVar`) is FORBIDDEN — it's a no-op that masks a missing producer. Phase 0 strips such rows from the draft, narrates the strip, and emits a `high`-severity review item asking the user whether they meant to (a) wire a different producer, (b) drop the row entirely, or (c) initialize via §1.5 `Default`. Computed self-references like `caseVar = =js:(vars.caseVar + 1)` are allowed (incrementers / accumulators) — the RHS expression mutates the value.
|
|
795
|
-
|
|
796
|
-
**Output-naming consistency rule.** An Outputs `-> <caseVar>` row whose `Field` leaf name (the produced datum's natural name, e.g. `complianceStatus`) has NO matching §1.5 variable AND is mapped into a differently-named existing variable (e.g. `titleReviewStatus`) → emit a `medium` review item (`rev_aliased_output_<task>`): "task output `<field>` aliased into unrelated variable `<caseVar>`; declare a dedicated §1.5 variable for the datum or confirm the reuse is intentional." Aliasing a produced datum into an unrelated variable closes lineage mechanically while corrupting meaning — a variable named for one thing silently carries another, and a multi-stage variable ends up double-purposed.
|
|
797
|
-
|
|
798
|
-
**Stage exit pattern — XOR terminal stages.** When the user describes mutually-exclusive happy-path terminals (e.g., "Funding on approve, Adverse Action Notice on decline"), the case has two valid endings but only one fires per run. Key Rule 4 forbids `selected-stage-*` on case-exit `Yes` rows, so the XOR is modeled at the stage-entry level, not the case-exit level. Two sanctioned patterns:
|
|
799
|
-
|
|
800
|
-
**Pattern X1 — gated entry + required terminal closes** (default — works on every tenant, no connector emission needed):
|
|
801
|
-
|
|
802
|
-
- Both terminal stages declared with `Required for case completion: Yes`.
|
|
803
|
-
- Each terminal stage's Entry Condition: `selected-stage-completed("<DecisionStage>")` + `IF` = the condition guarding its lane (e.g., `IF: =vars.decision == "Approve"` for Funding, `IF: =vars.decision == "Decline"` for AAN).
|
|
804
|
-
- **Stage Completion Conditions on each terminal stage:** `required-tasks-completed` (`Marks Stage Complete: Yes`) — the terminal closes normally when its tasks finish.
|
|
805
|
-
- **Stage-skip rule** (Phase 1 validator): the runtime evaluates Entry Condition `IF` at stage activation time; a terminal whose `IF` is false at activation is auto-completed (`status = "Skipped"`) so `required-stages-completed` still resolves cleanly across the case. This is documented FE behavior — see PO.Frontend stage validation rules. The skipped stage counts as "completed" for required-stages closure.
|
|
806
|
-
- Case Exit §1.4: ONE row, `Marks Case Complete: Yes`, WHEN = `required-stages-completed` (default form), `IF: —`.
|
|
807
|
-
|
|
808
|
-
**Pattern X2 — connector-event close** (use when both terminals end by emitting a common case-done event):
|
|
809
|
-
|
|
810
|
-
- Both terminal stages: `Required for case completion: No`.
|
|
811
|
-
- Each terminal stage Entry Condition: as in X1.
|
|
812
|
-
- Each terminal's last task is a `wait-for-connector` or `execute-connector-activity` that emits a shared case-completion event (e.g., funding-confirmed AND aan-sent both fire `caseDone`).
|
|
813
|
-
- Case Exit §1.4: ONE row, `Marks Case Complete: Yes`, WHEN = `wait-for-connector` keyed on `caseDone`.
|
|
814
|
-
|
|
815
|
-
Pattern X1 is preferred unless an actual connector emits the close event. When the pattern is detected at Sketch time (multiple terminal candidates AND a branching decision earlier in the case), narrate the choice and surface BOTH patterns to the user via AskUserQuestion before drafting the rows.
|
|
816
|
-
|
|
817
|
-
**Audit checklist** (run against the in-memory model before the confirmation is presented):
|
|
818
|
-
|
|
819
|
-
1. Every variable referenced by any `=vars.<name>` (or `=vars.<name>.<sub>`) anywhere in `sdd.md` (task Inputs, IF columns, exit rules, button `Maps To`, SLA expressions) has a matching §1.5 row whose `Name` equals `<name>` — OR `<name>` is an upstream task's auto-emitted output field (see §Variable lineage closure → Task-output direct reference; never add a §1.5 row to back such a ref).
|
|
820
|
-
2. Every §1.5 row's `Category` is exactly one of `In` / `Out` / `Variable` — never blank, never `—`.
|
|
821
|
-
3. **`In` row consistency:** `sourceFields` is empty. `sourceTriggers` is empty (binds the primary trigger) OR a single `T<N>` that exists in tasks.md (binds that trigger) — never a CSV. A CSV `sourceTriggers`, or any non-empty `sourceFields`, on an `In` row is an error.
|
|
822
|
-
4. **`Out` row consistency:** `sourceTriggers` is empty. Closure requires either (a) non-empty `Default`, OR (b) a task Outputs row in the case plan targeting this Name via `-> {name}` or `{name} = {expr}`. (PR 860 added a Phase 2 validator: `Out` + non-empty `sourceTriggers` → reject.)
|
|
823
|
-
5. **`Variable` row consistency:** if `sourceTriggers` is non-empty, `sourceFields` MUST have a matching entry for every T-number listed. For CSV `sourceTriggers`, `sourceFields` MUST use keyed `T<N>: <path>; T<M>: <path>` format with one keyed entry per T-number — strict, no defaults. Single-T-number rows use a bare path.
|
|
824
|
-
6. **Stage-order closure.** For each consumer of `vars.<caseVar>`, identify producers (trigger-extraction, task Outputs row `->` or `=`). At least one producer's stage index ≤ consumer's stage index AND (same stage) task index < consumer's task index. If no producer exists, the §1.5 row MUST satisfy the `Category: In` or non-empty `Default` escape.
|
|
825
|
-
7. **`->` row payload path present.** Every Outputs `-> {caseVar}` row has a non-empty `Field` cell (the runtime path). Every `=` row has `Field` exactly `—`.
|
|
826
|
-
8. **Forbidden body vocabulary.** No occurrence in any narrative cell of: `Pattern C`, `bridge`, `companion`, `inputOutputs[]`, `=jsonString:` (outside connector `Operation Configuration` cells), `groupOperator`, `essentialConfiguration` (as prose), `savedFilterTrees`, `dispatcher`, `Phase 2 validator`, `Phase 3 dispatcher`, `Q10 II`, `Finding #N`, `io-binding`, `aliased into / from / back into`, `reassign`, `originalVar`, `auto-mint`. These are skill-internal terms — see [sdd-template.md § Output Rules](../assets/templates/sdd-template.md).
|
|
827
|
-
9. **Resolved-resource I/O completeness** (§Resolved-resource I/O completeness). For each task resolved to a live resource (contract present in `tasks/registry-resolved.json`): every **required** declared input has a non-empty `Binding` row OR `<UNRESOLVED>` + a paired `high` review item; every Outputs `-> caseVar` row's `Field` exists verbatim in the resolved output contract. An upstream-output-fed input (whole-value `<-` or `vars.$xref(...)`) satisfies coverage with NO §1.5 row — do not flag it as a missing variable. Skip tasks whose type-specific identity (`Resource Identity` or `Action App ID`) is `<UNRESOLVED>` (no contract).
|
|
828
|
-
|
|
829
|
-
Any failure → fix in the model before presenting the confirmation (lineage defects are the agent's, not the user's); a genuinely unfixable item becomes a row in the confirmation's `Review Flags` table.
|
|
830
|
-
|
|
831
|
-
## Review items
|
|
832
|
-
|
|
833
|
-
A review item is a structured gap escalation. Phase 0 emits one whenever a field could not be fully resolved but Phase 1 needs the context. In Phase 0 they live in the in-memory model and surface as rows in the confirmation's `Review Flags` table — never in the `sdd.md` body (per [sdd-template.md § Output Rules](../assets/templates/sdd-template.md)); Phase 1 persists them into `tasks/registry-resolved.json` under the matching task's `review_items[]` array when it writes that file.
|
|
834
|
-
|
|
835
|
-
Shape:
|
|
836
|
-
|
|
837
|
-
```jsonc
|
|
838
|
-
{
|
|
839
|
-
"id": "rev_<short-slug>",
|
|
840
|
-
"target": "<sdd.md section path or task name>",
|
|
841
|
-
"issue": "<one-sentence problem>",
|
|
842
|
-
"severity": "high" | "medium" | "low",
|
|
843
|
-
"next_step": "<what the user must do to resolve>"
|
|
844
|
-
}
|
|
845
|
-
```
|
|
846
|
-
|
|
847
|
-
Severity:
|
|
848
|
-
|
|
849
|
-
| Level | Definition | Examples |
|
|
850
|
-
|---|---|---|
|
|
851
|
-
| **high** | Blocks Phase 1 / `caseplan.json` build until resolved. | Missing `connectionId` for a resolved connector task; missing `actionAppId` for an `action` task; missing deployed `process` / `agent` / `api-workflow` for a runnable task; a resolved resource's **required** input left unbound (`rev_unbound_input_<task>_<field>`); an extract output naming a field the resource does not emit (`rev_phantom_output_<task>_<field>`); unresolved variable lineage; missing trigger config; compliance-override conflict the user has not reconciled. |
|
|
852
|
-
| **medium** | Phase 1 can default with a prompt. | Missing SLA escalation recipient (default = owner group); missing variable default; ambiguous recipient (persona name without group resolution). |
|
|
853
|
-
| **low** | Cosmetic. | Missing case-level description; missing secondary-stage description; stylistic placeholder. |
|
|
854
|
-
|
|
855
|
-
**Confirmation gate behavior.** When any `high` review items exist, they appear in the confirmation's `Review Flags` table and the Build option is relabeled `Build despite N flagged items` (count populated). User must pick it — silently building past `high` items is forbidden. Medium and low items surface in the same table as advisory rows and need no acknowledgment.
|
|
856
|
-
|
|
857
|
-
## Domain fidelity
|
|
858
|
-
|
|
859
|
-
Phase 0's narrative cells (Description, persona names, stage names, task names, button labels, prose under §Section 3 personas, §Section 4 integrations) MUST preserve the user's domain vocabulary verbatim. The skill is a transcription layer for business terms, not a paraphraser.
|
|
860
|
-
|
|
861
|
-
**Preserve verbatim** (do NOT swap to a synonym, even if it sounds more "standard"):
|
|
862
|
-
|
|
863
|
-
- Customer-named roles (`CFO`, `Underwriter II`, `Compliance Officer`, `Triage Nurse`, `Onboarding Specialist`). Do NOT substitute `Approver`, `Reviewer`, `Manager` unless the user used that exact term.
|
|
864
|
-
- Customer-named domain nouns (`Vendor`, `Supplier`, `Partner`, `Claim`, `Application`, `Loan File`, `PO`, `Ticket`, `Member`, `Patient`). Pick the one the user used. Do NOT homogenize to `Record` or `Item`.
|
|
865
|
-
- Customer-named stage labels (`Triage`, `Underwriting`, `Adverse Action Notice`). Use the user's casing and word choice. Prefix-pad to PascalCase only at the Case Name level (e.g., `MortgageLoanOrigination`).
|
|
866
|
-
- Customer-named decision outcomes (`Approve` / `Decline` / `Needs Info` not `Approve` / `Reject` / `Pending`).
|
|
867
|
-
- Customer-named integration shortnames (if user said `Workday`, never write `the HR system`).
|
|
868
|
-
|
|
869
|
-
**Allowed normalization** (mechanical, narrate in ledger as `mechanical:<derivation>`):
|
|
870
|
-
|
|
871
|
-
- PascalCase Case Name from a spaced phrase (`vendor onboarding` → `VendorOnboarding`).
|
|
872
|
-
- 2-4 char identifier prefix from the PascalCase name.
|
|
873
|
-
- camelCase variable names from spaced phrases (`loan amount` → `loanAmount`).
|
|
874
|
-
|
|
875
|
-
**Detection — when user writes a term once, surface it in the source ledger** as `verbatim:"<quoted exact phrase>"` (see §Source ledger). The confirmation's tables render every customer-named entity verbatim — that display is the spelling/casing check; corrections fix any drift. No separate confirmation question.
|
|
876
|
-
|
|
877
|
-
**Anti-paraphrase rule.** When the agent feels the urge to write `the manager approves the request` and the user said `the senior underwriter signs off`, the agent MUST use `the senior underwriter signs off`. Synonyms are a fidelity bug, not a polish improvement.
|
|
878
|
-
|
|
879
|
-
## Logical integrity — stage graph
|
|
880
|
-
|
|
881
|
-
Beyond schema-pairing checks (§Finalization step 1), the case must be a connected graph. **Edges are retired — these condition-based checks are the SOLE reachability guard; there is no edge graph to fall back on.** A malformed or missing entry condition is the only thing that can orphan a stage, so this walk is load-bearing.
|
|
882
|
-
|
|
883
|
-
1. **Every stage reachable from a trigger.** Walk forward from each trigger/SLA source through Stage Entry Conditions (`case-entered` from root, `selected-stage-completed`, `selected-stage-exited`, `wait-for-connector`, `sla-status-change`) — condition-only, no edges. Every primary stage's id must be reached. Unreachable stage → blocking error (orphan stage).
|
|
884
|
-
2. **Every stage exits.** Every primary stage must have either (a) a completion row (`Marks Stage Complete: Yes`) whose completion is consumed by a downstream stage's Entry Condition or a case-exit, OR (b) another primary stage whose Entry Condition references it (`selected-stage-completed`/`selected-stage-exited`), OR (c) feed a secondary stage. A stage no other stage (or case-exit) keys off → blocking error (terminal-loop stage).
|
|
885
|
-
3. **Every case-exit row references a stage that exists.** No dangling `Required Stages` references.
|
|
886
|
-
4. **Every `Required Stages` cell in §1.4 names ≥ 1 primary stage with `Required for case completion: Yes`.** Otherwise the case can never complete.
|
|
887
|
-
5. **Secondary stages must have ≥1 interrupting entry condition, each DISTINCT, chosen by trigger source.** Map the lane's *trigger* to the rule: a gate decision → `selected-stage-completed` / `selected-stage-exited` (+ `IF` on the decision var); a person launches it → `user-selected-stage` paired with an upstream `wait-for-user` exit; an external event → `wait-for-connector`; an SLA response that enters this lane → `sla-status-change` referencing the SLA (plus an at-risk escalation only for an at-risk response; a breach references the SLA alone). Warning-only SLA escalation stays a notification. `adhoc` is task-entry only — never a stage entry. Every secondary-stage entry row carries `Interrupting: Yes`. Two secondary stages whose entry rules are identical (same rule type + selector fields + `conditionExpression`) fail `validate` (`CASE_MGMT_SECONDARY_STAGE_ENTRY_RULES_DUPLICATE`) — give each a distinct event/SLA selector or expression guard. Terminal lanes (Rejected / Withdrawn) exit `exit-only` and declare a §1.4a case-exit (`marks-case-complete: false`); return lanes (Escalation / Customer Comms) exit `return-to-origin`. **Global events:** one `wait-for-connector` or `sla-status-change` entry on the destination secondary stage covers every active origin; do not repeat a task or exit rule across primary stages. **Decision-reachable lanes:** when any decision button's Behavior (or the user's stated intent) names a secondary stage as a destination ("route to / send to / escalate via the X lane"), that lane's entry conditions MUST include a `selected-stage-completed` / `selected-stage-exited` rule with an `IF` on the deciding variable's value. A lane described as decision-reachable but entered ONLY via `wait-for-connector` (no decision-keyed entry) is unreachable from its stated source → blocking error. A `wait-for-connector` entry may coexist as a separate trigger, but cannot be the lane's only entry when a decision is supposed to reach it. **Only a `selected-stage-completed`/`selected-stage-exited` lane entry requires a matching origin diverting exit.** On the *origin* stage add a **gated diverting exit** (`Marks Stage Complete: No`, WHEN `selected-tasks-completed("<decider task>")`, `IF =js:(<signal> === <exception-value>)`, `exit-only`, `exitToStageId` → the lane) **and** gate the origin's completion exit with the inverse `IF` (`=js:(<signal> !== <exception-value>)`) so the two are mutually exclusive. Without the diverting exit the decision path either **dual-fires** (ungated completion → the next stage *and* the lane both enter) or **deadlocks** (gated completion with no alternative exit). `selected-stage-exited` fires *after* the origin exits, so this is a **divert-and-return, not a true mid-stage interrupt** — a genuine mid-stage interrupt needs `user-selected-stage`, `wait-for-connector`, or `sla-status-change` (mental-model shapes (a)/(c)). Missing origin diverting exit, or a completion exit not mutually exclusive with it → blocking error.
|
|
888
|
-
6. **Every `sla-status-change` entry resolves.** For each row: the target is `root` or an existing stage, that target has an SLA configured (§1.1 + §1.2, or its `#### Stage SLA` block), and every title the row actually supplies matches a row declared on **that** target. A two-arg breach row supplies only the SLA title and is complete as written — its missing escalation is not a miss. Any real miss — SLA absent, title left `—`/defaulted, typo, or an at-risk escalation borrowed from another target — cannot resolve to `slaId` (or, for at-risk, `escalationId`), leaves the lane unreachable, and is a **blocking error**. A notification-only escalation needs no entry rule.
|
|
889
|
-
7. **Every secondary stage is interrupting, except a non-diverting SLA oversight row.** Set the stage-level `Interrupting` field and every secondary-stage entry row to `Yes`. If the user describes work that can run alongside the main flow without interrupting it, do not mark it secondary; model it as a regular parallel stage/path or as an `adhoc` task in the active stage. A secondary stage with `Interrupting: No` is a blocking classification error **unless** that row is an `sla-status-change` response the source describes as parallel oversight (the breached work continues; nothing is paused, taken over, or rerouted) — then `No` is correct on that row and the lane still stays `isRequired: No` and out of the completion set. Do not promote such a lane to a regular stage: that would make it required for case completion. Every non-SLA secondary entry row stays `Yes`.
|
|
890
|
-
|
|
891
|
-
**Worked example — decision/signal-routed return exception (AP Review → SLA Escalation).** The origin "AP Review" routes to the exception lane "SLA Escalation" on a `requiresEscalation` decision, then returns:
|
|
892
|
-
|
|
893
|
-
| Stage | Condition | WHEN | IF | Exit Type | Marks Complete |
|
|
894
|
-
|---|---|---|---|---|---|
|
|
895
|
-
| AP Review | exit (complete) | `required-tasks-completed` | `=js:(vars.requiresEscalation !== true)` | `exit-only` | Yes |
|
|
896
|
-
| AP Review | exit (divert) | `selected-tasks-completed("AP ownership review")` | `=js:(vars.requiresEscalation === true)` | `exit-only` (`exitToStageId` → SLA Escalation) | No |
|
|
897
|
-
| SLA Escalation | entry | `selected-stage-exited("AP Review")` | `=js:(vars.requiresEscalation === true)` | — | — (`Interrupting: Yes`) |
|
|
898
|
-
| SLA Escalation | exit | `required-tasks-completed` | — | `return-to-origin` | Yes |
|
|
899
|
-
|
|
900
|
-
On escalate: the divert exit fires (completion's inverse `IF` is false), the case enters SLA Escalation, then `return-to-origin` re-activates AP Review for re-decision. On non-escalate: the completion exit fires and the next regular stage enters via its own `selected-stage-completed("AP Review")` entry. The decision (`requiresEscalation`) is read directly from the producing action's output — never relayed through a §1.5 variable.
|
|
901
|
-
|
|
902
|
-
Failure on any step → blocking error in Finalization. AskUserQuestion `Re-edit` / `Restart` / `Abort`.
|
|
903
|
-
|
|
904
|
-
## Architect's lens
|
|
905
|
-
|
|
906
|
-
Phase 0's job is to surface execution-readiness gaps, not just schema validity. Run these advisory checks at Finalization and emit `medium` review items (not blocking, but visible to the user) whenever they fire:
|
|
907
|
-
|
|
908
|
-
| Check | Trigger | Review item |
|
|
909
|
-
|---|---|---|
|
|
910
|
-
| **Single-recipient bottleneck** | An `action` task's `Recipient` is `User: <single uuid>` or `Email: <single>` AND the stage runs on every case AND the case has no documented volume limit | `rev_bottleneck_<task>`: "Single named recipient for an always-on `action` task — confirm volume or change to UserGroup / Role." |
|
|
911
|
-
| **No escalation when SLA exists** | Stage has SLA AND escalation table absent or omitted | `rev_escalation_<stage>`: "Stage SLA defined but no escalation recipients — leadership will not be paged on breach." |
|
|
912
|
-
| **Escalation routes to same group already breaching** | Stage SLA escalation Recipient equals the stage's primary recipient | `rev_escalation_loop_<stage>`: "Escalation recipient is the same actor already missing the SLA — pick a tier-up group or skip-level recipient." |
|
|
913
|
-
| **Synchronous child case in critical path** | `case-management` task `Wait for Completion: Yes` AND the parent has SLA AND no exception-path stage covers child-case timeouts | `rev_childcase_<task>`: "Synchronous child case in SLA-bound parent — consider Wait for Completion: No + completion connector, or an exception path on timeout." |
|
|
914
|
-
| **All-`action` stage** | A stage's tasks are 100% `action` AND stage has > 2 tasks | `rev_human_only_<stage>`: "All tasks in this stage are HITL — consider whether agent / process / api-workflow can pre-fill or pre-screen before human review." |
|
|
915
|
-
| **Missing happy-path exit on first stage** | The first primary stage has only routing exits (`Marks Stage Complete: No`) and no `required-tasks-completed` row | `rev_no_happy_path_<stage>`: "First stage has no happy-path completion — the case may not reach Stage 2 cleanly." |
|
|
916
|
-
| **Decision-button outcome unread** | An `action` task with `is_decision: Yes` writes a case variable in its `Maps To` cell AND that variable is NOT consumed by any downstream condition / stage entry / task input / case exit | `rev_orphan_decision_<task>`: "Decision button writes `<var>` but no downstream rule reads it — branching has no effect on case path. Either consume the variable or downgrade `is_decision` to No." |
|
|
917
|
-
| **Connector-task failure has no exception path** | `execute-connector-activity` / `wait-for-connector` task in a primary stage AND no secondary stage entered via `wait-for-connector` failure or task failure rule | `rev_no_failure_path_<task>` (`medium`; **`high`** when ≥ 2 connector tasks share a primary critical path with zero exception cover): "Connector activity in critical path with no secondary-stage cover — runtime failure halts the case." |
|
|
918
|
-
| **Generic action app reused as a substitute** | ONE resolved Action App ID bound to ≥ 2 `action` tasks **that do NOT each carry a distinct `actionType`**, OR where a declared field is absent from the app's schema (won't bind). **Exempt:** a code-switched app — distinct `actionType` per task **and** every declared field ⊆ the app schema — is the sanctioned normalized-action-app pattern, NOT flagged. | `rev_substitute_app_<app>` (`high`): "Action app reused across N tasks without a code-switching `actionType` (or with fields the app does not expose) — declared fields will not bind. Make it a code-switched app (distinct `actionType` per task, fields ⊆ the app schema) or deploy task-specific apps." |
|
|
919
|
-
| **Multiple parallel single-recipient bottlenecks** | ≥ 2 stages have single-recipient bottleneck check fire AND they fan-in to the same downstream stage | `rev_multi_bottleneck_<stages>`: "Multiple single-recipient bottlenecks gate a downstream stage — fan-in stalls cascade." |
|
|
920
|
-
| **Case-var relay (over-declaration)** | A §1.5 `Variable` row whose **only** producer is one task's Outputs `->` row AND whose **only** consumer is one downstream binding (one task Input `=vars.X`, OR one `=js:` expression / `IF`) — i.e., it carries a single output to a single consumer and is neither `In`/`Out` nor read in ≥ 2 places. **Exempt:** rows that rename, set a custom `Default` / `Type` / `Description`, or are read by ≥ 2 consumers / a condition. | `rev_relay_var_<name>`: "Variable `<name>` relays one task's output to a single consumer — reference the output directly (`<- \"Stage\".\"Task\".out` or `vars.$xref('Stage','Task','out')`) and drop the §1.5 row (see § 1.5 declare-vs-xref test)." |
|
|
921
|
-
|
|
922
|
-
`medium` items DO NOT block the confirmation. They surface as advisory lines in it (not in the `sdd.md` body) — no acknowledgment required, but never silently buried. The **`high` variants above** (`rev_substitute_app`, and `rev_no_failure_path` at the ≥ 2-connector threshold) gate like any other `high` item: the user can only `Build despite N flagged items`.
|
|
923
|
-
|
|
924
|
-
## Source ledger (provenance)
|
|
925
|
-
|
|
926
|
-
When Phase 0 defaults or infers a value, record provenance so Phase 1 and downstream auditors can trace it. The ledger has two surfaces:
|
|
927
|
-
|
|
928
|
-
1. **Inline in `sdd.md`** — italic source attribution after the value: `Manual _(source: user-stated)_`. Omit attribution when the kind is `user-stated`.
|
|
929
|
-
2. **Confirmation `Decisions I Made` table** — see [phase-0-interview.md § Confirm](phase-0-interview.md#confirm--the-single-checkpoint).
|
|
930
|
-
|
|
931
|
-
**Design rationale is durable, not chat-only.** Provenance says *where a value came from*; rationale says *why the design choice fits*. Persist the latter in each stage/task `Design Rationale` field and in each case/stage SLA rationale field. The confirmation may summarize those reasons, but it is not their sole storage. Phase 1 copies the rationale to each matching `tasks.md` T-entry so an implementer can review the choice without the original conversation.
|
|
932
|
-
|
|
933
|
-
Provenance kinds:
|
|
934
|
-
|
|
935
|
-
| Kind | When |
|
|
936
|
-
|---|---|
|
|
937
|
-
| `user-stated` | User wrote the value in chat (no annotation needed). Paraphrased rendition acceptable. |
|
|
938
|
-
| `verbatim:"<quote>"` | User wrote the value AND the rendered cell is exactly that phrase (no paraphrase). Strongest grounding signal — preferred over `user-stated` for any customer-named entity (role, stage, domain noun, outcome label). Quote is truncated at 40 chars in the ledger; full quote stays in the agent's working memory for Phase 1. |
|
|
939
|
-
| `user-doc:<filename>` | Lifted from a user-shared doc |
|
|
940
|
-
| `mechanical:<derivation>` | One-step derivation (e.g., `mechanical:PascalCase→prefix`) |
|
|
941
|
-
| `compliance-override:<rule>` | Regulatory constraint forced this value (e.g., `compliance-override:ECOA→action`) |
|
|
942
|
-
| `tenant-registry:<resource-name>` | Resolved from the registry cache |
|
|
943
|
-
| `connector-priority:<connector>` | Hierarchy tier 4 selected `execute-connector-activity` over `api-workflow` |
|
|
944
|
-
| `inferred-default:<reason>` | Defaulted because no source matched (used sparingly — most defaults should be Ask) |
|
|
945
|
-
|
|
946
|
-
A non-`user-stated` and non-`verbatim` field without provenance is a validation error. Approve blocks until annotated.
|
|
947
|
-
|
|
948
|
-
## Finalization
|
|
949
|
-
|
|
950
|
-
Phase 0 runs these checks **once, against the in-memory case model, before presenting the §Confirm checkpoint** ([phase-0-interview.md § Confirm](phase-0-interview.md#confirm--the-single-checkpoint)). Failures are the agent's defects: fix them in the model silently and re-check; a genuinely unfixable item becomes a ⚠ flagged line in the confirmation. After a user correction, re-run only the affected checks. **Steps 16 and 19 require resolved I/O contracts, which Phase 0's light pass does not pull — they are enforced at build time instead (Phase 1 discovery + Phase 3 io-binding Check 5); run them in Phase 0 only when a contract happens to be in memory.** The rendered `sdd.md` must match the confirmed model exactly; passing checks make the model eligible for rendering, they do not create the file.
|
|
951
|
-
|
|
952
|
-
1. **Schema check.** Every task `type` ∈ 9-value enum (Rule 16). Every WHEN ↔ Marks-complete pair valid per sdd-template Key Rule 4:
|
|
953
|
-
- Case-exit `Yes` + `selected-stage-*` → error
|
|
954
|
-
- Stage-exit `Yes` + `selected-tasks-completed` → error
|
|
955
|
-
2. **Render-contract check.** Every required cell in §Case content rules, §Stage content rules, §Task content rules has a concrete value (no banned `—` / `<UNRESOLVED>`).
|
|
956
|
-
2a. **Template-shape check.** The exact rendered `sdd.md` text must pass [phase-0-interview.md § Template conformance gate](phase-0-interview.md#template-conformance-gate--before-sddmd-is-written): `# SDD — {Case Name}`, `## Table of Contents`, `## Section 1: Case Definition`, `## Section 2: Stages & Tasks`, `## Section 3: Personas & App Views`, `## Section 4: Integrations`, required Section 1 subsections, one complete stage block per stage, one complete task block per task, personas/app views, and integrations. Each task block must contain the exact marker `**Task envelope**` before the Required / Run Only Once / Skip Condition table; `**Task envelope:**` with a colon is a render failure. Secondary-stage task headings must use numeric `Task S{K}.{M}` form, never lettered prefixes such as `Task R.1`, `Task W.1`, `Task CC.1`, or `Task ESC.1`. Missing headings, missing full detail blocks, or top-level summary replacements (`## Source`, `## Case Objective`, `## Stages`, `## Task Plan`, etc.) are blocking render failures. This check runs before Write; if it fails after Write is observed, stop and repair before Phase 1.
|
|
957
|
-
2b. **Safe display-name check.** Every generated or carried Case Designer display/title field for stages, tasks, rule names, SLA rules, and escalation rules uses only letters, numbers, spaces, hyphen, and underscore. Repair unsafe punctuation mechanically and disclose changed names in the Case Review. Do not normalize external resource lookup names.
|
|
958
|
-
3. **Decision-task button check.** Every `action` task with `is_decision: Yes` has ≥ 2 buttons; every button's `Maps To` LHS references a declared §1.5 variable (by `Name`) or `taskOutcome`.
|
|
959
|
-
4. **Recipient encoding check.** Every `action` task recipient uses one of the five typed prefixes (`Email:` / `User:` / `UserGroup:` / `Role:` / `Expression:`) — no bare strings.
|
|
960
|
-
5. **Connector-id check.** Every `wait-for-connector` / `execute-connector-activity` **task** has concrete `Connection ID` AND `Activity Type ID`. Every `wait-for-connector` **condition rule** (in any scope — stage-entry / stage-exit / case-exit / task-entry) has a `Connector Rule Detail` block resolving to a concrete `Connector Key` AND `Event Operation` (and `Connection ID` when not a tenant-default). Missing identity → paired `high`-severity review item.
|
|
961
|
-
6. **Variable-lineage check.** Every variable closes (producer before consumer; no orphans).
|
|
962
|
-
7. **Override-conflict check.** No compliance trigger phrase paired with a non-`action` task type without explicit user reconciliation in the transcript.
|
|
963
|
-
8. **Alt-disposition coverage.** If ≥ 1 secondary stage exists, Section 1.4a is non-empty OR a `high`-severity review item is open.
|
|
964
|
-
9. **Review-items high-severity acknowledgment.** Approve adds the explicit follow-up when `high` items exist.
|
|
965
|
-
10. **Source-ledger check.** Every non-`user-stated` and non-`verbatim` field has provenance.
|
|
966
|
-
10a. **Design-rationale check.** Every stage explains its kind and routing choice; every task explains its type and activation/sequencing choice; every configured case/stage SLA explains its thresholds, recipients, and any notify-only or graph-changing response. Missing rationale is a blocking render-contract error because Phase 1 must preserve it.
|
|
967
|
-
10b. **SLA Response Map closure** (§1.2b). If any SLA is configured, the map exists with one row per `(Scope, SLA, Status)` and every `Response` drawn from the closed set. Every non-`notify-only` row has its matching `sla-status-change` entry / stage-exit / case-exit rule in the model, every `sla-status-change` entry has a map row, and each pair's `Interrupting` values agree. A `notify-only` row that minted a stage or task, or a bare SLA with no map row, is a blocking error.
|
|
968
|
-
11. **File-In-arg caller-obligation surfacing.** When ≥ 1 §1.5 row has `Category: In` AND `Type: file`, the Approve summary MUST include a `Caller obligation` block:
|
|
969
|
-
|
|
970
|
-
```
|
|
971
|
-
Caller obligation (file In-arg detected):
|
|
972
|
-
File In-args: <comma-separated names>
|
|
973
|
-
Programmatic callers must pre-create each JobAttachment via POST /odata/Attachments,
|
|
974
|
-
PUT bytes to the returned blob URI, then pass {ID,FullName,MimeType,Metadata} as the
|
|
975
|
-
In-arg value AND include the attachment ID in StartProcessDto.Attachments[].
|
|
976
|
-
Maestro Studio Web's "Start case" dialog does this automatically.
|
|
977
|
-
```
|
|
978
|
-
|
|
979
|
-
This is informational, not blocking. But missing it suppresses a known integration gotcha.
|
|
980
|
-
|
|
981
|
-
12. **Stage-graph connectivity check.** Run the §Logical integrity stage-graph checks (every stage reachable, every stage exits, every Required Stages cell points to existing primary stages, every secondary stage has ≥ 1 entry condition, every `sla-status-change` entry names an SLA rule declared on the target it points at — plus an at-risk escalation on that same target only when the row is at-risk — and every secondary stage / secondary-stage entry row has `Interrupting: Yes`). Any failure → blocking error.
|
|
982
|
-
12a. **Entry-producer/reference check.** Every non-start stage/task entry names a concrete producer/reference: `selected-stage-*` names an existing upstream stage whose exit/completion can occur; `user-selected-stage` has a matching upstream `wait-for-user` exit; `wait-for-connector` has connector rule detail; `sla-status-change` names SLA target scope, SLA display name, and status — plus an at-risk escalation display name **when and only when the status is at-risk** (a breach rule references the SLA alone; a missing escalation on a breach row is correct, not a gap). A rule without a producer/reference is a blocking error.
|
|
983
|
-
13. **Domain-fidelity scan.** Run a single pass over every narrative cell (Description, persona name, stage name, task name, button label, app-view purpose). For each customer-named entity surfaced in §Source ledger as `verbatim:"..."`, confirm the rendered cell still uses the verbatim phrase (no synonym drift). Mismatch → list and offer `Re-edit` with the verbatim phrase pre-filled.
|
|
984
|
-
14. **Architect's-lens advisory pass.** Run the §Architect's lens checks. Emit `medium` review items for each trigger (the `high` variants — `rev_substitute_app`, and `rev_no_failure_path` at the ≥ 2-connector threshold — emit `high` and gate via the opt-in). `medium` is non-blocking; Approve summary surfaces the count.
|
|
985
|
-
15. **Decision-routing closure.** For every `action` task with `is_decision: Yes`, each button's `Maps To` variable+value MUST be consumed by ≥ 1 downstream rule (stage-entry `IF`, task-entry `IF`, stage-exit, or case-exit) OR the button's Behavior MUST declare it terminal (no routing claim). When a button's Behavior names a destination stage / lane ("route to / send to / via the X lane") and no entry condition keys off that variable+value, the branch is dead → **blocking error**. Pair with §Logical integrity step 5 (lane reachability). A fully-orphaned decision variable (produced by a button, read by nothing) on an `is_decision: Yes` task is blocking; the `medium` `rev_orphan_decision` variant in §Architect's lens applies only when the variable IS read but not for branching.
|
|
986
|
-
16. **Action-app schema fidelity.** For every `action` task whose HITL Implementation resolves to a concrete deployed app, every declared Input Schema and Output Schema `Field` MUST exist in that app's schema (from `tasks describe`, persisted in `tasks/registry-resolved.json` at Resolve). A declared field absent from the app → `high` review item (`rev_action_schema_<task>`); it cannot bind. One app bound to ≥ 2 tasks trips `rev_substitute_app` (§Architect's lens) **only** when the tasks lack distinct `actionType` dispatch values or declare fields outside the app schema; a code-switched app (distinct `actionType` per task, fields ⊆ app schema) is the sanctioned normalized-action-app pattern and does NOT trip it.
|
|
987
|
-
17. **Required-task presence.** Every primary stage whose completion exit uses `required-tasks-completed` MUST contain ≥ 1 task with `Required: Yes`. A `required-tasks-completed` exit over a stage where no task is required is vacuous — the runtime resolves it without gating on real work (and the CLI flags it as `CASE_MGMT_..._NO_REQUIRED_TASK` at `validate`). Catch it at the Approve gate: zero `Required: Yes` tasks in such a stage → blocking error (offer `Re-edit` to mark the stage's terminal/primary task required). Tasks default to `Required: Yes` unless the SDD says otherwise, so this fires only when the author explicitly cleared every task's Required flag.
|
|
988
|
-
18. **Resolved-resource presence (standalone replicability).** Every process/agent/rpa/api-workflow task has a concrete `Resolved Resource`; every action has a concrete Action App title in `HITL Implementation`; every case-management task has a concrete `Child Case`. These portable names are never `<UNRESOLVED>`. Each task also has its required type-specific identity + folder pair (`Resource Identity` + `Folder Path`, or `Action App ID` + `Deployment Folder`): a concrete identity requires the exact concrete folder; an unresolved identity permits an unresolved folder and requires a paired `high` review item. Every connector task has `Connection ID` + `Activity Type ID`. Missing portable intent, or unresolved identity with no review item, is a blocking error.
|
|
989
|
-
19. **Resolved-resource I/O completeness** (§Resolved-resource I/O completeness; audit-checklist item 9). For every task resolved to a live resource (contract in `tasks/registry-resolved.json`): every **required** declared input is bound (any §Binding cell form, incl. an upstream-output ref — which needs NO §1.5 row) OR `<UNRESOLVED>` + a paired `high` review item (`rev_unbound_input_<task>_<field>`); every Outputs `-> caseVar` row's `Field` exists verbatim in the resolved output contract (a phantom field → `high` `rev_phantom_output_<task>_<field>`). Unbound required input with no review item → blocking error. Step 16 is the `action`-app instance of the output-fidelity direction; this step extends both directions to all runnable/connector types. Tasks whose type-specific identity (`Resource Identity` or `Action App ID`) is `<UNRESOLVED>` (no contract) are skipped.
|
|
990
|
-
20. **Re-entry attempt check.** For each `return-to-origin`, rework, correction, or resubmission loop, classify the loop as new attempt, re-evaluate existing fact, or optional repeat work. New-attempt loops must leave request/review/decision producer tasks rerunnable (`Run Only Once: No`) and reset or attempt-scope the routing variables they produce. Re-evaluate-only loops must document which existing fact the origin re-reads.
|
|
991
|
-
|
|
992
|
-
On pass: present the §Confirm checkpoint (decision-first Case Review with Case Snapshot, Primary Journey, Other Paths Considered, SLA and Escalations, Rules and Outcomes, Resources and Integrations, a complete `Decisions I Made` table, Review Flags, and Caller obligation when applicable). The review names every stage and task but omits data, variables, and task inputs/outputs. A Build answer is the consent — `sdd.md` renders from the confirmed model batched with the first build actions ([phase-0-interview.md § Build start](phase-0-interview.md#build-start--sdd-written-alongside-the-build)); an explicit sign-off request adds one approval prompt before any file is created; design-only/draft requests save and stop. Corrections update the model and re-run only the affected checks.
|
|
993
|
-
|
|
994
|
-
On fail: fix the model and re-run the failed checks (plus any whose inputs changed) — not the full suite. Do not present the confirmation, and never render `sdd.md`, while a fixable check is failing; surface only the unfixable as ⚠ flags.
|
|
995
|
-
|
|
996
|
-
## Anti-patterns
|
|
997
|
-
|
|
998
|
-
- **Do NOT silently accept a user-proposed type when a compliance trigger phrase is in the transcript.** Tier 2 of the authority hierarchy overrides user preference; Ask before recording.
|
|
999
|
-
- **Do NOT create `sdd.md` before the confirmation's Build (or save) answer.** Finalization validates the in-memory model before the confirmation; the file renders only after consent — batched with the first build actions, or alone for design-only/draft requests. Never render with a failing fixable check or an undisclosed decision, and never build past a `high` item without the `Build despite N flagged items` pick.
|
|
1000
|
-
- **Do NOT leave design rationale only in chat.** The confirmation's `Decisions I Made` table is transient; stage kind/routing, task type/activation/sequencing, and SLA/escalation reasons must also live in the SDD's `Design Rationale` fields so Phase 1 can preserve them.
|
|
1001
|
-
- **Do NOT treat a validating case as proof the SDD followed the template.** `caseplan.json` validation checks executable JSON, not whether `sdd.md` preserved the template. A summary-style `sdd.md` with top-level `Source`, `Case Objective`, `Task Plan`, or `Acceptance Scenarios` sections is a render defect even when the built case validates.
|
|
1002
|
-
- **Do NOT repeat a global event on every primary stage.** External withdrawn/cancel events belong on one interrupting secondary-stage entry rule. An SLA response that enters a stage belongs on one scoped `sla-status-change` entry, with interrupting set by whether it diverts active work. Per-stage task/exit duplication is a modeling defect.
|
|
1003
|
-
- **Do NOT invent a stage, task, or routing change for an SLA the source only asks to notify about.** Absent a stated response, at-risk and breached are `notify-only` (§ SLA response model).
|
|
1004
|
-
- **Do NOT ship `sdd.md` with a banned `—` or `<UNRESOLVED>` on a render-required field.** Emit a placeholder + review item, or Ask.
|
|
1005
|
-
- **Do NOT pair `Marks Stage Complete: Yes` with `selected-tasks-completed` or `Marks Case Complete: Yes` with `selected-stage-*`.** Both are schema-pairing errors (Key Rule 4).
|
|
1006
|
-
- **Do NOT emit an `action` task without typed recipient prefix.** Bare strings (`"the underwriter"`) force Phase 1 to guess.
|
|
1007
|
-
- **Do NOT let required flow depend on `adhoc` tasks.** `selected-tasks-completed` and required-task rules must select only non-adhoc tasks in the same stage.
|
|
1008
|
-
- **Do NOT emit a decision `action` task with fewer than 2 buttons.** `is_decision: Yes` requires ≥ 2 buttons; downgrade to `is_decision: No` if the task does not fork the case path.
|
|
1009
|
-
- **Do NOT emit a `wait-for-timer` task with `<UNRESOLVED>` duration.** Timer cannot fire — block Approve.
|
|
1010
|
-
- **Do NOT emit SLA cells on `process` / `agent` / `rpa` / `api-workflow` / timer / connector / `case-management` tasks.** SLA supports case, stage, and `action` tasks ONLY (sdd-template Key Rule 1).
|
|
1011
|
-
- **Do NOT emit `external-agent`, `external-workflow`, `document-extraction`, `flow-process`, `connector-activity`, `connector-trigger`, or `wait-for-event` as task types.** This skill generates 9 of the CLI's 10 types (Rule 16). `external-agent`, `external-workflow`, `document-extraction`, and `flow-process` are **not supported yet**. The rest are not CLI task types at all.
|
|
1012
|
-
- **Do NOT author task inputs as bare field-name lists** (`**Inputs:** a, b, c`). Use the `Field | Type | Binding` table — bare lists force Phase 1 into name-match inference.
|
|
1013
|
-
- **Do NOT close variable lineage by guessing producers.** If no producer fires before a consumer AND the §1.5 row has no `Default`, that is an open-lineage error — surface it. Never silently retag the row's `Category` to `In` or invent a `Default` to suppress the failure.
|
|
1014
|
-
- **Do NOT populate `sourceTriggers` on `Out` rows.** PR 860's Phase 2 validator rejects `Out` + non-empty `sourceTriggers` (direction mismatch). An `In` row MAY carry a single `T<N>` to bind to a specific trigger (blank = primary), but its `sourceFields` MUST stay empty and a CSV is forbidden. For trigger-payload extraction, use `Category: Variable` (see §1.5 and [sdd-template-examples.md](../assets/templates/sdd-template-examples.md) Use Case 2).
|
|
1015
|
-
- **Do NOT use bare `sourceFields` paths when `sourceTriggers` is CSV.** Multi-trigger rows MUST use keyed `T<N>: <path>; T<M>: <path>` format with one entry per T-number. Mismatch is a Phase 2 validator error.
|
|
1016
|
-
- **Do NOT mix `->` and `=` operators on the same target case variable within one task's Outputs.** Each target appears in at most one row per task — no double-binding.
|
|
1017
|
-
- **Do NOT leak skill-internal vocabulary into SDD narrative cells.** `Pattern C`, `bridge`, `companion`, `io-binding`, `dispatcher`, `Finding #N`, `aliased into`, `auto-mint`, etc. belong inside skill references — not in `sdd.md` Descriptions or notes. See [sdd-template.md § Output Rules](../assets/templates/sdd-template.md).
|
|
1018
|
-
- **Do NOT downgrade a `high` review item to `medium` to pass the Approve gate.** The severity ladder is mechanical; downgrade only when the underlying issue actually resolves.
|
|
1019
|
-
- **Do NOT omit provenance on inferred values.** Silent inference reaches Phase 1 under Rule 2 trust — provenance is the audit trail.
|
|
1020
|
-
- **Do NOT alias a task output into an unrelated existing variable to satisfy lineage.** If a task produces a new datum, declare a §1.5 variable for it. Aliasing (`complianceStatus -> titleReviewStatus` with no `complianceStatus` row) closes lineage mechanically but corrupts meaning — see §Variable lineage closure output-naming rule.
|
|
1021
|
-
- **Do NOT emit a decision `action` button whose Behavior names a destination lane the case graph cannot reach.** Every routing button's variable+value must be keyed by a downstream entry / exit condition (§Finalization step 15, §Logical integrity step 5). A button that "routes to the X lane" while X is entered only by an external connector event is a dead branch.
|
|
1022
|
-
- **Do NOT use `user-selected-stage` without an upstream `wait-for-user` exit.** Deterministic rejection, approval, send-back, cancellation, and SLA routing use decision facts and guarded exits/entries instead.
|
|
1023
|
-
- **Do NOT mark correction/resubmission review or decision tasks `Run Only Once: Yes`.** New attempts need fresh producer tasks and neutral or attempt-scoped decision state.
|
|
1024
|
-
- **Do NOT author an `action` Input Schema field the resolved app does not expose.** Fields outside the app's `tasks describe` schema cannot bind (§Finalization step 16). Reusing one app across many tasks is correct **when it is code-switched** (distinct `actionType` per task, fields ⊆ the app schema — the normalized-action-app pattern a full case relies on); it is the substitute anti-pattern (`rev_substitute_app`) only without a distinct `actionType` or with non-bindable fields.
|
|
1025
|
-
- **Do NOT leave a resolved resource's required input unbound, and do NOT bind an output the resource never emits.** Once a task resolves to a live resource, every required declared input needs a `Binding` row (or `<UNRESOLVED>` + `high` review item) and every `-> caseVar` extract `Field` must exist in the resolved contract (§Resolved-resource I/O completeness, §Finalization step 19). A silently-missing required input faults the job at runtime.
|
|
1026
|
-
- **Do NOT declare a §1.5 Case Variable for an input that is just an upstream task's output.** Reference it directly — whole-value `<- "Stage"."Task".out` or in-expression `vars.$xref('Stage','Task','out')`. The emitting task is its own producer; a §1.5 row is only for renaming, custom `Default` / `Type`, or case-level state (§Variable lineage closure → Task-output direct reference).
|