Skip to content

@W-21723468 expert rules and lightning app skills update#99

Closed
ysachdeva-sfdc wants to merge 0 commit intoforcedotcom:mainfrom
ysachdeva-sfdc:main
Closed

@W-21723468 expert rules and lightning app skills update#99
ysachdeva-sfdc wants to merge 0 commit intoforcedotcom:mainfrom
ysachdeva-sfdc:main

Conversation

@ysachdeva-sfdc
Copy link
Copy Markdown
Contributor

References: Contributing guide · Skill authoring guide · Agent Skills spec

What changed

lightning app skill file and A4V rules

Why

  1. No-loop rule - agent was sometimes making the same calls multiple times and getting stuck in loop
  2. API Context per Type as Agent skipped API context for most types.
  3. FlexiPage API Context as FlexiPage was the last type missing API context.
  4. Flow Required - Agent stopped after PermissionSet - Changed step 3 from "optional Flow" to "Flow (required, not optional)"
  5. complete only when code is deployable rule to ensure deployable lightning app.

Notes

Working for 9/10 runs

@ysachdeva-sfdc ysachdeva-sfdc changed the title rules @W-21723468 expert rules and lightning app skills update Mar 24, 2026
Comment thread rules/a4v-expert-global-rule.md Outdated
- Only proceed to the next type when all are true.
## Required Criteria (Lightning App Runs)

1. Generate ALL of these metadata types in order: `CustomObject` -> `CustomField` -> `CustomTab` -> `FlexiPage` -> `CustomApplication` -> `PermissionSet`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can not mention this in the global rule file, LEX App skill takes care of dependency.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this was not being followed, had to explicitly state this.

Comment thread rules/a4v-expert-global-rule.md Outdated
2. Call the per-type skill before first write for that type.
3. Call `salesforce-api-context` for every metadata type before write (record tool evidence).
4. Generate `FlexiPage` using CLI-driven generation from the loaded FlexiPage skill.
5. Generate `Flow` through metadata experts MCP flow tooling (with skill + API context gates).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we mentioning this explicitly?

Copy link
Copy Markdown
Contributor Author

@ysachdeva-sfdc ysachdeva-sfdc Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these were the errors that were coming across multiple runs

Comment thread rules/a4v-expert-global-rule.md Outdated

After completing generation for a metadata type, you MUST advance to the next type in the sequence. Never loop back to a previously completed type. The required execution order is:

1. `CustomObject` — load `generating-custom-object` skill, call `get_metadata_type_fields("CustomObject")`, generate, checkpoint
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can not hard code all the metadataType like this in the Global rule file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ensuring that calls are being made correctly. Unless we have a better way around this, we should use this to achieve the results we want.

Comment thread rules/a4v-expert-global-rule.md Outdated
After completing generation for a metadata type, you MUST advance to the next type in the sequence. Never loop back to a previously completed type. The required execution order is:

1. `CustomObject` — load `generating-custom-object` skill, call `get_metadata_type_fields("CustomObject")`, generate, checkpoint
2. `CustomField` — load `generating-custom-field` skill, call `get_metadata_type_fields("CustomField")`, generate, checkpoint
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_metadata_type_fields("CustomField") : API context has 5 tools, we can not hard code and direct to use only single tool.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is one reason why API Context calls are not being made. Do we know at a high level which other tool calls are needed for which type? This makes all the difference in the testing I have seen so far

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a static plan and we are getting deployable metadata from this. we can further add what all tool calls should be made for any specific md type if we see issues. Currently I dont see any more for space station.

category: orchestration
version: "1.0"
related-skills: generating-custom-object, generating-custom-field, generating-custom-tab, generating-flexipage, generating-custom-application, generating-flow, generating-validation-rule, generating-list-view, generating-permission-set
related-skills: skills/generating-custom-object/SKILL.md, skills/generating-custom-field/SKILL.md, skills/generating-custom-tab/SKILL.md, skills/generating-flexipage/SKILL.md, skills/generating-custom-application/SKILL.md, skills/generating-flow/SKILL.md, skills/generating-validation-rule/SKILL.md, skills/generating-list-view/SKILL.md, skills/generating-permission-set/SKILL.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you modified on top of stale version, we updated this path, we can not have hard dependenci paths like this, now OOTB skills uses Sf-Skills not skills, it might conuse Agent.

Copy link
Copy Markdown
Contributor Author

@ysachdeva-sfdc ysachdeva-sfdc Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, had taken the latest pull last evening will test and revert this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants