@nusoft/nuos-build-catalogue 0.12.0 → 0.14.1
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/dist/cli.js +54 -41
- package/dist/commands/init.d.ts +12 -2
- package/dist/commands/init.js +136 -74
- package/dist/commands/plan.d.ts +12 -0
- package/dist/commands/plan.js +83 -0
- package/dist/commands/write.js +16 -5
- package/dist/path-resolution.d.ts +68 -0
- package/dist/path-resolution.js +147 -0
- package/dist/runtime/ac-parse.js +10 -6
- package/dist/runtime/markdown-edit.d.ts +5 -0
- package/dist/runtime/markdown-edit.js +13 -6
- package/dist/runtime/mis-adapter.js +7 -2
- package/package.json +2 -2
- package/templates/hooks/install-hooks.sh +44 -0
- package/templates/hooks/post-commit +96 -0
- package/templates/hooks/pre-commit +162 -0
- package/templates/protocols/end-of-session.md +101 -13
- package/templates/protocols/persona-new.md +64 -30
- package/templates/protocols/plan-orientation.md +122 -0
- package/templates/protocols/start-of-session.md +52 -13
- package/templates/protocols/wu-new.md +75 -50
- package/templates/starter-kit/docs/build/GLOSSARY.md +115 -0
- package/templates/starter-kit/docs/build/STATE.md +30 -16
- package/templates/starter-kit/docs/build/WELCOME.md +79 -0
- package/templates/starter-kit/docs/build/architecture/_index.md +39 -0
- package/templates/starter-kit/docs/build/architecture/module-template.md +47 -0
- package/templates/starter-kit/docs/build/contracts/_index.md +39 -0
- package/templates/starter-kit/docs/build/contracts/contract-template.md +64 -0
- package/templates/starter-kit/docs/build/decisions/_index.md +21 -17
- package/templates/starter-kit/docs/build/design-system/_index.md +57 -0
- package/templates/starter-kit/docs/build/design-system/accessibility.md +77 -0
- package/templates/starter-kit/docs/build/design-system/components/_index.md +29 -0
- package/templates/starter-kit/docs/build/design-system/components/_template.md +60 -0
- package/templates/starter-kit/docs/build/design-system/patterns/_index.md +37 -0
- package/templates/starter-kit/docs/build/design-system/patterns/_template.md +57 -0
- package/templates/starter-kit/docs/build/design-system/tokens-colour.md +52 -0
- package/templates/starter-kit/docs/build/design-system/tokens-motion.md +42 -0
- package/templates/starter-kit/docs/build/design-system/tokens-radius-elevation.md +34 -0
- package/templates/starter-kit/docs/build/design-system/tokens-spacing.md +48 -0
- package/templates/starter-kit/docs/build/design-system/tokens-typography.md +46 -0
- package/templates/starter-kit/docs/build/design-system/voice.md +53 -0
- package/templates/starter-kit/docs/build/maps/01-template.md +15 -112
- package/templates/starter-kit/docs/build/maps/02-template.md +52 -0
- package/templates/starter-kit/docs/build/maps/03-template.md +46 -0
- package/templates/starter-kit/docs/build/maps/99-template-power-user-operational-plan.md +126 -0
- package/templates/starter-kit/docs/build/maps/_index.md +17 -52
- package/templates/starter-kit/docs/build/open-questions/_index.md +27 -13
- package/templates/starter-kit/docs/build/personas/_index.md +26 -60
- package/templates/starter-kit/docs/build/risks/_index.md +20 -13
- package/templates/starter-kit/docs/build/sessions/_index.md +18 -16
- package/templates/starter-kit/docs/build/ui-ux/_index.md +48 -0
- package/templates/starter-kit/docs/build/ui-ux/surface-template.md +72 -0
- package/templates/starter-kit/docs/build/work-units/001-template-simple.md +43 -0
- package/templates/starter-kit/docs/build/work-units/_index.md +18 -20
- package/templates/starter-kit/methodfile.json +19 -8
- /package/templates/starter-kit/docs/build/work-units/{001-template.md → 001-template-full.md} +0 -0
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
# Decisions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A **decision** is a choice that's been made and shouldn't drift. Once accepted, a decision isn't edited — if circumstances change, you file a new decision that supersedes the old one and link forward. Decisions are the project's load-bearing commitments: the things future work has to honour. See [the glossary](../GLOSSARY.md#decision) for the full definition.
|
|
4
4
|
|
|
5
5
|
## Index
|
|
6
6
|
|
|
7
7
|
| ID | Title | Status | Date |
|
|
8
8
|
| --- | --- | --- | --- |
|
|
9
|
-
| _none yet —
|
|
9
|
+
| _none yet — file your first one with `/decision-new` or `nuos-catalogue decision create`_ | | | |
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## When to file a decision
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
5. If the decision supersedes a prior one, mark the prior one's status as `superseded` and link forward
|
|
13
|
+
- You're choosing between two reasonable approaches and want the choice to stick
|
|
14
|
+
- You're adopting a constraint future work will need to honour (e.g. "all data stays on-device", "no third-party trackers")
|
|
15
|
+
- You're overriding something previously decided — file the supersede; don't silently shift
|
|
16
|
+
- You're committing to a technology, a deployment target, a major design principle
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
> Example: "D003 — All overnight processing happens on the school's own server, never in the cloud."
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
- Two reasonable approaches are being chosen between
|
|
23
|
-
- A constraint is being adopted that future work will need to honour
|
|
24
|
-
- A prior decision is being overridden (write the supersede; don't silently shift)
|
|
20
|
+
## When NOT to file a decision
|
|
25
21
|
|
|
26
|
-
|
|
22
|
+
- The choice is an implementation detail and easy to reverse
|
|
23
|
+
- It belongs inside a work unit's notes — local to that work unit, not a project-wide commitment
|
|
24
|
+
- The matter is still open and unresolved — file it as an **open question** ([Q-NNN](../open-questions/_index.md)) instead
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
## What never to do
|
|
27
|
+
|
|
28
|
+
**Never edit an accepted decision file.** The pre-commit hook will block it. If you need to change something material, file a new decision that supersedes the old one — `nuos-catalogue decision supersede D003 --by=D012 --reason="..."`. Typo or link fixes that don't change meaning are the only edits allowed.
|
|
29
|
+
|
|
30
|
+
## How to file one
|
|
31
|
+
|
|
32
|
+
Easiest way: run `/decision-new` (or `nuos-catalogue decision create`). The AI walks you through the prompts and files the result with a fresh D-NNN handle.
|
|
33
|
+
|
|
34
|
+
The file is short — a one-paragraph context, the decision itself in one sentence, why it was made, and what it commits future work to. It doesn't need to be long. It needs to be unambiguous.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Design System
|
|
2
|
+
|
|
3
|
+
The **design system** is the shared visual and interaction language every part of {{PROJECT_NAME}}'s user-facing experience uses. End-to-end: design tokens (colour, type, spacing, motion) → components (buttons, cards, navigation) → patterns (form layouts, page templates) → voice (microcopy, error messages) → accessibility commitments. Every per-surface file in `ui-ux/` references this register. See [the glossary](../GLOSSARY.md#design-system) for the full definition.
|
|
4
|
+
|
|
5
|
+
## Why a design system from the start
|
|
6
|
+
|
|
7
|
+
Many projects sprout UI/UX surfaces first and add a design system later as a "consistency pass". By then the surfaces are inconsistent, components are duplicated, and harmonising them takes longer than building them in the first place. This catalogue requires a design system to exist before per-surface files are written. Phase C of planning produces both, in parallel.
|
|
8
|
+
|
|
9
|
+
If a change to a colour, a heading style, a button shape, or an error message tone needs to happen, it happens **here**, once. Every surface that references the design system picks up the change. That's the system's load-bearing job.
|
|
10
|
+
|
|
11
|
+
## Index
|
|
12
|
+
|
|
13
|
+
| File | What it captures |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `tokens-colour.md` | Colour palette, semantic colour roles |
|
|
16
|
+
| `tokens-typography.md` | Type scale, font families, line heights, weights |
|
|
17
|
+
| `tokens-spacing.md` | Spacing scale, layout grid, breakpoints |
|
|
18
|
+
| `tokens-motion.md` | Easing curves, duration scale, motion principles |
|
|
19
|
+
| `tokens-radius-elevation.md` | Border radii, shadow scale, elevation tokens |
|
|
20
|
+
| `components/_index.md` | Index of components with status |
|
|
21
|
+
| `patterns/_index.md` | Index of recurring page-level patterns |
|
|
22
|
+
| `voice.md` | Voice, tone, microcopy principles |
|
|
23
|
+
| `accessibility.md` | Project-wide accessibility commitments |
|
|
24
|
+
|
|
25
|
+
Each section is filled in during the UI/UX + Design System phase of planning (phase C).
|
|
26
|
+
|
|
27
|
+
## What status means for design system pieces
|
|
28
|
+
|
|
29
|
+
- 🔵 **proposed** — drafted, not yet adopted across surfaces
|
|
30
|
+
- 🟡 **in flight** — being refined; surfaces may reference older + newer simultaneously
|
|
31
|
+
- 🟢 **active** — in use; the canonical version
|
|
32
|
+
- ⚫ **deprecated** — kept for reference but no new surfaces should use it; existing surfaces should migrate
|
|
33
|
+
|
|
34
|
+
## How design system pieces connect to everything else
|
|
35
|
+
|
|
36
|
+
- Every UI/UX surface in `ui-ux/` references design-system pieces by name
|
|
37
|
+
- Architecture modules that involve UI reference the surfaces (and thereby the design system)
|
|
38
|
+
- Decisions that materially change a token, component, or voice principle are filed in `decisions/`
|
|
39
|
+
- Work units that ship UI either consume the design system (most cases) or extend it (when a new component or pattern is needed)
|
|
40
|
+
|
|
41
|
+
## When the design system gets populated
|
|
42
|
+
|
|
43
|
+
During Phase C of planning (UI/UX + Design System). The AI walks you through:
|
|
44
|
+
|
|
45
|
+
1. **Voice and tone first** — how does {{PROJECT_NAME}} sound when it speaks?
|
|
46
|
+
2. **Tokens** — colour, type, spacing, motion. The atomic units.
|
|
47
|
+
3. **Components** — the buttons, cards, navigation, forms. Each with variants, states, and accessibility commitments.
|
|
48
|
+
4. **Patterns** — how components combine into recurring page-level layouts.
|
|
49
|
+
5. **Accessibility commitments** — what the project promises end-to-end.
|
|
50
|
+
|
|
51
|
+
You don't need to design every component upfront. The first pass establishes the language; components get added as work units need them. But the **language exists from the start** — every surface references it from day one.
|
|
52
|
+
|
|
53
|
+
## How to add a design system piece
|
|
54
|
+
|
|
55
|
+
During planning: the AI walks you through it.
|
|
56
|
+
|
|
57
|
+
Outside planning: each piece is a standalone file with its own template (see the relevant subdirectory). For a new component, copy `components/_template.md` to `components/<name>.md`. For a new pattern, copy `patterns/_template.md`. Tokens are edited directly in the `tokens-*.md` files.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Accessibility commitments
|
|
2
|
+
|
|
3
|
+
> *Filled in during the UI/UX + Design System phase of planning. These are the project-wide promises every surface honours.*
|
|
4
|
+
|
|
5
|
+
**Status:** 🔵 proposed
|
|
6
|
+
**Last updated:** {{TODAY}}
|
|
7
|
+
|
|
8
|
+
## Standards we meet
|
|
9
|
+
|
|
10
|
+
[Pick the standard the project commits to. WCAG 2.1 AA is the typical floor; AAA where appropriate.]
|
|
11
|
+
|
|
12
|
+
- **WCAG 2.1 Level AA** — minimum across all surfaces
|
|
13
|
+
- **WCAG 2.1 Level AAA** — for [specific contexts; e.g. "reading-focused screens"]
|
|
14
|
+
|
|
15
|
+
## Specific commitments
|
|
16
|
+
|
|
17
|
+
Each of these is a project-wide promise. They are not aspirational; every surface in `ui-ux/` must honour them.
|
|
18
|
+
|
|
19
|
+
### Colour and contrast
|
|
20
|
+
|
|
21
|
+
- All body text meets AA contrast (4.5:1) against its background
|
|
22
|
+
- All text 18px+ and bold 14px+ meets AA Large (3:1)
|
|
23
|
+
- Critical UI (focus rings, error states) is never communicated by colour alone
|
|
24
|
+
|
|
25
|
+
### Keyboard
|
|
26
|
+
|
|
27
|
+
- Every interactive element is reachable via keyboard alone
|
|
28
|
+
- Focus order matches visual order
|
|
29
|
+
- Focus rings are visible, distinct, and never suppressed
|
|
30
|
+
- No keyboard traps anywhere
|
|
31
|
+
|
|
32
|
+
### Screen reader
|
|
33
|
+
|
|
34
|
+
- Every interactive element has an accessible name (label, aria-label, or visible text)
|
|
35
|
+
- Landmarks are used correctly (header, nav, main, aside, footer)
|
|
36
|
+
- Heading hierarchy is correct (h1 → h2 → h3, no skipping)
|
|
37
|
+
- Form labels are always present and programmatically associated
|
|
38
|
+
|
|
39
|
+
### Motion
|
|
40
|
+
|
|
41
|
+
- All non-essential motion respects `prefers-reduced-motion`
|
|
42
|
+
- No auto-playing video or audio
|
|
43
|
+
- No flashing content above 3 Hz
|
|
44
|
+
|
|
45
|
+
### Touch and pointer
|
|
46
|
+
|
|
47
|
+
- Touch targets are at least 44 × 44 px
|
|
48
|
+
- Multiple input methods supported (touch, mouse, keyboard, switch)
|
|
49
|
+
- No actions require hover (which doesn't exist on touch)
|
|
50
|
+
|
|
51
|
+
### Forms
|
|
52
|
+
|
|
53
|
+
- Errors are described in text, not just colour
|
|
54
|
+
- Errors appear inline next to the affected field
|
|
55
|
+
- Submit buttons remain enabled until submitted; loading state replaces "submit" text
|
|
56
|
+
- Required fields are marked in text ("required"), not just by an asterisk
|
|
57
|
+
|
|
58
|
+
### Language and reading
|
|
59
|
+
|
|
60
|
+
- Page language is declared (`lang="en"` etc.)
|
|
61
|
+
- Reading level appropriate for the persona (most adult-facing surfaces target ~Grade 8-10)
|
|
62
|
+
- Long content has summaries; short content avoids unnecessary text
|
|
63
|
+
|
|
64
|
+
## How we test
|
|
65
|
+
|
|
66
|
+
- **Automated**: axe-core (or equivalent) on every page in CI
|
|
67
|
+
- **Keyboard-only walkthrough** as part of pre-merge for any new surface
|
|
68
|
+
- **Screen reader spot-check** (VoiceOver or NVDA) on changes to forms and primary flows
|
|
69
|
+
- **Real user testing** with one or more users who rely on assistive technology, before each major release
|
|
70
|
+
|
|
71
|
+
## When to file an accessibility-related decision
|
|
72
|
+
|
|
73
|
+
- A trade-off between accessibility and another goal arises (rare; document the resolution)
|
|
74
|
+
- A new accessibility commitment is added or an existing one is loosened
|
|
75
|
+
- A pattern is adopted that requires special accessibility care (drag-and-drop, complex grids, charts)
|
|
76
|
+
|
|
77
|
+
Accessibility is not a phase; it's a baseline. Every work unit that ships a surface checks against these commitments before completing.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Components
|
|
2
|
+
|
|
3
|
+
The reusable pieces every UI/UX surface uses. Each component has its own file documenting variants, states, accessibility commitments, and how it consumes tokens. See [the design system index](../_index.md) for the overall shape.
|
|
4
|
+
|
|
5
|
+
## Index
|
|
6
|
+
|
|
7
|
+
| Component | Status |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| _none yet — components are added as work units need them; the first batch is sketched during Phase C of planning_ | |
|
|
10
|
+
|
|
11
|
+
## What goes in a component file
|
|
12
|
+
|
|
13
|
+
Each component documents:
|
|
14
|
+
|
|
15
|
+
- **What it is** — one sentence
|
|
16
|
+
- **When it's used** — the role it plays
|
|
17
|
+
- **Variants** — primary / secondary / destructive / link, etc.
|
|
18
|
+
- **States** — default, hover, focus, active, disabled, loading
|
|
19
|
+
- **Tokens consumed** — colour, type, spacing, radius, motion — linked to the token files
|
|
20
|
+
- **Accessibility commitments** — keyboard, screen reader, contrast
|
|
21
|
+
- **Examples** — concrete uses; which surfaces in `ui-ux/` consume it
|
|
22
|
+
|
|
23
|
+
## How to add a component
|
|
24
|
+
|
|
25
|
+
Copy `_template.md` to `<component-name>.md`. Fill in. Add a row to the table above. Surfaces that use this component reference it by name from their surface file.
|
|
26
|
+
|
|
27
|
+
## Component naming
|
|
28
|
+
|
|
29
|
+
Use plain lowercase-with-dashes names that describe the role: `button`, `card`, `input-text`, `nav-primary`, `modal`. Avoid framework-specific names (no `material-button`, no `bootstrap-card`). The catalogue describes design; implementation maps to it.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# [Component name]
|
|
2
|
+
|
|
3
|
+
> *Replace bracketed placeholders. Delete this hint block once filled in.*
|
|
4
|
+
|
|
5
|
+
**Status:** 🔵 proposed / 🟡 in flight / 🟢 active / ⚫ deprecated
|
|
6
|
+
**Last updated:** {{TODAY}}
|
|
7
|
+
|
|
8
|
+
## What it is
|
|
9
|
+
|
|
10
|
+
[One sentence. *"A button that performs an action when clicked or pressed."*]
|
|
11
|
+
|
|
12
|
+
## When to use it
|
|
13
|
+
|
|
14
|
+
[The role it plays. When this component is the right answer vs. a different one. *"Use a `button` for actions that change state. Use a `link` for navigation between surfaces."*]
|
|
15
|
+
|
|
16
|
+
## Variants
|
|
17
|
+
|
|
18
|
+
| Variant | When |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| `primary` | The main call-to-action on a surface; one per visible region maximum |
|
|
21
|
+
| `secondary` | Lower-priority actions |
|
|
22
|
+
| `destructive` | Actions that delete or undo |
|
|
23
|
+
| `link` | When the action is navigation rather than a state change (rare; usually use a `link` component instead) |
|
|
24
|
+
|
|
25
|
+
## States
|
|
26
|
+
|
|
27
|
+
| State | Behaviour |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| default | The resting visual |
|
|
30
|
+
| hover | Subtle visual feedback that the element is interactive (desktop only) |
|
|
31
|
+
| focus | Visible focus ring; meets WCAG focus indicator requirements |
|
|
32
|
+
| active | The brief moment of being pressed/clicked |
|
|
33
|
+
| disabled | Visually muted; not focusable; cursor: not-allowed |
|
|
34
|
+
| loading | After click, before the action completes; spinner replaces label; not pressable |
|
|
35
|
+
|
|
36
|
+
## Tokens consumed
|
|
37
|
+
|
|
38
|
+
- **Colour:** `colour.action.primary` (background), `colour.text.inverse` (text)
|
|
39
|
+
- **Typography:** `text.label.medium`
|
|
40
|
+
- **Spacing:** internal padding `space.3` vertical × `space.4` horizontal
|
|
41
|
+
- **Radius:** `radius.medium`
|
|
42
|
+
- **Motion:** `motion.duration.quick` with `motion.ease.standard` on hover/focus
|
|
43
|
+
|
|
44
|
+
## Accessibility
|
|
45
|
+
|
|
46
|
+
- Reachable via keyboard (Tab moves to it; Space or Enter activates)
|
|
47
|
+
- Has an accessible name (visible label, or aria-label if icon-only)
|
|
48
|
+
- Focus ring is visible and meets 3:1 contrast against the surrounding surface
|
|
49
|
+
- `aria-disabled` when disabled (not just the visual style)
|
|
50
|
+
- `aria-busy` when loading
|
|
51
|
+
|
|
52
|
+
## Examples
|
|
53
|
+
|
|
54
|
+
| Surface | How it's used |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| [Surface link] | [the variant used and what it does there] |
|
|
57
|
+
|
|
58
|
+
## Notes
|
|
59
|
+
|
|
60
|
+
[Date-stamped notes about how this component has evolved.]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Patterns
|
|
2
|
+
|
|
3
|
+
Recurring page-level shapes that combine components in consistent ways. A **pattern** is a step up from a component — it's a layout, a flow, or a structural rule that multiple surfaces use. See [the design system index](../_index.md) for context.
|
|
4
|
+
|
|
5
|
+
## Index
|
|
6
|
+
|
|
7
|
+
| Pattern | Status |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| _none yet — patterns emerge as the project develops; sketch the first ones during Phase C of planning_ | |
|
|
10
|
+
|
|
11
|
+
## Typical patterns
|
|
12
|
+
|
|
13
|
+
Most projects develop a handful of patterns like these:
|
|
14
|
+
|
|
15
|
+
- **Form layout** — how labels, inputs, helper text, and errors arrange themselves on a form
|
|
16
|
+
- **List with actions** — how an item in a list shows primary content + secondary metadata + row-level actions
|
|
17
|
+
- **Empty state** — what every surface shows when there's no content yet
|
|
18
|
+
- **Loading state** — skeleton screens, spinners, progress; when to use which
|
|
19
|
+
- **Page template** — the standard header/main/footer arrangement, with breakpoint behaviour
|
|
20
|
+
- **Navigation** — how primary and secondary navigation arrange themselves; how the active state is shown
|
|
21
|
+
|
|
22
|
+
You don't define all of these upfront. Patterns get documented as the project produces them. The discipline is: **the second time a layout repeats, document it as a pattern** — before it diverges into two slightly-different one-off layouts.
|
|
23
|
+
|
|
24
|
+
## What goes in a pattern file
|
|
25
|
+
|
|
26
|
+
Each pattern documents:
|
|
27
|
+
|
|
28
|
+
- **What it is** — one sentence describing the recurring shape
|
|
29
|
+
- **When to use it** — the contexts it fits
|
|
30
|
+
- **Anatomy** — the components and their arrangement
|
|
31
|
+
- **Tokens consumed** — spacing, breakpoints, type
|
|
32
|
+
- **Behaviour** — at different breakpoints, with different content lengths, in different states (empty, loading, error)
|
|
33
|
+
- **Examples** — which surfaces in `ui-ux/` use this pattern
|
|
34
|
+
|
|
35
|
+
## How to add a pattern
|
|
36
|
+
|
|
37
|
+
Copy `_template.md` to `<pattern-name>.md`. Fill in. Add a row to the table above.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# [Pattern name]
|
|
2
|
+
|
|
3
|
+
> *Replace bracketed placeholders. Delete this hint block once filled in.*
|
|
4
|
+
|
|
5
|
+
**Status:** 🔵 proposed / 🟡 in flight / 🟢 active / ⚫ deprecated
|
|
6
|
+
**Last updated:** {{TODAY}}
|
|
7
|
+
|
|
8
|
+
## What it is
|
|
9
|
+
|
|
10
|
+
[One sentence describing the recurring shape. *"A form layout in which labels sit above inputs, helper text sits below, errors replace helper text inline."*]
|
|
11
|
+
|
|
12
|
+
## When to use it
|
|
13
|
+
|
|
14
|
+
[The contexts this pattern fits. *"Any form with more than one input. Use a single-input pattern (label inline with input) when only one field is asked."*]
|
|
15
|
+
|
|
16
|
+
## Anatomy
|
|
17
|
+
|
|
18
|
+
[Describe the components that make up the pattern, in order. Link to component files.]
|
|
19
|
+
|
|
20
|
+
1. [Component or element] — [what it does in this pattern]
|
|
21
|
+
2. [...] — [...]
|
|
22
|
+
3. [...] — [...]
|
|
23
|
+
|
|
24
|
+
## Tokens consumed
|
|
25
|
+
|
|
26
|
+
- **Spacing:** [which spacing tokens, and where]
|
|
27
|
+
- **Typography:** [type tokens for labels, helper text, error messages]
|
|
28
|
+
- **Breakpoints:** [how the pattern adapts; e.g. "mobile: stacked; tablet+: 2-column"]
|
|
29
|
+
|
|
30
|
+
## Behaviour
|
|
31
|
+
|
|
32
|
+
### At different breakpoints
|
|
33
|
+
|
|
34
|
+
[How the pattern arranges itself across the breakpoints from `tokens-spacing.md`.]
|
|
35
|
+
|
|
36
|
+
### With different content lengths
|
|
37
|
+
|
|
38
|
+
[What happens when labels are long, when helper text wraps, when error messages exceed one line.]
|
|
39
|
+
|
|
40
|
+
### In different states
|
|
41
|
+
|
|
42
|
+
| State | Behaviour |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| Empty | [...] |
|
|
45
|
+
| Loading | [...] |
|
|
46
|
+
| Error | [...] |
|
|
47
|
+
| Success | [...] |
|
|
48
|
+
|
|
49
|
+
## Examples
|
|
50
|
+
|
|
51
|
+
| Surface | How it's used |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| [Surface link] | [the variant used and what it does there] |
|
|
54
|
+
|
|
55
|
+
## Notes
|
|
56
|
+
|
|
57
|
+
[Date-stamped notes about how this pattern has evolved.]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Colour tokens
|
|
2
|
+
|
|
3
|
+
> *Filled in during the UI/UX + Design System phase of planning. The AI walks you through this in conversation — start with brand colours, then derive a semantic palette (success, warning, danger, info), then accessibility-checked surface and text combinations.*
|
|
4
|
+
|
|
5
|
+
**Status:** 🔵 proposed
|
|
6
|
+
**Last updated:** {{TODAY}}
|
|
7
|
+
|
|
8
|
+
## Brand colours
|
|
9
|
+
|
|
10
|
+
[The 1-3 primary brand colours. Each as a name + a hex value + a description of when it's used.]
|
|
11
|
+
|
|
12
|
+
| Token | Hex | Used for |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `colour.brand.primary` | `#000000` | [...] |
|
|
15
|
+
| `colour.brand.secondary` | `#000000` | [...] |
|
|
16
|
+
|
|
17
|
+
## Semantic colours
|
|
18
|
+
|
|
19
|
+
[Roles, not specific colours. The mapping lets you change a colour later without renaming everywhere.]
|
|
20
|
+
|
|
21
|
+
| Token | Hex | Role |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| `colour.surface.canvas` | `#ffffff` | The default page background |
|
|
24
|
+
| `colour.surface.raised` | `#fafafa` | Cards, modals, raised elements |
|
|
25
|
+
| `colour.text.primary` | `#1a1a1a` | Default text colour |
|
|
26
|
+
| `colour.text.muted` | `#666666` | Secondary text, captions |
|
|
27
|
+
| `colour.text.inverse` | `#ffffff` | Text on dark / brand backgrounds |
|
|
28
|
+
| `colour.feedback.success` | `#000000` | Positive confirmations |
|
|
29
|
+
| `colour.feedback.warning` | `#000000` | Caution states |
|
|
30
|
+
| `colour.feedback.danger` | `#000000` | Errors, destructive actions |
|
|
31
|
+
| `colour.feedback.info` | `#000000` | Informational notices |
|
|
32
|
+
| `colour.action.primary` | `#000000` | The main call-to-action |
|
|
33
|
+
| `colour.action.secondary` | `#000000` | Less prominent actions |
|
|
34
|
+
|
|
35
|
+
## Accessibility
|
|
36
|
+
|
|
37
|
+
[List the contrast pairs that must hold. Project-wide commitments live in `accessibility.md`; the table here documents which colour combinations are accessible.]
|
|
38
|
+
|
|
39
|
+
| Foreground × Background | Contrast | Standard met |
|
|
40
|
+
| --- | --- | --- |
|
|
41
|
+
| `colour.text.primary × colour.surface.canvas` | [4.5:1+] | AA / AAA |
|
|
42
|
+
| `colour.text.muted × colour.surface.canvas` | [4.5:1+] | AA / AAA |
|
|
43
|
+
|
|
44
|
+
> Test every text/background pair against [WebAIM's contrast checker](https://webaim.org/resources/contrastchecker/) or equivalent. AA is the minimum commitment; AAA where it matters.
|
|
45
|
+
|
|
46
|
+
## Dark mode (if applicable)
|
|
47
|
+
|
|
48
|
+
[Either a full second set of tokens or a transformation rule. Leave out if dark mode isn't planned for this project.]
|
|
49
|
+
|
|
50
|
+
## How to change a colour
|
|
51
|
+
|
|
52
|
+
A colour change is a design-system decision. File it as a D-NNN if the change is project-wide and load-bearing (e.g. the brand changes). Day-to-day refinements to specific hex values can happen in this file directly during early planning — once the design system reaches 🟢 active status, changes get more deliberate.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Motion tokens
|
|
2
|
+
|
|
3
|
+
> *Filled in during the UI/UX + Design System phase of planning.*
|
|
4
|
+
|
|
5
|
+
**Status:** 🔵 proposed
|
|
6
|
+
**Last updated:** {{TODAY}}
|
|
7
|
+
|
|
8
|
+
## Duration scale
|
|
9
|
+
|
|
10
|
+
| Token | Value | Typical use |
|
|
11
|
+
| --- | --- | --- |
|
|
12
|
+
| `motion.duration.instant` | 0ms | Hovering between focused/unfocused |
|
|
13
|
+
| `motion.duration.quick` | 150ms | Hover states, focus rings, small UI feedback |
|
|
14
|
+
| `motion.duration.medium` | 250ms | Modal open/close, page transitions, accordion |
|
|
15
|
+
| `motion.duration.slow` | 400ms | Larger view transitions, complex reveals |
|
|
16
|
+
| `motion.duration.long` | 700ms | Onboarding moments, celebratory feedback |
|
|
17
|
+
|
|
18
|
+
## Easing
|
|
19
|
+
|
|
20
|
+
| Token | Curve | Used for |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| `motion.ease.standard` | `cubic-bezier(0.4, 0, 0.2, 1)` | Default; balanced acceleration + deceleration |
|
|
23
|
+
| `motion.ease.enter` | `cubic-bezier(0, 0, 0.2, 1)` | Things appearing on screen |
|
|
24
|
+
| `motion.ease.exit` | `cubic-bezier(0.4, 0, 1, 1)` | Things leaving the screen |
|
|
25
|
+
| `motion.ease.emphasis` | `cubic-bezier(0.2, 0.7, 0, 1)` | Big moments that should feel deliberate |
|
|
26
|
+
|
|
27
|
+
## Principles
|
|
28
|
+
|
|
29
|
+
- **Motion communicates state change**, not decoration. Every animation should answer "what just changed?"
|
|
30
|
+
- **Faster is friendlier for repetitive interactions.** A modal opening 60 times a day at 600ms is annoying; the same modal at 250ms feels right.
|
|
31
|
+
- **Slower is friendlier for rare, big moments.** A celebration animation can take 700ms; nobody minds.
|
|
32
|
+
- **Respect `prefers-reduced-motion`.** All non-essential motion should be substantially reduced or removed when the user has set this preference.
|
|
33
|
+
|
|
34
|
+
## Accessibility
|
|
35
|
+
|
|
36
|
+
When `prefers-reduced-motion: reduce` is set:
|
|
37
|
+
|
|
38
|
+
- Replace transition-based motion (slide, scale, fade) with instant state changes
|
|
39
|
+
- Keep durations for unavoidable transitions under 150ms
|
|
40
|
+
- No parallax, no auto-playing media
|
|
41
|
+
|
|
42
|
+
The full accessibility commitment lives in `accessibility.md`.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Radius and elevation tokens
|
|
2
|
+
|
|
3
|
+
> *Filled in during the UI/UX + Design System phase of planning.*
|
|
4
|
+
|
|
5
|
+
**Status:** 🔵 proposed
|
|
6
|
+
**Last updated:** {{TODAY}}
|
|
7
|
+
|
|
8
|
+
## Border radius
|
|
9
|
+
|
|
10
|
+
| Token | Value | Typical use |
|
|
11
|
+
| --- | --- | --- |
|
|
12
|
+
| `radius.none` | 0 | Sharp corners (full-width banners, separators) |
|
|
13
|
+
| `radius.small` | 4px | Small UI elements (tags, badges, inputs) |
|
|
14
|
+
| `radius.medium` | 8px | Cards, buttons, modals |
|
|
15
|
+
| `radius.large` | 16px | Feature cards, prominent containers |
|
|
16
|
+
| `radius.full` | 9999px | Pills, avatars, circular buttons |
|
|
17
|
+
|
|
18
|
+
## Elevation / shadow
|
|
19
|
+
|
|
20
|
+
Shadows are used to indicate hierarchy and interactivity — what's pressable, what's floating, what's pinned.
|
|
21
|
+
|
|
22
|
+
| Token | Value | Used for |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| `elevation.none` | none | Default; in-flow elements |
|
|
25
|
+
| `elevation.low` | `0 1px 2px rgba(0,0,0,0.05)` | Cards, raised surfaces |
|
|
26
|
+
| `elevation.medium` | `0 4px 8px rgba(0,0,0,0.08)` | Hover states, popovers |
|
|
27
|
+
| `elevation.high` | `0 8px 24px rgba(0,0,0,0.12)` | Modals, dropdowns |
|
|
28
|
+
| `elevation.highest` | `0 16px 48px rgba(0,0,0,0.16)` | Notifications, toasts (briefly) |
|
|
29
|
+
|
|
30
|
+
## Principles
|
|
31
|
+
|
|
32
|
+
- **Pick a small set and use it consistently.** Two or three elevation levels usually beats five. Hierarchy is communicated by *which* level something uses, not by having many.
|
|
33
|
+
- **Shadows belong on light surfaces.** On dark themes, the analog is a subtle border or a brighter background rather than a shadow.
|
|
34
|
+
- **Radius is part of brand voice.** Sharp corners feel different from rounded ones. Pick once; apply consistently. A button that's `radius.medium` and a card that's `radius.large` is fine; a button that's `radius.medium` in one place and `radius.small` in another is design drift.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Spacing tokens
|
|
2
|
+
|
|
3
|
+
> *Filled in during the UI/UX + Design System phase of planning.*
|
|
4
|
+
|
|
5
|
+
**Status:** 🔵 proposed
|
|
6
|
+
**Last updated:** {{TODAY}}
|
|
7
|
+
|
|
8
|
+
## Spacing scale
|
|
9
|
+
|
|
10
|
+
A small set of consistent values used everywhere. Build everything from these. Don't introduce custom one-off values.
|
|
11
|
+
|
|
12
|
+
| Token | Value | Typical use |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `space.0` | 0 | Reset |
|
|
15
|
+
| `space.1` | 4px | Tight pairs (icon next to label) |
|
|
16
|
+
| `space.2` | 8px | Internal padding of small elements |
|
|
17
|
+
| `space.3` | 12px | Default gap between related items |
|
|
18
|
+
| `space.4` | 16px | Comfortable padding inside cards/buttons |
|
|
19
|
+
| `space.5` | 24px | Section padding |
|
|
20
|
+
| `space.6` | 32px | Between sections |
|
|
21
|
+
| `space.7` | 48px | Between major page regions |
|
|
22
|
+
| `space.8` | 64px | Hero/breathing room |
|
|
23
|
+
| `space.9` | 96px | Above-the-fold space |
|
|
24
|
+
|
|
25
|
+
## Layout grid
|
|
26
|
+
|
|
27
|
+
[The column system used for major page layouts. Most projects use a 12-column grid; some use 8 or 16. Pick one and stick to it.]
|
|
28
|
+
|
|
29
|
+
- **Columns:** 12
|
|
30
|
+
- **Gutter:** `space.4` (16px)
|
|
31
|
+
- **Margin:** `space.5` (24px) on mobile, `space.7` (48px) on desktop
|
|
32
|
+
- **Max content width:** 1200px (or as appropriate)
|
|
33
|
+
|
|
34
|
+
## Breakpoints
|
|
35
|
+
|
|
36
|
+
| Token | Width | Targets |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `bp.mobile` | up to 639px | Phones |
|
|
39
|
+
| `bp.tablet` | 640px – 1023px | Tablets, small laptops |
|
|
40
|
+
| `bp.desktop` | 1024px+ | Larger laptops, monitors |
|
|
41
|
+
|
|
42
|
+
Mobile-first by default — design for `bp.mobile`; add styling at larger breakpoints as needed.
|
|
43
|
+
|
|
44
|
+
## Principles
|
|
45
|
+
|
|
46
|
+
- **Use multiples of 4px.** The scale above is built from a 4px base. Custom values that aren't multiples of 4 produce subtle visual noise.
|
|
47
|
+
- **Vertical rhythm matters.** Consistent spacing between text blocks does more for legibility than any single typography choice.
|
|
48
|
+
- **More space than you think.** When in doubt, increase the gap. Crowded interfaces feel harder to use than they are.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Typography tokens
|
|
2
|
+
|
|
3
|
+
> *Filled in during the UI/UX + Design System phase of planning.*
|
|
4
|
+
|
|
5
|
+
**Status:** 🔵 proposed
|
|
6
|
+
**Last updated:** {{TODAY}}
|
|
7
|
+
|
|
8
|
+
## Font families
|
|
9
|
+
|
|
10
|
+
| Token | Value | Used for |
|
|
11
|
+
| --- | --- | --- |
|
|
12
|
+
| `font.sans` | `[font name]`, system-ui, sans-serif | Body text, UI |
|
|
13
|
+
| `font.serif` | `[font name]`, serif | Long-form reading (if applicable) |
|
|
14
|
+
| `font.mono` | ui-monospace, monospace | Code, numerical alignment |
|
|
15
|
+
|
|
16
|
+
## Type scale
|
|
17
|
+
|
|
18
|
+
| Token | Size | Line height | Weight | Used for |
|
|
19
|
+
| --- | --- | --- | --- | --- |
|
|
20
|
+
| `text.display.large` | 56px | 1.1 | 700 | Hero headings |
|
|
21
|
+
| `text.display.medium` | 40px | 1.15 | 700 | Section headings |
|
|
22
|
+
| `text.title.large` | 28px | 1.2 | 600 | Page titles |
|
|
23
|
+
| `text.title.medium` | 22px | 1.25 | 600 | Subheadings |
|
|
24
|
+
| `text.body.large` | 18px | 1.5 | 400 | Lead paragraphs |
|
|
25
|
+
| `text.body.medium` | 16px | 1.5 | 400 | Default body |
|
|
26
|
+
| `text.body.small` | 14px | 1.5 | 400 | Captions, hint text |
|
|
27
|
+
| `text.label.medium` | 14px | 1.3 | 500 | Form labels, button text |
|
|
28
|
+
| `text.label.small` | 12px | 1.3 | 500 | Tags, badges |
|
|
29
|
+
|
|
30
|
+
> Adjust the scale as needed. A few principles: keep the scale modular (each step a constant ratio from the next, e.g. 1.25× or 1.333×); cap the largest size at what's legible on the smallest target screen; line height tightens as text gets bigger.
|
|
31
|
+
|
|
32
|
+
## Weight scale
|
|
33
|
+
|
|
34
|
+
| Token | Numeric | Used for |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `weight.regular` | 400 | Body |
|
|
37
|
+
| `weight.medium` | 500 | Labels, emphasis |
|
|
38
|
+
| `weight.semibold` | 600 | Titles |
|
|
39
|
+
| `weight.bold` | 700 | Display, strong emphasis |
|
|
40
|
+
|
|
41
|
+
## Notes on readability
|
|
42
|
+
|
|
43
|
+
- **Body text is the default.** Optimise for `text.body.medium` first; everything else is built around it.
|
|
44
|
+
- **Line length matters as much as type size.** Aim for 60-80 characters per line in body text.
|
|
45
|
+
- **Headings should be readable at glance.** A large heading that takes effort to parse is worse than a smaller one.
|
|
46
|
+
- **Test on the target devices.** Type that works on a designer's 27" monitor often fails on a 13" laptop or a phone in bright sunlight.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Voice and tone
|
|
2
|
+
|
|
3
|
+
> *Filled in during the UI/UX + Design System phase of planning. The AI walks you through it — start by describing how {{PROJECT_NAME}} should "sound" to the people using it, then derive principles, then build out specific microcopy examples.*
|
|
4
|
+
|
|
5
|
+
**Status:** 🔵 proposed
|
|
6
|
+
**Last updated:** {{TODAY}}
|
|
7
|
+
|
|
8
|
+
## How {{PROJECT_NAME}} sounds
|
|
9
|
+
|
|
10
|
+
[One paragraph describing the personality. Honest, warm, direct, calm, professional, playful, etc. Pick three or four words; explain in plain language. *"Calm, direct, never patronising. Speaks to teachers the way a trusted colleague speaks to another teacher."*]
|
|
11
|
+
|
|
12
|
+
## Five rules of voice
|
|
13
|
+
|
|
14
|
+
[List the load-bearing principles for any writing in the product. Examples:]
|
|
15
|
+
|
|
16
|
+
1. **Plain language, no jargon.** If a word would lose a domain expert, use a different word.
|
|
17
|
+
2. **Acknowledge the person.** Address them in the second person ("you"), not the third ("the user").
|
|
18
|
+
3. **Be specific.** *"You'll get an email tomorrow morning"* beats *"Notification will be sent."*
|
|
19
|
+
4. **Own mistakes.** When the system breaks, say what happened, what we're doing about it, and what they can do next. Never blame the user.
|
|
20
|
+
5. **Never patronise.** Domain experts can read; don't explain things they obviously know.
|
|
21
|
+
|
|
22
|
+
## Tone by context
|
|
23
|
+
|
|
24
|
+
| Context | Tone | Example |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| Welcoming a new user | Warm, calm | *"Welcome — let's get you set up. This takes about ten minutes."* |
|
|
27
|
+
| Confirming success | Direct, brief | *"Saved. {{PROJECT_NAME}} will email you tomorrow at 7am."* |
|
|
28
|
+
| Asking for input | Specific, calm | *"What does tomorrow's class look like? Tell us what you'd usually note down."* |
|
|
29
|
+
| Reporting an error | Honest, helpful | *"The morning briefing didn't reach you today. We've already fixed it. You can run it manually with this button, or wait for tomorrow."* |
|
|
30
|
+
| Asking the user to slow down | Gentle | *"This will undo {{PROJECT_NAME}}'s overnight work. Are you sure you want to start over?"* |
|
|
31
|
+
| Empty states | Encouraging | *"No students yet. Add one with the button above — or import a class from yesterday."* |
|
|
32
|
+
|
|
33
|
+
## Words we use
|
|
34
|
+
|
|
35
|
+
| Use | Not |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| sign in | log in |
|
|
38
|
+
| email | electronic mail |
|
|
39
|
+
| {{PROJECT_NAME}} | the system, the app, the platform |
|
|
40
|
+
| school server | backend |
|
|
41
|
+
| your students | "the cohort", "the user base" |
|
|
42
|
+
|
|
43
|
+
[Add to this list as patterns emerge. Voice and tone live by examples; abstractions don't help.]
|
|
44
|
+
|
|
45
|
+
## Words we never use
|
|
46
|
+
|
|
47
|
+
[Project-specific banned words. Often: corporate jargon, false urgency, dark patterns.]
|
|
48
|
+
|
|
49
|
+
- "Click here"
|
|
50
|
+
- "Unfortunately"
|
|
51
|
+
- "Oops!"
|
|
52
|
+
- "We've sent you an email — it might be in your spam folder" (just acknowledge it might not have arrived; don't blame their inbox)
|
|
53
|
+
- [project-specific additions]
|