Yr hyn rydym yn gweithio arno

Y cynllun gwella fesul cam, wedi'i rendro wrth adeiladu o plan.md canonaidd y gadwrfa. Mae ei restr wirio yn tasks.md; caiff gwaith gorffenedig ei blygu i'r log newidiadau. Fel unrhyw fap ffordd, gall newid.

Plan for major improvements across capabilities, functionality, release engineering, accessibility assurance, documentation, and examples. Companion checklist: tasks.md.

Relationship to spec/: the living specification remains spec/index.md; this file is a bounded improvement initiative to be executed by an AI coding agent in phased work sessions. As work lands, fold outcomes back into spec/index.md §11–§14 and CHANGELOG.md. This revision (2026-08-26) supersedes the 2026-07-11 plan: completed work is recorded in spec/history, still-open items are carried forward, and new phases are grounded in fresh research of the monorepo and of the GOV.UK, NHS, USWDS, and design-tokens ecosystems.

How to execute this plan

  • Work phase by phase; phases are ordered by dependency and value.
  • Each task in tasks.md has an ID (P1-T1), touched paths, acceptance criteria, and a verify command. Do not mark a task done until its verify command passes.
  • Always run bin/test before finishing a session; it must exit 0. Run bin/sync-special-files after editing any root special file.
  • Respect the binding rules in AGENTS/*.md (headless, accessibility, internationalization, theme, helpers, examples). Svelte is the canonical reference implementation; port outward from it.
  • The helpers are the ten *-picker packages (theme, locale, text-size, motion, share, search, link, menu, settings, date-time) plus picker-bar — the July plan's *-select names are obsolete and must not reappear.
  • Keep commits small and per-task; note completed task IDs in commit messages.

Current state (verified 2026-10-25)

Facts below were read from the tree, the registries or a command run on 2026-10-25, except the grid-like helper feature levels and the label-pack paragraph, which are as of 2026-10-18 and not re-verified. Earlier snapshots are kept in CHANGELOG.md and spec/history/.

  • Catalog: 581 rows in components.tsv. All 8 headless libraries implement every row except Web Components, which implements 546 (the 35 table sub-elements and interactive *ListItem families are permanently excluded). bin/check-coverage reports no drift.
  • Subprojects: 213 top-level directories — 184 implementation subprojects (9 headless including Alpine.js, 8 example apps, 167 helper packages, one each since 2026-10-10), 27 Claude Skills, 9 locale-translations packages, lily-design-system-themes and the docs site. bin/check-links is clean (15,180 markdown files) and runs in bin/test (2026-10-25: the site's .md twins now carry absolute URLs, and generator fixtures are skipped).
  • Helper packages (167): in every framework, the eleven *-pickers (the time-zone picker joined 2026-10-24), picker-bar, data-grid, kanban-board, gantt-chart, calendar and filter (Nunjucks also has listbox-behavior). The grid-like helpers are at the same feature level in all eight catalogs for what carries a label: typed fields, inline editing with undo/redo, export and copy, search, the Gantt criticalLabel and kanban title editing. Svelte-only for now: the optional Gantt critical-path calculation (shared/critical-path.ts, calendar or working-day lag), the kanban allowLaneChange, the lane argument to canMove, showSearchLabel and fieldLayout, the calendar periodTitle anchor argument, and the data grid's footer totals over filtered rows, --data-grid-pinned-offset and remembered column order.
  • Label packs (2026-10-18): 64 per-locale labels packs in shared/label-packs/, loaders for every catalog, and bin/check-label-packs. 63 are unreviewed machine drafts, Welsh included. Not yet a published package. Contract: spec/label-packs/.
  • Published (registry state read 2026-10-18): headless npm svelte/react/vue/nunjucks 0.5.0, angular 0.6.0, web-components 0.6.0, html 0.7.0; NuGet LilyDesignSystem.Blazor.Headless 0.5.0; @lilydesignsystem/themes 0.5.0. Every helper package version in the tree is on its registry (bin/verify-published). Unreleased in the tree, committed but not versioned or published: the Svelte widgets' peer dependency on svelte-headless, criticalLabel, periodTitle's anchor argument, the data grid and kanban additions, the title-edit and criticalLabel ports, and the label-pack loaders.
  • Releases: monorepo tags v0.2.0–v0.9.0 exist (latest v0.9.0). Not re-verified: the GitHub Releases and which subtree/forge pushes are current.
  • Publishing: NuGet publishes through OIDC trusted publishing from publish.yml (NUGET_USER must be the policy creator's username). npm publishes from the maintainer's machine (bin/publish-helpers): the repository has no NPM_TOKEN secret, so the workflow's npm step fails with ENEEDAUTH (2026-10-17). Check a release with bin/verify-published --wait 900.
  • Themes: 57 ship (bin/check-theme also forbids a filled current-day cell); the docs site mounts picker-bar; bin/sync keeps the site's and the example apps' copies in step.
  • Demonstration pages: every example app and the docs site render the live demo, rendered variants and a real usage example (bin/generate-examples, bin/generate-site-pages). The site also has a Label packs page.
  • CI: .github/workflows/ci.yml defines jobs verify, helper-packages, headless, html-headless, dotnet-tests, dotnet-helper-packages, example-smoke, eleventy-example, consumer-smoke and spell-check (job list read from the file; run history not re-checked).
  • Docs checks (in bin/test): bin/check-helper-docs (Svelte helpers document every prop, list no shipped feature as a non-goal), bin/check-label-packs, bin/check-theme, bin/check-links.
  • Open backlog: the deferred Baby UI ideas (attachment, tool-chips, the remaining agent, advanced and primitive components — tasks P9-T12, each needing a design pass first); native-speaker review of the 45 draft label packs; publishing the packs as a package; porting the Svelte-only items above; a patch release for the unreleased items; the engines.node range for published packages (decided 2026-10-18: >=26). Security-posture settings, GitHub topics and README screenshots were not re-verified.

Research findings (2026-10-11): bref-ui

bref-ui (MIT, Svelte 5) was read at commit 3333552 (2026-10-11). It is a small styled library — 17 components (button, checkbox, combobox, dialog, icon, pill, pill-group, pill-choice-group, popover, progress, select, spinner, surface, switch, text-area, text-input, theme, tree-view) — that ships the same source two ways: an npm package, and a Bun CLI that copies a component and its dependencies into the consumer's project (shadcn's source-ownership model). Lily already has a counterpart for every component, so the value is in its techniques, not its catalog. What it implies here:

  1. Form reset and native validation. Its combobox mirrors its value into a hidden native <select> (so required and form.checkValidity() work natively, and an invalid event moves focus to the visible field), and both the combobox and the pill choice group restore their initial value on the form's reset event — deferred one tick so a consumer's preventDefault() is honoured. No Lily headless component or helper listens for reset today; a stateful control (the pickers' hidden inputs, date-time-picker, combobox, tag-input, multi-select-with-extras, segment-group, …) keeps its own state when its form is reset, so what the user sees and what the form submits can diverge. → P10-T1.
  2. Native Popover API and CSS anchor positioning. Its popover uses popover="auto" with showPopover({ source }), which brings top-layer stacking, Escape and outside-click (light) dismissal from the browser, and positions with position-area / position-try-fallbacks / anchor-size() instead of script. Lily's headless Popover renders only while open and leaves Escape, outside click and positioning to the consumer. → P10-T2 (design pass; browser support must be checked, not assumed).
  3. Touch target size. It enlarges controls under @media (pointer: coarse) (a 2.75rem minimum). None of Lily's 45 themes has a coarse-pointer rule, though Lily targets WCAG 2.2 AAA, whose 2.5.5 asks for 44×44 CSS px targets. → P10-T3.
  4. Report contrast, don't repair it. Its theme tooling is to validate final contrast pairs and report failures without silently replacing the author's colours. bin/check-theme checks no contrast today; the error-text defect closed in P9-T13 was found by an axe sweep, not by the theme check. → P10-T4.
  5. One compact agent entry per component. Its /llms.txt gives every component the same short block — purpose, one working example, and all props on one line, required first, with types and defaults — generated from the docs pages' own prop data, with a contributor rule that any public API change updates it. Lily's llms.txt is a curated map; per-component props live only in components/*/AGENTS.md. → P10-T5.
  6. Copy-into-project distribution. Each component carries a registry.json (files, exports, dependencies); one loader validates ids, file existence and an acyclic dependency graph, and add previews add / unchanged / conflict files and asks before each overwrite. Lily publishes whole libraries; a copy path would let a team own one component's source without forking a catalog. A maintainer decision, not a task yet. → P10-T6.
  7. Choice chips on real inputs. Its pill choice group is a radiogroup of radio inputs (single) or a group of checkboxes (multiple), each visually a pill and optionally deletable — real form controls under a chip skin. Lily has tag-group, segment-group and toggle-group, but no filter-chip group whose items are form inputs. → P10-T7 — decided 2026-10-11: no new component; radio-group / checkbox-group with a chip look, documented as a composition pattern.

Not adopted. Its English defaults ("Select…", "Tree view", "No options found") — Lily takes every string from the consumer. The surface() paint recipe and glass variants — visual decisions that belong in Lily's themes, not its headless layer. The Material Symbols font dependency — Lily bundles no fonts or icon sets. Select options as aria-pressed buttons rather than a listbox, and a tree view that is a group of buttons rather than a tree — Lily's existing select and tree-* semantics are the stronger choice. Its "seekable" progress bar that becomes a range input — Lily keeps progress and slider separate.

Research findings (2026-10-21): capabilities and code quality

An audit of the tree as it stands on 2026-10-21 (commit c25bfe528). Every number below was measured that day by a command run against the working tree; nothing is carried over from earlier sections.

What is strong

  • Breadth and parity are real. 581 catalog rows; nine headless libraries (Alpine.js joined 2026-10-21, Web Components at 546); 167 helper packages; bin/check-coverage and bin/check-class-names keep the catalogs in step.
  • Contracts are machine-checked. bin/test exits 0 and gates required files, links, class names, shared-module drift, example-component drift, label packs, helper docs and theme conformance. Few design systems check this much.
  • The grid-like helpers are tested in depth where it matters most: the Svelte, React, Vue and Angular data grids each carry ~2,650 lines of tests against ~3,300 lines of source; pure logic lives in shared/ with its own tests.
  • Low debt markers. 108 TODO/FIXME and 62 files with a type or lint suppression across ~190 subprojects.

What needs work

  1. No lint, no formatter, no typecheck in CI. None of the nine headless libraries has an ESLint or Prettier config. svelte-check exists only as a check script in the 16 Svelte helpers and the SvelteKit app — not in svelte-headless, and ci.yml never runs it. tsc --noEmit on react-headless reports 405 errors (389 in *.stories.tsx: stories without args; 16 in tests: missing required props, unknown as ReactNode); the components themselves type-check clean. Types are what consumers rely on, and nothing guards them. → P12-T1, P12-T2, P12-T3.
  2. Keyboard behaviour is missing in Angular and HTML, and test depth is uneven. Mean test cases per component file: Web Components 6.0, Nunjucks 6.1, React 5.8, Vue 5.7, Svelte 5.4 — but Angular 2.7, HTML 2.7, Alpine 2.3. Digging in (2026-10-21) showed the cause is not only thin tests: of 162 components with a documented keyboard contract, 23 handle keys in Svelte's source and none do in Angular's (Dialog, Menu, TabBar are bare wrappers) or in the HTML library's component files, while the HTML index.md claims "full keyboard support for all interactive components". A keyboard-test heuristic that only counts tests (159 of 162 "missing" in Angular) overstates the gap, since many contracts are native (button); the behaviour gap is the real one. → P12-T4, P12-T4a, P12-T5.
  3. bin/test takes 5 m 42 s (25 s user, 215 s system — filesystem-bound), against a ~63 s baseline and a <20 s target set in Phase 7. A five-minute local gate gets skipped. → P12-T7.
  4. CI installs are not reproducible. Every pnpm install in ci.yml (six sites) uses --no-frozen-lockfile, so a CI run can resolve different versions from the committed lockfiles and pass on code nobody pinned. → P12-T6.
  5. Dependency drift across 141 independent lockfiles. No root workspace; ~24 GB of node_modules across subprojects. Ranges in use: vitest ^4.0.0 / ^4.1.11 (15 packages) vs ^5.0.x (122); typescript ^5.9.3 (90) vs ^6.0.3 (43); svelte ^5.0.0 (17) vs ^5.57.x (18). Every bump is 141 separate edits and 141 installs. → P12-T8.
  6. HTML and Web Components helpers are hand-kept duplicates. data-grid.ts differs by 4 lines out of 2,066; the kanban, Gantt and data-grid element files by 0 of 581; calendar by 10 of 1,797. AGENTS/helpers.md says the two "must be kept in step deliberately, since nothing ports between them automatically". That is the same drift problem bin/sync-shared-modules solved for shared/; generate one from the other with the tag prefix as the only parameter. → P12-T9.
  7. Shared modules ship as copies. search-text.ts exists in 39 packages, export-data.ts in 29, edit-history.ts in 28. The drift check makes this safe; it does not make a bug fix one release. The @lilydesignsystem/core package from spec/headless-improvements Tier 2.2 is the durable fix. → P12-T10 (maintainer decision).
  8. Monolithic helper components. DataGrid.svelte 1,843 lines, KanbanBoard.svelte 1,496, GanttChart.svelte 1,304, CalendarView.svelte 1,179 — each port mirrors the size. Logic that is not rendering (sorting, filtering, selection, column state, windowing) can move to tested pure modules in shared/ the way grid navigation did, shrinking every port at once. → P12-T11.
  9. Picker attributes have no default styling in the themes. text-size-picker sets data-text-size and motion-picker sets data-motion, but none of the 57 themes/*.css reacts to either; only the docs site's own style.css maps text size. A consumer who installs a picker and a theme sees a picker that does nothing. Also: 2 of 57 themes handle forced-colors, none prefers-contrast. → P12-T12, P12-T13.
  10. Stale counts and maps. spec/index.md still says "491-component catalog" in its topic table and §2, and "150 implementation subprojects / 133 helper packages" in §3; this plan's "Current state" says 172 subprojects and omits Alpine entirely. Actual: 187 subprojects = 9 headless + 8 example apps + 133 helpers + 27 skills + 9 locale-translations + themes. → P12-T14.
  11. Root clutter. Five one-off scripts at the root (generate-component-demos.js, generate-component-docs.js, upgrade-component-docs.js, upgrade-html-component-demos.js, upgrade-subproject-docs.js), last touched April–September 2026; only the first is referenced (by bin/generate-registries). → P12-T15.
  12. Lessons backlog is not in tasks.md. The bootstrap (10 items), daisyUI (11), ShardsUI (4) and coss (items 1, 4, 5, 6 still open) topics each list planned work that has no task ID, so it cannot be scheduled or closed. → P12-T16.
  13. bin/check-links failed (26 broken links, later 86; fixed 2026-10-25 and now run by bin/test) in the /components/{slug}.md copies added by c25bfe528; bin/test still passed because it does not run bin/check-links, contrary to "Current state" above. → P12-T17.

Advice, in priority order

  1. Guard what consumers touch first: typecheck and lint in CI (P12-T1–T3) and frozen lockfiles (P12-T6). Cheap, and both stop silent regressions in published packages.
  2. Close the keyboard-behaviour gap in Angular and HTML for the 23 components Svelte implements, or correct the claim (P12-T4/T4a/T5). This is the accessibility claim; it should be the best-tested thing in the repo.
  3. Make bin/test fast again (P12-T7) so the gate is actually run.
  4. Stop hand-copying: generate the Web Components helpers from the HTML ones (P12-T9), then decide on a root pnpm workspace (P12-T8) and the core package (P12-T10). These cut future maintenance cost the most.
  5. Close the capability gaps users would notice: themes that honour data-text-size / data-motion and forced-colors (P12-T12/T13).
  6. Defer new components until 1–3 land; the catalog is broad, the guarantees behind it are the weaker half.

Phase 12 — Code quality and capability gaps (2026-10-21)

Goal: make the guarantees as strong as the breadth. Tasks P12-T1 to P12-T17 in tasks.md.

  1. Static checks in CI: lint + typecheck for every TypeScript catalog and helper; fix the React story/test types.
  2. Behaviour tests: keyboard and ARIA-state tests for interactive components in Angular, HTML and Alpine.
  3. Fast, reproducible verification: bin/test under a minute; frozen lockfiles in CI; one dependency policy.
  4. Less duplication: Web Components helpers generated from HTML; pure helper logic moved into shared/; decide the workspace and core-package questions.
  5. Theme capability: default data-text-size, data-motion and forced-colors handling in all 57 themes.
  6. Truth: restamp counts in spec/index.md and this plan; tidy root scripts; turn the lessons topics into tasks; fix the broken generated links.

Phase 13 — chanhdai.com and sv-chanhdai lessons (2026-10-22)

Goal: adopt the packaging and contract ideas from two reviewed repositories without importing their styling or effects. Tasks P13-T1 to P13-T16 in tasks.md; detail and sources in spec/chanhdai-lessons.

  1. Repo and tooling hygiene: a generated-files table, --dry-run scaffolders, golden tests for the generators, a port-parity check (P13-T1, T4, T5, T7).
  2. AI-readable surface: .md twins of every page and one per-component URL convention (P13-T2, T3).
  3. Contracts: reduced-motion sections, the async-button pending contract, the APG carousel and slider tightening (P13-T6, T9, T14, T15).
  4. Recipes, no endpoints: open-in-assistant links and package-manager tabs (P13-T8, T10).
  5. New components: wheel-picker and middle-truncation; decisions on item, frame, highlight, annotation (P13-T11, T12, T13).
  6. Decisions: record the declines (slide-to-unlock, apple-hello-effect) and the open questions (P13-T16).

Sequencing: P13-T3 and P13-T16 need a maintainer decision before code. P13-T14 and P13-T15 start by reading the Svelte source, because they were scoped from the docs. The new components follow the existing rule: Svelte first, then the other seven libraries. These are lower priority than Phase 12's guards (the plan's own advice: defer new components until the static checks and keyboard-test work land).

Research findings (2026-10-29): competitive position

A review of the seven rows in COMPARE.md §"Where the alternatives are stronger". Each row was checked against what the named competitors ship in October 2026 and against the tree on 2026-10-29. Detail, sources and the full per-row table: spec/competitive-position.

Assessment

The seven rows share one root cause: competitors win on evidence, and Lily wins on breadth. Base UI (1.0 in December 2025), Ark UI and React Aria are trusted because their behaviour has years of exercise and because they publish how they test it. React Aria names its screen-reader and browser matrix. Carbon and USWDS publish conformance material. shadcn made copying a tool. Lily has 609 components × 8 frameworks, so every unit of proof costs it more than it costs them. Adding breadth widens the gap. Making proof cheaper and concentrating it closes the gap.

What the research found, in brief:

  1. COMPARE.md is partly out of date.
    • Ark UI now ships Svelte, so it covers React, Solid, Vue and Svelte through one Zag.js state machine per component.
    • "Nothing else spans this range" holds only because Web Awesome, whose custom elements run in every framework, is not in the matrix.
    • Radix and React Aria are recommended in the prose but have no matrix column, and Base UI is absent.
  2. Behaviour is ported by hand eight times. Angular reached the 23 keyboard components on 2026-10-22, and RFC 3 records shipped defects in exactly that code. shared/ holds navigation helpers but no popup or composite state machines.
  3. The platform has caught up, and Lily barely uses it.
    • Popover API is Baseline 2025, anchor positioning Baseline 2026, and command invokers were in Interop 2025.
    • In Svelte, 14 components use popover and none uses commandfor.
    • Native primitives are behaviour the browser vendors already test.
  4. The copy path can use shadcn's tooling as it stands. shadcn CLI 3 installs from any namespaced registry. Lily's /r/{slug}.json uses its own schema, so npx shadcn add cannot read it.
  5. The tokens are almost standard. color and dimension follow DTCG 2025.10. The 114 fluidDimension tokens use a type the spec does not define, so strict parsers reject them. There is no Resolver document.
  6. Proof Lily could have today is missing. All 20 rows of the screen-reader matrix are empty, there is no ACR, and 151 of 582 components are stable.
  7. Support is undefined rather than absent. There is no published support or deprecation policy and no second publisher.

Advice, in priority order

  1. Fix what COMPARE.md says (P16-T1) and fill the screen-reader matrix (P16-T9). Both are cheap, and they are the evidence everything else cites.
  2. Use the platform and the standard (P16-T4 native primitives, P16-T6 strict DTCG). These are mechanical changes, and each one lowers future proof cost.
  3. Concentrate proof on a named Core tier (P16-T2), and write the behaviour once (P16-T3, which is how P12-T10 would be delivered). Claims outside Core say "beta", which answers RFC 1 without cutting the catalog.
  4. Adopt shadcn's registry schema rather than building lily add (P16-T5, which resolves P10-T6).
  5. After Core exists: a self-assessed ACR (P16-T7) and a funded external audit (P16-T8).
  6. At any time: a support policy and a second publisher (P16-T10), and public-sector reference versions (P16-T11).

Not adopted: a Figma component library (P5-T5 stands), Zag.js as a dependency (it has no Angular, Blazor, Nunjucks or Alpine adapter), shadow DOM, and a default visual design.

Phase 16 — Competitive position (2026-10-29)

Goal: make Lily's claims as strong as its competitors' by making proof cheaper and concentrating it, without adding breadth. Tasks P16-T1 to P16-T11 in tasks.md; rationale in spec/competitive-position.

  1. Truth: COMPARE.md corrected and the matrix widened (T1).
  2. Evidence: the screen-reader matrix filled (T9), and a Core tier with a generated quality page (T2).
  3. Cheaper proof: one behaviour core with thin adapters (T3), and native primitives first (T4).
  4. Standards, not rivals: a shadcn-compatible registry (T5), and strict DTCG 2025.10 with a Resolver document (T6).
  5. Assurance: a self-assessed ACR (T7) and an audit funding application (T8).
  6. Sustainability: a support policy and a second publisher (T10), and public-sector reference versions (T11).

Status 2026-10-29:

  • Done: T1, T2, T6, T7 and T11. Core has 0 of 40 candidates, because the evidence does not exist yet.
  • Partly done: T3 (the listbox machine, Svelte and React only), T4 (the audit, plus a <select> prototype in Svelte only), T5 (React only; its CI job has not yet run on GitHub) and T10 (no second publisher yet).
  • Open: T8 and T9.
    • T8: the NGI Zero Commons Fund closed, and NLnet's 2026-10 AI policy bars AI-written proposals.
    • T9: needs a human screen-reader session.
  • New findings to schedule:
    • five components claim aria-modal without trapping focus;
    • no component uses the Popover API;
    • the NHS England and NHS Scotland themes reference nhsuk-frontend 9.x, against 10.7.1 current;
    • every Playwright config runs Chromium only.

Phase 20 — Investigate a SolidJS port (2026-10-30)

Goal: decide, with evidence, whether Lily gains a SolidJS family as a peer of Svelte, React, Vue, Angular, Blazor, Nunjucks, HTML, Web Components and Alpine: a headless library, the helper packages and an example app. Investigation only; no port starts before the decision. Task P20-T1 in tasks.md.

  1. Fit: Solid's JSX and fine-grained signals against Lily's contracts: rest-props (splitProps, never destructured props), class hooks (class, not className), bindable open state, SSR with SolidStart, the Popover API and showModal() paths, and whether the shared modules (shared/listbox-machine.ts, grid navigation) drop in unchanged.
  2. Cost: a spike porting a sample (one container, one form control, Listbox, Dialog, DataTable parts, one picker) from the React headless library, measuring how mechanical the translation is; tests with @solidjs/testing-library and Vitest; Storybook and docs-site support; the recurring cost of a tenth framework in bin/check-coverage, bin/check-class-names, bin/check-port-parity, publishing, skills and the label-pack loaders.
  3. Alternatives: Solid renders custom elements well, so the Web Components catalog may already serve Solid users; measure what they lose (typed props, SSR, events) before choosing a full port.
  4. Decision: port (all 609 components, the 20 helpers, a SolidStart example app), a partial port, or decline with Web Components as the documented route, recorded in spec/frameworks.

Phase 21 — Visual identity principles (2026-11-01)

Goal: give Lily a written visual-identity policy and the small mechanisms that let an adopter apply their own identity without forking a theme or giving up accessible contrast. Research, assessment and advice: spec/visual-identity. Tasks P21-T1 to P21-T8 in tasks.md.

Advice, in priority order:

  1. Write the policy first (T1): cheap, and it fixes what every later item may and may not do.
  2. Split brand colour from content colour (T3), then the brand overlay (T2): together they are the main adopter value, and the overlay needs the split to check contrast.
  3. Logo slot composition (T4) and font licence audit (T5): documentation and a column; no new component.
  4. Icon contract (T6), theme-color (T7), identity change log (T8): small and independent.

Not adopted: a logo or guideline generator, bundled marks, imagery rules in the headless layer, motion identity, one clear-space number.

Sequencing and dependencies

Finished phases (1 to 7 and 18), their sequencing notes and the original definition of done are in spec/history.

  • Phase 13 is unscheduled and lower priority than Phase 12; see its own sequencing note.
  • Phase 16 has no hard dependency on Phase 12 except T3, which needs the P12-T10 decision.
    • Do T1 and T9 first.
    • T7 needs T2, and T2 needs T9.
    • T5 resolves P10-T6.
    • T4's <select> prototype is the evidence RFC 3 asks for.
  • Phase 20 is an investigation with no dependency; the spike reuses the React headless library as its source and should follow the P12-T10 shared-core decision if that lands first.
  • Phase 21: T1 first; T3 before T2 and T7 (both read --lily-brand); T2 should reuse the theme generator format from spec/daisyui-lessons item 3 rather than invent a second one; T4 to T6 and T8 are independent.
  • Phase 12: static checks and frozen lockfiles first (they protect everything after), then behaviour tests, then the duplication work; P12-T8 and P12-T10 need a maintainer decision before any code.

Definition of done

  • Each open phase is done when every one of its tasks in tasks.md is checked and its Verify line passes.
  • bin/test and bin/check-links pass.
  • Outcomes are folded back into spec/ (the topic the phase changes), CHANGELOG.md, and NEWS.md where users see them; a finished phase moves to spec/history.

Phase 22 — Lessons topics triaged into tasks (2026-11-02)

The 29 untasked items in the Bootstrap, daisyUI, ShardsUI and coss ui lessons topics, each now a task in tasks.md. Order: P22-T20 now (no AA failures remain); P22-T13 is the keystone, since P22-T14, T15 and the mode axis wait on it; P22-T3 before T4; P22-T27 before T11; P22-T18 before T19. Six are maintainer decisions (T3, T13, T16, T18, T24, T28).

Phase 23 — Design system survey (2026-11-03)

A survey of 18 systems Lily had not reviewed in depth: React Aria, Base UI, Angular Aria, Cauldron, Lion, KoliBri, NL Design System, Aksel, Designsystemet, Suomi.fi, UAE, UX4G, GOV.CO, Diia, Primer, Polaris, EUI and PatternFly. Full findings and limits: spec/design-system-survey-lessons. Tasks: tasks.md.

The finding: the strongest systems give adopters proof tools (pattern testers, lint rules, codemods, published evidence), where Lily's checks run only in this repository. Order: P23-T15 now (a real docs defect); P23-T1 next, the most valuable, since a shared tester addresses parity across eight catalogs and Core's criterion (a), 3 of 40; then P23-T2 and P23-T3 (CSP is never mentioned, and public-sector adopters are the likeliest to run strict policies); then P23-T9 and T4. P23-T7 waits for P22-T19 and P23-T8 for P22-T23. Four are maintainer decisions (T4, T6, T13, T14). On 2026-11-03 T15, T4 and T14 were finished and T1, T2, T3 and T6 taken to a first stage; each task records what is open. None of this overtakes the screen-reader matrix (P16-T9), which remains the first priority, and only T14 would add components.

Phase 24 — Local CI/CD (2026-11-04)

Assessment of running verification and release on the maintainer's machine instead of leaning on GitHub Actions. Full findings and the options not taken: spec/local-ci. Tasks: tasks.md.

The finding: the premise is half right. The repository is public, so GitHub-hosted runners cost nothing, and the self-hosted fee GitHub announced was postponed with no new date. Reliability is the real problem: the last six CI runs on main failed. What was read in the logs is the repository's own doing (Firefox and WebKit are not installed for the Playwright jobs that now run them, a node:url type error in a helper's test config, a spell-check failure), and there is no concurrency control, so six runs stacked up in an hour. Order: P24-T1 first, since nothing can replace a red gate; then P24-T2 (bin/ci), the keystone that T3, T5, T6 and T10 build on; P24-T4 needs nothing and can go at any time. P24-T7 and T8 are trials; P24-T9 is a maintainer decision.

Phase 26 — Wheel picker lessons from detent (2026-11-10)

A review of detent (React) and its Svelte 5 port svelte-detent, two styled wheel pickers on their own physics engine. Full findings and what is declined: spec/detent-lessons. Tasks: tasks.md.

The finding: Lily's wheel-picker is a wheel in name only. Its roles and keys are right, but scrolling it by mouse wheel, trackpad or touch only moves the view, so the option in the centre is not the value. Fixing that (P26-T1) needs P26-T2 first, since without block padding the first and last options can never reach the centre. P26-T3 is a small form fix, and a disabled picker is submitted today. Then P26-T6 (several wheels, and the open date-time-picker wiring), P26-T5 (a CSS drum recipe) and P26-T7 (a rule for animated text). P26-T4 (horizontal) is a maintainer decision. The physics engine, the visual effects, haptics, sound and key acceleration are declined: they are animation and styling, or they fight the user's own settings.

Status (2026-11-10): T1 to T10 are done.

Phase 27 — Healthcare user interfaces (2026-11-13)

Research into clinical portal software, results and reporting, prescribing and medicines administration, decision support and hospital operations dashboards. Full findings, sources and what is declined: spec/healthcare-ui. Tasks: tasks.md.

The finding: Lily has the large clinical pieces (medical banner, care card, the patient banner composition, 164 national identifiers, the charts) but not the small display contracts that clinical screens repeat everywhere and where errors harm people: a result with its range and flag, an allergy status that is never blank, a medicine written the ISMP way, a CDS Hooks decision-support card, an age in the right units, an early warning score shown but not computed. Seven components (P27-T2 to T7) and one shared formatting module (T1, first) cover them; the patient banner gains testable rules (T8); five example pages (T9) and an adopter guide (T10) show them in use. The standards are international (FHIR, CDS Hooks, the International Patient Summary, UCUM), with national guidance (NHS CUI, ISMP, the Australian and Canadian tall man principles) cited where it agrees.

The boundary is the important part: Lily ships no clinical logic, content or licensed instrument. No scoring, centiles or dose calculation (that makes software a medical device, and it belongs in the adopter's validated code), no drug or terminology data, no tall man list, no Wong-Baker FACES and no NEWS2 chart replica. Limiting open records is declined on the evidence. T11 (body-map) and T12 (a 0 to 10 scale) are maintainer decisions.

Status (2026-11-14): T1 to T12 done (catalog 617); T11 and T12 on the maintainer's approval.

Phase 28 — Lessons from the International Patient Summary viewer (2026-11-14)

A review of the international-patient-summary-ui-with-svelte specification, a read-only FHIR IPS viewer built on Lily's Svelte packages. Every Lily component it names exists, but its needs show where Phase 27 stops short of FHIR: allergy criticality and verification status, a never-blank status for medications and problems (and a section the document omits), the quantity comparator, the rest of FHIR's result statuses, a medicine's status and free-text dose, and a search picker that a client-side viewer can leave out. The healthcare components are also not yet published. Findings: spec/healthcare-ui. Tasks: tasks.md.

Status (2026-11-14): T1 to T9 done (catalog 629: the record lists, with allergy-list renamed allergy-record-list); released to npm and NuGet the same day.

Phase 29 — Lessons from openEHR (2026-11-16)

A review of openEHR, the open standard for health records: its Reference Model data types and absence codes, its record model (entries, the Instruction State Machine, versions, attestation, feeder audit) and the forms built on its templates (Medblocks UI). openEHR is a data standard, so the lessons are display and input contracts: partial dates, "not applicable", approximate quantities, proportions, durations, named reference ranges, whose record an entry is about, a quantity with its unit, and a mapping table for adopters. A form generator, archetypes, terminology and clinical logic are declined. Findings: spec/lessons/openehr. Tasks: tasks.md.

Status (2026-11-16): researched; nothing built. T1 to T4 first (small changes to existing contracts that stop a screen adding precision or attribution the record lacks); T9 and T10 are maintainer decisions.

Phase 30 — Lessons from OpenEMR (2026-11-16)

A review of OpenEMR, the open-source EHR and practice management application. It adds no components: Phases 27 and 28 cover what its clinical screens need. It shows how those screens go wrong (status by colour alone, a blinking overdue entry, a board that refreshes itself, several patients open in tabs, a review of systems where "not asked" reads as "denied"), so the work is three example pages, safety rules and patterns for the healthcare guide, and an audit of the calendar helper. Billing, US code sets, e-prescribing and integrations are declined. Findings: spec/lessons/openemr. Tasks: tasks.md.

Status (2026-11-16): researched; nothing built. T1 and T2 (guide rules) first; T5 after Phase 29's T4 and T9.

Phase 31 — Lessons from ZoBlocks (2026-11-16)

A review of ZoBlocks, an MIT healthcare component library for React typed to FHIR R4, Lily's closest peer. Both refuse a blank for a missing value. ZoBlocks adds what Lily lacks: coverage statements (what a list is a view of), withheld and in-error entries kept visible, a corrected result that keeps the superseded value, signature outcomes other than "signed" with a typed alternative, menus that name their subject first, and grid focus that follows the row. The last is a defect in Lily's data grid: focus is kept by row index, so a sort moves it to another patient. Declined: a mixed switch (not valid ARIA), English sentences built inside components, themed loaders. Findings: spec/lessons/zoblocks. Tasks: tasks.md.

Status (2026-11-16): researched; nothing built. T1 (the data grid fix) first.

Phase 32 — Lessons from Magic UI (2026-11-16)

A review of Magic UI, 150+ animated React components (MIT) installed through a shadcn registry namespace. It is almost all motion and decoration, which Lily's headless and reduced-motion rules decline, and its pages reviewed mention no reduced motion, pause control or ARIA. The lessons are narrow: an overflow count on avatar-group, a hover-and-focus rule, a motion recipes page that shows how to get such effects on Lily components without failing WCAG, an opt-in view transition for the theme picker, a terminal transcript pattern, and, for the maintainer, an accessible marquee and a namespaced registry listing. Findings: spec/lessons/magicui. Tasks: tasks.md.

Status (2026-11-16): researched; nothing built.

Phase 33 — Lessons from OpenMRS (2026-11-17)

A review of OpenMRS 3, the open-source medical record used in more than 70 countries, built on React and IBM Carbon. Its styleguide source shows the defects Lily's healthcare contracts exist to prevent: a result with no reference range, or one still loading, is treated as "normal"; an abnormal value is colour and a title; every empty widget says "There are no {items}"; a failed load shows an HTTP status with no retry. The work is a never-normal test, guide rules for load failures, off-scale results, the session location, the active visit and banner flags, a non-modal workspace panel on the dashboard page, and a "saved on this device" provenance state. Findings: spec/lessons/openmrs. Tasks: tasks.md.

Status (2026-11-17): researched; nothing built. T1 first.

Phase 34 — Lessons from Retool's input components (2026-11-17)

A review of Retool's 2021 announcement of 35+ rebuilt input components for its low-code builder. Lily already has nearly all of them. Four gaps: a two-thumb range on native inputs, a combobox that says when nothing matches and how many do, a drop zone on file-upload that keeps the button as the keyboard path, and (for the maintainer) a multi-select listbox. Guide patterns for formatted numbers while editing and for long lists. Declined: relative-date parsing and silent number clamping, which change what the user typed. Findings: spec/lessons/retool. Tasks: tasks.md.

Status (2026-11-17): researched; nothing built. T2 first.

Phase 39 — Worldwide keyboard navigation

The 2026-11-19 review found a shared keyboard defect across listboxes and grids. A list of names starting with 𠮷 or 가 could be navigated with arrows, but typing the initial failed to advance. The shared fix uses Unicode characters for cycling. A Svelte component test presses the keys and checks which option the listbox exposes through aria-activedescendant. Menus, tree popups and wheel pickers now have the same Unicode initial coverage. The next exercise is to observe how a browser handles a Japanese or Korean input method. Tasks and acceptance criteria.

Two existing evidence gaps have higher priority for a production rollout. The worldwide check reports 64 label packs, with 63 awaiting native-speaker review. Start with the languages and workflows of the intended deployment, including spoken labels for keyboard actions. All 40 Core candidates meet the project's automated keyboard and browser criteria; zero meet its screen-reader criterion. Record a representative workflow using the existing session script and matrix before making a conformance claim for it. Label review · Core evidence · Screen-reader session.

Phase 40 — Lessons from commercial health record products (2026-11-20)

A review of 24 screenshots of Epic, athenaOne, eClinicalWorks, AdvancedMD, McKesson Practice Choice and the Welltory consumer app. Most of what they show Lily already has or has planned from the earlier healthcare reviews. The new work is small: a change and an "as of" time on statistic, a native <meter> for a result's place in its range, a formatRange that cannot print a range backwards, option groups in listbox, the name a patient wants used and their pronouns in the banner, guide rules for icon-only columns, data freshness and derived scores, and a results inbox page. The screens also show what to avoid: colour-only flags, truncated icon-column headers, details shown only on hover, and unexplained scores. Declined: voice assistants, telehealth, maps, risk-adjustment scoring and any product look-alike theme. Findings: spec/lessons/ehr-products. Tasks: tasks.md.

Status (2026-11-20): T1 to T9 done (T8 mapped, T9 decided and deferred); T10, the filter summary with the next label-pack round, remains.

Research findings (2026-11-22): mobile UI for Apple and Android

Adopters asked for the same Lily semantics in their native mobile apps. This is a major upgrade: Lily's first targets that are not the web. Full research and advice: spec/apple-swift and spec/android-kotlin.

Assessment

  • What carries over is the contracts, not the markup. Native control first (the mobile form of "semantic element first"), accessibility modifiers or semantics only where it falls short, no hardcoded strings, consumer-supplied locale, RTL, keyboard contracts (iPad, Chromebooks, desktop windowing, Switch Control), target sizes, and the system's text size, motion and contrast settings, never Lily's. The suffix table, the CSS template, landmarks, skip links, page shells and HTML tables on phones do not carry over.
  • Headless maps differently on each platform. SwiftUI has no unstyled layer, so Lily's headless equivalent is a style protocol per component with a plain default (as ButtonStyle works). Compose has one, compose.foundation, so Lily's components can depend on it alone and keep Material 3 as an optional adapter.
  • The catalog shrinks; the value concentrates. Navigation, overlays and most form controls are the platform's own and must stay so (VoiceOver and TalkBack behaviour, Liquid Glass, Material 3 Expressive, future OS changes). Lily's mobile value is the 188 national identifier components (validation, formatting, keyboard, no autocorrect or autofill leak, a spoken form), the healthcare components, and small semantic content components (summary list, error summary, warning text). Every slug has a recorded decision (mobile/components-mobile.tsv): 145 Lily components plus the 188 identifiers on Apple, 157 plus the identifiers on Android.
  • Logic is shared through test vectors. The shared/ modules (and identifier validation, once written: no catalog has it yet, see P43-T4) are ported by hand to Swift and Kotlin and proved equal to the TypeScript with JSON vectors. A Kotlin Multiplatform core for Swift, JavaScriptCore, and Swift on Android (Swift 6.3) were each assessed and declined as too heavy a runtime dependency for a design system.
  • Publishing differs. Maven Central publishes from the monorepo as npm does. SwiftPM needs Package.swift at a repository root, so the Swift package needs a read-only export repository, pushed by subtree like the docs site: a deliberate, recorded exception to the 2026-10-10 "no mirrors" decision. CocoaPods trunk goes read-only in December 2026.
  • Helpers mostly become the platform's. Text size and motion pickers are declined (system settings); locale, share, search and date-time are native; brand theme and time-zone pickers are kept; a colour picker is a real gap on Compose only.
  • Accessibility evidence is in demand. The European Accessibility Act covers apps (EN 301 549 clause 11) and the App Store's Accessibility Nutrition Labels ask apps to declare support; Lily Core needs VoiceOver and TalkBack evidence per component before it makes a mobile claim.

Advice, in priority order

  1. Decide before building: the semantics map and a per-component mobile decision, checked in bin/test (P43-T1, T2).
  2. Make the logic portable: vectors for the shared modules (P43-T3). Identifier validation exists in no catalog, so P43-T4 is writing it, one identifier at a time from an official source, after a maintainer decision on whether inputs validate.
  3. Generate tokens and ship label packs for both platforms (P43-T5, T6).
  4. Build both platforms side by side on the same first slice (field, error summary, summary list, alert and friends), then the healthcare and identifier components, then the example apps (Phases 44 and 45).
  5. Publish only after the example apps pass their accessibility audits and size sweeps; ask before the first push to the Swift export repository and the first Maven Central release.

Phase 43 — Mobile foundations (2026-11-22)

Shared by Apple and Android: the semantics map, a mobile decision per component, test vectors, identifier validation (to be written) in shared/, Swift and Kotlin tokens, label packs as mobile resources. Tasks: tasks.md.

Status (2026-11-22): T1 and T2 done (mobile/, bin/check-mobile-catalog); T3 started (88 vectors, which found and fixed an ageParts bug).

Phase 44 — Apple Swift (2026-11-22)

One SwiftPM package, lily-design-system-swift (LilyCore, LilyUI, LilyIdentifiers, LilyThemes), SwiftUI-first with style protocols, Swift 6, iOS 18 and later; UIKit apps host it. An example app, a skill, and a subtree export repository for SwiftPM. Findings: spec/apple-swift. Tasks: tasks.md.

Status (2026-11-22): lily-design-system-swift exists, unreleased: LilyCore passes the shared vectors and LilyUI has a first slice of six components (P44-T1 done, T2 and T3 in progress).

Phase 45 — Android Kotlin (2026-11-22)

One Gradle build, lily-design-system-kotlin (lily-core multiplatform, lily-compose on foundation only, identifiers, themes, an optional Material 3 adapter), Kotlin 2.4, published to Maven Central from the monorepo. An adaptive example app and a skill; Compose Multiplatform on iOS tested as a bonus, not the Apple product. Findings: spec/android-kotlin. Tasks: tasks.md.

Status (2026-11-22): lily-design-system-kotlin exists, unreleased: lily-core passes the shared vectors and lily-compose has the same first slice as Swift, on foundation only (P45-T1 done, T2 and T3 in progress).


Lily™ and Lily Design System™ are trademarks.