@istmx/skills 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -0
- package/bin/cli.js +251 -0
- package/istm/SKILL.md +65 -0
- package/istm-animate/SKILL.md +87 -0
- package/istm-animate/animations/animation_utils.md +280 -0
- package/istm-animate/animations/animations.md +220 -0
- package/istm-animate/animations/core_motion.md +250 -0
- package/istm-animate/animations/examples/README.md +29 -0
- package/istm-animate/animations/examples/nuxt/app/app.vue +3 -0
- package/istm-animate/animations/examples/nuxt/app/composables/useGSAP.ts +91 -0
- package/istm-animate/animations/examples/nuxt/app/pages/index.vue +55 -0
- package/istm-animate/animations/examples/nuxt/nuxt.config.ts +4 -0
- package/istm-animate/animations/examples/nuxt/package.json +18 -0
- package/istm-animate/animations/examples/react/App.jsx +46 -0
- package/istm-animate/animations/examples/react/index.html +12 -0
- package/istm-animate/animations/examples/react/main.jsx +9 -0
- package/istm-animate/animations/examples/react/package.json +21 -0
- package/istm-animate/animations/examples/react/vite.config.js +7 -0
- package/istm-animate/animations/examples/vanilla/index.html +33 -0
- package/istm-animate/animations/examples/vanilla/main.js +36 -0
- package/istm-animate/animations/examples/vue/app.vue +47 -0
- package/istm-animate/animations/examples/vue/index.html +15 -0
- package/istm-animate/animations/examples/vue/main.js +9 -0
- package/istm-animate/animations/examples/vue/package.json +19 -0
- package/istm-animate/animations/examples/vue/vite.config.js +7 -0
- package/istm-animate/animations/framework_motion.md +262 -0
- package/istm-animate/animations/motion.csv +17 -0
- package/istm-animate/animations/motion.md +11 -0
- package/istm-animate/animations/motion_catalog.json +226 -0
- package/istm-animate/animations/motion_performance.md +75 -0
- package/istm-animate/animations/motion_plugins.md +429 -0
- package/istm-animate/animations/react_animations.md +132 -0
- package/istm-animate/animations/scroll_trigger_effects.md +291 -0
- package/istm-animate/animations/timeline_sequencing.md +103 -0
- package/istm-architecture/SKILL.md +109 -0
- package/istm-architecture/frameworks/angular.csv +51 -0
- package/istm-architecture/frameworks/astro.csv +54 -0
- package/istm-architecture/frameworks/avalonia.csv +57 -0
- package/istm-architecture/frameworks/flutter.csv +53 -0
- package/istm-architecture/frameworks/javafx.csv +76 -0
- package/istm-architecture/frameworks/jetpack-compose.csv +53 -0
- package/istm-architecture/frameworks/laravel.csv +51 -0
- package/istm-architecture/frameworks/nextjs.csv +53 -0
- package/istm-architecture/frameworks/nuxtjs.csv +59 -0
- package/istm-architecture/frameworks/react-native.csv +52 -0
- package/istm-architecture/frameworks/react.csv +54 -0
- package/istm-architecture/frameworks/svelte.csv +54 -0
- package/istm-architecture/frameworks/swiftui.csv +51 -0
- package/istm-architecture/frameworks/uwp.csv +56 -0
- package/istm-architecture/frameworks/vue.csv +50 -0
- package/istm-architecture/frameworks/winui.csv +60 -0
- package/istm-architecture/frameworks/wpf.csv +57 -0
- package/istm-architecture/templates/agents.md +229 -0
- package/istm-architecture/templates/architecture.md +111 -0
- package/istm-architecture/templates/design.md +138 -0
- package/istm-architecture/templates/project-overview.md +215 -0
- package/istm-awwward-designer/SKILL.md +43 -0
- package/istm-awwward-designer/libraries/threejs.csv +54 -0
- package/istm-awwward-designer/references/accessibility.md +774 -0
- package/istm-awwward-designer/references/anim-anti-patterns.md +576 -0
- package/istm-awwward-designer/references/animation-map.md +166 -0
- package/istm-awwward-designer/references/animation-standards.md +86 -0
- package/istm-awwward-designer/references/anti-patterns.md +191 -0
- package/istm-awwward-designer/references/color-systems.md +604 -0
- package/istm-awwward-designer/references/css-performance.md +477 -0
- package/istm-awwward-designer/references/descender-safety.md +490 -0
- package/istm-awwward-designer/references/design-audit.md +93 -0
- package/istm-awwward-designer/references/font-loading.md +378 -0
- package/istm-awwward-designer/references/image-optimization.md +440 -0
- package/istm-awwward-designer/references/invention-gate.md +356 -0
- package/istm-awwward-designer/references/micro-interactions.md +825 -0
- package/istm-awwward-designer/references/page-transitions.md +365 -0
- package/istm-awwward-designer/references/performance-standards.md +79 -0
- package/istm-awwward-designer/references/quality-gate.md +103 -0
- package/istm-awwward-designer/references/responsive-design.md +778 -0
- package/istm-awwward-designer/references/scoring-guide.md +201 -0
- package/istm-awwward-designer/references/scroll-patterns.md +668 -0
- package/istm-awwward-designer/references/stitch-brief.md +124 -0
- package/istm-awwward-designer/references/tech-stack.md +204 -0
- package/istm-awwward-designer/references/technical-audit.md +133 -0
- package/istm-awwward-designer/references/technique-families.md +293 -0
- package/istm-awwward-designer/references/testing.md +535 -0
- package/istm-awwward-designer/references/text-animation.md +585 -0
- package/istm-awwward-designer/references/typography.md +504 -0
- package/istm-awwward-designer/references/usability-audit.md +108 -0
- package/istm-awwward-designer/references/visual-standards.md +97 -0
- package/istm-design/SKILL.md +98 -0
- package/istm-design/colors/color_theory.md +293 -0
- package/istm-design/colors/colors.csv +193 -0
- package/istm-design/colors/colors_catalog.json +4034 -0
- package/istm-design/colors/palette.json +21 -0
- package/istm-design/styles/design_system.md +288 -0
- package/istm-design/styles/html-tailwind.csv +56 -0
- package/istm-design/styles/nuxt-ui.csv +71 -0
- package/istm-design/styles/product_design.md +55 -0
- package/istm-design/styles/shadcn.csv +61 -0
- package/istm-design/styles/style.md +12 -0
- package/istm-design/styles/styles.csv +85 -0
- package/istm-design/styles/styles_catalog.json +2018 -0
- package/istm-design/styles/ui-reasoning.csv +162 -0
- package/istm-design/styles/uno.csv +60 -0
- package/istm-design/typography/font_and_font.md +10 -0
- package/istm-design/typography/google-fonts.csv +1924 -0
- package/istm-design/typography/sans_serif_fonts.md +112 -0
- package/istm-design/typography/typography.csv +75 -0
- package/istm-design/typography/typography_catalog.json +964 -0
- package/istm-design/ux/app-interface.csv +31 -0
- package/istm-design/ux/charts.csv +26 -0
- package/istm-design/ux/icons.csv +106 -0
- package/istm-design/ux/landing.csv +35 -0
- package/istm-design/ux/products.csv +193 -0
- package/istm-design/ux/react-performance.csv +45 -0
- package/istm-design/ux/responsive_rules.md +62 -0
- package/istm-design/ux/storytelling.md +47 -0
- package/istm-design/ux/ux-guidelines.csv +100 -0
- package/istm-design/ux/ux_guidelines.json +1190 -0
- package/istm-system-design/SKILL.md +88 -0
- package/istm-system-design/principles/01-architecture-patterns.md +24 -0
- package/istm-system-design/principles/02-database-selection.md +32 -0
- package/istm-system-design/principles/03-api-design.md +25 -0
- package/istm-system-design/principles/04-authentication-security.md +23 -0
- package/istm-system-design/principles/05-caching-performance.md +21 -0
- package/istm-system-design/principles/06-asynchronous-processing.md +17 -0
- package/istm-system-design/principles/07-infrastructure-deployment.md +22 -0
- package/istm-system-design/principles/08-low-level-design.md +35 -0
- package/istm-system-design/principles/09-state-management.md +14 -0
- package/istm-system-design/principles/10-error-handling-and-logging.md +26 -0
- package/istm-system-design/principles/11-testing-strategy.md +18 -0
- package/istm-system-design/principles/12-seo-and-web-vitals.md +18 -0
- package/istm-system-design/stacks/SETUP.md +82 -0
- package/istm-system-design/stacks/STACK.md +67 -0
- package/istm-system-design/stacks/WORKFLOW.md +84 -0
- package/istm-system-design/templates/api-route.ts.template +32 -0
- package/istm-system-design/templates/migrations.md.template +30 -0
- package/istm-system-design/templates/schema.drizzle.ts.template +17 -0
- package/istm-system-design/templates/schema.prisma.template +28 -0
- package/istm-system-design/templates/trpc-router.ts.template +22 -0
- package/istm-system-design/templates/zod-validators.ts.template +14 -0
- package/istm-workflow/istm-audit/SKILL.md +108 -0
- package/istm-workflow/istm-audit/agent-prompt.md +393 -0
- package/istm-workflow/istm-audit/agents/openai.yaml +7 -0
- package/istm-workflow/istm-audit/modes/area.md +19 -0
- package/istm-workflow/istm-audit/modes/gapfill.md +12 -0
- package/istm-workflow/istm-audit/modes/greenfield.md +24 -0
- package/istm-workflow/istm-audit/modes/tool-skills.md +39 -0
- package/istm-workflow/istm-audit/modes/whole-repo.md +5 -0
- package/istm-workflow/istm-audit/patterns/clean-architecture.md +15 -0
- package/istm-workflow/istm-audit/patterns/domain-driven.md +16 -0
- package/istm-workflow/istm-audit/patterns/functional.md +16 -0
- package/istm-workflow/istm-audit/patterns/solid-oop.md +17 -0
- package/istm-workflow/istm-check/SKILL.md +52 -0
- package/istm-workflow/istm-check/agents/openai.yaml +7 -0
- package/istm-workflow/istm-check/modes/review.md +156 -0
- package/istm-workflow/istm-check/modes/verify.md +197 -0
- package/istm-workflow/istm-check/review-agent-prompt.md +57 -0
- package/istm-workflow/istm-check/review-guide.md +133 -0
- package/istm-workflow/istm-craft/SKILL.md +37 -0
- package/istm-workflow/istm-craft/agent-modes/architecture.md +73 -0
- package/istm-workflow/istm-craft/agent-modes/cross-cutting.md +65 -0
- package/istm-workflow/istm-craft/agent-modes/enhancement.md +45 -0
- package/istm-workflow/istm-craft/agent-modes/feature.md +85 -0
- package/istm-workflow/istm-craft/agent-prompt.md +249 -0
- package/istm-workflow/istm-craft/agents/openai.yaml +7 -0
- package/istm-workflow/istm-craft/internal/after-subagent.md +90 -0
- package/istm-workflow/istm-craft/internal/design-conversation.md +140 -0
- package/istm-workflow/istm-craft/internal/tool-discovery.md +58 -0
- package/istm-workflow/istm-craft/spec-template.md +278 -0
- package/istm-workflow/istm-debug/SKILL.md +102 -0
- package/istm-workflow/istm-debug/agents/openai.yaml +7 -0
- package/istm-workflow/istm-develop/SKILL.md +144 -0
- package/istm-workflow/istm-develop/agents/openai.yaml +7 -0
- package/istm-workflow/istm-develop/checklist.md +95 -0
- package/istm-workflow/istm-develop/flow/build.md +133 -0
- package/istm-workflow/istm-develop/flow/git.md +34 -0
- package/istm-workflow/istm-develop/logical-guide.md +99 -0
- package/istm-workflow/istm-develop/ui/existing.md +23 -0
- package/istm-workflow/istm-develop/ui/generate.md +131 -0
- package/istm-workflow/istm-develop/ui/image.md +41 -0
- package/istm-workflow/istm-develop/ui/implementation.md +281 -0
- package/istm-workflow/istm-develop/ui/mcp.md +11 -0
- package/istm-workflow/istm-develop/ui-guide.md +164 -0
- package/istm-workflow/istm-document/SKILL.md +123 -0
- package/istm-workflow/istm-document/agent-prompt.md +57 -0
- package/istm-workflow/istm-document/agents/openai.yaml +7 -0
- package/istm-workflow/istm-document/templates/changelog.md +54 -0
- package/istm-workflow/istm-document/templates/postmortem.md +58 -0
- package/istm-workflow/istm-document/templates/pr.md +43 -0
- package/istm-workflow/istm-document/templates/release-note.md +41 -0
- package/istm-workflow/istm-scope/SKILL.md +100 -0
- package/istm-workflow/istm-scope/agents/openai.yaml +7 -0
- package/istm-workflow/istm-scope/approaches/facade.md +33 -0
- package/istm-workflow/istm-scope/approaches/journey.md +31 -0
- package/istm-workflow/istm-scope/approaches/skateboard.md +33 -0
- package/istm-workflow/istm-scope/approaches/tracer-bullet.md +34 -0
- package/istm-workflow/istm-scope/modes/add.md +14 -0
- package/istm-workflow/istm-scope/modes/plan-brownfield.md +11 -0
- package/istm-workflow/istm-scope/modes/plan-greenfield.md +20 -0
- package/istm-workflow/istm-scope/modes/plan-monorepo.md +8 -0
- package/istm-workflow/istm-scope/modes/plan.md +120 -0
- package/istm-workflow/istm-scope/modes/replan.md +13 -0
- package/istm-workflow/istm-scope/scope-template.md +148 -0
- package/istm-workflow/istm-sync/SKILL.md +166 -0
- package/istm-workflow/istm-sync/agent-prompt.md +211 -0
- package/istm-workflow/istm-sync/agents/openai.yaml +7 -0
- package/istm-workflow/istm-test/SKILL.md +233 -0
- package/istm-workflow/istm-test/agent-prompt.md +62 -0
- package/istm-workflow/istm-test/agents/openai.yaml +7 -0
- package/istm-workflow/istm-test/modes/setup.md +97 -0
- package/istm-workflow/istm-test/writing-guide.md +196 -0
- package/package.json +35 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# UI Source: generated
|
|
2
|
+
|
|
3
|
+
## Path B: No source, establish the system, then build (design first)
|
|
4
|
+
|
|
5
|
+
This is case 4 from the guide: nothing was provided, so you establish the design system, then build to the bar. Design first, integrate second.
|
|
6
|
+
|
|
7
|
+
**Prefer a proven design skill when one is available** (Anthropic's `frontend-design` on Claude Code, Codex's frontend skill, or a design MCP): it sets the visual direction with the same craft that makes the chat app's output good. With none available, derive the system from B2. Either way the token values land in CSS and the art direction lands in `.istm-context/design.md`.
|
|
8
|
+
|
|
9
|
+
There are no bundled brand templates. You do not copy a design system, you derive one and prove it holds up.
|
|
10
|
+
|
|
11
|
+
### B1: Find the direction (a reference if one exists, else a mood)
|
|
12
|
+
|
|
13
|
+
Ask for a reference first; a real one beats anything you invent, and engineers often have one in mind without offering it. Use the agent's picker (`AskUserQuestion` on Claude Code), else plain text with the same options (the picker adds its own free text option; add one yourself in the fallback).
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
"Anything to steer the design?" (header: "Direction")
|
|
17
|
+
- A site or brand URL "I'll read it and pull the real colors and type"
|
|
18
|
+
- A .istm-context/design.md URL "I'll fetch it, validate it, and adopt it"
|
|
19
|
+
- Describe a style "Tell me the feel and I'll derive the system"
|
|
20
|
+
- Nothing, suggest one "I'll pick a direction and derive it" (recommended)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- **A screenshot or Figma after all?** Stop and route back through the guide's Step 0 (`ui/image.md` or `ui/mcp.md`). Replicating a real reference beats deriving one.
|
|
24
|
+
- **A site or brand URL** → fetch it (no web capability on the main thread: spawn the read only `researcher` subagent on the cheapest model). Read its CSS custom properties and computed styles, not a screenshot of it. Take the accent, the neutral ladder, the fonts, the radius. Then run the B2 checks on what you took: real sites often fail contrast, and you fix it rather than copy the failure.
|
|
25
|
+
- **A .istm-context/design.md URL** → fetch, validate it has colors and typography, adopt it, then run the B2 checks.
|
|
26
|
+
- **Describe a style** → their words plus the aesthetic guide below, into B2.
|
|
27
|
+
- **Nothing** → ask the mood, then derive.
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
"What mood should this UI have?" (header: "Mood")
|
|
31
|
+
- Dark & focused "near black canvas, precise, technical, low chrome"
|
|
32
|
+
- Light & professional "white or off white canvas, calm, trustworthy"
|
|
33
|
+
- Bold & editorial "strong personality, high contrast, large type"
|
|
34
|
+
- Custom "describe it and I'll derive from that"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The mood sets four things only: canvas polarity, accent saturation, type personality, density. You derive everything else in B2.
|
|
38
|
+
|
|
39
|
+
### B2: Derive the tokens, do not recall them
|
|
40
|
+
|
|
41
|
+
Never emit a palette from memory. Derive it, then verify it, then write it. State the values in chat as you go so the engineer can push back before you touch CSS.
|
|
42
|
+
|
|
43
|
+
**1. Accent.** Choose ONE accent hue that fits the direction. Name the exact hex. A second accent is a decision, not a default; a system with one accent and a good neutral ladder looks more designed than one with three.
|
|
44
|
+
|
|
45
|
+
**2. Neutrals.** Build one lightness ladder for the whole system, from canvas to ink. Six steps, each a clear visual step from the last, all sharing a slight hue tint from the accent so the greys feel intentional rather than default:
|
|
46
|
+
|
|
47
|
+
| Token | Role | Light mode | Dark mode |
|
|
48
|
+
|---|---|---|---|
|
|
49
|
+
| `--color-canvas` | page background | lightest | darkest |
|
|
50
|
+
| `--color-surface` | card, panel, raised area | one step in | one step up |
|
|
51
|
+
| `--color-border` | hairline, divider | subtle against surface | subtle against surface |
|
|
52
|
+
| `--color-muted` | captions, placeholders | mid | mid |
|
|
53
|
+
| `--color-body` | secondary text | dark | light |
|
|
54
|
+
| `--color-ink` | primary text, headings | darkest | lightest |
|
|
55
|
+
|
|
56
|
+
Then the semantic pair `--color-success` and `--color-error`, and `--color-on-accent` for text sitting on the accent.
|
|
57
|
+
|
|
58
|
+
**3. Verify contrast before you write a single line of CSS.** This is the step that separates a derived system from a guessed one. Compute the WCAG ratio for each pair and state it:
|
|
59
|
+
|
|
60
|
+
- `--color-body` on `--color-canvas`: **4.5:1 minimum**
|
|
61
|
+
- `--color-ink` on `--color-canvas`: 4.5:1 minimum (it will pass easily; check anyway)
|
|
62
|
+
- `--color-muted` on `--color-canvas`: 4.5:1 if it carries meaning, 3:1 if purely decorative
|
|
63
|
+
- `--color-on-accent` on `--color-accent`: **4.5:1 minimum**. This is the one that usually fails.
|
|
64
|
+
- `--color-border` against `--color-surface`: **3:1** when the border is the only thing marking a control (an input, a button outline, a focus ring). A purely decorative divider may go lower.
|
|
65
|
+
- Large text (24px, or 19px bold) and icons: 3:1
|
|
66
|
+
|
|
67
|
+
Check **light and dark separately**. A ladder that passes in light frequently fails inverted. Any pair that fails: adjust that step's lightness and recompute. Do not ship a failing pair with a note; fix it. Report the final ratios in the build report.
|
|
68
|
+
|
|
69
|
+
**4. Type.** One sans for the whole system unless the direction demands a display face; then two, never three. Use a modular scale rather than picked numbers, so the sizes relate to each other:
|
|
70
|
+
|
|
71
|
+
- Base 16px. Ratio 1.200 (minor third) for product UI, 1.250 for marketing, 1.333 for editorial.
|
|
72
|
+
- Line height 1.5 for body, 1.2 for display sizes. Tighter as size grows, never the reverse.
|
|
73
|
+
- Weights: three at most (regular, medium, bold). Letter spacing negative only above about 32px.
|
|
74
|
+
|
|
75
|
+
**5. Space.** A 4px base unit, an 8px rhythm. Every gap, pad, and margin is a multiple. Section spacing is its own larger step, not a random number.
|
|
76
|
+
|
|
77
|
+
**6. Radius and motion.** Three steps each, no more. Radius: small (inputs, buttons), medium (cards), full (pills, avatars). Motion: instant (about 80ms), base (about 160ms), slow (about 240ms), with one standard ease and one spring. Zero radius and zero motion are valid choices for a brutalist direction; say so deliberately.
|
|
78
|
+
|
|
79
|
+
**7. Write the values into the project's CSS** (`app/globals.css` / `src/styles/tokens.css`, plus the tailwind config if used), per B3. That file is the single source of truth for colors, typography, spacing, radius, shadows, and motion.
|
|
80
|
+
|
|
81
|
+
**8. Write `.istm-context/design.md` as ART DIRECTION only**, never a copy of the token values, those live in CSS:
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
---
|
|
85
|
+
name: <style>-design-system
|
|
86
|
+
source: derived # or url:<url> | skill:frontend-design
|
|
87
|
+
character: "<2 to 3 sentences: the visual personality and mood>"
|
|
88
|
+
tokens: "real values live in app/globals.css (and tailwind config); read them there, never duplicated here"
|
|
89
|
+
contrast: "<the ratios you verified, e.g. body 7.1:1 light / 8.4:1 dark; on-accent 5.2:1>"
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Build mandate
|
|
93
|
+
You are a senior product designer. Every page ships as a complete, professional product surface: brand, real product specific copy, a considered layout with hierarchy, all states (empty, loading, error), supporting content, and a footer where the page warrants one. Maximalist, never a lone form on an empty page. Full disqualifier list: the UI guide's bar.
|
|
94
|
+
|
|
95
|
+
## Character & direction
|
|
96
|
+
<what makes this system distinct: the mood, the personality, the one or two moves that define it>
|
|
97
|
+
|
|
98
|
+
## Composition patterns
|
|
99
|
+
<how pages are assembled here: app shell, section rhythm, how auth / landing / list / detail pages lay out>
|
|
100
|
+
|
|
101
|
+
## Component & usage rules (do's and don'ts)
|
|
102
|
+
<accent usage (primary actions only, never decoration), elevation (hairline borders vs shadows), spacing rhythm, button and card conventions>
|
|
103
|
+
|
|
104
|
+
## Responsive & accessibility direction
|
|
105
|
+
<any project specific direction beyond the implementation defaults>
|
|
106
|
+
---
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Aesthetic guide** (a described style seeds the direction; you still derive and verify the values):
|
|
110
|
+
- **Cyberpunk**: near black canvas, neon cyan or magenta accent, 0 to 2px radius, mono font, dense spacing, fast motion (80ms), harsh easing
|
|
111
|
+
- **Brutalist**: pure black and white, 0px radius, thick borders, oversized type, zero motion
|
|
112
|
+
- **Glassmorphism**: frosted canvas, translucent surfaces, 16 to 24px radius, slow transitions (200 to 400ms), gentle spring
|
|
113
|
+
- **Notion style**: off white canvas, a serif display with a sans UI, 3px radius, generous `line-height`, fast subtle motion (100ms)
|
|
114
|
+
- **Apple consumer**: white canvas, system font stack, 10 to 20px radius, spring motion (200 to 350ms)
|
|
115
|
+
- **Named brand**: use that brand's documented colors and fonts, then verify contrast as above; substitute proprietary fonts (see font installation)
|
|
116
|
+
|
|
117
|
+
Fill every .istm-context/design.md section with real, specific direction. No placeholders, and no token value dumps (values live in CSS).
|
|
118
|
+
|
|
119
|
+
### B3: Create CSS token file
|
|
120
|
+
|
|
121
|
+
Create `app/globals.css`, `src/styles/tokens.css`, or add to an existing globals file. Define CSS custom properties for:
|
|
122
|
+
- All colors (light): `--color-canvas`, `--color-surface`, `--color-ink`, `--color-body`, `--color-muted`, `--color-accent`, `--color-on-accent`, `--color-border`, `--color-success`, `--color-error`
|
|
123
|
+
- Icon sizes: `--icon-sm: 16px`, `--icon-md: 20px`, `--icon-lg: 24px`
|
|
124
|
+
- Typography: `--font-sans`, size scale (`--text-xs` through `--text-4xl`), weight scale
|
|
125
|
+
- Spacing: `--space-xxs` through `--space-section`
|
|
126
|
+
- Radius: `--radius-sm` through `--radius-full`
|
|
127
|
+
- Motion: `--duration-instant` through `--duration-slow`, `--ease-standard`, `--ease-out`, `--ease-spring`
|
|
128
|
+
|
|
129
|
+
Apply dark overrides via the detected strategy (`.dark {}` or `@media (prefers-color-scheme: dark)`); only override tokens that differ in dark mode. If Tailwind is in use, also extend `tailwind.config.ts` under `theme.extend` with all token values, wiring color tokens via `var(--color-*)` so dark mode works automatically.
|
|
130
|
+
|
|
131
|
+
---
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# UI Source: image
|
|
2
|
+
|
|
3
|
+
## Step 1: Image vs no image
|
|
4
|
+
|
|
5
|
+
**Image attached** → **Path A**.
|
|
6
|
+
**No image** → **Path B**.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Path A: Pixel-perfect from image
|
|
11
|
+
|
|
12
|
+
The image was provided in chat (not a repo file); use the one in the conversation. Replicate it faithfully: the image is both the look and the composition, so match it, and do NOT embellish beyond it. The maximalist mandate is for the no-source path; here, fidelity to the reference governs. Tokenize what you see (values into CSS, character into `.istm-context/design.md`), and derive the responsive and accessible behavior a single screenshot cannot show (Phases 3 and 5). If the reference itself is a minimal screen, replicate it as given and note in the report that it is minimal.
|
|
13
|
+
|
|
14
|
+
### A0: Multiple images?
|
|
15
|
+
|
|
16
|
+
If more than one image, identify what each represents before analysis:
|
|
17
|
+
- **Same UI at different widths** → responsive breakpoints: extract layout changes per width, feed Phase 3
|
|
18
|
+
- **Same UI in different states** → default/hover/active/error: extract the visual diff per state, feed Phase 4
|
|
19
|
+
- **One light + one dark** → `colors:` from the light image, `colors-dark:` from the dark
|
|
20
|
+
|
|
21
|
+
Then run A1 on the primary (default/light) image.
|
|
22
|
+
|
|
23
|
+
### A1: Extract tokens from the image
|
|
24
|
+
|
|
25
|
+
Extract exactly what is visible, never fabricate values.
|
|
26
|
+
- **Colors**: canvas, surface(s), ink, body, muted, accent, accent-pressed, border, semantic colors; exact hex, not approximations
|
|
27
|
+
- **Typography**: family name if recognizable, size scale anchored to body = 16px, weights, line-heights, letter-spacing
|
|
28
|
+
- **Spacing**: 4px base unit; pad, gap, section rhythm, max-width
|
|
29
|
+
- **Geometry**: radius per element type, border widths, shadows (`x y blur spread color/opacity`), gradients, backdrop blur
|
|
30
|
+
- **Motion**: infer from context; micro-interactions (~100ms), standard (~200ms), reveals (~350ms), easing character
|
|
31
|
+
- **Mode**: light or dark, contrast level, sharpness
|
|
32
|
+
|
|
33
|
+
### A2: Tokens to CSS, character to .istm-context/design.md
|
|
34
|
+
|
|
35
|
+
Write the extracted token VALUES into the project's CSS token file (`globals.css` / tailwind config), the single source of truth, using `accent` (not `primary`) as the canonical accent name; include dark values if the design has or implies a dark mode. Record the visual character in `.istm-context/design.md` (art direction, per `ui/generate.md` B2's schema): `source: image`, a character summary, and the pointer to the CSS. Do not dump the token values into `.istm-context/design.md`.
|
|
36
|
+
|
|
37
|
+
### A3: Token file conflict check
|
|
38
|
+
|
|
39
|
+
Find existing token files. Conflicts between current values and the image: stop, list them before writing. Offer: `update` / `extend` / `skip`.
|
|
40
|
+
|
|
41
|
+
---
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# UI Implementation Phases
|
|
2
|
+
|
|
3
|
+
## Font installation
|
|
4
|
+
|
|
5
|
+
Identify fonts from `.istm-context/design.md` `typography.*.fontFamily`. System fonts (`system-ui`, `-apple-system`): no action. Proprietary fonts: check the project for font files (`*.ttf`, `*.otf`, `*.woff2`) first; none found → substitute and inform the user:
|
|
6
|
+
|
|
7
|
+
| Proprietary | Substitute |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Futura / Futura ND | Jost |
|
|
10
|
+
| Circular | DM Sans |
|
|
11
|
+
| Helvetica Now | Inter |
|
|
12
|
+
| Söhne / Graphik | Inter |
|
|
13
|
+
| GT Walsheim | Nunito |
|
|
14
|
+
| Canela | Playfair Display |
|
|
15
|
+
| Tiempos | Libre Baskerville |
|
|
16
|
+
| SF Pro | Inter |
|
|
17
|
+
|
|
18
|
+
A proprietary font not in this table: substitute the closest free font of the same classification (geometric sans → Jost/Poppins, grotesque/neo grotesque → Inter/Manrope, humanist sans → Source Sans, transitional/old style serif → nearest free serif) and say what you swapped. The table is a starting set, not the whole world of fonts.
|
|
19
|
+
|
|
20
|
+
**Loading:** Next.js → `next/font/google` with the `variable` option, applied to `<html>` in the root layout. Vite / other → `@import url(...)` at the top of the globals CSS, or `<link>` in the HTML entry point. Update `--font-sans` to match whatever was loaded.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Asset resolution (run before Phase 1 if the UI needs imagery)
|
|
25
|
+
|
|
26
|
+
Resolve where hero images, avatars, product/gallery photos, logos, illustrations, and background media come from before building markup, so you don't hardcode broken paths or invent files.
|
|
27
|
+
|
|
28
|
+
**Step 1: Does this build need image/media assets at all?** Pure form, table, or text layout: skip this section.
|
|
29
|
+
|
|
30
|
+
**Step 2: Look for matching project assets** (your file tools): search (ignoring `node_modules`, `.git`) for directories named `assets`, `images`, `img`, `media`, or `public`; scan them for filenames plausibly matching what the UI needs (hero, avatar, logo, product, …). Also check `.istm-context/design.md`/the design reference for named or pictured assets.
|
|
31
|
+
|
|
32
|
+
**Step 3: If no matching assets are found, ask** (as above; never silently invent paths, emoji, or blank boxes):
|
|
33
|
+
- **question**: "This UI needs <list what, e.g. a hero image + 3 product photos> but I found no matching assets in the project. How should I source them?"
|
|
34
|
+
- **header**: "Assets"
|
|
35
|
+
- **options**:
|
|
36
|
+
1. `I'll add the assets`: "Stop and let me drop real files in. Tell me the exact paths/filenames to reference and I'll wire them when they're added." → list the precise paths you'll expect (e.g. `public/hero.jpg`, `public/products/{1,2,3}.jpg`), then pause for the engineer.
|
|
37
|
+
2. `Use placeholder service`: "Wire dynamic placeholders from a stock/placeholder service so the layout is real now; swap later." → use a reputable service (below), correct dimensions, descriptive `alt`.
|
|
38
|
+
3. `Local solid/gradient placeholders`: "No external requests, use CSS gradient/blocks at the right aspect ratios as stand-ins." → design tokens, never raw hex.
|
|
39
|
+
|
|
40
|
+
The tool appends "Other" automatically.
|
|
41
|
+
|
|
42
|
+
**Placeholder services** (option 2), pick per need, exact dimensions, swappable behind a token/constant: photos → `https://picsum.photos/<w>/<h>` (Lorem Picsum) or Unsplash Source-style stock URLs by keyword for topical imagery; avatars → `https://i.pravatar.cc/<size>` or DiceBear (`https://api.dicebear.com/…`); logos/illustrations → a neutral local SVG placeholder, not a random remote logo.
|
|
43
|
+
|
|
44
|
+
Placeholder rules: real `width`/`height` (or aspect-ratio box) to avoid layout shift; meaningful `alt` describing the intended content, not "placeholder"; centralise URLs/paths in one constant or token so the swap to real assets is one edit. Note placeholders and where to replace them in the report.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Placeholder data (Facade / UI shell first builds)
|
|
49
|
+
|
|
50
|
+
Applies only when the UI stands up before its data source exists: the Facade mode (build the shell, wire it later), or any slice genuinely built ahead of its backend. Under end to end / tracer bullet the data layer lands in the same slice: bind to the real source, skip this. With no real data source yet, bind the page to a clearly marked local mock module so it renders fully; don't block on the backend and don't invent a real data layer here:
|
|
51
|
+
|
|
52
|
+
- Mock data in one obvious place, e.g. `lib/<feature>.placeholder.ts` (or `mocks/`), exporting typed objects shaped like the real data the spec specifies, so the swap to the real source is a single import change.
|
|
53
|
+
- Cover the real states (populated list, empty list, loading, error) so those UI states are built now.
|
|
54
|
+
- Mark it unmistakably (a `// PLACEHOLDER: replaced by <feature>'s data-integration sub-task` header) and note it in the report.
|
|
55
|
+
|
|
56
|
+
When the real source lands (the feature's data integration task, or the Facade wiring pass), swap the mock for the real query/action. Same principle as placeholder assets: real UI now, real data later.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Implementation phases
|
|
61
|
+
|
|
62
|
+
### Phase 0: Design the full product surface (the gate, screen builds)
|
|
63
|
+
|
|
64
|
+
Pass 1 from the guide's bar: design before you integrate. A gate, not advice, on every screen (auth, dashboard, feed, pricing, profile, detail, list/search, onboarding, settings, checkout, empty state, 404). No markup until the whole surface is designed; not done until it clears the bar's disqualifiers. You are a senior product designer, not a form wirer.
|
|
65
|
+
|
|
66
|
+
**Commit the composition first, in writing.** List the sections top to bottom and the brand, copy, and content in each, in the design system's language. Ship to the ambition of a standalone product; never the bare functional widget (a lone form, an unstyled table, a raw list with no header), the exact stub the bar disqualifies.
|
|
67
|
+
|
|
68
|
+
A complete product screen carries, cohesive and branded:
|
|
69
|
+
- **Brand**: logo/wordmark, consistent; none → derive one from the product name, never an empty corner.
|
|
70
|
+
- **Context and copy**: real product specific copy (headline, supporting line, honest microcopy) from the product's purpose (`.istm-context/agents.md`, spec intent, scope), never lorem ipsum.
|
|
71
|
+
- **A considered layout, not a lone box.** Compose the whole page. Calibrate to what a senior designer ships for THIS screen; the list is a sample, not a checklist:
|
|
72
|
+
- **Auth**: branded card or two pane (brand/value/visual + form), secondary links, light social proof.
|
|
73
|
+
- **Dashboard / feed**: app shell (header, nav, user menu), title/context, real hierarchy, a proper empty state.
|
|
74
|
+
- **List / table / search**: header, filters/search, the collection with hierarchy and pagination, empty and no results states.
|
|
75
|
+
- **Detail / profile**: identity header + key actions, grouped sections, related content.
|
|
76
|
+
- **Landing**: hero (headline, subcopy, CTA, visual), supporting sections, footer.
|
|
77
|
+
- **Settings / forms / onboarding / checkout**: grouped labelled sections with help text, clear progress/save.
|
|
78
|
+
- **Any other** (pricing, 404, confirmation): same treatment, brand + context + real layout + the functional core.
|
|
79
|
+
- **Supporting content**: value prop/trust signals where they fit, secondary CTAs, a footer where the page type warrants.
|
|
80
|
+
- **The functional core**: the form/table/flow itself, done well (validation, Phase 4 states, Phase 5 accessibility).
|
|
81
|
+
|
|
82
|
+
Composition (completeness), not look, the design source decides the visual language. Nothing provided → derive a wordmark, use a tasteful visual (gradient, pattern, illustration, or a placeholder via *Asset resolution*) over blank space, write real copy from purpose. Invent tastefully, but **surface everything invented** (brand, copy, placeholder assets) in the report for correction. If `/architect`'s page design stage already settled the composition, execute that; this phase fills the gap only when it didn't. Real, not busy: every element earns its place.
|
|
83
|
+
|
|
84
|
+
### Phase 1: Semantic structure
|
|
85
|
+
|
|
86
|
+
Use the HTML element that most precisely describes the content; the element carries meaning browsers, assistive technologies, and search engines rely on.
|
|
87
|
+
|
|
88
|
+
- **Document landmarks**: exactly one `<main>` per page. `<header>`, `<footer>`, `<nav>`, `<aside>` as landmarks. More than one `<nav>`: each needs an `aria-label` (e.g. `aria-label="Primary"`, `aria-label="Footer"`).
|
|
89
|
+
- **Heading hierarchy**: one `<h1>` per page, always the primary page title. Never skip levels (`<h1>` → `<h3>` is wrong). Headings structure content, not visual size; control size with CSS.
|
|
90
|
+
- **Interactive elements**: `<button>` for any action that doesn't navigate (submit, toggle, open modal, increment); `<a href="...">` for anything that navigates. Never `<a>` without `href`, never `<div onClick>`, never `<button>` and `<a>` nested inside each other.
|
|
91
|
+
- **Lists**: `<ul>` / `<ol>` / `<li>` for any repeated set of items, never repeated `<div>`s. `<dl>` / `<dt>` / `<dd>` for term definition pairs (glossaries, metadata tables, key value pairs).
|
|
92
|
+
- **Tables**: `<table>` with `<thead>`, `<tbody>`, `<th scope="col">` (column headers), `<th scope="row">` (row headers) for tabular data. Never tables for layout.
|
|
93
|
+
- **Media**: `<figure>` + `<figcaption>` for captioned images, diagrams, or code blocks. `<picture>` for art direction or format fallback. SVG rules: Phase 5 "Images and media".
|
|
94
|
+
- **Time and data**: `<time datetime="ISO-8601">` for any date or time. `<address>` for contact information. `<data value="">` for machine readable values alongside human readable text.
|
|
95
|
+
- **Text semantics**: `<strong>` importance, `<em>` stress emphasis. `<del>` / `<ins>` content changes (e.g. crossed out original price). `<abbr title="...">` abbreviations on first use. `<code>` inline, `<pre><code>` blocks.
|
|
96
|
+
- **Expandable content**: `<details>` + `<summary>` for accordion content needing no JavaScript. `<dialog>` for modals: built in focus trapping, `showModal()`, native Escape.
|
|
97
|
+
- **Progress and meters**: `<progress>` for upload/task progress; `<meter>` for a scalar in a known range (battery, storage). Never a styled `<div>` for these.
|
|
98
|
+
|
|
99
|
+
**Component build type application:** *Component*: `interface Props` first, named export, no layout wrapper, no router imports. *Screen*: include `<main>`, integrate with the detected router, loading / error / empty states at top level.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### Phase 2: Token application
|
|
104
|
+
|
|
105
|
+
Every visual value (colour, font, size, spacing, radius, shadow, duration, easing) comes from the token file's CSS custom properties. No hardcoded hex, no hardcoded `px` duplicating a token.
|
|
106
|
+
|
|
107
|
+
Before calling the phase complete, search the changed files for hardcoded values: hex colors (e.g. `#fff`, `#1a2b3c`), `rgb(`/`hsl(` functions, raw pixel values (e.g. `: 16px`). Any match that isn't a `0`, a `1px` border with no token equivalent, or a known constant is a violation: replace with the corresponding `var(--token)`. Cross check against `.istm-context/design.md ## Do's and Don'ts`. Fix every violation before moving on.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### Phase 3: Responsive layout
|
|
112
|
+
|
|
113
|
+
- Mobile first CSS: start at the smallest viewport, layer up with `min-width` breakpoints.
|
|
114
|
+
- Breakpoints from `.istm-context/design.md ## Responsive Behavior` if specified; else `sm 640px`, `md 768px`, `lg 1024px`, `xl 1280px`.
|
|
115
|
+
- Path A images at multiple widths: use the layout changes extracted in A0.
|
|
116
|
+
- Minimum touch target for any interactive element: 44×44px; reach it with padding without affecting visual size.
|
|
117
|
+
- Minimum body text: 16px on every viewport.
|
|
118
|
+
- Prefer `gap`, `grid`, `flex` over `margin` for spacing. `max-width` on the layout container, centered with `margin-inline: auto`.
|
|
119
|
+
- Text containers: `max-width` 60 to 75 characters (`ch` unit); never let long form text stretch full width on large viewports.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### Phase 4: States and motion
|
|
124
|
+
|
|
125
|
+
Every interactive element needs a visible, distinct style for:
|
|
126
|
+
- **Default**: base token styles
|
|
127
|
+
- **Hover**: `--color-surface` shift or lightened/darkened accent; never remove the cursor affordance
|
|
128
|
+
- **Focus visible**: 2px offset ring using `--color-accent` (`:focus-visible`, not `:focus`)
|
|
129
|
+
- **Active / pressed**: deeper colour shift using `accent-pressed` token if defined
|
|
130
|
+
- **Disabled**: `--color-muted` text and icon; `cursor: not-allowed`; `aria-disabled="true"` or native `disabled`
|
|
131
|
+
- **Loading**: skeleton or spinner; announce via `role="status"` or `aria-live="polite"`
|
|
132
|
+
- **Error**: `--color-error` border and icon; error message below the element linked via `aria-describedby`
|
|
133
|
+
- **Empty**: informative empty state, not blank space
|
|
134
|
+
|
|
135
|
+
Motion uses token values:
|
|
136
|
+
```
|
|
137
|
+
transition: <property> var(--duration-fast) var(--ease-out)
|
|
138
|
+
```
|
|
139
|
+
`--duration-fast` for colour/opacity; `--duration-normal` for layout shifts and reveals; `--duration-slow` for larger panel transitions.
|
|
140
|
+
|
|
141
|
+
Always include (not negotiable; some users get motion sickness):
|
|
142
|
+
```css
|
|
143
|
+
@media (prefers-reduced-motion: reduce) {
|
|
144
|
+
*, *::before, *::after {
|
|
145
|
+
animation-duration: 0.01ms !important;
|
|
146
|
+
transition-duration: 0.01ms !important;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### Phase 5: Web standards and accessibility
|
|
154
|
+
|
|
155
|
+
Not an end of build checklist; it is built into every decision in Phases 1 to 4. Review and enforce here.
|
|
156
|
+
|
|
157
|
+
**This section and `checklist.md` do different jobs.** This is the reference for HOW to build it: the patterns, the attributes, the snippets. `checklist.md` is the pass/fail gate you work through before reporting, and it owns the thresholds (contrast ratios, touch target sizes, focus ring widths). Read them there rather than restating them here, and check light and dark mode separately against them.
|
|
158
|
+
|
|
159
|
+
#### Keyboard navigation
|
|
160
|
+
|
|
161
|
+
Every interactive element reachable and operable by keyboard alone. Tab order follows the visual reading order; never use `tabindex` greater than `0` (it breaks the natural order).
|
|
162
|
+
|
|
163
|
+
Composite widgets follow the ARIA Authoring Practices Guide patterns:
|
|
164
|
+
- **Tabs**: Arrow keys move between tabs; Tab moves into the active panel
|
|
165
|
+
- **Dropdown menus**: Arrow keys navigate items; Escape closes; Enter/Space select
|
|
166
|
+
- **Modal / dialog**: focus traps inside; Escape closes; focus returns to the trigger on close
|
|
167
|
+
- **Accordion**: Enter/Space toggles the panel; focus stays on the `<button>`
|
|
168
|
+
- **Listbox / combobox**: Arrow keys navigate options; Enter selects
|
|
169
|
+
|
|
170
|
+
Modals: on open, focus the first focusable element inside (or the dialog `<h2>` if no input); on close, return focus to the opener.
|
|
171
|
+
|
|
172
|
+
Skip navigation link as the first focusable element on the page:
|
|
173
|
+
```html
|
|
174
|
+
<a href="#main-content" class="sr-only focus:not-sr-only">Skip to main content</a>
|
|
175
|
+
```
|
|
176
|
+
Use the project's visually hidden utility class (create one if none exists).
|
|
177
|
+
|
|
178
|
+
#### Screen reader semantics
|
|
179
|
+
|
|
180
|
+
Native HTML element before ARIA; ARIA supplements HTML, never replaces it. When needed:
|
|
181
|
+
- `aria-label`: no visible text label (icon only buttons)
|
|
182
|
+
- `aria-labelledby`: the label is a visible element (point to its `id`)
|
|
183
|
+
- `aria-describedby`: supplemental descriptions (input hint text, error message, tooltip)
|
|
184
|
+
- `aria-expanded`: on dropdown/accordion/nav menu triggers; toggles `true`/`false`
|
|
185
|
+
- `aria-selected`: tab and listbox options
|
|
186
|
+
- `aria-checked`: custom checkboxes and radio buttons
|
|
187
|
+
- `aria-disabled`: visually disabled but kept in the tab order (e.g. a tooltip bearing button)
|
|
188
|
+
- `aria-hidden="true"`: decorative icons, SVGs, anything that adds noise for screen reader users
|
|
189
|
+
- `aria-live="polite"`: regions updating without reload (search results, cart total, notification count)
|
|
190
|
+
- `aria-live="assertive"`: only critical time sensitive announcements (session timeout warning)
|
|
191
|
+
- `role="alert"`: errors that must announce immediately on injection
|
|
192
|
+
- `role="status"`: not urgent status updates (saved, loading complete)
|
|
193
|
+
|
|
194
|
+
Common component patterns:
|
|
195
|
+
- **Toast / notification**: `role="alert"` for errors, `role="status"` for success; inject into a persistent live region already in the DOM (injecting container and message together suppresses announcement in some readers)
|
|
196
|
+
- **Breadcrumb**: `<nav aria-label="Breadcrumb"><ol>` with `aria-current="page"` on the last item
|
|
197
|
+
- **Modal**: `<dialog aria-labelledby="dialog-title">` or `role="dialog"` + `aria-modal="true"` + `aria-labelledby`
|
|
198
|
+
- **Progress bar**: `<progress>`, or `role="progressbar"` with `aria-valuenow`, `aria-valuemin`, `aria-valuemax`, `aria-valuetext` for human readable value
|
|
199
|
+
- **Tabs**: `role="tablist"` container, `role="tab"` + `aria-selected` per tab, `role="tabpanel"` + `aria-labelledby` per panel
|
|
200
|
+
- **Tooltip**: `role="tooltip"` on the tooltip; `aria-describedby` on the trigger pointing to it; never interactive content inside a tooltip
|
|
201
|
+
|
|
202
|
+
#### Images and media
|
|
203
|
+
|
|
204
|
+
- Meaningful images: `alt` describing content and purpose, not "image of…". A logo: `alt="Acme"`. A chart: `alt="Bar chart showing monthly revenue growth of 24% from Q1 to Q4"`.
|
|
205
|
+
- Decorative images: `alt=""` (empty string, not omitted).
|
|
206
|
+
- Complex diagrams/infographics: brief `alt` + longer description in adjacent text or `<figure><figcaption>`.
|
|
207
|
+
- Decorative SVG icons: `aria-hidden="true"`, no `<title>`. Meaningful SVG: `role="img"` + `aria-label="..."` or an internal `<title>` referenced by `aria-labelledby`.
|
|
208
|
+
|
|
209
|
+
#### Document structure
|
|
210
|
+
|
|
211
|
+
- `<html lang="en">`: set the correct language; inline `lang` for phrases in another language
|
|
212
|
+
- `<title>`: unique and descriptive per page; apps: `Page Name: App Name`
|
|
213
|
+
- One `<main>` per page with `id="main-content"` for the skip link
|
|
214
|
+
- `<link rel="canonical">` for pages reachable at multiple URLs
|
|
215
|
+
|
|
216
|
+
#### Visually hidden content
|
|
217
|
+
|
|
218
|
+
For content available to screen readers but not visible:
|
|
219
|
+
```css
|
|
220
|
+
.sr-only {
|
|
221
|
+
position: absolute;
|
|
222
|
+
width: 1px; height: 1px;
|
|
223
|
+
padding: 0; margin: -1px;
|
|
224
|
+
overflow: hidden;
|
|
225
|
+
clip: rect(0,0,0,0);
|
|
226
|
+
white-space: nowrap;
|
|
227
|
+
border: 0;
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
Never `display: none` or `visibility: hidden` for this; those hide from assistive technology too.
|
|
231
|
+
|
|
232
|
+
#### Logical properties for layout direction
|
|
233
|
+
|
|
234
|
+
Use CSS logical properties, not physical, so layouts work for RTL without overrides: `margin-inline-start` not `margin-left`; `padding-inline` not `padding-left`/`padding-right`; `inset-inline-start` not `left`; `border-inline-start` not `border-left`; `text-align: start` not `text-align: left`.
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
### Phase 6: Audit your own work before you report (the enforcement)
|
|
239
|
+
|
|
240
|
+
The build is not done until you have checked it. Ambition in prose is not enough; this is the step that catches a build that quietly fell back to bare minimum.
|
|
241
|
+
|
|
242
|
+
- **Audit against the bar's disqualifiers** (guide top) and this page's `.istm-context/design.md` mandate: lone form, dead space, naked or unstyled elements, default only styling, missing states, orphaned controls, a widget where a full surface was owed. Any hit → fix it, do not report around it.
|
|
243
|
+
- **Look at it, if you can.** With a browser or screenshot tool, render the page (a desktop and one mobile width) and actually look. Fix any visual defect you see: a stray unstyled bar, broken spacing, a blank half page, a collapsed element. This is the only reliable catch for a render defect the code did not reveal.
|
|
244
|
+
- **Report the audit.** State what you checked, and if you rendered it, what you saw and fixed.
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Report
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
## /develop complete (UI)
|
|
252
|
+
|
|
253
|
+
**Build type**: Component | Screen
|
|
254
|
+
**Stack**: Next.js | Vite | Nuxt | SvelteKit | Plain HTML
|
|
255
|
+
**Styling**: <tailwind | shadcn | css-modules | styled-components | plain css>
|
|
256
|
+
**Dark mode strategy**: .dark class | @media | both
|
|
257
|
+
**Icon library**: <library name> | none (install needed)
|
|
258
|
+
**Path**: Design.md (existing) | A (image) | A (multi: <what each image represented>) | B (derived: <mood> | url: <url> | custom: "<style>")
|
|
259
|
+
**.istm-context/design.md**: pre-existing | created | fetched from <url>
|
|
260
|
+
**Token conflicts**: none | <list, verify manually before next run>
|
|
261
|
+
**Token file**: created | updated | unchanged (<path>)
|
|
262
|
+
**Fonts**: <family> via <method> | <proprietary> to <substitute> | system
|
|
263
|
+
**Assets**: project files | placeholders (<service>, swap at <where>) | none needed
|
|
264
|
+
**Surface composed**: bare component | full product surface (brand, copy, layout, footer) | per spec composition
|
|
265
|
+
**Self-audit**: disqualifiers checked (none found | fixed: <list>) · rendered and looked (yes: <what you saw/fixed> | no browser tool)
|
|
266
|
+
**Invented (for review, swap when you have the real thing)**: <brand name/wordmark · tagline/headline · body copy · placeholder assets>, or "none (all provided)"
|
|
267
|
+
**Built**: <name> (<file paths>)
|
|
268
|
+
**Token adherence**: all sourced from .istm-context/design.md | <deviations>
|
|
269
|
+
**Accessibility**: WCAG AA passed | <items deferred>
|
|
270
|
+
**Semantic HTML**: correct elements used | <issues noted>
|
|
271
|
+
**Keyboard**: fully navigable | <gaps>
|
|
272
|
+
**Screen reader**: announced correctly | <gaps>
|
|
273
|
+
**What /test should verify**:
|
|
274
|
+
- <observable behaviour>
|
|
275
|
+
- Keyboard-only navigation through all interactive elements
|
|
276
|
+
- VoiceOver / NVDA announces interactive elements and live regions correctly
|
|
277
|
+
- Dark mode rendering
|
|
278
|
+
- Reduced-motion mode (all transitions suppressed)
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
---
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# UI Source: MCP
|
|
2
|
+
|
|
3
|
+
## Figma or design MCP source
|
|
4
|
+
|
|
5
|
+
Use this route when the spec or direct user answer says to pull the design from Figma or another connected design MCP.
|
|
6
|
+
|
|
7
|
+
Pull the real design into `./.istm-context/design.md`: tokens, spacing, components, named frames, and any asset references. Use real values from the design source, not invented approximations. Record which file and frames were used in the report.
|
|
8
|
+
|
|
9
|
+
No MCP connected: say so, ask the engineer to connect it or pick another source. Do not silently switch to generated design.
|
|
10
|
+
|
|
11
|
+
After writing `.istm-context/design.md`, show a short summary, confirm the key tokens/source, then continue to `ui/implementation.md`.
|