@flood-md/agent 0.2.5 → 0.2.8
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/DESIGN.md +177 -8
- package/README.md +2 -1
- package/SKILL.md +1 -0
- package/manifest.json +6 -1
- package/package.json +1 -1
- package/references/composition.md +12 -0
- package/references/flood-composition/SKILL.md +63 -0
- package/references/routing.md +1 -0
- package/rules.json +22 -0
package/DESIGN.md
CHANGED
|
@@ -1,17 +1,46 @@
|
|
|
1
|
-
# Flood design system · 0.2.
|
|
1
|
+
# Flood design system · 0.2.8
|
|
2
|
+
|
|
3
|
+
ListBox owns native required validation for accepted selection. Use its
|
|
4
|
+
description/message/status props rather than duplicating feedback markup. Visual
|
|
5
|
+
invalid/status flags alone do not block submission; validationMessage supplies a
|
|
6
|
+
host-owned blocking constraint. Readonly retains values and bypasses validity;
|
|
7
|
+
disabled excludes submission. TimePicker keeps its plain manual-selection list.
|
|
8
|
+
|
|
9
|
+
Use TimePicker for civil time suggestions and DateTimeRangePicker for complete,
|
|
10
|
+
ordered civil endpoints. Calendar switches day/month/year views in place. Resolve
|
|
11
|
+
timezones and DST in the host. These are source APIs; check the installed version.
|
|
12
|
+
|
|
13
|
+
## Composition is built from library primitives
|
|
14
|
+
|
|
15
|
+
Use existing Flood components inside larger components, the website and playgrounds.
|
|
16
|
+
Do not replace them with ordinary text or custom markup to fix a visual issue.
|
|
17
|
+
When a small capability is missing, improve or create that reusable primitive
|
|
18
|
+
first, then compose it. Preserve component anatomy and semantics. The manifest
|
|
19
|
+
ships the composition skill from `references/flood-composition/SKILL.md` to
|
|
20
|
+
project-root `.agents/skills/flood-ui/references/flood-composition/SKILL.md`.
|
|
21
|
+
Apply that skill. Native semantic markup and neutral structural wrappers remain
|
|
22
|
+
valid inside their proper owners.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
Readonly date/time entry bypasses native validity constraints while retaining
|
|
26
|
+
accepted canonical values, including values outside current bounds, time steps or
|
|
27
|
+
range availability. Do not silently clear those values. Partial, reversed ranges
|
|
28
|
+
and refused controlled drafts never become accepted by setting readonly. Disabled
|
|
29
|
+
values remain excluded from submission.
|
|
2
30
|
|
|
3
31
|
Read project-root flood.json and installed declarations with this contract.
|
|
4
|
-
The
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
32
|
+
The installed entry is .agents/skills/flood-ui/SKILL.md; its references live under
|
|
33
|
+
.agents/skills/flood-ui/references/. Read only the relevant composition, spacing,
|
|
34
|
+
accessibility, customization or verification reference. flood/manifest.json maps
|
|
35
|
+
package sources to those installed paths; flood/rules.json indexes observable
|
|
36
|
+
checks. In the Flood repository the corresponding sources are packages/agent/.
|
|
37
|
+
This bundle belongs to 0.2.7; older installations keep their matching guide set.
|
|
9
38
|
|
|
10
39
|
React + TypeScript and Next.js App Router. Use this guide with matching installed
|
|
11
40
|
Flood packages and flood.json. The source repository's release status does not
|
|
12
41
|
grant permission to publish or assume a version is available on npm.
|
|
13
42
|
|
|
14
|
-
This guide covers the supported exports in 0.2.
|
|
43
|
+
This guide covers the supported exports in 0.2.7 and their layout refinements. Confirm
|
|
15
44
|
the matching installed declarations before using APIs absent from older versions.
|
|
16
45
|
|
|
17
46
|
## Connect
|
|
@@ -30,6 +59,9 @@ child. Keep server data fetching in server components.
|
|
|
30
59
|
does not associate a form control; use Field.
|
|
31
60
|
- Reserve display for a marketing headline; preserve normal page/section sizes
|
|
32
61
|
inside product UI. Hosts own responsive composition.
|
|
62
|
+
- Use Tree for application-object selection and NavigationTree for nested URLs.
|
|
63
|
+
Their expansion and selection/current-location contracts are separate. Do not
|
|
64
|
+
turn ordinary website navigation into an ARIA tree or treat Tree as a form field.
|
|
33
65
|
- Use CodeSnippet with a code string and optional action slot for commands or
|
|
34
66
|
short examples. The host owns clipboard permission, feedback and errors;
|
|
35
67
|
selectable wrapped code remains available when copying fails.
|
|
@@ -160,7 +192,10 @@ export function Profile() {
|
|
|
160
192
|
```
|
|
161
193
|
|
|
162
194
|
|
|
163
|
-
0.2.5 adds Badge, Spinner, Skeleton and Avatar. Read
|
|
195
|
+
0.2.5 adds Badge, Spinner, Skeleton and Avatar. Read the installed composition and
|
|
196
|
+
accessibility references under .agents/skills/flood-ui/references/ for status
|
|
197
|
+
announcements, fallback geometry and decorative naming. Button loading reuses
|
|
198
|
+
Spinner. These APIs are not present in 0.2.3.
|
|
164
199
|
|
|
165
200
|
Progress, Meter and Alert are also available in 0.2.5. Distinguish task completion from bounded measurements, preserve names/units, and select alert announcement priority explicitly.
|
|
166
201
|
|
|
@@ -271,3 +306,137 @@ original OFL notices. Color alone never communicates validation or progress.
|
|
|
271
306
|
CodeSnippet codeDirection defaults to ltr independently of RTL parent action layout; choose rtl/auto explicitly for content that needs it. Native dir still applies to the wrapper. Protected ScrollArea reveals focused descendants fully when needed, composes the host focus handler and avoids scrolling to nested top-layer controls.
|
|
272
307
|
|
|
273
308
|
Checkbox, Radio and Switch apply native hidden/dir/lang to their visible label wrapper as well as the input, so a component-local language/direction applies to its whole choice.
|
|
309
|
+
|
|
310
|
+
## Base capabilities · 0.2.7
|
|
311
|
+
|
|
312
|
+
The added exports are Editable, TagInput, CommandList, DateField, TimeField,
|
|
313
|
+
Calendar, DatePicker, RangeCalendar, DateRangeField, DateRangePicker,
|
|
314
|
+
ResizablePanels, ErrorSummary, ContextMenu, Tree and NavigationTree. Menu preference
|
|
315
|
+
items and submenus extend Menu; a command palette is Dialog + CommandList
|
|
316
|
+
composition, not a separate export. Use the matching installed declarations.
|
|
317
|
+
|
|
318
|
+
### Editing and commands
|
|
319
|
+
|
|
320
|
+
Editable separates draft and committed value. Enter commits, Escape cancels and
|
|
321
|
+
blurAction selects commit/cancel/none. Controlled value/editing require host
|
|
322
|
+
acceptance; only committed text submits. TagInput accepts free-form tokens while
|
|
323
|
+
MultiSelect selects known option IDs. Only committed tags submit repeated named
|
|
324
|
+
entries. Preserve IME, reset cancellation, required and readonly/disabled behavior.
|
|
325
|
+
|
|
326
|
+
CommandList filters and invokes commands without a submitted selection or modal
|
|
327
|
+
lifecycle. The host owns effects, routing, shortcuts and closure. Compose Dialog
|
|
328
|
+
around it for a command palette; preserve input naming, active-option semantics,
|
|
329
|
+
disabled/loading states and existing Escape ownership.
|
|
330
|
+
|
|
331
|
+
Menu preferences expose controlled aria-checked states and labelled radio groups;
|
|
332
|
+
the host owns exclusivity. Preference activation stays open unless closeOnSelect
|
|
333
|
+
requests dismissal; commands dismiss and call onAction. Nested submenus and
|
|
334
|
+
ContextMenu reuse this action engine. ContextMenu opens from pointer context or
|
|
335
|
+
ContextMenu/Shift+F10; provide a visible Menu alternative for touch. None is a
|
|
336
|
+
native form-selection control or a data-fetching service.
|
|
337
|
+
|
|
338
|
+
### Civil dates, time and ranges
|
|
339
|
+
|
|
340
|
+
DateField owns canonical Gregorian YYYY-MM-DD dates, not timestamps or time zones.
|
|
341
|
+
Keep labelled text segments, explicit order and native required/bounds validity.
|
|
342
|
+
Invalid drafts cannot submit an old canonical date. validationMessage adds a host
|
|
343
|
+
native constraint without overriding own calendar errors. TimeField uses 24-hour
|
|
344
|
+
HH:mm or HH:mm:ss precision and seconds-based steps; do not invent AM/PM,
|
|
345
|
+
overnight bounds, zone conversion or combined date-time semantics.
|
|
346
|
+
|
|
347
|
+
Calendar owns a single-date grid. DatePicker composes DateField, Calendar and
|
|
348
|
+
Popover, keeping native forms, controlled state and focus ownership intact.
|
|
349
|
+
onDateSelect confirms allowed activation even when the value is unchanged.
|
|
350
|
+
Translate calendar labels, segment names and validation messages. Calendar Intl
|
|
351
|
+
formatting is explicitly Gregorian UTC, weekStartsOn remains explicit and today
|
|
352
|
+
can provide deterministic rendering.
|
|
353
|
+
|
|
354
|
+
RangeCalendar selects one inclusive interval start then end; hover/focus previews
|
|
355
|
+
are uncommitted. DateRangeField owns paired text entry and atomic startName/endName
|
|
356
|
+
bridges; DateRangePicker composes the pair with one popup. Values are {start,end}
|
|
357
|
+
with empty strings for empty/partial endpoints. Controlled hosts must accept
|
|
358
|
+
partial starts to advance calendar selection. Calendar gestures normalize earlier
|
|
359
|
+
endpoints; typed reversed drafts stay editable and invalid. Partial, reversed,
|
|
360
|
+
unavailable or refused pairs never submit one new endpoint beside an old one.
|
|
361
|
+
isDateDisabled blocks endpoints; interior blocked dates are allowed unless
|
|
362
|
+
isRangeDisabled rejects the interval. Apply the same predicates to typed entry.
|
|
363
|
+
Escape/outside dismissal may leave an accepted partial range; do not manufacture
|
|
364
|
+
completion to make the form valid. Preserve reset cancellation and return focus.
|
|
365
|
+
|
|
366
|
+
### Hierarchy, layout and error ownership
|
|
367
|
+
|
|
368
|
+
Tree selects application objects through independent value and expandedValues
|
|
369
|
+
contracts. Keep globally unique item values and noninteractive icons/descriptions.
|
|
370
|
+
Descriptions participate in each row's accessible name; descendant labels do not.
|
|
371
|
+
Arrows/Home/End/typeahead move focus independently from selection. Collapsing
|
|
372
|
+
retains known selected descendants; removed/nonselectable values are excluded
|
|
373
|
+
from later selection requests. Deferred hasChildren/loading branches belong to
|
|
374
|
+
the host; no fetching or virtualization is implied.
|
|
375
|
+
|
|
376
|
+
Tree readonly prevents selection while retaining browse/expand behavior. Translate
|
|
377
|
+
readOnlyMessage for the associated explanation; tree/treeitem do not support
|
|
378
|
+
aria-readonly. Disabled rows remain discoverable but cannot select/expand; item
|
|
379
|
+
restrictions do not implicitly cascade. Tree submits no form values and does not
|
|
380
|
+
automatically inherit a native fieldset's disabled state.
|
|
381
|
+
|
|
382
|
+
NavigationTree uses native nav/list/links and normal Tab order. A destination and
|
|
383
|
+
its disclosure are separate controls, so expansion does not navigate. The host
|
|
384
|
+
owns currentValue, hrefs and expanded ancestors. Preserve linkProps, modifier
|
|
385
|
+
navigation, localized disclosure labels and distinct disabled states.
|
|
386
|
+
|
|
387
|
+
ResizablePanels owns constrained pointer/keyboard geometry and separator keys;
|
|
388
|
+
its value is the main pane's percentage after the separator. The host supplies
|
|
389
|
+
vertical height, content scrolling and persistence. Preserve RTL, cancellation,
|
|
390
|
+
focus transfer and inert zero-sized panes. Use static Split when resizing is not
|
|
391
|
+
needed. ErrorSummary receives host errors with exact field IDs. It links/focuses
|
|
392
|
+
those controls without validating, expanding sections or submitting. Opt into
|
|
393
|
+
autofocus/announcement deliberately for the host's submission lifecycle.
|
|
394
|
+
|
|
395
|
+
Required, status, loading, empty and readonly contracts are component-specific.
|
|
396
|
+
Preserve native validity and cancelled resets where supported; do not infer a
|
|
397
|
+
form contract from Tree/Menu/CommandList selection or active state. Package source
|
|
398
|
+
availability and focused examples do not prove registry publication, deployment
|
|
399
|
+
or accessibility of the host application.
|
|
400
|
+
|
|
401
|
+
## Extended controls in 0.2.8
|
|
402
|
+
|
|
403
|
+
HoverCard opens a named interactive preview on hover or focus and supports explicit
|
|
404
|
+
activation. Use Tooltip for short noninteractive descriptions. ColorSwatch and
|
|
405
|
+
ColorPicker use opaque RGB hex colors; they do not imply alpha, gradients or a
|
|
406
|
+
contrast guarantee. TreeSelect provides single hierarchical selection; Tree
|
|
407
|
+
remains the standalone single/multiple control. DateTimePicker composes civil
|
|
408
|
+
date and clock time with separate form values and no inferred timezone. Use
|
|
409
|
+
application validation for relationships between the parts. Recipes for Select
|
|
410
|
+
all, split actions and form submission live in the public user documentation.
|
|
411
|
+
|
|
412
|
+
DataList/DataListItem are native list content, not selection widgets. Keep links
|
|
413
|
+
in the title and actions separate; do not turn the whole row into a button.
|
|
414
|
+
CheckCard/RadioCard compose the native choice primitives into clickable labels.
|
|
415
|
+
Keep their description, icon and metadata noninteractive. Use one radio name and
|
|
416
|
+
an enclosing Fieldset for exclusive choices; derive aggregate checkbox state
|
|
417
|
+
in the host. Read-only choice cards preserve submission and block editing; apply
|
|
418
|
+
readOnly to an entire radio group consistently.
|
|
419
|
+
|
|
420
|
+
DataTable pages and sorts one complete client-side collection. It is not a
|
|
421
|
+
server query engine or a virtualized grid. Rich cells require explicit sortValues
|
|
422
|
+
when they are sortable. Select all affects the current page only and preserves
|
|
423
|
+
other pages; permission-restricted rows use selectionDisabled. Native links and
|
|
424
|
+
actions in cells remain independent. Compose search and filters at the host
|
|
425
|
+
boundary, reset page deliberately and specify the intended selection lifetime.
|
|
426
|
+
Use Table + Pagination for remote pagination rather than passing one remote page
|
|
427
|
+
into the client-paginated DataTable.
|
|
428
|
+
|
|
429
|
+
FileItem/FileList display host-owned attachment metadata; UploadItem/UploadList
|
|
430
|
+
display explicit queued/uploading/success/error/cancelled states. Cancel and retry
|
|
431
|
+
callbacks are intents, not an upload engine. Do not show success merely because
|
|
432
|
+
bytes reach100%; wait for the host confirmation. Use stable IDs, not filenames,
|
|
433
|
+
for identity. FileInput retains native form ownership; removing a display row
|
|
434
|
+
does not alter its FileList. ImagePreview reuses Dialog; the host owns trusted
|
|
435
|
+
URLs, blob URL lifetime, download permissions and image alt text. No built-in
|
|
436
|
+
network, file reading or object URL creation is implied by these components.
|
|
437
|
+
|
|
438
|
+
FileMeta combines a display format label and byte size in one quiet chip. FileItem
|
|
439
|
+
and UploadItem place it with the filename, reserving the next line for status or
|
|
440
|
+
supporting text. Filename extensions are display hints only, never validation.
|
|
441
|
+
Override with format or hide the format using format=null; do not infer upload
|
|
442
|
+
safety or MIME permissions from a visible chip.
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @flood-md/agent
|
|
2
2
|
|
|
3
3
|
Version-matched guidance for Flood React/Next.js projects. Read the installed
|
|
4
|
-
contract before composing screens. The 0.2.
|
|
4
|
+
contract before composing screens. The 0.2.8 reference bundle includes spacing
|
|
5
5
|
guidance, routing and observable rules. These files grant
|
|
6
6
|
no authority to modify external services.
|
|
7
7
|
|
|
@@ -11,6 +11,7 @@ no authority to modify external services.
|
|
|
11
11
|
| SKILL.md | Short entry and task router |
|
|
12
12
|
| references/routing.md | Applicability, audience, prerequisites and governing source |
|
|
13
13
|
| references/composition.md | Screen/form composition workflow |
|
|
14
|
+
| references/flood-composition/SKILL.md | Full primitives-first composition skill routed from flood-ui |
|
|
14
15
|
| references/spacing.md | Measured spacing, density, nested geometry and hit areas |
|
|
15
16
|
| references/accessibility.md | Interaction and perception checks |
|
|
16
17
|
| references/customization.md | Scoped semantic customization |
|
package/SKILL.md
CHANGED
|
@@ -19,6 +19,7 @@ invented as a package API. No external component library or parallel token syste
|
|
|
19
19
|
|
|
20
20
|
| Work | Read next | Required result |
|
|
21
21
|
| --- | --- | --- |
|
|
22
|
+
| Component, composite, website or playground UI | [Composition skill](references/flood-composition/SKILL.md) | Reused primitives; missing small capabilities implemented before composites |
|
|
22
23
|
| New screen, layout or form | [Composition](references/composition.md) | Existing primitives, correct host width and form ownership |
|
|
23
24
|
| Spacing, density, nested geometry or shifting previews | [Spacing](references/spacing.md) | Measured visual relationships and nonoverlapping interactive areas |
|
|
24
25
|
| Keyboard, validation, names or states | [Accessibility](references/accessibility.md) | Real interaction and associations preserved |
|
package/manifest.json
CHANGED
|
@@ -51,9 +51,14 @@
|
|
|
51
51
|
"source": "references/spacing.md",
|
|
52
52
|
"target": ".agents/skills/flood-ui/references/spacing.md",
|
|
53
53
|
"kind": "reference"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"source": "references/flood-composition/SKILL.md",
|
|
57
|
+
"target": ".agents/skills/flood-ui/references/flood-composition/SKILL.md",
|
|
58
|
+
"kind": "skill"
|
|
54
59
|
}
|
|
55
60
|
],
|
|
56
|
-
"version": "0.2.
|
|
61
|
+
"version": "0.2.8",
|
|
57
62
|
"installedEntry": ".agents/skills/flood-ui/SKILL.md",
|
|
58
63
|
"pathBase": "source is package-relative; target is relative to the host project root"
|
|
59
64
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Compose an interface
|
|
2
2
|
|
|
3
|
+
Apply the [Flood composition skill](flood-composition/SKILL.md) before building
|
|
4
|
+
or changing UI. Reuse the existing semantic primitive, including inside library
|
|
5
|
+
components. Fix its layout or extend its API instead of substituting custom markup.
|
|
6
|
+
|
|
7
|
+
Use Tree for hierarchical application selection, with explicit value and expansion
|
|
8
|
+
ownership. Use NavigationTree for nested destinations: preserve native links and
|
|
9
|
+
their browser behavior rather than forcing a website sidebar into tree/menu roles.
|
|
10
|
+
Do not infer cascading selection, lazy fetching, form submission or expansion of
|
|
11
|
+
current-page ancestors. Keep item values globally unique and text labels present.
|
|
12
|
+
|
|
3
13
|
For spacing, density or nested-geometry decisions, read [Spacing](spacing.md).
|
|
4
14
|
Measure the complete row geometry before adding a gap to repeated controls.
|
|
5
15
|
|
|
@@ -267,3 +277,5 @@ host-owned. No third-party component implementation was introduced.
|
|
|
267
277
|
Section headingLevel controls native h2–h6 semantics. Its independent headingSize
|
|
268
278
|
uses the existing Heading roles (section/page/large/display), defaulting to section.
|
|
269
279
|
Keep document hierarchy meaningful when changing visual emphasis.
|
|
280
|
+
|
|
281
|
+
For a command palette, compose Dialog and CommandList. The host owns commands, permissions, query reset and shortcuts; keep Escape available to the dialog. Avoid a duplicate modal or command-search engine. The project recipe lives in docs/recipes/command-palette.md in the source repository.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flood-composition
|
|
3
|
+
description: Build or review Flood UI from existing library primitives before adding composites. Use for component, website, playground and host-interface work, especially when a layout fix risks replacing a reusable element with custom markup.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Compose Flood from its primitives
|
|
7
|
+
|
|
8
|
+
Existing Flood components are the building blocks, including inside other Flood
|
|
9
|
+
components. Preserve their anatomy and behavior when improving a composition.
|
|
10
|
+
Read the governing project instructions, matching declarations and relevant
|
|
11
|
+
component guide first. This skill grants no additional permissions.
|
|
12
|
+
|
|
13
|
+
## Choose the smallest existing owner
|
|
14
|
+
|
|
15
|
+
Before changing JSX, identify the visible roles and their existing owners:
|
|
16
|
+
StatusIndicator for a named state, Progress for progress, Badge/FileMeta for
|
|
17
|
+
metadata, IconButton for an icon action, Dialog for modal behavior, Text/Heading
|
|
18
|
+
for typography, and the appropriate form, list or table primitive for semantics.
|
|
19
|
+
Check the actual installed exports and props; do not invent APIs from newer docs.
|
|
20
|
+
|
|
21
|
+
- Reuse the matching component with its supported props and tokens.
|
|
22
|
+
- If spacing or alignment is wrong, inspect both the primitive and the parent
|
|
23
|
+
composition. Fix the owner of the relationship. Keep the primitive intact.
|
|
24
|
+
- If a primitive lacks a real reusable capability, improve that primitive first,
|
|
25
|
+
with an intentional API/variant and the matching docs and checks, then compose it.
|
|
26
|
+
- If no primitive exists, build the small reusable component before the larger
|
|
27
|
+
composition. Define its semantics, anatomy, states and size before exposing it.
|
|
28
|
+
|
|
29
|
+
In the Flood library, add public primitives through the source API, catalog,
|
|
30
|
+
declarations, guidance and current version decision. In a consuming application,
|
|
31
|
+
do not pretend that an uninstalled export exists: use the supported primitives or
|
|
32
|
+
an explicitly project-owned adapter, and identify any upstream gap.
|
|
33
|
+
|
|
34
|
+
## Do not bypass a component to fix its appearance
|
|
35
|
+
|
|
36
|
+
Do not replace StatusIndicator with a styled span, Badge with a handmade chip,
|
|
37
|
+
Progress with a local track, or Dialog with a parallel modal merely to make one
|
|
38
|
+
example fit. Do not hide a component's glyph, label, focus state or other anatomy
|
|
39
|
+
through descendant CSS and reproduce it beside the component. Intentional variants
|
|
40
|
+
belong in the primitive's API, not in a consumer-specific imitation.
|
|
41
|
+
|
|
42
|
+
For example, an upload row keeps StatusIndicator and Progress as separate reused
|
|
43
|
+
components. Its parent aligns their centers and controls the gap; it does not
|
|
44
|
+
remove the status dot or replace the status with ordinary text. Fix internal dot
|
|
45
|
+
alignment in StatusIndicator only if the primitive itself is wrong.
|
|
46
|
+
|
|
47
|
+
Native semantic markup is necessary inside primitive implementations. Content
|
|
48
|
+
strings and neutral structural wrappers are also valid in compositions. They must
|
|
49
|
+
not introduce a competing visual or behavioral component. A wrapper that starts
|
|
50
|
+
owning a reusable role should become a named small component instead.
|
|
51
|
+
|
|
52
|
+
## Review the composed result
|
|
53
|
+
|
|
54
|
+
Check the reused component and its neighboring elements in the real host: wide
|
|
55
|
+
and narrow layout, enlarged text, long labels, optional content and relevant
|
|
56
|
+
interaction states. Measure the visible glyph/text/control centers when alignment
|
|
57
|
+
is the issue. Keep focus, accessible names, callbacks and native form semantics.
|
|
58
|
+
|
|
59
|
+
If changing a shared primitive, check another consumer of it. Report which
|
|
60
|
+
components were reused, which primitive changed or was added, and what remains
|
|
61
|
+
unverified. A new wrapper name alone is not evidence of reuse. Use the project's
|
|
62
|
+
verification scope; this guidance does not require a full release run for every
|
|
63
|
+
local design adjustment.
|
package/references/routing.md
CHANGED
|
@@ -6,6 +6,7 @@ override user authority or grant permission for unrelated operations.
|
|
|
6
6
|
|
|
7
7
|
| Question / when | Audience | Prerequisite | Source of truth | Verify with |
|
|
8
8
|
| --- | --- | --- | --- | --- |
|
|
9
|
+
| Which primitive owns this role? Component/composite UI work | Developer / agent / reviewer | Matching catalog and component anatomy | flood-composition/SKILL.md | Reuse existing primitives; extend small capabilities first |
|
|
9
10
|
| Which API can I import? Every component edit | Developer / agent | Installed exact versions | Installed @flood-md/react declarations; flood.json | Type-check host imports; CLI doctor for alignment |
|
|
10
11
|
| What does this release mean? Setup / upgrade | Developer / agent | Matching guide | flood/DESIGN.md, package changelog | Compare version and declarations; preserve host edits |
|
|
11
12
|
| How should a screen fit together? Screen / form work | Designer / developer / agent | Scope, content and current API | composition.md; host layout requirements | Narrow/wide rendered screen and native form interaction |
|
package/rules.json
CHANGED
|
@@ -181,6 +181,28 @@
|
|
|
181
181
|
"Check fine/coarse pointers and nonoverlapping interactive targets",
|
|
182
182
|
"Preserve keyboard focus and label activation"
|
|
183
183
|
]
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "composition.reuse",
|
|
187
|
+
"when": "Building or reviewing Flood components, composites, website or host UI",
|
|
188
|
+
"for": [
|
|
189
|
+
"designer",
|
|
190
|
+
"developer",
|
|
191
|
+
"reviewer",
|
|
192
|
+
"agent"
|
|
193
|
+
],
|
|
194
|
+
"requires": [
|
|
195
|
+
"Matching installed exports and component contracts",
|
|
196
|
+
"Existing component anatomy and current composition"
|
|
197
|
+
],
|
|
198
|
+
"sourceOfTruth": "DESIGN.md and the Flood composition skill",
|
|
199
|
+
"guide": "references/flood-composition/SKILL.md",
|
|
200
|
+
"verify": [
|
|
201
|
+
"Existing semantic primitives remain present in the rendered composition",
|
|
202
|
+
"Missing reusable capabilities are implemented in a small primitive before the larger composite",
|
|
203
|
+
"No replacement markup or hidden anatomy used to bypass a primitive",
|
|
204
|
+
"Alignment checked within each row and in the real host"
|
|
205
|
+
]
|
|
184
206
|
}
|
|
185
207
|
],
|
|
186
208
|
"guideResolution": "Match guide to source in manifest.files; use its target relative to the host project root."
|