@salesforce/afv-skills 1.31.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/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/experience-ui-bundle-app-coordinate/SKILL.md +12 -9
- 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-project-generate/SKILL.md +111 -0
- package/skills/experience-ui-bundle-project-generate/scripts/flatten-project.mjs +33 -0
- 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-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-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/skills/sales-agentforce-pipeline-management-configure/references/admin-communication.md
ADDED
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
# Admin Communication Patterns
|
|
2
|
+
|
|
3
|
+
This reference provides detailed patterns for communicating with admin users during Pipeline Management setup. The goal: make the experience conversational and hide technical complexity unless the user explicitly asks to debug.
|
|
4
|
+
|
|
5
|
+
The core rules live in the **Admin Communication Guidelines** section of `SKILL.md` (background execution, parse-don't-dump, friendly language, set expectations, investigate errors silently, handle errors gracefully). This file is the detailed companion: the error-translation table, worked examples, and per-step narration templates that apply those rules.
|
|
6
|
+
|
|
7
|
+
### Silent Error Investigation Example
|
|
8
|
+
|
|
9
|
+
**Bad (showing the debugging journey):**
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
Testing NextStep...
|
|
13
|
+
The sample generation hit a snag while auto-selecting an opportunity.
|
|
14
|
+
Let me check what opportunity data exists...
|
|
15
|
+
The org has 8 opportunities but none are eligible.
|
|
16
|
+
The --json output is being corrupted...
|
|
17
|
+
Found the issue: ANSI color codes break jq parsing...
|
|
18
|
+
Let me disable CLI color...
|
|
19
|
+
The config set command is being interrupted...
|
|
20
|
+
Let me write the config file directly...
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Good (silent diagnosis, surface only the solution):**
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
Testing NextStep...
|
|
27
|
+
I need a test opportunity with notes to generate a sample. Let me create one...
|
|
28
|
+
The AI suggested: "Schedule follow-up call"
|
|
29
|
+
Does this look good?
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or if user choice is needed:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
Testing NextStep...
|
|
36
|
+
⚠ I need a test opportunity with notes to generate a sample. Would you like me to:
|
|
37
|
+
1. Create a sample opportunity now (~30 seconds)
|
|
38
|
+
2. Skip the test - the prompt is configured and will work in production
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**What happened behind the scenes (silent):**
|
|
42
|
+
|
|
43
|
+
- Checked for eligible opportunities → found none
|
|
44
|
+
- Discovered ANSI color issue breaking JSON parsing → fixed with NO_COLOR=1
|
|
45
|
+
- Decided to either auto-create test data or offer choices
|
|
46
|
+
- Only showed the user the conclusion
|
|
47
|
+
|
|
48
|
+
## Time Expectations
|
|
49
|
+
|
|
50
|
+
Tell users how long operations take to prevent "is it frozen?" questions:
|
|
51
|
+
|
|
52
|
+
| Command | Typical Duration |
|
|
53
|
+
|---------|-----------------|
|
|
54
|
+
| `--check-license` | 10-30 seconds |
|
|
55
|
+
| `--through-phase prompts` (Call 1) | 2-4 minutes |
|
|
56
|
+
| `--from-phase flow` (Call 2) | 1-2 minutes |
|
|
57
|
+
| `add-field-suggestion.sh --verify-with-note` | 1-4 minutes |
|
|
58
|
+
| Stage description creation | 30-60 seconds |
|
|
59
|
+
|
|
60
|
+
## Error Translation Table
|
|
61
|
+
|
|
62
|
+
### Common Technical Errors → Admin Messages
|
|
63
|
+
|
|
64
|
+
| Technical Error | What to Say | Recovery |
|
|
65
|
+
|----------------|------------|----------|
|
|
66
|
+
| `License check failed: SalesDealAgentSettings not found` | "Your org doesn't have the Pipeline Management license. You'll need Agentforce for Sales or Agentforce 1 Sales Edition." | STOP - no action possible |
|
|
67
|
+
| `AgentPlatformSettings prerequisite missing` | "I need to enable the Agent Platform first. Let me do that..." | Auto-retry with prerequisite |
|
|
68
|
+
| `SOAP API failed: Einstein Generative AI prerequisite missing` | "I need to enable Einstein Generative AI first. Let me do that..." | Auto-retry with prerequisite |
|
|
69
|
+
| `Flow deployment failed: OpportunityTeamMember not accessible` | "I need to enable Opportunity Teams before deploying the automation. Let me do that now..." | Auto-retry after fix |
|
|
70
|
+
| `Agent bundle published but BotDefinition not found` | "The agent bundle was created but the platform hasn't fully processed it yet. Let me wait a moment and retry..." | Auto-retry after short delay |
|
|
71
|
+
| `Agent activation failed: BotVersion still Inactive` | "The agent definition exists but the activation step is still pending. This usually completes in a few moments. Would you like me to retry, or should we activate it manually in Setup?" | Offer retry or manual path |
|
|
72
|
+
| `Agent Access PSG assigned but users can't launch agent` | "The permissions are assigned but Agent Access hasn't been defined yet. Would you like me to guide you through enabling it in Setup → Agent Actions?" | Offer manual guidance (W-23242378) |
|
|
73
|
+
| `ECONNRESET` / `socket hang up` | "I hit a temporary network issue. Let me retry that step..." | Auto-retry once |
|
|
74
|
+
| `AiGenActionItem: No suggestions generated after 4 minutes` | "The test suggestion didn't generate within the expected time. This can happen in busy orgs. The setup is complete, but we couldn't verify the prompt. Would you like me to check again in a few minutes?" | Offer retry verification |
|
|
75
|
+
| `Field 'Risk__c' not found` | "I couldn't find a field named 'Risk__c' on the Opportunity object. Could you double-check the field API name?" | Ask for clarification |
|
|
76
|
+
| `Max 5 fields allowed, you selected 6` | "Pipeline Management supports up to 5 fields. You selected 6. Which one would you like to remove?" | Ask for user decision |
|
|
77
|
+
| `Field type incompatible: Rich Text Area` | "The field '[Field]' isn't compatible - it needs to be a plain Text field (not Rich Text Area) under 255 characters." | Ask which field to use instead |
|
|
78
|
+
| `OpptStageDescription missing for stage 'Prospecting'` | "I need stage descriptions before StageName suggestions can work. Would you like me to create them now?" | Offer to create descriptions |
|
|
79
|
+
| `OpptStageDescription already exists for stage 'Prospecting'` | "A stage description for 'Prospecting' already exists. Would you like me to update it or skip it?" | Ask for user decision |
|
|
80
|
+
|
|
81
|
+
## Example: Happy Path Flow
|
|
82
|
+
|
|
83
|
+
**User:** "Set up Pipeline Management for NextStep and StageName"
|
|
84
|
+
|
|
85
|
+
**Agent:**
|
|
86
|
+
```text
|
|
87
|
+
Let me check if your org is licensed for Pipeline Management... (this takes ~30 seconds)
|
|
88
|
+
[background: setup-all.sh --check-license]
|
|
89
|
+
|
|
90
|
+
✓ Your org is ready. A few quick questions:
|
|
91
|
+
- Which data sources should inform the agent? (Notes, Emails, Calls)
|
|
92
|
+
- Should the agent update fields automatically or suggest for review?
|
|
93
|
+
- Would you like to customize the NextStep prompt instructions?
|
|
94
|
+
|
|
95
|
+
Setting up the platform and creating the agent... (this takes ~3 minutes)
|
|
96
|
+
[background: setup-all.sh --fields NextStep,StageName --through-phase prompts]
|
|
97
|
+
|
|
98
|
+
✓ The platform and agent are ready. Let me show you sample suggestions for each field...
|
|
99
|
+
|
|
100
|
+
Testing NextStep...
|
|
101
|
+
[background: add-field-suggestion.sh --verify-with-note]
|
|
102
|
+
The AI suggested: "Schedule follow-up call to discuss pricing"
|
|
103
|
+
Reasoning: "Based on the note mentioning unresolved pricing questions"
|
|
104
|
+
Does this look good, or would you like me to adjust the instructions?
|
|
105
|
+
|
|
106
|
+
Testing StageName...
|
|
107
|
+
The AI suggested: "Qualification"
|
|
108
|
+
Reasoning: "Meeting notes indicate initial interest but needs budget verification"
|
|
109
|
+
Does this look good?
|
|
110
|
+
|
|
111
|
+
Great! Activating the automation... (this takes ~2 minutes)
|
|
112
|
+
[background: setup-all.sh --from-phase flow]
|
|
113
|
+
|
|
114
|
+
✓ Pipeline Management is now active! The agent will analyze your opportunities daily and suggest updates for NextStep and StageName. You can view suggestions in the Pipeline Inspection tab.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**What the user NEVER sees:**
|
|
118
|
+
- `=== Phase 1.5 ===`
|
|
119
|
+
- `curl -X POST https://...`
|
|
120
|
+
- `<?xml version="1.0"?><soapenv:Envelope>...`
|
|
121
|
+
- `jq -r '.result.records[0].Id'`
|
|
122
|
+
- Exit codes, script paths, phase numbers
|
|
123
|
+
|
|
124
|
+
## Example: Error Recovery Flow
|
|
125
|
+
|
|
126
|
+
**Scenario:** Missing prerequisite detected
|
|
127
|
+
|
|
128
|
+
**Agent:**
|
|
129
|
+
```text
|
|
130
|
+
Setting up the platform... (this takes ~3 minutes)
|
|
131
|
+
[background: setup-all.sh --through-phase prompts]
|
|
132
|
+
[exits non-zero, parse output finds: "OpportunityTeamMember not accessible"]
|
|
133
|
+
|
|
134
|
+
⚠ I need to enable Opportunity Teams before deploying the automation. Let me do that now...
|
|
135
|
+
[auto-fixes, retries]
|
|
136
|
+
|
|
137
|
+
✓ Done. Continuing with setup...
|
|
138
|
+
[continues normally]
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Scenario:** License blocker
|
|
142
|
+
|
|
143
|
+
**Agent:**
|
|
144
|
+
```text
|
|
145
|
+
Let me check if your org is licensed...
|
|
146
|
+
[background: --check-license]
|
|
147
|
+
[exits 1, parse finds: "SalesDealAgentSettings not found"]
|
|
148
|
+
|
|
149
|
+
⚠ Your org doesn't have the Pipeline Management license. You'll need Agentforce for Sales or Agentforce 1 Sales Edition before we can proceed.
|
|
150
|
+
|
|
151
|
+
[STOPS - no clarifying questions, no further changes]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Scenario:** Verification timeout
|
|
155
|
+
|
|
156
|
+
**Agent:**
|
|
157
|
+
```text
|
|
158
|
+
Testing NextStep...
|
|
159
|
+
[background: add-field-suggestion.sh --verify-with-note]
|
|
160
|
+
[exits 0 but output says "No suggestions generated after 4 minutes"]
|
|
161
|
+
|
|
162
|
+
⚠ The test suggestion didn't generate within the expected time. This can happen when the org is busy.
|
|
163
|
+
|
|
164
|
+
The NextStep prompt is configured and will work in production. Would you like me to:
|
|
165
|
+
1. Try the test again (may take another 4 minutes)
|
|
166
|
+
2. Proceed to activating the automation - the configuration is complete
|
|
167
|
+
3. Skip NextStep for now
|
|
168
|
+
|
|
169
|
+
[User chooses, continue accordingly]
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Example: Partial Failure Handling
|
|
173
|
+
|
|
174
|
+
**Scenario:** Some fields work, one fails
|
|
175
|
+
|
|
176
|
+
**Agent:**
|
|
177
|
+
```text
|
|
178
|
+
Testing your three fields...
|
|
179
|
+
|
|
180
|
+
✓ NextStep suggestions are working
|
|
181
|
+
Suggested: "Schedule pricing call"
|
|
182
|
+
|
|
183
|
+
⚠ StageName suggestions couldn't be tested - no stage descriptions found
|
|
184
|
+
|
|
185
|
+
✓ Risk__c suggestions are working
|
|
186
|
+
Suggested: "Low - strong executive sponsorship"
|
|
187
|
+
|
|
188
|
+
Two out of three fields are ready. For StageName to work, I need to create opportunity stage descriptions. Would you like me to:
|
|
189
|
+
1. Create stage descriptions now (takes ~1 minute) and test StageName
|
|
190
|
+
2. Continue without StageName - you can add it later
|
|
191
|
+
3. Stop here so you can investigate
|
|
192
|
+
|
|
193
|
+
[User chooses, handle accordingly]
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## When to Show Technical Details
|
|
197
|
+
|
|
198
|
+
**Default mode (no debugging requested):**
|
|
199
|
+
- ✅ Show: Friendly progress, checkmarks, what's happening now
|
|
200
|
+
- ❌ Hide: Commands, SOAP, curl, jq, phase numbers, exit codes, script paths
|
|
201
|
+
|
|
202
|
+
**Debug mode (user says "show me the error" / "debug this" / "what went wrong"):**
|
|
203
|
+
- ✅ Show: Last 20-30 lines of script output
|
|
204
|
+
- ✅ Show: The exact command that failed
|
|
205
|
+
- ✅ Show: Suggest next debugging steps
|
|
206
|
+
- ✅ Offer: "Would you like me to keep showing technical details, or switch back to simplified messages?"
|
|
207
|
+
|
|
208
|
+
## Progressive Error Recovery Pattern
|
|
209
|
+
|
|
210
|
+
```text
|
|
211
|
+
Step N starts
|
|
212
|
+
↓
|
|
213
|
+
Exits non-zero
|
|
214
|
+
↓
|
|
215
|
+
Parse error output
|
|
216
|
+
↓
|
|
217
|
+
Is it auto-recoverable? (missing prerequisite, transient network error)
|
|
218
|
+
├─ YES → Explain what's missing → Fix it → Retry Step N → Continue
|
|
219
|
+
└─ NO → Is it a known blocker? (license, permission, field not found)
|
|
220
|
+
├─ YES → Friendly explanation → Offer choices (retry/manual/stop)
|
|
221
|
+
└─ NO → "I hit an issue: [brief description]. Would you like me to retry or show you the technical details?"
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Monitoring Long-Running Background Tasks
|
|
225
|
+
|
|
226
|
+
After starting a background command:
|
|
227
|
+
|
|
228
|
+
```javascript
|
|
229
|
+
// 1. Immediately tell user what's happening and how long
|
|
230
|
+
"Setting up the platform and agent... (this takes ~3 minutes)"
|
|
231
|
+
|
|
232
|
+
// 2. If user asks "is it done?" while waiting
|
|
233
|
+
"Still working on it... platform setup usually takes 2-4 minutes."
|
|
234
|
+
|
|
235
|
+
// 3. When notified of completion, immediately respond
|
|
236
|
+
// DON'T make them wait for your next message
|
|
237
|
+
if (exit_code === 0) {
|
|
238
|
+
"✓ [What completed successfully]"
|
|
239
|
+
} else {
|
|
240
|
+
parse_and_translate_error()
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Tune-Loop Conversational Pattern
|
|
245
|
+
|
|
246
|
+
The interactive prompt verification loop should feel like a conversation, not flag documentation:
|
|
247
|
+
|
|
248
|
+
**Good:**
|
|
249
|
+
```text
|
|
250
|
+
Let me generate a sample suggestion for NextStep...
|
|
251
|
+
The AI suggested: "Schedule pricing call"
|
|
252
|
+
Reasoning: "Note mentions unresolved pricing questions"
|
|
253
|
+
Does this look good, or would you like me to adjust how the AI thinks about this field?
|
|
254
|
+
|
|
255
|
+
User: Make it focus more on executive engagement
|
|
256
|
+
Agent: Got it. Let me regenerate with that focus...
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Bad:**
|
|
260
|
+
```text
|
|
261
|
+
Running: bash add-field-suggestion.sh org NextStep --verify-with-note \
|
|
262
|
+
--field-goal "NextStep:Analyze meeting notes..." \
|
|
263
|
+
--field-instruction "NextStep:Extract..."
|
|
264
|
+
|
|
265
|
+
If you want to customize, pass --field-goal and --field-instruction flags.
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## Complete Step-by-Step Narration
|
|
269
|
+
|
|
270
|
+
> **Steps are the agent's internal map, not the user's view.** SKILL.md breaks each call into numbered Steps (Call 1 = Steps 1–3, Call 2 = Steps 4–5) so *you* know what the script is doing. The user should see **one friendly progress line per call** (e.g. "Setting up the platform and agent...") plus the tune-loop, NOT a Step 1 / Step 2 / Step 3 breakdown. Narrate a call as a single continuous action; surface the internal Steps only when one fails and you need to explain what specifically broke.
|
|
271
|
+
|
|
272
|
+
### Step 0: License Check (30 sec)
|
|
273
|
+
|
|
274
|
+
**Start:**
|
|
275
|
+
```text
|
|
276
|
+
Let me first check if your org is licensed for Pipeline Management...
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Success (exit 0):**
|
|
280
|
+
```text
|
|
281
|
+
✓ Your org is ready. Now let me ask you a few questions about how you'd like it configured...
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**Failure (exit 1):**
|
|
285
|
+
```text
|
|
286
|
+
⚠ I found an issue: [parse error message into friendly blocker]
|
|
287
|
+
You'll need [what they need] before we can proceed.
|
|
288
|
+
[STOP - ask no questions, make no changes]
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Call 1: Setup Platform & Prompts (2-4 min)
|
|
292
|
+
|
|
293
|
+
**Start:**
|
|
294
|
+
```text
|
|
295
|
+
Setting up the platform and creating the agent... (this takes ~3 minutes)
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
**Success (exit 0):**
|
|
299
|
+
```text
|
|
300
|
+
✓ The platform and agent are ready. Now let me show you a sample suggestion for each field...
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
**Failure (exit non-zero):**
|
|
304
|
+
- Parse last 30 lines of output
|
|
305
|
+
- If missing prerequisite: "I need to enable [X]. Let me do that now..." → auto-retry
|
|
306
|
+
- If license/permission: Explain clearly what's needed
|
|
307
|
+
- If transient (ECONNRESET): "I hit a network issue. Let me retry..." → auto-retry once
|
|
308
|
+
- If unknown: "Setup hit an issue: [brief]. Would you like me to retry or investigate?"
|
|
309
|
+
|
|
310
|
+
### Tune-Loop: Per-Field Verification (1-4 min each)
|
|
311
|
+
|
|
312
|
+
**Start:**
|
|
313
|
+
```text
|
|
314
|
+
Let me generate a sample suggestion for [FieldName]...
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
**Success (exit 0, has "Suggested:"):**
|
|
318
|
+
```text
|
|
319
|
+
The AI suggested: "[value]"
|
|
320
|
+
Reasoning: "[reasoning]"
|
|
321
|
+
Does this look good, or would you like me to adjust the instructions?
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
**Timeout (exit 0, "No suggestions generated"):**
|
|
325
|
+
```text
|
|
326
|
+
⚠ The test suggestion didn't generate in time. This can happen in busy orgs.
|
|
327
|
+
The [Field] prompt is configured and will work in production.
|
|
328
|
+
Would you like me to: (1) Try again (2) Proceed anyway (3) Skip this field?
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
**Error (exit non-zero):**
|
|
332
|
+
- Parse error type
|
|
333
|
+
- Field not found: "I couldn't find '[Field]'. Could you verify the API name?"
|
|
334
|
+
- Field type error: "The field isn't compatible - it needs to be plain Text under 255 chars."
|
|
335
|
+
- 5-field cap: "You've reached the 5-field limit. Which field should I replace?"
|
|
336
|
+
- Other: "I hit an issue: [friendly]. Should I skip this field or troubleshoot?"
|
|
337
|
+
|
|
338
|
+
### Call 2: Activate Flow (1-2 min)
|
|
339
|
+
|
|
340
|
+
**Start:**
|
|
341
|
+
```text
|
|
342
|
+
Great! Activating the automation... (this takes ~2 minutes)
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
**Success (exit 0):**
|
|
346
|
+
```text
|
|
347
|
+
✓ Pipeline Management is now active! The agent will analyze your opportunities daily and suggest updates for [fields]. View suggestions in the Pipeline Inspection tab.
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
**Failure (exit non-zero):**
|
|
351
|
+
- Parse error type
|
|
352
|
+
- Flow activation: "The automation is built but couldn't activate. [reason]. Let me try to fix it..."
|
|
353
|
+
- Agent activation: "Almost complete, but activation failed. Would you like me to retry or guide you through manual activation?"
|
|
354
|
+
- PSG assignment: "Everything is set up, but I couldn't assign permissions. You can assign 'Sales Management User' manually in Setup → Users."
|
|
355
|
+
- Other: "[Friendly description]. Would you like me to retry or try a different approach?"
|