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-17 |
v2.2.0 |
24/24 |
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 on @utils.transition (v2.2.0: IS valid on target-backed actions — see Val_Action_Meta_Props) |
| 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 — Tier 1+2 only)
Tier 3: Flow/Apex Integration Agents (6) — v2.1.0 Patterns
| Agent |
Pattern Tested |
Expected |
Actual |
Notes |
| Val_Apex_Bare_Output |
Bare @InvocableMethod output naming |
✅ PASS |
❌ FAIL |
NEGATIVE FINDING: bare List without @InvocableVariable wrappers is INCOMPATIBLE |
| Val_Datetime_IO |
datetime type in action I/O |
✅ PASS |
✅ PASS |
datetime maps to lightning__dateTimeStringType |
| Val_Name_Mismatch |
Wrong output name vs Apex field |
❌ FAIL |
❌ FAIL |
Expected: "invalid output 'wrong_name'" — confirmed exact-match required |
| Val_Partial_Output |
Subset of target outputs declared |
✅ PASS |
✅ PASS |
Can declare fewer outputs than the Apex class exposes |
| Val_No_Outputs |
Inputs-only action (no outputs block) |
❌ FAIL |
❌ FAIL |
Expected: "Internal Error" — outputs block specifically required |
| Val_Level1_Only |
Level 1 definition without Level 2 invocation |
✅ PASS |
✅ PASS |
Action definitions without @actions.X invocations are valid |
Apex Test Classes Deployed: BareOutputAction.cls (bare List return), DateTimeAction.cls (DateTime with @InvocableVariable wrappers)
Tier 4: Action Metadata Properties Agents (2) — v2.2.0 Patterns
| Agent |
Pattern Tested |
Expected |
Actual |
Notes |
| Val_Action_Meta_Props |
Action-level metadata: label (action+topic+I/O), require_user_confirmation, include_in_progress_indicator, progress_indicator_message |
✅ PASS |
✅ PASS |
All properties valid on target-backed actions (apex://TestApexAction) |
| Val_IO_Meta_Props |
I/O-level metadata: is_required, is_user_input, is_displayable, is_used_by_planner |
✅ PASS |
✅ PASS |
All I/O properties valid on target-backed actions (apex://TestApexAction) |
Root Cause of v1.3.0 False Negatives: Val_Action_Properties only tested properties on @utils.transition (utility actions without targets). These properties ARE valid on action definitions with target: (Level 1 actions). The skill incorrectly generalized "not valid on transitions" → "not valid anywhere."
TDD Findings (v2.2.0)
Finding 10: label: is valid on action definitions, topics, and I/O fields ✅
- Pattern:
label: property on topic block, action definition, input fields, and output fields
- Result: All compile and publish successfully on
apex://TestApexAction target
- Impact: Corrected "Features NOT Valid" table in SKILL.md → renamed to "Feature Validity by Context"
- Scope: Valid on target-backed actions; still NOT valid on
@utils.transition (Val_Action_Properties confirms)
Finding 11: require_user_confirmation, include_in_progress_indicator, progress_indicator_message valid on target-backed actions ✅
- Pattern: All three properties on an action definition with
target: "apex://TestApexAction"
- Result: Compile and publish successfully
- Impact: Updated Feature Validity table: valid on actions with targets, not on
@utils.transition
- Note:
require_user_confirmation compiles but runtime confirmation dialog does not trigger (Issue 6 still OPEN)
Finding 12: is_required and is_user_input valid as input metadata properties ✅
- Pattern:
is_required: True and is_user_input: True on action input definitions
- Result: Both compile and publish successfully
- Impact: Added Input Properties table to actions-reference.md; clarified reserved field names in SKILL.md
Finding 13: is_displayable and is_used_by_planner valid as output metadata properties ✅
- Pattern:
is_displayable: False and is_used_by_planner: True on action output definitions
- Result: Both compile and publish successfully
- Impact:
is_displayable confirmed as standard name for filter_from_agent (alias relationship documented)
TDD Findings (v2.1.0)
Finding 4: Bare @InvocableMethod is INCOMPATIBLE with Agent Script ❌
- Pattern: Apex class returning
List<String> directly (no @InvocableVariable wrapper classes)
- Rounds Tested: 3 iterations — input name
name (invalid), input name input (invalid), no inputs block (Internal Error)
- Root Cause: The framework requires
@InvocableVariable annotations to discover bindable parameter names. Without wrapper classes, no I/O name can be matched.
- Impact: Added "Bare @InvocableMethod Pattern (NOT Compatible)" warning to SKILL.md and actions-reference.md
- Rule: Always use
@InvocableVariable wrapper classes when targeting Apex from Agent Script
Finding 5: datetime type works in action I/O ✅
- Pattern:
startDateTime: datetime and endDateTime: datetime in action inputs/outputs targeting Apex DateTime params
- Result: Publishes successfully; maps to
lightning__dateTimeStringType in Lightning type system
- Impact: Added
datetime → lightning__dateTimeStringType to SKILL.md type mapping tables
Finding 6: I/O names must exactly match @InvocableVariable field names ❌
- Pattern: Output name
wrong_name when Apex class has @InvocableVariable public String outputText
- Error:
"invalid output 'wrong_name'" at server-side compilation
- Impact: Added I/O Name Matching Rules section to SKILL.md and actions-reference.md with exact-match table
Finding 7: Partial output declaration is valid ✅
- Pattern: Declaring only
outputText: string when Apex class also has inputText: string as output
- Result: Publishes successfully — subset of outputs is valid
- Impact: Added "Partial Output Pattern" documentation to SKILL.md
Finding 8: outputs: block specifically required (not just "I/O") ❌
- Pattern: Action with
inputs: block but no outputs: block
- Error:
"Internal Error, try again later" at server-side compilation
- Impact: Updated Issue 15 in known-issues.md —
outputs: block is specifically required. inputs: alone is NOT sufficient.
Finding 9: Level 1 without Level 2 is valid ✅
- Pattern: Action definition in topic
actions: block with target:, inputs:, outputs: but NO @actions.X invocation in reasoning.actions:
- Result: Publishes successfully — action definitions exist for the planner without explicit invocation
- Impact: Added "Level 1 Without Level 2 Is Valid" note to SKILL.md Two-Level Action System section
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 on @utils.transition (NEGATIVE)
- CONFIRMED NOT VALID on
@utils.transition: require_user_confirmation, include_in_progress_indicator, output_instructions, progress_indicator_message
- CONFIRMED VALID: description only (on @utils.transition)
- CORRECTED (v2.2.0): These properties ARE valid on action definitions with
target: — see Val_Action_Meta_Props (#23)
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 → label: on @utils.transition (NEGATIVE, scope-limited)
- CONFIRMED NOT VALID on
@utils.transition actions (v1.3.0)
- CORRECTED (v2.2.0):
label: IS valid on target-backed action definitions, topics, and I/O fields — see Val_Action_Meta_Props (#23)
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
Val_Apex_Bare_Output → Bare @InvocableMethod (NEGATIVE)
- CONFIRMED NOT COMPATIBLE: Bare
List<String> return without @InvocableVariable wrappers
- 3 rounds tested: input name
name (invalid), input (invalid), no inputs (Internal Error)
- Rule: Always use
@InvocableVariable wrapper classes for Agent Script actions
Val_Datetime_IO → DateTime Type in Action I/O
- CONFIRMED VALID:
datetime type in action inputs/outputs
- Maps to
lightning__dateTimeStringType in Lightning type system
- Apex target:
DateTimeAction.cls with DateTime wrapper params
Val_Name_Mismatch → I/O Name Matching (NEGATIVE)
- CONFIRMED: I/O names must exactly match
@InvocableVariable field names
- Output name
wrong_name vs Apex field outputText → "invalid output 'wrong_name'"
Val_Partial_Output → Partial Output Declaration
- CONFIRMED VALID: Declaring subset of target outputs is acceptable
- Declared
outputText only from TestApexAction (which has both input and output wrappers)
Val_No_Outputs → Inputs-Only Action (NEGATIVE)
- CONFIRMED:
outputs: block is specifically required for publish
- Action with
inputs: but no outputs: → "Internal Error, try again later"
- Validates Issue 15 nuance: outputs specifically required, not just "I/O"
Val_Level1_Only → Level 1 Without Level 2
- CONFIRMED VALID: Action definition in topic
actions: block without @actions.X in reasoning
- Level 1 definitions (target + I/O) without Level 2 invocations publish successfully
Val_Action_Meta_Props → Action Metadata Properties (POSITIVE)
- CONFIRMED VALID:
label: on action definitions, topics, and I/O fields
- CONFIRMED VALID:
require_user_confirmation: True on target-backed actions (runtime Issue 6)
- CONFIRMED VALID:
include_in_progress_indicator: True on target-backed actions
- CONFIRMED VALID:
progress_indicator_message: on target-backed actions (both flow:// and apex://)
- CORRECTS v1.3.0: Val_Action_Properties only tested @utils.transition (limited property support)
Val_IO_Meta_Props → I/O Metadata Properties (POSITIVE)
- CONFIRMED VALID:
is_required: True on action inputs
- CONFIRMED VALID:
is_user_input: True on action inputs (LLM extracts from conversation)
- CONFIRMED VALID:
is_displayable: False on action outputs (alias for filter_from_agent)
- CONFIRMED VALID:
is_used_by_planner: True on action outputs
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 \
Val_Apex_Bare_Output Val_Datetime_IO Val_Name_Mismatch \
Val_Partial_Output Val_No_Outputs Val_Level1_Only \
Val_Action_Meta_Props Val_IO_Meta_Props; 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-17 |
v2.2.0 |
✅ PASS |
24/24 |
0 |
2 new action metadata agents (Val_Action_Meta_Props, Val_IO_Meta_Props). Findings: label valid on actions/topics/I/O, require_user_confirmation/include_in_progress_indicator/progress_indicator_message valid on target-backed actions, is_required/is_user_input valid on inputs, is_displayable/is_used_by_planner valid on outputs. Root cause: v1.3.0 only tested @utils.transition |
| 2026-02-17 |
v2.1.0 |
✅ PASS |
22/22 |
0 |
6 new Flow/Apex integration agents. Findings: bare @InvocableMethod INCOMPATIBLE, datetime type WORKS, I/O names must exact-match, partial outputs VALID, outputs block REQUIRED, Level 1 without Level 2 VALID |
| 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-19 (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-agentscript3description: 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-17 | v2.2.0 | 24/24 | 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 on @utils.transition (v2.2.0: IS valid on target-backed actions — see Val_Action_Meta_Props) |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 — Tier 1+2 only)4445### Tier 3: Flow/Apex Integration Agents (6) — v2.1.0 Patterns4647| Agent | Pattern Tested | Expected | Actual | Notes |48|-------|----------------|----------|--------|-------|49| Val_Apex_Bare_Output | Bare @InvocableMethod output naming | ✅ PASS | ❌ FAIL | NEGATIVE FINDING: bare List<String> without @InvocableVariable wrappers is INCOMPATIBLE |50| Val_Datetime_IO | `datetime` type in action I/O | ✅ PASS | ✅ PASS | datetime maps to lightning__dateTimeStringType |51| Val_Name_Mismatch | Wrong output name vs Apex field | ❌ FAIL | ❌ FAIL | Expected: "invalid output 'wrong_name'" — confirmed exact-match required |52| Val_Partial_Output | Subset of target outputs declared | ✅ PASS | ✅ PASS | Can declare fewer outputs than the Apex class exposes |53| Val_No_Outputs | Inputs-only action (no outputs block) | ❌ FAIL | ❌ FAIL | Expected: "Internal Error" — outputs block specifically required |54| Val_Level1_Only | Level 1 definition without Level 2 invocation | ✅ PASS | ✅ PASS | Action definitions without @actions.X invocations are valid |5556**Apex Test Classes Deployed**: `BareOutputAction.cls` (bare List<String> return), `DateTimeAction.cls` (DateTime with @InvocableVariable wrappers)5758### Tier 4: Action Metadata Properties Agents (2) — v2.2.0 Patterns5960| Agent | Pattern Tested | Expected | Actual | Notes |61|-------|----------------|----------|--------|-------|62| Val_Action_Meta_Props | Action-level metadata: label (action+topic+I/O), require_user_confirmation, include_in_progress_indicator, progress_indicator_message | ✅ PASS | ✅ PASS | All properties valid on target-backed actions (apex://TestApexAction) |63| Val_IO_Meta_Props | I/O-level metadata: is_required, is_user_input, is_displayable, is_used_by_planner | ✅ PASS | ✅ PASS | All I/O properties valid on target-backed actions (apex://TestApexAction) |6465**Root Cause of v1.3.0 False Negatives**: `Val_Action_Properties` only tested properties on `@utils.transition` (utility actions without targets). These properties ARE valid on action definitions with `target:` (Level 1 actions). The skill incorrectly generalized "not valid on transitions" → "not valid anywhere."6667## TDD Findings (v2.2.0)6869### Finding 10: `label:` is valid on action definitions, topics, and I/O fields ✅7071- **Pattern**: `label:` property on topic block, action definition, input fields, and output fields72- **Result**: All compile and publish successfully on `apex://TestApexAction` target73- **Impact**: Corrected "Features NOT Valid" table in SKILL.md → renamed to "Feature Validity by Context"74- **Scope**: Valid on target-backed actions; still NOT valid on `@utils.transition` (Val_Action_Properties confirms)7576### Finding 11: `require_user_confirmation`, `include_in_progress_indicator`, `progress_indicator_message` valid on target-backed actions ✅7778- **Pattern**: All three properties on an action definition with `target: "apex://TestApexAction"`79- **Result**: Compile and publish successfully80- **Impact**: Updated Feature Validity table: valid on actions with targets, not on `@utils.transition`81- **Note**: `require_user_confirmation` compiles but runtime confirmation dialog does not trigger (Issue 6 still OPEN)8283### Finding 12: `is_required` and `is_user_input` valid as input metadata properties ✅8485- **Pattern**: `is_required: True` and `is_user_input: True` on action input definitions86- **Result**: Both compile and publish successfully87- **Impact**: Added Input Properties table to actions-reference.md; clarified reserved field names in SKILL.md8889### Finding 13: `is_displayable` and `is_used_by_planner` valid as output metadata properties ✅9091- **Pattern**: `is_displayable: False` and `is_used_by_planner: True` on action output definitions92- **Result**: Both compile and publish successfully93- **Impact**: `is_displayable` confirmed as standard name for `filter_from_agent` (alias relationship documented)9495## TDD Findings (v2.1.0)9697### Finding 4: Bare `@InvocableMethod` is INCOMPATIBLE with Agent Script ❌9899- **Pattern**: Apex class returning `List<String>` directly (no `@InvocableVariable` wrapper classes)100- **Rounds Tested**: 3 iterations — input name `name` (invalid), input name `input` (invalid), no inputs block (Internal Error)101- **Root Cause**: The framework requires `@InvocableVariable` annotations to discover bindable parameter names. Without wrapper classes, no I/O name can be matched.102- **Impact**: Added "Bare @InvocableMethod Pattern (NOT Compatible)" warning to SKILL.md and actions-reference.md103- **Rule**: Always use `@InvocableVariable` wrapper classes when targeting Apex from Agent Script104105### Finding 5: `datetime` type works in action I/O ✅106107- **Pattern**: `startDateTime: datetime` and `endDateTime: datetime` in action inputs/outputs targeting Apex `DateTime` params108- **Result**: Publishes successfully; maps to `lightning__dateTimeStringType` in Lightning type system109- **Impact**: Added `datetime` → `lightning__dateTimeStringType` to SKILL.md type mapping tables110111### Finding 6: I/O names must exactly match `@InvocableVariable` field names ❌112113- **Pattern**: Output name `wrong_name` when Apex class has `@InvocableVariable public String outputText`114- **Error**: `"invalid output 'wrong_name'"` at server-side compilation115- **Impact**: Added I/O Name Matching Rules section to SKILL.md and actions-reference.md with exact-match table116117### Finding 7: Partial output declaration is valid ✅118119- **Pattern**: Declaring only `outputText: string` when Apex class also has `inputText: string` as output120- **Result**: Publishes successfully — subset of outputs is valid121- **Impact**: Added "Partial Output Pattern" documentation to SKILL.md122123### Finding 8: `outputs:` block specifically required (not just "I/O") ❌124125- **Pattern**: Action with `inputs:` block but no `outputs:` block126- **Error**: `"Internal Error, try again later"` at server-side compilation127- **Impact**: Updated Issue 15 in known-issues.md — `outputs:` block is specifically required. `inputs:` alone is NOT sufficient.128129### Finding 9: Level 1 without Level 2 is valid ✅130131- **Pattern**: Action definition in topic `actions:` block with `target:`, `inputs:`, `outputs:` but NO `@actions.X` invocation in `reasoning.actions:`132- **Result**: Publishes successfully — action definitions exist for the planner without explicit invocation133- **Impact**: Added "Level 1 Without Level 2 Is Valid" note to SKILL.md Two-Level Action System section134135## TDD Findings (v1.9.0)136137### Finding 1: `else:` + nested `if` does NOT compile ❌138139- **Pattern**: `else:` block containing a nested `if` statement (SKILL.md Approach 3)140- **Error**: `Unexpected 'if'` at the nested if line, cascading `Unexpected '@utils'`, `Missing colon`, `Invalid syntax`141- **Impact**: SKILL.md Approach 3 must be removed or marked INVALID142- **Workaround**: Use compound conditions (`if A and B:`) or sequential ifs143- **Note**: Local LSP validator PASSES this pattern — only server-side compiler rejects it144145### Finding 2: `<>` not-equal operator does NOT compile ❌146147- **Pattern**: `if @variables.x <> "value":` using `<>` as not-equal148- **Error**: `Unexpected '>' 44:29` — parser does not recognize `<>` as a token149- **Impact**: Remove `<>` from SKILL.md operator table; only `!=` is valid150- **Workaround**: Use `!=` operator (already validated in Val_Comparison_Ops)151152### Finding 3: Multiple `available when` clauses ARE valid ✅153154- **Pattern**: Two `available when` clauses on the same action155- **Result**: Compiles and publishes successfully156- **Impact**: SKILL.md constraint "One `available when` per action" is WRONG — remove it157- **Impact**: Common Issues entry "Duplicate 'available when' clause" is WRONG — remove it158- **Impact**: multi-step-workflow template pattern is CORRECT as-is159160## Patterns Validated161162Each validation agent tests specific patterns documented in SKILL.md:1631641. **Val_Minimal_Syntax** → Core Syntax165 - `config` block with agent_name, agent_label, default_agent_user166 - `system` block with messages and instructions167 - `start_agent` block with reasoning and actions168 - `topic` block with description and reasoning1691702. **Val_Arithmetic_Ops** → Expression Operators171 - Addition: `@variables.counter + 1`172 - Subtraction: `@variables.counter - 1`173 - Note: `*`, `/`, `%` are NOT supported1741753. **Val_Comparison_Ops** → Expression Operators176 - Equality: `==`, not-equal: `!=`177 - Comparisons: `<`, `<=`, `>`, `>=`178 - Logical: `and`, `or`, `not`179 - Note: `<>` is NOT valid (see Finding 2)1801814. **Val_Variable_Scopes** → Variable Namespaces182 - `mutable string` with default value183 - `mutable number` with default value184 - `mutable boolean` with default value185 - `set @variables.x = value` assignment1861875. **Val_Topic_Transitions** → Topic Transitions188 - `@utils.transition to @topic.X` (permanent handoff)189 - Multi-step topic chains1901916. **Val_Latch_Pattern** → Production Gotchas192 - Boolean flag initialization193 - Setting latch on entry194 - Checking latch in topic selector195 - Clearing latch on completion1961977. **Val_Loop_Guard** → Production Gotchas198 - Iteration counter pattern199 - `available when` guard clause200 - Exit condition on max iterations2012028. **Val_Interpolation** → Instruction Syntax203 - Basic interpolation: `{!@variables.x}`204 - Multiple variables in string205 - Conditional interpolation: `{!value if condition else alt}`2062079. **Val_Action_Properties** → Action Properties on @utils.transition (NEGATIVE)208 - CONFIRMED NOT VALID on `@utils.transition`: require_user_confirmation, include_in_progress_indicator, output_instructions, progress_indicator_message209 - CONFIRMED VALID: description only (on @utils.transition)210 - **CORRECTED (v2.2.0)**: These properties ARE valid on action definitions with `target:` — see Val_Action_Meta_Props (#23)21121210. **Val_Before_Reasoning** → Lifecycle Hooks213 - Content directly under `before_reasoning:` block214 - NO `instructions:` wrapper required21521611. **Val_After_Reasoning** → Lifecycle Hooks217 - Content directly under `after_reasoning:` block218 - NO `instructions:` wrapper required21922012. **Val_Label_Property** → label: on @utils.transition (NEGATIVE, scope-limited)221 - CONFIRMED NOT VALID on `@utils.transition` actions (v1.3.0)222 - **CORRECTED (v2.2.0)**: `label:` IS valid on target-backed action definitions, topics, and I/O fields — see Val_Action_Meta_Props (#23)22322413. **Val_Always_Expect_Input** → Unimplemented Features (NEGATIVE)225 - CONFIRMED NOT VALID: `always_expect_input:` property22622714. **Val_Else_Nested_If** → if/else Nesting (NEGATIVE)228 - CONFIRMED NOT VALID: `else:` block with nested `if` statement229 - CONFIRMED VALID: Compound conditions and sequential ifs as alternatives23023115. **Val_Step_Guard** → Topic Re-Entry Protection232 - Step counter in `start_agent` guards topic selector233 - `workflow_active` boolean flag pattern234 - `available when` on step completion23523616. **Val_Multiple_Available_When** → Action Guards237 - CONFIRMED VALID: Multiple `available when` clauses on same action238 - DISPROVES: "One available when per action" constraint in SKILL.md23924017. **Val_Apex_Bare_Output** → Bare @InvocableMethod (NEGATIVE)241 - CONFIRMED NOT COMPATIBLE: Bare `List<String>` return without `@InvocableVariable` wrappers242 - 3 rounds tested: input name `name` (invalid), `input` (invalid), no inputs (Internal Error)243 - Rule: Always use `@InvocableVariable` wrapper classes for Agent Script actions24424518. **Val_Datetime_IO** → DateTime Type in Action I/O246 - CONFIRMED VALID: `datetime` type in action inputs/outputs247 - Maps to `lightning__dateTimeStringType` in Lightning type system248 - Apex target: `DateTimeAction.cls` with `DateTime` wrapper params24925019. **Val_Name_Mismatch** → I/O Name Matching (NEGATIVE)251 - CONFIRMED: I/O names must exactly match `@InvocableVariable` field names252 - Output name `wrong_name` vs Apex field `outputText` → `"invalid output 'wrong_name'"`25325420. **Val_Partial_Output** → Partial Output Declaration255 - CONFIRMED VALID: Declaring subset of target outputs is acceptable256 - Declared `outputText` only from `TestApexAction` (which has both input and output wrappers)25725821. **Val_No_Outputs** → Inputs-Only Action (NEGATIVE)259 - CONFIRMED: `outputs:` block is specifically required for publish260 - Action with `inputs:` but no `outputs:` → `"Internal Error, try again later"`261 - Validates Issue 15 nuance: outputs specifically required, not just "I/O"26226322. **Val_Level1_Only** → Level 1 Without Level 2264 - CONFIRMED VALID: Action definition in topic `actions:` block without `@actions.X` in reasoning265 - Level 1 definitions (target + I/O) without Level 2 invocations publish successfully26626723. **Val_Action_Meta_Props** → Action Metadata Properties (POSITIVE)268 - CONFIRMED VALID: `label:` on action definitions, topics, and I/O fields269 - CONFIRMED VALID: `require_user_confirmation: True` on target-backed actions (runtime Issue 6)270 - CONFIRMED VALID: `include_in_progress_indicator: True` on target-backed actions271 - CONFIRMED VALID: `progress_indicator_message:` on target-backed actions (both flow:// and apex://)272 - CORRECTS v1.3.0: Val_Action_Properties only tested @utils.transition (limited property support)27327424. **Val_IO_Meta_Props** → I/O Metadata Properties (POSITIVE)275 - CONFIRMED VALID: `is_required: True` on action inputs276 - CONFIRMED VALID: `is_user_input: True` on action inputs (LLM extracts from conversation)277 - CONFIRMED VALID: `is_displayable: False` on action outputs (alias for `filter_from_agent`)278 - CONFIRMED VALID: `is_used_by_planner: True` on action outputs279280## Validation Command281282```bash283# Navigate to validation directory284cd sf-ai-agentscript/validation285286# Deploy metadata first287sf project deploy start \288 --source-dir validation-agents/force-app/main/default/aiAuthoringBundles \289 --target-org AgentforceTesting --json290291# Publish each agent292for agent in Val_Minimal_Syntax Val_Arithmetic_Ops Val_Comparison_Ops Val_Variable_Scopes \293 Val_Topic_Transitions Val_Latch_Pattern Val_Loop_Guard Val_Interpolation \294 Val_Action_Properties Val_Before_Reasoning Val_After_Reasoning \295 Val_Label_Property Val_Always_Expect_Input Val_Else_Nested_If \296 Val_Step_Guard Val_Multiple_Available_When \297 Val_Apex_Bare_Output Val_Datetime_IO Val_Name_Mismatch \298 Val_Partial_Output Val_No_Outputs Val_Level1_Only \299 Val_Action_Meta_Props Val_IO_Meta_Props; do300 sf agent publish authoring-bundle --api-name "$agent" --target-org AgentforceTesting --json301done302```303304## Test Org Configuration305306| Property | Value |307|----------|-------|308| **Target Org Alias** | `AgentforceTesting` |309| **Einstein Agent User** | `multistepworkflows@00dak00000gdhgd1068670160.ext` |310| **API Version** | 65.0 |311| **Instance URL** | `dak00000gdhgdeay-dev-ed.develop.my.salesforce.com` |312313## History314315| Date | Version | Status | Passed | Failed | Notes |316|------|---------|--------|--------|--------|-------|317| 2026-02-17 | v2.2.0 | ✅ PASS | 24/24 | 0 | 2 new action metadata agents (Val_Action_Meta_Props, Val_IO_Meta_Props). Findings: label valid on actions/topics/I/O, require_user_confirmation/include_in_progress_indicator/progress_indicator_message valid on target-backed actions, is_required/is_user_input valid on inputs, is_displayable/is_used_by_planner valid on outputs. Root cause: v1.3.0 only tested @utils.transition |318| 2026-02-17 | v2.1.0 | ✅ PASS | 22/22 | 0 | 6 new Flow/Apex integration agents. Findings: bare @InvocableMethod INCOMPATIBLE, datetime type WORKS, I/O names must exact-match, partial outputs VALID, outputs block REQUIRED, Level 1 without Level 2 VALID |319| 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 |320| 2026-01-20 | v1.1.0 | ✅ PASS | 8/8 | 0 | Initial validation framework implementation (R6-Agentforce-SandboxFull) |321322## Next Validation Due323324**2026-03-19** (30 days from last validation)325326---327328## Troubleshooting329330### If Validation Fails3313321. **Check the error message** - Salesforce will indicate what syntax changed3332. **Update SKILL.md** - Document the new constraint or syntax requirement3343. **Fix the validation agent** - Update to use correct syntax3354. **Re-run validation** - Ensure all agents pass again3365. **Update this file** - Log the issue and resolution in History337338### Common Issues339340| Issue | Cause | Resolution |341|-------|-------|------------|342| `Nonexistent flag: --source-dir` | CLI version change | Use `sf agent publish authoring-bundle --api-name` instead |343| `Unknown error` on publish | Usually successful | Check full JSON output for actual status |344| `Default agent user not found` | Wrong org or user inactive | Query target org for Einstein Agent User |345| `AgentCompilationError` on deploy | Server-side compiler stricter than LSP | Fix agent, redeploy. Note: LSP may pass patterns the server rejects |346| `Unexpected 'if'` inside else: | else: + nested if not valid | Use compound conditions or sequential ifs |347| `Unexpected '>'` in condition | `<>` not-equal not valid | Use `!=` instead |348| jq parse errors on `--json` output | sf CLI emits control chars | Pipe through `tr -d '\000-\037'` before jq |