@salesforce/afv-skills 1.67.0 → 1.69.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/README.md +55 -5
- package/package.json +1 -1
- package/skills/afcc-setup-coordinate/SKILL.md +348 -0
- package/skills/afcc-setup-coordinate/assets/console-app/AFCC_Service_Console.app-meta.xml +19 -0
- package/skills/afcc-setup-coordinate/assets/console-app/Admin.profile-meta.xml +8 -0
- package/skills/afcc-setup-coordinate/assets/console-app/Standard.profile-meta.xml +8 -0
- package/skills/afcc-setup-coordinate/assets/gap_report_template.md +35 -0
- package/skills/afcc-setup-coordinate/assets/org_profile_template.json +16 -0
- package/skills/afcc-setup-coordinate/references/gotchas.md +22 -0
- package/skills/afcc-setup-coordinate/scripts/audit_org.sh +159 -0
- package/skills/agentforce-bot-upgrade/SKILL.md +117 -66
- package/skills/agentforce-bot-upgrade/assets/_vendored/agent-spec-template.md +139 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-design-and-spec-creation.md +1211 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-script-core-language.md +1390 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-subagent-map-diagrams.md +341 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-user-setup.md +672 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-validation-and-debugging.md +904 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agentscript-toolchain.md +112 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/architecture-patterns.md +277 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/common-control-flow-pitfalls.md +255 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-actions-sequencing.md +198 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-lifecycle-side-effects.md +87 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/data-library-reference.md +891 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/instruction-resolution.md +658 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/org-setup-for-adl.md +551 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/patterns-by-requirement.md +88 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/posture-and-determinism.md +215 -0
- package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +11 -4
- package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +19 -3
- package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +82 -52
- package/skills/agentforce-bot-upgrade/references/input-contract.md +8 -8
- package/skills/agentforce-bot-upgrade/references/mapping-rules.md +19 -6
- package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +65 -6
- package/skills/agentforce-bot-upgrade/references/quality-checklist.md +4 -4
- package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +17 -3
- package/skills/agentforce-hyperclassifier-configure/README.md +24 -0
- package/skills/agentforce-hyperclassifier-configure/SKILL.md +111 -0
- package/skills/agentforce-hyperclassifier-configure/assets/customer-org.env.example +4 -0
- package/skills/agentforce-hyperclassifier-configure/assets/sample_descriptions.json +8 -0
- package/skills/agentforce-hyperclassifier-configure/assets/sample_evals.csv +17 -0
- package/skills/agentforce-hyperclassifier-configure/references/api-contract.md +41 -0
- package/skills/agentforce-hyperclassifier-configure/references/authentication.md +35 -0
- package/skills/agentforce-hyperclassifier-configure/references/evaluation.md +46 -0
- package/skills/agentforce-hyperclassifier-configure/references/installation.md +35 -0
- package/skills/agentforce-hyperclassifier-configure/references/onboarding.md +93 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/__init__.py +1 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/client.py +219 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/eca.py +178 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/evaluation.py +207 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/onboarding.py +191 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/optimizer.py +187 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hyperclassifier.py +111 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/report_hyperclassifier.py +149 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/setup_hyperclassifier.py +74 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/tests/test_hyperclassifier_skill.py +887 -0
- package/skills/agentforce-offline-experimentation-run/SKILL.md +14 -22
- package/skills/agentforce-offline-experimentation-run/scripts/bt_compare.py +81 -0
- package/skills/agentforce-offline-experimentation-run/scripts/bt_fetch.py +358 -0
- package/skills/agentforce-offline-experimentation-run/scripts/bt_patch_agent.py +110 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/__init__.py +34 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentpatch.py +483 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentsrc.py +565 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/cache.py +95 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/compare.py +617 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/fetch.py +1012 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/judge.py +140 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/messages.py +93 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/patch.py +327 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/redact.py +40 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/results.py +288 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/scoring.py +340 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/sfap.py +354 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/splits.py +136 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/stdm.py +98 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/tokens.py +173 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/units.py +199 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/versions.py +194 -0
- package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +367 -379
- package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +23 -6
- package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +483 -796
- package/skills/commerce-react-storefront-create/SKILL.md +54 -21
- package/skills/dx-lifecycle-center/SKILL.md +22 -13
- package/skills/dx-lifecycle-center/examples/workflows.md +54 -17
- package/skills/dx-lifecycle-center/references/connect-api.md +33 -4
- package/skills/dx-lifecycle-center/references/connect-org.md +62 -12
- package/skills/dx-lifecycle-center/references/deploy.md +3 -3
- package/skills/dx-lifecycle-center/references/hub-org.md +19 -3
- package/skills/dx-lifecycle-center/references/list-orgs.md +50 -24
- package/skills/dx-lifecycle-center/references/troubleshooting.md +22 -1
- package/skills/dx-lifecycle-center/scripts/hub-get.sh +41 -0
- package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +151 -4
- package/skills/dx-org-devhub-configure/SKILL.md +85 -84
- package/skills/dx-org-devhub-configure/examples/status-output.md +25 -2
- package/skills/dx-org-devhub-configure/scripts/devhub.sh +265 -140
- package/skills/dx-org-devhub-configure/scripts/test-devhub.sh +100 -15
- package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +63 -0
- package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +252 -0
- package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +88 -0
- package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +167 -0
- package/skills/dx-packaging-push-upgrade-configure/README.md +47 -0
- package/skills/dx-packaging-push-upgrade-configure/SKILL.md +355 -0
- package/skills/dx-packaging-push-upgrade-configure/references/best-practices.md +61 -0
- package/skills/dx-packaging-push-upgrade-configure/references/cli-reference.md +148 -0
- package/skills/dx-packaging-push-upgrade-configure/references/objects.md +106 -0
- package/skills/dx-packaging-push-upgrade-configure/references/soql-recipes.md +144 -0
- package/skills/dx-scratch-def-configure/SKILL.md +163 -0
- package/skills/dx-scratch-def-configure/examples/confirm-card.md +53 -0
- package/skills/dx-scratch-def-configure/examples/report-recipes.md +100 -0
- package/skills/dx-scratch-def-configure/references/features.json +3270 -0
- package/skills/dx-scratch-def-configure/references/project-scratch-def.schema.json +1841 -0
- package/skills/dx-scratch-def-configure/references/settings-map.json +682 -0
- package/skills/dx-scratch-def-configure/scripts/lib_scratch_def.py +1306 -0
- package/skills/dx-scratch-def-configure/scripts/requirements.txt +3 -0
- package/skills/dx-scratch-def-configure/scripts/scrape_config_values.py +848 -0
- package/skills/education-cloud-domain-configure/SKILL.md +1 -1
- package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -1
- package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +1 -1
- package/skills/experience-afv-analytics-query/SKILL.md +239 -0
- package/skills/experience-afv-analytics-query/references/references.md +176 -0
- package/skills/experience-app-mcp-delivery-generate/SKILL.md +142 -0
- package/skills/experience-app-mcp-delivery-generate/references/eca-consumer-key.md +26 -0
- package/skills/experience-app-mcp-delivery-generate/references/mcp-config-delivery.md +38 -0
- package/skills/experience-app-mcp-delivery-generate/references/plugin-format-and-publishing.md +80 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/developer_name.mjs +9 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/discover_mcp_context.mjs +114 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/generate_mcp_config.mjs +27 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/generate_plugin.mjs +184 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/mcp_config.mjs +57 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/preflight.mjs +109 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/retrieve_eca_consumer_key.mjs +143 -0
- package/skills/experience-app-mcp-generate/SKILL.md +174 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.eca-meta.xml +7 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaGlblOauth-meta.xml +15 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauth-meta.xml +6 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauthPlcy-meta.xml +12 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME___defaultPolicy.ecaPlcy-meta.xml +7 -0
- package/skills/experience-app-mcp-generate/assets/__MCP_SERVER_NAME__.mcpServerDefinition-meta.xml +5 -0
- package/skills/experience-app-mcp-generate/references/eca-fields.md +76 -0
- package/skills/experience-app-mcp-generate/references/mcp-objects.md +66 -0
- package/skills/experience-app-mcp-generate/references/tool-bindings.md +85 -0
- package/skills/experience-app-mcp-generate/references/troubleshooting.md +41 -0
- package/skills/experience-app-mcp-generate/references/ui-frameworks.md +19 -0
- package/skills/experience-app-mcp-generate/references/widget-resources.md +96 -0
- package/skills/experience-app-mcp-generate/scripts/activate_server.mjs +166 -0
- package/skills/experience-app-mcp-generate/scripts/check_setup_progress.mjs +212 -0
- package/skills/experience-app-mcp-generate/scripts/list_sites.mjs +211 -0
- package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +407 -0
- package/skills/experience-app-mcp-generate/scripts/preflight.mjs +127 -0
- package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +144 -0
- package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +64 -0
- package/skills/experience-app-mcp-generate/scripts/retrieve_existing_prompts.mjs +145 -0
- package/skills/experience-app-mcp-generate/scripts/retrieve_existing_tools.mjs +72 -0
- package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +195 -0
- package/skills/experience-app-mcp-generate/scripts/utils/callback_url.mjs +36 -0
- package/skills/experience-app-mcp-generate/scripts/utils/developer_name.mjs +9 -0
- package/skills/experience-app-mcp-generate/scripts/utils/eca_check.mjs +156 -0
- package/skills/experience-app-mcp-generate/scripts/utils/metadata_path.mjs +13 -0
- package/skills/experience-app-mcp-generate/scripts/verify_server.mjs +118 -0
- package/skills/experience-cms-content-type-generate/SKILL.md +1 -1
- package/skills/experience-design-validate/SKILL.md +1 -1
- package/skills/experience-search-coordinate/SKILL.md +18 -12
- package/skills/experience-search-coordinate/references/content-route.md +79 -1
- package/skills/field-service-data-capture-migrate/SKILL.md +1 -1
- package/skills/nonprofit-fundraising-configure/SKILL.md +1 -1
- package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +52 -4
- package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +19 -2
- package/skills/platform-apex-generate/SKILL.md +14 -11
- package/skills/platform-apex-test-generate/SKILL.md +2 -1
- package/skills/platform-custom-field-generate/SKILL.md +24 -16
- package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -0
- package/skills/platform-custom-setting-generate/SKILL.md +1 -0
- package/skills/platform-datamask-run/SKILL.md +52 -71
- package/skills/platform-datamask-run/references/api-surface.md +10 -4
- package/skills/platform-datamask-run/references/policy-authoring.md +56 -7
- package/skills/platform-datamask-run/references/run-and-abort.md +17 -10
- package/skills/platform-datamask-run/scripts/poll-job.sh +15 -25
- package/skills/platform-dataspace-access-configure/SKILL.md +43 -10
- package/skills/platform-flexipage-generate/SKILL.md +7 -10
- package/skills/platform-flexipage-generate/references/mcp_action_examples.md +42 -38
- package/skills/platform-metadata-discovery-get/SKILL.md +185 -0
- package/skills/platform-metadata-discovery-get/references/api-map.md +25 -0
- package/skills/platform-metadata-discovery-get/references/h360-routes.md +30 -0
- package/skills/platform-metadata-discovery-get/references/scoped-soql.md +52 -0
- package/skills/platform-metadata-grounding-get/SKILL.md +170 -0
- package/skills/platform-policy-rule-generate/SKILL.md +85 -231
- package/skills/platform-policy-rule-generate/references/condition-model.md +47 -0
- package/skills/platform-policy-rule-generate/references/condition-templates.md +89 -0
- package/skills/platform-policy-rule-generate/references/conjunction-compiler.md +25 -0
- package/skills/platform-policy-rule-generate/references/conjunction-expression.md +30 -0
- package/skills/platform-policy-rule-generate/references/consumer-all.md +9 -0
- package/skills/platform-policy-rule-generate/references/consumer-datacloud-ui.md +99 -0
- package/skills/platform-policy-rule-generate/references/deploy-errors.md +24 -36
- package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitionSets/ExistsJoinRLS.policyRuleDefinitionSet +5 -0
- package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitions/ExistsJoinRLS_Rule_1.policyRuleDefinition +91 -0
- package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitionSets/FieldReadDeny.policyRuleDefinitionSet +5 -0
- package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitions/FieldReadDeny_Rule_1.policyRuleDefinition +72 -0
- package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitionSets/LastCharactersFieldMasking.policyRuleDefinitionSet +5 -0
- package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitions/LastCharactersFieldMasking_Rule_1.policyRuleDefinition +77 -0
- package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitionSets/PrincipalFieldMatchRLS.policyRuleDefinitionSet +5 -0
- package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitions/PrincipalFieldMatchRLS_Rule_1.policyRuleDefinition +77 -0
- package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitionSets/TaggedObjectAccess.policyRuleDefinitionSet +5 -0
- package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitions/TaggedObjectAccess_Rule_1.policyRuleDefinition +65 -0
- package/skills/platform-policy-rule-generate/references/headless-transport.md +87 -0
- package/skills/platform-policy-rule-generate/references/policy-schema-full.md +18 -11
- package/skills/platform-policy-rule-generate/references/policy-shapes.md +107 -0
- package/skills/platform-policy-rule-generate/references/principal-expression.md +31 -0
- package/skills/platform-policy-rule-generate/references/reference-resolution.md +51 -0
- package/skills/platform-policy-rule-generate/references/resource-expression.md +48 -0
- package/skills/platform-policy-rule-generate/references/runtime-context.md +9 -0
- package/skills/platform-policy-rule-generate/references/templates-access.md +11 -9
- package/skills/platform-policy-rule-generate/references/templates-advanced.md +5 -3
- package/skills/platform-policy-rule-generate/references/templates-record.md +37 -22
- package/skills/platform-policy-rule-generate/references/templates-transform.md +10 -8
- package/skills/platform-policy-rule-generate/references/templates.md +2 -2
- package/skills/platform-policy-rule-generate/references/ui-compatibility.md +36 -18
- package/skills/platform-report-generate/SKILL.md +29 -5
- package/skills/platform-report-generate/references/chart-types.md +26 -2
- package/skills/platform-report-generate/references/column-names.md +43 -0
- package/skills/platform-report-generate/references/errors-and-troubleshooting.md +1 -1
- package/skills/platform-report-generate/references/summary-formulas-sorting-limits.md +118 -0
- package/skills/platform-report-generate/references/verification-checklist.md +22 -2
- package/skills/service-digital-engagement-channel-configure/SKILL.md +49 -110
- package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +35 -0
- package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +2 -2
- package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +58 -0
- package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +2 -2
- package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
- package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +128 -28
- package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +16 -20
- package/skills/service-digital-engagement-channel-configure/references/prechat_params.md +10 -0
- package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +38 -0
- package/skills/service-digital-engagement-channel-configure/references/user_verification.md +9 -0
- package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +4 -4
- package/skills/service-digital-engagement-channel-configure/scripts/normalize-channel-name.sh +12 -7
- package/skills/service-e911-configure/SKILL.md +242 -0
- package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +47 -44
- package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +110 -83
- package/skills/service-itsm-agentic-setup-incident-management/references/manage-incidents-with-ai.md +7 -3
- package/skills/service-itsm-agentic-setup-incident-management/references/priority-matrix.md +7 -5
- package/skills/service-itsm-agentic-setup-incident-management/references/sla-milestones.md +2 -2
- package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +437 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -1
- package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +0 -78
- package/skills/experience-content-media-image-generate/SKILL.md +0 -83
- package/skills/experience-content-media-image-generate/scripts/download-image.sh +0 -84
- package/skills/experience-content-media-stock-image-search/SKILL.md +0 -193
- package/skills/experience-content-media-stock-image-search/scripts/download-stock-image.py +0 -102
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Authoring Posture: The Control Spectrum
|
|
2
|
+
|
|
3
|
+
This guide defines how to choose the right posture for each subagent.
|
|
4
|
+
|
|
5
|
+
Posture is the dial between model latitude (agentic) and authored control
|
|
6
|
+
(deterministic). Choose posture first, then choose subagent organization
|
|
7
|
+
(router-first architecture, verification gate, and so on).
|
|
8
|
+
|
|
9
|
+
## Core Principle
|
|
10
|
+
|
|
11
|
+
Choose the least control that makes unacceptable failures unlikely or
|
|
12
|
+
impossible while preserving the flexibility the use case needs. This is a
|
|
13
|
+
tradeoff, not a rule that every exact fact must become a branch or that every
|
|
14
|
+
conversation should remain prompt-led.
|
|
15
|
+
|
|
16
|
+
More deterministic control provides stronger ordering, repeatability,
|
|
17
|
+
auditability, and protection around consequential actions. It also creates
|
|
18
|
+
more state, more lifecycle cases, more maintenance, and less natural recovery
|
|
19
|
+
from corrections, digressions, or changed intent.
|
|
20
|
+
|
|
21
|
+
More model latitude handles meaning, ambiguity, corrections, and conversational
|
|
22
|
+
variation more naturally. It also makes exact ordering, action choice, and
|
|
23
|
+
repeatability probabilistic.
|
|
24
|
+
|
|
25
|
+
Mixed control is often the useful middle: let the model interpret the user's
|
|
26
|
+
meaning and collect conversational inputs, while runtime predicates gate only
|
|
27
|
+
the consequences that need a guarantee.
|
|
28
|
+
|
|
29
|
+
| Posture | Main benefit | Main cost | Typical fit |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| Agentic | flexibility and natural recovery | probabilistic ordering and action choice | advice, discovery, low-risk assistance |
|
|
32
|
+
| Mixed | flexible interpretation with protected invariants | two owners must have a clear boundary | most action-oriented assistants |
|
|
33
|
+
| Scripted | repeatability, traceability, and strict ordering | rigidity, state lifecycle, and maintenance | regulated or externally ordered workflows |
|
|
34
|
+
|
|
35
|
+
Pin more behavior when the cost of a wrong or reordered decision justifies that
|
|
36
|
+
cost: regulation, authorization, confirmed consequential actions, external
|
|
37
|
+
ordering, or a reproduced reliability failure. Do not add control merely
|
|
38
|
+
because the runtime could express it.
|
|
39
|
+
|
|
40
|
+
## Primary Controls
|
|
41
|
+
|
|
42
|
+
Three primitives control posture:
|
|
43
|
+
|
|
44
|
+
1. `available when`
|
|
45
|
+
Primary invariant tool. Hide actions when preconditions are false.
|
|
46
|
+
2. `with param = ...` vs `with param = value`
|
|
47
|
+
Default to `...`. Pin values only when sourced from controlled state
|
|
48
|
+
(for example, verified `customer_id`), needed after action-output scope ends,
|
|
49
|
+
or when a reproduced extraction failure requires it.
|
|
50
|
+
3. `if` / `else` in `instructions: ->`
|
|
51
|
+
Use conditional instructions only when a named controlled value changes the
|
|
52
|
+
prompt the model must receive. More branching means more authored control.
|
|
53
|
+
|
|
54
|
+
Surviving conversation history is the default source for names, preferences,
|
|
55
|
+
answers, corrections, and current intent. Add mutable state only for a named
|
|
56
|
+
runtime consumer or a value explicitly required beyond the history window.
|
|
57
|
+
|
|
58
|
+
## Decision Ownership Test
|
|
59
|
+
|
|
60
|
+
Do not choose posture from the fact that a sentence contains the word “if.”
|
|
61
|
+
Classify the decision:
|
|
62
|
+
|
|
63
|
+
| Decision | Likely owner | Example |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| Exact trusted fact with a required stable consequence | AgentScript | `@variables.account_status == "blocked"` |
|
|
66
|
+
| Mandatory eligibility or side-effect gate | AgentScript | hide submit until authorization succeeds |
|
|
67
|
+
| Model needs a stored value to explain or summarize | Model, with explicit interpolation | `{!@variables.case_summary}` |
|
|
68
|
+
| Semantic intent or ambiguity | Model | user wants a human, is changing topics, or is asking hypothetically |
|
|
69
|
+
|
|
70
|
+
Ask:
|
|
71
|
+
|
|
72
|
+
1. Does the runtime already know the exact fact?
|
|
73
|
+
2. Must the same fact always produce the same branch?
|
|
74
|
+
3. Does the branch protect authorization, ordering, or a consequential effect?
|
|
75
|
+
4. What happens if the model gets the decision wrong?
|
|
76
|
+
5. What flexibility is lost if the branch is locked?
|
|
77
|
+
6. Does the decision require interpreting natural language and context?
|
|
78
|
+
|
|
79
|
+
Runtime knowledge is a signal, not an automatic ownership rule. Use
|
|
80
|
+
deterministic control when stable behavior is worth the rigidity. Use model
|
|
81
|
+
reasoning when interpretation and recovery are more valuable than exact
|
|
82
|
+
repeatability. For mixed cases, let the model interpret intent, then gate the
|
|
83
|
+
available consequence with trusted runtime state.
|
|
84
|
+
|
|
85
|
+
Do not write an exact comparison as model prose:
|
|
86
|
+
|
|
87
|
+
```agentscript
|
|
88
|
+
| If {!@variables.account_status} == "blocked", route to account recovery.
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Interpolation only reveals the value. It still asks the model to perform and
|
|
92
|
+
obey the comparison. If its consequence must be stable, encode it with `if`.
|
|
93
|
+
|
|
94
|
+
## Match Reasoning Burden to the Target Model
|
|
95
|
+
|
|
96
|
+
Record the deployed model and configuration when they are known. For each
|
|
97
|
+
reasoning iteration, count the distinct classifications, precedence rules,
|
|
98
|
+
tool choices, and exact sequences the model must reconcile.
|
|
99
|
+
|
|
100
|
+
- A stronger model may handle broader semantic judgment with fewer examples.
|
|
101
|
+
- A smaller model generally benefits from a narrower objective, clearer
|
|
102
|
+
boundaries, and fewer simultaneous decisions.
|
|
103
|
+
- Treat contradictory instructions, missing values, impossible sequencing, and
|
|
104
|
+
invalid state combinations as authoring defects rather than assuming the
|
|
105
|
+
selected model will repair them.
|
|
106
|
+
|
|
107
|
+
If the target model is unknown, mark posture fit as unassessed. Do not
|
|
108
|
+
over-script preemptively for a hypothetical weak model or declare a dense
|
|
109
|
+
prompt safe because a hypothetical stronger model might follow it.
|
|
110
|
+
|
|
111
|
+
## Failure Mode to Avoid
|
|
112
|
+
|
|
113
|
+
Do not start with step-by-step **prose** directives like:
|
|
114
|
+
|
|
115
|
+
- `Step 1: invoke X`
|
|
116
|
+
- `Step 2: invoke Y`
|
|
117
|
+
- `CRITICAL: always invoke Z`
|
|
118
|
+
|
|
119
|
+
These ask the LLM to follow a fixed procedure via natural language — brittle
|
|
120
|
+
and easily ignored.
|
|
121
|
+
|
|
122
|
+
Deterministic `if/else` conditionals are resolved before the LLM sees the
|
|
123
|
+
prompt, but that does not make every branch desirable. Justify each branch by
|
|
124
|
+
the value of stable behavior relative to its flexibility and lifecycle cost.
|
|
125
|
+
Common reasons include regulation, authorization, confirmed consequences,
|
|
126
|
+
external ordering, and reproduced trace failures. Its variable needs a known
|
|
127
|
+
writer and consumer.
|
|
128
|
+
|
|
129
|
+
**Favor runtime conditions when:**
|
|
130
|
+
- The branch consumes verified authorization or eligibility
|
|
131
|
+
- The branch consumes exact action output or confirmed consequence data
|
|
132
|
+
- The branch enforces required external ordering
|
|
133
|
+
- A reproduced trace failure requires deterministic resolution
|
|
134
|
+
|
|
135
|
+
**Favor prompt-led reasoning when:**
|
|
136
|
+
- The LLM needs judgment/flexibility (tone, phrasing, edge-case handling)
|
|
137
|
+
- The decision depends on unstructured user input the LLM must interpret
|
|
138
|
+
- Surviving conversation history already contains the relevant fact
|
|
139
|
+
- A rigid branch would make ordinary correction, digression, or intent change
|
|
140
|
+
harder without protecting a meaningful invariant
|
|
141
|
+
|
|
142
|
+
## Posture Matrix
|
|
143
|
+
|
|
144
|
+
| Decision | Scripted | Mixed | Agentic |
|
|
145
|
+
|---|---|---|---|
|
|
146
|
+
| Action ordering | gates on required external outcomes | gates on real invariants | gates on real invariants |
|
|
147
|
+
| Action parameters | mostly pinned | mixed pinned + `...` | mostly `...` |
|
|
148
|
+
| Instructions | step-by-step with many branches | guidance with targeted branching | high-level intent, minimal branching |
|
|
149
|
+
|
|
150
|
+
When requirements do not justify a control, start prompt-led and add control
|
|
151
|
+
only where the cost of probabilistic behavior warrants it. When requirements
|
|
152
|
+
do justify strict sequencing, do not weaken it merely to appear more agentic.
|
|
153
|
+
|
|
154
|
+
## Scripted Posture
|
|
155
|
+
|
|
156
|
+
Use when requirements are regulated, audited, or require strict traceability.
|
|
157
|
+
|
|
158
|
+
Signals in requirements:
|
|
159
|
+
|
|
160
|
+
- "regulated"
|
|
161
|
+
- "compliance"
|
|
162
|
+
- "auditable"
|
|
163
|
+
- "must trace every step"
|
|
164
|
+
|
|
165
|
+
Structural expectations:
|
|
166
|
+
|
|
167
|
+
- `available when` gates on auditable invariants
|
|
168
|
+
- Parameters mostly pinned to authored variables
|
|
169
|
+
- Detailed branching only where the regulated procedure requires it
|
|
170
|
+
|
|
171
|
+
## Mixed Posture
|
|
172
|
+
|
|
173
|
+
Use when some decisions have machine-checkable invariants while the remaining
|
|
174
|
+
decisions depend on unstructured current intent or judgment.
|
|
175
|
+
|
|
176
|
+
Typical shape:
|
|
177
|
+
|
|
178
|
+
- Gate real invariants only (identity, entitlement, eligibility)
|
|
179
|
+
- Pin controlled values (for example `customer_id`), keep other values as `...`
|
|
180
|
+
- Use concise guidance, not full scripts
|
|
181
|
+
|
|
182
|
+
## Agentic Posture
|
|
183
|
+
|
|
184
|
+
Use for open-ended assistance where the model can safely carry more reasoning.
|
|
185
|
+
|
|
186
|
+
Typical shape:
|
|
187
|
+
|
|
188
|
+
- Minimal gating outside trust/security invariants
|
|
189
|
+
- Most parameters use `...`
|
|
190
|
+
- High-level intent instructions with minimal branching
|
|
191
|
+
|
|
192
|
+
## Review Checklist
|
|
193
|
+
|
|
194
|
+
For each subagent:
|
|
195
|
+
|
|
196
|
+
1. Which posture is selected?
|
|
197
|
+
2. Why that posture (regulation, trust gate, or observed failure)?
|
|
198
|
+
3. Which invariants are enforced with `available when`?
|
|
199
|
+
4. Which parameters are pinned, and what controlled source justifies each pin?
|
|
200
|
+
5. For every variable, what named runtime expression or later action consumes it?
|
|
201
|
+
6. Does that consumer need the exact stored value, or would a trusted boolean
|
|
202
|
+
outcome preserve the same invariant with less state?
|
|
203
|
+
7. Which reset, expiry, correction, or cancellation paths can affect each
|
|
204
|
+
variable before it stops mattering, and are those paths defined?
|
|
205
|
+
8. Which instructions can be simplified without losing required control?
|
|
206
|
+
9. Which decisions are exact runtime facts, and which require semantic
|
|
207
|
+
interpretation?
|
|
208
|
+
10. Is the reasoning burden supported by the deployed target model and evals?
|
|
209
|
+
11. For each added control, what failure does it prevent and what
|
|
210
|
+
conversational flexibility does it remove?
|
|
211
|
+
12. For each prompt-led decision, is the cost of a wrong or reordered choice
|
|
212
|
+
acceptable?
|
|
213
|
+
|
|
214
|
+
If a control cannot cite a cause and consumer, question it. Remove it only
|
|
215
|
+
after confirming that doing so preserves the required behavior.
|
|
@@ -31,8 +31,15 @@ Paths below are shown relative to the bots root directory. For org-backed retrie
|
|
|
31
31
|
- variables updated by the action (bot variables set from invocation outputs)
|
|
32
32
|
- escalation actions from system messages:
|
|
33
33
|
- if a dialog contains `conversationSystemMessage` of type `Transfer`, add an action entry with `action_type: "escalate"`
|
|
34
|
-
-
|
|
35
|
-
|
|
34
|
+
- resolve the escalation target (`target_type` is one of `queue`, `flow`, `bot`, or `skill`) from the `systemMessageMappings` under that `conversationSystemMessage`:
|
|
35
|
+
- **`systemMessageMappings` present:** for each mapped variable (`variableName`):
|
|
36
|
+
- **target type** — infer from the variable's `SObjectType` in its `<conversationVariables>` declaration (for example `FlowDefinition` -> `flow`, `Queue` -> `queue`). If `SObjectType` is absent or matches none of these, record it as an open question; do not guess.
|
|
37
|
+
- **target value/name** — infer from the variable/value assignments that write the mapped variable earlier in the conversation: `VariableOperation` `Set` steps whose `botVariableOperands` `targetName` is the mapped variable (use `sourceName` for a metadata reference such as `sourceType: FlowDefinition`, or `sourceValue` for a literal), and action output mappings (`invocationMappings` of type `Output`) that write it. When an action output writes the variable, the value is dynamic: record the action and output parameter instead of a fixed name. When different paths assign different values, record each value with the condition under which it is assigned. If no assignment is found, record it as an open question.
|
|
38
|
+
- **`systemMessageMappings` absent:** the transfer uses the bot's default routing. Read the `<defaultOutboundFlow>` entry in `bots/<BotName>/<BotName>.bot-meta.xml`. The target type is `flow` and the target name is that entry's value. If the bot has no `<defaultOutboundFlow>`, record the unresolved target as an open question.
|
|
39
|
+
- store the resolved `target_type`, the target identifier/value, the source of the resolution (`systemMessageMappings` variable + assignment step, or `defaultOutboundFlow`), and the condition guarding the transfer step on the action record
|
|
40
|
+
- end chat from system messages:
|
|
41
|
+
- if a dialog contains `conversationSystemMessage` of type `EndChat`, add an action entry with `action_type: "end_session"`
|
|
42
|
+
- this is the terminal step in the conversation and indicates that the conversation should be ended
|
|
36
43
|
- persist this as `invoked_actions` on the dialog node and as action-level records in `action_inventory`
|
|
37
44
|
5. While scanning each step, detect transition-producing step types:
|
|
38
45
|
- `Navigation` with `<botNavigationLinks>`
|
|
@@ -166,8 +173,8 @@ Paths below are shown relative to the bots root directory. For org-backed retrie
|
|
|
166
173
|
|
|
167
174
|
When input mode is offline (`.bot-meta.xml` + `.botVersion-meta.xml` provided, no org fetch):
|
|
168
175
|
|
|
169
|
-
1.
|
|
170
|
-
2. For each invocation mapping:
|
|
176
|
+
1. Prioritize existing local implementation files. For each invoked action, if its Apex class (under `classes/`, using `@InvocableMethod` / `@InvocableVariable`), Flow (under `flows/`), or other referenced artifact is present in `--offline-dir`, generate the signature from that file.
|
|
177
|
+
2. Fall back to bot metadata mappings only for actions whose implementation files are not present locally (do not block on missing Apex/Flow source code). For each such invocation mapping:
|
|
171
178
|
- extract action parameter names from invocation input/output mapping keys
|
|
172
179
|
- resolve mapped bot variable names from mapping values
|
|
173
180
|
- infer parameter types from mapped variable declarations in `<conversationVariables>` / `<contextVariables>` when available
|
|
@@ -59,7 +59,7 @@ Use this when user provides Einstein Bot artifacts and asks to migrate/upgrade i
|
|
|
59
59
|
- Flow metadata under `flows/` (when present)
|
|
60
60
|
- Apex classes under `classes/` (when present)
|
|
61
61
|
- any other local files referenced by bot artifacts that are needed for extraction/mapping fidelity
|
|
62
|
-
- In offline mode,
|
|
62
|
+
- In offline mode, prioritize existing local implementation files: when Flow metadata, Apex classes, or other referenced artifacts are present in `--offline-dir`, use them as the primary source for action signatures and contracts. Fall back to the bot and botVersion XML mappings only for actions whose implementation files are not present locally.
|
|
63
63
|
2. **Extract migration structure** — Read [Extraction Blueprint](extraction-blueprint.md) and derive:
|
|
64
64
|
- bot capabilities
|
|
65
65
|
- dialog graph
|
|
@@ -74,8 +74,7 @@ Use this when user provides Einstein Bot artifacts and asks to migrate/upgrade i
|
|
|
74
74
|
- `<run_project_dir>/<AgentName>-open-questions.md`
|
|
75
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
76
|
The Agent Spec markdown MUST use the same section names/order as
|
|
77
|
-
|
|
78
|
-
`## Migration Notes (Einstein Bot -> Agentforce)` appendix defined in [Handoff Output Format](handoff-output-format.md).
|
|
77
|
+
[agent-spec-template.md](../assets/_vendored/agent-spec-template.md) from the `agentforce-generate` skill.
|
|
79
78
|
5. **Validate handoff quality** — Read [Quality Checklist](quality-checklist.md) and verify all required sections and mapping completeness before presenting output.
|
|
80
79
|
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
80
|
- `<run_project_dir>/<AgentName>-AgentSpec.md`
|
|
@@ -90,6 +89,23 @@ Use this when user provides Einstein Bot artifacts and asks to migrate/upgrade i
|
|
|
90
89
|
- `<run_project_dir>/extraction-summary.json` as supporting context
|
|
91
90
|
- `<run_project_dir>/<AgentName>-einstein-bot-handoff.json` and `<run_project_dir>/<AgentName>-open-questions.md`
|
|
92
91
|
- `input_mode` (`online` or `offline`) explicit context
|
|
92
|
+
- as the final section of the prompt, a `## Hand-back and remaining orchestrator steps` section. It contains this hand-back instruction verbatim:
|
|
93
|
+
> This `/agentforce-generate` run is a sub-step of the `agentforce-bot-upgrade` orchestrator, not the end of the task. When generation finishes, do NOT write a final summary or end your turn. Write the outputs required by `agentforce-generate-output-contract.md`, then immediately return to `agentforce-bot-upgrade` and execute the remaining steps below in the same turn. The task is complete only after Step 5 has written `report.md`.
|
|
94
|
+
|
|
95
|
+
It is followed by a "Remaining orchestrator steps" checklist. Fill in this bot's concrete paths, org alias, and agent API name:
|
|
96
|
+
1. **Step 4 — Post-conversion enhancements.** Run the [Post-Conversion Enhancements Reference](post-conversion-enhancements-reference.md) workflow on the generated `.agent` file, editing it in place.
|
|
97
|
+
2. **Step 4 — Compile** (online mode only). Redeploy the bundle and run `sf agent validate authoring-bundle --api-name <AgentApiName> --target-org <org-alias> --json`.
|
|
98
|
+
3. **Step 4 — Commit** (online mode only, and only when compile succeeds). Run `sf agent publish authoring-bundle --api-name <AgentApiName> --target-org <org-alias> --json`.
|
|
99
|
+
- This commit is pre-authorized by the orchestrator. Do not ask for publish approval, and do not require live preview.
|
|
100
|
+
- Never activate.
|
|
101
|
+
- If publish fails, fix the cause and retry, or record the failure and continue.
|
|
102
|
+
4. **Step 4 — Publish audit** (online mode only). Append one record to `<orchestrator_working_dir>/publish-audit.jsonl` for every publish attempt, with actor, action, target, timestamp, and outcome. Never include tokens, session IDs, or credentials.
|
|
103
|
+
5. **Step 4 — Agent ID and version** (online mode only, after a successful commit). Query `BotDefinition` and `BotVersion` for the agent ID and the committed version number.
|
|
104
|
+
6. **Step 4 — Summary.** Prepare the color-coded per-agent summary as input to Step 5. Do not end the turn here.
|
|
105
|
+
7. **Step 5 — Report.** Write `<orchestrator_working_dir>/report.md` last. The run ends only after this file is written; then emit the final message.
|
|
106
|
+
|
|
107
|
+
For `input_mode=offline`, the checklist marks items 2–5 as skipped (no compile, commit, or audit) and keeps items 1, 6, and 7.
|
|
108
|
+
The output contract must end with the same hand-back reminder: capturing these outputs is not completion; the orchestrator continues with the remaining Step 4 and Step 5 checklist in the invocation prompt.
|
|
93
109
|
For `input_mode=offline`, include these strict instructions in the prompt:
|
|
94
110
|
- syntax/structural validation is still mandatory
|
|
95
111
|
- skip only org-dependent CLI operations
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
The extraction step also persists `extraction-summary.json` in the same directory (see [Extraction Blueprint](extraction-blueprint.md)); it is carried forward as supporting context in the handoff.
|
|
10
10
|
|
|
11
11
|
Write all required files in the run-specific SFDX project directory for the selected input mode:
|
|
12
|
-
-
|
|
13
|
-
-
|
|
12
|
+
- Online: org-backed run project directory created during SF CLI setup
|
|
13
|
+
- Offline: run project directory containing/associated with provided XML inputs
|
|
14
14
|
Do not write handoff artifacts in the repository root.
|
|
15
15
|
|
|
16
16
|
## 1) Agent Spec Markdown
|
|
17
17
|
|
|
18
18
|
Create `<run_project_dir>/<AgentName>-AgentSpec.md` by copying:
|
|
19
|
-
|
|
19
|
+
[agent-spec-template.md](../assets/_vendored/agent-spec-template.md) from the `agentforce-generate` skill.
|
|
20
20
|
|
|
21
21
|
The handoff Agent Spec MUST:
|
|
22
22
|
|
|
@@ -36,49 +36,26 @@ Required section order:
|
|
|
36
36
|
9. `## Architecture Pattern`
|
|
37
37
|
10. `## Agent Configuration`
|
|
38
38
|
|
|
39
|
-
###
|
|
39
|
+
### How the generated agent works
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Write every section below for this runtime model.
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
2. Describe the agent's business scope using the intents the bot actually handles.
|
|
45
|
-
3. Restrict scope to capabilities backed by configured actions:
|
|
46
|
-
- do not claim unsupported capabilities
|
|
47
|
-
- call out out-of-scope requests when no action support exists
|
|
48
|
-
|
|
49
|
-
#### `## Behavioral Intent`
|
|
50
|
-
|
|
51
|
-
1. Start traversal from `Welcome` (or extracted entry dialog when `Welcome` is absent).
|
|
52
|
-
2. Build each workflow using:
|
|
53
|
-
- `dialog_functionality_summary`
|
|
54
|
-
- ordered `step_functionality`
|
|
55
|
-
3. Handle navigations by following target dialogs recursively, while preserving navigation semantics:
|
|
56
|
-
- **`Call` navigation**: transfer control to the target dialog, then return control back to the source dialog after target execution completes. Continue source-dialog remaining steps after return.
|
|
57
|
-
- **`Redirect` navigation**: transfer control permanently to the target dialog and halt source-dialog execution immediately (no return to source flow).
|
|
58
|
-
4. While reconstructing flows, track `Call` vs `Redirect` semantics internally so downstream agent design preserves return/non-return behavior.
|
|
59
|
-
5. For `Call` flows, capture both:
|
|
60
|
-
- the delegated target workflow behavior, and
|
|
61
|
-
- the resumed source workflow behavior after return.
|
|
62
|
-
6. For `Redirect` flows, do not append post-redirect source steps to the same path unless there is an explicit later re-entry edge.
|
|
63
|
-
7. Reconstruct meaningful user conversation flows across traversed dialogs.
|
|
64
|
-
8. Identify hard checkpoints by capturing strict ordering constraints, mandatory preconditions, and enforced branches/escalations.
|
|
65
|
-
9. Final behavioral intent must include:
|
|
66
|
-
- ordered events for one or more workflows
|
|
67
|
-
- action invocation scope and sequencing
|
|
68
|
-
- variable usage scope (reads/writes and gating variables)
|
|
69
|
-
- escalation/routing behavior
|
|
70
|
-
- normalized transition behavior (return-after-delegation vs one-way transfer) expressed in agent-native terms only
|
|
71
|
-
- other critical bot-specific constraints that affect conversation behavior
|
|
43
|
+
The generated agent is an intelligent, LLM-backed conversational experience provider. Unlike the bot, it does not follow a fixed dialog tree: it interprets each user message and decides which subagent should handle it.
|
|
72
44
|
|
|
73
|
-
|
|
45
|
+
1. **Router first.** Every incoming user message is processed first by the router subagent — the `start_agent` block. The router only classifies and routes; it never answers the user directly.
|
|
46
|
+
2. **Intent-based transitions.** The router transitions to the subagent that best matches the user's intent, judged against each subagent's `description` and its transition action descriptions. Write every subagent description with a clear positive scope and important exclusions, so routing stays unambiguous.
|
|
47
|
+
3. **Default `ambiguous` and `off_topic` subagents.** Always include both subagents, each with its own router transition, in every generated Agent Spec — even if the bot had no equivalent dialogs. List them in `## Subagent Posture` and `## Subagent Map` like any other subagent. Neither invokes any action.
|
|
48
|
+
- **`ambiguous`** — handles requests whose intent is unclear or could match more than one subagent. Say briefly that the request is unclear and ask one focused question for the missing detail. Do not guess an intent.
|
|
49
|
+
- **`off_topic`** — handles requests that no subagent covers. Say that the request is outside what the agent can help with, state the supported capabilities, and ask which of them the user wants help with. Do not answer the out-of-scope question.
|
|
50
|
+
- Write the two router transition descriptions so they do not overlap: unclear-but-possibly-supported requests go to `ambiguous`; clearly unsupported requests go to `off_topic`.
|
|
51
|
+
- Once the user's reply makes the intent clear, the router can route the request.
|
|
74
52
|
|
|
75
|
-
|
|
53
|
+
This default applies to every bot upgrade. It overrides agentforce-generate's general guidance to create `ambiguous_question` or `off_topic` subagents only when needed.
|
|
76
54
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
5. Record any uncertain assignments in open questions instead of forcing low-confidence grouping.
|
|
55
|
+
Related agentforce-generate references:
|
|
56
|
+
- [Router-First Architecture Mechanics](_vendored/architecture-patterns.md#router-first-architecture-mechanics) — router behavior and transition paths.
|
|
57
|
+
- [Guardrail subagents](_vendored/agent-design-and-spec-creation.md) ("Guardrail Subagents") — example `ambiguous_question` and `off_topic` instructions.
|
|
58
|
+
- [Off-Topic and Escalation Routing](_vendored/agent-subagent-map-diagrams.md#off-topic-and-escalation-routing) — how ambiguity and out-of-scope paths appear in the Subagent Map.
|
|
82
59
|
|
|
83
60
|
### Bot-specific artifact translation rules (required)
|
|
84
61
|
|
|
@@ -106,14 +83,6 @@ When generating the Agent Spec, do not retain raw bot-only entities. Translate t
|
|
|
106
83
|
- retain a lightweight guided-choice pattern only when it materially improves clarity or control
|
|
107
84
|
6. If menu translation approach is ambiguous, ask the user and record the decision in open questions before finalizing. When `--interactive=false`, do not ask — apply the recommended translation, record it in open questions as an auto-applied decision, and continue.
|
|
108
85
|
|
|
109
|
-
Then add this migration-specific appendix section at the end:
|
|
110
|
-
|
|
111
|
-
11. `## Migration Notes (Einstein Bot -> Agentforce)`
|
|
112
|
-
- Source bot identity and version
|
|
113
|
-
- Mapping confidence summary
|
|
114
|
-
- Unmapped constructs
|
|
115
|
-
- Open decisions requiring user approval
|
|
116
|
-
|
|
117
86
|
### Action Invocation Optimization Rules
|
|
118
87
|
|
|
119
88
|
Use this step to optimize conversation efficiency by reducing unnecessary action invocations while preserving behavior and data contracts.
|
|
@@ -135,10 +104,19 @@ Use this step to optimize conversation efficiency by reducing unnecessary action
|
|
|
135
104
|
|
|
136
105
|
If an action is applicable only to Einstein Bot runtime (for example, internal bot-state bookkeeping actions):
|
|
137
106
|
|
|
138
|
-
|
|
107
|
+
Examples of bot-only actions:
|
|
108
|
+
- storing the previous or current dialog name (for example, to return the user to a dialog later)
|
|
109
|
+
- updating bot-only variables, such as dialog counters, menu-selection flags, or retry and fallback counters
|
|
110
|
+
- tracking bot navigation state, such as recording which menu option or dialog path the user took
|
|
111
|
+
- logging dialog visits or bot-session telemetry that no business process consumes
|
|
112
|
+
|
|
113
|
+
An action that also changes business data, or sets a variable that a business action or a routing decision still needs, is not bot-only.
|
|
114
|
+
|
|
115
|
+
1. Mark the action as `CANDIDATE_FOR_REMOVAL`.
|
|
139
116
|
2. Show the user why it is bot-only and why it is not needed in Agentforce.
|
|
140
117
|
3. Do not remove it automatically.
|
|
141
|
-
4. Remove only after explicit user confirmation. When `--interactive=false`, do not remove it — keep the action in place as the safe recommended default and record it as a deferred `
|
|
118
|
+
4. Remove only after explicit user confirmation. When `--interactive=false`, do not remove it — keep the action in place as the safe recommended default and record it as a deferred `CANDIDATE_FOR_REMOVAL` decision in open questions.
|
|
119
|
+
5. After the user confirms a removal, update `## Behavioral Intent` to match: in every workflow that invoked the removed action, drop its invocation from the ordered events and action sequencing, and drop any variable reads/writes that only that action used. Keep the rest of each workflow's behavior and ordering unchanged. Also remove the action from `## Actions` and `## Action Invocation Strategy`.
|
|
142
120
|
|
|
143
121
|
#### User review gate (required)
|
|
144
122
|
|
|
@@ -158,7 +136,58 @@ Before finalizing optimized actions, present a complete change summary to the us
|
|
|
158
136
|
|
|
159
137
|
Apply changes only after user approval.
|
|
160
138
|
|
|
161
|
-
|
|
139
|
+
### Section-by-section generation guidance (from `extraction-summary.json`)
|
|
140
|
+
|
|
141
|
+
#### `## Purpose & Scope`
|
|
142
|
+
|
|
143
|
+
1. Derive a meaningful purpose statement from bot description/identity and extracted intent summaries.
|
|
144
|
+
2. Describe the agent's business scope using the intents the bot actually handles.
|
|
145
|
+
3. Restrict scope to capabilities backed by configured actions:
|
|
146
|
+
- do not claim unsupported capabilities
|
|
147
|
+
- call out out-of-scope requests when no action support exists
|
|
148
|
+
|
|
149
|
+
#### `## Behavioral Intent`
|
|
150
|
+
|
|
151
|
+
1. Start traversal from `Welcome` (or extracted entry dialog when `Welcome` is absent).
|
|
152
|
+
2. Build each workflow using:
|
|
153
|
+
- `dialog_functionality_summary`
|
|
154
|
+
- ordered `step_functionality`
|
|
155
|
+
3. Handle navigations by following target dialogs recursively, while preserving navigation semantics:
|
|
156
|
+
- **`Call` navigation**: transfer control to the target dialog, then return control back to the source dialog after target execution completes. Continue source-dialog remaining steps after return.
|
|
157
|
+
- **`Redirect` navigation**: transfer control permanently to the target dialog and halt source-dialog execution immediately (no return to source flow).
|
|
158
|
+
4. While reconstructing flows, track `Call` vs `Redirect` semantics internally so downstream agent design preserves return/non-return behavior.
|
|
159
|
+
5. For `Call` flows, capture both:
|
|
160
|
+
- the delegated target workflow behavior, and
|
|
161
|
+
- the resumed source workflow behavior after return.
|
|
162
|
+
6. For `Redirect` flows, do not append post-redirect source steps to the same path unless there is an explicit later re-entry edge.
|
|
163
|
+
7. Reconstruct meaningful user conversation flows across traversed dialogs.
|
|
164
|
+
- Each workflow might contain variable-based conditions for routing to other dialogs. Parse these and convert routing-specific conditions into equivalent natural-language LLM instructions. For example, `if selected_option == 'Bookings'` can be converted into "If the user wants bookings information, route to the bookings subagent."
|
|
165
|
+
8. Identify hard checkpoints by capturing strict ordering constraints, mandatory preconditions, and enforced branches/escalations.
|
|
166
|
+
- If the ordering of actions is strictly enforced, retain the same ordering in the agent. For example, the user can check their bookings only after logging in: enforce this with variable-based conditions (via `available when`) in `## Deterministic Controls (When Needed)`, in `## Behavioral Intent`, or both.
|
|
167
|
+
9. Final behavioral intent must include:
|
|
168
|
+
- ordered events for one or more workflows
|
|
169
|
+
- action invocation scope and sequencing
|
|
170
|
+
- variable usage scope (reads/writes and gating variables)
|
|
171
|
+
- escalation/routing behavior
|
|
172
|
+
- normalized transition behavior (return-after-delegation vs one-way transfer) expressed in agent-native terms only
|
|
173
|
+
- other critical bot-specific constraints that affect conversation behavior
|
|
174
|
+
|
|
175
|
+
10. Do NOT emit raw bot navigation constructs (`Call`, `Redirect`) in the final Agent Spec text. Convert them into agent-native behavioral descriptions only.
|
|
176
|
+
|
|
177
|
+
#### `## Subagent Posture`
|
|
178
|
+
|
|
179
|
+
Use [posture-and-determinism.md](_vendored/posture-and-determinism.md) from the `agentforce-generate` skill as the definition of posture (scripted / mixed / agentic) and of how to choose it. Read it before deriving this section; do not invent posture categories or criteria beyond it.
|
|
180
|
+
|
|
181
|
+
1. Derive baseline subagents from dialog clusters (`1 cluster -> 1 subagent`).
|
|
182
|
+
2. Ensure each subagent has coherent responsibility boundaries based on associated dialog behavior and actions.
|
|
183
|
+
3. Add additional subagents when dialogs are not assigned to any cluster but represent distinct bot functionality.
|
|
184
|
+
4. Ensure all dialog functionality is covered by at least one subagent.
|
|
185
|
+
5. Record any uncertain assignments in open questions instead of forcing low-confidence grouping.
|
|
186
|
+
6. For each subagent, choose its posture per the posture definition, based on the extracted dialog behavior. A rigid bot step order does not by itself require scripted posture; pin only what the definition says needs a guarantee (for example authorization or identity checks, confirmed consequential actions, or externally required ordering).
|
|
187
|
+
7. Fill the template's posture table for every subagent: `Subagent`, `Posture`, `Why this posture?` (grounded in the bot's dialog behavior), and `Deterministic controls (if any)`. Keep the deterministic controls consistent with `## Deterministic Controls (When Needed)`.
|
|
188
|
+
8. If the posture of a subagent is ambiguous, record it in open questions with a recommended posture.
|
|
189
|
+
|
|
190
|
+
### Persistence requirement
|
|
162
191
|
|
|
163
192
|
After user confirms, update the Agent Spec file to reflect all finalized action changes (adds/updates/deletes), including:
|
|
164
193
|
|
|
@@ -166,6 +195,7 @@ After user confirms, update the Agent Spec file to reflect all finalized action
|
|
|
166
195
|
- input/output contracts
|
|
167
196
|
- variable read/write assignments
|
|
168
197
|
- action invocation strategy updates required by the optimization
|
|
198
|
+
- `## Behavioral Intent` workflow updates for removed actions (see Bot-only action handling, step 5)
|
|
169
199
|
|
|
170
200
|
Do not treat non-confirmed changes as final.
|
|
171
201
|
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
Input mode is selected from `--mode <online|offline>`:
|
|
6
6
|
|
|
7
|
-
1. **Online (
|
|
8
|
-
2. **Offline (
|
|
7
|
+
1. **Online (org-backed retrieval)** — Use org alias + bot identity, then fetch metadata/dependencies via SF CLI.
|
|
8
|
+
2. **Offline (local metadata input)** — Use provided local metadata/artifacts directly without org fetch.
|
|
9
9
|
|
|
10
10
|
If `--mode` is omitted, default to **online**.
|
|
11
11
|
Only ask the user to clarify mode when provided inputs are insufficient or contradictory for the inferred/default mode. When `--interactive=false`, do not ask — proceed with the inferred/default mode and record the assumption; halt only if the inputs cannot support any mode.
|
|
12
12
|
|
|
13
13
|
## Supported Input Modes
|
|
14
14
|
|
|
15
|
-
###
|
|
15
|
+
### Online: Org-backed retrieval
|
|
16
16
|
|
|
17
17
|
Required inputs:
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ Required inputs:
|
|
|
20
20
|
2. `--bot <bot-name>` — Einstein Bot developer name/identifier to migrate.
|
|
21
21
|
3. `--bot-version <bot-version>` — specific version to migrate (for example: `v3`).
|
|
22
22
|
|
|
23
|
-
###
|
|
23
|
+
### Offline: Local metadata input (new)
|
|
24
24
|
|
|
25
25
|
Required inputs:
|
|
26
26
|
|
|
@@ -54,8 +54,8 @@ If required inputs for the selected mode are missing, stop and ask for them befo
|
|
|
54
54
|
|
|
55
55
|
## Identity Resolution Rules
|
|
56
56
|
|
|
57
|
-
- For
|
|
58
|
-
- For
|
|
57
|
+
- For Online mode, use `org-alias + bot + bot-version` as the run identity key.
|
|
58
|
+
- For Offline mode, use `bot + bot-version` derived from provided XML metadata (or confirmed from user when not derivable).
|
|
59
59
|
- Do not merge artifacts from different versions in the same run.
|
|
60
60
|
- If source files contain a mismatched bot identity, pause and ask the user which identity is authoritative. When `--interactive=false`, do not pause — treat the identity declared in the authoritative bot metadata as the recommended default and record the assumption in `open_questions`.
|
|
61
61
|
|
|
@@ -67,7 +67,7 @@ If required inputs for the selected mode are missing, stop and ask for them befo
|
|
|
67
67
|
|
|
68
68
|
## Post-Input Finalization Workflow (Required)
|
|
69
69
|
|
|
70
|
-
###
|
|
70
|
+
### Online: Org-backed retrieval
|
|
71
71
|
|
|
72
72
|
After `--org-alias + --bot + --bot-version` are finalized, execute the SF CLI sequence in:
|
|
73
73
|
|
|
@@ -82,7 +82,7 @@ This is the canonical command list for:
|
|
|
82
82
|
|
|
83
83
|
Any unresolved dependency must be recorded in `open_questions` and mapped as `NEEDS_STUB` where applicable.
|
|
84
84
|
|
|
85
|
-
###
|
|
85
|
+
### Offline: Local metadata input
|
|
86
86
|
|
|
87
87
|
When both XML files are provided (`.bot-meta.xml` + `.botVersion-meta.xml`):
|
|
88
88
|
|
|
@@ -12,6 +12,7 @@ Convert extracted Einstein Bot behavior into a high-quality Agent Spec that `/ag
|
|
|
12
12
|
- **Action inventory** -> **Action inventory in spec** (`NEEDS_STUB` when implementation unknown)
|
|
13
13
|
- **Fallback dialogs** -> **Boundary handling and recovery behavior**
|
|
14
14
|
- **Transfer/system handoff** -> **Built-in `@utils.escalate`** (escalation policy; never a new/standalone action)
|
|
15
|
+
- **End chat** -> **Built-in `@utils.end_session`** (conversation close; never a new/standalone action)
|
|
15
16
|
|
|
16
17
|
## Escalation Mapping Rule
|
|
17
18
|
|
|
@@ -26,6 +27,19 @@ Instead:
|
|
|
26
27
|
- Express the escalation as an explicit `@utils.escalate` invocation in the relevant subagent's instructions (typically a terminal step of an escalation subagent).
|
|
27
28
|
- Exclude the transfer from the action inventory entirely (it is not an authored action).
|
|
28
29
|
|
|
30
|
+
## End Chat Mapping Rule
|
|
31
|
+
|
|
32
|
+
End-chat behavior (Einstein Bot `SystemMessage` `EndChat`, or any step that closes the conversation) MUST be mapped implicitly to the built-in `@utils.end_session` utility. Do NOT:
|
|
33
|
+
|
|
34
|
+
- create a new action for it in the action inventory (no `End_Chat`/`End_Session`-style action, no `NEEDS_STUB`/`NEEDS_CREATION` entry for the end chat),
|
|
35
|
+
- model it as a flow/apex/standard-invocable action, or
|
|
36
|
+
- represent it as generic "end the conversation" prose without the explicit `@utils.end_session` control.
|
|
37
|
+
|
|
38
|
+
Instead:
|
|
39
|
+
|
|
40
|
+
- Express the end chat as an explicit `@utils.end_session` invocation in the relevant subagent's instructions, at the point in the flow where the bot ended the chat (typically the terminal step of that path).
|
|
41
|
+
- Exclude the end chat from the action inventory entirely (it is not an authored action).
|
|
42
|
+
|
|
29
43
|
## Dialog Functionality Extraction Rules
|
|
30
44
|
|
|
31
45
|
Capture the functional behavior of each bot dialog before action optimization.
|
|
@@ -57,8 +71,7 @@ When generating `step_functionality`, handle all supported Einstein Bot step fam
|
|
|
57
71
|
- **Set**: capture source -> target variable assignment.
|
|
58
72
|
- **Unset**: capture variable clear/reset behavior.
|
|
59
73
|
- **Collect**: capture which variable is collected, requiredness, and option source (static/dynamic).
|
|
60
|
-
- **SetConversationLanguage
|
|
61
|
-
- **CollectAttachment**: capture file-collection requirement and resulting variable update.
|
|
74
|
+
- **SetConversationLanguage** and **CollectAttachment** are not supported: do not convert them, and record each skipped step (dialog + step) in open questions so it appears in the run report.
|
|
62
75
|
3. **Invocation**
|
|
63
76
|
- Capture invocation target, invocation type (`apex`, `flow`, `standardInvocableAction`, `externalService`, `quickAction`, `api`), input mappings, output mappings, and resulting variable writes.
|
|
64
77
|
4. **Navigation**
|
|
@@ -68,14 +81,14 @@ When generating `step_functionality`, handle all supported Einstein Bot step fam
|
|
|
68
81
|
6. **Group**
|
|
69
82
|
- Process nested steps recursively in order, preserving parent conditions and emitting child step sentences in sequence.
|
|
70
83
|
7. **SystemMessage**
|
|
71
|
-
- **Transfer**: capture escalation behavior and resolved target type/value, and map it implicitly to the built-in `@utils.escalate` (see Escalation Mapping Rule) — do not emit it as a new action.
|
|
72
|
-
- **EndChat**: capture terminal behavior and conversation close.
|
|
84
|
+
- **Transfer**: capture escalation behavior and resolved target type/value (resolved per [Extraction Blueprint](extraction-blueprint.md) step 4: from `systemMessageMappings` variable `SObjectType` + assignments when present, otherwise from the bot's `defaultOutboundFlow`), and map it implicitly to the built-in `@utils.escalate` (see Escalation Mapping Rule) — do not emit it as a new action.
|
|
85
|
+
- **EndChat**: capture terminal behavior and conversation close, and map it implicitly to the built-in `@utils.end_session` (see End Chat Mapping Rule) — do not emit it as a new action.
|
|
73
86
|
8. **RecordLookup**
|
|
74
87
|
- Capture queried object/entity, filter criteria, and output variable/list assignment.
|
|
75
88
|
9. **RichMessage**
|
|
76
|
-
-
|
|
89
|
+
- Not supported: do not convert it, and record each skipped step (dialog + step) in open questions so it appears in the run report.
|
|
77
90
|
10. **GoalStep**
|
|
78
|
-
-
|
|
91
|
+
- Not supported and not needed in the agent: do not convert it, and record each skipped step (dialog + step) in open questions so it appears in the run report.
|
|
79
92
|
|
|
80
93
|
### Step rendering rules
|
|
81
94
|
|