Skip to content

feat: replacing ootb components with open code components @W-21880083@ [post-TDX]#194

Open
nkurapati-sfdx wants to merge 2 commits intoforcedotcom:developfrom
nkurapati-sfdx:replacing-b2b-commerce-ootb-open-code-components
Open

feat: replacing ootb components with open code components @W-21880083@ [post-TDX]#194
nkurapati-sfdx wants to merge 2 commits intoforcedotcom:developfrom
nkurapati-sfdx:replacing-b2b-commerce-ootb-open-code-components

Conversation

@nkurapati-sfdx
Copy link
Copy Markdown
Contributor

@nkurapati-sfdx nkurapati-sfdx commented Apr 12, 2026

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

  • Describes what the skill does and the expected output
  • Includes relevant Salesforce domain keywords (Apex, LWC, SOQL, metadata types, etc.)
  • Trigger phrases are specific enough for Vibes to select this skill reliably

Instructions

  • Clear goal statement
  • Step-by-step workflow
  • Validation rules for generated output
  • Defined output / artifact

Context efficiency

  • Core instructions are concise — supporting material lives in templates/, examples/, or docs/ subdirectories
  • No unnecessary background explanation in the body

Automated checks

Enforced by CI (npm run validate:skills) per the Agent Skills spec:

  • Directory is one level deep, named in kebab-case (max 64 chars), contains SKILL.md
  • Frontmatter name matches directory name; description is present, ≥ 20 words, ≤ 1024 characters, and includes trigger language
  • Body is non-empty and under 500 lines
  • Name uses gerund form ⚠ (warning — does not block merge)

@nkurapati-sfdx nkurapati-sfdx changed the title @W-21880083 Replacing ootb components with open code components @W-21880083 build :replacing ootb components with open code components Apr 12, 2026
@nkurapati-sfdx nkurapati-sfdx changed the title @W-21880083 build :replacing ootb components with open code components W-21880083: build replacing ootb components with open code components Apr 13, 2026
@nkurapati-sfdx nkurapati-sfdx changed the title W-21880083: build replacing ootb components with open code components W-21880083: feat: replacing ootb components with open code components Apr 13, 2026
@nkurapati-sfdx nkurapati-sfdx changed the title W-21880083: feat: replacing ootb components with open code components feat: replacing ootb components with open code components @W-21880083 Apr 13, 2026
@nkurapati-sfdx nkurapati-sfdx changed the title feat: replacing ootb components with open code components @W-21880083 feat: replacing ootb components with open code components @W-21880083@ Apr 13, 2026
@vratan-sf vratan-sf changed the title feat: replacing ootb components with open code components @W-21880083@ feat: replacing ootb components with open code components @W-21880083@ [post-TDX] Apr 13, 2026
@nkurapati-sfdx nkurapati-sfdx changed the base branch from main to develop April 24, 2026 12:33
@@ -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.
Copy link
Copy Markdown
Contributor

@hsinghbisht-sfdc hsinghbisht-sfdc Apr 27, 2026

Choose a reason for hiding this comment

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

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
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.

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
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.

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
Copy link
Copy Markdown
Contributor

@hsinghbisht-sfdc hsinghbisht-sfdc Apr 27, 2026

Choose a reason for hiding this comment

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

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
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.

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: …”.
Copy link
Copy Markdown
Contributor

@hsinghbisht-sfdc hsinghbisht-sfdc Apr 27, 2026

Choose a reason for hiding this comment

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

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:
Copy link
Copy Markdown
Contributor

@hsinghbisht-sfdc hsinghbisht-sfdc Apr 27, 2026

Choose a reason for hiding this comment

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

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`
Copy link
Copy Markdown
Contributor

@hsinghbisht-sfdc hsinghbisht-sfdc Apr 27, 2026

Choose a reason for hiding this comment

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

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>/`
Copy link
Copy Markdown
Contributor

@hsinghbisht-sfdc hsinghbisht-sfdc Apr 27, 2026

Choose a reason for hiding this comment

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

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/
Copy link
Copy Markdown
Contributor

@hsinghbisht-sfdc hsinghbisht-sfdc Apr 27, 2026

Choose a reason for hiding this comment

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

Have you considered finding and selecting the scripts in /scripts?

**Source:** ui-commerce-components/scripts/moduleConfig.js
**Total Mappings:** 64

```json
Copy link
Copy Markdown
Contributor

@hsinghbisht-sfdc hsinghbisht-sfdc Apr 27, 2026

Choose a reason for hiding this comment

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

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.

hsinghbisht-sfdc pushed a commit that referenced this pull request May 5, 2026
* 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
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.

3 participants