Validation History: sf-ai-agentscript
This file tracks the validation history of the sf-ai-agentscript skill. Validation agents are deployed to a test org to verify that documented patterns still work with current Salesforce releases.
Latest Validation
| Status |
Date |
Version |
Agents Deployed |
Test Org |
| ✅ PASS |
2026-02-14 |
v1.9.0 |
16/16 |
AgentforceTesting |
Validation Agent Results
Tier 1: Original Agents (13) — Re-validated
| Agent |
Pattern Tested |
Publish |
Duration |
Notes |
| Val_Minimal_Syntax |
Core block structure |
✅ PASS |
16s |
config, system, start_agent, topic blocks |
| Val_Arithmetic_Ops |
+/- operators |
✅ PASS |
11s |
Addition and subtraction working |
| Val_Comparison_Ops |
Comparison operators |
✅ PASS |
12s |
==, !=, <, <=, >, >=, and, or, not |
| Val_Variable_Scopes |
@variables namespace |
✅ PASS |
9s |
mutable string/number/boolean |
| Val_Topic_Transitions |
@utils.transition |
✅ PASS |
12s |
Permanent handoffs between topics |
| Val_Latch_Pattern |
Boolean re-entry |
✅ PASS |
14s |
Latch variable for topic re-entry |
| Val_Loop_Guard |
Iteration protection |
✅ PASS |
12s |
Counter-based loop guard |
| Val_Interpolation |
Variable injection |
✅ PASS |
9s |
{!@variables.x} in strings |
| Val_Action_Properties |
Action property validity |
✅ PASS |
13s |
NEGATIVE: confirms invalid properties don't work |
| Val_Before_Reasoning |
before_reasoning lifecycle |
✅ PASS |
9s |
Direct content under block (no instructions: wrapper) |
| Val_After_Reasoning |
after_reasoning lifecycle |
✅ PASS |
9s |
Direct content under block (no instructions: wrapper) |
| Val_Label_Property |
label: property |
✅ PASS |
9s |
NEGATIVE: confirms label is NOT valid anywhere |
| Val_Always_Expect_Input |
always_expect_input |
✅ PASS |
11s |
NEGATIVE: confirms not implemented |
Tier 2: New Agents (3) — v1.9.0 Patterns
| Agent |
Pattern Tested |
Publish |
Duration |
Notes |
| Val_Else_Nested_If |
else: + nested if |
✅ PASS |
9s |
NEGATIVE: else: with nested if does NOT compile (Approach 3 INVALID) |
| Val_Step_Guard |
Step counter re-entry guard |
✅ PASS |
14s |
Step variable guards topic selector re-routing |
| Val_Multiple_Available_When |
Multiple available when clauses |
✅ PASS |
14s |
POSITIVE: Multiple available when on same action IS valid |
Total Duration: ~183s (16 agents)
TDD Findings (v1.9.0)
Finding 1: else: + nested if does NOT compile ❌
- Pattern:
else: block containing a nested if statement (SKILL.md Approach 3)
- Error:
Unexpected 'if' at the nested if line, cascading Unexpected '@utils', Missing colon, Invalid syntax
- Impact: SKILL.md Approach 3 must be removed or marked INVALID
- Workaround: Use compound conditions (
if A and B:) or sequential ifs
- Note: Local LSP validator PASSES this pattern — only server-side compiler rejects it
Finding 2: <> not-equal operator does NOT compile ❌
- Pattern:
if @variables.x <> "value": using <> as not-equal
- Error:
Unexpected '>' 44:29 — parser does not recognize <> as a token
- Impact: Remove
<> from SKILL.md operator table; only != is valid
- Workaround: Use
!= operator (already validated in Val_Comparison_Ops)
Finding 3: Multiple available when clauses ARE valid ✅
- Pattern: Two
available when clauses on the same action
- Result: Compiles and publishes successfully
- Impact: SKILL.md constraint "One
available when per action" is WRONG — remove it
- Impact: Common Issues entry "Duplicate 'available when' clause" is WRONG — remove it
- Impact: multi-step-workflow template pattern is CORRECT as-is
Patterns Validated
Each validation agent tests specific patterns documented in SKILL.md:
Val_Minimal_Syntax → Core Syntax
config block with agent_name, agent_label, default_agent_user
system block with messages and instructions
start_agent block with reasoning and actions
topic block with description and reasoning
Val_Arithmetic_Ops → Expression Operators
- Addition:
@variables.counter + 1
- Subtraction:
@variables.counter - 1
- Note:
*, /, % are NOT supported
Val_Comparison_Ops → Expression Operators
- Equality:
==, not-equal: !=
- Comparisons:
<, <=, >, >=
- Logical:
and, or, not
- Note:
<> is NOT valid (see Finding 2)
Val_Variable_Scopes → Variable Namespaces
mutable string with default value
mutable number with default value
mutable boolean with default value
set @variables.x = value assignment
Val_Topic_Transitions → Topic Transitions
@utils.transition to @topic.X (permanent handoff)
- Multi-step topic chains
Val_Latch_Pattern → Production Gotchas
- Boolean flag initialization
- Setting latch on entry
- Checking latch in topic selector
- Clearing latch on completion
Val_Loop_Guard → Production Gotchas
- Iteration counter pattern
available when guard clause
- Exit condition on max iterations
Val_Interpolation → Instruction Syntax
- Basic interpolation:
{!@variables.x}
- Multiple variables in string
- Conditional interpolation:
{!value if condition else alt}
Val_Action_Properties → Action Properties (NEGATIVE)
- CONFIRMED NOT VALID: require_user_confirmation, include_in_progress_indicator, output_instructions, progress_indicator_message (on transitions)
- CONFIRMED VALID: description only (on @utils.transition)
Val_Before_Reasoning → Lifecycle Hooks
- Content directly under
before_reasoning: block
- NO
instructions: wrapper required
Val_After_Reasoning → Lifecycle Hooks
- Content directly under
after_reasoning: block
- NO
instructions: wrapper required
Val_Label_Property → Reserved Properties (NEGATIVE)
- CONFIRMED NOT VALID:
label: property on topics and actions
Val_Always_Expect_Input → Unimplemented Features (NEGATIVE)
- CONFIRMED NOT VALID:
always_expect_input: property
Val_Else_Nested_If → if/else Nesting (NEGATIVE)
- CONFIRMED NOT VALID:
else: block with nested if statement
- CONFIRMED VALID: Compound conditions and sequential ifs as alternatives
Val_Step_Guard → Topic Re-Entry Protection
- Step counter in
start_agent guards topic selector
workflow_active boolean flag pattern
available when on step completion
Val_Multiple_Available_When → Action Guards
- CONFIRMED VALID: Multiple
available when clauses on same action
- DISPROVES: "One available when per action" constraint in SKILL.md
Validation Command
# Navigate to validation directory
cd sf-ai-agentscript/validation
# Deploy metadata first
sf project deploy start \
--source-dir validation-agents/force-app/main/default/aiAuthoringBundles \
--target-org AgentforceTesting --json
# Publish each agent
for agent in Val_Minimal_Syntax Val_Arithmetic_Ops Val_Comparison_Ops Val_Variable_Scopes \
Val_Topic_Transitions Val_Latch_Pattern Val_Loop_Guard Val_Interpolation \
Val_Action_Properties Val_Before_Reasoning Val_After_Reasoning \
Val_Label_Property Val_Always_Expect_Input Val_Else_Nested_If \
Val_Step_Guard Val_Multiple_Available_When; do
sf agent publish authoring-bundle --api-name "$agent" --target-org AgentforceTesting --json
done
Test Org Configuration
| Property |
Value |
| Target Org Alias |
AgentforceTesting |
| Einstein Agent User |
multistepworkflows@00dak00000gdhgd1068670160.ext |
| API Version |
65.0 |
| Instance URL |
dak00000gdhgdeay-dev-ed.develop.my.salesforce.com |
History
| Date |
Version |
Status |
Passed |
Failed |
Notes |
| 2026-02-14 |
v1.9.0 |
✅ PASS |
16/16 |
0 |
3 new agents + re-validation against AgentforceTesting. Found: else+nested-if INVALID, <> INVALID, multiple available-when VALID |
| 2026-01-20 |
v1.1.0 |
✅ PASS |
8/8 |
0 |
Initial validation framework implementation (R6-Agentforce-SandboxFull) |
Next Validation Due
2026-03-16 (30 days from last validation)
Troubleshooting
If Validation Fails
- Check the error message - Salesforce will indicate what syntax changed
- Update SKILL.md - Document the new constraint or syntax requirement
- Fix the validation agent - Update to use correct syntax
- Re-run validation - Ensure all agents pass again
- Update this file - Log the issue and resolution in History
Common Issues
| Issue |
Cause |
Resolution |
Nonexistent flag: --source-dir |
CLI version change |
Use sf agent publish authoring-bundle --api-name instead |
Unknown error on publish |
Usually successful |
Check full JSON output for actual status |
Default agent user not found |
Wrong org or user inactive |
Query target org for Einstein Agent User |
AgentCompilationError on deploy |
Server-side compiler stricter than LSP |
Fix agent, redeploy. Note: LSP may pass patterns the server rejects |
Unexpected 'if' inside else: |
else: + nested if not valid |
Use compound conditions or sequential ifs |
Unexpected '>' in condition |
<> not-equal not valid |
Use != instead |
jq parse errors on --json output |
sf CLI emits control chars |
Pipe through tr -d '\000-\037' before jq |
1---2name: validation-history-sf-ai-agentscript-23description: This file tracks the validation history of the sf-ai-agentscript skill. Validation agents are deployed to a test org to verify that documented patterns still work with current Salesforce releases.4---5# Validation History: sf-ai-agentscript67This file tracks the validation history of the sf-ai-agentscript skill. Validation agents are deployed to a test org to verify that documented patterns still work with current Salesforce releases.89## Latest Validation1011| Status | Date | Version | Agents Deployed | Test Org |12|--------|------|---------|-----------------|----------|13| ✅ PASS | 2026-02-14 | v1.9.0 | 16/16 | AgentforceTesting |1415## Validation Agent Results1617### Tier 1: Original Agents (13) — Re-validated1819| Agent | Pattern Tested | Publish | Duration | Notes |20|-------|----------------|---------|----------|-------|21| Val_Minimal_Syntax | Core block structure | ✅ PASS | 16s | config, system, start_agent, topic blocks |22| Val_Arithmetic_Ops | +/- operators | ✅ PASS | 11s | Addition and subtraction working |23| Val_Comparison_Ops | Comparison operators | ✅ PASS | 12s | ==, !=, <, <=, >, >=, and, or, not |24| Val_Variable_Scopes | @variables namespace | ✅ PASS | 9s | mutable string/number/boolean |25| Val_Topic_Transitions | @utils.transition | ✅ PASS | 12s | Permanent handoffs between topics |26| Val_Latch_Pattern | Boolean re-entry | ✅ PASS | 14s | Latch variable for topic re-entry |27| Val_Loop_Guard | Iteration protection | ✅ PASS | 12s | Counter-based loop guard |28| Val_Interpolation | Variable injection | ✅ PASS | 9s | {!@variables.x} in strings |29| Val_Action_Properties | Action property validity | ✅ PASS | 13s | NEGATIVE: confirms invalid properties don't work |30| Val_Before_Reasoning | before_reasoning lifecycle | ✅ PASS | 9s | Direct content under block (no instructions: wrapper) |31| Val_After_Reasoning | after_reasoning lifecycle | ✅ PASS | 9s | Direct content under block (no instructions: wrapper) |32| Val_Label_Property | label: property | ✅ PASS | 9s | NEGATIVE: confirms label is NOT valid anywhere |33| Val_Always_Expect_Input | always_expect_input | ✅ PASS | 11s | NEGATIVE: confirms not implemented |3435### Tier 2: New Agents (3) — v1.9.0 Patterns3637| Agent | Pattern Tested | Publish | Duration | Notes |38|-------|----------------|---------|----------|-------|39| Val_Else_Nested_If | else: + nested if | ✅ PASS | 9s | NEGATIVE: else: with nested if does NOT compile (Approach 3 INVALID) |40| Val_Step_Guard | Step counter re-entry guard | ✅ PASS | 14s | Step variable guards topic selector re-routing |41| Val_Multiple_Available_When | Multiple available when clauses | ✅ PASS | 14s | POSITIVE: Multiple available when on same action IS valid |4243**Total Duration**: ~183s (16 agents)4445## TDD Findings (v1.9.0)4647### Finding 1: `else:` + nested `if` does NOT compile ❌4849- **Pattern**: `else:` block containing a nested `if` statement (SKILL.md Approach 3)50- **Error**: `Unexpected 'if'` at the nested if line, cascading `Unexpected '@utils'`, `Missing colon`, `Invalid syntax`51- **Impact**: SKILL.md Approach 3 must be removed or marked INVALID52- **Workaround**: Use compound conditions (`if A and B:`) or sequential ifs53- **Note**: Local LSP validator PASSES this pattern — only server-side compiler rejects it5455### Finding 2: `<>` not-equal operator does NOT compile ❌5657- **Pattern**: `if @variables.x <> "value":` using `<>` as not-equal58- **Error**: `Unexpected '>' 44:29` — parser does not recognize `<>` as a token59- **Impact**: Remove `<>` from SKILL.md operator table; only `!=` is valid60- **Workaround**: Use `!=` operator (already validated in Val_Comparison_Ops)6162### Finding 3: Multiple `available when` clauses ARE valid ✅6364- **Pattern**: Two `available when` clauses on the same action65- **Result**: Compiles and publishes successfully66- **Impact**: SKILL.md constraint "One `available when` per action" is WRONG — remove it67- **Impact**: Common Issues entry "Duplicate 'available when' clause" is WRONG — remove it68- **Impact**: multi-step-workflow template pattern is CORRECT as-is6970## Patterns Validated7172Each validation agent tests specific patterns documented in SKILL.md:73741. **Val_Minimal_Syntax** → Core Syntax75 - `config` block with agent_name, agent_label, default_agent_user76 - `system` block with messages and instructions77 - `start_agent` block with reasoning and actions78 - `topic` block with description and reasoning79802. **Val_Arithmetic_Ops** → Expression Operators81 - Addition: `@variables.counter + 1`82 - Subtraction: `@variables.counter - 1`83 - Note: `*`, `/`, `%` are NOT supported84853. **Val_Comparison_Ops** → Expression Operators86 - Equality: `==`, not-equal: `!=`87 - Comparisons: `<`, `<=`, `>`, `>=`88 - Logical: `and`, `or`, `not`89 - Note: `<>` is NOT valid (see Finding 2)90914. **Val_Variable_Scopes** → Variable Namespaces92 - `mutable string` with default value93 - `mutable number` with default value94 - `mutable boolean` with default value95 - `set @variables.x = value` assignment96975. **Val_Topic_Transitions** → Topic Transitions98 - `@utils.transition to @topic.X` (permanent handoff)99 - Multi-step topic chains1001016. **Val_Latch_Pattern** → Production Gotchas102 - Boolean flag initialization103 - Setting latch on entry104 - Checking latch in topic selector105 - Clearing latch on completion1061077. **Val_Loop_Guard** → Production Gotchas108 - Iteration counter pattern109 - `available when` guard clause110 - Exit condition on max iterations1111128. **Val_Interpolation** → Instruction Syntax113 - Basic interpolation: `{!@variables.x}`114 - Multiple variables in string115 - Conditional interpolation: `{!value if condition else alt}`1161179. **Val_Action_Properties** → Action Properties (NEGATIVE)118 - CONFIRMED NOT VALID: require_user_confirmation, include_in_progress_indicator, output_instructions, progress_indicator_message (on transitions)119 - CONFIRMED VALID: description only (on @utils.transition)12012110. **Val_Before_Reasoning** → Lifecycle Hooks122 - Content directly under `before_reasoning:` block123 - NO `instructions:` wrapper required12412511. **Val_After_Reasoning** → Lifecycle Hooks126 - Content directly under `after_reasoning:` block127 - NO `instructions:` wrapper required12812912. **Val_Label_Property** → Reserved Properties (NEGATIVE)130 - CONFIRMED NOT VALID: `label:` property on topics and actions13113213. **Val_Always_Expect_Input** → Unimplemented Features (NEGATIVE)133 - CONFIRMED NOT VALID: `always_expect_input:` property13413514. **Val_Else_Nested_If** → if/else Nesting (NEGATIVE)136 - CONFIRMED NOT VALID: `else:` block with nested `if` statement137 - CONFIRMED VALID: Compound conditions and sequential ifs as alternatives13813915. **Val_Step_Guard** → Topic Re-Entry Protection140 - Step counter in `start_agent` guards topic selector141 - `workflow_active` boolean flag pattern142 - `available when` on step completion14314416. **Val_Multiple_Available_When** → Action Guards145 - CONFIRMED VALID: Multiple `available when` clauses on same action146 - DISPROVES: "One available when per action" constraint in SKILL.md147148## Validation Command149150```bash151# Navigate to validation directory152cd sf-ai-agentscript/validation153154# Deploy metadata first155sf project deploy start \156 --source-dir validation-agents/force-app/main/default/aiAuthoringBundles \157 --target-org AgentforceTesting --json158159# Publish each agent160for agent in Val_Minimal_Syntax Val_Arithmetic_Ops Val_Comparison_Ops Val_Variable_Scopes \161 Val_Topic_Transitions Val_Latch_Pattern Val_Loop_Guard Val_Interpolation \162 Val_Action_Properties Val_Before_Reasoning Val_After_Reasoning \163 Val_Label_Property Val_Always_Expect_Input Val_Else_Nested_If \164 Val_Step_Guard Val_Multiple_Available_When; do165 sf agent publish authoring-bundle --api-name "$agent" --target-org AgentforceTesting --json166done167```168169## Test Org Configuration170171| Property | Value |172|----------|-------|173| **Target Org Alias** | `AgentforceTesting` |174| **Einstein Agent User** | `multistepworkflows@00dak00000gdhgd1068670160.ext` |175| **API Version** | 65.0 |176| **Instance URL** | `dak00000gdhgdeay-dev-ed.develop.my.salesforce.com` |177178## History179180| Date | Version | Status | Passed | Failed | Notes |181|------|---------|--------|--------|--------|-------|182| 2026-02-14 | v1.9.0 | ✅ PASS | 16/16 | 0 | 3 new agents + re-validation against AgentforceTesting. Found: else+nested-if INVALID, <> INVALID, multiple available-when VALID |183| 2026-01-20 | v1.1.0 | ✅ PASS | 8/8 | 0 | Initial validation framework implementation (R6-Agentforce-SandboxFull) |184185## Next Validation Due186187**2026-03-16** (30 days from last validation)188189---190191## Troubleshooting192193### If Validation Fails1941951. **Check the error message** - Salesforce will indicate what syntax changed1962. **Update SKILL.md** - Document the new constraint or syntax requirement1973. **Fix the validation agent** - Update to use correct syntax1984. **Re-run validation** - Ensure all agents pass again1995. **Update this file** - Log the issue and resolution in History200201### Common Issues202203| Issue | Cause | Resolution |204|-------|-------|------------|205| `Nonexistent flag: --source-dir` | CLI version change | Use `sf agent publish authoring-bundle --api-name` instead |206| `Unknown error` on publish | Usually successful | Check full JSON output for actual status |207| `Default agent user not found` | Wrong org or user inactive | Query target org for Einstein Agent User |208| `AgentCompilationError` on deploy | Server-side compiler stricter than LSP | Fix agent, redeploy. Note: LSP may pass patterns the server rejects |209| `Unexpected 'if'` inside else: | else: + nested if not valid | Use compound conditions or sequential ifs |210| `Unexpected '>'` in condition | `<>` not-equal not valid | Use `!=` instead |211| jq parse errors on `--json` output | sf CLI emits control chars | Pipe through `tr -d '\000-\037'` before jq |