@n8n/instance-ai 1.10.1 → 1.11.0

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 (221) hide show
  1. package/README.md +128 -0
  2. package/dist/agent/instance-agent.js +8 -0
  3. package/dist/agent/instance-agent.js.map +1 -1
  4. package/dist/agent/shared-prompts.d.ts +1 -0
  5. package/dist/agent/shared-prompts.js +25 -0
  6. package/dist/agent/shared-prompts.js.map +1 -1
  7. package/dist/agent/sub-agent-debriefing.d.ts +8 -8
  8. package/dist/agent/system-prompt.d.ts +2 -0
  9. package/dist/agent/system-prompt.js +52 -93
  10. package/dist/agent/system-prompt.js.map +1 -1
  11. package/dist/build.tsbuildinfo +1 -1
  12. package/dist/constants/max-steps.d.ts +0 -1
  13. package/dist/constants/max-steps.js +0 -1
  14. package/dist/constants/max-steps.js.map +1 -1
  15. package/dist/index.d.ts +123 -33
  16. package/dist/index.js +103 -96
  17. package/dist/index.js.map +1 -1
  18. package/dist/knowledge-base/build-templates-index.d.ts +12 -0
  19. package/dist/knowledge-base/build-templates-index.js +113 -0
  20. package/dist/knowledge-base/build-templates-index.js.map +1 -0
  21. package/dist/knowledge-base/extract-builder-templates-archive.d.ts +2 -0
  22. package/dist/knowledge-base/extract-builder-templates-archive.js +89 -0
  23. package/dist/knowledge-base/extract-builder-templates-archive.js.map +1 -0
  24. package/dist/knowledge-base/materialize-knowledge-base.d.ts +67 -0
  25. package/dist/knowledge-base/materialize-knowledge-base.js +186 -0
  26. package/dist/knowledge-base/materialize-knowledge-base.js.map +1 -0
  27. package/dist/mcp/mcp-client-manager.js +6 -1
  28. package/dist/mcp/mcp-client-manager.js.map +1 -1
  29. package/dist/parsers/pdf-parser.js +4 -0
  30. package/dist/parsers/pdf-parser.js.map +1 -1
  31. package/dist/planned-tasks/planned-task-service.d.ts +5 -1
  32. package/dist/planned-tasks/planned-task-service.js +29 -1
  33. package/dist/planned-tasks/planned-task-service.js.map +1 -1
  34. package/dist/runtime/run-state-registry.d.ts +8 -0
  35. package/dist/runtime/run-state-registry.js.map +1 -1
  36. package/dist/runtime/terminal-response-guard.d.ts +2 -1
  37. package/dist/runtime/terminal-response-guard.js +20 -0
  38. package/dist/runtime/terminal-response-guard.js.map +1 -1
  39. package/dist/skills/materialize-runtime-skills.d.ts +1 -7
  40. package/dist/skills/materialize-runtime-skills.js +96 -176
  41. package/dist/skills/materialize-runtime-skills.js.map +1 -1
  42. package/dist/storage/index.d.ts +1 -1
  43. package/dist/storage/planned-task-storage.js +1 -0
  44. package/dist/storage/planned-task-storage.js.map +1 -1
  45. package/dist/storage/terminal-outcome-storage.d.ts +2 -2
  46. package/dist/storage/workflow-loop-storage.d.ts +199 -70
  47. package/dist/storage/workflow-loop-storage.js +107 -0
  48. package/dist/storage/workflow-loop-storage.js.map +1 -1
  49. package/dist/stream/work-summary-accumulator.d.ts +6 -6
  50. package/dist/tools/attachments/parse-file.tool.d.ts +18 -18
  51. package/dist/tools/credentials.tool.d.ts +2 -5
  52. package/dist/tools/credentials.tool.js +2 -6
  53. package/dist/tools/credentials.tool.js.map +1 -1
  54. package/dist/tools/executions.tool.js +53 -7
  55. package/dist/tools/executions.tool.js.map +1 -1
  56. package/dist/tools/index.js +3 -9
  57. package/dist/tools/index.js.map +1 -1
  58. package/dist/tools/nodes/node-search-engine.d.ts +2 -0
  59. package/dist/tools/nodes/node-search-engine.js +66 -7
  60. package/dist/tools/nodes/node-search-engine.js.map +1 -1
  61. package/dist/tools/nodes.tool.js +10 -3
  62. package/dist/tools/nodes.tool.js.map +1 -1
  63. package/dist/tools/orchestration/complete-checkpoint.tool.js +69 -0
  64. package/dist/tools/orchestration/complete-checkpoint.tool.js.map +1 -1
  65. package/dist/tools/orchestration/delegate.schemas.d.ts +5 -5
  66. package/dist/tools/orchestration/delegate.tool.js +1 -1
  67. package/dist/tools/orchestration/delegate.tool.js.map +1 -1
  68. package/dist/tools/orchestration/plan.tool.js +96 -60
  69. package/dist/tools/orchestration/plan.tool.js.map +1 -1
  70. package/dist/tools/orchestration/report-verification-verdict.tool.d.ts +9 -6
  71. package/dist/tools/orchestration/report-verification-verdict.tool.js +6 -1
  72. package/dist/tools/orchestration/report-verification-verdict.tool.js.map +1 -1
  73. package/dist/tools/orchestration/verify-built-workflow.tool.js +3 -2
  74. package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
  75. package/dist/tools/tool-ids.d.ts +0 -5
  76. package/dist/tools/tool-ids.js +3 -7
  77. package/dist/tools/tool-ids.js.map +1 -1
  78. package/dist/tools/workflows/build-workflow.tool.d.ts +8 -2
  79. package/dist/tools/workflows/build-workflow.tool.js +371 -17
  80. package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
  81. package/dist/tools/workflows/materialize-node-type.tool.d.ts +4 -4
  82. package/dist/tools/workflows/materialize-node-type.tool.js +2 -2
  83. package/dist/tools/workflows/materialize-node-type.tool.js.map +1 -1
  84. package/dist/tools/workflows/setup-workflow.schema.d.ts +32 -32
  85. package/dist/tools/workflows/submit-workflow.tool.d.ts +16 -12
  86. package/dist/tools/workflows/submit-workflow.tool.js +9 -2
  87. package/dist/tools/workflows/submit-workflow.tool.js.map +1 -1
  88. package/dist/tools/workflows/write-sandbox-file.tool.js +2 -2
  89. package/dist/tools/workflows/write-sandbox-file.tool.js.map +1 -1
  90. package/dist/tools/workflows.tool.js +5 -0
  91. package/dist/tools/workflows.tool.js.map +1 -1
  92. package/dist/tracing/langsmith-tracing.js +6 -1
  93. package/dist/tracing/langsmith-tracing.js.map +1 -1
  94. package/dist/tracing/trace-payloads.js +2 -6
  95. package/dist/tracing/trace-payloads.js.map +1 -1
  96. package/dist/types.d.ts +48 -9
  97. package/dist/types.js.map +1 -1
  98. package/dist/workflow-builder/build-failure-tracker.d.ts +10 -0
  99. package/dist/workflow-builder/build-failure-tracker.js +36 -0
  100. package/dist/workflow-builder/build-failure-tracker.js.map +1 -0
  101. package/dist/workflow-builder/index.d.ts +1 -0
  102. package/dist/workflow-builder/index.js +4 -1
  103. package/dist/workflow-builder/index.js.map +1 -1
  104. package/dist/workflow-loop/guidance.js +10 -6
  105. package/dist/workflow-loop/guidance.js.map +1 -1
  106. package/dist/workflow-loop/index.d.ts +3 -2
  107. package/dist/workflow-loop/index.js +14 -1
  108. package/dist/workflow-loop/index.js.map +1 -1
  109. package/dist/workflow-loop/runtime.js +3 -1
  110. package/dist/workflow-loop/runtime.js.map +1 -1
  111. package/dist/workflow-loop/verification-obligation.d.ts +15 -0
  112. package/dist/workflow-loop/verification-obligation.js +140 -0
  113. package/dist/workflow-loop/verification-obligation.js.map +1 -0
  114. package/dist/workflow-loop/workflow-loop-controller.js +26 -1
  115. package/dist/workflow-loop/workflow-loop-controller.js.map +1 -1
  116. package/dist/workflow-loop/workflow-loop-state.d.ts +416 -62
  117. package/dist/workflow-loop/workflow-loop-state.js +66 -1
  118. package/dist/workflow-loop/workflow-loop-state.js.map +1 -1
  119. package/dist/workspace/builder-templates-service.js.map +1 -1
  120. package/dist/workspace/compute-workspace-content-hash.d.ts +1 -0
  121. package/dist/workspace/compute-workspace-content-hash.js +15 -0
  122. package/dist/workspace/compute-workspace-content-hash.js.map +1 -0
  123. package/dist/workspace/create-workspace.d.ts +9 -43
  124. package/dist/workspace/create-workspace.js +45 -55
  125. package/dist/workspace/create-workspace.js.map +1 -1
  126. package/dist/workspace/lazy-runtime-workspace.js +1 -1
  127. package/dist/workspace/lazy-runtime-workspace.js.map +1 -1
  128. package/dist/workspace/prebaked-workspace-bundle.d.ts +39 -0
  129. package/dist/workspace/prebaked-workspace-bundle.js +75 -0
  130. package/dist/workspace/prebaked-workspace-bundle.js.map +1 -0
  131. package/dist/workspace/sandbox-fs.d.ts +9 -24
  132. package/dist/workspace/sandbox-fs.js +2 -16
  133. package/dist/workspace/sandbox-fs.js.map +1 -1
  134. package/dist/workspace/sandbox-setup.d.ts +1 -7
  135. package/dist/workspace/sandbox-setup.js +28 -170
  136. package/dist/workspace/sandbox-setup.js.map +1 -1
  137. package/dist/workspace/snapshot-image-context.d.ts +5 -0
  138. package/dist/workspace/snapshot-image-context.js +36 -0
  139. package/dist/workspace/snapshot-image-context.js.map +1 -0
  140. package/dist/workspace/snapshot-manager.d.ts +9 -9
  141. package/dist/workspace/snapshot-manager.js +57 -67
  142. package/dist/workspace/snapshot-manager.js.map +1 -1
  143. package/dist/workspace/template-telemetry.js +4 -4
  144. package/dist/workspace/template-telemetry.js.map +1 -1
  145. package/dist/workspace/workspace-file-content.d.ts +2 -0
  146. package/dist/workspace/workspace-file-content.js +11 -0
  147. package/dist/workspace/workspace-file-content.js.map +1 -0
  148. package/dist/workspace/workspace-files.d.ts +20 -0
  149. package/dist/workspace/workspace-files.js +74 -0
  150. package/dist/workspace/workspace-files.js.map +1 -0
  151. package/dist/workspace/workspace-manifest.d.ts +12 -0
  152. package/dist/workspace/workspace-manifest.js +28 -0
  153. package/dist/workspace/workspace-manifest.js.map +1 -0
  154. package/package.json +21 -15
  155. package/skills/data-table-manager/SKILL.md +6 -6
  156. package/skills/debugging-executions/SKILL.md +44 -0
  157. package/skills/planned-task-runtime/SKILL.md +163 -0
  158. package/skills/planning/SKILL.md +137 -0
  159. package/skills/post-build-flow/SKILL.md +119 -0
  160. package/skills/post-build-flow/references/trigger-input-data-shapes.md +38 -0
  161. package/skills/workflow-builder/SKILL.md +608 -0
  162. package/dist/tools/best-practices/index.d.ts +0 -2
  163. package/dist/tools/best-practices/index.js +0 -10
  164. package/dist/tools/best-practices/index.js.map +0 -1
  165. package/dist/tools/best-practices/techniques.d.ts +0 -1
  166. package/dist/tools/best-practices/techniques.js +0 -7
  167. package/dist/tools/best-practices/techniques.js.map +0 -1
  168. package/dist/tools/orchestration/add-plan-item.tool.d.ts +0 -5
  169. package/dist/tools/orchestration/add-plan-item.tool.js +0 -89
  170. package/dist/tools/orchestration/add-plan-item.tool.js.map +0 -1
  171. package/dist/tools/orchestration/blueprint-accumulator.d.ts +0 -49
  172. package/dist/tools/orchestration/blueprint-accumulator.js +0 -176
  173. package/dist/tools/orchestration/blueprint-accumulator.js.map +0 -1
  174. package/dist/tools/orchestration/blueprint.schema.d.ts +0 -182
  175. package/dist/tools/orchestration/blueprint.schema.js +0 -56
  176. package/dist/tools/orchestration/blueprint.schema.js.map +0 -1
  177. package/dist/tools/orchestration/build-workflow-agent.prompt.d.ts +0 -8
  178. package/dist/tools/orchestration/build-workflow-agent.prompt.js +0 -466
  179. package/dist/tools/orchestration/build-workflow-agent.prompt.js.map +0 -1
  180. package/dist/tools/orchestration/build-workflow-agent.tool.d.ts +0 -148
  181. package/dist/tools/orchestration/build-workflow-agent.tool.js +0 -1498
  182. package/dist/tools/orchestration/build-workflow-agent.tool.js.map +0 -1
  183. package/dist/tools/orchestration/builder-memory-compaction.d.ts +0 -42
  184. package/dist/tools/orchestration/builder-memory-compaction.js +0 -132
  185. package/dist/tools/orchestration/builder-memory-compaction.js.map +0 -1
  186. package/dist/tools/orchestration/plan-agent-prompt.d.ts +0 -1
  187. package/dist/tools/orchestration/plan-agent-prompt.js +0 -83
  188. package/dist/tools/orchestration/plan-agent-prompt.js.map +0 -1
  189. package/dist/tools/orchestration/plan-with-agent.tool.d.ts +0 -27
  190. package/dist/tools/orchestration/plan-with-agent.tool.js +0 -710
  191. package/dist/tools/orchestration/plan-with-agent.tool.js.map +0 -1
  192. package/dist/tools/orchestration/submit-plan.tool.d.ts +0 -3
  193. package/dist/tools/orchestration/submit-plan.tool.js +0 -98
  194. package/dist/tools/orchestration/submit-plan.tool.js.map +0 -1
  195. package/dist/tools/templates.tool.d.ts +0 -1
  196. package/dist/tools/templates.tool.js +0 -58
  197. package/dist/tools/templates.tool.js.map +0 -1
  198. package/dist/workspace/daytona-auth-manager.d.ts +0 -26
  199. package/dist/workspace/daytona-auth-manager.js +0 -90
  200. package/dist/workspace/daytona-auth-manager.js.map +0 -1
  201. package/dist/workspace/daytona-filesystem.d.ts +0 -25
  202. package/dist/workspace/daytona-filesystem.js +0 -132
  203. package/dist/workspace/daytona-filesystem.js.map +0 -1
  204. package/dist/workspace/daytona-sandbox.d.ts +0 -71
  205. package/dist/workspace/daytona-sandbox.js +0 -368
  206. package/dist/workspace/daytona-sandbox.js.map +0 -1
  207. package/dist/workspace/lazy-daytona.d.ts +0 -2
  208. package/dist/workspace/lazy-daytona.js +0 -12
  209. package/dist/workspace/lazy-daytona.js.map +0 -1
  210. package/dist/workspace/local-filesystem.d.ts +0 -48
  211. package/dist/workspace/local-filesystem.js +0 -250
  212. package/dist/workspace/local-filesystem.js.map +0 -1
  213. package/dist/workspace/local-sandbox.d.ts +0 -28
  214. package/dist/workspace/local-sandbox.js +0 -121
  215. package/dist/workspace/local-sandbox.js.map +0 -1
  216. package/dist/workspace/n8n-sandbox-filesystem.d.ts +0 -25
  217. package/dist/workspace/n8n-sandbox-filesystem.js +0 -128
  218. package/dist/workspace/n8n-sandbox-filesystem.js.map +0 -1
  219. package/dist/workspace/n8n-sandbox-sandbox.d.ts +0 -35
  220. package/dist/workspace/n8n-sandbox-sandbox.js +0 -143
  221. package/dist/workspace/n8n-sandbox-sandbox.js.map +0 -1
@@ -0,0 +1,163 @@
1
+ ---
2
+ name: planned-task-runtime
3
+ description: >-
4
+ Handles system follow-up turns: planned-task-follow-up (synthesize, replan,
5
+ build-workflow, checkpoint), background-task-completed, running-tasks context,
6
+ create-tasks silence rules, and detached delegate completion. Load whenever
7
+ any of these tags appear or after spawning create-tasks or delegate.
8
+ recommended_tools:
9
+ - create-tasks
10
+ - complete-checkpoint
11
+ - build-workflow
12
+ - delegate
13
+ - task-control
14
+ - workflows
15
+ - verify-built-workflow
16
+ - executions
17
+ ---
18
+
19
+ # Planned Task Runtime
20
+
21
+ Load this skill when the current message contains `<planned-task-follow-up>`,
22
+ `<background-task-completed>`, `<running-tasks>`, or immediately after calling
23
+ `create-tasks` or `delegate`.
24
+
25
+ ## Silence after spawning tasks
26
+
27
+ **After calling detached or scheduled task tools** (`delegate` or
28
+ `create-tasks`): do not write any text. The task card or approval card shows the
29
+ user what's being built or done; restating it is redundant. Do NOT summarize the
30
+ plan, list credentials, describe what the agent will do, or add status details.
31
+ Progress is already visible to the user in real time.
32
+
33
+ When `create-tasks` returns after approval, tasks are already running. Do not
34
+ summarize or add status text — the user already approved the plan and the
35
+ checklist shows progress. Wait for `<planned-task-follow-up>` to arrive; do not
36
+ invent synthetic follow-up turns.
37
+
38
+ ## Never poll
39
+
40
+ **Never poll and never sleep.** Background tasks (`delegate`) settle via
41
+ `<planned-task-follow-up>` turns that arrive automatically when work finishes.
42
+ After you spawn or acknowledge one, end your turn. Do not call
43
+ `workflows(action="list")`, `executions(action="list")`, or any shell command
44
+ to check progress — you will receive a follow-up turn the moment the task settles.
45
+ If a task appears stuck, tell the user and stop; do not try to detect completion
46
+ yourself. Do not re-dispatch a build whose task ID is already visible in
47
+ `<running-tasks>`.
48
+
49
+ When `<running-tasks>` context is present, use it only to reference active task
50
+ IDs for cancellation or corrections.
51
+
52
+ Always pass `conversationContext` when spawning background agents (`delegate`) —
53
+ summarize what was discussed, decisions made, and information gathered.
54
+
55
+ If the user sends a correction while a build is running, call
56
+ `task-control(action="correct-task")` with the task ID and correction.
57
+
58
+ ## Synthesize follow-up
59
+
60
+ When `<planned-task-follow-up type="synthesize">` is present, all planned tasks
61
+ completed successfully and any unsettled runtime verification obligations have
62
+ already been handled. Before the final message, inspect workflow task outcomes:
63
+ if a workflow still has `verificationReadiness.status === "needs_setup"`, call
64
+ `workflows(action="setup")` for that workflowId; if it has
65
+ `verificationReadiness.status === "not_verifiable"`, include the readiness
66
+ guidance as a clear warning/manual-test note and do not call it verified. Treat
67
+ verified workflow drafts as finished deliverables — they are ready to use. If the
68
+ original user request explicitly asked to run or execute the workflow after
69
+ building it, call `executions(action="run")` once for the built workflow;
70
+ checkpoint verification does not satisfy a user-requested run. Otherwise write a
71
+ concise completion message that names each delivered artifact (data tables,
72
+ workflows) and summarizes what it does, using the user's time zone for any
73
+ scheduled timings. Do not hedge with phrases like "ready to go live" or "let me
74
+ know when you're ready" — the work is done. If any workflow is unpublished,
75
+ state that plainly as a one-line next-step note ("Publish when you want it live —
76
+ you can do that from the workflow editor."), not as a gating condition. Do not
77
+ create another plan.
78
+
79
+ ## Replan follow-up
80
+
81
+ When `<planned-task-follow-up type="replan">` is present, a planned task failed
82
+ and the graph is in `awaiting_replan`. You MUST take action in this same turn —
83
+ handle a single simple task directly (matching tool: `build-workflow`,
84
+ `data-tables`, `delegate`, etc.), call `create-tasks` with
85
+ `planningContext.source: "replan"` for multiple dependent tasks, or explain the
86
+ blocker to the user if nothing sensible remains. Do NOT reply with an
87
+ acknowledgement or status update alone — the scheduler will not fire another
88
+ follow-up until you act, and the thread will silently stall.
89
+
90
+ Replan routing (do not re-plan from scratch):
91
+
92
+ - One simple task remains (single data-table op, credential setup, single-workflow
93
+ patch) → handle directly with the matching tool.
94
+ - Multiple dependent tasks still need scheduling → `create-tasks` with
95
+ `planningContext.source: "replan"`.
96
+ - Nothing sensible remains → explain the blocker to the user.
97
+
98
+ ## Build-workflow follow-up
99
+
100
+ When `<planned-task-follow-up type="build-workflow">` is present, load the
101
+ `workflow-builder` skill and build exactly the `buildTask` in the payload. If
102
+ `buildTask.workflowId` is present, update that workflow; otherwise create a new
103
+ one. If `buildTask.isSupportingWorkflow === true`, pass `isSupportingWorkflow:
104
+ true` to `build-workflow`; that saved supporting workflow is the task's final
105
+ deliverable. Save with `build-workflow` and stop after a successful save — do not
106
+ verify, set up credentials, publish, call `complete-checkpoint`, create a new
107
+ plan, or write a user-facing message. If `build-workflow` returns fixable
108
+ validation errors, patch in the same turn and save again. If the build is
109
+ blocked, explain the blocker briefly; the planned task finalizer will mark the
110
+ task failed.
111
+
112
+ ## Checkpoint follow-up
113
+
114
+ When `<planned-task-follow-up type="checkpoint">` is present, the block contains
115
+ exactly one checkpoint task (`checkpoint.id`, `checkpoint.title`,
116
+ `checkpoint.instructions`, and `checkpoint.dependsOn` — the outcomes of prior
117
+ tasks, including workflow build outcomes with their `outcome.workItemId` /
118
+ `outcome.workflowId`). **Always require structured verification evidence —
119
+ never trust builder prose.** Before completing the checkpoint, inspect each
120
+ dependent persisted workflow with `workflows(action="get-json", workflowId)` and
121
+ compare the actual graph to the build task and checkpoint goal. Build/save
122
+ success is not proof of workflow quality. If the saved workflow is only a draft,
123
+ lacks the requested outcome, or verification evidence is weak, patch the same
124
+ workflow in this checkpoint turn and re-read/re-verify it. If a dependency outcome
125
+ contains successful `outcome.verification` tool evidence (`attempted: true`,
126
+ `success: true`, an `executionId`, and executed-node evidence) and your
127
+ persisted-workflow inspection agrees the requested outcome is present, use that
128
+ evidence without re-running verification. Otherwise execute
129
+ `checkpoint.instructions` using your tools — typically `verify-built-workflow`
130
+ with the work item ID from the build outcome, or `executions(action="run")` for a
131
+ built workflow with real credentials and a testable trigger. If verification
132
+ succeeds and any verified workflow dependency outcome has
133
+ `outcome.setupRequirement.status === "required"`, call
134
+ `workflows(action="setup")` with that workflowId before `complete-checkpoint`;
135
+ the inline setup card appears automatically in the AI Assistant panel, so do not
136
+ tell the user to open the editor, use the canvas, or click a Setup button. If
137
+ setup returns `deferred: true`, respect it and still complete the checkpoint
138
+ with a result that says setup was deferred. Do not call
139
+ `credentials(action="setup")` or `apply-workflow-credentials` for workflow
140
+ setup. Then call `complete-checkpoint(taskId, status, result)` **exactly once**
141
+ to report the outcome (`status: "succeeded"` on pass, `"failed"` on a verification
142
+ failure). Do not create a new plan, do not write a user-facing message — the
143
+ checkpoint card in the plan checklist is the user-visible surface. End your turn
144
+ as soon as `complete-checkpoint` returns.
145
+
146
+ **If your verification surfaced a bug you can patch in place** (e.g., a Code-node
147
+ shape issue), load the `workflow-builder` skill and call `build-workflow`
148
+ directly during this checkpoint turn, passing the existing `workflowId` and the
149
+ dependency `workItemId`. Then re-verify in the same checkpoint turn. Keep the
150
+ patch count small: if the issue cannot be narrowed within two rounds, call
151
+ `complete-checkpoint(status="failed", error=...)` with a summary of what remains
152
+ and let replan take over.
153
+
154
+ ## Background task completed
155
+
156
+ When `<background-task-completed>` is present, a detached background task
157
+ finished. The `result` field holds the sub-agent's authoritative summary of what
158
+ was actually done. **When you write the user-facing recap, take factual details —
159
+ model IDs, node names, resource IDs, parameter values — directly from this
160
+ `result` text.** Do not substitute values from conversation history or training
161
+ priors: if the `result` says `gpt-5.4-mini`, write `gpt-5.4-mini`, not "GPT-4o
162
+ mini" or any other name you associate with the provider. The task spec describes
163
+ intent; the `result` describes what actually happened.
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: planning
3
+ description: >-
4
+ ONLY for coordinated multi-artifact work: multiple workflows with dependencies,
5
+ shared data-table schema/migration across tasks, or the user explicitly asked
6
+ to review a plan first. Do NOT use for new one-off workflows, single-workflow
7
+ edits, verification-only requests, or standalone data-table ops — use
8
+ workflow-builder or data-table-manager instead.
9
+ recommended_tools:
10
+ - create-tasks
11
+ - workflows
12
+ - nodes
13
+ - credentials
14
+ - data-tables
15
+ - parse-file
16
+ - research
17
+ - ask-user
18
+ ---
19
+
20
+ # Planning
21
+
22
+ Use this skill to design a dependency-aware task graph in the orchestrator and
23
+ submit it with `create-tasks`. Do not spawn another agent, do not delegate the
24
+ planning step, and do not use incremental plan item tools.
25
+
26
+ ## When NOT to use this skill
27
+
28
+ Stop and use `workflow-builder` + `build-workflow` instead when the request is:
29
+
30
+ - A new or one-off single workflow, even if it sounds large or unfamiliar
31
+ - An edit to one existing workflow (nodes, expressions, credentials, schedule, Code)
32
+ - Verification, setup, or credential collection for a workflow you just built
33
+ - A workflow-local data table whose schema ships with that same workflow
34
+ - Standalone data-table list/schema/query/create/mutation work
35
+
36
+ Do not call `create-tasks` just to get approval, verification, or a checklist for
37
+ a single workflow. Workflow verification is automatic from structured build
38
+ outcomes after `build-workflow`.
39
+
40
+ ## When to use this skill
41
+
42
+ Planning is only for work that needs coordination: multiple workflows,
43
+ dependencies between workflows, shared data-table schema or migration work across
44
+ tasks, multiple durable artifacts, broad best-practice research across many
45
+ sources, genuinely ambiguous business-process architecture that cannot be
46
+ resolved with one `build-workflow` call, or an explicit user request to review a
47
+ plan first.
48
+
49
+ If shared data tables are involved, load `data-table-manager` before this skill
50
+ and carry the relevant table guidance into workflow task specs. Clear
51
+ single-workflow builds and existing-workflow edits use `workflow-builder` with
52
+ `build-workflow` directly. Standalone data-table work uses `data-table-manager`
53
+ with direct `data-tables` and `parse-file` calls.
54
+
55
+ ## Method
56
+
57
+ 1. Decide whether the request is plan-worthy by coordination need, not by
58
+ whether a workflow is new.
59
+ 2. Discover what materially affects the plan with normal tools:
60
+ `nodes(action="suggested")`, `credentials(action="list")`,
61
+ `data-tables(action="list")`, `parse-file`, `workflows`, and `research`
62
+ when relevant.
63
+ 3. Prefer reasonable assumptions over questions. Ask the user only when the
64
+ answer would materially change the plan and cannot be discovered.
65
+ 4. Build a dependency-aware graph. Producers must come before consumers.
66
+ Independent tasks should not depend on each other.
67
+ 5. Put single workflow-local table requirements inside that workflow task spec.
68
+ Do not create separate data-table tasks unless the table work is a durable
69
+ artifact shared across tasks.
70
+ 6. Add checkpoint tasks only for exceptional semantic checks that normal
71
+ workflow verification cannot cover.
72
+ 7. Call `create-tasks` with `planningContext.source: "planning-skill"`,
73
+ a concise `summary`, optional `assumptions`, `postBuildRunRequested: true`
74
+ only when the user explicitly asked to run, execute, or test a workflow
75
+ after building it, and the final task graph.
76
+ 8. After calling `create-tasks`, do not write visible text. The approval card is
77
+ the user-visible surface.
78
+
79
+ ## Task Graph Rules
80
+
81
+ - Use task kinds exactly as supported: `build-workflow`, `delegate`, and
82
+ `checkpoint`.
83
+ - Each task `id` must be stable and referenced by dependency edges.
84
+ - Each `title` should be short and user-facing.
85
+ - Each `spec` must be the complete executor briefing for that task. The task
86
+ executor may not see your broader planning notes.
87
+ - For `build-workflow` tasks, describe outcomes, key behaviours, integrations,
88
+ data-table requirements, schedules in the user's timezone, setup expectations,
89
+ credential assumptions, and verification-relevant trigger/input details. Do
90
+ not write node-by-node wiring or fake user data.
91
+ - If a `build-workflow` task's final deliverable is a supporting sub-workflow,
92
+ set `isSupportingWorkflow: true` on that task. Do not set it for helper
93
+ sub-workflows that are only intermediate artifacts inside a larger main
94
+ workflow task.
95
+ - For `delegate` tasks, include all context the background task needs and list
96
+ only the tools it should use.
97
+ - For `checkpoint` tasks, write the semantic validation goal, the exact
98
+ evidence to inspect, and a plain pass/fail condition.
99
+
100
+ ## Assumptions And Questions
101
+
102
+ - Never ask about things tools can discover, such as available credentials,
103
+ existing data tables, workflow names, node availability, or attached-file
104
+ structure.
105
+ - Never ask for implementation details such as node choices, column names, or
106
+ trigger mechanics when a sensible default exists.
107
+ - Never default resource identifiers the user did not mention, such as Slack
108
+ channels, calendars, spreadsheets, folders, databases, or recipient lists.
109
+ Leave them for the builder to resolve or collect through setup.
110
+ - If exactly one matching credential exists, assume it and mention the
111
+ credential name in `planningContext.assumptions`.
112
+ - If no matching credential exists, plan normally. The builder will mock or
113
+ leave it unresolved and route setup after verification.
114
+ - If multiple matching credentials exist and the user did not name one, ask once
115
+ with `ask-user` because the choice cannot be discovered.
116
+
117
+ ## Checkpoints
118
+
119
+ Workflow verification is automatic from structured build outcomes. Do not add
120
+ routine "verify this workflow" checkpoint tasks for every workflow.
121
+
122
+ Checkpoint tasks are exceptional semantic checks. Use them for cross-workflow
123
+ contracts, confirming a report combines upstream data correctly, validating a
124
+ business invariant across deliverables, or checking a condition that cannot be
125
+ covered by normal runtime verification.
126
+
127
+ Do not add checkpoints for delegate tasks, and do not list `tools` on checkpoint
128
+ tasks.
129
+
130
+ ## Revisions
131
+
132
+ If the user rejects the plan with requested changes, revise surgically and call
133
+ `create-tasks` again in the same orchestrator run with
134
+ `planningContext.source: "planning-skill"`.
135
+
136
+ If the user denies the plan outright, stop. Do not call `create-tasks` again in
137
+ the same message group.
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: post-build-flow
3
+ description: >-
4
+ Handles workflow verification and setup after build-workflow succeeds, or when
5
+ the message contains workflow-verification-follow-up or workflow-setup-required.
6
+ Load after direct builds, when verificationReadiness requires action, or on
7
+ orchestrator verify/setup follow-up turns.
8
+ recommended_tools:
9
+ - verify-built-workflow
10
+ - workflows
11
+ - build-workflow
12
+ - executions
13
+ ---
14
+
15
+ # Post-Build Flow
16
+
17
+ Use this skill after `build-workflow` succeeds on a direct orchestrator build, or
18
+ when the current message contains `<workflow-verification-follow-up>` or
19
+ `<workflow-setup-required>`.
20
+
21
+ For trigger `inputData` shapes, read
22
+ `knowledge-base/reference/trigger-input-data-shapes.md` in the sandbox workspace
23
+ when available, or load this skill's `references/trigger-input-data-shapes.md`
24
+ linked file.
25
+
26
+ ## Verification follow-up
27
+
28
+ When the current message contains `<workflow-verification-follow-up>`, verify
29
+ immediately from the payload's `obligation` — do not acknowledge first. If the
30
+ obligation is `ready_to_verify` or `verifying`, call `verify-built-workflow`. Do
31
+ **not** call `workflows(action="setup")` in this turn and do **not** declare the
32
+ workflow finished if `outcome.setupRequirement.status === "required"` — setup is
33
+ routed automatically as a separate `<workflow-setup-required>` step after
34
+ verification.
35
+
36
+ ## Setup follow-up
37
+
38
+ When the current message contains `<workflow-setup-required>`, your only action is
39
+ to call `workflows(action="setup")` with the `workflowId` from the payload. Do
40
+ not verify, do not ask, do not write a message first — the inline setup card in
41
+ the AI Assistant panel is the user-visible surface. If it returns `deferred:
42
+ true`, respect the user's choice and do not retry with any other setup tool.
43
+
44
+ ## Publishing and testing
45
+
46
+ **Publishing is never required for testing.** Both `executions(action="run")` and
47
+ `verify-built-workflow` inject `inputData` as the trigger's output — the
48
+ workflow does not need to be active. Form, webhook, chat, and other event-based
49
+ triggers are all testable while the workflow is unpublished. Never publish a
50
+ workflow as a precondition for running it.
51
+
52
+ ## After build-workflow succeeds
53
+
54
+ 1. Read `workflowId`, `workItemId`, `triggerNodes`, `verificationReadiness`, and
55
+ `setupRequirement` from the tool output. If the output is missing a
56
+ `workflowId`, explain that the build did not submit.
57
+ - Before treating a saved workflow as done, inspect the persisted workflow
58
+ with `workflows(action="get-json", workflowId)` and compare the actual
59
+ graph to the user's requested outcome. Build/save success only means a
60
+ workflow was saved; it does not prove the saved workflow is good.
61
+ - If the persisted workflow is missing the requested outcome, has an obvious
62
+ dead-end draft shape, or the verification evidence is weak, load the
63
+ `workflow-builder` skill and patch the same workflow with `build-workflow`
64
+ using the existing `workflowId` and `workItemId`; then inspect and verify
65
+ again.
66
+ - If `verificationReadiness.status === "already_verified"`, treat the
67
+ workflow as verified and do **not** call `verify-built-workflow` again.
68
+ - If `verificationReadiness.status === "ready"`, call
69
+ `verify-built-workflow` with the `workItemId` / `workflowId` and the
70
+ trigger-appropriate `inputData` shape.
71
+ - If `verificationReadiness.status === "needs_setup"`, call
72
+ `workflows(action="setup")` with the workflowId so the user can configure it
73
+ through the inline setup card in the AI Assistant panel.
74
+ - If `verificationReadiness.status === "not_verifiable"`, do not infer
75
+ lower-level verification conditions; use the readiness guidance to give a
76
+ clear warning or manual-test note. This is a warning completion state, not
77
+ a verified state and not an infinite blocker.
78
+ 2. After verification handling, if `setupRequirement.status === "required"` and
79
+ setup has not already run for this build, call `workflows(action="setup")`
80
+ with the workflowId.
81
+ 3. When `workflows(action="setup")` opens the inline setup card, the card is the
82
+ user-visible surface. Do not tell the user to open the editor, use the canvas,
83
+ or click a Setup button; the user does not need to navigate anywhere.
84
+ 4. When `workflows(action="setup")` returns `deferred: true`, respect the user's
85
+ decision — do not retry with `credentials(action="setup")` or any other
86
+ setup tool. The user chose to set things up later.
87
+ 5. Ask the user if they want to test the workflow (skip this if
88
+ `verify-built-workflow` already proved it works end-to-end).
89
+ 6. Only call `workflows(action="publish")` when the user explicitly asks to
90
+ publish. Never publish automatically.
91
+
92
+ ## Credentials before build
93
+
94
+ Call `credentials(action="list")` first to know what's available. Build the
95
+ workflow immediately — the builder preserves explicit valid credentials and
96
+ auto-mocks missing or unselected ones. Do not ask whether to build now and set up
97
+ credentials later; building first and routing setup after verification is the
98
+ default path. Workflow verification is automatic from the build outcome; the
99
+ orchestrator handles workflow setup after verification when the saved workflow
100
+ still has mocked credentials or placeholders.
101
+
102
+ **Ask once when a service has multiple credentials of the same type.** If
103
+ `credentials(action="list")` shows more than one entry of the type a requested
104
+ integration needs (e.g. two `openAiApi` accounts, three Google Calendar
105
+ accounts), use `ask-user` with a single-select to let the user pick one before
106
+ building, and use the chosen credential name in the workflow code. Exception: the
107
+ user already named the credential in their message — use it directly. With a
108
+ single candidate, auto-apply and do not ask.
109
+
110
+ **Ask which auth type to use when a service supports more than one.**
111
+ `credentials(action="setup")` opens a picker locked to a single `credentialType`
112
+ — the user cannot switch auth types from there. So when
113
+ `credentials(action="search-types")` returns more than one auth option for a
114
+ service (e.g. `notionApi` and `notionOAuth2Api`, or `slackApi` and
115
+ `slackOAuth2Api`), use `ask-user` with a single-select to let the user pick the
116
+ auth type before calling `credentials(action="setup")`. List OAuth2 first and
117
+ present it as the recommended option. Exception: the user has clearly indicated
118
+ an auth type (e.g. "api key", "oauth", "personal token") — map it to the matching
119
+ `credentialType` and use it directly without asking.
@@ -0,0 +1,38 @@
1
+ # Per-trigger `inputData` shape
2
+
3
+ Used by `verify-built-workflow`, `executions(action="run")`, and checkpoint
4
+ verification. The pin-data adapter spreads or wraps based on trigger type —
5
+ passing the wrong shape gives null downstream values that look like an
6
+ expression bug.
7
+
8
+ ## Form Trigger (`n8n-nodes-base.formTrigger`)
9
+
10
+ Flat field map, e.g. `{name: "Alice", email: "a@b.c"}`. The production Form
11
+ Trigger emits each field directly on `$json`, so the builder's `$json.<field>`
12
+ expressions are correct. **Do NOT wrap in `formFields`** — the adapter will
13
+ reject the call.
14
+
15
+ ## Webhook (`n8n-nodes-base.webhook`)
16
+
17
+ The body payload, e.g. `{event: "signup", userId: "..."}`. The adapter wraps it
18
+ under `body`, so downstream nodes reference `$json.body.<field>`.
19
+
20
+ ## Chat Trigger (`@n8n/n8n-nodes-langchain.chatTrigger`)
21
+
22
+ `{chatInput: "user message"}`.
23
+
24
+ ## Schedule Trigger (`n8n-nodes-base.scheduleTrigger`)
25
+
26
+ Omit `inputData`; the adapter emits synthetic timestamp fields.
27
+
28
+ ## Other event triggers
29
+
30
+ Linear, GitHub, Slack, MCP, and similar triggers: pass `inputData` matching the
31
+ trigger's expected payload shape from the node type definition.
32
+
33
+ ## Debugging wrong null values
34
+
35
+ **Do not patch a workflow first when verify returns null downstream values.**
36
+ Re-run verify with the corrected `inputData` shape. Only patch the workflow if
37
+ the expression is wrong against the *production* trigger output shape (consult
38
+ node descriptions), not the `instanceAi` pin data path.