@salesforce/ui-bundle-template-base-sfdx-project 11.4.5 → 11.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/AGENT.md +16 -9
  2. package/CHANGELOG.md +9 -0
  3. package/package.json +1 -1
package/AGENT.md CHANGED
@@ -146,16 +146,18 @@ Do not consider a task complete until all three steps have been run successfully
146
146
 
147
147
  ### Data access (Salesforce)
148
148
 
149
- **Before writing any code that connects to Salesforce, you MUST invoke the `using-ui-bundle-salesforce-data` skill. Do not write any data access code without consulting it first.**
149
+ **Before writing any code that connects to Salesforce, you MUST invoke the `experience-ui-bundle-salesforce-data-access` skill. Do not write any data access code without consulting it first.**
150
150
 
151
151
  This applies to: GraphQL queries/mutations, REST calls, SDK initialization, custom hooks that fetch data, or any code that imports from `@salesforce/platform-sdk`.
152
152
 
153
+ **The skill is the authoritative source for how to ground (verify entities/fields against the org) and author queries/mutations.** The bullets below are project orientation only — they do **not** substitute for the skill's workflow. Where this file and the skill differ, follow the skill.
154
+
153
155
  - **All data access uses the Data SDK** (`@salesforce/platform-sdk`) via `createDataSDK()`.
154
156
  - **Never** use `fetch()` or `axios` directly for Salesforce data.
155
157
  - **GraphQL is preferred** for record operations (`sdk.graphql`). Use `sdk.fetch` only when GraphQL cannot cover the case (UI API REST, Apex REST, Connect REST, Einstein LLM).
156
158
  - Use optional chaining: `sdk.graphql?.()`, `sdk.fetch?.()`.
157
159
  - Apply the `@optional` directive to all record fields for field-level security resilience.
158
- - Verify field and object names via `scripts/graphql-search.sh` before writing queries.
160
+ - Verify every entity and field against the org **before** writing queries, following the grounding workflow in the `experience-ui-bundle-salesforce-data-access` skill (it grounds against the **live org**, so a missing local `schema.graphql` is never a reason to guess field names or proceed un-grounded). Never guess; never stub or hand-edit generated types to make a build pass.
159
161
  - Use `__SF_API_VERSION__` global for API version in REST calls.
160
162
  - **Blocked APIs:** Enterprise REST query endpoint (`/query` with SOQL), `@AuraEnabled` Apex, Chatter API.
161
163
 
@@ -173,7 +175,9 @@ Any endpoint not listed above is not permitted.
173
175
 
174
176
  #### GraphQL non-negotiable rules
175
177
 
176
- 1. **Schema is the single source of truth** — every entity and field name must be confirmed via the schema search script before use. Never guess.
178
+ These mirror the `experience-ui-bundle-salesforce-data-access` skill; the **skill is authoritative** and covers them in full (plus grounding, `value`/`displayValue` wrappers, and the primed-vs-degraded behavior). If anything here conflicts with the skill, follow the skill.
179
+
180
+ 1. **Schema is the single source of truth** — every entity and field name must be confirmed against the org (per the skill's grounding workflow) before use. Never guess.
177
181
  2. **`@optional` on all record fields** — FLS causes entire queries to fail if any field is inaccessible. Apply to every scalar, parent, and child relationship field.
178
182
  3. **Correct mutation syntax** — mutations wrap under `uiapi(input: { allOrNone: true/false })`, not bare `uiapi { ... }`.
179
183
  4. **Explicit `first:` in every query** — omitting it silently defaults to 10 records. Always include `pageInfo { hasNextPage endCursor }` for paginated queries.
@@ -186,14 +190,17 @@ Must use the `gql` template tag from `@salesforce/platform-sdk` — plain templa
186
190
  #### Current user info
187
191
  Use GraphQL (`uiapi { currentUser { Id Name { value } } }`), not Chatter (`/chatter/users/me`).
188
192
 
189
- #### Schema file (`schema.graphql`)
193
+ #### Grounding & the schema file (`schema.graphql`)
194
+
195
+ Ground entity/field names by following the **`experience-ui-bundle-salesforce-data-access` skill** — it queries the **live org** directly, so you do not need a local `schema.graphql` present to verify a name. A missing `schema.graphql` is **not** a blocker and **never** a reason to guess fields, stub types, or proceed un-grounded.
196
+
197
+ `schema.graphql`, when present, is a 265K+ line generated mirror — **never open, parse, or edit it directly**, and never hand-edit the codegen output (`graphql-operations-types.ts`). It is regenerated, not authored.
190
198
 
191
- The `schema.graphql` file at the SFDX project root is the source of truth for all entity and field name lookups. It is 265K+ lines — never open or parse it directly. Use the schema search script instead.
199
+ **When `graphql:codegen` or `@graphql-eslint` errors with `Cannot query field/type X` and the message points at `schema.graphql`, the *operation* is wrong or the type isn't accessible — never edit `schema.graphql` to make the validator pass.** Hand-adding a missing type grants no org access; it only hides the failure until runtime. Re-ground the field and fix the operation, or — if the type genuinely belongs in the org — deploy the metadata + assign perms, then regenerate with `npm run graphql:schema`.
192
200
 
193
- - **Generate/refresh:** Run `npm run graphql:schema` from the UI bundle directory
194
- - **When to regenerate:** After any metadata deployment that changes objects, fields, or permission sets
195
- - **Custom objects** only appear in the schema after metadata deployment AND permission set assignment
196
- - **After regenerating:** Always re-run `npm run graphql:codegen` and `npm run build` (schema changes may affect generated types)
201
+ - **`npm run graphql:schema` / `npm run graphql:codegen`** to fetch the schema / generate types, but they are **not** the grounding step and are not a prerequisite for verifying names.
202
+ - **Custom objects** only appear after metadata deployment AND permission set assignment.
203
+ - **After a deploy that changes objects/fields/permissions:** re-fetch, re-run codegen, and `npm run build`.
197
204
 
198
205
  ### CSP trusted sites
199
206
 
package/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [11.4.6](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.4.5...v11.4.6) (2026-07-01)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **sfdx:** point agents to the 'experience-ui-bundle-salesforce-data-access' skill ([#664](https://github.com/salesforce-experience-platform-emu/webapps/issues/664)) ([a344d0f](https://github.com/salesforce-experience-platform-emu/webapps/commit/a344d0f6042602cc0732ca49adb2e04b19118540))
12
+
13
+
14
+
6
15
  ## [11.4.5](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.4.4...v11.4.5) (2026-07-01)
7
16
 
8
17
  **Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/ui-bundle-template-base-sfdx-project",
3
- "version": "11.4.5",
3
+ "version": "11.4.6",
4
4
  "description": "Base SFDX project template",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "publishConfig": {