Skip to content

feat: Update scripts to lower reliance on LLMs - #205

Draft
anneke wants to merge 10 commits into
feat/tailwind-to-cssfrom
feat/add-new-components
Draft

anneke wants to merge 10 commits into
feat/tailwind-to-cssfrom
feat/add-new-components

Conversation

@anneke

@anneke anneke commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Moves some instruction and work to scripts that do the same as what a LLM assistant would do, but reducing the interpreting/use of tokens and moving the automation to scripts.

Related issue

N/A

Type of change

  • Fix
  • New feature / variant
  • Breaking change
  • Docs / repo tooling (no package code changed)
  • Chore / refactor

Checklist

  • pnpm build, pnpm lint, and pnpm format pass
  • Storybook story added/updated to cover the change (variants, sizes, states)
  • Changeset added (pnpm changeset) — required for any change to @surfnet/curve-react or @surfnet/curve-angular; N/A for docs/CI-only changes
  • React and Angular kept in parity, if applicable (contract updated in @surfnet/curve-contracts)

Screenshots

The alpha CLI has no message/message-scroller generators. Only the CLI
(a devDependency) moves; @spartan-ng/brain stays on 0.0.1-alpha.720.
Turns rules that only lived in AGENTS.md and the skills into a check:
barrels, package exports, stories and contracts per component, no
leftover Tailwind in React or Angular component code, no TODOs in
contracts, and matching React/Angular story titles. Known exceptions
are listed in scripts/conventions.allowlist.json.
Scaffolds a component in contracts plus React and/or Angular: vendors it
with the shadcn or Spartan CLI, writes the barrel, package exports, CSS
and story stubs, and saves a pristine upstream copy in .upstream/.

Also undoes CLI side effects: dependency bumps, the bogus `cn` package
and import from the shadcn registry, tw-animate-css, duplicate copies of
components Curve already vendors, and edits to other tracked files.
Refuses up front when the component exists or Spartan needs a newer
@spartan-ng/brain than the repo has.
Fetches today's upstream in a temporary git worktree (with the working
tree's tracked edits carried over) and merges it into the vendored
component per file with git merge-file, using the .upstream/ snapshot as
the base. Conflicts get standard markers; the snapshot then advances.
Components without a snapshot fall back to the manual skill flow.
Vendored with pnpm new:component from shadcn (base-vega) and Spartan,
then ported to a CSS module and curve-message* classes that share one
set of rules. The align prop is typed from messageContract, and both
Storybooks have the same five stories.
Vendored with pnpm new:component on @shadcn/react's message-scroller
primitive and ported to a CSS module. The bottom fade and jump button
follow the primitive's data-scrollable/data-active state, with motion
only under prefers-reduced-motion: no-preference.

React only for now: the Spartan equivalent needs @spartan-ng/brain 1.x.
Lead with pnpm new:component / update:component / check:conventions and
keep the manual playbooks as the reference and fallback. Also remove the
duplicated refresh paragraphs in AGENTS.md, correct the React style
(base-vega), note that autodocs is set project-wide in preview.ts, and
document the Spartan CLI/brain version split.
…stom

Home-grown components (curve-<name>, like curve-data-table) have no
upstream CLI to vendor from. With --custom the generator skips the CLIs
and the .upstream/ snapshot and writes a small working component instead:
each contract axis becomes a typed prop that sets a data-* attribute, with
a CSS rule stub per value and Playground + per-axis stories named the same
in both frameworks.

The curve- prefix is required with --custom (and rejected without it), so
home-grown names never collide with upstream components. update:component
now says there is no upstream to merge for curve-* components.
@anneke
anneke changed the base branch from main to feat/tailwind-to-css September 29, 2026 15:09
@github-actions

Copy link
Copy Markdown
Contributor

♿ Accessibility audit — WCAG 2.2 AA

✅ No violations across 436 stories / 12208 theme·mode combinations in @surfnet/curve-angular, @surfnet/curve-react.

Automated axe covers ~30–50% of WCAG 2.2 AA. Keyboard, screen-reader and reflow checks still need a manual pass. Full per-story JSON is in the run’s a11y-reports artifact.

This branch has not been deployed

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

1 participant