feat: replacing ootb components with open code components @W-21880083@ [post-TDX]#194
Conversation
2d508c8 to
119dc66
Compare
| @@ -0,0 +1,354 @@ | |||
| --- | |||
| name: replacing-b2b-commerce-ootb-open-code-components | |||
| description: Replace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code `site:` component for OOTB definitions. Use when users mention "replace OOTB components", "replace commerce components with open code", "swap OOTB for open source", "replace commerce_builder:", "replace OOTB in site", "replace component in site metadata", "replace component definition", "find open code equivalent", "equivalent open code component", "OOTB to open code mapping", "what is the site component for", components "in this view" or "for a given view", or a specific list of component names — and want to update or only discover mappings in their store metadata. | |||
There was a problem hiding this comment.
please wrap the description in double quotes and all the special character should start with espace slash.
| --- | ||
| name: replacing-b2b-commerce-ootb-open-code-components | ||
| description: Replace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code `site:` component for OOTB definitions. Use when users mention "replace OOTB components", "replace commerce components with open code", "swap OOTB for open source", "replace commerce_builder:", "replace OOTB in site", "replace component in site metadata", "replace component definition", "find open code equivalent", "equivalent open code component", "OOTB to open code mapping", "what is the site component for", components "in this view" or "for a given view", or a specific list of component names — and want to update or only discover mappings in their store metadata. | ||
| license: Apache-2.0 |
There was a problem hiding this comment.
use license: LICENSE.txt has complete terms
| name: replacing-b2b-commerce-ootb-open-code-components | ||
| description: Replace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code `site:` component for OOTB definitions. Use when users mention "replace OOTB components", "replace commerce components with open code", "swap OOTB for open source", "replace commerce_builder:", "replace OOTB in site", "replace component in site metadata", "replace component definition", "find open code equivalent", "equivalent open code component", "OOTB to open code mapping", "what is the site component for", components "in this view" or "for a given view", or a specific list of component names — and want to update or only discover mappings in their store metadata. | ||
| license: Apache-2.0 | ||
| compatibility: Requires integrating-b2b-commerce-open-code-components skill as prerequisite |
There was a problem hiding this comment.
This is not the right use of compatibility field.
| description: Replace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code `site:` component for OOTB definitions. Use when users mention "replace OOTB components", "replace commerce components with open code", "swap OOTB for open source", "replace commerce_builder:", "replace OOTB in site", "replace component in site metadata", "replace component definition", "find open code equivalent", "equivalent open code component", "OOTB to open code mapping", "what is the site component for", components "in this view" or "for a given view", or a specific list of component names — and want to update or only discover mappings in their store metadata. | ||
| license: Apache-2.0 | ||
| compatibility: Requires integrating-b2b-commerce-open-code-components skill as prerequisite | ||
| allowed-tools: Bash Read Write |
There was a problem hiding this comment.
Bash is pre approving all executions. This increases the security risk of injecting unwanted instructions. In this skill, we are using limited commands, we should target those specifically.
But before doing this, do you really need it.
| compatibility: Requires integrating-b2b-commerce-open-code-components skill as prerequisite | ||
| allowed-tools: Bash Read Write | ||
| metadata: | ||
| author: afv-library |
There was a problem hiding this comment.
Please remove author.
| - **Scope discovery or replacement to a given Experience Builder view** — scan only that view’s `sfdc_cms__view/<ViewName>/content.json` (or the paths the user names) instead of the whole site | ||
| - **Answer “what open code component replaces X?”** when the user gives explicit component name(s) — look up each in the mapping table, report `site:` targets, and note unmapped entries or targets missing from the repo (no `content.json` edits unless the user also asks to replace) | ||
|
|
||
| **Trigger phrases:** “replace OOTB components with open code components”, “find equivalent open code”, “open code equivalent for OOTB”, “map commerce_builder to site”, “components in this view”, “for the Product Detail view”, “replace only these components: …”. |
There was a problem hiding this comment.
I do not think we need these, frontmatter takes care of it.
|
|
||
| ## Prerequisites | ||
|
|
||
| Before replacing components, delegate to the **integrating-b2b-commerce-open-code-components** skill (`skills/integrating-b2b-commerce-open-code-components/SKILL.md`) to ensure: |
There was a problem hiding this comment.
mentioning the relative path like this is wrong skills/integrating-b2b-commerce-open-code-components/SKILL.md. Please note that in AFV OOTB skil goes under Salesforce-skills folder. In AFV it would look something like this Skills-Salesforce/integrating-b2b-commerce-open-code-components/SKILL.md. Hence we should not depend on the path.
|
|
||
| Before replacing components, delegate to the **integrating-b2b-commerce-open-code-components** skill (`skills/integrating-b2b-commerce-open-code-components/SKILL.md`) to ensure: | ||
|
|
||
| 1. Open source repository is cloned at `.tmp/b2b-commerce-open-source-components` |
There was a problem hiding this comment.
Do you expect the agent to create a .tmp folder?
What is the expectation for cleanup, Will the repository be cloned every time the skills are run?
This approach is not ideal. Please provide more details on this.
|
|
||
| **Required state** after prerequisites: | ||
| - **Store name** — e.g., `My_B2B_Store1` | ||
| - **Site metadata path** — `force-app/main/default/digitalExperiences/site/<store-name>/` |
There was a problem hiding this comment.
We should not rely on the default sfdx-project path force-app/main/default/, as this is hard coded. Customers can customize this path in sfdx-project.json. If they use a different path, this Skill won't work as expected.
| **Step 1c — List repo components** (one command): | ||
|
|
||
| ```bash | ||
| ls .tmp/b2b-commerce-open-source-components/force-app/main/default/sfdc_cms__lwc/ |
There was a problem hiding this comment.
Have you considered finding and selecting the scripts in /scripts?
| **Source:** ui-commerce-components/scripts/moduleConfig.js | ||
| **Total Mappings:** 64 | ||
|
|
||
| ```json |
There was a problem hiding this comment.
SKILL.md should focus on workflows, rest of the things should be delegated to,
skill-name/
├── SKILL.md # Required: metadata + instructions
├── scripts/ # Optional: executable code
├── references/ # Optional: documentation
├── assets/ # Optional: templates, resources
└── ... # Any additional files or directories
This can be assets. We should priortize progressive disclosure.
* feat: add generating-eval-seed-data skill New skill that generates minimal seed-data stubs (custom fields, objects, Apex class stubs) for evaluation datasets in the afv-library. Adapted from the adk-eval-seed-data-generator with afv-library conventions and all PR #194 review feedback addressed (scoped allowed-tools, no hardcoded paths, progressive disclosure, skills referenced by name). * fix: replace stub eval data with real adk-core datasets Replace fabricated eval stubs with actual gold files and seed-data from adk-core: payment_overdue (formula field), AssetFedexValidationRule (validation rule with lookup deps), QueueableWithCalloutRecipes (Apex with class dependencies). * fix: remove related-skills from generating-eval-seed-data frontmatter * fix: use detailed allowed-tools command signatures * fix: scope allowed-tools to sf project deploy start only * fix: change stage from Draft to Pilot
References: Contributing guide · Skill authoring guide · Agent Skills spec
What changed
@W-21880083@
Replacing OOTB components with Open Code Component
Why
Automating manual step for salesforce developer
Notes
Skills
Manual checklist
Description quality
Instructions
Context efficiency
templates/,examples/, ordocs/subdirectoriesAutomated checks
Enforced by CI (
npm run validate:skills) per the Agent Skills spec:SKILL.mdnamematches directory name;descriptionis present, ≥ 20 words, ≤ 1024 characters, and includes trigger language