afv-library/skills
Gaurav Bajpai 9f1603ed2f
feat(bdt): Python parser core + CLI subcommands @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@
2026-04-23 23:29:05 +05:30
..
applying-slds @W-21965936@ Add applying and validating SLDS skills to afv-library (#187) 2026-04-21 14:43:15 +05:30
building-ui-bundle-app fix: trigger ui-bundle skill for React app prompts @W-21916680@ (#175) 2026-04-07 09:34:42 +05:30
building-ui-bundle-frontend fix: tighten ui-bundle skill descriptions to reduce false triggers @W-21800526@ (#162) 2026-04-03 09:22:32 +05:30
creating-b2b-commerce-store @W-21274365 Add instructions to create commerce b2b store from vibes (#22) 2026-03-27 18:24:35 +05:30
deploying-ui-bundle fix: tighten ui-bundle skill descriptions to reduce false triggers @W-21800526@ (#162) 2026-04-03 09:22:32 +05:30
developing-agentforce feat: replace agentforce-development skill with three specialized skills @W-21937872@ (#184) 2026-04-09 17:04:48 +05:30
explaining-batch-data-transform feat(bdt): Python parser core + CLI subcommands @W-22196528@ 2026-04-23 23:29:05 +05:30
generating-apex @W-21788755 feat: Apex trigger skills UPDATE (#150) 2026-03-31 12:55:08 +05:30
generating-apex-test @W-21788755 feat: Apex trigger skills UPDATE (#150) 2026-03-31 12:55:08 +05:30
generating-custom-application feat: consolidate webapp data skills into using-webapp-salesforce-data @W-21338965@ (#81) 2026-03-23 22:25:33 +00:00
generating-custom-field feat: consolidate webapp data skills into using-webapp-salesforce-data @W-21338965@ (#81) 2026-03-23 22:25:33 +00:00
generating-custom-lightning-type feat: consolidate webapp data skills into using-webapp-salesforce-data @W-21338965@ (#81) 2026-03-23 22:25:33 +00:00
generating-custom-object feat: consolidate webapp data skills into using-webapp-salesforce-data @W-21338965@ (#81) 2026-03-23 22:25:33 +00:00
generating-custom-tab feat: consolidate webapp data skills into using-webapp-salesforce-data @W-21338965@ (#81) 2026-03-23 22:25:33 +00:00
generating-experience-lwr-site refactor: mv skill to dev branch (#182) 2026-04-21 14:43:15 +05:30
generating-flexipage @W-21783760 Update instructions to ensure templates plugin is installed (#124) 2026-03-30 19:36:21 +05:30
generating-flow fix: @W-21915952@ Update SKILL.md to allow user to make changes in the generated flow (#189) 2026-04-21 11:57:05 +05:30
generating-fragment feat: consolidate webapp data skills into using-webapp-salesforce-data @W-21338965@ (#81) 2026-03-23 22:25:33 +00:00
generating-lightning-app W-21661930 Update lex app skill (#88) 2026-03-23 18:32:48 +05:30
generating-list-view feat: consolidate webapp data skills into using-webapp-salesforce-data @W-21338965@ (#81) 2026-03-23 22:25:33 +00:00
generating-permission-set W-21660521 feat: Agentforce Vibes - Unable to assign agent access in permission set (#145) 2026-03-31 22:21:02 +05:30
generating-ui-bundle-features fix: tighten ui-bundle skill descriptions to reduce false triggers @W-21800526@ (#162) 2026-04-03 09:22:32 +05:30
generating-ui-bundle-metadata fix: tighten ui-bundle skill descriptions to reduce false triggers @W-21800526@ (#162) 2026-04-03 09:22:32 +05:30
generating-ui-bundle-site fix: @W-21889983@ Disallow Modifying React Site Metadata Except for Templated Properties (#185) 2026-04-09 00:25:10 +05:30
generating-validation-rule feat: consolidate webapp data skills into using-webapp-salesforce-data @W-21338965@ (#81) 2026-03-23 22:25:33 +00:00
implementing-ui-bundle-agentforce-conversation-client fix: tighten ui-bundle skill descriptions to reduce false triggers @W-21800526@ (#162) 2026-04-03 09:22:32 +05:30
implementing-ui-bundle-file-upload fix: tighten ui-bundle skill descriptions to reduce false triggers @W-21800526@ (#162) 2026-04-03 09:22:32 +05:30
observing-agentforce feat: replace agentforce-development skill with three specialized skills @W-21937872@ (#184) 2026-04-09 17:04:48 +05:30
searching-media @fix @W-21829074 - Updated skill instructions to wait for the user input (#177) 2026-04-21 14:17:29 +05:30
switching-org feat: Add switching-org skill @W-21436488@ (#74) 2026-03-20 18:22:21 -07:00
testing-agentforce feat: replace agentforce-development skill with three specialized skills @W-21937872@ (#184) 2026-04-09 17:04:48 +05:30
trigger-refactor-pipeline feat: consolidate webapp data skills into using-webapp-salesforce-data @W-21338965@ (#81) 2026-03-23 22:25:33 +00:00
uplifting-components-to-slds2 @W-21965936@ Add applying and validating SLDS skills to afv-library (#187) 2026-04-21 14:43:15 +05:30
using-ui-bundle-salesforce-data fix: tighten ui-bundle skill descriptions to reduce false triggers @W-21800526@ (#162) 2026-04-03 09:22:32 +05:30
validating-slds @W-21965936@ Add applying and validating SLDS skills to afv-library (#187) 2026-04-21 14:43:15 +05:30