@imfusion/web-ui 0.5.1-dev.20.g9170acaf → 0.5.1-dev.21.g2accd17d

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.
package/README.md CHANGED
@@ -53,15 +53,16 @@ the directories it already installed into, without asking again — `--reconfigu
53
53
 
54
54
  **Available consumer skills - `/imf-web-ui-*`**
55
55
 
56
- | Skill | What it does |
57
- | ---------------------------------- | ----------------------------------------------------------------------------- |
58
- | `/imf-web-ui` | The router: decides whether guidance is needed, then which companion to open. |
59
- | `/imf-web-ui-library-setup` | One-time wiring in a consumer project — the styles import and the provider. |
60
- | `/imf-web-ui-components` | Component reference — what exists and how it's meant to be used. |
61
- | `/imf-web-ui-ux` | UX guidance for building interfaces with the library. |
62
- | `/imf-web-ui-frontend-conventions` | The frontend conventions baseline, including the sanctioned styling seams. |
63
- | `/imf-web-ui-frontend-setup` | Set up or audit an ImFusion frontend's tooling against the house baseline. |
64
- | `/imf-web-ui-agent-setup` | Install or update the vendored skills, agent hooks, and TanStack Intent. |
56
+ | Skill | What it does |
57
+ | ---------------------------------- | ------------------------------------------------------------------------------ |
58
+ | `/imf-web-ui` | The router: decides whether guidance is needed, then which companion to open. |
59
+ | `/imf-web-ui-library-setup` | One-time wiring in a consumer project — the styles import and the provider. |
60
+ | `/imf-web-ui-components` | Component reference — what exists and how it's meant to be used. |
61
+ | `/imf-web-ui-ux` | UX guidance for building interfaces with the library. |
62
+ | `/imf-web-ui-frontend-conventions` | The frontend conventions baseline, including the sanctioned styling seams. |
63
+ | `/imf-web-ui-frontend-setup` | Set up or audit an ImFusion frontend's tooling against the house baseline. |
64
+ | `/imf-web-ui-agent-setup` | Install or update the vendored skills, agent hooks, and TanStack Intent. |
65
+ | `/imf-web-ui-update` | Update the library, skills, and optional hooks, then verify before committing. |
65
66
 
66
67
  Start at `/imf-web-ui` — it routes to the rest. Storybook's **User Guide → AI Agents** page covers the whole family.
67
68
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imfusion/web-ui",
3
- "version": "0.5.1-dev.20.g9170acaf",
3
+ "version": "0.5.1-dev.21.g2accd17d",
4
4
  "description": "The official Web UI component library for ImFusion web apps",
5
5
  "author": "ImFusion GmbH",
6
6
  "license": "UNLICENSED",
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: imf-web-ui-update
3
+ description:
4
+ "Update @imfusion/web-ui in a consumer repository: refresh the package and vendored skills, audit and optionally install
5
+ lifecycle hooks, handle conflicts, verify the result, and obtain explicit approval before committing."
6
+ argument-hint: "[--dry-run] [optional version or reason]"
7
+ ---
8
+
9
+ # imf-web-ui-update
10
+
11
+ Update a repository that consumes `@imfusion/web-ui`. Preserve existing project choices and user work. Never commit without a
12
+ fresh explicit approval.
13
+
14
+ ## Rules
15
+
16
+ - Work from the frontend package root. In a monorepo, inspect package manifests and `git worktree list` first, then choose
17
+ the frontend package in the active worktree that uses web-ui. Read repository and component instructions before changing
18
+ files.
19
+ - Detect the package manager from lockfiles. Use npm for `package-lock.json`, pnpm for `pnpm-lock.yaml`, Yarn for
20
+ `yarn.lock`, and Bun for `bun.lock*`. If multiple lockfiles exist, stop and ask which is authoritative.
21
+ - A dry run is read-only. Do not install, run the installer, format, stage, commit, reset, or clean. Report what would run.
22
+ - Record the initial `git status --short`. Existing changes are held back, never staged or overwritten.
23
+ - A dirty file that the workflow needs to modify is a conflict. Stop and report it. This includes package files, installed
24
+ skill directories, the `AGENTS.md` installer fence, hook files, and hook settings.
25
+ - Do not hand-edit installer-owned skills, the `AGENTS.md` fenced block, or installer-owned hook files.
26
+
27
+ ## Preflight
28
+
29
+ 1. Select the frontend package in the active worktree and read its instructions, `package.json`, and lockfile.
30
+ 2. Check whether `@imfusion/web-ui` is already declared and record its installed/version-marker version.
31
+ 3. Record the worktree status and identify files the update would touch.
32
+ 4. Inspect `.agents/skills/`, `.claude/skills/`, the `AGENTS.md` fence, `.claude/settings.json`, and `.agents/hooks/`.
33
+ 5. Check for another package-manager process. Stop on any conflict or ambiguous target.
34
+
35
+ ## Update
36
+
37
+ In a non-dry run, update the dependency with the detected manager:
38
+
39
+ ```sh
40
+ npm install @imfusion/web-ui
41
+ ```
42
+
43
+ Use the equivalent command for another detected manager. Pass an explicit version only when the user supplied one. Do not use
44
+ `--force` or `--legacy-peer-deps` to make installation pass. Stop on install failure.
45
+
46
+ Then refresh the existing web-ui skill target:
47
+
48
+ ```sh
49
+ npx web-ui-install --skills
50
+ ```
51
+
52
+ Use the detected manager's runner for non-npm projects. Preserve the existing target (`.agents`, `.claude`, or both); do not
53
+ silently choose a new one. Stop on malformed settings or installer conflicts.
54
+
55
+ ## Hook audit
56
+
57
+ Audit these responsibilities separately: session start, prompt submit, and post-edit verification.
58
+
59
+ - If current web-ui hooks cover a responsibility, do not reinstall it.
60
+ - If no equivalent hook exists and the installer-owned destination is clean, ask whether to run:
61
+
62
+ ```sh
63
+ npx web-ui-install --hooks
64
+ ```
65
+
66
+ Run it only after the user accepts. Use the detected runner otherwise.
67
+
68
+ - If another hook covers a responsibility, do not stack a duplicate. Report the overlap and ask whether to leave hooks alone
69
+ or adapt the existing hook in a separate approved change.
70
+ - Invalid settings or dirty installer-owned hook files are conflicts. Stop and ask for resolution.
71
+
72
+ A declined hook offer is valid. Report `hooks: skipped by user` and continue.
73
+
74
+ ## Conflict and verification
75
+
76
+ After each mutating command, compare `git status --short` with the preflight snapshot.
77
+
78
+ Classify paths as:
79
+
80
+ - **Update-owned:** package files and installer-owned files changed by this workflow.
81
+ - **Held back:** pre-existing user changes, excluded from the commit.
82
+ - **Conflict:** an overlapping pre-existing change, ambiguous target, or unexpected changed path.
83
+
84
+ On conflict, stop. Never use `git restore`, `git reset`, `git clean`, or broad staging to hide it.
85
+
86
+ Run only scripts documented by the frontend's `package.json`. Verify the dependency/lockfile, current skill markers, the
87
+ `AGENTS.md` fence, hook coverage, and the final path list. In dry-run mode, say that mutation-dependent checks were skipped.
88
+
89
+ ## Report and approval
90
+
91
+ Before any commit, show this concise report:
92
+
93
+ ```text
94
+ @imfusion/web-ui update report
95
+ Package : <old> -> <new> / would update
96
+ Skills : <status>
97
+ Hooks : <status>
98
+ Verification : <status>
99
+ Update files : <paths>
100
+ Held back : <paths or none>
101
+ Conflicts : <paths or none>
102
+ Commit : <imperative message or not proposed>
103
+ ```
104
+
105
+ Normal mode: ask exactly, **“Approve these update-owned changes and commit them?”** Do not commit without an affirmative
106
+ answer. If denied, leave the changes uncommitted.
107
+
108
+ Dry-run mode: state **“Dry run complete; no changes or commit were made.”** Do not mutate or ask for commit approval.
109
+
110
+ ## Commit
111
+
112
+ After approval:
113
+
114
+ 1. Recheck status and exclude held-back paths.
115
+ 2. Stage update-owned paths selectively. Never use `git add .` or `git add -A`.
116
+ 3. Run the repository's commit workflow if it has one, including its required verification and documentation audit. Otherwise
117
+ run documented verification and follow the repository's commit convention.
118
+ 4. Commit with a concise imperative message and confirm the commit and final status. Never bypass hooks or amend an unrelated
119
+ commit after a hook failure.