@imfusion/web-ui 0.6.4-dev.8.g41d03f2f → 0.6.4-dev.84.gbfc0d437

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/README.md +19 -55
  2. package/dist/assets/vendors/base-ui.d.ts +2 -3
  3. package/dist/breakpoints/min-width.d.ts +3 -7
  4. package/dist/breakpoints/registry.d.ts +3 -9
  5. package/dist/{code-Ce8uiPsv.js → code-D2lwxHgd.js} +15 -15
  6. package/dist/codegen/gen-breakpoints-css.d.ts +0 -4
  7. package/dist/codegen/gen-token-css.d.ts +0 -2
  8. package/dist/components/app-shell/app-shell.d.ts +7 -11
  9. package/dist/components/button/button.d.ts +7 -12
  10. package/dist/components/callout/callout.d.ts +11 -18
  11. package/dist/components/card/card.d.ts +11 -10
  12. package/dist/components/checkbox/checkbox.d.ts +2 -38
  13. package/dist/components/chip/chip.cva.d.ts +2 -4
  14. package/dist/components/chip/chip.d.ts +1 -1
  15. package/dist/components/code/code.d.ts +2 -2
  16. package/dist/components/collapsible/collapsible.d.ts +4 -35
  17. package/dist/components/copy-button/copy-button.d.ts +1 -1
  18. package/dist/components/drawer/drawer.d.ts +17 -100
  19. package/dist/components/field/field.d.ts +7 -67
  20. package/dist/components/fieldset/fieldset.d.ts +2 -15
  21. package/dist/components/icon/icon.d.ts +2 -2
  22. package/dist/components/input/input.d.ts +2 -8
  23. package/dist/components/logo/imfusion/imfusion.d.ts +2 -5
  24. package/dist/components/logo/imfusion/marks.d.ts +10 -0
  25. package/dist/components/logo/logo.d.ts +3 -3
  26. package/dist/components/navigation-menu/subs/flyout-link.d.ts +5 -19
  27. package/dist/components/navigation-menu/subs/inline-submenu.d.ts +2 -4
  28. package/dist/components/navigation-menu/subs/link.d.ts +6 -23
  29. package/dist/components/navigation-menu/subs/overlay.d.ts +6 -51
  30. package/dist/components/navigation-menu/subs/shared.d.ts +4 -14
  31. package/dist/components/navigation-menu/subs/structure.d.ts +7 -29
  32. package/dist/components/navigation-menu/subs/trigger.d.ts +11 -20
  33. package/dist/components/number-field/index.d.ts +2 -0
  34. package/dist/components/number-field/number-field.d.ts +72 -0
  35. package/dist/components/number-field/number-field.meta.d.ts +2 -0
  36. package/dist/components/popover/popover.d.ts +23 -98
  37. package/dist/components/row/row.d.ts +1 -1
  38. package/dist/components/select/select.d.ts +26 -189
  39. package/dist/components/separator/separator.d.ts +5 -4
  40. package/dist/components/slider/slider.d.ts +7 -77
  41. package/dist/components/spinner/spinner.d.ts +13 -8
  42. package/dist/components/stack/stack.d.ts +3 -4
  43. package/dist/components/switch/switch.d.ts +2 -31
  44. package/dist/components/table/table.d.ts +10 -18
  45. package/dist/components/tabs/tabs.d.ts +18 -52
  46. package/dist/components/toast/toast.d.ts +16 -103
  47. package/dist/components/toggle/toggle.d.ts +3 -21
  48. package/dist/components/toggle-group/toggle-group.d.ts +3 -20
  49. package/dist/components/tooltip/tooltip.d.ts +26 -85
  50. package/dist/components/typo/typo.d.ts +25 -25
  51. package/dist/docgen/gen-docgen.utils.d.ts +3 -4
  52. package/dist/hooks/use-color-scheme.d.ts +5 -11
  53. package/dist/hooks/use-media-query.d.ts +2 -7
  54. package/dist/{icons-Cy1HAosO.js → icons-CaGCCwG-.js} +7 -7
  55. package/dist/icons.js +1 -1
  56. package/dist/index.d.ts +1 -0
  57. package/dist/index.js +1486 -1368
  58. package/dist/integrations/code-highlight/highlighter.d.ts +1 -56
  59. package/dist/integrations/code-highlight.js +41 -189
  60. package/dist/integrations/image-display-options/image-display-options-view.utils.d.ts +0 -1
  61. package/dist/integrations/image-display-options.js +54 -54
  62. package/dist/llms/evals/runner/affected.d.ts +2 -0
  63. package/dist/llms/evals/runner/benchmark.d.ts +12 -0
  64. package/dist/llms/evals/runner/compare.d.ts +2 -0
  65. package/dist/llms/evals/runner/config.d.ts +29 -0
  66. package/dist/llms/evals/runner/evidence.d.ts +7 -0
  67. package/dist/llms/evals/runner/execute.d.ts +32 -0
  68. package/dist/llms/evals/runner/grade.d.ts +10 -0
  69. package/dist/llms/evals/runner/report-md.d.ts +2 -0
  70. package/dist/llms/evals/runner/report.d.ts +4 -0
  71. package/dist/llms/evals/runner/run.d.ts +2 -0
  72. package/dist/llms/evals/runner/scenario.d.ts +3 -0
  73. package/dist/llms/evals/runner/types.d.ts +140 -0
  74. package/dist/llms/evals/runner/workspace.d.ts +2 -0
  75. package/dist/llms/evals/runner/write-generated.d.ts +1 -0
  76. package/dist/provider/web-ui-provider.d.ts +4 -1
  77. package/dist/style.css +1 -1
  78. package/dist/{tabs-DIe1Utiy.js → tabs-By5ir2pt.js} +162 -159
  79. package/dist/tokens/apply.d.ts +4 -9
  80. package/dist/tokens/control-registry.d.ts +3 -6
  81. package/dist/tokens/types.d.ts +7 -24
  82. package/dist/tokens/use-token-controls.d.ts +3 -12
  83. package/dist/types/meta.d.ts +15 -32
  84. package/dist/utils/index.d.ts +1 -0
  85. package/dist/utils/resolve-state-props.d.ts +4 -0
  86. package/dist/vite/brand-assets.d.ts +3 -0
  87. package/dist/vite/index.d.ts +2 -0
  88. package/dist/vite/readable-css-module-names.d.ts +11 -0
  89. package/dist/vite.js +55 -0
  90. package/dist/web-ui-cli.js +322 -0
  91. package/docs/user-guide/AgentTooling.mdx +127 -0
  92. package/docs/user-guide/BrandAssets.mdx +102 -0
  93. package/docs/user-guide/Changelog.mdx +23 -0
  94. package/docs/user-guide/GettingStarted.mdx +70 -0
  95. package/docs/user-guide/HowItsBuilt.mdx +113 -0
  96. package/docs/user-guide/Tokens.mdx +87 -0
  97. package/docs/user-guide/UsagePatterns.mdx +122 -0
  98. package/package.json +27 -22
  99. package/src/assets/public/favicon/apple-touch-icon.png +0 -0
  100. package/src/assets/public/favicon/favicon-16.png +0 -0
  101. package/src/assets/public/favicon/favicon-32.png +0 -0
  102. package/src/assets/public/favicon/favicon.ico +0 -0
  103. package/src/assets/public/favicon/favicon.svg +7 -0
  104. package/src/assets/public/favicon/icon-192.png +0 -0
  105. package/src/assets/public/favicon/icon-512.png +0 -0
  106. package/src/assets/public/favicon/og-image.png +0 -0
  107. package/src/assets/public/spinner/imfusion-spinner-black.webp +0 -0
  108. package/src/assets/public/spinner/imfusion-spinner-blue.webp +0 -0
  109. package/src/assets/public/spinner/imfusion-spinner-white.webp +0 -0
  110. package/src/docgen/doc.gen.json +3255 -603
  111. package/src/llms/install-templates/AGENTS.md +4 -4
  112. package/src/llms/install-templates/hooks/baseline-staleness.sh +9 -2
  113. package/src/llms/llms.gen.txt +7 -1
  114. package/src/llms/skills/imf-web-ui/SKILL.md +44 -21
  115. package/src/llms/skills/imf-web-ui-audit/SKILL.md +25 -11
  116. package/src/llms/skills/imf-web-ui-components/SKILL.md +4 -1
  117. package/src/llms/skills/imf-web-ui-conventions/SKILL.md +2 -2
  118. package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +0 -1
  119. package/src/llms/skills/imf-web-ui-conventions/templates/REPORT.md +21 -2
  120. package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +15 -10
  121. package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +7 -4
  122. package/src/llms/skills/imf-web-ui-conventions/topics/data.md +3 -1
  123. package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +2 -2
  124. package/src/llms/skills/imf-web-ui-conventions/topics/git.md +4 -2
  125. package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +10 -1
  126. package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +2 -2
  127. package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +4 -2
  128. package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +13 -11
  129. package/src/llms/skills/imf-web-ui-setup/SKILL.md +17 -9
  130. package/src/llms/skills/imf-web-ui-update/SKILL.md +36 -14
  131. package/src/llms/skills/imf-web-ui-ux/SKILL.md +5 -3
  132. package/src/llms/tokens.gen.json +71 -7
  133. package/bin/install.js +0 -446
  134. package/dist/build/vite-css-module-names/index.d.ts +0 -20
  135. package/dist/build/vite-css-module-names.js +0 -17
  136. package/dist/components/spinner/spinner.geometry.d.ts +0 -37
  137. package/dist/integrations/code-highlight/languages/cmake.d.ts +0 -1
  138. package/dist/integrations/code-highlight/languages/cpp.d.ts +0 -1
  139. /package/dist/{meta-CySnRuVp.js → meta-j-7HGrWv.js} +0 -0
@@ -20,11 +20,11 @@ or suggesting a command.
20
20
 
21
21
  <The installer owns only the fenced block below. It refreshes that block on every install; the rest belongs to the project.>
22
22
 
23
- <!-- imf-web-ui:begin — managed by `npx web-ui-install`; edits inside the fence are overwritten -->
23
+ <!-- imf-web-ui:begin — managed by `npx web-ui install`; edits inside the fence are overwritten -->
24
24
 
25
- `.agents/skills/imf-web-ui-*` is vendored from `@imfusion/web-ui` and resynced with `npx web-ui-install`. Do not edit the
26
- vendored copy or put project-specific conventions there. Load the matching skill before changing UI, styles, data, tests, or
27
- docs.
25
+ `.agents/skills/imf-web-ui-*` is vendored from `@imfusion/web-ui` and resynced with `npx web-ui install skills`. Do not edit
26
+ the vendored copy or put project-specific conventions there. Load the matching skill before changing UI, styles, data, tests,
27
+ or docs.
28
28
 
29
29
  <!-- imf-web-ui:end -->
30
30
 
@@ -6,11 +6,18 @@ PKG=node_modules/@imfusion/web-ui/package.json
6
6
  [ -f "$PKG" ] || exit 0
7
7
  CURRENT=$(node -p "require('./$PKG').version" 2>/dev/null) || exit 0
8
8
 
9
- for marker in .agents/skills/imf-web-ui-*/.imf-web-ui-skill-version.json; do
9
+ # .claude/skills may be a symlink to .agents/skills; skip markers already read.
10
+ seen=""
11
+ for marker in .agents/skills/imf-web-ui*/.imf-web-ui-skill-version.json .claude/skills/imf-web-ui*/.imf-web-ui-skill-version.json; do
10
12
  [ -f "$marker" ] || continue
13
+ real=$(cd "$(dirname "$marker")" && pwd -P)/$(basename "$marker")
14
+ case " $seen " in
15
+ *" $real "*) continue ;;
16
+ esac
17
+ seen="$seen $real"
11
18
  INSTALLED=$(node -p "require('./$marker').version" 2>/dev/null) || continue
12
19
  if [ "$INSTALLED" != "$CURRENT" ]; then
13
- echo "imf-web-ui skills are stale ($INSTALLED installed, package is $CURRENT) — run: npx web-ui-install"
20
+ echo "imf-web-ui skills are stale ($INSTALLED installed, package is $CURRENT) — run /imf-web-ui-update, or: npx web-ui install skills && npx web-ui install hooks"
14
21
  break
15
22
  fi
16
23
  done
@@ -113,6 +113,12 @@ Navigation menu with horizontal or vertical triggers and anchored flyout panels.
113
113
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .navigation-menu (jq: jq '.navigation-menu' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
114
114
  - further reading (usage/anatomy, not props): https://base-ui.com/react/components/navigation-menu.md
115
115
 
116
+ ## NumberField
117
+ - category: Inputs, status: experimental
118
+ Numeric entry with increment and decrement controls. Also called a number field, spinner, or stepper; use it instead of Input with type="number" whenever a value is numeric. NumberField.Stepper composes the whole control in one element and takes a scrub prop that turns its label into a drag handle.
119
+ - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .number-field (jq: jq '.number-field' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
120
+ - further reading (usage/anatomy, not props): https://base-ui.com/react/components/number-field.md
121
+
116
122
  ## Popover
117
123
  - category: Display, status: stable
118
124
  Floating panel anchored to a trigger for contextual content, quick forms, or actions. Also called a popup or flyout; use Tooltip for hints without interaction.
@@ -195,5 +201,5 @@ Hover- or focus-triggered label for brief help about a control or term. Also cal
195
201
 
196
202
  ## Typo
197
203
  - category: Display, status: stable
198
- Semantic text primitives for headings, paragraphs, lists, quotes, links, and inline code. The namespace uses native HTML elements and token-based text roles.
204
+ Semantic text primitives for display and standard headings, paragraphs, lists, quotes, links, and inline code. The namespace uses native HTML elements and token-based text roles.
199
205
  - props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .typo (jq: jq '.typo' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
@@ -1,45 +1,68 @@
1
1
  ---
2
2
  name: imf-web-ui
3
3
  description:
4
- "Route UI work in a project that uses @imfusion/web-ui. Use this skill whenever a user adds, edits, styles, or reviews UI
5
- in a consumer project, even if they do not mention the library. Decide whether guidance is needed, then open only the
6
- companion skills that match the task."
4
+ "Route UI work and library questions in a project that uses @imfusion/web-ui. Use this skill whenever a user adds, edits,
5
+ styles, or reviews UI, or asks about library setup, brand assets, favicons, theming, or usage in a consumer project, even
6
+ if they do not mention the library. Open only the matching packaged guide or companion skill."
7
7
  ---
8
8
 
9
9
  # Route Web UI work
10
10
 
11
- Start here for UI work in a project that uses `@imfusion/web-ui`. This skill is a map, not a second copy of every convention.
11
+ Start here for UI work and library questions in a project that uses `@imfusion/web-ui`. This skill is a map, not a second
12
+ copy of every convention.
12
13
 
13
14
  ## 1. Decide whether guidance is needed
14
15
 
15
- Skip a companion when the task is explicit and small, an existing local pattern already solves it, and the library usage is
16
- already correct. Do the work. Look up an API silently only when you are unsure.
16
+ Skip a companion when the task is explicit and small, an existing local pattern already solves it in the file being changed,
17
+ and the library usage is already correct. Do the work. Look up an API silently only when you are unsure.
17
18
 
18
- Use a companion when the task involves a choice, a missing setup piece, a new file, or a library convention the project may
19
- not already have.
19
+ Use a companion when the task involves a choice, a missing setup piece, a new UI file, or a library convention the project
20
+ may not already have. Open a companion by invoking its skill; reading one of its files directly does not load its workflow.
20
21
 
21
22
  ## 2. Route the task
22
23
 
23
- | Task | Open |
24
- | ----------------------------------------------------------------- | ------------------------------------------------------ |
25
- | Look up a component, part, prop, default, or icon | `imf-web-ui-components` |
26
- | Choose components or shape a screen or flow | `imf-web-ui-ux` |
27
- | Write or update documentation | `/documentation-writer`, then `imf-web-ui-conventions` |
28
- | Write a wrapper, custom UI, CSS, data layer, validation, or tests | `imf-web-ui-conventions` |
29
- | Install the library or bootstrap project tooling | `imf-web-ui-setup` |
30
- | Inspect an existing project without changing it | `imf-web-ui-audit` |
31
- | Update the package, skills, or hooks | `imf-web-ui-update` |
24
+ | Task | Open |
25
+ | -------------------------------------------------------------------- | -------------------------- |
26
+ | Understand library setup, brand assets, theming, or usage | Packaged user guides below |
27
+ | Look up a component, part, prop, default, or icon | `imf-web-ui-components` |
28
+ | Choose components or shape a screen, form, or flow | `imf-web-ui-ux` |
29
+ | Write or update documentation | `imf-web-ui-conventions` |
30
+ | Write a wrapper, custom UI, CSS, data layer, validation, or tests | `imf-web-ui-conventions` |
31
+ | Choose a routing, data, form, or validation library for the project | `imf-web-ui-conventions` |
32
+ | Install the library or bootstrap project tooling | `imf-web-ui-setup` |
33
+ | Diagnose a broken install: unstyled output, missing tokens, no theme | `imf-web-ui-setup` |
34
+ | Inspect an existing project without changing it | `imf-web-ui-audit` |
35
+ | Update the package, skills, or hooks | `imf-web-ui-update` |
32
36
 
33
- A screen often needs both `imf-web-ui-ux` and `imf-web-ui-components`, in that order. Setup and audit are for project-wide
34
- questions, not every one-file edit.
37
+ A new form opens `imf-web-ui-ux`, even when its fields and action are already specified. A screen often needs both
38
+ `imf-web-ui-ux` and `imf-web-ui-components`, in that order. Setup and audit are for project-wide questions, not every
39
+ one-file edit.
40
+
41
+ ### Read a packaged user guide
42
+
43
+ Read only the matching page under `node_modules/@imfusion/web-ui/docs/user-guide/` in the consumer project:
44
+
45
+ | Question | Page |
46
+ | ------------------------------------------------------------------------ | -------------------- |
47
+ | What the library provides, installation, stylesheet, and provider wiring | `GettingStarted.mdx` |
48
+ | Favicons, social sharing images, and static brand files | `BrandAssets.mdx` |
49
+ | Composition, CSS overrides, state attributes, and color schemes | `UsagePatterns.mdx` |
50
+ | Token families and customization | `Tokens.mdx` |
51
+ | Agent skills, hooks, and their installation | `AgentTooling.mdx` |
52
+ | Library boundaries and implementation choices | `HowItsBuilt.mdx` |
53
+
54
+ Read MDX as text. Its imports, JSX previews, and Storybook navigation are presentation, not instructions to install or run
55
+ Storybook in the consumer. Cite the packaged page when answering a library question. Use `imf-web-ui-components` for exact
56
+ props and the conventions `tokens` topic for exact token names and defaults.
35
57
 
36
58
  ## 3. Keep project choices
37
59
 
38
60
  The host project's existing conventions win. The companion skills fill gaps; they do not justify refactoring a working
39
61
  styling system, state library, or folder structure.
40
62
 
41
- When a task needs TanStack Router, Query, Form, Table, or Store and the project has no incumbent, propose the matching
42
- library and read its current documentation with `npx @tanstack/cli` before using it.
63
+ When a task needs TanStack Router, Query, Form, Table, or Store and the project has no incumbent, open
64
+ `imf-web-ui-conventions` for the house position on that layer, then read the library's current documentation with
65
+ `npx @tanstack/cli` before using it. The recommendation lives in the conventions topics, not here.
43
66
 
44
67
  ## 4. Ask only when the choice depends on missing context
45
68
 
@@ -10,22 +10,35 @@ allowed-tools: Read Glob Grep
10
10
 
11
11
  # Audit a consumer project
12
12
 
13
- This is a read-only audit. Compare the project with the selected `imf-web-ui-conventions` topics, report evidence, and end
14
- with work the human can approve. The baseline is an ImFusion default, not a universal law; a deliberate project choice is a
15
- deviation, not a defect.
13
+ This is a read-only audit. Its job is to align a project with its conventions: compare the project against the selected
14
+ `imf-web-ui-conventions` topics, report evidence, and end with work the human can approve.
15
+
16
+ A gap against a convention is high severity: the project agreed to the conventions. Only a deliberate, stated reason to
17
+ differ lowers it.
18
+
19
+ Anything else belongs under `Suggestions`: findings from running the code, investigating, or reading through. Report it, keep
20
+ it low, and do not let it crowd the sections a consumer has to act on.
16
21
 
17
22
  ## Workflow
18
23
 
19
24
  1. Resolve the argument. Bare means `full`; an unknown topic is an error, not a reason to widen the scope.
20
25
  2. Enter plan mode unless this audit is being called as verification by another skill or the host has no plan mode.
21
- 3. Assign one investigator to each in-scope topic. An investigator checks every section in that topic and writes nothing. If
22
- the host cannot dispatch agents, inspect the topics inline in the same order.
26
+ 3. Read the report template and existing reviewer notes, then dispatch one investigator per in-scope topic. Tell each
27
+ investigator to use only `Read`, `Glob`, and `Grep`, with no shell commands or writes. An investigator checks every
28
+ section in that topic and writes nothing. Once dispatch starts, the host performs no repository inspection: the returned
29
+ reports are the evidence, and the host merges them without reading or searching the files again. Gathering the evidence
30
+ twice spends context on the second pass and reports what the host still remembers. Inspect a topic inline only after its
31
+ dispatch has been tried and refused, and say which attempt failed.
23
32
  4. Merge the evidence into the shared report format in
24
- [`templates/REPORT.md`](../imf-web-ui-conventions/templates/REPORT.md).
25
- 5. Put each finding's `Next action` into an ordered plan, grouped by topic and cheapest first. Present the report and wait
26
- for approval; an audit does not edit the project.
33
+ [`templates/REPORT.md`](../imf-web-ui-conventions/templates/REPORT.md). Before presenting or writing it, check that every
34
+ Broken, Missing, Deviation, and Unverified entry has a severity, evidence, impact, and next action; do not compact
35
+ Unverified entries.
36
+ 5. Put each finding's `Next action` into an ordered plan, grouped by topic and cheapest first. The plan is separate from the
37
+ report contract: present it in the host plan or response, never as another heading in `AUDIT_REPORT.md`. Present the
38
+ report and wait for approval; an audit does not edit the project.
27
39
 
28
- If the caller needs a durable report, write `AUDIT_REPORT.md` and preserve everything under `## Reviewer notes` verbatim.
40
+ If the caller needs a durable report, write `AUDIT_REPORT.md` with exactly the template's H2 headings and preserve everything
41
+ under `## Reviewer notes` verbatim.
29
42
 
30
43
  ## Finding format
31
44
 
@@ -37,8 +50,9 @@ Classify every result as one of these:
37
50
  - **Present**: the rule is met, with evidence.
38
51
  - **Unverified**: static inspection cannot establish it.
39
52
 
40
- Use the report contract's severity, `path:line` evidence, concrete impact, and smallest next action. Do not promote an
41
- optional tool or a working alternative to a missing finding.
53
+ Use the report contract's severity, `path:line` evidence, concrete impact, and smallest next action. Unverified entries use
54
+ that same structure: unavailable runtime evidence, the impact of the unknown, and the check that resolves it. Do not promote
55
+ an optional tool or a working alternative to a missing finding.
42
56
 
43
57
  ## Topics
44
58
 
@@ -39,6 +39,9 @@ Use the generated package indexes. They are smaller and more reliable than readi
39
39
  Use `doc.gen.json` for Web UI props. A linked upstream page is useful for behavior, composition, and accessibility, but its
40
40
  prop table is not authoritative for this package.
41
41
 
42
+ A `variant` value belongs to the component that defines it; one component's list is not a global one. `brand` means identity
43
+ color and `primary` means the action color, even where they look alike.
44
+
42
45
  ## If the component is missing
43
46
 
44
47
  Treat a missing identity-index entry as a real gap. Do not invent an API or silently import the upstream component. Report
@@ -87,7 +90,7 @@ A component whose identity entry says it comes from `@imfusion/web-ui/integratio
87
90
  listed optional peer explicitly, then import from that path:
88
91
 
89
92
  ```tsx
90
- import { Code } from "@imfusion/web-ui/integrations/code-highlight";
93
+ import { ImageDisplayOptions } from "@imfusion/web-ui/integrations/image-display-options";
91
94
  ```
92
95
 
93
96
  ## Data grids
@@ -45,5 +45,5 @@ state without changing files.
45
45
 
46
46
  ## Documentation
47
47
 
48
- Invoke `/documentation-writer` for new or updated documentation. Use the `docs-structure` topic for repository-specific
49
- boundaries and conventions; it supplies context for the writer and does not replace the writer's workflow.
48
+ Use the `docs-structure` topic for new or updated documentation. If `/documentation-writer` is available, invoke it for the
49
+ page type and outline; the topic supplies the repository-specific boundaries.
@@ -37,7 +37,6 @@ sections one to one — change a topic's sections and this file follows in the s
37
37
  - [ ] Compose, don't configure
38
38
  - [ ] Put state where its truth lives
39
39
  - [ ] Effects: last resort, and named
40
- - [ ] Reading list
41
40
 
42
41
  ## Components — `components`
43
42
 
@@ -12,8 +12,23 @@ Broken, Missing, Deviations, and Unverified entries use:
12
12
  - Impact: concrete consequence
13
13
  - Next action: smallest selectable follow-up
14
14
 
15
- Present entries name the topic and evidence path. Deviations are selectable follow-up work, not defects. Optional tools are not
16
- missing findings.
15
+ Present entries name the topic and evidence path. Optional tools are not missing findings.
16
+
17
+ Where a finding belongs follows from where it came from, not from how strongly you hold it.
18
+
19
+ A convention names it:
20
+ - Broken: the convention is followed but does not work. Something is unmounted, unwired, or fails at runtime.
21
+ - Missing: a convention expects it and the project has nothing there.
22
+ - Deviations: it works, and differs from what a convention says.
23
+
24
+ These three are high severity by default. The project agreed to the conventions; a gap against them is not a preference.
25
+ Drop the severity only when the project shows a deliberate reason to differ, and say what the reason is.
26
+
27
+ Nothing names it:
28
+ - Suggestions: real improvements that no convention asks for. What running the code revealed, what an investigation turned
29
+ up, what a reader would tidy on their way past. Never high severity, and never a reason to hold up the work.
30
+
31
+ - Unverified: it could not be checked from the files available.
17
32
  -->
18
33
 
19
34
  ## Verdict
@@ -32,6 +47,10 @@ None.
32
47
 
33
48
  None.
34
49
 
50
+ ## Suggestions
51
+
52
+ None.
53
+
35
54
  ## Present
36
55
 
37
56
  None.
@@ -1,33 +1,38 @@
1
1
  # Agent tooling
2
2
 
3
- `npx web-ui-install` manages the Web UI skills and optional lifecycle hooks in a consumer project. This topic explains the
4
- choices around that installer.
3
+ `npx web-ui install` manages the Web UI skills and optional lifecycle hooks in a consumer project.
5
4
 
6
5
  ## The skill bundle
7
6
 
8
- Run:
7
+ Run, on a first install:
9
8
 
10
9
  ```sh
11
- npx web-ui-install
10
+ npx web-ui install skills --harness=claude
12
11
  ```
13
12
 
14
13
  It installs or refreshes the `imf-web-ui-*` skills, updates the managed `AGENTS.md` fence, and removes skills that the
15
- package no longer ships. The installer remembers `.claude/skills/`, `.agents/skills/`, or both. Use `--target claude|agents`
16
- to choose explicitly and `--reconfigure` to choose again.
14
+ package no longer ships. The skills always live in `.agents/skills/`. `--harness` selects `claude`, which also links each
15
+ skill into `.claude/skills/`, `codex`, or `all`; without it, the command prompts and remembers the choice. Pass
16
+ `--reconfigure` to choose again. On a project that already has an install, re-running `install skills` without `--harness`
17
+ reuses the remembered harness instead of narrowing it.
17
18
 
18
19
  Skill version markers (`.imf-web-ui-skill-version.json`) show which package version installed each skill. Refresh them with
19
20
  the installer; do not hand-edit the vendored files.
20
21
 
21
22
  ## The hooks
22
23
 
23
- Install the optional lifecycle hooks with:
24
+ `install hooks` requires the skills to already be installed for the target harness; without them, it errors and tells you to
25
+ run `install skills` first:
24
26
 
25
27
  ```sh
26
- npx web-ui-install --hooks
28
+ npx web-ui install skills --harness=claude
29
+ npx web-ui install hooks --harness=claude
27
30
  ```
28
31
 
29
- The installer owns the scripts under `.agents/hooks/imf-web-ui/` and merges its registrations into Claude Code and Codex
30
- settings. It refreshes scripts and removes retired registrations without replacing unrelated entries.
32
+ The installer owns the scripts under `.agents/hooks/imf-web-ui/` and merges its registrations into the registration file for
33
+ the chosen harness only: Claude Code's `.claude/settings.json`, Codex's `.codex/hooks.json`, or both with `--harness=all`. It
34
+ refreshes scripts and removes retired registrations without replacing unrelated entries, and removes its registrations from a
35
+ harness that is not selected.
31
36
 
32
37
  The shipped events are:
33
38
 
@@ -2,8 +2,11 @@
2
2
 
3
3
  ## Importing
4
4
 
5
- Import files from `src/assets/` so the bundler fingerprints and includes them. Do not reference an asset through a
6
- public-path string.
5
+ Import application images from `src/assets/` so the bundler fingerprints and includes them. Use public URLs for files
6
+ consumed by document metadata or manifests, with a build step that serves the files at those URLs.
7
+
8
+ For the library's favicon set and social sharing image, read `BrandAssets.mdx` through the packaged user-guide route in
9
+ `imf-web-ui`.
7
10
 
8
11
  ## Photographs: WebP
9
12
 
@@ -17,8 +20,8 @@ Keep the long edge at 2000px or less. WebP is supported by the browser floor.
17
20
 
18
21
  ## Other formats
19
22
 
20
- Use PNG when the image needs alpha or exact pixels. Use an inline SVG component for icons, logos, and line art so it inherits
21
- `currentColor` and follows the theme.
23
+ Use PNG when the image needs alpha or exact pixels. Use an inline SVG component for in-app icons, logos, and line art so it
24
+ inherits `currentColor` and follows the theme.
22
25
 
23
26
  ## Scope
24
27
 
@@ -85,7 +85,9 @@ export function getDetails(options?: QueryOptions<User>) {
85
85
  }
86
86
  ```
87
87
 
88
- Callers choose `ensureQueryData`, `useSuspenseQuery`, or another Query API.
88
+ Callers choose `ensureQueryData`, `useSuspenseQuery`, or another Query API. Mutation factories likewise return
89
+ `mutationOptions`, own their mutation key and parsing, and are passed to `useMutation`; do not inline those options at the
90
+ call site.
89
91
 
90
92
  ## Router context access
91
93
 
@@ -1,7 +1,7 @@
1
1
  # Documentation structure
2
2
 
3
- Keep repository docs useful to a human who has just joined the project. Invoke `/documentation-writer` for new or updated
4
- documentation. The setup skill can propose the shape; the audit skill can check it.
3
+ Keep repository docs useful to a human who has just joined the project. The setup skill can propose the shape; the audit
4
+ skill can check it.
5
5
 
6
6
  ## The shape
7
7
 
@@ -18,7 +18,8 @@ The hooks are tracked in `.githooks/`. Check both the Git setting and the direct
18
18
 
19
19
  There are two scopes:
20
20
 
21
- - **staged**: `verify:staged`, run by pre-commit. It is fast and checks the staged files plus relevant project-wide checks.
21
+ - **commit**: `verify:staged`, run by pre-commit. It checks whole-repository lint and formatting, then runs project checks
22
+ for staged inputs.
22
23
  - **full**: `verify:full`, the build and complete verification used by CI.
23
24
 
24
25
  The scripts under `scripts/verify/` own the step lists. Hooks and npm scripts only launch them.
@@ -26,4 +27,5 @@ The scripts under `scripts/verify/` own the step lists. Hooks and npm scripts on
26
27
  ## Staleness at commit time
27
28
 
28
29
  Pre-commit also runs advisory checks for vendored skill markers and documentation drift. If a staged change makes a doc
29
- stale, update the doc in the same commit. For an outdated installed skill, run `npx web-ui-install` in the consumer project.
30
+ stale, update the doc in the same commit. For an outdated installed skill, run `npx web-ui install skills` (also
31
+ `npx web-ui install hooks` if the project uses hooks) with the project's existing `--harness` in the consumer project.
@@ -22,9 +22,18 @@ export function App() {
22
22
  Components outside the provider do not receive the library's provider context. Keep upstream imports behind the library; see
23
23
  [library-boundary.md](library-boundary.md).
24
24
 
25
+ The provider follows the OS color scheme by default. An app that paints its own surfaces from a fixed palette pins the scheme
26
+ instead, so component colors cannot resolve against the opposite scheme:
27
+
28
+ ```tsx
29
+ <WebUIProvider colorScheme="dark">
30
+ ```
31
+
25
32
  ## Symptoms of broken setup
26
33
 
27
34
  - Unstyled components usually mean the `styles.css` import is missing.
28
- - Wrong colors or unresolved variables usually mean the component is outside `WebUIProvider`.
35
+ - Unresolved variables usually mean the component is outside `WebUIProvider`.
36
+ - Light component colors inside a dark app (or the reverse) mean the scheme is following the OS against a fixed palette. Pin
37
+ `colorScheme` on the provider.
29
38
  - An integration import error usually means its optional peer is missing. Check the component entry in
30
39
  `imf-web-ui-components` for the package to install.
@@ -45,7 +45,7 @@ Do not target generated CSS Module class names and do not use `!important` to fi
45
45
  hook, not a state flag.
46
46
 
47
47
  ```css
48
- [data-imf-ui-component="Switch"][data-checked] {
48
+ [data-imf-ui-component="Switch.Root"][data-checked] {
49
49
  outline: var(--imf-ui-border-size-2) solid var(--imf-ui-color-fg-positive);
50
50
  }
51
51
  ```
@@ -56,7 +56,7 @@ Use surface roles (`main`, `support`, `minor`), the separate `brand` and `primar
56
56
  slots. Override a high-level control when a whole family should change; consume a semantic token in a component.
57
57
 
58
58
  Foreground roles are for text, icons, borders, and focus rings. Background roles are for fills. The provider sets
59
- `data-imf-ui-color-scheme="light" | "dark"` on `<html>`.
59
+ `data-imf-ui-color-scheme="light" | "dark"` on `<html>`, from the OS preference unless its `colorScheme` prop pins one.
60
60
 
61
61
  ## Browser floor
62
62
 
@@ -8,5 +8,7 @@ Read:
8
8
  node_modules/@imfusion/web-ui/src/llms/tokens.gen.json
9
9
  ```
10
10
 
11
- It contains the shipped token names and authored defaults. Look up the exact entry instead of guessing a plausible
12
- `--imf-ui-*` name or copying a token list into the project.
11
+ It contains the shipped token names and authored defaults. Before writing CSS, check every concrete `--imf-ui-*` name the
12
+ file will use against that index or the relevant component stylesheet. A family with one entry does not imply numbered
13
+ variants. When no matching token exists, use an existing documented seam or say that the token is absent instead of guessing
14
+ a plausible name.
@@ -1,6 +1,6 @@
1
1
  # Tooling
2
2
 
3
- Read this topic before adding a dependency or configuring a tool. Use the tool's current documentation rather than memory.
3
+ Use the tool's current documentation rather than memory.
4
4
 
5
5
  ## Topic-to-tool map
6
6
 
@@ -17,7 +17,7 @@ Read this topic before adding a dependency or configuring a tool. Use the tool's
17
17
  | Format | Prettier |
18
18
  | Lint | ESLint flat config |
19
19
  | Types | `tsc --noEmit` |
20
- | Staged files | lint-staged or nano-staged |
20
+ | Pre-commit checks | Whole-repository lint and format checks |
21
21
  | Dead code | Knip via `verify:knip` |
22
22
 
23
23
  ## When a library owns a layer
@@ -65,24 +65,26 @@ tests, requires the `#/` alias instead of parent-relative imports, and uses proj
65
65
  Use strict TypeScript with bundler module resolution, `verbatimModuleSyntax`, unused-value checks, and `#/` paths. Keep
66
66
  `import type` for type-only imports.
67
67
 
68
- ## Staged files
68
+ ## Pre-commit checks
69
69
 
70
- The staged-file runner applies ESLint fixes and Prettier writes only to staged files. It also runs the relevant project
71
- checks when source or config can affect the dependency graph.
70
+ The pre-commit hook checks the whole repository with ESLint and Prettier, then runs project checks for staged inputs that can
71
+ affect generated files, types, dependencies, or TeamCity configuration. It does not rewrite files during a commit; use
72
+ `npm run format` to apply Prettier changes explicitly.
72
73
 
73
- ## CSS class names
74
+ ## Vite plugins
74
75
 
75
- Register Web UI's `readableCssModuleNames` plugin in every compiler that processes the app's CSS, including development,
76
- Storybook, and production:
76
+ Register Web UI's Vite plugins in the application configuration:
77
77
 
78
78
  ```ts
79
79
  import { defineConfig } from "vite";
80
80
  import react from "@vitejs/plugin-react";
81
- import { readableCssModuleNames } from "@imfusion/web-ui/build/vite-css-module-names";
81
+ import { imfusionBrandAssets, readableCssModuleNames } from "@imfusion/web-ui/vite";
82
82
 
83
83
  export default defineConfig({
84
- plugins: [react(), readableCssModuleNames({ prefix: "app" })]
84
+ plugins: [react(), imfusionBrandAssets(), readableCssModuleNames({ prefix: "app" })]
85
85
  });
86
86
  ```
87
87
 
88
- A compiler left out of the plugin produces different class names and styles that appear to work only in some environments.
88
+ `imfusionBrandAssets` serves the complete favicon set during development and emits it at stable root URLs during builds.
89
+ Register `readableCssModuleNames` in every compiler that processes the app's CSS, including development, Storybook, and
90
+ production. A compiler left out produces different class names and styles that appear to work only in some environments.
@@ -5,7 +5,7 @@ description:
5
5
  needs library wiring, tooling, git, npm, authentication, structure, data, testing, docs, or agent tooling. Inspect first,
6
6
  propose concrete files, and write only what the user approves. Use imf-web-ui-audit for read-only checks."
7
7
  argument-hint: "[full|library-setup|tooling|git|npm-project|authentication|project-structure|docs-structure|data|testing|agent-tooling]"
8
- allowed-tools: Read Glob Grep Write
8
+ allowed-tools: Read Glob Grep Write Skill
9
9
  ---
10
10
 
11
11
  # Set up a consumer project
@@ -15,16 +15,24 @@ working choices.
15
15
 
16
16
  ## Workflow
17
17
 
18
- 1. Resolve the argument. Bare means `full`. A named topic limits the assessment to that topic. If the argument is unknown,
19
- list the supported topics and point to `imf-web-ui-audit`.
18
+ 1. Resolve the scope. A named topic limits the assessment to that topic. A bare invocation means `full`, unless the request
19
+ is about one topic, in which case that topic is the scope: answer what was asked and offer the wider sweep rather than
20
+ running it. If the argument is unknown, list the supported topics and point to `imf-web-ui-audit`.
20
21
  2. Enter the host's plan mode before inspecting or proposing changes.
21
22
  3. Read the selected convention topics and inspect the repository with `Read`, `Glob`, and `Grep` only.
22
23
  4. Put a complete proposal in the host plan, using [`templates/REPORT.md`](../imf-web-ui-conventions/templates/REPORT.md).
23
- For new or updated documentation, invoke `/documentation-writer` before writing and use the `docs-structure` topic for
24
- repository-specific boundaries. Name every file to create or change, include its intended content, and cite the repository
25
- evidence behind the choice.
26
- 5. Wait for explicit approval. After approval, write only the listed files.
27
- 6. Run `imf-web-ui-audit full` as a follow-up and review its findings before calling setup complete.
24
+ For new or updated documentation, use the `docs-structure` topic for repository-specific boundaries. Name every file to
25
+ create or change, include its intended content, and cite the repository evidence behind the choice.
26
+ 5. Wait for explicit approval. After approval, write only the listed files. Before calling setup complete, ensure every
27
+ package imported by those files and every tool named by their scripts is declared in `package.json`.
28
+ 6. Offer `imf-web-ui-audit full` as an optional next step for checking the wider project, and run it only if the user says
29
+ yes. Setup is complete once the approved files are written; the audit reviews ground setup did not touch.
30
+
31
+ ## Audit handoff
32
+
33
+ When the approved request includes an audit, the next tool call after the final setup write invokes `imf-web-ui-audit`
34
+ through the host's skill tool. Do not read audit files, inspect the project again, or dispatch audit investigators first;
35
+ reproducing the audit workflow does not load the skill.
28
36
 
29
37
  ## Greenfield `full` setup
30
38
 
@@ -41,7 +49,7 @@ The plan describes the exact starter files. It does not copy a generic starter p
41
49
 
42
50
  ## Installer steps
43
51
 
44
- For `agent-tooling`, list the `npx web-ui-install` commands as steps for the human. Read existing registrations first and do
52
+ For `agent-tooling`, list the `npx web-ui install` commands as steps for the human. Read existing registrations first and do
45
53
  not stack a hook on an event the project already covers. Include the Codex trust review when hooks are part of the plan.
46
54
 
47
55
  ## Safety