@salesforce/afv-skills 1.30.0 → 1.32.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.
- package/package.json +1 -1
- package/skills/agentforce-bot-upgrade/SKILL.md +217 -0
- package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +242 -0
- package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +128 -0
- package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +208 -0
- package/skills/agentforce-bot-upgrade/references/input-contract.md +101 -0
- package/skills/agentforce-bot-upgrade/references/mapping-rules.md +113 -0
- package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +78 -0
- package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +67 -0
- package/skills/agentforce-bot-upgrade/references/quality-checklist.md +33 -0
- package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +116 -0
- package/skills/data360-code-extension-generate/SKILL.md +15 -2
- package/skills/dx-devops-work-item-manage/SKILL.md +270 -0
- package/skills/dx-devops-work-item-manage/examples/common-workflows.md +479 -0
- package/skills/dx-devops-work-item-manage/references/cli-commands.md +476 -0
- package/skills/dx-org-manage/SKILL.md +8 -5
- package/skills/dx-org-trial-expiration-check/SKILL.md +239 -0
- package/skills/dx-org-trial-expiration-check/scripts/check_expiration.sh +588 -0
- package/skills/dx-pkg-post-install-configure/SKILL.md +184 -0
- package/skills/experience-ui-bundle-app-coordinate/SKILL.md +202 -35
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-hosting-target.sh +26 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-sfdx-project.sh +15 -0
- package/skills/experience-ui-bundle-custom-app-generate/SKILL.md +29 -5
- package/skills/experience-ui-bundle-custom-app-generate/references/configure-metadata-custom-application.md +1 -1
- package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.sh +30 -0
- package/skills/experience-ui-bundle-features-generate/SKILL.md +86 -11
- package/skills/experience-ui-bundle-features-generate/references/conflict-resolution-schema.json +20 -0
- package/skills/experience-ui-bundle-features-generate/scripts/verify-react-bundle.sh +14 -0
- package/skills/experience-ui-bundle-frontend-generate/SKILL.md +6 -1
- package/skills/experience-ui-bundle-frontend-generate/references/component.md +34 -1
- package/skills/experience-ui-bundle-frontend-generate/references/page.md +1 -1
- package/skills/experience-ui-bundle-metadata-generate/SKILL.md +19 -8
- package/skills/experience-ui-bundle-metadata-generate/references/csp-metadata-format.md +2 -2
- package/skills/experience-ui-bundle-metadata-generate/scripts/check-api-version.sh +30 -0
- package/skills/experience-ui-bundle-project-generate/SKILL.md +111 -0
- package/skills/experience-ui-bundle-project-generate/scripts/flatten-project.mjs +33 -0
- package/skills/platform-custom-field-generate/SKILL.md +12 -11
- package/skills/platform-custom-field-generate/references/advanced-picklists.md +17 -17
- package/skills/platform-custom-lightning-type-generate/SKILL.md +9 -14
- package/skills/platform-custom-lightning-type-generate/references/widget-rendition.md +27 -111
- package/skills/platform-custom-report-type-generate/SKILL.md +259 -0
- package/skills/platform-custom-report-type-generate/examples/AccountProjectsWithTasks.reportType-meta.xml +51 -0
- package/skills/platform-custom-report-type-generate/examples/AccountsWithIndustry.reportType-meta.xml +27 -0
- package/skills/platform-custom-report-type-generate/examples/AccountsWithProjects.reportType-meta.xml +44 -0
- package/skills/platform-custom-report-type-generate/references/category-values.md +32 -0
- package/skills/platform-custom-report-type-generate/references/errors-and-troubleshooting.md +24 -0
- package/skills/platform-dataspace-access-configure/SKILL.md +318 -0
- package/skills/platform-docs-get/SKILL.md +4 -0
- package/skills/platform-docs-get/scripts/extract_salesforce_doc.py +78 -13
- package/skills/platform-encryption-configure/SKILL.md +122 -0
- package/skills/platform-encryption-configure/assets/EncryptionKey.settings-meta.xml +17 -0
- package/skills/platform-encryption-configure/assets/PlatformEncryption.settings-meta.xml +15 -0
- package/skills/platform-encryption-configure/assets/encrypted-field.field-meta.xml +22 -0
- package/skills/platform-encryption-configure/examples/cache-only-keys.settings-meta.xml +11 -0
- package/skills/platform-encryption-configure/references/encryption-schemes.md +34 -0
- package/skills/platform-encryption-configure/references/key-models.md +34 -0
- package/skills/platform-encryption-configure/references/tenant-secret-lifecycle.md +23 -0
- package/skills/platform-encryption-configure/scripts/validate-encryption-metadata.sh +54 -0
- package/skills/platform-lightning-type-widget-coordinate/SKILL.md +214 -0
- package/skills/platform-lightning-type-widget-coordinate/examples/existing-lightning-type-with-widget-prompt.md +80 -0
- package/skills/platform-lightning-type-widget-coordinate/examples/new-lightning-type-with-widget-prompt.md +75 -0
- package/skills/platform-lightning-type-widget-coordinate/references/build-plan-format.md +67 -0
- package/skills/platform-lightning-type-widget-coordinate/references/lightning-type-discovery.md +124 -0
- package/skills/platform-lightning-type-widget-coordinate/references/validation-gates.md +130 -0
- package/skills/platform-metadata-api-context-get/SKILL.md +13 -10
- package/skills/platform-sharing-owd-configure/SKILL.md +142 -0
- package/skills/platform-sharing-owd-configure/examples/get_owd_output.md +38 -0
- package/skills/platform-sharing-owd-configure/examples/update_owd_output.md +44 -0
- package/skills/platform-sharing-owd-configure/references/access_levels.md +49 -0
- package/skills/platform-sharing-owd-configure/references/metadata_api_approach.md +69 -0
- package/skills/platform-sharing-rules-generate/SKILL.md +89 -19
- package/skills/platform-sharing-rules-generate/examples/test-cases.md +381 -0
- package/skills/platform-widget-generate/SKILL.md +241 -0
- package/skills/platform-widget-generate/examples/conditional.json +73 -0
- package/skills/platform-widget-generate/examples/list-with-foreach.json +66 -0
- package/skills/platform-widget-generate/examples/single-object.json +64 -0
- package/skills/platform-widget-generate/references/schema-from-lightning-type.md +76 -0
- package/skills/platform-widget-generate/references/widget-bundle-layout.md +116 -0
- package/skills/platform-widget-generate/references/widget-meta-directives.md +130 -0
- package/skills/sales-agentforce-pipeline-management-configure/SKILL.md +268 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/field-completion-template.genAiPromptTemplate-meta.xml +141 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/pipeline_management_flow.flow-meta.xml +548 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/sales_management_agent.agent +2938 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/sales_management_agent.bundle-meta.xml +4 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/sfdx-project.json +12 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/bant.txt +11 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/meddic.txt +11 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/spiced.txt +11 -0
- package/skills/sales-agentforce-pipeline-management-configure/examples/custom-prompt-instructions.md +317 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/admin-communication.md +355 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/agent-creation.md +383 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/auth-and-cli.md +146 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/automation-matrix.md +23 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/autonomous-updates.md +215 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/canonical-agent-path.md +75 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/data-sources.md +155 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/field-completion-prompt-template.md +120 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/field-completion-prompts.md +149 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/flags.md +13 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/flow-clone-from-template.md +447 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/metadata-inventory.md +330 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/opportunity-stages.md +246 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/repair-diagnostics.md +265 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/setup-order.md +263 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/soap-api-enablement.md +528 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/CHANGES.md +180 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/README.md +56 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/add-field-suggestion.sh +679 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/create-agent.sh +302 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/create-flow.sh +250 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/define-agent-access.sh +430 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/deploy-settings.sh +77 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/enable-deal-agent.sh +241 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/enable-prerequisites.sh +538 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/flow-debug-and-verify.sh +385 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/retrieve-settings.sh +131 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/setup-all.sh +2791 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/agent-bundle-publish.sh +189 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/agent-detection.sh +239 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/flow-builder.sh +238 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/psg.sh +48 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/soap.sh +140 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/stage-descriptions.sh +448 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/test-opp.sh +166 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/verify-all.sh +636 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/verify-prompt-generation.sh +346 -0
package/package.json
CHANGED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentforce-bot-upgrade
|
|
3
|
+
description: "Use this skill to Upgrade Einstein Bots into Agentforce agents end-to-end in a single pass, orchestrating per-bot Agent Spec generation, planner reconciliation across bots, agentforce-generate authoring, and post-conversion .agent enhancements. TRIGGER when: user asks to migrate, upgrade, or convert one or more Einstein Bots to Agentforce; runs a multi-bot bot-to-agent upgrade; needs Einstein Bot metadata turned into Agent Spec handoffs and generated .agent agents; convert bots to agents; upgrade my service bots; move bots to Agentforce. DO NOT TRIGGER when: user already has an approved Agent Spec and only wants direct .agent authoring, deploy, test, or observe flows; the request is unrelated to Einstein Bot migration."
|
|
4
|
+
argument-hint: "[--mode <online|offline>] [--org-alias <org-alias> --bots <bot1:v1,bot2:v2,...> | --offline-dir <offline-dir> [--bots <bot1,bot2,...>]] [--interactive <true|false>]"
|
|
5
|
+
metadata:
|
|
6
|
+
version: "1.0"
|
|
7
|
+
minApiVersion: "63.0"
|
|
8
|
+
relatedSkills:
|
|
9
|
+
- "agentforce-generate"
|
|
10
|
+
- "agentforce-test"
|
|
11
|
+
- "agentforce-observe"
|
|
12
|
+
cliTools:
|
|
13
|
+
- tool: ["sf"]
|
|
14
|
+
semver: ">=2.0.0"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Einstein Bot Upgrade Orchestrator
|
|
18
|
+
|
|
19
|
+
## Purpose
|
|
20
|
+
|
|
21
|
+
Run a multi-bot upgrade-and-handoff cycle:
|
|
22
|
+
|
|
23
|
+
1. Parse and validate bot/version pairs from `--bots`
|
|
24
|
+
2. Follow [Generate Agent Spec Reference](references/generate-agent-spec.md) per bot-version pair (parallelizable)
|
|
25
|
+
3. Aggregation step that requires all generated Agent Specs
|
|
26
|
+
4. `/agentforce-generate` per Agent Spec (parallelizable)
|
|
27
|
+
5. Post-conversion enhancement pass per generated Agent Script (parallelizable)
|
|
28
|
+
|
|
29
|
+
## Inputs
|
|
30
|
+
|
|
31
|
+
Inputs:
|
|
32
|
+
- `--mode <online|offline>` is optional; default is `online` when omitted.
|
|
33
|
+
- If `mode=online`, required:
|
|
34
|
+
- `--org-alias <org-alias>`
|
|
35
|
+
- `--bots <bot1:v1,bot2:v2,...>`
|
|
36
|
+
- If `mode=offline`, required:
|
|
37
|
+
- `--offline-dir <offline-dir>`
|
|
38
|
+
- `--interactive <true|false>` is optional; default is `true` when omitted.
|
|
39
|
+
|
|
40
|
+
If required inputs are missing, handle per the Missing Input Handling and Interactive Mode rules below.
|
|
41
|
+
|
|
42
|
+
## Interactive Mode
|
|
43
|
+
|
|
44
|
+
`--interactive` controls whether the skill pauses for user input during execution:
|
|
45
|
+
|
|
46
|
+
- `--interactive true` (default): resolve ambiguities, open questions, and approval gates by asking the user, as described in this skill and its references.
|
|
47
|
+
- `--interactive false`: run autonomously. Do NOT prompt the user at any decision point. For every open question, ambiguity, or approval gate, apply the documented recommended default/solution and record the auto-applied decision in the run artifacts (Agent Spec, open questions, extraction summary). The only hard stops permitted without prompting are inputs that are missing or contradictory with no safe recommended default — a missing mandatory launch input (`--org-alias`/`--bots` for online, `--offline-dir` for offline), no bots discovered, or the same bot given multiple versions. In those cases, report the issue and halt without prompting.
|
|
48
|
+
|
|
49
|
+
Propagate the effective `--interactive` value to the per-bot Generate Agent Spec workflow (Step 2), the planner workflow (Step 3), and the post-conversion enhancement pass (Step 5).
|
|
50
|
+
|
|
51
|
+
## Missing Input Handling
|
|
52
|
+
|
|
53
|
+
Resolve missing required launch inputs before Step 1:
|
|
54
|
+
|
|
55
|
+
1. **Online mode — `--org-alias` not provided.** Resolve this before attempting to list bots (listing requires a target org).
|
|
56
|
+
- Interactive: list the available aliases of logged-in orgs and ask the user to select the target org. Use the SF CLI patterns in [SF CLI Bot Reference](references/sf-cli-bot-reference.md).
|
|
57
|
+
- Non-interactive: halt with an explicit error naming the missing `--org-alias` input (do not prompt or list).
|
|
58
|
+
2. **Online mode — bot name and version (`--bots`) not available.**
|
|
59
|
+
- Interactive: using `--org-alias` as the target org, list every bot and its versions in the org, then ask the user to select the bot/version entries they want to convert to agents. Use the `BotDefinition` and `BotVersion` query patterns in [SF CLI Bot Reference](references/sf-cli-bot-reference.md) — omit the name/version filters to enumerate all bots and versions — present the results, and build the `--bots` workload from the user's selection.
|
|
60
|
+
- Non-interactive: halt with an explicit error naming the missing `--bots` input (do not prompt or list).
|
|
61
|
+
3. **Offline mode — `--offline-dir` not available.**
|
|
62
|
+
- Interactive: ask the user to provide the `--offline-dir` path, then continue.
|
|
63
|
+
- Non-interactive: fail with an explicit error naming the missing `--offline-dir` input (do not prompt).
|
|
64
|
+
|
|
65
|
+
## References
|
|
66
|
+
|
|
67
|
+
Use these reference files during execution:
|
|
68
|
+
|
|
69
|
+
1. [SF CLI Bot Reference](references/sf-cli-bot-reference.md)
|
|
70
|
+
2. [Generate Agent Spec Reference](references/generate-agent-spec.md)
|
|
71
|
+
3. [Planner Workflow Reference](references/planner-workflow-reference.md)
|
|
72
|
+
4. [Post-Conversion Enhancements Reference](references/post-conversion-enhancements-reference.md)
|
|
73
|
+
5. [Extraction Blueprint](references/extraction-blueprint.md)
|
|
74
|
+
6. [Input Contract](references/input-contract.md)
|
|
75
|
+
7. [Mapping Rules](references/mapping-rules.md)
|
|
76
|
+
8. [Handoff Output Format](references/handoff-output-format.md)
|
|
77
|
+
9. [Quality Checklist](references/quality-checklist.md)
|
|
78
|
+
|
|
79
|
+
## Execution Contract
|
|
80
|
+
|
|
81
|
+
### Step 1: Parse and Validate `--bots`
|
|
82
|
+
|
|
83
|
+
Execute Step 1 in this order:
|
|
84
|
+
|
|
85
|
+
1. Resolve mode:
|
|
86
|
+
- If `--mode` omitted, use `online`.
|
|
87
|
+
2. Start fresh for this invocation:
|
|
88
|
+
- do not discover, inspect, or reuse outputs from previously existing runs
|
|
89
|
+
- treat this invocation as a clean execution context
|
|
90
|
+
- only use artifacts produced during the current invocation flow
|
|
91
|
+
3. Build initial workload list:
|
|
92
|
+
- `mode=online`: read `--bots` and split by comma.
|
|
93
|
+
- `mode=offline`: scan `<offline-dir>` and collect immediate sub-directories as bot workload roots.
|
|
94
|
+
4. Validate input shape:
|
|
95
|
+
- `mode=online`: each `--bots` token must match `<bot-name>:<version>`.
|
|
96
|
+
- `mode=offline`: ensure at least one bot sub-directory exists; otherwise STOP (in interactive mode ask the user to clarify; in non-interactive mode halt with an explicit error per the Interactive Mode rule).
|
|
97
|
+
5. Normalize workload entries:
|
|
98
|
+
- `mode=online`: build `{bot_name, bot_version}` entries.
|
|
99
|
+
- `mode=offline`: build `{offline_bot_dir}` entries (Annotate inferred bot name and version when derivable from the sub-directory structure; if not derivable, leave the entry unnamed and continue).
|
|
100
|
+
6. Enforce one-version-per-bot rule (online mode):
|
|
101
|
+
- If the same `bot_name` appears with multiple versions, STOP (in interactive mode ask the user to clarify; in non-interactive mode halt with an explicit error per the Interactive Mode rule).
|
|
102
|
+
7. Apply offline bot filter:
|
|
103
|
+
- If `mode=offline` and `--bots` is provided, use `--bots` only as a filter over discovered sub-directories; do not treat it as required offline input.
|
|
104
|
+
8. Persist Step 1 output:
|
|
105
|
+
- Save and carry forward a validated workload list for Step 2 parallel execution.
|
|
106
|
+
|
|
107
|
+
### Step 2: Run Einstein Bot Upgrade (Per Bot-Version)
|
|
108
|
+
|
|
109
|
+
Execute the agent spec generation workflow from [Generate Agent Spec Reference](references/generate-agent-spec.md) per bot-version combination:
|
|
110
|
+
- `--mode <online|offline>` (default `online` if omitted)
|
|
111
|
+
- mode-specific required inputs:
|
|
112
|
+
- online -> `--org-alias`, `--bot`, `--bot-version`
|
|
113
|
+
- offline -> `--offline-dir`
|
|
114
|
+
- `--interactive <true|false>` (pass through the effective orchestrator value; default `true`)
|
|
115
|
+
|
|
116
|
+
Parallelization rule:
|
|
117
|
+
- In `mode=online`, execute invocations in parallel because each bot-version pair is independent.
|
|
118
|
+
- In `mode=offline`, execute the [Generate Agent Spec Reference](references/generate-agent-spec.md) workflow in parallel over every bot sub-directory discovered in Step 1.
|
|
119
|
+
- Pass `--mode offline` and `--offline-dir <bot-subdirectory-path>` per invocation.
|
|
120
|
+
Ensure each invocation (online/offline) uses isolated working directories to avoid cross-run file collisions.
|
|
121
|
+
|
|
122
|
+
Hard rules:
|
|
123
|
+
- Do not skip this step.
|
|
124
|
+
|
|
125
|
+
### Step 3: Aggregation + Planner Step (Conditional)
|
|
126
|
+
|
|
127
|
+
After all upgrade invocations complete:
|
|
128
|
+
|
|
129
|
+
1. Always build a consolidated list of `{bot_name, bot_version, run_project_dir, agent_spec_path}`.
|
|
130
|
+
2. Always build list of failed/incomplete upgrade runs (if any).
|
|
131
|
+
3. Always build an initial ready-for-authoring list containing only valid Agent Spec entries.
|
|
132
|
+
- Each entry must include: `{bot_name, bot_version, run_project_dir, agent_spec_path, handoff_json_path, open_questions_path}`.
|
|
133
|
+
4. If total bot workload count is greater than 1:
|
|
134
|
+
- Execute planner workflow from [Planner Workflow Reference](references/planner-workflow-reference.md) using:
|
|
135
|
+
- all ready-for-authoring `agent_spec_path` values as `spec_paths`
|
|
136
|
+
- orchestrator working directory as `working_dir`
|
|
137
|
+
- the associated per-spec artifacts from each ready-for-authoring entry: `handoff_json_path` (handoff JSON) and `open_questions_path` (open questions)
|
|
138
|
+
- Require output file at `<orchestrator working directory>/bot-upgrade-planner-output.json`.
|
|
139
|
+
- Read `bot-upgrade-planner-output.json` and apply:
|
|
140
|
+
- if `specs_changed=true`: replace ready-for-authoring entries using planner fields (`updated_spec_path`, `run_project_dir`, `handoff_json_path`, `open_questions_path`)
|
|
141
|
+
- if `specs_changed=false`: keep original ready-for-authoring list unchanged
|
|
142
|
+
5. If total bot workload count is 1:
|
|
143
|
+
- Skip planner workflow entirely.
|
|
144
|
+
- Keep original ready-for-authoring list unchanged.
|
|
145
|
+
|
|
146
|
+
Planner output expectations:
|
|
147
|
+
1. boolean `specs_changed`
|
|
148
|
+
2. `updated_specs` array with entries:
|
|
149
|
+
- `original_spec_path`
|
|
150
|
+
- `updated_spec_path`
|
|
151
|
+
- `run_project_dir`
|
|
152
|
+
- `handoff_json_path`
|
|
153
|
+
- `open_questions_path`
|
|
154
|
+
3. `updated_specs` must be empty when `specs_changed=false`
|
|
155
|
+
|
|
156
|
+
### Step 4: Invoke Agentforce-Generate (Per Agent Spec)
|
|
157
|
+
|
|
158
|
+
For each entry in final ready-for-authoring list (post Step 3 planner reconciliation):
|
|
159
|
+
|
|
160
|
+
0. Add this recommendation to the generated invocation context before calling `/agentforce-generate`:
|
|
161
|
+
- Do **not activate** Agent Script versions in this orchestrated run.
|
|
162
|
+
- Draft iteration is required: generating `.agent`, validating, deploying, and preview testing are allowed.
|
|
163
|
+
- Activate should be deferred unless the user explicitly asks for release.
|
|
164
|
+
1. Resolve effective `run_project_dir` from the final ready-for-authoring entry.
|
|
165
|
+
2. Read `<run_project_dir>/agentforce-generate-invocation-prompt.md` fully.
|
|
166
|
+
3. If Step 3 produced planner-updated spec paths/artifacts, apply path substitutions in the invocation context so spec/handoff/open-questions references point to updated files.
|
|
167
|
+
- If planner also changed `run_project_dir`, use that updated `run_project_dir` for resolving prompt/output-contract paths.
|
|
168
|
+
4. Keep all non-path instructions unchanged from the original generated prompt.
|
|
169
|
+
5. Invoke `/agentforce-generate` with this resolved invocation context.
|
|
170
|
+
6. Read `<run_project_dir>/agentforce-generate-output-contract.md` and capture outputs exactly as specified.
|
|
171
|
+
|
|
172
|
+
Parallelization rule:
|
|
173
|
+
- Invoke `/agentforce-generate` in parallel across Agent Specs because each run is independent.
|
|
174
|
+
|
|
175
|
+
Output-contract capture rules:
|
|
176
|
+
|
|
177
|
+
1. Treat the output contract as authoritative for required fields/artifacts.
|
|
178
|
+
2. If any contract field is missing, mark status as partial and list missing fields explicitly.
|
|
179
|
+
3. Return captured outputs with deterministic keys matching the contract names.
|
|
180
|
+
4. Preserve output file paths and status of each required artifact.
|
|
181
|
+
5. If expected prompt/contract files are missing for an entry, mark that entry `partial`, record missing paths, and continue processing other entries.
|
|
182
|
+
|
|
183
|
+
### Step 5: Post-Conversion Agent Script Enhancements (Per Generated Agent Script)
|
|
184
|
+
|
|
185
|
+
After Step 4 completes, for each generated `.agent` artifact:
|
|
186
|
+
|
|
187
|
+
1. Resolve the generated `.agent` file path from captured `/agentforce-generate` outputs.
|
|
188
|
+
2. Execute post-conversion enhancement workflow from [Post-Conversion Enhancements Reference](references/post-conversion-enhancements-reference.md) with:
|
|
189
|
+
- `agentscript_file=<generated-agent-file-path>`
|
|
190
|
+
- `mode=<online|offline>` (the effective orchestrator run mode resolved in Step 1)
|
|
191
|
+
- online mode only: `org_alias=<org-alias>` (required so the enhanced Agent Script can be redeployed)
|
|
192
|
+
3. Require in-place enhancement:
|
|
193
|
+
- optimized/enhanced output must be written to the same `.agent` file location.
|
|
194
|
+
4. Capture per-file enhancement status and any partial failures.
|
|
195
|
+
|
|
196
|
+
Parallelization rule:
|
|
197
|
+
- Execute post-conversion enhancement workflow in parallel across generated `.agent` files because each file enhancement is independent.
|
|
198
|
+
|
|
199
|
+
### Step 6: Consolidate Run Report and Conclude
|
|
200
|
+
|
|
201
|
+
After Step 5 completes for every bot in the workload:
|
|
202
|
+
|
|
203
|
+
1. Write a single consolidated, human-readable run report as a non-empty Markdown file in the orchestrator working directory. Per bot, the report must state: the effective run mode, whether the planner ran (`executed` or `skipped`), the generated Agent Spec path and generated `.agent` path, the action inventory (including any `NEEDS_STUB` items), and — when `--interactive=false` — the auto-applied decisions.
|
|
204
|
+
2. Treat the run report as the FINAL artifact: write it only after all other artifacts (Agent Spec(s), handoff JSON, open questions, any planner output, and generated `.agent` file(s)) are already written.
|
|
205
|
+
|
|
206
|
+
## Deliverable
|
|
207
|
+
|
|
208
|
+
Return:
|
|
209
|
+
1. parsed bot/version list
|
|
210
|
+
2. per-bot upgrade execution status
|
|
211
|
+
3. aggregation output (full Agent Spec list + final ready-for-authoring subset)
|
|
212
|
+
4. planner workflow status (`executed` or `skipped`) and `bot-upgrade-planner-output.json` path when executed
|
|
213
|
+
5. per-spec `/agentforce-generate` execution status
|
|
214
|
+
6. generated handoff artifact paths per bot/spec (including planner-updated artifacts when applicable)
|
|
215
|
+
7. captured `/agentforce-generate` outputs per output contract
|
|
216
|
+
8. per-agent post-conversion enhancement status (including enhanced `.agent` file paths)
|
|
217
|
+
9. path to the consolidated run report written in Step 6
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# Extraction Blueprint
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Extract only migration-relevant behavior from Einstein Bot and discard transport noise.
|
|
6
|
+
|
|
7
|
+
## Required Extractions
|
|
8
|
+
|
|
9
|
+
### 1) Dialog Graph
|
|
10
|
+
|
|
11
|
+
**Input files:**
|
|
12
|
+
|
|
13
|
+
Paths below are shown relative to the bots root directory. For org-backed retrieval this root is the SFDX default metadata directory `force-app/main/default/` (so the full path is `force-app/main/default/bots/<BotName>/…`, as retrieved in [SF CLI Bot Reference](sf-cli-bot-reference.md) section 3). For offline input this root is the provided `--offline-dir` (e.g. `bots/`).
|
|
14
|
+
|
|
15
|
+
- `bots/<BotName>/<BotName>.bot-meta.xml` (bot-level metadata)
|
|
16
|
+
- `bots/<BotName>/<version>.botVersion-meta.xml` (dialog + step graph source of truth)
|
|
17
|
+
|
|
18
|
+
**Build the graph with this process:**
|
|
19
|
+
|
|
20
|
+
1. Parse every `<botDialogs>` block in `<version>.botVersion-meta.xml` as one node.
|
|
21
|
+
2. For each node, capture:
|
|
22
|
+
- `developerName` (node id)
|
|
23
|
+
- `label`
|
|
24
|
+
- `mlIntent` (if present)
|
|
25
|
+
- `dialogGroup` / grouping metadata if present
|
|
26
|
+
3. Treat each `<botSteps>` entry inside a dialog as a step in execution order.
|
|
27
|
+
4. While scanning each step, also detect action invocations and variable mappings from bot steps:
|
|
28
|
+
- invocation/action step types (for example `Invocation`)
|
|
29
|
+
- action identifier/name and invocation type (`apex`, `flow`, `standardInvocableAction`, etc.)
|
|
30
|
+
- variables read by the action (bot variables passed as invocation inputs)
|
|
31
|
+
- variables updated by the action (bot variables set from invocation outputs)
|
|
32
|
+
- escalation actions from system messages:
|
|
33
|
+
- if a dialog contains `conversationSystemMessage` of type `Transfer`, add an action entry with `action_type: "escalate"`
|
|
34
|
+
- determine escalation target type (`queue`, `flow`, `bot`, or `skill`) by reading `systemMessageMappings` under that `conversationSystemMessage` and resolving referenced variables against declarations in `<conversationVariables>`
|
|
35
|
+
- store both the resolved `target_type` and mapped target identifier/value on the action record
|
|
36
|
+
- persist this as `invoked_actions` on the dialog node and as action-level records in `action_inventory`
|
|
37
|
+
5. While scanning each step, detect transition-producing step types:
|
|
38
|
+
- `Navigation` with `<botNavigationLinks>`
|
|
39
|
+
- `Group` containing nested `Navigation`
|
|
40
|
+
- `Wait` type steps, which define intent-driven routing points (intent redirect behavior)
|
|
41
|
+
6. For every discovered transition, add one directed edge:
|
|
42
|
+
- `source_dialog` -> `targetBotDialog`
|
|
43
|
+
- `type` (`redirect`, `call`, `intent_redirect`)
|
|
44
|
+
7. Capture conditions from enclosing step/group when present:
|
|
45
|
+
- `leftOperandName`
|
|
46
|
+
- `operatorType`
|
|
47
|
+
- `rightOperandValue`
|
|
48
|
+
- store as a normalized condition expression on the edge
|
|
49
|
+
8. Mark graph role hints:
|
|
50
|
+
- probable entry dialogs (for example `Welcome`, `Main_Menu`, or system entry mapping)
|
|
51
|
+
- terminal dialogs (for example paths ending in `SystemMessage` + `EndChat`, with no outbound navigation)
|
|
52
|
+
|
|
53
|
+
**Required output for dialog graph extraction:**
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"nodes": [
|
|
58
|
+
{
|
|
59
|
+
"dialog": "Main_Menu",
|
|
60
|
+
"label": "Main Menu",
|
|
61
|
+
"intent": "Main_Menu",
|
|
62
|
+
"invoked_actions": [
|
|
63
|
+
{
|
|
64
|
+
"action_name": "Airline_Get_User_Details",
|
|
65
|
+
"action_type": "flow",
|
|
66
|
+
"variables_read": ["user_email"],
|
|
67
|
+
"variables_written": ["airline_user", "is_success"]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"edges": [
|
|
73
|
+
{
|
|
74
|
+
"source": "Main_Menu",
|
|
75
|
+
"target": "Bookings_Menu",
|
|
76
|
+
"type": "redirect",
|
|
77
|
+
"condition": null
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Quality checks:**
|
|
84
|
+
|
|
85
|
+
- Every `targetBotDialog` in edges must resolve to an existing dialog node.
|
|
86
|
+
- Keep `Call` and `Redirect` distinct (do not merge semantics).
|
|
87
|
+
- Preserve multiple outgoing edges from the same step when configured.
|
|
88
|
+
|
|
89
|
+
### 2) Intent Layer
|
|
90
|
+
|
|
91
|
+
- Intent name/developer name
|
|
92
|
+
- Intent description
|
|
93
|
+
- Linked dialogs
|
|
94
|
+
- Intent examples/utterances (if available)
|
|
95
|
+
|
|
96
|
+
**Intent summarization workflow:**
|
|
97
|
+
|
|
98
|
+
1. For each dialog node in the dialog graph, read its `mlIntent` value (if present).
|
|
99
|
+
2. Treat that `mlIntent` as the lookup key for intent metadata in `MlDomain` with the same name.
|
|
100
|
+
3. From the matched intent metadata, extract:
|
|
101
|
+
- `developerName`
|
|
102
|
+
- `label` / `description` (if present)
|
|
103
|
+
- `mlIntentUtterances` (training utterances)
|
|
104
|
+
4. Generate a concise intent summary (2-3 sentences) per unique intent:
|
|
105
|
+
- sentence 1: user goal the intent represents
|
|
106
|
+
- sentence 2: typical phrasing style inferred from `mlIntentUtterances`
|
|
107
|
+
- sentence 3 (optional): routing nuance or disambiguation hint if overlapping with other intents
|
|
108
|
+
5. If an `mlIntent` is referenced by a dialog but no matching `MlDomain` intent is found:
|
|
109
|
+
- flag the intent as unresolved
|
|
110
|
+
- add it to `open_questions`
|
|
111
|
+
- still generate a provisional summary from dialog label/description with `confidence: low`
|
|
112
|
+
|
|
113
|
+
### 3) Variable and Entity Layer
|
|
114
|
+
|
|
115
|
+
**Input files:**
|
|
116
|
+
|
|
117
|
+
- `bots/<BotName>/<BotName>.bot-meta.xml` (context variables, slot/entity metadata)
|
|
118
|
+
- `bots/<BotName>/<version>.botVersion-meta.xml` (conversation variable usage through steps)
|
|
119
|
+
|
|
120
|
+
**Variable extraction and typing rules:**
|
|
121
|
+
|
|
122
|
+
1. Extract context variables from `bot-meta.xml` (`<contextVariables>` entries).
|
|
123
|
+
2. Mark every context variable as:
|
|
124
|
+
- `variable_type: linked`
|
|
125
|
+
- `data_type`: map from bot metadata `dataType`
|
|
126
|
+
- `source`: derive from context mappings (`SObjectType` + `fieldName`) when present
|
|
127
|
+
3. Extract conversation variables directly from `botVersion-meta.xml` `<conversationVariables>` entries (authoritative source for declared conversation variables).
|
|
128
|
+
4. Mark every conversation variable as:
|
|
129
|
+
- `variable_type: mutable`
|
|
130
|
+
- `data_type`: read directly from the variable's declared data type in `<conversationVariables>`
|
|
131
|
+
|
|
132
|
+
**Required output shape (variables):**
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"variables": [
|
|
137
|
+
{
|
|
138
|
+
"name": "ContactId",
|
|
139
|
+
"data_type": "Id",
|
|
140
|
+
"variable_type": "linked",
|
|
141
|
+
"source": "MessagingEndUser.ContactId"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "Complaint_Id",
|
|
145
|
+
"data_type": "Text",
|
|
146
|
+
"variable_type": "mutable"
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### 4) Action/Invocation Layer
|
|
153
|
+
|
|
154
|
+
- Action name and invocation type (`apex`, `flow`, etc.)
|
|
155
|
+
- Inputs, outputs, and variable mappings
|
|
156
|
+
- Also extract knowledge-backed action signals from `botVersion-meta.xml`:
|
|
157
|
+
1. If `knowledgeActionEnabled` is `true`:
|
|
158
|
+
- add an action entry with `action_type: "knowledge"`
|
|
159
|
+
- include `knowledgeActionEnabled: true`
|
|
160
|
+
2. If `knowledgeFallbackEnabled` is `true`:
|
|
161
|
+
- add an action entry with `action_type: "knowledge"`
|
|
162
|
+
- include `knowledgeFallbackEnabled: true`
|
|
163
|
+
- When both fields are `true`, capture both flags (either on one combined knowledge action record or two explicit knowledge action records), but ensure both booleans are present in extracted output.
|
|
164
|
+
|
|
165
|
+
**Offline mode signature generation (required):**
|
|
166
|
+
|
|
167
|
+
When input mode is offline (`.bot-meta.xml` + `.botVersion-meta.xml` provided, no org fetch):
|
|
168
|
+
|
|
169
|
+
1. Generate action signatures from bot metadata mappings only (do not block on missing Apex/Flow source code).
|
|
170
|
+
2. For each invocation mapping:
|
|
171
|
+
- extract action parameter names from invocation input/output mapping keys
|
|
172
|
+
- resolve mapped bot variable names from mapping values
|
|
173
|
+
- infer parameter types from mapped variable declarations in `<conversationVariables>` / `<contextVariables>` when available
|
|
174
|
+
3. If type cannot be inferred, use a conservative placeholder type (`Text` or `Object`) and flag in notes/open questions.
|
|
175
|
+
4. Keep unresolved/partial signatures as non-blocking and continue extraction.
|
|
176
|
+
|
|
177
|
+
**Signature construction rules:**
|
|
178
|
+
|
|
179
|
+
1. Do not copy bot variable names as action parameter names unless metadata explicitly uses the same name.
|
|
180
|
+
2. Preserve both layers in output:
|
|
181
|
+
- contract layer: `input_name` / `output_name`, `type`
|
|
182
|
+
- mapping layer: `mapped_variable`, `variable_type` (`mutable` or `linked`)
|
|
183
|
+
3. For each signature entry, capture direction explicitly:
|
|
184
|
+
- `direction: input` for values read by the action
|
|
185
|
+
- `direction: output` for values written by the action
|
|
186
|
+
4. If one action is invoked multiple times with different mappings, keep one action signature and record per-call mapping context separately (for example `call_context`).
|
|
187
|
+
|
|
188
|
+
### 5) Dialog Clusters and Categorization
|
|
189
|
+
|
|
190
|
+
After extracting actions and dialog/action mappings, categorize bot functionality into dialog clusters.
|
|
191
|
+
|
|
192
|
+
1. Classify actions into groups using these priority criteria (highest priority first):
|
|
193
|
+
- actions working on the same underlying entity SHOULD be grouped together
|
|
194
|
+
- actions writing/updating the same variable SHOULD be grouped together
|
|
195
|
+
- actions reading the same input variable CAN be grouped together
|
|
196
|
+
- actions invoked by dialogs in the same dialog group CAN be grouped together
|
|
197
|
+
- actions with similar intent CAN be grouped together
|
|
198
|
+
2. Keep group size between:
|
|
199
|
+
- minimum: 1 action
|
|
200
|
+
- maximum: 4 actions
|
|
201
|
+
If a group exceeds 4 actions, split it while preserving higher-priority criteria.
|
|
202
|
+
3. An action may belong to multiple groups when criteria requires an overlap.
|
|
203
|
+
4. Assign dialogs to groups based on associated actions:
|
|
204
|
+
- for each grouped action, trace back dialogs that invoke it
|
|
205
|
+
- include those dialogs in the corresponding dialog cluster
|
|
206
|
+
- maintain an `action_dialog_mapping` for each group (`action -> [dialogs]`)
|
|
207
|
+
5. Generate a short functional description (2-3 sentences) per group using grouped actions and associated dialogs.
|
|
208
|
+
|
|
209
|
+
## Extraction Output Shape
|
|
210
|
+
|
|
211
|
+
Build an intermediate extraction summary used by mapping:
|
|
212
|
+
|
|
213
|
+
```json
|
|
214
|
+
{
|
|
215
|
+
"run_identity": {},
|
|
216
|
+
"dialog_graph": {
|
|
217
|
+
"nodes": [],
|
|
218
|
+
"edges": []
|
|
219
|
+
},
|
|
220
|
+
"intent_catalog": {},
|
|
221
|
+
"variables": {},
|
|
222
|
+
"action_inventory": {},
|
|
223
|
+
"dialog_clusters": {},
|
|
224
|
+
"unmapped_items": {}
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Persist Extraction Output
|
|
229
|
+
|
|
230
|
+
Write the extraction summary to a JSON file before starting mapping.
|
|
231
|
+
|
|
232
|
+
- Output filename: `extraction-summary.json`
|
|
233
|
+
- Output location: same working/output directory used for the current bot/version handoff artifacts
|
|
234
|
+
- The file content must preserve the extraction output shape defined above
|
|
235
|
+
- If extraction is rerun, overwrite this file with the latest extraction snapshot
|
|
236
|
+
|
|
237
|
+
`action_inventory` should include any extracted knowledge action entries with explicit `knowledgeActionEnabled` and/or `knowledgeFallbackEnabled` boolean flags when present in bot version metadata.
|
|
238
|
+
|
|
239
|
+
## Extraction Principles
|
|
240
|
+
|
|
241
|
+
- Favor explicit configured behavior over assumptions.
|
|
242
|
+
- Preserve branch conditions where available.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Generate Agent Spec
|
|
2
|
+
|
|
3
|
+
## What This Skill Is For
|
|
4
|
+
|
|
5
|
+
This skill implements **only Phase 1 of migration**:
|
|
6
|
+
|
|
7
|
+
- **In scope**: Einstein Bot -> normalized migration model -> Agent Spec handoff package
|
|
8
|
+
- **Out of scope**: `.agent` generation, validation, publish, activate, or deployment
|
|
9
|
+
|
|
10
|
+
The generated handoff is explicitly designed so `/agentforce-generate` can consume it as the starting spec input for Agent Script authoring.
|
|
11
|
+
|
|
12
|
+
## How to Use This Skill
|
|
13
|
+
|
|
14
|
+
Treat this file as the execution router. Always read the referenced files before executing each step.
|
|
15
|
+
|
|
16
|
+
Follow this fixed sequence:
|
|
17
|
+
|
|
18
|
+
1. Intake and normalize source bot artifacts
|
|
19
|
+
2. Build migration mapping model (dialogs/intents/entities/actions/transitions)
|
|
20
|
+
3. Generate Agent Spec handoff artifacts for `/agentforce-generate`
|
|
21
|
+
4. Resolve open questions with the user one-by-one (or auto-apply recommended defaults when `--interactive=false`) and persist decisions
|
|
22
|
+
5. Generate handoff invocation prompt for `/agentforce-generate` when ambiguity is cleared
|
|
23
|
+
|
|
24
|
+
## Rules That Always Apply
|
|
25
|
+
|
|
26
|
+
1. **Do not generate `.agent` in this skill.** Stop at Agent Spec + handoff artifacts.
|
|
27
|
+
2. **No implementation invention.** If action target details are unknown, use `NEEDS_STUB`.
|
|
28
|
+
3. **Preserve behavioral intent, not XML shape.** Convert deterministic bot flow into subagent-oriented behavioral design.
|
|
29
|
+
4. **Track uncertainty explicitly.** Every ambiguous mapping must be captured in `open_questions`.
|
|
30
|
+
5. **Mandatory resolution loop.** After artifact generation, process open questions and persist every resolved decision. In interactive mode, resolve them one-by-one with the user; when `--interactive=false`, auto-apply the recommended default for each open question without prompting and record the decision.
|
|
31
|
+
6. **Prompt handoff after clarity.** Once all open questions are resolved without ambiguity, generate a complete invocation prompt package for `/agentforce-generate` (do not invoke the skill from this skill).
|
|
32
|
+
7. **Use deterministic guardrails for risky flows.** Identity checks, escalation, sensitive operations, and regulated advice must be explicit in the spec.
|
|
33
|
+
8. **Input gate is a hard block.** Do not read any workspace files, bot metadata, Apex classes, SFDX project contents, or existing spec files until input mode is explicitly selected and all required inputs for that mode are confirmed. Speculative reading of artifacts found in the workspace is prohibited.
|
|
34
|
+
|
|
35
|
+
## Task Domains
|
|
36
|
+
|
|
37
|
+
### Build Agent Spec from Einstein Bot
|
|
38
|
+
|
|
39
|
+
Use this when user provides Einstein Bot artifacts and asks to migrate/upgrade into Agentforce.
|
|
40
|
+
|
|
41
|
+
#### Required Steps
|
|
42
|
+
|
|
43
|
+
0. **Collect mode and required inputs (HARD GATE)** — Parse inputs using this contract:
|
|
44
|
+
- `--mode <online|offline>` (optional; default to `online` when omitted)
|
|
45
|
+
- If `mode=online`, required inputs:
|
|
46
|
+
- `--org-alias <org-alias>`
|
|
47
|
+
- `--bot <bot-name>`
|
|
48
|
+
- `--bot-version <bot-version>`
|
|
49
|
+
- If `mode=offline`, required input:
|
|
50
|
+
- `--offline-dir <offline-dir>` (directory containing/associated with bot metadata inputs)
|
|
51
|
+
- `--interactive <true|false>` (optional; default `true`). When `false`, run autonomously: do not prompt at any decision point, apply the recommended default for every open question/ambiguity, and record each auto-applied decision.
|
|
52
|
+
If required mode-specific inputs are missing, stop and ask in interactive mode; in non-interactive mode halt with an explicit error (do not prompt). Do not read files/metadata/workspace contents until mode and required inputs are confirmed.
|
|
53
|
+
Note: if `--mode` is omitted, treat mode as `online` immediately (do not ask user to choose mode in that case).
|
|
54
|
+
|
|
55
|
+
1. **Ingest source artifacts** — Read [Input Contract](input-contract.md) and normalize user-provided bot inputs into one canonical migration model.
|
|
56
|
+
- For `mode=online`, run required SF CLI bot/version/dependency retrieval using [SF CLI Bot Reference](sf-cli-bot-reference.md). Use ONLY the query patterns documented there — do NOT invent or modify field names.
|
|
57
|
+
- For `mode=offline`, skip org retrieval and process **all relevant local metadata** from `--offline-dir`:
|
|
58
|
+
- bot and botVersion XML metadata (required)
|
|
59
|
+
- Flow metadata under `flows/` (when present)
|
|
60
|
+
- Apex classes under `classes/` (when present)
|
|
61
|
+
- any other local files referenced by bot artifacts that are needed for extraction/mapping fidelity
|
|
62
|
+
- In offline mode, do not limit ingestion to only two XML files if additional referenced artifacts are available locally.
|
|
63
|
+
2. **Extract migration structure** — Read [Extraction Blueprint](extraction-blueprint.md) and derive:
|
|
64
|
+
- bot capabilities
|
|
65
|
+
- dialog graph
|
|
66
|
+
- intent map
|
|
67
|
+
- variable/entity usage
|
|
68
|
+
- invocation/action inventory
|
|
69
|
+
- fallback/escalation behavior
|
|
70
|
+
3. **Map Einstein Bot -> Agent Spec components** — Read [Mapping Rules](mapping-rules.md) and produce topic/subagent, action, routing, and state mappings.
|
|
71
|
+
4. **Generate handoff artifacts** — Read [Handoff Output Format](handoff-output-format.md) and write:
|
|
72
|
+
- `<run_project_dir>/<AgentName>-AgentSpec.md`
|
|
73
|
+
- `<run_project_dir>/<AgentName>-einstein-bot-handoff.json`
|
|
74
|
+
- `<run_project_dir>/<AgentName>-open-questions.md`
|
|
75
|
+
Use the same run-specific SFDX project directory created in the SF CLI setup step; do not write handoff artifacts to repository root.
|
|
76
|
+
The Agent Spec markdown MUST use the same section names/order as
|
|
77
|
+
`skills/agentforce-generate/assets/agent-spec-template.md`, then append the
|
|
78
|
+
`## Migration Notes (Einstein Bot -> Agentforce)` appendix defined in [Handoff Output Format](handoff-output-format.md).
|
|
79
|
+
5. **Validate handoff quality** — Read [Quality Checklist](quality-checklist.md) and verify all required sections and mapping completeness before presenting output.
|
|
80
|
+
6. **Resolve open questions loop (required)** — After generating artifacts, resolve all entries in `<run_project_dir>/<AgentName>-open-questions.md`. In interactive mode, guide the user through them one-by-one; when `--interactive=false`, auto-apply the recommended default for each entry without prompting. For each resolved item, immediately update:
|
|
81
|
+
- `<run_project_dir>/<AgentName>-AgentSpec.md`
|
|
82
|
+
- `<run_project_dir>/extraction-summary.json`
|
|
83
|
+
and remove/mark-resolved the corresponding open question.
|
|
84
|
+
7. **Generate `/agentforce-generate` invocation package (no direct invoke here)** — When all open questions are resolved without ambiguity, generate and persist:
|
|
85
|
+
- `<run_project_dir>/agentforce-generate-invocation-prompt.md` (the exact prompt to pass to `/agentforce-generate`)
|
|
86
|
+
- `<run_project_dir>/agentforce-generate-output-contract.md` (expected outputs that orchestrator must capture)
|
|
87
|
+
The prompt must include:
|
|
88
|
+
- `current_working_directory` (run folder path) for all reads/writes
|
|
89
|
+
- `<run_project_dir>/<AgentName>-AgentSpec.md` as source-of-truth spec
|
|
90
|
+
- `<run_project_dir>/extraction-summary.json` as supporting context
|
|
91
|
+
- `<run_project_dir>/<AgentName>-einstein-bot-handoff.json` and `<run_project_dir>/<AgentName>-open-questions.md`
|
|
92
|
+
- `input_mode` (`online` or `offline`) explicit context
|
|
93
|
+
For `input_mode=offline`, include these strict instructions in the prompt:
|
|
94
|
+
- syntax/structural validation is still mandatory
|
|
95
|
+
- skip only org-dependent CLI operations
|
|
96
|
+
- use local artifacts only
|
|
97
|
+
- keep unresolved implementations as structurally complete `NEEDS_STUB` action definitions
|
|
98
|
+
- do not deploy/publish/activate
|
|
99
|
+
Do not invoke `/agentforce-generate` from this skill.
|
|
100
|
+
|
|
101
|
+
#### Reference Files
|
|
102
|
+
|
|
103
|
+
1. [Input Contract](input-contract.md) — accepted source types and normalization schema
|
|
104
|
+
2. [Extraction Blueprint](extraction-blueprint.md) — what to extract from Einstein Bot metadata and why
|
|
105
|
+
3. [Mapping Rules](mapping-rules.md) — canonical mapping from bot constructs to Agent Spec constructs
|
|
106
|
+
4. [Handoff Output Format](handoff-output-format.md) — required output files and exact structure
|
|
107
|
+
5. [Quality Checklist](quality-checklist.md) — validation criteria before handoff to `/agentforce-generate`
|
|
108
|
+
6. [SF CLI Bot Reference](sf-cli-bot-reference.md) — required `sf` command sequence to validate bot/version and retrieve dependencies
|
|
109
|
+
|
|
110
|
+
## Deliverables
|
|
111
|
+
|
|
112
|
+
At completion, always return:
|
|
113
|
+
|
|
114
|
+
1. Agent Spec handoff file path
|
|
115
|
+
2. Handoff JSON path
|
|
116
|
+
3. Open questions path
|
|
117
|
+
4. `/agentforce-generate` invocation package status:
|
|
118
|
+
- `generated` with prompt/output-contract paths when all open questions are resolved
|
|
119
|
+
- `blocked` when unresolved ambiguity remains (include unresolved question IDs)
|
|
120
|
+
5. Generated `/agentforce-generate` invocation prompt path (when status is `generated`)
|
|
121
|
+
6. Generated `/agentforce-generate` output contract path (when status is `generated`)
|
|
122
|
+
7. Short migration-risk summary (top unresolved items)
|
|
123
|
+
|
|
124
|
+
## Important Constraints
|
|
125
|
+
|
|
126
|
+
- Do not invoke deployment/publish/activate flows in this skill.
|
|
127
|
+
- Do not claim parity with Einstein Bot unless all dialogs/intents/actions are mapped or explicitly deferred.
|
|
128
|
+
- Do not collapse critical decision branches into vague LLM-only behavior; represent gates and transitions explicitly in the Agent Spec.
|