lwc-oss-safe-changes

star 14

Safely implement or refactor LWC OSS code in this repo (LWR + Rollup targets) while preserving cross-target behavior across core extension, chat extension, and shared runtime modules.

grebmann1 By grebmann1 schedule Updated 6/2/2026

name: lwc-oss-safe-changes description: Safely implement or refactor LWC OSS code in this repo (LWR + Rollup targets) while preserving cross-target behavior across core extension, chat extension, and shared runtime modules.

LWC OSS Safe Changes

Use this skill when editing LWC components/modules under:

  • packages/lwc/main/*
  • packages/lwc/extension/*
  • packages/lwc/applications/*
  • packages/lwc/shared/*

Goal

Make LWC OSS changes that are small, target-aware, and regression-safe.

Repo-specific constraints

  • This repo builds multiple targets (extension, extension-chat, workers, server/web).
  • Shared LWC changes can impact both:
    • packages/extension/* (core extension)
    • packages/extension-chat/* (chat extension)

Golden rules

  1. Prefer local edits over broad refactors.
  2. Preserve backward-compatible defaults in shared components.
  3. If behavior must differ by target, use explicit @api flags.
  4. Do not degrade one target while fixing another.

Safe change patterns

1) Target-specific UI behavior

  • Add optional API flags in shared components:
    • @api hideLlmSettingsCard = false
    • @api useInlineOnboarding = false
  • Enable flags only from target-specific host templates.

2) State and events

  • Keep public event contracts stable (detail shape + event name).
  • Prefer additive event payload fields over breaking changes.

3) Component composition

  • Keep role boundaries clear:
    • host component owns navigation/layout mode
    • shared component owns internal controls and emits events

Required verification

After LWC OSS edits:

  1. Targeted lint/format:
npx eslint <changed .js/.ts files>
npx prettier --check <changed .html/.css/.js/.ts files>
  1. Build matrix:
  • If only target-local LWC changed, build that target.
  • If shared LWC changed, build both:
npm run build:extension:main
npm run build:extension:chat:main
  1. If shared module wiring/manifests changed:
npm run build:shared

Output checklist

  • LWC files changed (by folder)
  • Any target guard/flag added
  • Verification commands and outcomes
  • Residual risk (if e2e/manual not run)
Install via CLI
npx skills add https://github.com/grebmann1/workbench --skill lwc-oss-safe-changes
Repository Details
star Stars 14
call_split Forks 3
navigation Branch main
article Path SKILL.md
More from Creator