@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.
Files changed (205) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.cursor-plugin/plugin.json +32 -0
  4. package/CODEOWNERS +25 -4
  5. package/README.md +1 -0
  6. package/assets/skill-status.json +8 -0
  7. package/assets/uip-catalog-snapshot.json +113 -41
  8. package/assets/uipath-icon.png +0 -0
  9. package/commands/install-permissions.md +1 -0
  10. package/package.json +3 -2
  11. package/skills/uipath-admin/SKILL.md +1 -1
  12. package/skills/uipath-admin/references/authorization/permission-catalog.md +61 -1
  13. package/skills/uipath-admin/references/authorization/role-management.md +3 -1
  14. package/skills/uipath-admin/references/diagnose/references/failure-modes.md +29 -4
  15. package/skills/uipath-admin/references/diagnose/references/troubleshooting-guide.md +13 -0
  16. package/skills/uipath-agents/SKILL.md +1 -0
  17. package/skills/uipath-agents/references/coded/capabilities/context-grounding.md +3 -3
  18. package/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails-recommend.md +6 -1
  19. package/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails.md +89 -1
  20. package/skills/uipath-agents/references/coded/embedding-in-flows.md +17 -1
  21. package/skills/uipath-agents/references/coded/frameworks/llamaindex-integration.md +64 -2
  22. package/skills/uipath-agents/references/coded/lifecycle/deployment.md +3 -0
  23. package/skills/uipath-agents/references/coded/lifecycle/environment-variables.md +90 -0
  24. package/skills/uipath-agents/references/coded/lifecycle/file-sync.md +3 -1
  25. package/skills/uipath-agents/references/coded/quickstart.md +10 -6
  26. package/skills/uipath-agents/references/lowcode/capabilities/guardrails/guardrails-recommend.md +20 -5
  27. package/skills/uipath-agents/references/lowcode/capabilities/guardrails/guardrails.md +13 -0
  28. package/skills/uipath-agents/references/lowcode/capabilities/inline-in-flow/inline-in-flow.md +1 -3
  29. package/skills/uipath-api-workflow/references/operating-published-workflows.md +17 -6
  30. package/skills/uipath-automationhub/SKILL.md +58 -0
  31. package/skills/uipath-automationhub/references/api-endpoints.md +140 -0
  32. package/skills/uipath-automationhub/references/get-process.md +69 -0
  33. package/skills/uipath-automationhub/references/publish-process.md +171 -0
  34. package/skills/uipath-coded-apps/SKILL.md +24 -11
  35. package/skills/uipath-coded-apps/references/commands-reference.md +29 -29
  36. package/skills/uipath-coded-apps/references/create-action-app.md +4 -0
  37. package/skills/uipath-coded-apps/references/create-web-app.md +10 -0
  38. package/skills/uipath-coded-apps/references/debug.md +16 -0
  39. package/skills/uipath-coded-apps/references/oauth-client-setup.md +3 -1
  40. package/skills/uipath-coded-apps/references/oauth-scopes.md +39 -4
  41. package/skills/uipath-coded-apps/references/pack-publish-deploy.md +37 -21
  42. package/skills/uipath-coded-apps/references/sdk/conversational-agent.md +2 -0
  43. package/skills/uipath-coded-apps/references/sdk/data-fabric.md +2 -0
  44. package/skills/uipath-coded-apps/references/sdk/orchestrator.md +2 -0
  45. package/skills/uipath-coded-apps/references/widgets/conversational-agent-chat.md +90 -0
  46. package/skills/uipath-coded-apps/references/widgets/datatable.md +97 -0
  47. package/skills/uipath-coded-apps/references/widgets/external-auth.md +97 -0
  48. package/skills/uipath-coded-apps/references/widgets/multi-file-upload.md +98 -0
  49. package/skills/uipath-coded-apps/references/widgets/pdf-viewer.md +122 -0
  50. package/skills/uipath-coded-apps/references/widgets/validation-station.md +1 -1
  51. package/skills/uipath-functions/SKILL.md +11 -0
  52. package/skills/uipath-insights/SKILL.md +52 -247
  53. package/skills/uipath-insights/references/filter-discovery-guide.md +106 -0
  54. package/skills/uipath-insights/references/investigation-playbook-guide.md +24 -16
  55. package/skills/uipath-insights/references/jobs-commands-guide.md +196 -53
  56. package/skills/uipath-ixp/SKILL.md +10 -4
  57. package/skills/uipath-ixp/references/cli-reference.md +59 -5
  58. package/skills/uipath-ixp/references/label-documents-guide.md +12 -5
  59. package/skills/uipath-maestro-bpmn/SKILL.md +27 -9
  60. package/skills/uipath-maestro-bpmn/references/diagnose/references/failure-modes.md +6 -3
  61. package/skills/uipath-maestro-bpmn/references/operate/CAPABILITY.md +1 -1
  62. package/skills/uipath-maestro-bpmn/references/operate/references/ship.md +9 -3
  63. package/skills/uipath-maestro-bpmn/references/registry-workflow.md +1 -1
  64. package/skills/uipath-maestro-bpmn/references/shared/local-metadata-regeneration-guide.md +18 -11
  65. package/skills/uipath-maestro-bpmn/references/structural-bpmn.md +13 -7
  66. package/skills/uipath-maestro-case/SKILL.md +138 -170
  67. package/skills/uipath-maestro-case/references/bindings-and-expressions.md +14 -1
  68. package/skills/uipath-maestro-case/references/bindings-v2-sync.md +25 -1
  69. package/skills/uipath-maestro-case/references/brownfield.md +7 -3
  70. package/skills/uipath-maestro-case/references/case-commands.md +63 -8
  71. package/skills/uipath-maestro-case/references/case-editing-operations.md +11 -8
  72. package/skills/uipath-maestro-case/references/case-schema.md +5 -3
  73. package/skills/uipath-maestro-case/references/case-spec-input-details.md +4 -0
  74. package/skills/uipath-maestro-case/references/connector-integration.md +3 -1
  75. package/skills/uipath-maestro-case/references/connector-trigger-impl.md +236 -0
  76. package/skills/uipath-maestro-case/references/connector-trigger-planning.md +300 -0
  77. package/skills/uipath-maestro-case/references/entry-points-sync.md +2 -0
  78. package/skills/uipath-maestro-case/references/evals/evals.json +33 -40
  79. package/skills/uipath-maestro-case/references/implementation.md +58 -13
  80. package/skills/uipath-maestro-case/references/phased-execution.md +87 -20
  81. package/skills/uipath-maestro-case/references/placeholder-tasks.md +3 -1
  82. package/skills/uipath-maestro-case/references/planning.md +26 -16
  83. package/skills/uipath-maestro-case/references/plugins/case/impl-json.md +2 -5
  84. package/skills/uipath-maestro-case/references/plugins/case/planning.md +3 -1
  85. package/skills/uipath-maestro-case/references/plugins/conditions/case-exit-conditions/impl-json.md +3 -1
  86. package/skills/uipath-maestro-case/references/plugins/conditions/case-exit-conditions/planning.md +5 -3
  87. package/skills/uipath-maestro-case/references/plugins/conditions/stage-entry-conditions/impl-json.md +4 -2
  88. package/skills/uipath-maestro-case/references/plugins/conditions/stage-entry-conditions/planning.md +6 -4
  89. package/skills/uipath-maestro-case/references/plugins/conditions/stage-exit-conditions/impl-json.md +6 -4
  90. package/skills/uipath-maestro-case/references/plugins/conditions/stage-exit-conditions/planning.md +6 -4
  91. package/skills/uipath-maestro-case/references/plugins/conditions/task-entry-conditions/impl-json.md +42 -3
  92. package/skills/uipath-maestro-case/references/plugins/conditions/task-entry-conditions/planning.md +6 -4
  93. package/skills/uipath-maestro-case/references/plugins/logging/impl-json.md +50 -32
  94. package/skills/uipath-maestro-case/references/plugins/sla/impl-json.md +2 -4
  95. package/skills/uipath-maestro-case/references/plugins/sla/planning.md +3 -1
  96. package/skills/uipath-maestro-case/references/plugins/stages/impl-json.md +1 -4
  97. package/skills/uipath-maestro-case/references/plugins/stages/planning.md +2 -0
  98. package/skills/uipath-maestro-case/references/plugins/tasks/action/impl-json.md +2 -0
  99. package/skills/uipath-maestro-case/references/plugins/tasks/action/planning.md +2 -0
  100. package/skills/uipath-maestro-case/references/plugins/tasks/agent/impl-json.md +2 -0
  101. package/skills/uipath-maestro-case/references/plugins/tasks/agent/planning.md +2 -0
  102. package/skills/uipath-maestro-case/references/plugins/tasks/api-workflow/impl-json.md +2 -0
  103. package/skills/uipath-maestro-case/references/plugins/tasks/api-workflow/planning.md +5 -3
  104. package/skills/uipath-maestro-case/references/plugins/tasks/case-management/impl-json.md +2 -0
  105. package/skills/uipath-maestro-case/references/plugins/tasks/case-management/planning.md +2 -0
  106. package/skills/uipath-maestro-case/references/plugins/tasks/connector-activity/impl-json.md +43 -13
  107. package/skills/uipath-maestro-case/references/plugins/tasks/connector-activity/planning.md +4 -2
  108. package/skills/uipath-maestro-case/references/plugins/tasks/connector-trigger/impl-json.md +10 -7
  109. package/skills/uipath-maestro-case/references/plugins/tasks/connector-trigger/planning.md +5 -3
  110. package/skills/uipath-maestro-case/references/plugins/tasks/create-inline-common.md +3 -1
  111. package/skills/uipath-maestro-case/references/plugins/tasks/process/impl-json.md +2 -0
  112. package/skills/uipath-maestro-case/references/plugins/tasks/process/planning.md +2 -0
  113. package/skills/uipath-maestro-case/references/plugins/tasks/rpa/impl-json.md +2 -0
  114. package/skills/uipath-maestro-case/references/plugins/tasks/rpa/planning.md +2 -0
  115. package/skills/uipath-maestro-case/references/plugins/tasks/wait-for-timer/impl-json.md +2 -0
  116. package/skills/uipath-maestro-case/references/plugins/tasks/wait-for-timer/planning.md +2 -0
  117. package/skills/uipath-maestro-case/references/plugins/triggers/event/impl-json.md +9 -6
  118. package/skills/uipath-maestro-case/references/plugins/triggers/event/planning.md +5 -3
  119. package/skills/uipath-maestro-case/references/plugins/triggers/manual/impl-json.md +1 -4
  120. package/skills/uipath-maestro-case/references/plugins/triggers/manual/planning.md +2 -0
  121. package/skills/uipath-maestro-case/references/plugins/triggers/timer/impl-json.md +1 -4
  122. package/skills/uipath-maestro-case/references/plugins/triggers/timer/planning.md +2 -0
  123. package/skills/uipath-maestro-case/references/plugins/variables/bindings/impl-json.md +3 -1
  124. package/skills/uipath-maestro-case/references/plugins/variables/global-vars/impl-json.md +40 -2
  125. package/skills/uipath-maestro-case/references/plugins/variables/global-vars/planning.md +12 -2
  126. package/skills/uipath-maestro-case/references/plugins/variables/io-binding/impl-json.md +8 -6
  127. package/skills/uipath-maestro-case/references/plugins/variables/io-binding/planning.md +17 -3
  128. package/skills/uipath-maestro-case/references/registry-discovery.md +9 -5
  129. package/skills/uipath-maestro-case/references/sla-response-shapes.md +3 -1
  130. package/skills/uipath-maestro-case/references/troubleshooting-guide.md +2 -0
  131. package/skills/uipath-maestro-case/scripts/audit_plan.py +231 -0
  132. package/skills/uipath-maestro-flow/references/author/CAPABILITY.md +8 -4
  133. package/skills/uipath-maestro-flow/references/author/references/editing-operations-cli.md +5 -3
  134. package/skills/uipath-maestro-flow/references/author/references/editing-operations-json.md +14 -4
  135. package/skills/uipath-maestro-flow/references/author/references/editing-operations.md +3 -3
  136. package/skills/uipath-maestro-flow/references/author/references/greenfield.md +12 -3
  137. package/skills/uipath-maestro-flow/references/author/references/planning-arch.md +17 -13
  138. package/skills/uipath-maestro-flow/references/author/references/planning-impl.md +1 -1
  139. package/skills/uipath-maestro-flow/references/author/references/plugins/agent/impl.md +49 -4
  140. package/skills/uipath-maestro-flow/references/author/references/plugins/connector/impl.md +59 -17
  141. package/skills/uipath-maestro-flow/references/author/references/plugins/connector-trigger/impl.md +3 -3
  142. package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl-connector.md +3 -1
  143. package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl-manual.md +3 -1
  144. package/skills/uipath-maestro-flow/references/author/references/plugins/http/impl.md +5 -2
  145. package/skills/uipath-maestro-flow/references/author/references/plugins/inline-agent/impl.md +31 -16
  146. package/skills/uipath-maestro-flow/references/author/references/plugins/ixp/impl.md +13 -4
  147. package/skills/uipath-maestro-flow/references/author/references/plugins/loop/impl.md +185 -25
  148. package/skills/uipath-maestro-flow/references/author/references/plugins/loop/planning.md +18 -10
  149. package/skills/uipath-maestro-flow/references/author/references/plugins/rpa/impl.md +9 -3
  150. package/skills/uipath-maestro-flow/references/author/references/plugins/terminate/impl.md +6 -3
  151. package/skills/uipath-maestro-flow/references/diagnose/references/failure-modes.md +68 -0
  152. package/skills/uipath-maestro-flow/references/shared/cli-commands.md +2 -1
  153. package/skills/uipath-maestro-flow/references/shared/file-format.md +36 -9
  154. package/skills/uipath-maestro-flow/references/shared/node-output-wiring.md +1 -1
  155. package/skills/uipath-maestro-flow/references/shared/ux-narration-and-todos.md +1 -1
  156. package/skills/uipath-maestro-flow/references/shared/variables-and-expressions.md +77 -20
  157. package/skills/uipath-planner/SKILL.md +30 -12
  158. package/skills/{uipath-maestro-case/assets/templates/sdd-template-examples.md → uipath-planner/assets/templates/case-sdd-examples.md} +18 -32
  159. package/skills/uipath-planner/assets/templates/case-sdd-template.md +289 -309
  160. package/skills/uipath-planner/references/case-design-lane-guide.md +288 -0
  161. package/skills/uipath-planner/references/multi-skill-patterns-guide.md +1 -1
  162. package/skills/uipath-planner/references/package-selection-guide.md +2 -2
  163. package/skills/uipath-planner/references/pdd-driven-lane-guide.md +5 -1
  164. package/skills/uipath-planner/references/product-selection-guide.md +2 -2
  165. package/skills/uipath-planner/references/sdd-generation-guide.md +16 -15
  166. package/skills/uipath-planner/scripts/audit_sdd.py +437 -0
  167. package/skills/uipath-platform/SKILL.md +7 -2
  168. package/skills/uipath-platform/references/data-fabric/choice-sets.md +1 -1
  169. package/skills/uipath-platform/references/data-fabric/data-fabric.md +1 -1
  170. package/skills/uipath-platform/references/data-fabric/entity-schema.md +37 -21
  171. package/skills/uipath-platform/references/data-fabric/file-attachments.md +1 -1
  172. package/skills/uipath-platform/references/guardrails/byo-configurations.md +205 -0
  173. package/skills/uipath-platform/references/traces/feedback.md +4 -2
  174. package/skills/uipath-platform/references/uip-commands.md +2 -2
  175. package/skills/uipath-review/SKILL.md +55 -52
  176. package/skills/uipath-review/references/agents/agent-grading-rubric.md +62 -40
  177. package/skills/uipath-review/references/agents/agents-coded-rules.md +7 -1
  178. package/skills/uipath-review/references/agents/agents-lowcode-rules.md +21 -2
  179. package/skills/uipath-review/references/agents/guardrails/coded-guardrails-review.md +78 -13
  180. package/skills/uipath-review/references/agents/guardrails/guardrails-review.md +11 -4
  181. package/skills/uipath-review/references/architecture-assessment-guide.md +1 -1
  182. package/skills/uipath-review/references/review-workflow-guide.md +19 -10
  183. package/skills/uipath-review/references/rule-catalog-workflow.md +6 -6
  184. package/skills/uipath-review/references/rule-format.md +1 -1
  185. package/skills/uipath-rpa/SKILL.md +1 -1
  186. package/skills/uipath-solution/SKILL.md +4 -4
  187. package/skills/uipath-solution/references/solution-overview.md +7 -2
  188. package/skills/uipath-tasks/SKILL.md +27 -1
  189. package/skills/uipath-tasks/references/task-catalogs.md +79 -0
  190. package/skills/uipath-tasks/references/task-data.md +45 -0
  191. package/skills/uipath-tasks/references/task-metadata.md +69 -0
  192. package/skills/uipath-test/SKILL.md +3 -3
  193. package/skills/uipath-test/references/test-result-report-guide.md +16 -1
  194. package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/ambiguous-selector.md +1 -1
  195. package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/scope-container-wrong-page.md +1 -1
  196. package/skills/uipath-troubleshoot/references/activity-packages/ui-automation/playbooks/verify-execution-failure.md +2 -2
  197. package/skills/uipath-troubleshoot/references/products/agents/playbooks/guardrail-violation.md +12 -0
  198. package/version-manifest.json +2 -2
  199. package/skills/uipath-maestro-case/assets/templates/sdd-template.md +0 -667
  200. package/skills/uipath-maestro-case/references/connector-trigger-common.md +0 -511
  201. package/skills/uipath-maestro-case/references/phase-0-interview.md +0 -279
  202. package/skills/uipath-maestro-case/references/sdd-generation-rules.md +0 -1026
  203. package/skills/uipath-review/references/agents/agent-common-issues.md +0 -401
  204. package/skills/uipath-review/references/agents/agent-review-checklist.md +0 -379
  205. /package/skills/{uipath-maestro-case → uipath-planner}/assets/templates/sdd-viewer.html +0 -0
@@ -1,279 +0,0 @@
1
- # Phase 0 — Interview Mode (case design)
2
-
3
- This file is a **thinking guide** for the agent: how to listen, assume, confirm once, and hand off fast when no `sdd.md` is provided. Phase 0 designs the case in the session's **in-memory model**; `sdd.md` is rendered from that model in parallel with the first build actions — a reference artifact, never a review gate.
4
-
5
- > **Authoritative for the interview path only.** Trigger detection, mode behavior, confirmation, resumption, output contract. **Content rules** (authority hierarchy, task-type override priority, render-required fields, variable lineage, review items, source ledger) live in [sdd-generation-rules.md](sdd-generation-rules.md). Phase 1 logic lives in [planning.md](planning.md). Phases 2–6 live in [phased-execution.md](phased-execution.md).
6
-
7
- ## Goal
8
-
9
- Design the case as an in-memory model shaped by [`assets/templates/sdd-template.md`](../assets/templates/sdd-template.md), confirm it in ONE user prompt, then start the build. Phase 0 is **best-assumption by default**: it decides everything it can from the user's words and documents, and *informs* the user of every decision — it does not interrogate. `sdd.md` renders from the confirmed model concurrently with the first build actions. For later sessions and re-runs the file is the contract (Rule 2: trust as written); within this session, the in-memory model that produced it drives the build.
10
-
11
- **The Phase 0 confirmation IS the plan-first approval surface.** If workspace or project rules require "show a plan before editing," satisfy that requirement by showing the structured §Confirm case-design summary below. Do not insert a separate generic implementation plan, "Build Plan," or "Approve this plan" checkpoint before §Confirm. A user "Yes" to a generic implementation plan is not a Build answer and must not create files.
12
-
13
- Phase 0 writes:
14
-
15
- - `sdd.md` — rendered once from the confirmed model, batched with the first build actions (or written and reported when the request was design-only).
16
- - `sdd-viewer.html` — optional, generated only on explicit request (§HTML preview).
17
- - `sdd.draft.md` — ONLY when the user explicitly asks for a draft to review; normal runs never create it. If the request explicitly says to get/save the draft and stop, show the Case Review and write the draft in the same response instead of asking for another approval. `tasks/registry-resolved.json` is a Phase 1 artifact — Phase 0 does not write it.
18
-
19
- **Fast path — no-build design + plan.** If the opening request explicitly asks to produce `sdd.md` plus `tasks/tasks.md` and stop before `caseplan.json`, follow §Build start's **No-build design + plan request** path immediately after sketching the case. This path is self-contained: do not read `planning.md`, plugin planning references, tenant registry/cache files, or the full `sdd-generation-rules.md` checklist. Read this file plus `assets/templates/sdd-template.md` only as needed, compose a concise full-template SDD, write `sdd.md`, create `tasks/`, write the compact plan, and stop. Keep the artifacts bounded: one short rationale paragraph per stage/task/SLA/exception choice is enough; do not expand optional examples, source-ledger prose, registry audit detail, or build-phase validation notes.
20
-
21
- ## When Phase 0 runs
22
-
23
- Strict binary trigger. Look for an `.md` file at the resolved path whose basename (case-insensitive) contains `sdd`. Examples that count: `sdd.md`, `loan-sdd.md`, `case_demo_sdd.md`, `./specs/onboarding-sdd.md`. Plain `.md` references without `sdd` in the name don't count.
24
-
25
- | State | Action |
26
- |---|---|
27
- | File present, basename = `sdd.md` | Skip Phase 0. Hand to Phase 1. |
28
- | File present, basename ≠ `sdd.md` | Copy contents to `./sdd.md` (preserve original at its path). Skip Phase 0. Hand to Phase 1. |
29
- | File absent, `sdd.draft.md` present | Resume (§Resumption). |
30
- | File absent, no draft | Run Phase 0 from scratch (§Entry). |
31
-
32
- If the user prompt names no `.md` reference, default candidate is `./sdd.md` — proceed on that assumption and record it as a decision; do not ask.
33
-
34
- ## Entry
35
-
36
- **If the user's request already describes the case** (any stages, work, trigger, domain, or attached docs), skip every entry prompt: print the roadmap from `SKILL.md § User-facing roadmap` and go straight to work — the request IS the first Listen input. **Only a bare request** ("create a case" with nothing else) gets the Listen opener after the roadmap. There is no entry menu; a user who has an `sdd.md` will say so, and abort is always a free-text away. If the same request also asks for `tasks.md`, do not read planning/plugin references yet; first show the Phase 0 Case Review and get the Build / Save approval.
37
-
38
- **No tenant work at Entry.** Nothing about the tenant is a prerequisite for designing the case — do not run login or `registry pull` up front. Grounding starts only when the case shows it needs it (§Tenant grounding).
39
-
40
- ## Tenant grounding — requirement-driven, one light pass, no questions
41
-
42
- Phase 0 grounds resources lazily, in parallel with the design, with a **single name-match pass** at most. Schema discovery (`tasks describe`, `case spec`) belongs to the build phases — never run it in Phase 0.
43
-
44
- 1. **Intake batch.** Read every supplied document in parallel. Extract named systems, resources, likely tasks, and roles.
45
- 2. **Requirement-driven kickoff.** For build runs only, the FIRST moment the sketch identifies tenant-bound work — a named system/resource/connector, or an inferred runnable/connector/action task — start the grounding chain as ONE background command, in the same batch as whatever is already running: `uip login status --output json && uip maestro case registry pull`. It resolves while sketching continues; a case with no tenant-bound items never pulls in Phase 0. Best-effort: never block on it, never surface its output unprompted; on failure, one plain-language line (§What to say while working), keep intended names, mark identities `resolve at build`, continue. If the harness cannot run background commands, run login → pull in the batch that composes the confirmation. **No-build runs skip grounding:** when the user explicitly asks to stop at a draft, final SDD, or implementation plan and not create `caseplan.json`, do not run login, registry, connection, schema, or user-discovery commands in Phase 0; preserve concrete intended names and mark identities `resolve at build`.
46
- 3. **Light match pass — join, never wait.** When composing the confirmation, check the chain. If the pull succeeded, run ONE cache lookup per named or inferred resource (`~/.uip/case-resources/<type>-index.json`; `action-apps-index.json` for HITL apps; `typecache-activities-index.json` / `typecache-triggers-index.json` for connectors) — all lookups in one parallel batch. With ≥ 4 lookups, use parallel read-only workers where supported (one per item or type family; cache reads only — never writes, never prompts, never login/pull; parent spot-verifies adopted identities). Bucket each result:
47
- - **Single confident match** (1 match across all folders, ≥ 1 shared name token) → adopt silently; shows as the task's resource in the confirmation with a decision line.
48
- - **Anything else** (multiple matches, cross-folder same-name, no token overlap, zero matches, 0 or > 1 enabled connections for a connector) → mark `resolve at build`. Do NOT ask, do NOT auto-pick among candidates, do NOT fetch schemas. Phase 1's discovery and its Rule 17 gate handle the choice with full authority.
49
-
50
- If the pull has NOT finished when the confirmation is ready, do not wait: present with `resolve at build` on the tenant-bound items and let the build reconcile — the confirmation is never delayed by the tenant.
51
-
52
- **Guardrails:** registry data is evidence, not requirements — never add/rename business work to match tenant inventory; never dump catalogs; keep type-specific portable names concrete (`Resolved Resource`, Action App title, `Child Case`) even when identity defers; a connector with zero connections is `resolve at build`, not a reason to change the task type. A no-build run does not need tenant evidence to be useful; the later build run owns authoritative identity resolution.
53
-
54
- ## Modes
55
-
56
- Three moves. **Listen** takes in everything offered; **Sketch** builds the complete case model by best assumption, recording every decision; **Confirm** shows the whole case once with the decisions taken and asks a single question — on a Build answer, the build starts and `sdd.md` is written alongside it (§Build start). Listen and Sketch loop freely as new context lands; there is no separate Resolve or Approve pass.
57
-
58
- ### Listen
59
-
60
- The opening move for a bare request. One message, one prompt:
61
-
62
- > Tell me about the case you want to build. What kicks it off, what stages does it move through, and how does it close out? Drop in any docs you have — paths, paste, or attach.
63
-
64
- What the agent does as input arrives:
65
-
66
- - **Reads everything mentioned.** Path, dragged file, named doc → read immediately, in parallel when multiple. "Everything in `~/process-docs/`" → `ls` + parallel Reads.
67
- - **Narrates content, not filenames.** One short line per doc about *what's in it*: `vendor-onboarding.md — 4 stages (Intake → Compliance → Finance → Activation), 2 personas, 8-hour SLA on Compliance.`
68
- - **Partial reads for huge docs.** Past ~2000 lines, read the first chunk, narrate the signal, decide if more is needed. Unreadable formats (`.docx`, `.pptx`, scanned PDFs) → one paste request; PDFs ≤ 10 pages read directly.
69
- - **Mid-flow docs are first-class.** New doc after the sketch exists → re-read, update the model, narrate the delta.
70
- - **Named systems seed grounding.** Deployed resources, apps, connectors, systems named by the user feed the §Tenant grounding light pass.
71
-
72
- Listen asks nothing beyond the opener. Gaps are filled by assumption in Sketch, not by questions.
73
-
74
- #### Domain-vocabulary capture (during Listen)
75
-
76
- Capture verbatim into the model: **roles** (exact casing — `CFO`, `Triage Nurse`), **domain nouns** (`Vendor` vs `Supplier` — never homogenize), **stage labels**, **decision outcomes** (`Approve` / `Decline` / `Needs Info`, not synonyms), **integration shortnames** (`Workday`, never "the HR system"). Provenance `verbatim:"<quote>"` per [sdd-generation-rules.md § Source ledger](sdd-generation-rules.md#source-ledger-provenance). Synonym drift is a fidelity defect ([§ Domain fidelity](sdd-generation-rules.md#domain-fidelity)).
77
-
78
- #### File / attachment / document detection (during Listen)
79
-
80
- When the user mentions `file`, `attachment`, `PDF`, `upload`, `evidence`, `receipt` (as artifact, not domain noun), pick the best-matching pattern from the indicators and record the decision — ask only if the user's own words point at two patterns at once:
81
-
82
- | Pattern | Indicator phrases | SDD shape |
83
- |---|---|---|
84
- | Caller pre-uploads at case start | "caller submits a PDF", "uploaded with the request" | `Category: In`, `Type: file` — Use Case 9; caller obligation surfaces in the confirmation. |
85
- | Connector downloads mid-case | "fetch the attachment from email", "pull from Drive / S3" | `Category: Variable`, `Type: file` from a task Outputs `->` row — Use Case 10. |
86
- | Stores URL/metadata, not bytes | "we just store the link", "we keep the document ID" | `Type: string` (URL) or `Type: jsonSchema` (metadata). NOT `file`. |
87
-
88
- ### Sketch — best assumption, every field
89
-
90
- Fill the complete SDD shape against [`sdd-template.md`](../assets/templates/sdd-template.md) from what Listen captured, deciding every open field by best assumption. Authority order per [sdd-generation-rules.md § Content authority hierarchy](sdd-generation-rules.md#content-authority-hierarchy) — platform schema and compliance constraints override user phrasing (apply the override silently; it becomes a decision line). Every non-verbatim value gets a source-ledger entry AND a line in the confirmation's `Decisions` block. Every stage, task, and configured SLA also gets a durable `Design Rationale` in the model explaining the kind/type, activation/sequencing, and routing/threshold choice; the confirmation summarizes it but does not replace it. The model lives in memory — **no draft file, no checkpoint writes**; `sdd.md` is written later at build start.
91
-
92
- **Assumption playbook** (former ask-list, now decided and disclosed):
93
-
94
- | Field | Best assumption |
95
- |---|---|
96
- | Trigger type | External system / portal / form / inbound event / record-created mentioned → **Connector Event** with that source (unprovisioned tenant object stays an event trigger — never downgrade to Manual); schedule/recurring → **Timer**; otherwise → **Manual**. |
97
- | Task type on ambiguous verbs (`review`, `approve`, `validate`, `decide`, …) | Named human role or judgment implied → `action`; framed as automated/AI → `agent`; truly even → `action` (keeps a human in the loop; the user can flip it in one correction). Compliance trigger phrase (HIPAA, ECOA, FINRA, "licensed X", …) → `action`, always ([§ Task-type override priority](sdd-generation-rules.md#task-type-override-priority)). |
98
- | "Manual" in-case work | Starts a new case → Manual trigger; optional worker-launched task → `adhoc` + `Required: No`; worker-chosen exception/rework lane → secondary stage with `user-selected-stage`. Pick by context; disclose. |
99
- | Case exit | Last primary stage completes (`required-stages-completed`, `Marks Case Complete: Yes`) unless the user described another close-out; alternate outcomes → non-completing case-exit rules. |
100
- | Stage exit ↔ Marks Complete pairing | Derive mechanically per sdd-template Key Rule 4 — never author an illegal pair. |
101
- | SLA | Only when the user mentioned timing; take their words literally ("about a day" → 1 day). No timing mentioned → `—`. For every SLA, decide scope, status, and response separately (§ SLA response model). No stated response → `notify-only` for both statuses; never invent a stage or task for a notification. |
102
- | Case name / prefix | PascalCase from the domain noun; prefix = 2–4 letter mechanical derivation. |
103
- | Personas | Named roles verbatim; none mentioned → single `Process Owner`. |
104
- | Optional fields untouched by the user | `—`. Never a question. |
105
- | Resources / connections | §Tenant grounding light pass: single confident match adopted, everything else `resolve at build`. |
106
-
107
- **Structure rules while sketching:** §1.5 declare-vs-xref — mint a §1.5 row ONLY for `In`/`Out` args, trigger-payload Variables, and state read by a condition or ≥ 2 consumers; a single upstream output feeding one consumer is referenced directly (`<- "Stage"."Task".out` / `vars.$xref(...)`), never relayed. Required fields (case name, prefix, ≥1 trigger, ≥1 stage, ≥1 task per stage with type, ≥1 case exit) must all be settled — by user input or by playbook assumption.
108
-
109
- **Conditional role / step gates must be inspectable.** When the source states a thresholded actor or step (for example, "Credit Analyst only over $5M; otherwise Underwriter"), model it as a guarded rule, task, recipient, or computed owner field AND preserve the business phrase close to the threshold in the draft/SDD text. A reviewer and a mechanical grep should be able to see both the actor name and threshold in one rule/task/rationale line, e.g. `Credit Analyst route when loanAmount > 5000000` or `Credit Analyst for loans >$5M; Underwriter otherwise`. Do not leave the gate only in a persona table or detached prose.
110
-
111
- **Other-path sweep — mandatory before confirmation.** Do not design only the primary flow and wait for the user to ask about alternatives later. Check the source for: 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. For each scenario, choose the correct model: interrupting secondary stage, terminal case-exit, non-completing case-exit, task-level branch, `adhoc` task, SLA notification only, or "not modeled" when the source explicitly rules it out. If the source names or strongly implies a scenario, model it by best assumption and disclose it in **Other Paths Considered**. If the source has no signal at all, spend the one clarifying call on a single bounded question before confirmation: "I don't see any other paths beyond the primary flow. Should I add standard paths for rework, cancellation/withdrawal, SLA escalation, or keep only the primary flow?"
112
-
113
- **Buildability musts** — settle all ten by assumption and surface each in the confirmation; they are where designs silently become unbuildable: (1) other-path trigger source (gate decision → `selected-stage-completed/-exited` + IF; person → `user-selected-stage` only with an upstream `wait-for-user` exit; external/global event → one `wait-for-connector` entry on the secondary stage; SLA at-risk/breach that requires case work → one `sla-status-change` entry whose target and SLA title — plus an at-risk escalation title for an at-risk row only — are declared in the SDD, while warning-only escalation stays a notification; interrupting flags on stage + entry rows; terminal `exit-only` vs `return-to-origin`; never duplicate global-event exits/tasks across primary stages); (2) every decision outcome routes somewhere — no dead-end status values, and an outcome that targets a lane keys that lane's entry; (3) every configure/decide task's output lands in a variable or direct reference; (4) every send/connector/agent's required inputs map to variables/literals/upstream outputs as far as knowable without schemas — the rest resolves at build; (5) conditional roles/steps become guarded rules + personas, not prose, with the actor and threshold visible together in the draft/SDD; (6) a critical-path connector failure gets a modeled other path when the user described failure handling — otherwise note it as an architect advisory; (7) manual-surface classification per the playbook: human-performed required work is `action`, optional user-launched work is `adhoc`; (8) intended resource names concrete, identities per the light pass; (9) every stage/task/SLA has durable rationale in the model, including why an ordered run is sequential, independent work is parallel, or parallel-after-predecessor siblings share one task set; (10) every non-start entry rule has a concrete producer/reference.
114
-
115
- **The one clarifying call (rare).** Ask before the confirmation ONLY when: (a) no case is inferable at all (empty or contentless request), (b) the user's own inputs contradict each other on a shape-changing field, (c) the user asked to be asked, or (d) the mandatory other-path sweep found no source signal at all. Batch everything into ONE AskUserQuestion call (≤ 4 questions). An unclear answer → take the best assumption, disclose it, move on — never re-press. Everything else: assume and inform.
116
-
117
- **Red flags — you're about to over-ask.** "I should confirm the trigger type" / "review could be action or agent, better ask" / "the SLA wording is vague" / "this resource has two matches" — STOP: the playbook decides all of these; the decision line in the confirmation is the user's chance to correct. The bar for a question is *contradiction or emptiness*, not uncertainty. Equally, there is NO size gate, no "approval before creating files", no lightweight mode — the only stops in Phase 0 are the one clarifying call (when earned), the confirmation itself, and the explicit-sign-off path.
118
-
119
- ### Confirm — the single checkpoint
120
-
121
- One structured **Case Review**, one question. Run the [sdd-generation-rules.md § Finalization](sdd-generation-rules.md#finalization) checks against the in-memory model FIRST — fix failures silently (they are the agent's defects, not the user's decisions); anything unfixable becomes a Review Flags row. This is the business approval surface and must be complete enough to approve the case behavior without opening `sdd.md`. It is a decision-first review, not a generic build plan or a compressed copy of the SDD.
122
-
123
- **Coverage map:** SDD Section 1 (case definition) → Case Snapshot + SLA and Escalations + Rules and Outcomes; SDD Section 2 (stages/tasks) → Primary Journey + Other Paths Considered + SLA and Escalations + Rules and Outcomes; SDD Section 3 (personas/views) → Case Snapshot + Human action labels in the journey/path tables + action apps in Resources and Integrations; SDD Section 4 (integrations) → Resources and Integrations. The Case Review intentionally omits the data contract, variables, and task inputs/outputs; those technical details remain complete in `sdd.md`. Anything with a High review item in the SDD model also appears in Review Flags.
124
-
125
- Start with `## Case Review: <Case name>`, then use this exact section order:
126
-
127
- 1. **Case Snapshot** — table `Item | Proposed design`. Include `Objective`, `Starts when`, `Primary personas`, `Successful completion`, `Other terminal outcomes`, and `SLA coverage`. Mark assumed values with `(assumed)`. Do not show the case ID prefix unless it affects a user decision.
128
- 2. **Primary Journey** — table `# | Stage | Purpose | Tasks | Starts when | Completes or exits when | Required? | SLA`. Include every primary stage once, in flow order. The `Tasks` cell names every task in execution order and shows task type, required/optional status, and activation/grouping. Preserve sequence and joins, for example: `Sequential: Capture request (Human action, required) → Validate request (RPA workflow, required)`; `Parallel: Risk review (Agent, required) + Compliance review (Human action, required)`; `After both: Make decision (Human action, required)`. Show event-triggered and manually triggered tasks explicitly.
129
- 3. **Other Paths Considered** — table `Scenario | Trigger or condition | Modeled as | Tasks | Interrupts active work? | Return or case outcome | Rationale`. Include every modeled exception, secondary stage, optional path, and alternate terminal route. Also include standard paths intentionally left unmodeled when that omission is a design decision. Name each path task with its type, required/optional status, and activation/grouping.
130
- 4. **SLA and Escalations** — table `Scope | SLA | Time target or condition | Status or threshold | Response | Response target | Interrupts active work? | Rationale`. Include one row per meaningful `(scope, SLA, status)` combination, including separate at-risk and breached rows when both exist. Use only `notify-only`, `start-task`, `enter-stage`, `exit-stage`, or `exit-case` as the response. Name the notification, task, stage, or outcome in `Response target`; use `N/A` for interrupting behavior when the response is `notify-only`, and `No` for `start-task`. Do not assume every breach creates an escalation stage. Show `None` when the case has no SLA.
131
- 5. **Rules and Outcomes** — table `Scope | Element | Rule | When | If | Then`. Include only business-significant routing, completion, and terminal rules. Omit generated sequencing already visible in `Tasks`, and do not repeat SLA rows unless the rule is needed to understand routing. Business conditions belong in `If`; do not add a data or variable column.
132
- 6. **Resources and Integrations** — table `Task | Intended resource or system | Resolution`. Include action apps, agents, RPA/processes, API workflows, child cases, connectors, and named external systems. `resolve at build` is acceptable; a missing row is not.
133
- 7. **Decisions I Made** — table `Decision | Why | Provenance`. Include every assumption, override, resource decision, task-type decision, activation/sequence decision, and intentionally omitted path. Use plain-language provenance (`you said "then"`; `compliance wording`; `no SLA mentioned`). Group decisions only when they share the same rationale and provenance. Do not repeat facts already clear in another section unless the choice itself needs approval.
134
- 8. **Review Flags** — table `Item to review | Why it matters | Default if accepted`. Show `None` when empty. Include unfixable Finalization findings, missing connections, unresolved high-impact choices, and any item the user should inspect before approving.
135
-
136
- After Review Flags, show the **Caller obligation** fixed text when any §1.5 row is `Category: In` + `Type: file` (JobAttachment pre-create contract; Studio Web's "Start case" dialog handles it automatically). Omit it otherwise. It is a conditional build obligation, not a ninth review section.
137
-
138
- **Product vocabulary.** Use these user-visible activation labels consistently: `Sequential`, `Parallel`, `Parallel after predecessor`, `Event-triggered`, `Manually triggered`, `Fan-in`, and `Conditional gate`. Map SDD/tasks.md `event-triggered` to `Event-triggered`, `adhoc` to `Manually triggered`, and `parallel-after-predecessor` to `Parallel after predecessor`. Prefer product-facing task labels such as `Human action`, `Agent`, `RPA workflow`, `API workflow`, and `Child case` over schema enum names in the review.
139
-
140
- **No duplicated review surfaces.** Each business decision appears once. Do not add a Data Contract section, variable rows, task input/output rows, a second stages list, or per-stage/per-task detail cards. Keep the full technical contract and per-stage/per-task detail in `sdd.md`.
141
-
142
- **Completeness gate.** The confirmation is incomplete unless it contains all eight sections, names every stage and task, covers every modeled and intentionally omitted path, shows every meaningful SLA response/status row, and includes Caller obligation when relevant. Do not ask `Build it...`, `Save...`, or any approval question until every section has been shown, even when a section says `None` or `Not used`. Do not replace this confirmation with a generic list of build steps, artifact names, output folder, validation commands, resource-placeholder caveats, or a summary that points to `sdd.md` for a missing business decision.
143
-
144
- Confirmation question (AskUserQuestion): `Build it — straight through` / `Build it — pause at the build preview` / `Change something`. The build choice records the Rule 11 preference — never re-asked mid-build. When ⚠ flagged items exist, relabel the first option `Build despite N flagged items — straight through`. For a **design-only** request swap the build options for `Save the design`; for a **draft** request, `Save as draft`. If the user's initial prompt already says to get/save a draft and stop, treat that as the `Save as draft` answer after the Case Review: write `sdd.draft.md` immediately and stop. The draft still uses SDD section/stage/task headings so a reviewer can inspect it directly.
145
-
146
- Corrections (`Change something` or any free text) update the model, re-run affected Finalization checks, and re-show ONLY the changed Case Review sections or rows: snapshot, journey, other paths, SLA responses, rules, resources, decisions, and review flags. A correction never restarts the walk. After showing the changed sections, include a short `Suggested next steps` line before the next confirmation prompt, e.g. `Suggested next steps: approve the updated design, choose preview pause if you want a visual checkpoint, or change another part of the case.`
147
-
148
- **Explicit sign-off requests** ("only after I approve", "I'll review before you build") suppress nothing about the flow but add one explicit approval prompt after the confirmation is accepted and before any file is created — honor it exactly.
149
-
150
- ### Template conformance gate — before `sdd.md` is written
151
-
152
- The exact rendered text for `sdd.md` must pass this gate before Write. This is a render check, not a second design review: run it against the in-memory text you are about to write; if the harness makes that impossible, do one shallow post-write structural Read before Phase 1. Do not use the read to redesign the case.
153
-
154
- Required shape:
155
-
156
- - First heading: `# SDD — {Case Name}`.
157
- - `## Table of Contents`.
158
- - Exact section headings: `## Section 1: Case Definition`, `## Section 2: Stages & Tasks`, `## Section 3: Personas & App Views`, `## Section 4: Integrations`.
159
- - Section 1 contains `### Case Metadata`, `### Case Triggers`, `### Case Exit Conditions`, and `### Case Variables`.
160
- - Every modeled primary stage has `### Stage {N}: {Stage Name}`; every modeled secondary stage has `### Secondary Stage: {Stage Name}`.
161
- - Every stage block contains `**Type:**`, `**Design Rationale:**`, `#### Stage Entry Conditions`, `#### Stage Exit Conditions`, and `#### Tasks`.
162
- - Every modeled primary-stage task has `##### Task {N}.{M}: {Task Name}`; every modeled secondary-stage task has numeric secondary numbering `##### Task S{K}.{M}: {Task Name}` where `K` is the secondary-stage order. Do not preserve letter prefixes such as `R.1`, `W.1`, `CC.1`, or `ESC.1`. Each task block contains `**Type:**`, `**Activation Mode:**`, `**Design Rationale:**`, `**Entry Condition:**`, exact marker `**Task envelope**` (no colon), and the matching type-specific detail block.
163
- - Section 3 contains `### Personas` and `### Process App Views`.
164
- - Section 4 contains the integration/resource family headings needed by the modeled task types, or an explicit `> None.` for empty families.
165
-
166
- Forbidden summary-only replacement sections at top level: `## Source`, `## Case Objective`, `## Actors And Systems`, `## Case Trigger`, `## Stages`, `## Business Rules`, `## Task Plan`, `## Resource Resolution`, `## Acceptance Scenarios`. Their presence as the main document structure means the SDD is a summary, not a template render. Also forbid source/build-mode/path narration such as `Source: /...`, `Build mode`, `output folder`, validation-command checklists, or "generated from requirements file" prose in the SDD body.
167
-
168
- If the gate fails, rewrite from the model and template before Phase 1. Do not proceed to planning on a summary SDD, even if a later `caseplan.json` would validate.
169
-
170
- ### Build start — SDD written alongside the build
171
-
172
- On a Build answer:
173
-
174
- 1. **Transition line** (§What to say while working): `Starting the build — the design doc will be saved alongside as a reference. Say stop anytime.`
175
- 2. **Render gate first:** compose the full SDD text from `assets/templates/sdd-template.md` and pass §Template conformance gate. This is the only allowed pre-write SDD check.
176
- 3. **One parallel batch:** Write `sdd.md` (full render from the confirmed in-memory model — direct Write, no draft, no rename) + `uip solution init <SolutionName>` (derived exactly as Phase 2 Step 6.0 does; its idempotent skip then applies) + Phase 1's Rule 3 `uip login status` → `registry pull` chain **only if Phase 0's pull did not already succeed this session** — a same-session successful pull is reused, never repeated (SKILL.md Rule 3 fast path). The SDD write is NEVER a standalone blocking turn — it always shares the batch with build actions.
177
- 4. **One artifact line** after the write lands: `Design doc saved to ./sdd.md — reference it anytime.`
178
- 5. Proceed into [planning.md](planning.md) Step 1 **from the in-memory model** — do not re-read the just-written `sdd.md` in this session except for the shallow template-conformance check described above. Re-read it only when working memory may be stale (context compaction, resumed session); then the file is authoritative (Rule 2). For later sessions and re-runs, `sdd.md` is the contract exactly as if the user wrote it.
179
- 6. If `sdd.md` appeared at the path since Phase 0 started, abort instead of overwriting.
180
-
181
- **Design-only request:** write `sdd.md`, report the path in one line, stop before Phase 1. **Draft request:** write `sdd.draft.md`, report, stop — never promote. **Free-text corrections stay first-class after the build starts:** treat one as a targeted edit to the affected artifact (model + `sdd.md` + downstream), narrate it in one line, continue.
182
-
183
- **No-build design + plan request:** when the prompt explicitly asks for `sdd.md` plus `tasks/tasks.md` and says to stop before creating `caseplan.json`, do not enter full Phase 1 and do not read `planning.md` or plugin planning references. If the same prompt already says to produce those artifacts and stop, treat it as the save instruction: show the Case Review, then write the full `sdd.md`, create `tasks/`, write compact `tasks/tasks.md`, and stop in the same response without asking for another approval. If the user only asked to review the plan first, wait for approval before writing. The compact plan is a review handoff for a later build run, so it omits registry-derived files and tenant evidence.
184
-
185
- For this no-build path, prefer progress over exhaustive internal auditing: once the case model covers the stated stages, tasks, global interrupts, SLAs, variables, resources, and rationales, write the artifacts. Do not run the full Finalization checklist, do not inspect schema/planning references, and do not spend a separate turn refining optional SDD prose. The artifact contract below plus the template conformance shape are the gate.
186
-
187
- The full-template requirement still applies in no-build mode: every task's `**Entry Condition:**` is followed by the template's `| WHEN | IF | Display Name |` table. Do not collapse an executable task gate into inline prose on the heading line; doing so drops the condition from the later planning handoff. A source rule that depends on a business attribute or threshold (for example, Engineering L4+ eligibility) must be represented in an executable condition, output mapping, or guarded recipient/assignment expression, not only in a Design Rationale.
188
-
189
- Compact `tasks/tasks.md` contract for this no-build path:
190
-
191
- - Use T-numbered entries for the case root, triggers, variables/arguments, stages, tasks, entry/exit/condition rules, and SLA/escalation rules that matter to the design.
192
- - Use machine-scannable task headings in the plan: `## T{N}: task "{Task Name}"`. Do not hide task T-entries under dotted subheadings such as `### T12.1`; nested prose is allowed under the H2, but the task entry itself uses a plain integer T-number and quotes the task name.
193
- - Stage entries include `stage-kind`, `entry-rule`, `exit-rule`, `interrupting`, `required`, `sla`, and `rationale`.
194
- - Task entries include `stage`, `type`, `activation-mode`, `entry-rule`, `lane`, `required`, `run-only-once`, `resource-intent`, `identity: resolve at build`, and `rationale`.
195
- - Preserve each task's confirmed SDD activation semantics exactly. A singleton task that starts with its stage remains `activation-mode: parallel` + `entry-rule: current-stage-entered`; a single-task stage or list position does not make it sequential. Use `sequential` + `runs-sequentially` only when the source explicitly requires an ordered run or dependency.
196
- - Sequential runs use consecutive single-task lane numbers; every task in the run has `activation-mode: sequential` and `entry-rule: runs-sequentially`.
197
- - When the prompt says every primary phase/stage has an SLA target, every named primary stage renders its own `#### Stage SLA` block with a concrete `**SLA Title:**` (prefer `<Stage Name> SLA`) and concrete at-risk/breach display names. Every `sla-status-change` reference uses those exact titles.
198
- - Global event/exception entries name exactly one interrupting secondary stage and the rule type (`wait-for-connector` or `sla-status-change`); do not duplicate those events across every primary stage. A `sla-status-change` entry names target + SLA title, plus an at-risk escalation title only for an at-risk row (a breach names the SLA alone) — all declared in the SDD and repeated verbatim in `tasks/tasks.md`.
199
- - Do not add `taskTypeId`, `activityTypeId`, `connectionId`, resolved schemas, `inputs`, `outputs`, `registry-resolved.json`, or `recipients-resolved.json`.
200
- - End the response with suggested next steps: review the SDD/plan, then run a later build to resolve tenant resources and create `caseplan.json`.
201
-
202
- ## HTML preview
203
-
204
- Optional, **on-request only** — never offered proactively. Available any time after the confirmation exists, including mid-build. Self-contained local HTML: Case Definition, collapsible Stages & Tasks with detail panels, Personas & App Views, Integrations; persona/type filters, unresolved-only and schema-view toggles, search, print stylesheet.
205
-
206
- Generation: Read [`assets/templates/sdd-viewer.html`](../assets/templates/sdd-viewer.html), replace the `__SDD_DATA__` token in its `<script id="sdd-data">` block with JSON serialized from the in-memory model (schema in the template's header comment — do NOT re-parse `sdd.md`), Write `./sdd-viewer.html` (Rule 13), tell the user: `Generated ./sdd-viewer.html — open it in a browser to review.` Failure → one-line notice, continue.
207
-
208
- ## Resumption
209
-
210
- `sdd.draft.md` at trigger time is a leftover from an on-request draft or an older run. AskUserQuestion (3 options):
211
-
212
- | Option | Effect |
213
- |---|---|
214
- | `Use the draft — finalize and continue` | Read it as the design input, run Finalization, show the §Confirm summary built from it, proceed normally. |
215
- | `Discard draft, start fresh` | Delete `sdd.draft.md`. Return to §Entry. |
216
- | `Abort` | Exit. No file changes. |
217
-
218
- If the user explicitly asks to finalize the existing draft, choose `Use the draft — finalize and continue` by assumption and do not ask a redundant resumption question. If AskUserQuestion is unavailable, make the same assumption unless the user asked to discard or abort. Finalization stays inside this skill: render the final `sdd.md` from the Case Management template and run the template conformance gate; never route `sdd.draft.md` finalization to `uipath-planner`.
219
-
220
- **Direct finalize fast path:** for a request that says the draft design is settled and asks for final `sdd.md` only, read `sdd.draft.md`, this resumption/gate section, and `assets/templates/sdd-template.md`; do not read planning/plugin references, do not inspect tenant resources, and do not spawn subagents. Treat the draft's stages, tasks, variables, conditions, SLAs, personas, and integration intent as the design source. Normalize structure and repair mechanically required rule pairings only: a schema-required companion rule is not a redesign. In particular, retain an authored `user-selected-stage` lane and give every eligible upstream primary stage a completing `required-tasks-completed` / `wait-for-user` / `Marks Stage Complete: Yes` exit; wording such as "any active case" means every primary stage. **This repair replaces that stage's existing `required-tasks-completed | exit-only | Yes` row; it never adds a second completion row or a `Marks Stage Complete: No` row.** `wait-for-user` is picker exposure, not automatic event/SLA/decision routing, so do not add any such trigger. Inventory the draft's stage and task headings in memory, then render one complete output block for each; never use `cp`, `mv`, `install`, `rsync`, or another shell copy/rename operation to turn the draft into the final artifact. Every existing stage gets `**Design Rationale:**`, `#### Stage Entry Conditions`, `#### Stage Exit Conditions`, and `#### Tasks`. Every existing task gets a full detail block, exact `**Task envelope**` marker followed by its Required/Run Only Once/Skip Condition table, and the matching type-specific detail block. Use concise default detail tables when the draft has only task summaries, but preserve exact stage and task display names (including punctuation), task types, variables, conditions, connector placeholders, and domain rules; structural normalization never renames business elements. A thresholded actor or policy condition in draft prose/personas must also become executable inside an existing task or stage — use a guarded owner/recipient/assignment expression or an `IF =js:` entry/exit condition that names the source attribute and threshold on the same line (for example, `=js:vars.loanAmount > 5000000 ? "Role:CreditAnalyst" : "Role:Underwriter"`). Persona prose and Design Rationale alone are not final, and this normalization must not add or rename a task. Secondary-stage task headings must be normalized to `##### Task S{secondaryStageIndex}.{taskIndex}: {Task Name}`; never preserve draft letter prefixes like `R.1`, `W.1`, `CC.1`, or `ESC.1`. For a large draft that needs batched writes, first Write the complete ordered document skeleton — Sections 1–4 and every primary/secondary stage heading in source order inside Section 2 — then Edit each stage/task block in place. Never append a deferred or omitted stage after `## Section 3`; insert it at its existing Section 2 heading before continuing. Before writing, confirm the output has the same ordered stage/task inventory and that every stage/task block carries its required literal markers: stage `**Design Rationale:**`, `#### Stage Entry Conditions`, `#### Stage Exit Conditions`, and `#### Tasks`; task `**Activation Mode:**`, `**Design Rationale:**`, `**Task envelope**`, and the matching type-specific detail heading. The audit also verifies the literal seven-column Case Variables header (`Name | Category | Type | sourceTriggers | sourceFields | Default | Description`), an explicit `**Interrupting:** Yes` or `No` line on every secondary stage, and preservation of every source policy expression in its owning task or stage block. Section 2 is incomplete until every inventoried stage and task appears before `## Section 3`. Then write `sdd.md` with Write/Edit and stop.
221
-
222
- ## What to say while working
223
-
224
- Silence and machinery-talk are both experience defects. Business-language lines only (§Forbidden vocabulary):
225
-
226
- - **Decisions narrate as they land** — the doc-read lines and inference one-liners during Listen/Sketch are the running commentary; the `Decisions I Made` table is the complete record.
227
- - **Before any stretch longer than ~a minute without a question**, one expectation-setter: `Design confirmed — building now. Nothing needed from you for a few minutes.`
228
- - **At milestones**, one line each, business terms only. Never per-tool-call narration.
229
- - **The moment tenant grounding fails**, one line: `I can't reach your UiPath tenant right now — I'll design with the names you give me and wire resources during the build.` Never let `resolve at build` rows be the first signal.
230
- - **When continuing past a point without a prompt** (build start, Rule 11 straight-through), name what happens next and how to interrupt.
231
-
232
- ## Forbidden vocabulary (user-visible output)
233
-
234
- The user sees a conversation that produces a case. Never surface in chat or in `sdd.md`:
235
-
236
- - `sdd.draft.md`, `tasks/registry-resolved.json`, internal filenames. (**Exceptions:** `sdd.md` (the artifact line) and `sdd-viewer.html` (at generation) are intentionally user-visible.)
237
- - `<UNRESOLVED>` markers in narration (file-only; chat says `resolve at build`).
238
- - `Listen`, `Sketch`, `Confirm`, mode names, `the validator`, `structural validation`, `the cache`, `the registry index`, `~/.uip/`.
239
- - `interview answers`, `from cache`, `REVIEW:`, `PDD`, or any chain-of-thought mechanics (echoes [`sdd-template.md`](../assets/templates/sdd-template.md) Output Rules).
240
-
241
- If the user asks how something works, explain in their language (cases, stages, tasks, triggers, SLAs, personas, connectors, exceptions).
242
-
243
- ## Failure modes
244
-
245
- | Symptom | Action |
246
- |---|---|
247
- | User says "skip" / "I don't know" during the one clarifying call | Best assumption + decision line. Optional field with no basis → `—`. |
248
- | Required field with no basis even for assumption | `<UNRESOLVED: <question>>` in the model + ⚠ flagged line in the confirmation. Phase 1 + post-build loop revisit. |
249
- | AskUserQuestion unavailable / unresponsive | One-line notice, continue best-assumption: every would-have-asked value gets a decision line; promotion scoped to the request — draft request → `sdd.draft.md` only; design-only → `sdd.md` on a clean Finalization pass, stop; build request → proceed, decisions carried in the confirmation text. |
250
- | Registry pull fails (CLI error, no auth) | One plain-language line immediately. Keep concrete portable names (`Resolved Resource`, Action App title, `Child Case`); mark identities/folders `resolve at build` (`<UNRESOLVED>` in the file) with paired review items. Phase 1 retries discovery. |
251
- | `sdd.md` already exists at path when interview begins | Should not happen — trigger detection exits Phase 0 first. If race, abort. Never overwrite. |
252
- | Viewer write fails | One-line notice, continue — chat is the approval surface. |
253
-
254
- ## Output contract — what the build sees
255
-
256
- - **In-session:** the confirmed in-memory model drives Phase 1 directly. `sdd.md` — written at build start (batched with build actions) — matches it exactly. A Phase 0 pull that succeeded this session is reused by Phase 1 (no re-pull — Rule 3 fast path). `tasks/registry-resolved.json` is produced by Phase 1, not Phase 0; light-pass matches are hints Phase 1 re-verifies against the session cache.
257
- - **Cross-session / re-run:** `sdd.md` is the sole contract, read per Rule 2 exactly as a user-provided file — including after context compaction. It may carry `<UNRESOLVED>` identities and `—` placeholders, but every process/agent/rpa/api-workflow task has a concrete `Resolved Resource`, every action a concrete Action App title, every case-management task a concrete `Child Case`.
258
- - `sdd-viewer.html` — on request only; ignored by Phase 1.
259
-
260
- ## Anti-patterns
261
-
262
- - **Do NOT overwrite an existing `sdd.md`.** Strict binary trigger; presence = trust-as-written.
263
- - **Do NOT interrogate.** No entry menu when the request has content, no per-dimension question walk, no confirming what the playbook decides. The budget is ONE clarifying call (when earned) + ONE confirmation. Uncertainty is resolved by assumption + disclosure, not by a question.
264
- - **Do NOT hide a decision.** Every assumption, override, and resource pick appears in the `Decisions I Made` table, grouped when that keeps the Case Review scannable. Best-assumption without disclosure is guessing.
265
- - **Do NOT substitute a generic build plan for the confirmation.** A "Build Plan" / "Approve this plan" list that names folders, artifacts, validation commands, primary stages, or resource caveats is not the Phase 0 confirmation. Show the required case-design sections first; only then may `Build it...` be asked.
266
- - **Do NOT plan only the happy path.** Run the other-path sweep before confirmation and show **Other Paths Considered** even when the outcome is "primary flow only by user choice."
267
- - **Do NOT write a summary `sdd.md`.** `sdd.md` must be the full template render, not the Case Review and not a build note. Missing Section 1/2/3/4 headings, missing per-stage/per-task detail blocks, or top-level summary sections are blocking render failures.
268
- - **Do NOT run schema discovery (`tasks describe` / `case spec`) or ambiguity prompts in Phase 0.** One light name-match pass only; everything unclear is `resolve at build` — Phase 1 owns authoritative resolution and its Rule 17 gate.
269
- - **Do NOT pull the tenant registry as a prerequisite, and never twice in one session.** The login/pull chain starts only when the case first shows tenant-bound work; a pull that succeeded this session is reused by Phase 1 (Rule 3 fast path). Equally, never delay the confirmation waiting for the pull.
270
- - **Do NOT auto-pick among multiple resource matches.** Cross-folder or multi-match = `resolve at build`, disclosed. (Single confident match adopts silently — that is the only silent pick.)
271
- - **Do NOT write `sdd.draft.md` or checkpoint files in a normal run.** The model lives in memory; drafts exist on explicit request only.
272
- - **Do NOT block the build on the SDD write, and do NOT re-read the just-written `sdd.md` in-session.** The write shares a batch with the first build actions; memory drives the build. Re-read only on staleness (compaction/resume).
273
- - **Do NOT ask the user to review or approve the `sdd.md` document.** The confirmation is the approval; the file is its artifact. An explicit sign-off request adds one prompt — nothing else does.
274
- - **Do NOT let discovery workers write skill artifacts, prompt the user, or run the registry pull.** Fan-out is read-only; the parent owns every write.
275
- - **Do NOT go silent during assembly and build start.** Post the expectation-setter and milestone lines from §What to say while working.
276
- - **Do NOT use `sed`/`awk`/`python`/`node` to mutate `sdd.md`, `sdd.draft.md`, or `sdd-viewer.html`.** Read + Write/Edit only (Rule 13).
277
- - **Do NOT invent gates or thresholds.** No size limit, no approval-before-creating-files, no complexity stop. The complete Phase 0 stop list: the one clarifying call (when earned), the confirmation, the explicit-sign-off prompt (when requested) — then the build's own gates (Phase 4 retry cap, debug, publish).
278
- - **Do NOT narrate filenames or schema mechanics.** See §Forbidden vocabulary.
279
- - **Do NOT ask for permission to read user-provided docs.** If the user named them, read them.