@imfusion/web-ui 0.6.1-dev.9.g317bd6f2 → 0.6.2-dev.1.gf73fc5d3
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/LICENSE.txt +30 -0
- package/README.md +99 -173
- package/THIRD_PARTY_NOTICES.md +34 -0
- package/bin/install.js +28 -10
- package/dist/code-BFMQnmu9.js +147 -0
- package/dist/codegen/gen-code-highlight-theme.d.ts +1 -0
- package/dist/components/code/code.d.ts +5 -4
- package/dist/components/stack/stack.d.ts +1 -1
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/toast.d.ts +200 -0
- package/dist/components/toast/toast.meta.d.ts +2 -0
- package/dist/components/typo/typo.d.ts +23 -22
- package/dist/icons/icon-config.d.ts +12 -0
- package/dist/{icons-wBmF0U2x.js → icons-Cy1HAosO.js} +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1278 -1069
- package/dist/integrations/code-highlight/highlighter.d.ts +24 -0
- package/dist/integrations/code-highlight.js +80 -47
- package/dist/integrations/image-display-options.js +2 -2
- package/dist/provider/web-ui-provider.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/{tabs-CMKvMF4E.js → tabs-DIe1Utiy.js} +2 -0
- package/docs/assets/imfusion-banner.svg +16 -0
- package/package.json +10 -8
- package/src/docgen/doc.gen.json +515 -1
- package/src/llms/install-templates/AGENTS.md +15 -18
- package/src/llms/llms.gen.txt +39 -33
- package/src/llms/skills/imf-web-ui/SKILL.md +30 -39
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +50 -102
- package/src/llms/skills/imf-web-ui-components/SKILL.md +47 -104
- package/src/llms/skills/imf-web-ui-conventions/SKILL.md +44 -52
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +1 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +40 -62
- package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +11 -12
- package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +31 -46
- package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +18 -23
- package/src/llms/skills/imf-web-ui-conventions/topics/components.md +20 -69
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +50 -146
- package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +17 -23
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +15 -20
- package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +28 -19
- package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +20 -16
- package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +28 -42
- package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +28 -30
- package/src/llms/skills/imf-web-ui-conventions/topics/react.md +28 -74
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +65 -62
- package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +12 -14
- package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +9 -4
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +40 -68
- package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +26 -50
- package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +19 -25
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +45 -64
- package/src/llms/skills/imf-web-ui-update/SKILL.md +48 -114
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +64 -92
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +16 -36
- package/src/llms/skills/imf-web-ui-ux/references/usability-heuristics.md +14 -27
- package/src/llms/skills/imf-web-ui-ux/references/visual-design.md +22 -38
- package/src/llms/tokens.gen.json +5 -5
- package/bin/install.test.ts +0 -329
- package/dist/code-Blo48PGr.js +0 -136
- package/dist/icons/icon-config-provider.d.ts +0 -8
- package/dist/icons/icon-context.d.ts +0 -4
|
@@ -1,50 +1,44 @@
|
|
|
1
1
|
# Tooling
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
config.
|
|
3
|
+
Read this topic before adding a dependency or configuring a tool. Use the tool's current documentation rather than memory.
|
|
5
4
|
|
|
6
5
|
## Topic-to-tool map
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
| Types | `tsc --noEmit` — own script, own CI step |
|
|
24
|
-
| Staged files | [lint-staged](https://github.com/lint-staged/lint-staged) (or nano-staged, drop-in) |
|
|
25
|
-
| Dead code | [Knip](https://knipjs.dev) via `verify:knip` — needs per-repo config |
|
|
7
|
+
| Need | Default |
|
|
8
|
+
| --------------------- | -------------------------------------------- |
|
|
9
|
+
| Build | Vite |
|
|
10
|
+
| Routing and URL state | TanStack Router |
|
|
11
|
+
| Server state | TanStack Query |
|
|
12
|
+
| Forms | TanStack Form |
|
|
13
|
+
| Data grids | TanStack Table plus Web UI `Table` parts |
|
|
14
|
+
| App-wide client state | TanStack Store, after URL/server/local state |
|
|
15
|
+
| Schema validation | Zod at the boundary |
|
|
16
|
+
| Tests | Vitest |
|
|
17
|
+
| Format | Prettier |
|
|
18
|
+
| Lint | ESLint flat config |
|
|
19
|
+
| Types | `tsc --noEmit` |
|
|
20
|
+
| Staged files | lint-staged or nano-staged |
|
|
21
|
+
| Dead code | Knip via `verify:knip` |
|
|
26
22
|
|
|
27
23
|
## When a library owns a layer
|
|
28
24
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
Use the library that already owns the problem. Adopt Form for form rules, Query for caching and refetching, Router for URL
|
|
26
|
+
state, and Table for sorting and pagination instead of rebuilding those layers. Keep an existing project choice when it
|
|
27
|
+
works.
|
|
32
28
|
|
|
33
29
|
## Devtools
|
|
34
30
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- Check for a `-devtools` sibling on every new TanStack dependency — not every library has one yet.
|
|
38
|
-
- Once several are in, host them in one panel via `@tanstack/devtools`.
|
|
31
|
+
Add the devtools package for a TanStack library when one exists, mount it only in development, and check for a matching
|
|
32
|
+
devtools package whenever a new TanStack dependency is added.
|
|
39
33
|
|
|
40
34
|
## Docs over memory
|
|
41
35
|
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
Use `npx @tanstack/cli` for TanStack documentation. If TanStack Intent is configured, use it for the Agent Skills the
|
|
37
|
+
TanStack package provides.
|
|
44
38
|
|
|
45
39
|
## Prettier
|
|
46
40
|
|
|
47
|
-
|
|
41
|
+
Use a config file. The repo's values are:
|
|
48
42
|
|
|
49
43
|
```ts
|
|
50
44
|
import type { Config } from "prettier";
|
|
@@ -59,58 +53,36 @@ const config: Config = {
|
|
|
59
53
|
singleQuote: false,
|
|
60
54
|
proseWrap: "always"
|
|
61
55
|
};
|
|
62
|
-
```
|
|
63
56
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
## ESLint
|
|
67
|
-
|
|
68
|
-
Flat config (`eslint.config.ts`):
|
|
69
|
-
|
|
70
|
-
- `strictTypeChecked` + `stylisticTypeChecked`, `projectService: true`
|
|
71
|
-
- `as` and `!` banned outside tests (`consistent-type-assertions`)
|
|
72
|
-
- `.gitignore` as the ignore source (`includeIgnoreFile` from `@eslint/compat`)
|
|
73
|
-
- `#/` alias enforced via `no-restricted-imports` banning `../*` — parent-relative paths error, siblings (`./`) stay relative
|
|
74
|
-
([project-structure.md](project-structure.md))
|
|
75
|
-
|
|
76
|
-
## tsconfig
|
|
77
|
-
|
|
78
|
-
```jsonc
|
|
79
|
-
{
|
|
80
|
-
"compilerOptions": {
|
|
81
|
-
"strict": true,
|
|
82
|
-
"moduleResolution": "bundler",
|
|
83
|
-
"verbatimModuleSyntax": true, // import type stays import type
|
|
84
|
-
"noUnusedLocals": true,
|
|
85
|
-
"noUnusedParameters": true,
|
|
86
|
-
"noFallthroughCasesInSwitch": true,
|
|
87
|
-
"noUncheckedSideEffectImports": true,
|
|
88
|
-
"skipLibCheck": true,
|
|
89
|
-
"paths": { "#/*": ["./src/*"] }
|
|
90
|
-
}
|
|
91
|
-
}
|
|
57
|
+
export default config;
|
|
92
58
|
```
|
|
93
59
|
|
|
94
|
-
|
|
60
|
+
## ESLint and TypeScript
|
|
61
|
+
|
|
62
|
+
Use flat ESLint config with type-aware rules and the repo's ignore file. The baseline bans `as` and non-null `!` outside
|
|
63
|
+
tests, requires the `#/` alias instead of parent-relative imports, and uses project-service type information.
|
|
64
|
+
|
|
65
|
+
Use strict TypeScript with bundler module resolution, `verbatimModuleSyntax`, unused-value checks, and `#/` paths. Keep
|
|
66
|
+
`import type` for type-only imports.
|
|
95
67
|
|
|
96
68
|
## Staged files
|
|
97
69
|
|
|
98
|
-
|
|
99
|
-
|
|
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.
|
|
100
72
|
|
|
101
73
|
## CSS class names
|
|
102
74
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
- The library ships the plugin; pass a short, app-scoped prefix:
|
|
75
|
+
Register Web UI's `readableCssModuleNames` plugin in every compiler that processes the app's CSS, including development,
|
|
76
|
+
Storybook, and production:
|
|
106
77
|
|
|
107
78
|
```ts
|
|
79
|
+
import { defineConfig } from "vite";
|
|
80
|
+
import react from "@vitejs/plugin-react";
|
|
108
81
|
import { readableCssModuleNames } from "@imfusion/web-ui/build/vite-css-module-names";
|
|
109
82
|
|
|
110
83
|
export default defineConfig({
|
|
111
|
-
plugins: [react(), readableCssModuleNames({ prefix: "
|
|
84
|
+
plugins: [react(), readableCssModuleNames({ prefix: "app" })]
|
|
112
85
|
});
|
|
113
86
|
```
|
|
114
87
|
|
|
115
|
-
|
|
116
|
-
left out generates different names for the same source, and its styles silently don't apply.
|
|
88
|
+
A compiler left out of the plugin produces different class names and styles that appear to work only in some environments.
|
|
@@ -1,73 +1,49 @@
|
|
|
1
|
-
# TypeScript
|
|
1
|
+
# TypeScript and code style
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
statements, side effects at the edges (network, DOM, store).
|
|
3
|
+
Prefer pure functions, immutable values, and side effects at the edges.
|
|
5
4
|
|
|
6
5
|
## Types
|
|
7
6
|
|
|
8
|
-
-
|
|
9
|
-
- Infer
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
7
|
+
- Do not use `any`. Accept `unknown` at an untrusted boundary and narrow it.
|
|
8
|
+
- Infer local values; give exported functions explicit return types.
|
|
9
|
+
- Model states directly instead of filling a nullable value later.
|
|
10
|
+
- Derive types from their source. Use `z.infer` for schemas and `React.ComponentProps` for Web UI components.
|
|
11
|
+
- Avoid `as`. Keep an assertion only at an untyped third-party boundary where it is the honest boundary.
|
|
12
|
+
- Use one or two positional arguments. At three or more, pass a named object.
|
|
13
13
|
|
|
14
14
|
```ts
|
|
15
15
|
const sizes = ["sm", "md", "lg"] as const;
|
|
16
16
|
type Size = (typeof sizes)[number];
|
|
17
17
|
|
|
18
|
-
const labels: Record<Size, string> = {
|
|
18
|
+
const labels: Record<Size, string> = {
|
|
19
|
+
sm: "S",
|
|
20
|
+
md: "M",
|
|
21
|
+
lg: "L"
|
|
22
|
+
};
|
|
19
23
|
```
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
([library-boundary.md](library-boundary.md)), untrusted data via a runtime schema and `z.infer`
|
|
23
|
-
([validation.md](validation.md)).
|
|
24
|
-
- Function signatures: 1–2 positional arguments; at 3+, one destructured object.
|
|
25
|
+
## Immutability and expressions
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
Use `map`, `filter`, `find`, `some`, and `flatMap` for ordinary collection work. Create new values instead of mutating the
|
|
28
|
+
input. Use `toSorted` and `toReversed` instead of their mutating counterparts.
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```ts
|
|
31
|
-
const activeNames = users.filter(u => u.isActive).map(u => u.name);
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
- Produce new values: spreads and `structuredClone` over in-place edits, `toSorted`/`toReversed` over `sort`/`reverse` (which
|
|
35
|
-
mutate their receiver).
|
|
36
|
-
- Allowed exceptions: a genuine early exit (`for` + `break`), a measured hot loop.
|
|
37
|
-
- Keep chains flat: 3–4 steps read well; longer wants named intermediates, and a `reduce` doing four things wants to be a
|
|
38
|
-
loop.
|
|
30
|
+
A loop is fine when it has a real early exit or measured hot-path benefit. A long chain or a `reduce` with several jobs wants
|
|
31
|
+
named intermediate values.
|
|
39
32
|
|
|
40
33
|
## Naming
|
|
41
34
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- Keep the object a hook or query returns as a namespace instead of destructuring it, and drop the `Query`/`Mutation` suffix
|
|
47
|
-
from the local binding — the binding reads as the domain name, and every field access shows where it came from:
|
|
35
|
+
Name what a value is, not how it is built. Booleans read as assertions (`isOpen`, `hasAccess`, `canSubmit`). Props use `onX`;
|
|
36
|
+
component implementations use `handleX`.
|
|
37
|
+
|
|
38
|
+
Keep a hook or query result as a namespace and name the local after its domain:
|
|
48
39
|
|
|
49
40
|
```tsx
|
|
50
|
-
const search = Route.useSearch();
|
|
51
|
-
const user = useSuspenseQuery(context.api.user.getDetails());
|
|
52
|
-
const updateUser = useMutation(context.api.user.update());
|
|
41
|
+
const search = Route.useSearch();
|
|
42
|
+
const user = useSuspenseQuery(context.api.user.getDetails());
|
|
53
43
|
|
|
54
44
|
search.page;
|
|
55
45
|
user.data.name;
|
|
56
|
-
updateUser.mutate(values);
|
|
57
|
-
updateUser.isPending;
|
|
58
46
|
```
|
|
59
47
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
```tsx
|
|
64
|
-
const user = useSuspenseQuery(context.api.auth.getUser());
|
|
65
|
-
const { name } = user.data; // destructure for the dep array
|
|
66
|
-
|
|
67
|
-
useEffect(
|
|
68
|
-
function syncDocumentTitle() {
|
|
69
|
-
document.title = name;
|
|
70
|
-
},
|
|
71
|
-
[name]
|
|
72
|
-
);
|
|
73
|
-
```
|
|
48
|
+
Destructure a primitive only when a stable value is needed, such as an effect dependency. Match existing product and API
|
|
49
|
+
vocabulary instead of inventing synonyms.
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
# Validation
|
|
2
2
|
|
|
3
|
-
Validate
|
|
4
|
-
truth for runtime check and TypeScript type.
|
|
3
|
+
Validate data when it crosses into frontend-owned code. Use the schema as both the runtime check and the TypeScript source.
|
|
5
4
|
|
|
6
5
|
## Boundaries
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
7
|
+
Validate once at the edge:
|
|
8
|
+
|
|
9
|
+
- network responses on entry;
|
|
10
|
+
- URL path and search values;
|
|
11
|
+
- persisted browser data when read;
|
|
12
|
+
- user input when it becomes a submitted domain or request value.
|
|
13
|
+
|
|
14
|
+
After the boundary, use parsed values. A generic on a typed client only tells TypeScript what you hope the response looks
|
|
15
|
+
like; it does not validate it.
|
|
13
16
|
|
|
14
17
|
## Schema first, type derived
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
- Same rule for request and response shapes the frontend owns or consumes at runtime.
|
|
19
|
+
Use a Zod schema and derive the type:
|
|
18
20
|
|
|
19
21
|
```ts
|
|
20
22
|
import { z } from "zod";
|
|
@@ -27,17 +29,13 @@ export const userSchema = z.object({
|
|
|
27
29
|
export type User = z.infer<typeof userSchema>;
|
|
28
30
|
```
|
|
29
31
|
|
|
32
|
+
Apply the same rule to request and response shapes the frontend owns at runtime.
|
|
33
|
+
|
|
30
34
|
## TanStack Router search params
|
|
31
35
|
|
|
32
|
-
|
|
33
|
-
- `Route.useSearch()` infers its type from `validateSearch`.
|
|
34
|
-
- `.catch()`: malformed URL input falls back without interrupting navigation.
|
|
35
|
-
- `.default()`: only for missing values; malformed values still follow the route's validation error path.
|
|
36
|
+
Pass a Zod v4 schema to `validateSearch`. Route search types then come from that schema:
|
|
36
37
|
|
|
37
38
|
```tsx
|
|
38
|
-
import { createFileRoute } from "@tanstack/react-router";
|
|
39
|
-
import { z } from "zod";
|
|
40
|
-
|
|
41
39
|
const searchSchema = z.object({
|
|
42
40
|
page: z.number().int().positive().catch(1),
|
|
43
41
|
filter: z.string().catch("")
|
|
@@ -47,16 +45,12 @@ export const Route = createFileRoute("/users")({
|
|
|
47
45
|
validateSearch: searchSchema,
|
|
48
46
|
component: Users
|
|
49
47
|
});
|
|
50
|
-
|
|
51
|
-
function Users() {
|
|
52
|
-
const search = Route.useSearch(); // inferred: z.infer<typeof searchSchema>
|
|
53
|
-
return <UserList page={search.page} filter={search.filter} />;
|
|
54
|
-
}
|
|
55
48
|
```
|
|
56
49
|
|
|
50
|
+
Use `.catch()` for malformed values that can safely fall back. Use `.default()` only for missing values.
|
|
51
|
+
|
|
57
52
|
## Failure handling
|
|
58
53
|
|
|
59
|
-
- `
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
- Transforms and coercion live in the boundary schema — never scatter trimming, number conversion, or defaulting downstream.
|
|
54
|
+
- Use `parse` when invalid data is a contract failure that should reach the normal error boundary.
|
|
55
|
+
- Use `safeParse` when failure is expected and the caller can show a validation message.
|
|
56
|
+
- Keep trimming, coercion, transforms, and defaults in the boundary schema.
|
|
@@ -1,87 +1,68 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: imf-web-ui-setup
|
|
3
3
|
description:
|
|
4
|
-
"Plan and, after explicit approval, bootstrap
|
|
5
|
-
tooling, git, npm
|
|
6
|
-
|
|
7
|
-
setup action."
|
|
4
|
+
"Plan and, after explicit approval, bootstrap a consumer project that uses @imfusion/web-ui. Use this whenever a project
|
|
5
|
+
needs library wiring, tooling, git, npm, authentication, structure, data, testing, docs, or agent tooling. Inspect first,
|
|
6
|
+
propose concrete files, and write only what the user approves. Use imf-web-ui-audit for read-only checks."
|
|
8
7
|
argument-hint: "[full|library-setup|tooling|git|npm-project|authentication|project-structure|docs-structure|data|testing|agent-tooling]"
|
|
9
8
|
allowed-tools: Read Glob Grep Write
|
|
10
9
|
---
|
|
11
10
|
|
|
12
|
-
#
|
|
11
|
+
# Set up a consumer project
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
working convention. This skill is plan-first: enter the host's plan mode before presenting the proposal, and do not create a
|
|
17
|
-
report file as a substitute for the host plan.
|
|
13
|
+
Plan the missing pieces of an ImFusion frontend. The existing project wins; this skill fills gaps instead of reshaping
|
|
14
|
+
working choices.
|
|
18
15
|
|
|
19
16
|
## Workflow
|
|
20
17
|
|
|
21
|
-
1. Resolve the argument
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
groups, current-user query, AppShell) is part of the deliverable even when the prompt never names it; propose it and let
|
|
25
|
-
the human remove it, never silently defer it as "out of scope." For an unsupported topic argument, list the available
|
|
26
|
-
setup topics and point the human to `imf-web-ui-audit` for a read-only report.
|
|
27
|
-
2. Enter the host's plan mode. If it is not already active, use the host plan-mode control before inspecting and planning.
|
|
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`.
|
|
20
|
+
2. Enter the host's plan mode before inspecting or proposing changes.
|
|
28
21
|
3. Read the selected convention topics and inspect the repository with `Read`, `Glob`, and `Grep` only.
|
|
29
|
-
4.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
imported — code that imports an uninstalled package is an incomplete setup
|
|
36
|
-
([project-structure.md](../imf-web-ui-conventions/topics/project-structure.md));
|
|
37
|
-
- pathless `_public/` and `_app/` route groups behind one server-backed current-user boundary
|
|
38
|
-
([authentication.md](../imf-web-ui-conventions/topics/authentication.md));
|
|
39
|
-
- the minimal branded `AppShell` in `_app/` by default — omit the shell only when the human explicitly says the product
|
|
40
|
-
has no persistent authenticated navigation (ask first), but keep the `_app/` boundary either way;
|
|
41
|
-
- a per-topic `api/` folder for any data the first screen shows, never an inline fixture in the component
|
|
42
|
-
([data.md](../imf-web-ui-conventions/topics/data.md)).
|
|
22
|
+
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.
|
|
43
28
|
|
|
44
|
-
|
|
45
|
-
Existing projects keep their working choices — propose only the gaps.
|
|
29
|
+
## Greenfield `full` setup
|
|
46
30
|
|
|
47
|
-
|
|
48
|
-
immediately requested bootstrap work covered by that approved plan, then invoke `imf-web-ui-audit full` as a verification
|
|
49
|
-
step and review the findings it reports back before declaring the setup complete. The audit stays out of plan mode here —
|
|
50
|
-
the human has just left it to let this work happen.
|
|
31
|
+
Include these pieces unless the existing project already has them or the user removes them from the plan:
|
|
51
32
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
33
|
+
- `@tanstack/react-router` and its router devtools in `package.json`;
|
|
34
|
+
- pathless `_public/` and `_app/` route groups;
|
|
35
|
+
- one server-backed current-user query at the route boundary;
|
|
36
|
+
- a minimal `AppShell` in `_app/`, unless the user says the product has no persistent authenticated navigation;
|
|
37
|
+
- an API topic folder for data shown by the first screen;
|
|
38
|
+
- the root provider and library wiring.
|
|
55
39
|
|
|
56
|
-
|
|
40
|
+
The plan describes the exact starter files. It does not copy a generic starter project.
|
|
57
41
|
|
|
58
|
-
|
|
59
|
-
[convention audit checklist](../imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md) to verify the complete baseline, not
|
|
60
|
-
only the setup topic selected at the start.
|
|
42
|
+
## Installer steps
|
|
61
43
|
|
|
62
|
-
|
|
44
|
+
For `agent-tooling`, list the `npx web-ui-install` commands as steps for the human. Read existing registrations first and do
|
|
45
|
+
not stack a hook on an event the project already covers. Include the Codex trust review when hooks are part of the plan.
|
|
63
46
|
|
|
64
|
-
|
|
65
|
-
config imports, linters, tests, builds, Git commands, project binaries, installers, or package managers. Read config as text
|
|
66
|
-
and report runtime or machine-local state that cannot be established statically as unverified. After approval, `Write` is
|
|
67
|
-
limited to the files listed in the approved report; anything needing execution goes in the plan for the human.
|
|
47
|
+
## Safety
|
|
68
48
|
|
|
69
|
-
|
|
49
|
+
During inspection use only `Read`, `Glob`, and `Grep`. Do not run shells, Git, Node, npm, npx, installers, builds, tests, or
|
|
50
|
+
local config. Report anything that needs runtime state as unverified. After approval, `Write` is limited to the approved file
|
|
51
|
+
list; put commands in the plan for the human to run.
|
|
70
52
|
|
|
71
|
-
|
|
53
|
+
## Topics
|
|
72
54
|
|
|
73
|
-
| Topic |
|
|
74
|
-
| ------------------- |
|
|
75
|
-
| `library-setup` |
|
|
76
|
-
| `tooling` |
|
|
77
|
-
| `git` |
|
|
78
|
-
| `npm-project` |
|
|
79
|
-
| `authentication` |
|
|
80
|
-
| `project-structure` |
|
|
81
|
-
| `docs-structure` | README, AGENTS, docs index, and content boundaries
|
|
82
|
-
| `data` |
|
|
83
|
-
| `testing` |
|
|
84
|
-
| `agent-tooling` |
|
|
55
|
+
| Topic | Covers |
|
|
56
|
+
| ------------------- | ------------------------------------------------------------------------ |
|
|
57
|
+
| `library-setup` | Stylesheet, `WebUIProvider`, and package wiring. |
|
|
58
|
+
| `tooling` | Dependencies, devtools, formatter, linter, TypeScript, and verification. |
|
|
59
|
+
| `git` | Hooks, verification scopes, and staleness checks. |
|
|
60
|
+
| `npm-project` | Manifest, scripts, pins, npm, and Node. |
|
|
61
|
+
| `authentication` | Current-user query, route groups, login, and logout. |
|
|
62
|
+
| `project-structure` | Source tree, route placement, naming, and imports. |
|
|
63
|
+
| `docs-structure` | README, AGENTS, docs index, and content boundaries. |
|
|
64
|
+
| `data` | Transport, schemas, query/mutation options, keys, and invalidation. |
|
|
65
|
+
| `testing` | Test boundaries and coverage. |
|
|
66
|
+
| `agent-tooling` | Vendored skills, hooks, registrations, and Codex trust. |
|
|
85
67
|
|
|
86
|
-
|
|
87
|
-
`library-boundary`, or `tokens`; select those in `imf-web-ui-audit`.
|
|
68
|
+
The other convention topics are read by `imf-web-ui-audit` when a project needs assessment rather than setup.
|