agents-config 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.
Files changed (90) hide show
  1. package/AGENTS.md +490 -0
  2. package/LICENSE +21 -0
  3. package/README.md +254 -0
  4. package/adapters/claude.template.md +77 -0
  5. package/adapters/codex.template.md +72 -0
  6. package/adapters/copilot.template.md +68 -0
  7. package/adapters/cursor.template.md +69 -0
  8. package/adapters/gemini.template.md +73 -0
  9. package/adapters/windsurf.template.md +81 -0
  10. package/bin/agents-init.js +699 -0
  11. package/bin/postinstall.js +28 -0
  12. package/instructions/development-standards.instructions.md +47 -0
  13. package/instructions/github-issue.instructions.md +324 -0
  14. package/instructions/github-release-notes.instructions.md +888 -0
  15. package/instructions/mui.instructions.md +50 -0
  16. package/instructions/storybook.instructions.md +55 -0
  17. package/instructions/web-interface-guidelines.instructions.md +331 -0
  18. package/package.json +56 -0
  19. package/prompts/create-pr.prompt.md +78 -0
  20. package/prompts/scaffold-component.prompt.md +57 -0
  21. package/rules/accessibility.md +36 -0
  22. package/rules/component-architecture.md +34 -0
  23. package/rules/gemini.md +547 -0
  24. package/rules/mui.md +491 -0
  25. package/rules/react-19-compiler.md +26 -0
  26. package/rules/spec-driven-development.md +36 -0
  27. package/rules/supabase.md +40 -0
  28. package/rules/tailwind-v4.md +29 -0
  29. package/rules/three-js-react.md +76 -0
  30. package/rules/web-performance.md +29 -0
  31. package/schemas/agents-project.schema.json +78 -0
  32. package/skills/accessibility-audit/SKILL.md +39 -0
  33. package/skills/integrate-gemini/SKILL.md +124 -0
  34. package/skills/scaffold-component/SKILL.md +77 -0
  35. package/skills/vercel-react-best-practices/AGENTS.md +2719 -0
  36. package/skills/vercel-react-best-practices/SKILL.md +125 -0
  37. package/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  38. package/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
  39. package/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
  40. package/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
  41. package/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
  42. package/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
  43. package/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
  44. package/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
  45. package/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
  46. package/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
  47. package/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  48. package/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
  49. package/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
  50. package/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
  51. package/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
  52. package/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
  53. package/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
  54. package/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
  55. package/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
  56. package/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
  57. package/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
  58. package/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
  59. package/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
  60. package/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
  61. package/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
  62. package/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
  63. package/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
  64. package/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
  65. package/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
  66. package/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  67. package/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
  68. package/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
  69. package/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  70. package/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  71. package/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
  72. package/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  73. package/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
  74. package/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
  75. package/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
  76. package/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
  77. package/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  78. package/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  79. package/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
  80. package/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  81. package/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
  82. package/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
  83. package/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
  84. package/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
  85. package/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
  86. package/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
  87. package/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
  88. package/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
  89. package/skills/workflows/sdd-workflow.md +49 -0
  90. package/skills/workflows/setup-orchestration.md +18 -0
@@ -0,0 +1,50 @@
1
+ # Material-UI (MUI) Coding Instructions
2
+
3
+ **INSTRUCTIONS:**
4
+ Create responsive React applications using Material-UI (MUI v7.3+) and TypeScript with strict type safety.
5
+
6
+ Include the following specifications:
7
+
8
+ 1. **Accessibility & Performance**: Prioritize as first-class features. Follow [Web Interface Guidelines](./web-interface-guidelines.instructions.md)—semantic HTML, ARIA labels, keyboard navigation, focus states, and screen reader support.
9
+
10
+ 2. **Adaptive Layout & Mobile-First UX**: Use Container Queries, dynamic viewport units (`cqw`, `dvh`), and `clamp()` for responsive spacing and visual hierarchy. Test on mobile-first.
11
+
12
+ 3. **Grid System**: Use [MUI Grid v2 syntax](https://mui.com/material-ui/react-grid/).
13
+
14
+ 4. **Modern CSS & Progressive Enhancement**: Apply [CSS Wrapped 2025](https://chrome.dev/css-wrapped-2025/) principles.
15
+
16
+ 5. **Theming**:
17
+ - Use MUI's theme provider with `cssVariables` enabled
18
+ - Support light/dark modes via [CSS Theme Variables](https://mui.com/material-ui/customization/css-theme-variables/usage/#light-and-dark-modes)
19
+ - Respect system preference (`prefers-color-scheme`) and persist user choice to `localStorage`
20
+ - Avoid color-mode flicker per [MUI docs](https://mui.com/material-ui/customization/dark-mode/#dark-mode-flicker)
21
+
22
+ 6. **Typography & Design Tokens**: Create elegant color palettes, typography scales, and spacing systems. Follow copy guidelines (curly quotes, ellipsis `…`, non-breaking spaces).
23
+
24
+ 7. **Icons**: Use `@mui/icons-material`—no webfont icons.
25
+
26
+ 8. **Dark Mode Toggle**: Implement [MUI's prescribed method](https://mui.com/material-ui/customization/dark-mode/#toggling-color-mode) with smooth transitions.
27
+
28
+ 9. **Component Architecture**: Extend MUI base components with TypeScript. Use PascalCase for filenames (`.tsx`). One component per file. Prefer functional components with hooks.
29
+
30
+ 10. **Testing & Documentation**: Create Storybook documentation and visual regression tests (Playwright/Chromatic when possible).
31
+
32
+ 11. **Web Standards Compliance**: Ensure forms, inputs, focus states, and interactive elements meet standards in the Web Interface Guidelines:
33
+ - Form inputs require labels and proper `type`/`inputmode`
34
+ - Icon-only buttons need `aria-label`
35
+ - Focus-visible states required (no `outline-none` without replacement)
36
+ - Semantic HTML (`<button>`, `<a>`, `<label>`) before ARIA
37
+ - Skip link for main content; heading hierarchy
38
+ - No paste-blocking; no zoom-disabling viewport settings
39
+ - Images need `width`/`height` to prevent CLS
40
+ - Virtualize large lists (>50 items)
41
+ - URL state for filters, tabs, pagination, expanded panels
42
+ - Destructive actions need confirmation
43
+ - Honor `prefers-reduced-motion`
44
+ - Animations use `transform`/`opacity` only; no `transition: all`
45
+
46
+ **NOTE:**
47
+ - Use MUI's theme provider with `cssVariables` enabled
48
+ - Support light/dark modes via [CSS Theme Variables](https://mui.com/material-ui/customization/css-theme-variables/usage/#light-and-dark-modes)
49
+ - Respect system preference (`prefers-color-scheme`) and persist user choice to `localStorage`
50
+ - Avoid color-mode flicker per [MUI docs](https://mui.com/material-ui/customization/dark-mode/#dark-mode-flicker)
@@ -0,0 +1,55 @@
1
+ ---
2
+ applyTo: '**/*.stories.@(js|jsx|ts|tsx)'
3
+ ---
4
+ Provide project context and coding guidelines that AI should follow when generating code, answering questions, or reviewing changes.
5
+
6
+ # /build.storybook - Scaffold Storybook Story
7
+
8
+ Generate a Storybook story file following the DevLog application patterns.
9
+
10
+ ## Usage
11
+ - `/build.storybook ComponentName` - Creates basic story with Primary/Secondary variants
12
+ - `/build.storybook ComponentName --visual` - Includes visual regression testing tag
13
+ - `/build.storybook ComponentName --variants variant1,variant2` - Custom story variants
14
+
15
+ ## Story Template Structure
16
+
17
+ ```tsx
18
+ import type { Meta, StoryObj } from '@storybook/react-vite';
19
+ import Stack from '@mui/material/Stack';
20
+ import { ComponentName } from './ComponentName';
21
+
22
+ const meta: Meta = {
23
+ title: 'Category/Subcategory/ComponentName',
24
+ component: ComponentName,
25
+ argTypes: {
26
+ // Define component prop controls
27
+ },
28
+ parameters: {
29
+ layout: 'fullscreen',
30
+ },
31
+ decorators: [(Story) => <Story />],
32
+ tags: ['!visual:check'], // Use 'visual:check' for visual regression testing
33
+ } satisfies Meta<typeof ComponentName>;
34
+
35
+ export default meta;
36
+ type Story = StoryObj<typeof meta>;
37
+
38
+ export const Primary = {
39
+ args: {
40
+ // Primary story args
41
+ },
42
+ render: (args) => {
43
+ return (
44
+ <ComponentName {...args} />
45
+ );
46
+ },
47
+ } satisfies Story;
48
+ ```
49
+
50
+ ## Requirements
51
+ Don't assume, always ask for the following inputs before generating code:
52
+ - Use proper Storybook title categorization matching file structure
53
+ - Add `'visual:check'` tag only when component is ready for visual regression testing
54
+ - Define argTypes for interactive controls in Storybook
55
+ - Use `satisfies` for type safety with Meta and Story types
@@ -0,0 +1,331 @@
1
+ ---
2
+ description: Review UI code for Web Interface Guidelines compliance
3
+ applyTo: <file-or-pattern>
4
+ ---
5
+
6
+ # Web Interface Guidelines
7
+
8
+ Concise rules for building accessible, fast, delightful UIs. Use MUST/SHOULD/NEVER to guide decisions.
9
+
10
+ ## Interactions
11
+
12
+ ### Keyboard
13
+
14
+ - MUST: Full keyboard support per [WAI-ARIA APG](https://www.w3.org/WAI/ARIA/apg/patterns/)
15
+ - MUST: Visible focus rings (`:focus-visible`; group with `:focus-within`)
16
+ - MUST: Manage focus (trap, move, return) per APG patterns
17
+ - NEVER: `outline: none` without visible focus replacement
18
+
19
+ ### Targets & Input
20
+
21
+ - MUST: Hit target ≥24px (mobile ≥44px); if visual <24px, expand hit area
22
+ - MUST: Mobile `<input>` font-size ≥16px to prevent iOS zoom
23
+ - NEVER: Disable browser zoom (`user-scalable=no`, `maximum-scale=1`)
24
+ - MUST: `touch-action: manipulation` to prevent double-tap zoom
25
+ - SHOULD: Set `-webkit-tap-highlight-color` to match design
26
+
27
+ ### Forms
28
+
29
+ - MUST: Hydration-safe inputs (no lost focus/value)
30
+ - NEVER: Block paste in `<input>`/`<textarea>`
31
+ - MUST: Loading buttons show spinner and keep original label
32
+ - MUST: Enter submits focused input; in `<textarea>`, ⌘/Ctrl+Enter submits
33
+ - MUST: Keep submit enabled until request starts; then disable with spinner
34
+ - MUST: Accept free text, validate after—don't block typing
35
+ - MUST: Allow incomplete form submission to surface validation
36
+ - MUST: Errors inline next to fields; on submit, focus first error
37
+ - MUST: `autocomplete` + meaningful `name`; correct `type` and `inputmode`
38
+ - SHOULD: Disable spellcheck for emails/codes/usernames
39
+ - SHOULD: Placeholders end with `…` and show example pattern
40
+ - MUST: Warn on unsaved changes before navigation
41
+ - MUST: Compatible with password managers & 2FA; allow pasting codes
42
+ - MUST: Trim values to handle text expansion trailing spaces
43
+ - MUST: No dead zones on checkboxes/radios; label+control share one hit target
44
+
45
+ ### State & Navigation
46
+
47
+ - MUST: URL reflects state (deep-link filters/tabs/pagination/expanded panels)
48
+ - MUST: Back/Forward restores scroll position
49
+ - MUST: Links use `<a>`/`<Link>` for navigation (support Cmd/Ctrl/middle-click)
50
+ - NEVER: Use `<div onClick>` for navigation
51
+
52
+ ### Feedback
53
+
54
+ - SHOULD: Optimistic UI; reconcile on response; on failure rollback or offer Undo
55
+ - MUST: Confirm destructive actions or provide Undo window
56
+ - MUST: Use polite `aria-live` for toasts/inline validation
57
+ - SHOULD: Ellipsis (`…`) for options opening follow-ups ("Rename…") and loading states ("Loading…")
58
+
59
+ ### Touch & Drag
60
+
61
+ - MUST: Generous targets, clear affordances; avoid finicky interactions
62
+ - MUST: Delay first tooltip; subsequent peers instant
63
+ - MUST: `overscroll-behavior: contain` in modals/drawers
64
+ - MUST: During drag, disable text selection and set `inert` on dragged elements
65
+ - MUST: If it looks clickable, it must be clickable
66
+
67
+ ### Autofocus
68
+
69
+ - SHOULD: Autofocus on desktop with single primary input; rarely on mobile
70
+
71
+ ## Animation
72
+
73
+ - MUST: Honor `prefers-reduced-motion` (provide reduced variant or disable)
74
+ - SHOULD: Prefer CSS > Web Animations API > JS libraries
75
+ - MUST: Animate compositor-friendly props (`transform`, `opacity`) only
76
+ - NEVER: Animate layout props (`top`, `left`, `width`, `height`)
77
+ - NEVER: `transition: all`—list properties explicitly
78
+ - SHOULD: Animate only to clarify cause/effect or add deliberate delight
79
+ - SHOULD: Choose easing to match the change (size/distance/trigger)
80
+ - MUST: Animations interruptible and input-driven (no autoplay)
81
+ - MUST: Correct `transform-origin` (motion starts where it "physically" should)
82
+ - MUST: SVG transforms on `<g>` wrapper with `transform-box: fill-box`
83
+
84
+ ## Layout
85
+
86
+ - SHOULD: Optical alignment; adjust ±1px when perception beats geometry
87
+ - MUST: Deliberate alignment to grid/baseline/edges—no accidental placement
88
+ - SHOULD: Balance icon/text lockups (weight/size/spacing/color)
89
+ - MUST: Verify mobile, laptop, ultra-wide (simulate ultra-wide at 50% zoom)
90
+ - MUST: Respect safe areas (`env(safe-area-inset-*)`)
91
+ - MUST: Avoid unwanted scrollbars; fix overflows
92
+ - SHOULD: Flex/grid over JS measurement for layout
93
+
94
+ ## Content & Accessibility
95
+
96
+ - SHOULD: Inline help first; tooltips last resort
97
+ - MUST: Skeletons mirror final content to avoid layout shift
98
+ - MUST: `<title>` matches current context
99
+ - MUST: No dead ends; always offer next step/recovery
100
+ - MUST: Design empty/sparse/dense/error states
101
+ - SHOULD: Curly quotes (" "); avoid widows/orphans (`text-wrap: balance`)
102
+ - MUST: `font-variant-numeric: tabular-nums` for number comparisons
103
+ - MUST: Redundant status cues (not color-only); icons have text labels
104
+ - MUST: Accessible names exist even when visuals omit labels
105
+ - MUST: Use `…` character (not `...`)
106
+ - MUST: `scroll-margin-top` on headings; "Skip to content" link; hierarchical `<h1>`–`<h6>`
107
+ - MUST: Resilient to user-generated content (short/avg/very long)
108
+ - MUST: Locale-aware dates/times/numbers (`Intl.DateTimeFormat`, `Intl.NumberFormat`)
109
+ - MUST: Accurate `aria-label`; decorative elements `aria-hidden`
110
+ - MUST: Icon-only buttons have descriptive `aria-label`
111
+ - MUST: Prefer native semantics (`button`, `a`, `label`, `table`) before ARIA
112
+ - MUST: Non-breaking spaces: `10&nbsp;MB`, `⌘&nbsp;K`, brand names
113
+
114
+ ## Content Handling
115
+
116
+ - MUST: Text containers handle long content (`truncate`, `line-clamp-*`, `break-words`)
117
+ - MUST: Flex children need `minWidth: 0` to allow truncation
118
+ - MUST: Handle empty states—no broken UI for empty strings/arrays
119
+
120
+ ## Performance
121
+
122
+ - SHOULD: Test iOS Low Power Mode and macOS Safari
123
+ - MUST: Measure reliably (disable extensions that skew runtime)
124
+ - MUST: Track and minimize re-renders (React DevTools/React Scan)
125
+ - MUST: Profile with CPU/network throttling
126
+ - MUST: Batch layout reads/writes; avoid reflows/repaints
127
+ - MUST: Mutations (`POST`/`PATCH`/`DELETE`) target <500ms
128
+ - SHOULD: Prefer uncontrolled inputs; controlled inputs cheap per keystroke
129
+ - MUST: Virtualize large lists (>50 items)
130
+ - MUST: Preload above-fold images; lazy-load the rest
131
+ - MUST: Prevent CLS (explicit image dimensions)
132
+ - SHOULD: `<link rel="preconnect">` for CDN domains
133
+ - SHOULD: Critical fonts: `<link rel="preload" as="font">` with `font-display: swap`
134
+
135
+ ## Dark Mode & Theming
136
+
137
+ - MUST: `color-scheme: dark` on `<html>` for dark themes
138
+ - SHOULD: `<meta name="theme-color">` matches page background
139
+ - MUST: Native `<select>`: explicit `background-color` and `color` (Windows fix)
140
+
141
+ ## Hydration
142
+
143
+ - MUST: Inputs with `value` need `onChange` (or use `defaultValue`)
144
+ - SHOULD: Guard date/time rendering against hydration mismatch
145
+
146
+ ## Design
147
+
148
+ - SHOULD: Layered shadows (ambient + direct)
149
+ - SHOULD: Crisp edges via semi-transparent borders + shadows
150
+ - SHOULD: Nested radii: child ≤ parent; concentric
151
+ - SHOULD: Hue consistency: tint borders/shadows/text toward bg hue
152
+ - MUST: Accessible charts (color-blind-friendly palettes)
153
+ - MUST: Meet contrast—prefer [APCA](https://apcacontrast.com/) over WCAG 2
154
+ - MUST: Increase contrast on `:hover`/`:active`/`:focus`
155
+ - SHOULD: Match browser UI to bg
156
+ - SHOULD: Avoid dark color gradient banding (use background images when needed)
157
+
158
+ ## Output Instructions
159
+
160
+ Review these files for compliance: $ARGUMENTS
161
+
162
+ Read files, check against rules below. Output concise but comprehensive—sacrifice grammar for brevity. High signal-to-noise.
163
+
164
+ ## Rules
165
+
166
+ ### Accessibility
167
+
168
+ - Icon-only buttons need `aria-label`
169
+ - Form controls need `<label>` or `aria-label`
170
+ - Interactive elements need keyboard handlers (`onKeyDown`/`onKeyUp`)
171
+ - `<button>` for actions, `<a>`/`<Link>` for navigation (not `<div onClick>`)
172
+ - Images need `alt` (or `alt=""` if decorative)
173
+ - Decorative icons need `aria-hidden="true"`
174
+ - Async updates (toasts, validation) need `aria-live="polite"`
175
+ - Use semantic HTML (`<button>`, `<a>`, `<label>`, `<table>`) before ARIA
176
+ - Headings hierarchical `<h1>`–`<h6>`; include skip link for main content
177
+ - `scroll-margin-top` on heading anchors
178
+
179
+ ### Focus States
180
+
181
+ - Interactive elements need visible focus: `focus-visible:ring-*` or equivalent
182
+ - Never `outline-none` / `outline: none` without focus replacement
183
+ - Use `:focus-visible` over `:focus` (avoid focus ring on click)
184
+ - Group focus with `:focus-within` for compound controls
185
+
186
+ ### Forms
187
+
188
+ - Inputs need `autocomplete` and meaningful `name`
189
+ - Use correct `type` (`email`, `tel`, `url`, `number`) and `inputmode`
190
+ - Never block paste (`onPaste` + `preventDefault`)
191
+ - Labels clickable (`htmlFor` or wrapping control)
192
+ - Disable spellcheck on emails, codes, usernames (`spellCheck={false}`)
193
+ - Checkboxes/radios: label + control share single hit target (no dead zones)
194
+ - Submit button stays enabled until request starts; spinner during request
195
+ - Errors inline next to fields; focus first error on submit
196
+ - Placeholders end with `…` and show example pattern
197
+ - `autocomplete="off"` on non-auth fields to avoid password manager triggers
198
+ - Warn before navigation with unsaved changes (`beforeunload` or router guard)
199
+
200
+ ### Animation
201
+
202
+ - Honor `prefers-reduced-motion` (provide reduced variant or disable)
203
+ - Animate `transform`/`opacity` only (compositor-friendly)
204
+ - Never `transition: all`—list properties explicitly
205
+ - Set correct `transform-origin`
206
+ - SVG: transforms on `<g>` wrapper with `transform-box: fill-box; transform-origin: center`
207
+ - Animations interruptible—respond to user input mid-animation
208
+
209
+ ### Typography
210
+
211
+ - `…` not `...`
212
+ - Curly quotes `"` `"` not straight `"`
213
+ - Non-breaking spaces: `10&nbsp;MB`, `⌘&nbsp;K`, brand names
214
+ - Loading states end with `…`: `"Loading…"`, `"Saving…"`
215
+ - `font-variant-numeric: tabular-nums` for number columns/comparisons
216
+ - Use `text-wrap: balance` or `text-pretty` on headings (prevents widows)
217
+
218
+ ### Content Handling
219
+
220
+ - Text containers handle long content: `truncate`, `line-clamp-*`, or `break-words`
221
+ - Flex children need `minWidth: 0` to allow text truncation
222
+ - Handle empty states—don't render broken UI for empty strings/arrays
223
+ - User-generated content: anticipate short, average, and very long inputs
224
+
225
+ ### Images
226
+
227
+ - `<img>` needs explicit `width` and `height` (prevents CLS)
228
+ - Below-fold images: `loading="lazy"`
229
+ - Above-fold critical images: `priority` or `fetchpriority="high"`
230
+
231
+ ### Performance
232
+
233
+ - Large lists (>50 items): virtualize (`virtua`, `content-visibility: auto`)
234
+ - No layout reads in render (`getBoundingClientRect`, `offsetHeight`, `offsetWidth`, `scrollTop`)
235
+ - Batch DOM reads/writes; avoid interleaving
236
+ - Prefer uncontrolled inputs; controlled inputs must be cheap per keystroke
237
+ - Add `<link rel="preconnect">` for CDN/asset domains
238
+ - Critical fonts: `<link rel="preload" as="font">` with `font-display: swap`
239
+
240
+ ### Navigation & State
241
+
242
+ - URL reflects state—filters, tabs, pagination, expanded panels in query params
243
+ - Links use `<a>`/`<Link>` (Cmd/Ctrl+click, middle-click support)
244
+ - Deep-link all stateful UI (if uses `useState`, consider URL sync via nuqs or similar)
245
+ - Destructive actions need confirmation modal or undo window—never immediate
246
+
247
+ ### Touch & Interaction
248
+
249
+ - `touch-action: manipulation` (prevents double-tap zoom delay)
250
+ - `-webkit-tap-highlight-color` set intentionally
251
+ - `overscroll-behavior: contain` in modals/drawers/sheets
252
+ - During drag: disable text selection, `inert` on dragged elements
253
+ - `autoFocus` sparingly—desktop only, single primary input; avoid on mobile
254
+
255
+ ### Safe Areas & Layout
256
+
257
+ - Full-bleed layouts need `env(safe-area-inset-*)` for notches
258
+ - Avoid unwanted scrollbars: `overflow-x-hidden` on containers, fix content overflow
259
+ - Flex/grid over JS measurement for layout
260
+
261
+ ### Dark Mode & Theming
262
+
263
+ - `color-scheme: dark` on `<html>` for dark themes (fixes scrollbar, inputs)
264
+ - `<meta name="theme-color">` matches page background
265
+ - Native `<select>`: explicit `background-color` and `color` (Windows dark mode)
266
+
267
+ ### Locale & i18n
268
+
269
+ - Dates/times: use `Intl.DateTimeFormat` not hardcoded formats
270
+ - Numbers/currency: use `Intl.NumberFormat` not hardcoded formats
271
+ - Detect language via `Accept-Language` / `navigator.languages`, not IP
272
+
273
+ ### Hydration Safety
274
+
275
+ - Inputs with `value` need `onChange` (or use `defaultValue` for uncontrolled)
276
+ - Date/time rendering: guard against hydration mismatch (server vs client)
277
+ - `suppressHydrationWarning` only where truly needed
278
+
279
+ ### Hover & Interactive States
280
+
281
+ - Buttons/links need `hover:` state (visual feedback)
282
+ - Interactive states increase contrast: hover/active/focus more prominent than rest
283
+
284
+ ### Content & Copy
285
+
286
+ - Active voice: "Install the CLI" not "The CLI will be installed"
287
+ - Title Case for headings/buttons (MLA style)
288
+ - Numerals for counts: "8 deployments" not "eight"
289
+ - Specific button labels: "Save API Key" not "Continue"
290
+ - Error messages include fix/next step, not just problem
291
+ - Second person; avoid first person
292
+ - `&` over "and" where space-constrained
293
+
294
+ ### Anti-patterns (flag these)
295
+
296
+ - `user-scalable=no` or `maximum-scale=1` disabling zoom
297
+ - `onPaste` with `preventDefault`
298
+ - `transition: all`
299
+ - `outline-none` without focus-visible replacement
300
+ - Inline `onClick` navigation without `<a>`
301
+ - `<div>` or `<span>` with click handlers (should be `<button>`)
302
+ - Images without dimensions
303
+ - Large arrays `.map()` without virtualization
304
+ - Form inputs without labels
305
+ - Icon buttons without `aria-label`
306
+ - Hardcoded date/number formats (use `Intl.*`)
307
+ - `autoFocus` without clear justification
308
+
309
+ ## Output Format
310
+
311
+ Group by file. Use `file:line` format (VS Code clickable). Terse findings.
312
+
313
+ ```text
314
+ ## src/Button.tsx
315
+
316
+ src/Button.tsx:42 - icon button missing aria-label
317
+ src/Button.tsx:18 - input lacks label
318
+ src/Button.tsx:55 - animation missing prefers-reduced-motion
319
+ src/Button.tsx:67 - transition: all → list properties
320
+
321
+ ## src/Modal.tsx
322
+
323
+ src/Modal.tsx:12 - missing overscroll-behavior: contain
324
+ src/Modal.tsx:34 - "..." → "…"
325
+
326
+ ## src/Card.tsx
327
+
328
+ ✓ pass
329
+ ```
330
+
331
+ State issue + location. Skip explanation unless fix non-obvious. No preamble.
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "agents-config",
3
+ "version": "1.0.0",
4
+ "description": "A comprehensive knowledge base and skill library for building production-grade React applications with AI-powered tools and best practices.",
5
+ "author": "Eric Thayer",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/ericthayer/agents-config.git"
10
+ },
11
+ "homepage": "https://github.com/ericthayer/agents-config#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/ericthayer/agents-config/issues"
14
+ },
15
+ "keywords": [
16
+ "ai",
17
+ "agents",
18
+ "copilot",
19
+ "claude",
20
+ "gemini",
21
+ "cursor",
22
+ "react",
23
+ "typescript",
24
+ "accessibility",
25
+ "performance",
26
+ "development-tools",
27
+ "code-generation",
28
+ "agentic-workflows"
29
+ ],
30
+ "type": "module",
31
+ "bin": {
32
+ "agents-init": "./bin/agents-init.js"
33
+ },
34
+ "files": [
35
+ "AGENTS.md",
36
+ "README.md",
37
+ "bin/",
38
+ "adapters/",
39
+ "instructions/",
40
+ "rules/",
41
+ "skills/",
42
+ "prompts/",
43
+ "schemas/"
44
+ ],
45
+ "scripts": {
46
+ "postinstall": "node ./bin/postinstall.js",
47
+ "test": "node ./bin/agents-init.js --dry-run",
48
+ "prepare": "echo 'Ready to publish'"
49
+ },
50
+ "engines": {
51
+ "node": ">=18.0.0"
52
+ },
53
+ "publishConfig": {
54
+ "access": "public"
55
+ }
56
+ }
@@ -0,0 +1,78 @@
1
+ ---
2
+ agent: agent
3
+ ---
4
+
5
+ # Create PR from Last Commit
6
+
7
+ ## Task
8
+ Analyze the last git commit and create a comprehensive PR description.
9
+
10
+ ## Instructions
11
+
12
+ 1. **Get the latest commit details:**
13
+ - Use `mcp_github_get_commit` with:
14
+ - owner: `ericthayer`
15
+ - repo: `devlog`
16
+ - sha: Get from `git log -1 --pretty=format:"%H"`
17
+ - include_diff: `true`
18
+
19
+ 2. **Analyze the commit data:**
20
+ - Extract commit message (title and body)
21
+ - Review files changed (additions, deletions, modifications)
22
+ - Examine the diff to understand the scope of changes
23
+ - Identify the type of change (feat, fix, refactor, docs, etc.)
24
+
25
+ 3. **Build PR description following this structure:**
26
+
27
+ ```markdown
28
+ ## Summary
29
+ [1-2 sentences describing the overall change]
30
+
31
+ ## Changes
32
+ - **Files Modified:** [List key files with brief descriptions]
33
+ - **Key Changes:** [Bullet points of what was changed and why]
34
+
35
+ ## Type of Change
36
+ - [ ] Bug fix (non-breaking)
37
+ - [ ] New feature (non-breaking)
38
+ - [ ] Breaking change
39
+ - [ ] Documentation update
40
+ - [ ] Refactoring
41
+
42
+ ## Testing
43
+ [Describe testing approach or note if manual testing needed]
44
+
45
+ ## Checklist
46
+ - [ ] Code follows project style guidelines
47
+ - [ ] Documentation updated
48
+ - [ ] No new warnings generated
49
+ - [ ] Tests added/updated
50
+ ```
51
+
52
+ 4. **Create the Pull Request:**
53
+
54
+ ```bash
55
+ # Get current branch
56
+ BRANCH=$(git branch --show-current)
57
+
58
+ # Create PR with template
59
+ gh pr create \
60
+ --title "$(git log -1 --pretty=format:'%s')" \
61
+ --body "$(cat .github/pr-template-commits.md)" \
62
+ --base main \
63
+ --head $BRANCH
64
+ ```
65
+
66
+ See `.github/GITHUB_AUTH_SETUP.md` for authentication setup.
67
+
68
+ ## Context
69
+ - Repository: github.com/ericthayer/devlog
70
+ - Default base branch: `main`
71
+ - See `.github/pr-template-commits.md` for reusable PR description template
72
+ - See `.github/GITHUB_AUTH_SETUP.md` for GitHub authentication guide
73
+
74
+ ## Success Criteria
75
+ ✅ PR created with descriptive title
76
+ ✅ Body contains summary, changes, and testing info
77
+ ✅ All relevant files mentioned
78
+ ✅ Clear description of what and why
@@ -0,0 +1,57 @@
1
+ ---
2
+ agent: agent
3
+ description: Create a React component named [ComponentName] that accepts props defined in [ComponentName]Props interface.
4
+ ---
5
+ # Create Starter Component
6
+ **Read Instructions** from `./instructions/development-standards.instructions.md` before proceeding to see if there is anything specific to this prompt and helpful context when building React components.
7
+
8
+ **Development Process**: Follow [Spec-Driven Development](../workflows/sdd-workflow.md)
9
+ - Create component spec FIRST using the SDD template before generating code
10
+ - Spec location: `src/components/${category}/${componentName}/${componentName}.spec.md`
11
+ - Update spec changelog for any changes during development
12
+
13
+ **Alternative**: Use the `scaffold-component` skill from `../skills/scaffold-component/SKILL.md` for full SDD workflow integration
14
+
15
+ ## Context Variables
16
+ - Current file: ${file}
17
+ - Working directory: ${fileDirname}
18
+ - Component name hint: ${fileBasenameNoExtension}
19
+
20
+ ## Required Inputs
21
+ Don't assume, always ask for the following inputs before generating code:
22
+ 1. **Component Name** (must start with "Cb", e.g., "CbButton", "CbDataGrid")
23
+ 2. **MUI Base Component** (what MUI component to extend, e.g., "Button", "Card")
24
+ 3. **Category** (one of: dataDisplay, inputs, navigation, surfaces, feedback, entitlements, templates)
25
+
26
+ ## Generation Rules
27
+ - Create 4 files in `./src/components/${category}/${componentName}/`:
28
+ - `${componentName}.tsx` - Main component
29
+ - `${componentName}.stories.tsx` - Storybook stories (must include 'visual:check' tag)
30
+ - `${componentName}.mdx` - Documentation
31
+ - `index.ts` - Exports
32
+
33
+ ## Templates
34
+ Reference files in `src/examples/StarterComponent/` for structure patterns:
35
+ - Use `CbStarter.tsx` pattern for component structure
36
+ - Use `CbStarter.stories.tsx` pattern for stories (includes visual:check tag)
37
+ - Use `CbStarter.mdx` pattern for documentation
38
+
39
+ ## MDX Structure (CRITICAL)
40
+ **MUST include these wrappers** (see `.github/instructions/mdx.instructions.md`):
41
+ 1. Import `Unstyled` from `@storybook/addon-docs/blocks`
42
+ 2. Wrap all content in `<Unstyled>` → `<CSSTransition>` → `<div className="cbds-spec">` → `<ThemeProvider>`
43
+
44
+ ```mdx
45
+ <Meta of={ComponentStories} />
46
+
47
+ <Unstyled>
48
+ <CSSTransition in={true} appear timeout={300} classNames="fade">
49
+ <div className="cbds-spec">
50
+ <ThemeProvider theme={createCoBankTheme()}>
51
+ <CssBaseline />
52
+ {/* Content here */}
53
+ </ThemeProvider>
54
+ </div>
55
+ </CSSTransition>
56
+ </Unstyled>
57
+ ```
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: Accessibility standards for Three.js and React applications.
3
+ ---
4
+
5
+ **OBJECTIVE:**
6
+ Building inclusive 3D web experiences that are accessible to keyboard users, screen reader users, and those with motion sensitivities.
7
+
8
+ **REASON:**
9
+ 3D environments are inherently non-semantic. Without explicit effort, they are invisible to assistive technologies and can cause physical discomfort for users with vestibular disorders.
10
+
11
+ **DESCRIPTION:**
12
+ Guidelines for semantic canvas layering, focus management, and motion preference handling.
13
+
14
+ **INSTRUCTIONS:**
15
+
16
+ ### Instant Perceptual Feedback
17
+ - **Critical CSS Inlining**: Inline the minimum CSS required to render a themed background and loading indicator directly in the `<head>` of `index.html`. This prevents the "blank white screen" during bundle download.
18
+ - **Pre-Hydration Status**: Provide a `role="status"` or `aria-live="polite"` container in the initial HTML structure. Use CSS `:empty` pseudo-classes to show a loading message that automatically disappears once React hydrates the root.
19
+ - **Theme-Aware Loading**: Ensure the initial "Critical" background color matches the user's system preference (light/dark) to avoid "flash of un-themed content" (FOUT/FOIT).
20
+
21
+ ### Scene Accessibility
22
+ - **Canvas Metadata**: Always provide a descriptive `aria-label` or `title` on the `<canvas>` element. Use `role="img"` if the scene is purely visual, or `role="application"` if it is interactive.
23
+ - **Fallback Content**: Place a text description of the scene inside the `<canvas>` tag for older browsers or screen readers that don't support canvas metadata.
24
+
25
+ ### Motion Control (CRITICAL)
26
+ - **Respect `@media (prefers-reduced-motion)`**: Use the `useMediaQuery` hook or CSS to detect if the user prefers reduced motion.
27
+ - **Auto-Pause/Slow**: If reduced motion is active, automatically pause or significantly slow down ambient animations (rotations, particle systems, floating effects).
28
+ - **Toggle Visibility**: Avoid rapid flashing or strobing effects in 3D scenes.
29
+
30
+ ### Interaction & Focus
31
+ - **Standard UI Elements**: Use standard HTML `<button>` or `<a>` tags for interactions whenever possible, layered over the canvas.
32
+ - **Keyboard Navigation**: Ensure every interactive element in the 3D scene can be reached and activated via the `Tab` and `Enter/Space` keys.
33
+ - **Visual Focus States**: Never remove focus outlines (`outline: none`) without providing a clear, high-contrast alternative for navigated elements.
34
+
35
+ ### Contrast & Legibility
36
+ - **Text over 3D**: Ensure text labels overlaying 3D scenes have sufficient contrast (WCAG AA 4.5:1). Use text-shadows or semi-transparent backgrounds to guarantee legibility over dynamic backgrounds.