Adds the full test suite for bdt_analyze.py: 92 unit tests backed by
9 JSON fixtures (4 normative + 5 adversarial). All tests stdlib-only,
runnable via `python3 -m unittest tests.test_bdt_analyze`.
tests/test_bdt_analyze.py coverage:
DAG primitives:
- roots() / sinks() / topo_order() on minimal + branching graphs.
- upstream() / downstream() reachability correctness.
- Cycle tolerance: topo_order + traversals do not infinite-loop or
raise when the graph contains a cycle; cycle is reported via
broken_references-adjacent signals.
- Broken-reference tolerance: nodes referencing non-existent upstreams
are handled gracefully; broken_references() enumerates them.
CLI subcommands (happy-path + error-path for each):
- summary, sources, outputs, stages, nodes, node, lineage,
field-trace, formula, definitions — each exercised in both
human-readable and --json modes.
- Exit-code discipline: unknown node -> exit 2, malformed input ->
exit 3, success -> exit 0.
- Unknown-action graceful degradation: nodes whose action isn't in
the catalog still appear in summary/nodes output with a generic
label rather than crashing.
- Output size budgets: default-mode outputs are asserted to stay
within configured character caps.
Field discovery:
- fields_produced() / fields_consumed() / _scrape_field_refs()
heuristics tested against both clean and noisy formula bodies.
- TestFieldTraceFocus — narrowing tests preventing false-positive
substring hits in formula text.
Dual-shape input:
- TestInputShapeDetection — editor export vs. Connect API
single-definition auto-detection.
- TestMultiDefinition — Connect API multi-definition payload:
definitions subcommand, --definition N routing, out-of-range
index error handling.
Fixtures (tests/fixtures/):
- minimal.json — smallest valid editor-export BDT.
- window_and_aggregate.json — window + aggregate composition.
- api_input_single.json — Connect API single-definition payload.
- api_input_multi.json — Connect API multi-definition payload.
Adversarial fixtures (tests/fixtures/adversarial/):
- cycle.json — graph with a cycle; parser must not hang.
- broken_ref.json — node referencing a non-existent upstream.
- unknown_action.json — node with an action not in the catalog.
- no_ui.json — BDT missing the UI layer entirely.
- empty_nodes.json — valid envelope but zero nodes.
Suite status: Ran 92 tests, OK.
@W-22196528@
Adds the curated reference library the skill loads on demand, plus
four synthetic sample BDTs used by docs, tests, and LLM-mode demos.
references/ (4 curated Markdown files):
- bdt-reference.md — top-level BDT JSON anatomy: envelope,
nodes, edges, UI layer, definitions,
businessType semantics. Cites the core-262
upstream JSON schema and Connect API spec.
- bdt-node-catalog.md — every node type (DMO Source, DMO Sink,
Filter, Join, Union, Aggregate, Window,
Formula, Split, Append, etc.) with its
required/optional fields and typical
usage. Audited against core-262 enums.
- bdt-function-catalog.md — the expression-language function surface
(string, numeric, date, conditional,
aggregate). Grouped by category with
signature + one-line semantics.
- bdt-window-functions.md — windowing operators (ROW_NUMBER, RANK,
LEAD/LAG, running aggregates) with PARTITION
BY / ORDER BY grammar and gotchas.
assets/sample_bdts/ (4 synthetic, dependency-free BDTs):
- minimal_dmo_to_dmo.json — smallest valid BDT (1 source, 1 sink).
- joins_and_filters.json — join + filter composition.
- window_and_aggregate.json — window function + aggregate in one graph.
- append_and_split.json — append-then-split branching topology.
Grounding rules enforced in this commit:
- Every claim in references/ cites an upstream source (core-262 JSON
schema, Connect API reference, or the Data Cloud BDT editor spec).
No speculative content.
- No raw DITA or internal-only documentation is shipped; references
are synthesized from public-facing material.
- BusinessTypeEnum values use the canonical camelCase casing from
core-262 (case-cleanup fix included here).
- Sample BDTs are original synthetic fixtures, not redacted customer
data. Each is small enough to read end-to-end.
@W-22196528@
Adds scripts/bdt_analyze.py — a generic, stdlib-only DAG parser and
query CLI for Salesforce Data Cloud BDT JSON. 1,379 lines.
Parser primitives:
- DataTransform.from_path / from_dict — accepts three input shapes:
editor export ({version, nodes, ui, ...}), Connect API
single-definition ({name, label, type, definition: {...}}), and
Connect API multi-definition ({name, definitions: [{name, label,
type, definition}, ...]}).
- Node dataclass with ui_label / ui_description fallback resolution.
- roots() / sinks() / topo_order() — Kahn's algorithm with
deterministic tie-break for reproducible output.
- upstream() / downstream() traversal resilient to broken refs and
cycles (does not infinite-loop on self-edges or cycles).
- broken_references(), fields_produced(), fields_consumed(),
_scrape_field_refs() heuristics for field-trace discovery.
CLI (argparse, 10 subcommands, each supports --json for machine
output):
- summary — node counts, source/sink counts, stage totals.
- sources — list source nodes (no upstream).
- outputs — list sink nodes (no downstream).
- stages — topologically ordered stages.
- nodes — flat node listing with labels.
- node <name> — per-node detail (action, inputs, outputs, fields,
UI label/description).
- lineage <node> — upstream + downstream chain from a node.
- field-trace <field> — which nodes produce/consume a given field.
- formula <node> — extract formulas/expressions from a node.
- definitions — lists definitions in multi-definition
payloads; every other subcommand accepts
--definition N (default 0) to route into a
specific definition within the payload.
Error contract:
- Exit 0 on success, 2 on unknown node/field, 3 on malformed input.
- BdtInputError (exit 3) and BdtNotFoundError (exit 2) classes
centralize error handling so the CLI shell stays thin.
- Field-trace narrowing refinements prevent false positives from
substring matches in formula bodies.
- Upstream/downstream walkers harden against broken refs discovered
during internal-BDT audit.
Design invariants:
- Python owns truth (parsing, DAG math, field discovery). LLM owns
narrative (explaining what the structure means to a user).
- No external dependencies — stdlib only: argparse, json, pathlib,
re, sys, collections, dataclasses, typing.
- Output size budgets: every subcommand caps its default-mode output
so summaries fit in a single LLM context window; --json dumps
everything for agents that need raw data.
@W-22196528@
Scaffolds the explaining-batch-data-transform skill directory and delivers
the full, production-grade SKILL.md body. 194 lines.
Directory layout established (skills/explaining-batch-data-transform/):
- SKILL.md — the entry point this commit adds
- scripts/ — parser lands in commit 2
- references/, assets/ — reference docs + samples land in commit 3
- tests/ — unit tests + fixtures land in commit 4
SKILL.md frontmatter:
- name, description, tier, and owner fields matching the library's CI
validator schema.
- Description covers the full production surface: "Explain, audit, and
trace Salesforce Data Cloud Batch Data Transform (BDT) JSON — sources,
sinks, stages, lineage, field traces, formulas, multi-definition
payloads, and dual input shapes (editor export + Connect API)."
SKILL.md body (12 sections):
1. When to use this skill
2. Inputs you accept (editor export, Connect API single-definition,
Connect API multi-definition payloads)
3. Mode A — structural survey (summary / sources / outputs / stages)
4. Mode B — per-node explanation (nodes / node)
5. Mode C — lineage + field trace
6. Mode D — formulas and windows
7. Question routing table (user phrasing -> CLI subcommand)
8. Multi-definition payload handling (--definition flag semantics)
9. Troubleshooting (malformed JSON, unknown node refs, broken upstream)
10. Non-goals as explicit "Do not" directives (no execution, no schema
inference beyond what the JSON states, no speculation about runtime)
11. References + sample BDTs index
12. Exit-code + error-class contract surfaced from bdt_analyze.py
Structure passes the repo's skill-validator (npm run validate:skills):
single top-level H1, required sections present, frontmatter schema
aligned, no broken internal links.
@W-22196528@
* feat: add SLDS applying and auditing quality skills
Two new skills for SLDS v2 compliance:
- applying-slds: guides artifact selection, styling hooks, utilities, icons
- auditing-slds-quality: scored quality audit with linter + static analysis
Made-with: Cursor
* refactor: rename auditing-slds-quality skill to validating-slds
Renames the skill directory and updates all references in
applying-slds/SKILL.md and applying-slds/checklists.md.
Made-with: Cursor
* fix: improve accuracy and add manual review gate across SLDS skills
Correct hook families, badge modifiers, and severity levels; add a
manual review gate to validating-slds so automated grades alone cannot
declare production readiness; make analyze-quality.cjs portable with
explicit --hooks-index flag; remove dead parseYaml code; add version
field to all three skill frontmatters.
Made-with: Cursor
* chore: retrigger CI
Made-with: Cursor
* fix: quote YAML descriptions and improve color hook disambiguation
- Quote description frontmatter in all three skills for valid YAML
(inner double quotes now escaped)
- Strengthen Step 4 directive: MUST read color-hooks guide before
choosing a hook — linter suggestions are unranked
- Add surface vs surface-container disambiguation table
- Add accent hook context table and state progression
- Add standalone-component exception for surface classification
- Add modal background example to examples.md
- Remove redundant brand-button example (covered by new context table)
Made-with: Cursor
feat: replace agentforce-development skill with three specialized skills
Replace the monolithic agentforce-development skill with three focused skills:
- developing-agentforce: For creating and authoring Agentforce agents
- observing-agentforce: For monitoring and debugging agents
- testing-agentforce: For validating agent behavior
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: trigger ui-bundle skill for React application prompts
Add React-specific trigger language to building-ui-bundle-app description
so prompts like "I want to build a react application" activate the
ui-bundle orchestrator even without existing project files.
* fix: correct stale related-skill reference
Rename generating-experience-react-site to generating-ui-bundle-site
in building-ui-bundle-app related-skills to match the actual skill name.
* fix: tighten skill descriptions to reduce false triggers
- generating-ui-bundle-metadata: remove generic triggers (metadata, new app,
meta XML, configuration), update command to sf template generate ui-bundle,
add --template reactbasic flag
- building-ui-bundle-app: reframe as orchestrator for multi-skill ui-bundle
work, distinguish from generating-lightning-app
* fix: improve ui-bundle skill descriptions to reduce false triggers and improve activation
- Add MUST activate + file-pattern triggers to all 9 ui-bundle skills
- Remove overly specific examples that waste context tokens
- Scope features skill to authentication and search only
- Add boundary language between orchestrator and frontend skills
- Update metadata skill to use sf template generate ui-bundle --template reactbasic
* fix: standardize uiBundles/*/src/ directory trigger across all ui-bundle skills
* fix: remove React references from skill descriptions for framework agnosticism
* fix: standardize uiBundles/*/src/ trigger in agentforce and data skills
* fix: add 'Use this skill when' trigger context to all ui-bundle skill descriptions
* fix: require mobile-responsive UI in building-ui-bundle-frontend skill
* fix(using-ui-bundle-salesforce-data): condense reference into skill
also adds, operation types, script section type and mix instructions as comments in the examples. it also adds a section to avoid the llm being eager to show progress on ui-scaffold
* fix: workaround llm being eager to scaffold ui
* fix: delete testing with sf cli
* fix: add summary table for workflow steps
---------
Co-authored-by: Hemant Singh Bisht <hsinghbisht@salesforce.com>
* @W-21817314@ Improved lwr and ui bundle site's skill to identify what properties should be updated for when user request for site URL update
Signed-off-by: Daily Dai <lei.dai@salesforce.com>
* fix skill name
Signed-off-by: Daily Dai <lei.dai@salesforce.com>
* fix skill name
Signed-off-by: Daily Dai <lei.dai@salesforce.com>
* move url update into its own doc md file
Signed-off-by: Daily Dai <lei.dai@salesforce.com>
* clarify search_files is an agent tool instead of command line
Signed-off-by: Daily Dai <lei.dai@salesforce.com>
---------
Signed-off-by: Daily Dai <lei.dai@salesforce.com>
* Moving SKILL.md to generating-ui-bundle-site
* Rename configure-metadata-custom-site.md to configure-metadata-custom-site.md
* Rename configure-metadata-digital-experience-bundle.md to configure-metadata-digital-experience-bundle.md
* Moving configure-metadata-digital-experience-config.md to generating-ui-bundle-site
* Moving configure-metadata-digital-experience.md to generating-ui-bundle-site
* Moving configure-metadata-network.md to generating-ui-bundle-site
fix: derive router basename from <base href> at runtime
Add guidance to building-ui-bundle-frontend skill to always derive
the client-side router basename from the document's <base href> tag
instead of hardcoding it.
* Add building-ui-bundle-app orchestration skill
New orchestration skill that coordinates all UI bundle skills in proper
dependency order to build complete React applications on Salesforce.
Follows the generating-lightning-app pattern with explicit skill load
calls for each phase: scaffolding → features → data access → UI →
integrations → deployment → experience site.
* Clean up building-ui-bundle-app skill @W-21338965@
- Remove Skill Registry section (redundant with Dependency Graph + Execution Workflow)
- Remove "Skill to load" lines from Dependency Graph phases (duplicated in per-phase execution steps)
- Remove Best Practices 2 & 3 (duplicated in Execution Workflow and Phase 2 description)
- Fix SKILL LOAD ORDER numbering: flat 1-8 → 5a/5b to match phase numbering in Dependency Graph
- Clarify GraphQL schema re-fetch in Phase 6 is a post-deployment remote schema fetch
- Add parallel execution guidance to Phase 5 execution block
* Make Phase 2 (Features) optional @W-21338965@
* Address review feedback: use non-LWC terminology instead of React-specific
Co-authored-by: dme722
* Fix building-ui-bundle-app skill: remove special chars, align with actual skills
- Replace non-ASCII characters (arrows, circled numbers, checkmarks, em dashes)
that cause silent failures in Cline
- Fix incorrect skill name generating-ui-bundle-ui -> building-ui-bundle-frontend
- Align phase diagrams with actual skill workflows (add missing steps for
scaffolding npm install, features search-first flow, data validation step,
deployment final build and full post-deploy config)
- Fix Phase 4 diagram to match building-ui-bundle-frontend task categories
Made-with: Cursor
* Rename webapplication skills to ui-bundle
Rename all 7 webapplication skill directories and their content to use
the "ui-bundle" / "UIBundle" naming convention, aligning with the
New++ (TDX) naming strategy.
Directory renames:
- deploying-webapplication → deploying-ui-bundle
- generating-webapplication-{features,metadata,ui} → generating-ui-bundle-*
- implementing-webapplication-{agentforce-conversation-client,file-upload} → implementing-ui-bundle-*
- using-webapplication-salesforce-data → using-ui-bundle-salesforce-data
Content updates across all skills:
- Frontmatter name fields
- Prose: "web application" → "UI bundle"
- Metadata refs: WebApplication → UIBundle, webapplications/ → uiBundles/
- CLI: sf webapp → sf ui-bundle
- NPM packages per rename table
- Cross-skill references and generating-experience-react-site refs
* Rename generating-ui-bundle-ui skill to building-ui-bundle-frontend
The "ui-bundle-ui" name was confusing. "building-ui-bundle-frontend"
better conveys that this skill handles the React frontend layer
within a UI bundle.
---------
Co-authored-by: gbockus-sf <76090802+gbockus-sf@users.noreply.github.com>
* Split generating-webapp-metadata into single-purpose skills
Extract the deployment sequence into a new deploying-webapp skill so each
webapp skill describes exactly one actionable goal. This improves agent
skill selection accuracy by eliminating multi-concern descriptions.
- generating-webapp-metadata: now focused on scaffolding, bundle config, CSP
- deploying-webapp: new skill for the 7-step deployment sequence
* Rename -webapp- skill directories and references to -webapplication-
Rename all 7 webapp skill directories to use the full "webapplication"
entity name. Update frontmatter name fields, cross-skill references,
and descriptive prose. Package names and CLI commands are preserved
as-is since those are actual identifiers.
* Add instructions to create commerce b2b store from vibes
* update rule and sf commands
* Refactor Commerce B2B skill: rename and flatten directory structure
- Rename skill from create-b2b-commerce-storefront to creating-b2b-commerce-store to better reflect what users actually create (the Store, not the Storefront)
- Flatten directory from skills/commerce/create-b2b-commerce-storefront/ to skills/creating-b2b-commerce-store/ to match repository pattern
- Remove old prompts and rules consolidated into skill
- Remove Commerce prompt and rule entries from manifest.json (consolidated into skill)
W-21745944 make deployment command use --dry-run, add strict guardrails to prevent agent from further editing page
Co-authored-by: Hemant Singh Bisht <hsinghbisht@salesforce.com>
* @W-21707233 make template instructions more explicit
* convert escaped quotes to single quotes in frontmatter
---------
Co-authored-by: Hemant Singh Bisht <hsinghbisht@salesforce.com>
* feat: layout docs integration
* fix: preview a site not just after deployment
* @w-21612472 Test Skills for branding sets
* Remove mandatory tip
* feat: update wording for loading ref docs
* feat: add brief description on what object pages are
* feat: add instrux to ensure steps are followed correctly
* feat: use stricter wording for initial instruction
* fix: rm useless instruction
* fix: theme layout fixes
* feat: more explicit wording
* feat: add instrux to better handle global skills
* fix: bring back steps wording just in case
* fix: rm old refs
---------
Co-authored-by: KarthikSalesforce <131800461+KarthikSalesforce@users.noreply.github.com>
Co-authored-by: Hemant Singh Bisht <hsinghbisht@salesforce.com>