@uipath/delegate-sdk 1.203.1 → 1.203.2

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 (405) hide show
  1. package/README.md +41 -3
  2. package/dist/index.mjs +2 -2
  3. package/dist/skills/business-analysis/SKILL.md +722 -0
  4. package/dist/skills/business-analysis/as-is-capture.md +440 -0
  5. package/dist/skills/business-analysis/assets/progress.yaml +19 -0
  6. package/dist/skills/business-analysis/assets/task-list.md +34 -0
  7. package/dist/skills/business-analysis/automation-hub-publishing.md +47 -0
  8. package/dist/skills/business-analysis/bpmn-to-be-design.md +274 -0
  9. package/dist/skills/business-analysis/case-to-be-design.md +223 -0
  10. package/dist/skills/business-analysis/diagram-authoring.md +215 -0
  11. package/dist/skills/business-analysis/industry-gaps.md +134 -0
  12. package/dist/skills/business-analysis/interview-spine.md +297 -0
  13. package/dist/skills/business-analysis/locales/de.json +54 -0
  14. package/dist/skills/business-analysis/locales/en.json +54 -0
  15. package/dist/skills/business-analysis/locales/es-MX.json +54 -0
  16. package/dist/skills/business-analysis/locales/es.json +54 -0
  17. package/dist/skills/business-analysis/locales/fr.json +54 -0
  18. package/dist/skills/business-analysis/locales/ja.json +54 -0
  19. package/dist/skills/business-analysis/locales/ko.json +54 -0
  20. package/dist/skills/business-analysis/locales/pt-BR.json +54 -0
  21. package/dist/skills/business-analysis/locales/pt.json +54 -0
  22. package/dist/skills/business-analysis/locales/ro.json +54 -0
  23. package/dist/skills/business-analysis/locales/tr.json +54 -0
  24. package/dist/skills/business-analysis/locales/zh-CN.json +54 -0
  25. package/dist/skills/business-analysis/locales/zh-TW.json +54 -0
  26. package/dist/skills/business-analysis/pdd-generation.md +204 -0
  27. package/dist/skills/business-analysis/pdd-template.md +562 -0
  28. package/dist/skills/business-analysis/progress-presentation.json +13 -0
  29. package/dist/skills/business-analysis/recording-first.md +19 -0
  30. package/dist/skills/business-analysis/recording-processing.md +152 -0
  31. package/dist/skills/business-analysis/references/automation-hub-open-api.md +57 -0
  32. package/dist/skills/business-analysis/references/case-definition-spec.md +90 -0
  33. package/dist/skills/business-analysis/references/case-design-patterns/loan-origination-spec.md +86 -0
  34. package/dist/skills/business-analysis/references/component-type-mapping.md +52 -0
  35. package/dist/skills/business-analysis/references/uipath-products/case-management-schema.md +62 -0
  36. package/dist/skills/business-analysis/references/uipath-products/maestro-case-framework.md +65 -0
  37. package/dist/skills/business-analysis/references/uipath-products/maestro-case-management.md +49 -0
  38. package/dist/skills/business-analysis/research-offer.md +104 -0
  39. package/dist/skills/business-analysis/research-pass.md +149 -0
  40. package/dist/skills/business-analysis/scripts/assemble-pdd.ps1 +294 -0
  41. package/dist/skills/business-analysis/scripts/assemble-pdd.sh +453 -0
  42. package/dist/skills/business-analysis/scripts/check-phase-ready.ps1 +72 -0
  43. package/dist/skills/business-analysis/scripts/check-phase-ready.sh +98 -0
  44. package/dist/skills/business-analysis/scripts/lint-diagram.ps1 +524 -0
  45. package/dist/skills/business-analysis/scripts/lint-diagram.sh +519 -0
  46. package/dist/skills/business-analysis/scripts/stamp-pages.ps1 +363 -0
  47. package/dist/skills/business-analysis/scripts/stamp-pages.sh +360 -0
  48. package/dist/skills/business-analysis/to-be-design.md +199 -0
  49. package/dist/skills/confluence/SKILL.md +386 -0
  50. package/dist/skills/doc-coauthoring/SKILL.md +295 -0
  51. package/dist/skills/excel-architect/SKILL.macos.md +161 -0
  52. package/dist/skills/excel-architect/SKILL.md +180 -0
  53. package/dist/skills/excel-architect/SKILL.windows.md +61 -0
  54. package/dist/skills/excel-architect/archetypes/01-financial-model-advanced.md +332 -0
  55. package/dist/skills/excel-architect/archetypes/01-financial-model.md +248 -0
  56. package/dist/skills/excel-architect/archetypes/02-data-analysis.md +171 -0
  57. package/dist/skills/excel-architect/archetypes/03-tracking-dashboard.md +160 -0
  58. package/dist/skills/excel-architect/archetypes/04-project-planning.md +193 -0
  59. package/dist/skills/excel-architect/archetypes/05-simple-table.md +111 -0
  60. package/dist/skills/excel-architect/building.md +279 -0
  61. package/dist/skills/excel-architect/create.md +64 -0
  62. package/dist/skills/excel-architect/data-and-formulas.md +186 -0
  63. package/dist/skills/excel-architect/generator.md +272 -0
  64. package/dist/skills/excel-architect/macos/scripts/add-data-validation.applescript +242 -0
  65. package/dist/skills/excel-architect/macos/scripts/append-rows.applescript +310 -0
  66. package/dist/skills/excel-architect/macos/scripts/apply-conditional-format.applescript +565 -0
  67. package/dist/skills/excel-architect/macos/scripts/autofit-columns.applescript +79 -0
  68. package/dist/skills/excel-architect/macos/scripts/benchmark.sh +135 -0
  69. package/dist/skills/excel-architect/macos/scripts/check-compile.sh +30 -0
  70. package/dist/skills/excel-architect/macos/scripts/clear-range.applescript +152 -0
  71. package/dist/skills/excel-architect/macos/scripts/copy-paste.applescript +179 -0
  72. package/dist/skills/excel-architect/macos/scripts/create-chart.applescript +531 -0
  73. package/dist/skills/excel-architect/macos/scripts/create-pivot.applescript +443 -0
  74. package/dist/skills/excel-architect/macos/scripts/create-sheets.applescript +264 -0
  75. package/dist/skills/excel-architect/macos/scripts/create-workbook.applescript +92 -0
  76. package/dist/skills/excel-architect/macos/scripts/delete-chart.applescript +105 -0
  77. package/dist/skills/excel-architect/macos/scripts/delete-sheet.applescript +127 -0
  78. package/dist/skills/excel-architect/macos/scripts/filter-data.applescript +213 -0
  79. package/dist/skills/excel-architect/macos/scripts/find-replace.applescript +238 -0
  80. package/dist/skills/excel-architect/macos/scripts/format-range.applescript +531 -0
  81. package/dist/skills/excel-architect/macos/scripts/freeze-panes.applescript +133 -0
  82. package/dist/skills/excel-architect/macos/scripts/get-current-file.applescript +24 -0
  83. package/dist/skills/excel-architect/macos/scripts/get-sheet-dimensions.applescript +115 -0
  84. package/dist/skills/excel-architect/macos/scripts/health-check.applescript +704 -0
  85. package/dist/skills/excel-architect/macos/scripts/list-open-workbooks.applescript +80 -0
  86. package/dist/skills/excel-architect/macos/scripts/maximize-window.applescript +47 -0
  87. package/dist/skills/excel-architect/macos/scripts/merge-cells.applescript +227 -0
  88. package/dist/skills/excel-architect/macos/scripts/open-workbook.applescript +139 -0
  89. package/dist/skills/excel-architect/macos/scripts/read-range.applescript +267 -0
  90. package/dist/skills/excel-architect/macos/scripts/rename-sheet.applescript +231 -0
  91. package/dist/skills/excel-architect/macos/scripts/select-sheet.applescript +133 -0
  92. package/dist/skills/excel-architect/macos/scripts/set-tab-color.applescript +109 -0
  93. package/dist/skills/excel-architect/macos/scripts/sort-data.applescript +136 -0
  94. package/dist/skills/excel-architect/macos/scripts/undo.applescript +59 -0
  95. package/dist/skills/excel-architect/macos/scripts/workbook-lifecycle.applescript +149 -0
  96. package/dist/skills/excel-architect/macos/scripts/write-formula.applescript +225 -0
  97. package/dist/skills/excel-architect/macos/scripts/write-range.applescript +351 -0
  98. package/dist/skills/excel-architect/reference/api/advanced.md +381 -0
  99. package/dist/skills/excel-architect/reference/api/basic.md +747 -0
  100. package/dist/skills/excel-architect/reference/guides.md +348 -0
  101. package/dist/skills/excel-architect/reference/repair.md +174 -0
  102. package/dist/skills/excel-architect/reference/troubleshooting.md +46 -0
  103. package/dist/skills/excel-architect/scripting.md +266 -0
  104. package/dist/skills/excel-architect/styling-and-features.md +433 -0
  105. package/dist/skills/excel-architect/windows/api/composites.md +337 -0
  106. package/dist/skills/excel-architect/windows/api/scripting.md +139 -0
  107. package/dist/skills/excel-architect/windows/examples/level-1-workflows.md +485 -0
  108. package/dist/skills/excel-architect/windows/examples/level-2-advanced.md +690 -0
  109. package/dist/skills/excel-architect/windows/examples/level-3-scripting.md +337 -0
  110. package/dist/skills/github/SKILL.md +446 -0
  111. package/dist/skills/github/recipes/add-comment.md +85 -0
  112. package/dist/skills/github/recipes/check-pr-status.md +122 -0
  113. package/dist/skills/github/recipes/compare-branches.md +79 -0
  114. package/dist/skills/github/recipes/create-issue.md +103 -0
  115. package/dist/skills/github/recipes/create-pr.md +97 -0
  116. package/dist/skills/github/recipes/get-file-contents.md +76 -0
  117. package/dist/skills/github/recipes/get-last-commit.md +128 -0
  118. package/dist/skills/github/recipes/list-my-open-prs.md +105 -0
  119. package/dist/skills/github/recipes/list-recent-commits.md +84 -0
  120. package/dist/skills/github/recipes/search-issues.md +115 -0
  121. package/dist/skills/google-workspace/SKILL.md +217 -0
  122. package/dist/skills/google-workspace/services/calendar.md +311 -0
  123. package/dist/skills/google-workspace/services/docs.md +426 -0
  124. package/dist/skills/google-workspace/services/drive.md +504 -0
  125. package/dist/skills/google-workspace/services/gmail.md +466 -0
  126. package/dist/skills/google-workspace/services/sheets.md +370 -0
  127. package/dist/skills/internal-comms/SKILL.md +35 -0
  128. package/dist/skills/internal-comms/examples/3p-updates.md +47 -0
  129. package/dist/skills/internal-comms/examples/company-newsletter.md +65 -0
  130. package/dist/skills/internal-comms/examples/faq-answers.md +30 -0
  131. package/dist/skills/internal-comms/examples/general-comms.md +15 -0
  132. package/dist/skills/jira/SKILL.md +397 -0
  133. package/dist/skills/jira/recipes/add-comment.md +123 -0
  134. package/dist/skills/jira/recipes/assign-issue.md +157 -0
  135. package/dist/skills/jira/recipes/create-issue.md +274 -0
  136. package/dist/skills/jira/recipes/get-issue-details.md +154 -0
  137. package/dist/skills/jira/recipes/list-projects.md +151 -0
  138. package/dist/skills/jira/recipes/my-issues.md +180 -0
  139. package/dist/skills/jira/recipes/search-issues.md +215 -0
  140. package/dist/skills/jira/recipes/transition-issue.md +154 -0
  141. package/dist/skills/jira/recipes/troubleshooting.md +387 -0
  142. package/dist/skills/knowledge-base/SKILL.md +289 -0
  143. package/dist/skills/media-tools/SKILL.md +204 -0
  144. package/dist/skills/media-tools/references/encode-runbook.md +24 -0
  145. package/dist/skills/media-tools/references/resolve-binaries.md +81 -0
  146. package/dist/skills/media-tools/scripts/macos/ff-launch.sh +22 -0
  147. package/dist/skills/media-tools/scripts/macos/ff-poll.sh +10 -0
  148. package/dist/skills/media-tools/scripts/windows/ff-launch.ps1 +34 -0
  149. package/dist/skills/media-tools/scripts/windows/ff-poll.ps1 +20 -0
  150. package/dist/skills/office-download/SKILL.md +161 -0
  151. package/dist/skills/outlook-365/SKILL.macos.md +331 -0
  152. package/dist/skills/outlook-365/SKILL.md +171 -0
  153. package/dist/skills/outlook-365/SKILL.windows.md +124 -0
  154. package/dist/skills/outlook-365/api/bulk-email-operations.md +178 -0
  155. package/dist/skills/outlook-365/api/check-availability.md +87 -0
  156. package/dist/skills/outlook-365/api/create-inbox-rule.md +182 -0
  157. package/dist/skills/outlook-365/api/download-attachments.md +149 -0
  158. package/dist/skills/outlook-365/api/find-and-email-contact.md +185 -0
  159. package/dist/skills/outlook-365/api/manage-calendar-events.md +189 -0
  160. package/dist/skills/outlook-365/api/organize-with-folders.md +178 -0
  161. package/dist/skills/outlook-365/api/reply-to-conversation.md +68 -0
  162. package/dist/skills/outlook-365/api/schedule-meeting.md +73 -0
  163. package/dist/skills/outlook-365/api/search-and-read-email.md +93 -0
  164. package/dist/skills/outlook-365/api/send-email-with-attachments.md +94 -0
  165. package/dist/skills/outlook-365/api/send-email.md +396 -0
  166. package/dist/skills/outlook-365/api/set-out-of-office.md +196 -0
  167. package/dist/skills/outlook-365/macos/scripts/bulk-operations.applescript +429 -0
  168. package/dist/skills/outlook-365/macos/scripts/calendar.applescript +642 -0
  169. package/dist/skills/outlook-365/macos/scripts/contacts.applescript +635 -0
  170. package/dist/skills/outlook-365/macos/scripts/helpers.applescript +227 -0
  171. package/dist/skills/outlook-365/macos/scripts/read-emails.applescript +299 -0
  172. package/dist/skills/outlook-365/macos/scripts/search-emails.applescript +339 -0
  173. package/dist/skills/outlook-365/macos/scripts/send-email.applescript +245 -0
  174. package/dist/skills/outlook-365/uia/BASIC_OPERATIONS.md +278 -0
  175. package/dist/skills/outlook-365/uia/CALENDAR_OPERATIONS.md +386 -0
  176. package/dist/skills/outlook-365/uia/COMPOSE_EMAIL.md +426 -0
  177. package/dist/skills/outlook-365/uia/README.md +75 -0
  178. package/dist/skills/outlook-365/windows/com/bulk-operations.ps1 +241 -0
  179. package/dist/skills/outlook-365/windows/com/calendar.ps1 +227 -0
  180. package/dist/skills/outlook-365/windows/com/contacts.ps1 +270 -0
  181. package/dist/skills/outlook-365/windows/com/helpers.ps1 +158 -0
  182. package/dist/skills/outlook-365/windows/com/read-emails.ps1 +115 -0
  183. package/dist/skills/outlook-365/windows/com/search-emails.ps1 +141 -0
  184. package/dist/skills/outlook-365/windows/com/send-email.ps1 +121 -0
  185. package/dist/skills/pdf-architect/SKILL.md +640 -0
  186. package/dist/skills/powerpoint-architect/SKILL.macos.md +271 -0
  187. package/dist/skills/powerpoint-architect/SKILL.md +853 -0
  188. package/dist/skills/powerpoint-architect/SKILL.windows.md +458 -0
  189. package/dist/skills/powerpoint-architect/custom_themes.md +141 -0
  190. package/dist/skills/powerpoint-architect/editing-guide.md +424 -0
  191. package/dist/skills/powerpoint-architect/generator-reference.md +668 -0
  192. package/dist/skills/powerpoint-architect/images-guide.md +207 -0
  193. package/dist/skills/powerpoint-architect/issue-fix-mapping.md +768 -0
  194. package/dist/skills/powerpoint-architect/macos/scripts/add-html-to-slide.applescript +389 -0
  195. package/dist/skills/powerpoint-architect/macos/scripts/add-slide.applescript +255 -0
  196. package/dist/skills/powerpoint-architect/macos/scripts/add-speaker-notes.applescript +132 -0
  197. package/dist/skills/powerpoint-architect/macos/scripts/add-text.applescript +245 -0
  198. package/dist/skills/powerpoint-architect/macos/scripts/apply-slide-layout.applescript +80 -0
  199. package/dist/skills/powerpoint-architect/macos/scripts/apply-theme.applescript +122 -0
  200. package/dist/skills/powerpoint-architect/macos/scripts/autofit-placeholders.applescript +62 -0
  201. package/dist/skills/powerpoint-architect/macos/scripts/close-presentation.applescript +24 -0
  202. package/dist/skills/powerpoint-architect/macos/scripts/copy-slides.applescript +303 -0
  203. package/dist/skills/powerpoint-architect/macos/scripts/create-chart-with-data.applescript +305 -0
  204. package/dist/skills/powerpoint-architect/macos/scripts/create-with-theme.applescript +56 -0
  205. package/dist/skills/powerpoint-architect/macos/scripts/delete-slides.applescript +137 -0
  206. package/dist/skills/powerpoint-architect/macos/scripts/export-presentation.applescript +100 -0
  207. package/dist/skills/powerpoint-architect/macos/scripts/extract-slide-data.applescript +138 -0
  208. package/dist/skills/powerpoint-architect/macos/scripts/format-shape.applescript +192 -0
  209. package/dist/skills/powerpoint-architect/macos/scripts/format-slide-content.applescript +336 -0
  210. package/dist/skills/powerpoint-architect/macos/scripts/get-current-slide-number.applescript +38 -0
  211. package/dist/skills/powerpoint-architect/macos/scripts/get-file-path.applescript +94 -0
  212. package/dist/skills/powerpoint-architect/macos/scripts/get-layout-elements.applescript +141 -0
  213. package/dist/skills/powerpoint-architect/macos/scripts/get-layouts.applescript +58 -0
  214. package/dist/skills/powerpoint-architect/macos/scripts/get-opened-files.applescript +50 -0
  215. package/dist/skills/powerpoint-architect/macos/scripts/get-presentation-info.applescript +150 -0
  216. package/dist/skills/powerpoint-architect/macos/scripts/get-recent-files.applescript +68 -0
  217. package/dist/skills/powerpoint-architect/macos/scripts/get-slide-count.applescript +37 -0
  218. package/dist/skills/powerpoint-architect/macos/scripts/get-slide-info.applescript +105 -0
  219. package/dist/skills/powerpoint-architect/macos/scripts/health-check.applescript +690 -0
  220. package/dist/skills/powerpoint-architect/macos/scripts/insert-shape.applescript +188 -0
  221. package/dist/skills/powerpoint-architect/macos/scripts/insert-table.applescript +112 -0
  222. package/dist/skills/powerpoint-architect/macos/scripts/insert-text-box.applescript +225 -0
  223. package/dist/skills/powerpoint-architect/macos/scripts/manage-image.applescript +486 -0
  224. package/dist/skills/powerpoint-architect/macos/scripts/maximize-window.applescript +48 -0
  225. package/dist/skills/powerpoint-architect/macos/scripts/navigate-to-slide.applescript +84 -0
  226. package/dist/skills/powerpoint-architect/macos/scripts/open-presentation.applescript +38 -0
  227. package/dist/skills/powerpoint-architect/macos/scripts/reorder-slides.applescript +106 -0
  228. package/dist/skills/powerpoint-architect/macos/scripts/replace-text.applescript +193 -0
  229. package/dist/skills/powerpoint-architect/macos/scripts/save-presentation.applescript +54 -0
  230. package/dist/skills/powerpoint-architect/macos/scripts/set-animation.applescript +203 -0
  231. package/dist/skills/powerpoint-architect/macos/scripts/set-transition.applescript +130 -0
  232. package/dist/skills/powerpoint-architect/visual-styling-guide.md +206 -0
  233. package/dist/skills/powerpoint-architect/windows/api/advanced.md +317 -0
  234. package/dist/skills/powerpoint-architect/windows/api/basic.md +392 -0
  235. package/dist/skills/powerpoint-architect/windows/examples/10-slide-presentation.md +140 -0
  236. package/dist/skills/powerpoint-architect/windows/examples/custom-theme-workflow.md +219 -0
  237. package/dist/skills/powerpoint-architect/windows/examples/level-1-workflows.md +531 -0
  238. package/dist/skills/powerpoint-architect/windows/examples/level-2-scripting.md +239 -0
  239. package/dist/skills/powerpoint-architect/windows/scripts/create-with-theme.ps1 +81 -0
  240. package/dist/skills/project-task-list/SKILL.md +174 -0
  241. package/dist/skills/slack-operation/SKILL.md +97 -0
  242. package/dist/skills/slack-operation/api/advanced-api/GUIDE.md +277 -0
  243. package/dist/skills/slack-operation/api/search-and-read/EXAMPLE.md +75 -0
  244. package/dist/skills/slack-operation/api/search-and-read/GUIDE.md +108 -0
  245. package/dist/skills/slack-operation/api/send-message/EXAMPLE.md +112 -0
  246. package/dist/skills/slack-operation/api/send-message/GUIDE.md +63 -0
  247. package/dist/skills/slack-operation/api/share-files/EXAMPLE.md +94 -0
  248. package/dist/skills/slack-operation/api/share-files/GUIDE.md +63 -0
  249. package/dist/skills/slack-operation/ui/desktop-automation/GUIDE.md +55 -0
  250. package/dist/skills/system-diagnostics/SKILL.md +263 -0
  251. package/dist/skills/teams-operation/SKILL.md +79 -0
  252. package/dist/skills/teams-operation/api/advanced-api/GUIDE.md +234 -0
  253. package/dist/skills/teams-operation/api/meetings/EXAMPLE.md +63 -0
  254. package/dist/skills/teams-operation/api/meetings/GUIDE.md +52 -0
  255. package/dist/skills/teams-operation/api/search-and-read/EXAMPLE.md +72 -0
  256. package/dist/skills/teams-operation/api/search-and-read/GUIDE.md +54 -0
  257. package/dist/skills/teams-operation/api/send-message/EXAMPLE.md +92 -0
  258. package/dist/skills/teams-operation/api/send-message/GUIDE.md +60 -0
  259. package/dist/skills/teams-operation/ui/desktop-automation/GUIDE.md +66 -0
  260. package/dist/skills/transcribe-media/SKILL.md +142 -0
  261. package/dist/skills/uipath-integrations/SKILL.md +370 -0
  262. package/dist/skills/uipath-integrations/reference/connectors.md +331 -0
  263. package/dist/skills/uipath-integrations/reference/endpoints.md +220 -0
  264. package/dist/skills/uipath-integrations/reference/errors.md +211 -0
  265. package/dist/skills/uipath-integrations/reference/metadata.md +317 -0
  266. package/dist/skills/uipath-integrations/reference/operations.md +297 -0
  267. package/dist/skills/uipath-orchestrator/SKILL.md +312 -0
  268. package/dist/skills/uipath-orchestrator/recipes/assets.md +282 -0
  269. package/dist/skills/uipath-orchestrator/recipes/audit-logs.md +215 -0
  270. package/dist/skills/uipath-orchestrator/recipes/buckets.md +205 -0
  271. package/dist/skills/uipath-orchestrator/recipes/jobs.md +286 -0
  272. package/dist/skills/uipath-orchestrator/recipes/list-folders.md +207 -0
  273. package/dist/skills/uipath-orchestrator/recipes/queue-items.md +292 -0
  274. package/dist/skills/uipath-orchestrator/recipes/queues.md +232 -0
  275. package/dist/skills/uipath-orchestrator/recipes/releases.md +212 -0
  276. package/dist/skills/uipath-orchestrator/recipes/robots-sessions.md +274 -0
  277. package/dist/skills/uipath-orchestrator/recipes/schedules.md +280 -0
  278. package/dist/skills/uipath-orchestrator/reference/endpoints.md +85 -0
  279. package/dist/skills/uipath-orchestrator/reference/schemas.md +153 -0
  280. package/dist/skills/uipath-taskautomation/SKILL.md +310 -0
  281. package/dist/skills/uipath-taskautomation/assets/CodedWorkflow.template.cs +98 -0
  282. package/dist/skills/uipath-taskautomation/assets/ExampleWorkflow.cs +146 -0
  283. package/dist/skills/uipath-taskautomation/references/action-activity-map.json +32 -0
  284. package/dist/skills/uipath-taskautomation/references/action-activity-map.md +44 -0
  285. package/dist/skills/uipath-taskautomation/references/app-profiles.md +63 -0
  286. package/dist/skills/uipath-taskautomation/references/automation-spec.md +88 -0
  287. package/dist/skills/uipath-taskautomation/references/coded-reference/assets/before-after-hooks-template.md +115 -0
  288. package/dist/skills/uipath-taskautomation/references/coded-reference/assets/codedworkflow-template.md +186 -0
  289. package/dist/skills/uipath-taskautomation/references/coded-reference/assets/helper-utility-template.md +22 -0
  290. package/dist/skills/uipath-taskautomation/references/coded-reference/assets/json-template.md +91 -0
  291. package/dist/skills/uipath-taskautomation/references/coded-reference/assets/testcase-template.md +92 -0
  292. package/dist/skills/uipath-taskautomation/references/coded-reference/cli-reference.md +249 -0
  293. package/dist/skills/uipath-taskautomation/references/coded-reference/coded/codedworkflow-reference.md +275 -0
  294. package/dist/skills/uipath-taskautomation/references/coded-reference/coded/coding-guidelines.md +229 -0
  295. package/dist/skills/uipath-taskautomation/references/coded-reference/coded/inspect-package-guide.md +81 -0
  296. package/dist/skills/uipath-taskautomation/references/coded-reference/coded/integration-service-guide.md +507 -0
  297. package/dist/skills/uipath-taskautomation/references/coded-reference/coded/operations-guide.md +410 -0
  298. package/dist/skills/uipath-taskautomation/references/coded-reference/coded/third-party-packages-guide.md +67 -0
  299. package/dist/skills/uipath-taskautomation/references/coded-reference/data-manipulation-guide.md +110 -0
  300. package/dist/skills/uipath-taskautomation/references/coded-reference/environment-setup.md +194 -0
  301. package/dist/skills/uipath-taskautomation/references/coded-reference/error-handling-guide.md +195 -0
  302. package/dist/skills/uipath-taskautomation/references/coded-reference/powershell-interop-guide.md +57 -0
  303. package/dist/skills/uipath-taskautomation/references/coded-reference/project-structure-guide.md +114 -0
  304. package/dist/skills/uipath-taskautomation/references/coded-reference/project-structure.md +126 -0
  305. package/dist/skills/uipath-taskautomation/references/coded-reference/uia-elements-interaction-guide.md +109 -0
  306. package/dist/skills/uipath-taskautomation/references/coded-reference/validation-guide.md +147 -0
  307. package/dist/skills/uipath-taskautomation/references/coded-workflow-authoring.md +219 -0
  308. package/dist/skills/uipath-taskautomation/references/profiling-output.md +80 -0
  309. package/dist/skills/uipath-taskautomation/references/reliability-guide.md +83 -0
  310. package/dist/skills/uipath-taskautomation/references/task-automation-cheatsheet.md +272 -0
  311. package/dist/skills/uipath-taskautomation/references/template-preflight.md +17 -0
  312. package/dist/skills/uipath-workflow-documenter/SKILL.md +430 -0
  313. package/dist/skills/uipath-workflow-documenter/layouts/pdd-template.md +265 -0
  314. package/dist/skills/uipath-workflow-documenter/routines/from-orchestrator.md +11 -0
  315. package/dist/skills/uipath-workflow-documenter/routines/from-workflow.md +11 -0
  316. package/dist/skills/word-architect/SKILL.macos.md +147 -0
  317. package/dist/skills/word-architect/SKILL.md +502 -0
  318. package/dist/skills/word-architect/SKILL.windows.md +55 -0
  319. package/dist/skills/word-architect/api/advanced.md +522 -0
  320. package/dist/skills/word-architect/api/basic.md +378 -0
  321. package/dist/skills/word-architect/api/expert.md +302 -0
  322. package/dist/skills/word-architect/generation.md +308 -0
  323. package/dist/skills/word-architect/layouts/01-professional.md +168 -0
  324. package/dist/skills/word-architect/layouts/02-educational-kids.md +354 -0
  325. package/dist/skills/word-architect/layouts/03-academic.md +83 -0
  326. package/dist/skills/word-architect/layouts/04-creative.md +242 -0
  327. package/dist/skills/word-architect/layouts/05-operational.md +94 -0
  328. package/dist/skills/word-architect/macos/scripts/apply-heading-style.applescript +215 -0
  329. package/dist/skills/word-architect/macos/scripts/apply-style.applescript +272 -0
  330. package/dist/skills/word-architect/macos/scripts/autofit-tables.applescript +53 -0
  331. package/dist/skills/word-architect/macos/scripts/close-document.applescript +287 -0
  332. package/dist/skills/word-architect/macos/scripts/create-chart-with-data.applescript +379 -0
  333. package/dist/skills/word-architect/macos/scripts/create-chart.applescript +191 -0
  334. package/dist/skills/word-architect/macos/scripts/delete-selection.applescript +223 -0
  335. package/dist/skills/word-architect/macos/scripts/export-document.applescript +167 -0
  336. package/dist/skills/word-architect/macos/scripts/extract-table.applescript +168 -0
  337. package/dist/skills/word-architect/macos/scripts/find-by-style.applescript +173 -0
  338. package/dist/skills/word-architect/macos/scripts/find-text.applescript +199 -0
  339. package/dist/skills/word-architect/macos/scripts/format-table.applescript +234 -0
  340. package/dist/skills/word-architect/macos/scripts/format-text.applescript +431 -0
  341. package/dist/skills/word-architect/macos/scripts/get-document-properties.applescript +95 -0
  342. package/dist/skills/word-architect/macos/scripts/get-document-structure.applescript +371 -0
  343. package/dist/skills/word-architect/macos/scripts/get-header-footer-text.applescript +106 -0
  344. package/dist/skills/word-architect/macos/scripts/get-images.applescript +166 -0
  345. package/dist/skills/word-architect/macos/scripts/get-opened-files.applescript +103 -0
  346. package/dist/skills/word-architect/macos/scripts/get-paragraph-bounds.applescript +133 -0
  347. package/dist/skills/word-architect/macos/scripts/get-paragraph-format.applescript +134 -0
  348. package/dist/skills/word-architect/macos/scripts/get-recent-files.applescript +82 -0
  349. package/dist/skills/word-architect/macos/scripts/get-styled-text.applescript +256 -0
  350. package/dist/skills/word-architect/macos/scripts/get-tables.applescript +126 -0
  351. package/dist/skills/word-architect/macos/scripts/get-text-formatting.applescript +224 -0
  352. package/dist/skills/word-architect/macos/scripts/get-text.applescript +383 -0
  353. package/dist/skills/word-architect/macos/scripts/get-theme-colors.applescript +123 -0
  354. package/dist/skills/word-architect/macos/scripts/health-check.applescript +606 -0
  355. package/dist/skills/word-architect/macos/scripts/insert-cover-page.applescript +77 -0
  356. package/dist/skills/word-architect/macos/scripts/insert-header-footer.applescript +87 -0
  357. package/dist/skills/word-architect/macos/scripts/insert-horizontal-line.applescript +112 -0
  358. package/dist/skills/word-architect/macos/scripts/insert-html.applescript +440 -0
  359. package/dist/skills/word-architect/macos/scripts/insert-hyperlink.applescript +191 -0
  360. package/dist/skills/word-architect/macos/scripts/insert-image.applescript +320 -0
  361. package/dist/skills/word-architect/macos/scripts/insert-list.applescript +317 -0
  362. package/dist/skills/word-architect/macos/scripts/insert-pagebreak.applescript +181 -0
  363. package/dist/skills/word-architect/macos/scripts/insert-smartart.applescript +104 -0
  364. package/dist/skills/word-architect/macos/scripts/insert-table.applescript +238 -0
  365. package/dist/skills/word-architect/macos/scripts/insert-text.applescript +677 -0
  366. package/dist/skills/word-architect/macos/scripts/insert-textbox.applescript +261 -0
  367. package/dist/skills/word-architect/macos/scripts/maximize-window.applescript +67 -0
  368. package/dist/skills/word-architect/macos/scripts/normalize-formatting.applescript +56 -0
  369. package/dist/skills/word-architect/macos/scripts/open-document.applescript +222 -0
  370. package/dist/skills/word-architect/macos/scripts/replace-text.applescript +390 -0
  371. package/dist/skills/word-architect/macos/scripts/save-document.applescript +230 -0
  372. package/dist/skills/word-architect/macos/scripts/select-range.applescript +142 -0
  373. package/dist/skills/word-architect/macos/scripts/set-document-properties.applescript +195 -0
  374. package/dist/skills/word-architect/macos/scripts/set-page-layout.applescript +273 -0
  375. package/dist/skills/word-architect/macos/scripts/set-theme-colors.applescript +264 -0
  376. package/dist/skills/word-architect/macos/scripts/undo-redo.applescript +61 -0
  377. package/dist/skills/word-architect/macos/scripts/update-toc.applescript +112 -0
  378. package/dist/skills/word-architect/reference/formatting.md +119 -0
  379. package/dist/skills/word-architect/reference/html-layouts/01-executive-summary-box.md +36 -0
  380. package/dist/skills/word-architect/reference/html-layouts/02-kpi-summary-table.md +68 -0
  381. package/dist/skills/word-architect/reference/html-layouts/03-comparison-table.md +63 -0
  382. package/dist/skills/word-architect/reference/html-layouts/04-pros-cons-table.md +86 -0
  383. package/dist/skills/word-architect/reference/html-layouts/05-timeline-table.md +114 -0
  384. package/dist/skills/word-architect/reference/html-layouts/06-raci-matrix.md +95 -0
  385. package/dist/skills/word-architect/reference/html-layouts/07-data-table-alternating.md +84 -0
  386. package/dist/skills/word-architect/reference/html-layouts/08-callout-box.md +102 -0
  387. package/dist/skills/word-architect/reference/html-layouts/09-vertical-milestone.md +100 -0
  388. package/dist/skills/word-architect/reference/quality-assurance.md +102 -0
  389. package/dist/skills/word-architect/reference/tables.md +62 -0
  390. package/dist/skills/word-architect/reference/tracked-changes.md +34 -0
  391. package/dist/skills/word-architect/reference/uia-fallback.md +231 -0
  392. package/dist/skills/word-architect/reference/visual-elements.md +82 -0
  393. package/dist/skills/word-architect/windows/scripts/apply-heading-style.ps1 +190 -0
  394. package/dist/skills/word-architect/windows/scripts/autofit-tables.ps1 +64 -0
  395. package/dist/skills/word-architect/windows/scripts/create-chart-with-data.ps1 +133 -0
  396. package/dist/skills/word-architect/windows/scripts/create-chart.ps1 +73 -0
  397. package/dist/skills/word-architect/windows/scripts/export-document.ps1 +86 -0
  398. package/dist/skills/word-architect/windows/scripts/get-current-file.ps1 +27 -0
  399. package/dist/skills/word-architect/windows/scripts/insert-cover-page.ps1 +79 -0
  400. package/dist/skills/word-architect/windows/scripts/insert-horizontal-line.ps1 +74 -0
  401. package/dist/skills/word-architect/windows/scripts/insert-image.ps1 +98 -0
  402. package/dist/skills/word-architect/windows/scripts/insert-smartart.ps1 +118 -0
  403. package/dist/skills/word-architect/windows/scripts/insert-text-box.ps1 +90 -0
  404. package/dist/skills/word-architect/windows/scripts/normalize-formatting.ps1 +63 -0
  405. package/package.json +5 -4
@@ -0,0 +1,54 @@
1
+ {
2
+ "progress.group.title": "进度",
3
+ "progress.phases.discovery": "发现",
4
+ "progress.phases.asIs": "按原样定义",
5
+ "progress.phases.toBe": "未来设计",
6
+ "progress.phases.validateToBe": "验证未来",
7
+ "progress.phases.architectProcess": "架构师流程",
8
+ "progress.phases.architectSolution": "架构师解决方案",
9
+ "progress.phases.handoff": "交接",
10
+ "progress.phases.architect": "架构师",
11
+ "taskList.row.identityDomain": "身份与身份验证域",
12
+ "taskList.row.sourceInventory": "源清单",
13
+ "taskList.row.processFrame": "流程框架",
14
+ "taskList.row.systemsData": "系统和应用程序观察到的数据",
15
+ "taskList.row.compliancePolicy": "合规与政策条款",
16
+ "taskList.row.metricsMining": "指标与流程挖掘信号",
17
+ "taskList.row.painPoints": "痛点与重点意愿",
18
+ "taskList.row.stageModel": "阶段模型",
19
+ "taskList.row.processModel": "流程模型",
20
+ "taskList.row.stageTasks": "阶段任务",
21
+ "taskList.row.activitiesTasks": "活动与任务",
22
+ "taskList.row.personas": "角色",
23
+ "taskList.row.integrations": "要构建的集成",
24
+ "taskList.row.dataEntities": "数据实体",
25
+ "taskList.row.complianceControls": "合规性控制",
26
+ "taskList.row.kpis": "KPI",
27
+ "taskList.row.improvements": "改进",
28
+ "taskList.row.designDecisions": "设计决策、冲突和解决方案假设",
29
+ "taskList.category.factsAsIs": "事实(现状)",
30
+ "taskList.category.analysisToBe": "分析(未来)",
31
+ "taskList.status.fromDocs": "源自文档",
32
+ "taskList.status.needsConfirmation": "需要确认",
33
+ "taskList.status.missing": "缺少",
34
+ "taskList.rowDescription.identityDomain": "是哪个流程,所属业务部门和负责人",
35
+ "taskList.rowDescription.sourceInventory": "现有的录屏、文档和数据",
36
+ "taskList.rowDescription.processFrame": "流程从何开始、到何结束、涵盖哪些范围",
37
+ "taskList.rowDescription.systemsData": "使用的应用程序及其中的数据",
38
+ "taskList.rowDescription.compliancePolicy": "适用的规则、政策和审计义务",
39
+ "taskList.rowDescription.metricsMining": "业务量、频率、周期时间、SLA 和积压",
40
+ "taskList.rowDescription.painPoints": "拖慢工作的因素,以及大家希望改变的地方",
41
+ "taskList.rowDescription.stageModel": "未来流程:阶段、泳道或任务边界",
42
+ "taskList.rowDescription.processModel": "未来流程:阶段、泳道或任务边界",
43
+ "taskList.rowDescription.stageTasks": "每一步的工作,以及由谁或什么来完成",
44
+ "taskList.rowDescription.activitiesTasks": "每一步的工作,以及由谁或什么来完成",
45
+ "taskList.rowDescription.personas": "流程中的角色及各自的职责",
46
+ "taskList.rowDescription.integrations": "未来流程需要连接的系统",
47
+ "taskList.rowDescription.dataEntities": "流程使用的记录、字段和文档",
48
+ "taskList.rowDescription.complianceControls": "未来流程如何满足每条规则",
49
+ "taskList.rowDescription.kpis": "证明改变见效的目标",
50
+ "taskList.rowDescription.improvements": "提出的改进及各自的收益",
51
+ "taskList.rowDescription.designDecisions": "已决定的事项、冲突和假设",
52
+ "taskList.categoryDescription.factsAsIs": "来源和访谈揭示的当前流程",
53
+ "taskList.categoryDescription.analysisToBe": "基于事实设计的未来流程"
54
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "progress.group.title": "進度",
3
+ "progress.phases.discovery": "探索",
4
+ "progress.phases.asIs": "按原樣定義",
5
+ "progress.phases.toBe": "待處理設計",
6
+ "progress.phases.validateToBe": "驗證待處理",
7
+ "progress.phases.architectProcess": "架構師程序",
8
+ "progress.phases.architectSolution": "架構師解決方案",
9
+ "progress.phases.handoff": "交接",
10
+ "progress.phases.architect": "架構師",
11
+ "taskList.row.identityDomain": "身分與網域",
12
+ "taskList.row.sourceInventory": "來源庫存",
13
+ "taskList.row.processFrame": "程序框架",
14
+ "taskList.row.systemsData": "系統與觀察到的資料",
15
+ "taskList.row.compliancePolicy": "合規與政策條款",
16
+ "taskList.row.metricsMining": "指標和挖掘訊號",
17
+ "taskList.row.painPoints": "痛點與期望",
18
+ "taskList.row.stageModel": "階段模型",
19
+ "taskList.row.processModel": "流程模型",
20
+ "taskList.row.stageTasks": "階段任務",
21
+ "taskList.row.activitiesTasks": "活動與工作",
22
+ "taskList.row.personas": "角色",
23
+ "taskList.row.integrations": "要建置的整合",
24
+ "taskList.row.dataEntities": "資料實體",
25
+ "taskList.row.complianceControls": "合規性控制",
26
+ "taskList.row.kpis": "KPI",
27
+ "taskList.row.improvements": "改進",
28
+ "taskList.row.designDecisions": "設計決策、衝突與假設",
29
+ "taskList.category.factsAsIs": "Facts(按原樣)",
30
+ "taskList.category.analysisToBe": "分析(未來狀態)",
31
+ "taskList.status.fromDocs": "來自文件",
32
+ "taskList.status.needsConfirmation": "需要確認",
33
+ "taskList.status.missing": "缺少",
34
+ "taskList.rowDescription.identityDomain": "是哪個流程、所屬業務單位與負責人",
35
+ "taskList.rowDescription.sourceInventory": "現有的錄影、文件和資料",
36
+ "taskList.rowDescription.processFrame": "流程從何開始、到何結束、涵蓋哪些範圍",
37
+ "taskList.rowDescription.systemsData": "使用的應用程式及其中的資料",
38
+ "taskList.rowDescription.compliancePolicy": "適用的規則、政策與稽核義務",
39
+ "taskList.rowDescription.metricsMining": "業務量、頻率、週期時間、SLA 與積壓",
40
+ "taskList.rowDescription.painPoints": "拖慢工作的因素,以及大家希望改變的地方",
41
+ "taskList.rowDescription.stageModel": "未來流程:階段、泳道或工作邊界",
42
+ "taskList.rowDescription.processModel": "未來流程:階段、泳道或工作邊界",
43
+ "taskList.rowDescription.stageTasks": "每一步的工作,以及由誰或什麼完成",
44
+ "taskList.rowDescription.activitiesTasks": "每一步的工作,以及由誰或什麼完成",
45
+ "taskList.rowDescription.personas": "流程中的角色及各自的職責",
46
+ "taskList.rowDescription.integrations": "未來流程需要連接的系統",
47
+ "taskList.rowDescription.dataEntities": "流程使用的記錄、欄位與文件",
48
+ "taskList.rowDescription.complianceControls": "未來流程如何符合每條規則",
49
+ "taskList.rowDescription.kpis": "證明改變見效的目標",
50
+ "taskList.rowDescription.improvements": "提出的改進及各自的效益",
51
+ "taskList.rowDescription.designDecisions": "已決定的事項、衝突與假設",
52
+ "taskList.categoryDescription.factsAsIs": "來源與訪談呈現的現行流程",
53
+ "taskList.categoryDescription.analysisToBe": "依據事實設計的未來流程"
54
+ }
@@ -0,0 +1,204 @@
1
+ # Phase 3 — PDD generation
2
+
3
+ This phase produces the PDD as a living-draft `.md` (the **Living-draft orchestration** below). No `/doc-gen` calls run; the host Download action produces the `.docx`.
4
+
5
+ **How this phase builds.** The document is composed as part files and assembled into the draft; that is the only way it comes to exist here. The first write of this phase is `00-doc.md` in `{DraftsDir}/.<process-slug>-PDD.parts/` — before any section prose, and before the delivered path is touched at all. Writing `{DraftsDir}/<process-slug>-PDD.md` yourself produces a file the phase cannot refine, re-sync or re-project, because those all edit parts and there are none behind a document written whole. The assembly leaves a `.<process-slug>-PDD.assembled` receipt beside the draft as it promotes; later refine and re-sync turns look for it. Section "Assembly" below has the mechanics.
6
+
7
+ **What marks this phase successful.** The draft is delivered as `{DraftsDir}/<process-slug>-PDD.md` and nowhere else, and it is complete when one part file exists for each of the 15 canonical anchored section ids — `business-context`, `scope`, `current-state`, `target-state`, `business-rules`, `data-model`, `people`, `raci`, `exceptions`, `compliance`, `kpis`, `assumptions-risks`, `glossary`, `next-steps`, `appendix-a`, in that order (the same list `pdd-template.md` publishes). A part set short of one id still promotes a real draft and keeps the parts dir naming what is left, which is progress, not failure. The delivered draft carries its two structural markers, `pdd:doc` and at least one `pdd:section`; an unmarked draft cannot be read as a document however good the wiki behind it is.
8
+
9
+ ---
10
+
11
+ ## Entry guard
12
+
13
+ Phase 3 runs **only on explicit user request** ("build the PDD", "generate the Process Definition Document", "make me a PDD"). Don't proactively advance from a confirmed TO-BE. The explicit request IS the approval: do not re-ask whether to proceed, and do not re-confirm the current/future maps — their phase snapshot confirmations stand.
14
+
15
+ If a draft already exists (`{DraftsDir}/<process-slug>-PDD.md` is present), replace it and say so in one line ("Regenerating the process document — the previous draft is replaced; the captured facts are unchanged"). The wiki facts are preserved either way; only the draft prose is replaced.
16
+
17
+ ## PDD readiness gate
18
+
19
+ Before metadata capture or section composition, run the PDD readiness gate against the project task list and the current/future process sources:
20
+
21
+ **Recording-first route** (`SKILL.md` "Recording-first documentation"): the draft review is the checkpoint, so this gate blocks only on the current state. Steps 1, 3 and 5 → open items with impact (route, future process, PDD-critical detail); never hold a Future Process Review. Step 2 → verify the captured steps and the validated current map are on disk; no confirmed snapshot is required. Steps 4, 6 (current-state items only) and 7 apply. The approval rule after the list does not apply: the user confirms the current shape at the draft review. `target-state` is composed from `to-be/overview.md` alone: the chosen future state (what a robot does, what stays with people and why, trigger and outputs, and sourced changes only when the user chose them), with no map, no `Open TO-BE diagram` link and no one-sentence placeholder.
22
+
23
+ 1. Confirm route: BPMN, Case, or RPA.
24
+ 2. Verify the AS-IS Process Snapshot was confirmed when the work is existing (or AS-IS is explicitly not applicable / skipped at customer request when new) — verify the recorded state; never re-ask.
25
+ 3. Verify the TO-BE Future Process Review was confirmed — the review confirmation covers the map and the silently drafted detail pages; never re-ask.
26
+ **If it was never held, hold it now — this is the one case where you do not proceed** (recording-first route excepted, above). "Never re-ask" protects a confirmation that already happened; it is not permission to skip one that never did. A request for the document is approval to generate, not approval of a future design the user has never seen. So when the checkpoint is absent from this conversation — the user asked for the PDD before any future state was presented, or the whole journey collapsed into one turn — present the Future Process Review per the route's Phase 2 guide, take the Confirm / Change decision, and compose only after it. Say it in one line ("Before I write this up, here's the future process I'm proposing") and do not apologise or explain the phase model.
27
+ **The future design must exist on disk, not only in the conversation.** Before composing anything, confirm the route's TO-BE artifacts are written under `{WikiPath}/to-be/`: the process model (`to-be/diagram.md`, or `to-be/process.bpmn` on the BPMN route) plus, on the Case route, one `to-be/stages/<stage-id>.md` per stage in the confirmed map. Describing the future process in chat does not satisfy this — a PDD projects the wiki, so an unwritten future state produces a document with nothing behind it. If an artifact is missing, stop Phase 3, return to the Phase 2 guide and write it, then re-enter here. Do not re-ask the user for anything already confirmed; this is a check on your own output, not a question for them.
28
+ 4. Confirm the PDD scope/title matches the source documents. If the source bundle covers a narrower subprocess than the original request or Process Knowledge matches, use the confirmed source-bounded scope; do not broaden the PDD with generic lifecycle content.
29
+ 5. Confirm PDD-critical detail or record an explicit open item with impact: scope boundaries, RACI, KPI targets / acceptance criteria, decision-driving data fields, privacy class, HITL/action fields and available actions, exception data state transitions, and compliance evidence.
30
+ 6. Ask back any missing shape-changing item: route, current/future map shape, owners, systems/source of truth, integration pattern, exception path, SLA/timing, volume/backlog, decision route, or terminal outcome. These should be rare — the phase snapshots already collected them; a shape-changing gap here means a checkpoint was skipped.
31
+ 7. Carry only non-shape unknowns into the PDD as assumptions, risks, dependencies, or next steps — as open items and warning callouts in the document, never as extra questions.
32
+
33
+ Do not generate the PDD while a shape-changing gap is merely marked `missing`. It must be answered, confirmed as not applicable, or written as a concrete open item with its impact.
34
+
35
+ A map file or Mermaid block is not proof of approval. Treat PDD readiness as satisfied only when the current/future shape has been explicitly confirmed in conversation or accepted through a checkpoint.
36
+
37
+ The assembly script enforces this: it exits `2` with `no future process on disk` when `{WikiPath}/to-be/` holds no `.md` or `.bpmn`, without touching the draft or the parts dir. If you see that, the future design was never written — go back to the route's Phase 2 guide, write it, then assemble again. On the recording-first route, item 3's `--current-state` flag makes the script check `as-is/` instead (`no current process on disk`). The `to-be/overview.md` that draft writes is never read by the flag; without the flag it would be the only file the script finds, so it proves no future design: the readiness gate above still applies.
38
+
39
+ **The draft is not delivered until it exists at `{DraftsDir}/<process-slug>-PDD.md`.** Generation is finished only when that file is on disk at the absolute `DraftsDir` you were handed — not at the sandbox or project root, not under the wiki, and never as a `.docx`: the host discovers the living document by a flat scan of `DraftsDir`, so a file written anywhere else is invisible to the user no matter how complete it is. `.docx` is a disposable export the host produces at Download; it is never an authoring target. The draft is what the assembly script writes from the part files, and nothing else produces it. A document composed whole — in one write, in a scratch directory, or by exporting from another format — is not the draft however complete it reads, and it has no `.<process-slug>-PDD.assembled` receipt beside it. Before telling the user the document is ready, confirm the `.md` is where it belongs; if it is not, move it there and say nothing about the path. This check and the `PDDPHASE:` classification in "Failure handling" (item 8) answer different questions and both must pass: the sentinel says how far the assembly script got; the file at `{DraftsDir}` says whether its result landed where the host will find it. A run that printed `PDDPHASE:cleaned` or `PDDPHASE:parts-kept` and yet left no `<process-slug>-PDD.md` at `{DraftsDir}` assembled against a different directory than the one you were handed; a run that printed no `PDDPHASE:` line never executed the script at all (item 3).
40
+
41
+ ## Execution discipline
42
+
43
+ Commit to settled decisions and move. When a rule in this file or `pdd-template.md` resolves a question (which AskUser, which source, which placeholder), act on it — re-weighing already-specified choices is the main failure mode.
44
+
45
+ ---
46
+
47
+ ## Process metadata — best-assume, ask only the unknown
48
+ Store these four values; the orchestrator writes them into the `pdd:doc` marker at assembly. The host synthesizes cover and downloaded Word TOC furniture. The host derives viewer section navigation from anchored headings. Do not emit `[TOC]`, manual entries, or navigation UI markup.
49
+
50
+ Resolve all four from what is already known — never a four-question form:
51
+
52
+ 1. **Process name** — the wiki domain (`## Domain:` in `index.md`).
53
+ 2. **Client name** — the customer organization (e.g. "Accrual Bank"); never the process name or its description. Take it from the wiki, the opener, or the source documents.
54
+ 3. **Author** — BA team / project owner.
55
+ 4. **Document version** — `1.0` (or increment an existing draft's).
56
+
57
+ **MANDATORY STOP only when the client name is unknown** after checking wiki + sources: ask one plain question for it ("Which client or organization should the document name on its cover?"). Never generate a cover with a placeholder client. All other values proceed on defaults; the user can change them later via the document panel's Edit details.
58
+
59
+ **Screenshots.** Recording frames under `{WikiPath}/raw/screenshots/` and no `raw/screenshots/annotation.md` yet → ask the callouts/masking question (`recording-processing.md` → Callouts and masking) in the same AskUser as the client-name question, or alone when the client is known.
60
+
61
+ ## Pre-Flight: Process Knowledge Completeness
62
+
63
+ Latched run first (SKILL.md, The latch): `{WikiPath}/research-pass.md` records `Process Knowledge state:` `closed` or `opted-out` → make no call, log `Phase: PDD — skipped` in `process-knowledge.md`, and this checkpoint is complete. Research `## Findings` in that record, when present — also on a run that opted out after a pass — serve terminology and completeness in its place. Never send `"revert-to-process-knowledge"` or `"research-accepted"` to complete this checkpoint.
64
+
65
+ Otherwise, before writing PDD parts, make one final progressive Process Knowledge call if `process-knowledge.md` exists or the wiki has enough process context to retrieve a match. This call happens before the first `WriteFile` to `{DraftsDir}/.<process-slug>-PDD.parts/`. Keep the same API shape and include matched process display names when known:
66
+
67
+ ```text
68
+ Continue using these matched process references: <display names from process-knowledge.md>.
69
+ Confirmed current process: <brief AS-IS summary>.
70
+ Confirmed future process: <brief TO-BE summary>.
71
+ Need now: PDD terminology, glossary terms, KPIs, controls, exception language, and completeness checks. Use this only to support the document; confirmed wiki facts win.
72
+ ```
73
+
74
+ Use the result to improve wording, glossary coverage, KPI/control completeness, and exception phrasing. Do not add unconfirmed scope or replace the user's confirmed process with reference content.
75
+
76
+ PDD phase gate: before presenting a PDD outline, writing PDD parts, or composing any section text, complete this PDD Process Knowledge checkpoint and append to `process-knowledge.md` a new entry with `Phase: PDD` and the result status; on a latched run, the `Phase: PDD — skipped` line completes it. If the call errors, retry once before authoring. If the retry also errors, record the error in `process-knowledge.md` and ask the user whether to continue from confirmed wiki/source facts.
77
+
78
+ ---
79
+
80
+ ## Living-draft orchestration
81
+
82
+ Produces `{DraftsDir}/<process-slug>-PDD.md` (no `.docx` at first-gen; the host Download action produces the `.docx` later).
83
+
84
+ ### Pre-flight: screenshot inventory
85
+
86
+ Walk `{WikiPath}/raw/screenshots/` and `{WikiPath}/raw/recordings/*/screenshots/`. Map images to `to-be/steps/` MDs by matching application/screen names. Missing screenshots become Screenshot Placeholders. `raw/screenshots/annotation.md` turns callouts or masking on → annotate each frame to embed first (`recording-processing.md` → Callouts and masking) and embed its `annotated/` copy. Do NOT pre-render diagrams to PNG; embed the route-specific diagram source in the draft (Mermaid for Mermaid-backed routes, BPMN XML reference for BPMN routes; rasterization happens at Download).
87
+
88
+ ### Compose the sections (orchestrator)
89
+
90
+ Read the engagement language from `index.md` frontmatter `language:` before composing or regenerating sections; use the Document Language rule in `SKILL.md` if absent. Write headings, prose, table headers/cells, captions, callouts, and link labels in that language, including the English examples below. Preserve anchor ids, metadata keys, link targets, and the `==TBD:` keyword. A different conversation language does not change the document language.
91
+
92
+ Compose every section yourself, in template order — do not delegate to other agents. From `pdd-template.md` (your preamble) take the section list, each section's wiki source map (the "Wiki source" column), each section's required structure (its subsections, tables, heading layout — e.g. the §2 Scope 2-column table, the §4.2.1 Stages & Tasks per-stage block), and the shared content rules.
93
+
94
+ One part per anchored id (the canonical anchored section-id list in `pdd-template.md`); each section's H2 subsections live inline in that section's part, never split into separate parts.
95
+
96
+ For each section: read its mapped wiki sources, then emit the section block exactly:
97
+
98
+ 1. Anchor (first line, no blank line before the heading):
99
+ `<!-- pdd:section id=<section-id> sources=<RELATIVE wiki paths> reproj=g0 -->`
100
+ sources= MUST be non-empty — for a not-yet-captured P0-gap section, still emit the path the template assigns it.
101
+ For route-specific source-map cells, choose the path list for the confirmed route. Do not serialize route labels or paths from other routes.
102
+ 2. The section heading (H1 or H2 per template).
103
+ 3. Body:
104
+ - Preserve source facts, table structure, numbers, and identifiers exactly; translate prose into the document language when the source uses another language.
105
+ - Follow the template's structure for this section + the shared content rules.
106
+ - For `current-state` on New + RPA, New + Case, or New + BPMN, follow the template's new-work Current State structure. Do not invent AS-IS flow, metrics, pain points, or an AS-IS diagram.
107
+ - For `current-state` on existing work, the step pages pick the §3.2 layout: `Recording:` ranges → the template's recording layout (with its §5 and §8.1 columns and the extra `sources=` paths); none → the default layout. The recording layout has no row cap: one row per step page.
108
+ - AS-IS/TO-BE diagrams: embed the route-specific source exactly; do not pre-render it to PNG or recreate it from memory. For Mermaid-backed diagrams, the PDD source is the canonical fragment only: `as-is/diagram.md` for AS-IS and `to-be/diagram.md` for RPA/Case TO-BE. Extract and embed its one complete Mermaid fence. `overview.md` Mermaid is a legacy live-view fallback and must never be silently substituted into a new PDD; stop and ask the user to regenerate the canonical fragment. For BPMN, read the exact source XML and embed it in a fenced `bpmn` block: use `as-is/process.bpmn` when it is the approved AS-IS artifact and `to-be/process.bpmn` for BPMN TO-BE. Include the complete `bpmn:definitions` through its closing tag. The source may be semantic-only and omit BPMNDI because Delegate creates geometry during rendering. Never summarize, truncate, or recreate the model from memory. Follow the block with a figure caption that cites its source path. Immediately after the diagram block: AS-IS → `[Open AS-IS diagram](delegate:open-diagram?which=as-is&anchor=<section-id>)`; TO-BE → `[Open TO-BE diagram](delegate:open-diagram?which=to-be&anchor=<section-id>)`.
109
+ - Compliance / KPIs / RACI with an absent or unreadable wiki source: emit a `[!WARNING]` (`style:"warning"`) callout unconditionally. Title: "Needs capture". Body: state what must be captured and end with `This section will auto-fill when the wiki source is available`. Do not skip the section, emit an empty body, or write "Not applicable" because ReadFile failed. The step-4 Refine link still follows this callout as the section's single final link: a P0-gap section ends with one `[Refine section](delegate:refine-section?section=<section-id>)`, exactly like any other.
110
+ 4. Last line of every section without exception, content-rich and P0-gap callout sections alike: exactly one `[Refine section](delegate:refine-section?section=<section-id>)` link (never two).
111
+
112
+ Write the `pdd:doc` marker to `00-doc.md` and each composed section to its own `NN-<id>.md` part file (see **Assembly** below), dropping each from working memory. The parts dir on disk is the in-progress truth, so context stays bounded.
113
+
114
+ ### Assembly (parts dir → promote)
115
+
116
+ Each section lands as its own part file under a hidden parts dir; a cross-platform concat-and-promote script assembles them in one atomic step. The host discovers, parses, and reconciles the sidecar on every change to the `-PDD.md`, so it must see the draft **once, complete** (never a partial).
117
+
118
+ No `WriteFile`/`EditFile`/`ReadFile` ever targets the accumulating draft artifact during first-gen. Only the concat script touches it, as byte I/O.
119
+
120
+ 1. **Init (parts dir and doc marker).** Parts dir: `{DraftsDir}/.<process-slug>-PDD.parts/`. `DraftsDir` is the absolute drafts dir from context (`ContextData.DraftsDir`), a sibling of the wiki; substitute that value and never write the literal `{DraftsDir}` token. If `DraftsDir` is absent from context, STOP and tell the user the drafts location is unavailable. The parts dir is invisible to discovery (`livingDocumentStore.ts` flat scan matches only files ending in `-PDD.md`) and fires no host parse.
121
+
122
+ **An existing parts dir is resumed, not cleared.** It holds sections composed earlier: by this run before a compaction, or by a session that ended before the set was complete, with or without a script run. Decide from disk, not from this run's history: an earlier session is not in that history, and a compaction summary can drop the parts. Resume per item 5. Staleness is no reason to clear: the script refuses any part whose wiki source changed after the part was written (exit `3`) and names it; re-compose those.
123
+
124
+ **Clear only a foreign dir** (Identity below). `DeleteFile` every entry (`00-doc.md`, all `NN-<id>.md`, any stray) before writing the first new part. `DeleteFile` rejects directories, so the empty dir remains (the next `WriteFile 00-doc.md` lands in it). Default path is `DeleteFile` per listed entry (cross-platform, no shell needed, and the platform shell is not selected until item 3). Only if a full recursive wipe is wanted, defer to the item-3 platform branch (`rm -rf` on macOS, `Remove-Item -Recurse` on Windows) AFTER platform selection. Do NOT emit a bare `rm` before `os.name` is read.
125
+
126
+ **Identity (foreign-dir detection).** Keys on the PARTS-DIR NAME (`.<process-slug>-PDD.parts`, constructed from THIS generation's `<process-slug>`) and on each `NN-<id>.md` id being in the canonical anchored section-id list. Do NOT compare against `pdd:doc process=`: `process=` is the HUMAN process name (not the slug), so the two strings are unlike and comparison is impossible.
127
+
128
+ First write: `WriteFile {DraftsDir}/.<process-slug>-PDD.parts/00-doc.md` holding the `pdd:doc` marker from MANDATORY-STOP metadata (`WriteFile` auto-creates the parent dir; verified `FileService.cs:365-370`):
129
+ `<!-- pdd:doc header="<process-name> | Process Definition Document" footer="Confidential | <client-name>" client="<client>" author="<author>" date="<today DD Month YYYY>" version="<version>" process="<process-name>" -->`
130
+ (`process=` is the HUMAN process name, e.g. "Candidate Sifting"; the slug appears ONLY in the filename and dir name.)
131
+
132
+ 2. **Compose loop.** For each anchored section in canonical order (index `NN`, two-digit; order = the canonical anchored section-id list in `pdd-template.md`'s section-slug-reference table; one part per anchored id, NOT "9"): compose and validate the block (anchor with EXPECTED id + `reproj=g0`, or the advanced token when this part is a re-compose per "Stale parts" below, + non-empty `sources=`; heading on the next line; exactly one `refine-section` link as last line; AS-IS/TO-BE `open-diagram` link; absent-source P0 sections (Compliance/KPIs/RACI) carry the `[!WARNING]` "Needs capture" callout then that single Refine link). Then write the whole part in one `WriteFile {DraftsDir}/.<process-slug>-PDD.parts/NN-<id>.md` (default overwrite mode, correct and harmless because the part holds exactly one section), and drop it from working memory. Write each part as one full `WriteFile`, never incrementally. The `pdd:section` anchor is the part's FIRST line (no leading blank line).
133
+
134
+ 3. **Run the shipped assembly script.** Do not write or improvise a concat -- run the shipped script. Select platform from `PlatformContextType` `os.name`; on any other value, STOP and tell the user the platform is unsupported for assembly.
135
+
136
+ **macOS** (`ExecuteBashCommand`):
137
+ ```bash
138
+ bash "{BusinessAnalysisSkillDir}/scripts/assemble-pdd.sh" --drafts "{DraftsDir}" --slug "<process-slug>"
139
+ ```
140
+ **Windows** (`ExecutePowershellCommand`):
141
+ ```powershell
142
+ & "{BusinessAnalysisSkillDir}\scripts\assemble-pdd.ps1" -Drafts "{DraftsDir}" -Slug "<process-slug>"
143
+ ```
144
+ Recording-first route: append `--current-state` (macOS) or `-CurrentState` (Windows).
145
+
146
+ Read the tool result before doing anything else. The first line of the script's stdout is `PDDPHASE:start`; it proves the script FILE was found and started. Two outcomes are failures even though the shell may report exit `0`:
147
+ - **Exit `0` with no `PDDPHASE:` line at all** (not even `PDDPHASE:start`): the script never executed. PowerShell exits `0` when `&` is given a path that does not resolve, and the shell tool then reports "exited 0 but wrote to stderr" with the resolution error under its stderr block. Treat this as a failure of the INVOCATION, not of assembly: check that `{BusinessAnalysisSkillDir}` resolved to an absolute path that exists and that `{DraftsDir}` is absolute; the shell's working directory is not the project, so a relative path resolves somewhere else. Fix the path and re-run the SAME command. Do not wrap the script in diagnostics, do not `cd` around it, and do not improvise another concat: a wrapper that cannot find the file cannot find it either.
148
+ - **Exit `0` whose stderr is non-empty**: read stderr before trusting the exit code. The shell tool headlines this case as "not a confirmed success" for exactly this reason.
149
+
150
+ On a non-zero exit, surface the error to the user and STOP; do not improvise another concat. Classify how far the run got with item 8.
151
+
152
+ **Mermaid route gate:** For each required RPA or Case AS-IS/TO-BE map, use its canonical source: `as-is/diagram.md` or `to-be/diagram.md`, and read its complete fenced block. It must be non-empty, have balanced fences, contain exactly one supported opening-fence `diagramFamily` attribute, and start with a supported Mermaid declaration (for example `flowchart`, `sequenceDiagram`, `stateDiagram`, or `classDiagram`). Copy that complete fenced block verbatim into the corresponding PDD part; never rebuild a plain `mermaid` fence around extracted code. Before assembly, read the part and compare it with the canonical block: the `diagramFamily` value and Mermaid body must match exactly, and the closing fence must be present. A missing attribute, plain fence, mismatched family or body, truncation, or invalid block makes the part malformed; re-write that part from the canonical block and repeat this gate. Do not use an overview-embedded legacy Mermaid block for PDD generation.
153
+
154
+ 4. **Completeness gate (MANDATORY STOP before running the script).** `LsDirectory` the parts dir; assert the part-file set equals exactly `00-doc.md` plus one `NN-<id>.md` per id in the canonical anchored section-id list (`pdd-template.md`), each id once, `NN` in that list's order, and NO extra entries. **Freshness assertion:** no part may be older than a wiki page its own anchor names in `sources=`. If any turn wrote the wiki after a part was written, re-compose that part first — see "Stale parts" below; the script exits `3` and names them if you skip it. An unexpected file fails the gate: delete it if a known stray (`.DS_Store`), or STOP if unexplained. This gate is the ONLY defense against a pattern-matching stray (e.g. `99-stray.md`) that the script's `[0-9][0-9]-*.md` glob would otherwise concat. Minimal, bounded per-part content validation: read enough of each part to see its first non-blank line; confirm (a) the part is non-empty and (b) its first non-blank line is a `<!-- pdd:section id=<expected> sources=<paths> reproj=<token> -->` anchor (the `reproj=` token is the one a stale-part refusal, exit `3`, tells you to advance) (`00-doc.md` must open with `<!-- pdd:doc ...-->`). If `ReadFile` truncates a >50 KB oversized part, the HEAD anchor is still within the first bytes and remains verifiable. For the P0 final-link check on a potentially-oversized part, prefer a tail read; if the tool cannot bound the read and the part is oversized, treat anchor presence + the part having been written this run as sufficient and skip the full-body re-read. An empty or anchor-less part is malformed; re-write that one part file. P0 parts (`compliance`, `kpis`, `raci`) MUST also contain the `[!WARNING]` callout and end with their Refine link (P0 sections are small absent-source stubs, so a full read is safe). **BPMN route gate:** for BPMN TO-BE, extract the fenced `bpmn` block from the `target-state` part, compare its XML bytes with `to-be/process.bpmn`, and parse it with a real XML parser. When `as-is/process.bpmn` exists, perform the same exact-byte and parse check against the fenced block in `current-state`. Each BPMN block must have the same exact XML bytes as its source and include the closing `bpmn:definitions` tag; it may omit BPMNDI because Delegate resolves layout during rendering. A missing, truncated, different, or unparseable BPMN block makes that part malformed; rewrite it from the saved source and repeat this gate. **Recording layout gate:** when §3.2 uses the recording layout, the `current-state` part has one step per `as-is/steps/` page — a table row or a card, as `template=` in `00-doc.md` names, never a mix — each with its recording range or `Not in recording`; a missing or merged step makes that part malformed. On a missing id: write only the missing `NN-<id>` part(s), do not run the script. On a malformed part: re-write that one part file (a part is independently re-writable).
155
+
156
+ 5. **Resume (an existing parts dir, item 1).** The parts on disk are the record, whoever wrote them: this run before a compaction, or an earlier session. `LsDirectory` `{DraftsDir}/.<process-slug>-PDD.parts/` to see which `NN-<id>` files exist. Confirm `00-doc.md` exists and every present `NN-<id>.md` id is in the canonical anchored section-id list. Do NOT read `pdd:doc process=` and compare it to the slug (`process=` is the human name, never the slug). If a part id is NOT in the canonical list, or the dir is named for a different `<process-slug>`, treat it as foreign and clear it (item 1). Apply the same minimal content validation as the gate (item 4) to each existing part: an empty or anchor-less part is treated as MISSING and re-written. Then write only the genuinely missing or malformed parts.
157
+
158
+ 6. **Oversized-section residual (the ONLY place `mode:"append"` is used in the whole flow).** A single block exceeding ~50 KB cannot be written in one `WriteFile`; chunk it with `mode:"append"` writes to ITS OWN part file: the FIRST chunk is a plain `WriteFile` (creates/overwrites the part), each SUBSEQUENT chunk uses `mode:"append"`. An S1-style caution scoped to that single part file: dropping `mode:"append"` on a continuation chunk truncates that one part (re-derivable from the same sources), never the document. This is the ONLY `mode:"append"` case in the whole flow; it MUST NOT bleed into normal part writes (item 2).
159
+
160
+ 7. **Reconcile S1-S3.** The in-progress truth is the parts dir, not a single accumulating temp. Never overwrite a part with stale or empty content. The oversized-part append caution (item 6) is the only surviving write-mode constraint.
161
+
162
+ 8. **Failure handling (phase-aware, classified by the script's `PDDPHASE:` sentinel).** Exits `1` (incomplete part set), `2` (no future process), `8` (no Process Knowledge record, or no `Phase: PDD` entry in it), `3` (stale part), `5` (hollow part set) and `7` (literal backslash-n) are pre-concat refusals, checked in that order: `PDDPHASE:start` is their only `PDDPHASE:` line, and the draft, the `.tmp` and the parts dir are all untouched. Fix the named cause and re-run; do not apply the sentinel classification below to them. For the rest: the script echoes `PDDPHASE:start` as its very first statement, before any guard, then has three ordered phases: (P1) concat parts into `.tmp`; (P2) atomic-rename `.tmp` to `<slug>-PDD.md`; (P3) clear the parts dir **only if the canonical section set is now complete**. After each it echoes `PDDPHASE:concat-ok`, `PDDPHASE:promoted`, then either `PDDPHASE:cleaned` (set complete, staging removed) or `PDDPHASE:parts-kept` (parts preserved for the next run). **Both P3 outcomes are success.** On a non-zero exit, and on an exit `0` whose stdout does not end in `PDDPHASE:cleaned` or `PDDPHASE:parts-kept`, read the LAST `PDDPHASE:` line in the script's captured stdout to know exactly how far it got. Do NOT classify by whether `<slug>-PDD.md` exists: on a re-generation the OLD `<slug>-PDD.md` is present before the script runs, so its existence does not prove this run promoted. The sentinel is authoritative for HOW FAR the run got; `LsDirectory` is secondary confirmation only. The delivery check in the readiness gate (the `.md` exists at `{DraftsDir}`) is a separate, mandatory gate AFTER a `cleaned` or `promoted` sentinel, not a substitute for reading the sentinel.
163
+ - **No `PDDPHASE:` line at all, whatever the exit code (including `0`):** the script never executed; nothing on disk changed. This is an invocation failure (script path or working directory), not an assembly failure: fix the absolute path per item 3 and re-run the same command. Do NOT delete anything and do NOT write diagnostic wrappers.
164
+ - **Last is `PDDPHASE:start` (P1 concat failed; for exits `1`, `2`, `3`, `5`, `7` and `8` see the pre-concat refusals above):** assembly did NOT complete. The parts dir holds the only complete content. Do NOT delete it. Delete the partial `.tmp` (never promote it). Tell the user concat failed before producing the draft; give the parts-dir path; offer to re-run the script (safe: P1 truncates `.tmp` with `: > "$TMP"` / a fresh byte-stream create, so a leftover partial does not corrupt a retry; the old live `<slug>-PDD.md`, if any, is untouched).
165
+ - **Last is `PDDPHASE:concat-ok` (P2 rename failed):** the concatenated draft exists as `.tmp` but was not promoted. Keep parts AND `.tmp`; give both paths; offer to re-run the script (re-run re-concats, idempotent).
166
+ - **Last is `PDDPHASE:promoted` (P3 cleanup failed):** the rename SUCCEEDED, so `<slug>-PDD.md` is THIS run's complete, correct output. Do NOT tell the user assembly failed. Tell them the draft is ready and the staging dir could not be auto-removed; offer a targeted `rm -rf` / `Remove-Item -Recurse` of the parts dir (do not re-run the whole script).
167
+ - **Last is `PDDPHASE:cleaned`:** full success (the script exited 0) and the canonical set is complete, so the staging dir is gone.
168
+ - **Last is `PDDPHASE:parts-kept`:** **also full success** (the script exited 0). The draft on disk is this run's real, readable output; the parts dir was kept on purpose because the canonical set is not complete yet. Its `ids=` line names exactly which sections are still missing. Do NOT delete the parts dir, do NOT re-run to "fix" it, and do NOT tell the user anything failed -- write the named sections and run the script again, which rebuilds the draft with everything composed so far. Kept parts may be refused as stale (exit `3`); re-compose the ones it names.
169
+
170
+ **Body rules.** No cover / TOC / Document-Control block in the body (the host synthesizes those at render/Download from the `pdd:doc` marker + sidecar). No raw HTML, no `<script>`, no executable payload other than `delegate:` action links.
171
+
172
+ ### Stale parts (a wiki source edited after the part that projects it)
173
+
174
+ A part projects the wiki pages its anchor names in `sources=`. Write one of those pages after the part was written and that part is stale: it states the pre-correction fact while the wiki states the corrected one, and assembly concatenates it verbatim. On session ca6518d8 a binding business correction reached the wiki mid-generation, the 16 already-written parts kept the old text, and the delivered PDD contradicted the sources it was projecting.
175
+
176
+ **A PDD exists in staged form the moment the parts dir does, so re-projection is mandatory here exactly as it is for an assembled draft.** A turn that writes a wiki page while `{DraftsDir}/.<process-slug>-PDD.parts/` exists re-composes, in that same turn, every part whose anchor `sources=` names a page it wrote. Same bounding rule as `SKILL.md`'s Refinement cascade ("the affected set comes from the draft, never from memory"), read off the part anchors instead of the assembled draft. Re-compose = the item-2 compose step run again against the CURRENT sources, written as one whole `WriteFile` over the same `NN-<id>.md`, with the anchor's `reproj=` advanced (`g0` → `g1`, `g1` → `g2`). Every other part stays byte-identical, and the wiki is written before the part, never after.
177
+
178
+ The assembly script enforces this rather than leaving it to prose. Before concat it compares each part's mtime against every existing path in that part's `sources=` (a directory source recursively), prints one `STALEPART: <part> <- <source>` line per stale part, and exits `3` without touching the draft or the parts dir. On exit 3, re-compose exactly the named parts and run the script again. Never route around the guard: no editing the assembled `.md` instead, no re-touching part files to move their mtime.
179
+
180
+ A declared source that does not exist yet — a P0-gap section's intended path — is skipped by the guard, per `pdd-template.md`'s rule that a section serializes its mapped path before the page is captured.
181
+
182
+ ### On completion
183
+
184
+ Run this phase's one self-review here — after assembly, before the draft is surfaced, and never again afterwards (SKILL.md "One Review Per Phase"): one pass, one fix round, and whatever it still leaves stays in the draft as an open item, named in the line below. A second review pass over the assembled draft is forbidden. A fact it corrects on a `verified` wiki page is named in the same reply that writes it (SKILL.md "Editing a confirmed page").
185
+
186
+ Surface to the user: "Draft ready. Open the PDD panel to review it." — and when the draft carries open items, add one line naming how many and where they cluster (e.g. "3 open items flagged, mostly around compliance evidence"). Do not paste the draft into chat. Then call `AskUserFeedback` with `checkpoint: 'ba.pddGenerated'` (one non-blocking call; do not announce it or wait for a rating; skip silently if the tool is unavailable). This turn first delivers the PDD, so its second ```sf follow-up suggestion is `Publish this PDD to Automation Hub` — the first stays the flow's next step. Silence conditions: "Automation Hub publishing" in `SKILL.md`; a publish request → read `automation-hub-publishing.md` in full.
187
+
188
+ ---
189
+
190
+ ## Re-sync mechanics
191
+
192
+ Re-sync re-projects one or more `behind` sections from their current wiki sources. It is triggered by the user (a re-sync/edit request in chat), NOT by `mark-reviewed` (the host handles that in memory with no agent turn — see `SKILL.md` "Mark-reviewed"). Re-sync edits the existing draft **in place** — no temp, no full rewrite, never via the `.docx`. Re-lift each target section yourself; do not delegate to other agents. Process one section at a time; do not splice the next section until the current section's diagram embed, when applicable, has succeeded. For each id:
193
+
194
+ 1. **Re-lift:** recompose the section's new block from its CURRENT wiki sources (same block shape as first-gen; emit `reproj=g0` as a placeholder you overwrite in step 2).
195
+ 2. **Compute the advanced token (orchestrator, deterministic).** Read the section's CURRENT in-file `reproj=` from the draft and advance it to a value **different from the current one**: `g<N>` → `g<N+1>` (e.g. `g0`→`g1`, `g2`→`g3`); a turn-correlation id → append `-r<N>` monotonically (e.g. `g3`→`g3-r1`, then `g3-r1`→`g3-r2`). **Exactly one advance per section per turn** (the host persists the new token at turn-end; clearing `behind` needs only that the in-file token *differs* from the persisted one, which a single per-turn advance guarantees). You emit `reproj=g0` as a placeholder when recomposing — **replace it with this advanced token. If you leave `g0` and the section's persisted token is already `g0` (the first-gen default), the token won't change and `behind` will never clear.**
196
+ 3. **Splice with `EditFile`.** Read the draft and confirm EXACTLY ONE `pdd:section id=<id>` anchor exists for the target (a duplicate id is a structural defect — surface it, do not splice). A section's **block** runs from its `pdd:section` anchor line through its `[Refine section]` link line (the content up to, but NOT including, the blank-line separator before the next anchor). `EditFile` with `old_content` = that exact current block — the unique `pdd:section id=` anchor makes `old_content` unique, so `replace_all` stays false — and `new_content` = the re-lifted block with the advanced token in its anchor and `sources=` preserved, **same shape with no leading/trailing blank lines** so the inter-block separators (which sit OUTSIDE the span) stay intact and every other section is byte-identical. For multiple ids, run the `EditFile`s sequentially.
197
+ - **On `EditFile` error:** a stale-span / whitespace `old_content` mismatch → re-read the draft, retry that section ONCE. Second failure, or a block too large for one `old_content` to match reliably (`target-state`, `current-state`) → split the splice: `EditFile` the unique anchor line alone (advanced token, `sources=` extended), then after a fresh read `EditFile` each changed subsection with a narrowly bounded `old_content`; the embedded diagram and unchanged subsections stay byte-identical, and the section still gets exactly one token advance. STOP only when the split also fails (surface a terminal error; report which sections did/didn't re-project). A non-uniqueness / duplicate-anchor error is a structural defect, NOT a transient mismatch — do NOT blind-retry; surface it.
198
+ 4. The host compares each new in-file `reproj=` token against its sidecar-persisted token and clears `behind` for that section.
199
+
200
+ **Partial re-sync is recoverable, not corrupt:** each `EditFile` is atomic per section and the advanced token is per-section proof. If section A succeeds and B fails, the draft is half-re-projected but VALID — B stays `behind` and is picked up next re-sync. Do NOT add rollback.
201
+
202
+ Return: list of re-projected section ids + new reproj tokens.
203
+
204
+ **Editing, refinement, and re-sync routing on later turns:** see the `SKILL.md` "Living draft editing" section and its **Refinement cascade** — those rules apply on ALL turns once a draft exists, own the diagram and SDD legs, and `SKILL.md` is always loaded. This file (`pdd-generation.md`) is loaded only at first-gen; it owns orchestration mechanics only.