claudecode-omc 5.6.8 → 5.9.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/.local/skills/prompt-optimizer/SKILL.md +262 -19
- package/.omc-curation/ecc-selection.json +80 -0
- package/.omc-curation/governance.json +113 -0
- package/.omc-curation/sources.lock.json +25 -0
- package/README.md +69 -4
- package/bundled/manifest.json +5 -5
- package/bundled/upstream/anthropic-skills/.omc-source/bundle.json +18 -0
- package/bundled/upstream/anthropic-skills/.omc-source/provenance.json +399 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/SKILL.md +18 -17
- package/bundled/upstream/anthropic-skills/skills/claude-api/curl/examples.md +9 -9
- package/bundled/upstream/anthropic-skills/skills/claude-api/curl/managed-agents.md +4 -4
- package/bundled/upstream/anthropic-skills/skills/claude-api/go/managed-agents/README.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/java/claude-api.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/java/managed-agents/README.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/php/claude-api.md +10 -10
- package/bundled/upstream/anthropic-skills/skills/claude-api/php/managed-agents/README.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/README.md +16 -16
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/batches.md +3 -3
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/files-api.md +3 -3
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/streaming.md +7 -7
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/tool-use.md +19 -19
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/managed-agents/README.md +3 -3
- package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/claude-api.md +4 -4
- package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/managed-agents/README.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/error-codes.md +5 -5
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/live-sources.md +3 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-api-reference.md +10 -4
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-core.md +19 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-environments.md +6 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-multiagent.md +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-onboarding.md +3 -3
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-overview.md +3 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md +173 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-tools.md +10 -4
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/model-migration.md +113 -13
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/models.md +14 -11
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/prompt-caching.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/tool-use-concepts.md +4 -4
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/README.md +15 -15
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/batches.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/files-api.md +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/streaming.md +5 -5
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/tool-use.md +15 -15
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/managed-agents/README.md +3 -3
- package/bundled/upstream/ecc/.omc-source/bundle.json +2 -1
- package/bundled/upstream/ecc/.omc-source/last-plan-apply.json +108 -24
- package/bundled/upstream/ecc/.omc-source/manifests/.claude-plugin/marketplace.json +3 -3
- package/bundled/upstream/ecc/.omc-source/provenance.json +563 -0
- package/bundled/upstream/ecc/agents/marketing-agent.md +159 -0
- package/bundled/upstream/ecc/agents/react-build-resolver.md +215 -0
- package/bundled/upstream/ecc/agents/react-reviewer.md +167 -0
- package/bundled/upstream/ecc/agents/typescript-reviewer.md +3 -0
- package/bundled/upstream/ecc/commands/harness-audit.md +17 -10
- package/bundled/upstream/ecc/commands/marketing-campaign.md +129 -0
- package/bundled/upstream/ecc/commands/react-build.md +187 -0
- package/bundled/upstream/ecc/commands/react-review.md +170 -0
- package/bundled/upstream/ecc/commands/react-test.md +265 -0
- package/bundled/upstream/ecc/skills/benchmark-optimization-loop/SKILL.md +69 -0
- package/bundled/upstream/ecc/skills/blender-motion-state-inspection/SKILL.md +164 -0
- package/bundled/upstream/ecc/skills/canary-watch/SKILL.md +9 -1
- package/bundled/upstream/ecc/skills/continuous-learning-v2/hooks/observe.sh +31 -9
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +38 -4
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +319 -12
- package/bundled/upstream/ecc/skills/data-throughput-accelerator/SKILL.md +72 -0
- package/bundled/upstream/ecc/skills/dynamic-workflow-mode/SKILL.md +123 -0
- package/bundled/upstream/ecc/skills/frontend-a11y/SKILL.md +446 -0
- package/bundled/upstream/ecc/skills/ito-basket-compare/SKILL.md +63 -0
- package/bundled/upstream/ecc/skills/ito-data-atlas-agent/SKILL.md +63 -0
- package/bundled/upstream/ecc/skills/ito-market-intelligence/SKILL.md +60 -0
- package/bundled/upstream/ecc/skills/ito-trade-planner/SKILL.md +67 -0
- package/bundled/upstream/ecc/skills/latency-critical-systems/SKILL.md +73 -0
- package/bundled/upstream/ecc/skills/marketing-campaign/SKILL.md +113 -0
- package/bundled/upstream/ecc/skills/nextjs-turbopack/SKILL.md +13 -0
- package/bundled/upstream/ecc/skills/parallel-execution-optimizer/SKILL.md +72 -0
- package/bundled/upstream/ecc/skills/prediction-market-oracle-research/SKILL.md +63 -0
- package/bundled/upstream/ecc/skills/prediction-market-risk-review/SKILL.md +60 -0
- package/bundled/upstream/ecc/skills/react-patterns/SKILL.md +341 -0
- package/bundled/upstream/ecc/skills/react-performance/SKILL.md +574 -0
- package/bundled/upstream/ecc/skills/react-testing/SKILL.md +423 -0
- package/bundled/upstream/ecc/skills/recsys-pipeline-architect/SKILL.md +114 -0
- package/bundled/upstream/ecc/skills/recursive-decision-ledger/SKILL.md +79 -0
- package/bundled/upstream/ecc/skills/social-publisher/SKILL.md +115 -0
- package/bundled/upstream/ecc/skills/team-agent-orchestration/SKILL.md +110 -0
- package/bundled/upstream/ecc/skills/uncloud/SKILL.md +343 -0
- package/bundled/upstream/ecc/skills/windows-desktop-e2e/SKILL.md +99 -0
- package/bundled/upstream/oh-my-claudecode/.omc-source/bundle.json +2 -1
- package/bundled/upstream/oh-my-claudecode/.omc-source/provenance.json +116 -0
- package/bundled/upstream/oh-my-claudecode/skills/autopilot/SKILL.md +7 -0
- package/bundled/upstream/oh-my-claudecode/skills/cancel/SKILL.md +1 -0
- package/bundled/upstream/oh-my-claudecode/skills/deep-interview/SKILL.md +39 -5
- package/bundled/upstream/oh-my-claudecode/skills/hud/SKILL.md +1 -0
- package/bundled/upstream/oh-my-claudecode/skills/local-build-reminder/SKILL.md +78 -0
- package/bundled/upstream/oh-my-claudecode/skills/omc-doctor/SKILL.md +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/SKILL.md +26 -10
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/01-install-claude-md.md +3 -3
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/02-configure.md +6 -4
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/03-integrations.md +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/04-welcome.md +2 -2
- package/bundled/upstream/oh-my-claudecode/skills/omc-teams/SKILL.md +6 -6
- package/bundled/upstream/oh-my-claudecode/skills/plan/SKILL.md +44 -32
- package/bundled/upstream/oh-my-claudecode/skills/ralph/SKILL.md +45 -21
- package/bundled/upstream/oh-my-claudecode/skills/ralplan/SKILL.md +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/self-improve/SKILL.md +7 -0
- package/bundled/upstream/oh-my-claudecode/skills/self-improve/scripts/resolve-paths.mjs +39 -15
- package/bundled/upstream/oh-my-claudecode/skills/team/SKILL.md +132 -90
- package/bundled/upstream/oh-my-claudecode/skills/ultragoal/SKILL.md +93 -0
- package/bundled/upstream/oh-my-claudecode/skills/ultraqa/SKILL.md +28 -13
- package/bundled/upstream/oh-my-claudecode/skills/ultrawork/SKILL.md +7 -0
- package/bundled/upstream/superpowers/.omc-source/bundle.json +2 -1
- package/bundled/upstream/superpowers/.omc-source/provenance.json +63 -0
- package/package.json +2 -1
- package/src/catalog/source-catalog.js +10 -4
- package/src/cli/index.js +4 -0
- package/src/cli/plan.js +14 -2
- package/src/cli/setup.js +52 -13
- package/src/cli/skill.js +1 -1
- package/src/cli/source.js +265 -14
- package/src/config/sources.js +67 -1
- package/src/merge/content-patch.js +84 -0
- package/templates/merge-config.json +1 -8
- package/bundled/upstream/ecc/skills/strategic-compact/suggest-compact.sh +0 -54
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-a11y
|
|
3
|
+
description: >
|
|
4
|
+
Accessibility patterns for React and Next.js — semantic HTML, ARIA attributes,
|
|
5
|
+
form labeling, keyboard navigation, focus management, and screen reader support.
|
|
6
|
+
Use when building any interactive UI component or form.
|
|
7
|
+
origin: community
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Frontend Accessibility Patterns
|
|
11
|
+
|
|
12
|
+
Practical accessibility patterns for React and Next.js. Covers the issues most commonly flagged in code review: missing form labels, incorrect ARIA usage, non-semantic interactive elements, and broken keyboard navigation.
|
|
13
|
+
|
|
14
|
+
## When to Activate
|
|
15
|
+
|
|
16
|
+
- Building or reviewing form components (`<input>`, `<select>`, `<textarea>`)
|
|
17
|
+
- Creating interactive elements (modals, dropdowns, tooltips, tabs)
|
|
18
|
+
- Using `<div>` or `<span>` with `onClick`
|
|
19
|
+
- Adding `aria-*` attributes to any element
|
|
20
|
+
- Implementing keyboard navigation or focus management
|
|
21
|
+
- Receiving accessibility feedback from code review tools (CodeRabbit, ESLint a11y)
|
|
22
|
+
- Building components that must support screen readers
|
|
23
|
+
|
|
24
|
+
## Form Accessibility
|
|
25
|
+
|
|
26
|
+
Missing `htmlFor` / `id` pairing and disconnected error messages are the most common issues flagged in code review.
|
|
27
|
+
|
|
28
|
+
### Label Connection
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
// BAD: label has no connection to input — screen readers cannot associate them
|
|
32
|
+
<label>Email</label>
|
|
33
|
+
<input type="email" />
|
|
34
|
+
|
|
35
|
+
// GOOD: htmlFor matches input id
|
|
36
|
+
<label htmlFor="email">Email</label>
|
|
37
|
+
<input id="email" type="email" />
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Required Fields
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
// BAD: visual-only asterisk conveys nothing to screen readers
|
|
44
|
+
<label htmlFor="email">Email *</label>
|
|
45
|
+
<input id="email" type="email" />
|
|
46
|
+
|
|
47
|
+
// GOOD: required enables native browser validation; aria-required signals it to screen readers
|
|
48
|
+
<label htmlFor="email">
|
|
49
|
+
Email <span aria-hidden="true">*</span>
|
|
50
|
+
</label>
|
|
51
|
+
<input id="email" type="email" required aria-required="true" />
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Error Messages
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
// BAD: error text exists visually but is not linked to the input
|
|
58
|
+
<input id="email" type="email" />
|
|
59
|
+
<span className="error">Invalid email address</span>
|
|
60
|
+
|
|
61
|
+
// GOOD: aria-describedby connects input to its error message
|
|
62
|
+
// aria-invalid signals the invalid state to screen readers
|
|
63
|
+
<input
|
|
64
|
+
id="email"
|
|
65
|
+
type="email"
|
|
66
|
+
aria-describedby="email-error"
|
|
67
|
+
aria-invalid={!!error}
|
|
68
|
+
/>
|
|
69
|
+
{error && (
|
|
70
|
+
<span id="email-error" role="alert">
|
|
71
|
+
{error}
|
|
72
|
+
</span>
|
|
73
|
+
)}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Complete Accessible Form
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
interface LoginFormProps {
|
|
80
|
+
onSubmit: (email: string, password: string) => void;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function LoginForm({ onSubmit }: LoginFormProps) {
|
|
84
|
+
const [email, setEmail] = useState('');
|
|
85
|
+
const [password, setPassword] = useState('');
|
|
86
|
+
const [errors, setErrors] = useState<{ email?: string; password?: string }>({});
|
|
87
|
+
|
|
88
|
+
const handleSubmit = (e: React.FormEvent) => {
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
const newErrors: typeof errors = {};
|
|
91
|
+
if (!email) newErrors.email = 'Email is required';
|
|
92
|
+
if (!password) newErrors.password = 'Password is required';
|
|
93
|
+
if (Object.keys(newErrors).length) {
|
|
94
|
+
setErrors(newErrors);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
onSubmit(email, password);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<form onSubmit={handleSubmit} noValidate>
|
|
102
|
+
<div>
|
|
103
|
+
<label htmlFor="email">
|
|
104
|
+
Email <span aria-hidden="true">*</span>
|
|
105
|
+
</label>
|
|
106
|
+
<input
|
|
107
|
+
id="email"
|
|
108
|
+
type="email"
|
|
109
|
+
value={email}
|
|
110
|
+
onChange={e => setEmail(e.target.value)}
|
|
111
|
+
aria-required="true"
|
|
112
|
+
aria-describedby={errors.email ? 'email-error' : undefined}
|
|
113
|
+
aria-invalid={!!errors.email}
|
|
114
|
+
autoComplete="email"
|
|
115
|
+
/>
|
|
116
|
+
{errors.email && (
|
|
117
|
+
<span id="email-error" role="alert">
|
|
118
|
+
{errors.email}
|
|
119
|
+
</span>
|
|
120
|
+
)}
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<div>
|
|
124
|
+
<label htmlFor="password">
|
|
125
|
+
Password <span aria-hidden="true">*</span>
|
|
126
|
+
</label>
|
|
127
|
+
<input
|
|
128
|
+
id="password"
|
|
129
|
+
type="password"
|
|
130
|
+
value={password}
|
|
131
|
+
onChange={e => setPassword(e.target.value)}
|
|
132
|
+
aria-required="true"
|
|
133
|
+
aria-describedby={errors.password ? 'password-error' : undefined}
|
|
134
|
+
aria-invalid={!!errors.password}
|
|
135
|
+
autoComplete="current-password"
|
|
136
|
+
/>
|
|
137
|
+
{errors.password && (
|
|
138
|
+
<span id="password-error" role="alert">
|
|
139
|
+
{errors.password}
|
|
140
|
+
</span>
|
|
141
|
+
)}
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<button type="submit">Log in</button>
|
|
145
|
+
</form>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Semantic HTML
|
|
151
|
+
|
|
152
|
+
Use the element that matches the intent. Screen readers and keyboard users depend on native semantics.
|
|
153
|
+
|
|
154
|
+
```tsx
|
|
155
|
+
// BAD: div has no role, no keyboard support, no accessible name
|
|
156
|
+
<div onClick={handleClick}>Submit</div>
|
|
157
|
+
|
|
158
|
+
// GOOD: button is focusable, activates on Enter/Space, announces as "button"
|
|
159
|
+
<button type="button" onClick={handleClick}>Submit</button>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
```tsx
|
|
163
|
+
// BAD: non-semantic navigation
|
|
164
|
+
<div onClick={() => navigate('/home')}>Home</div>
|
|
165
|
+
|
|
166
|
+
// GOOD: anchor supports right-click, middle-click, and keyboard navigation
|
|
167
|
+
<a href="/home">Home</a>
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
```tsx
|
|
171
|
+
// BAD: heading hierarchy skipped (h1 to h4)
|
|
172
|
+
<h1>Dashboard</h1>
|
|
173
|
+
<h4>Recent Activity</h4>
|
|
174
|
+
|
|
175
|
+
// GOOD: sequential heading levels
|
|
176
|
+
<h1>Dashboard</h1>
|
|
177
|
+
<h2>Recent Activity</h2>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## ARIA Attributes
|
|
181
|
+
|
|
182
|
+
Use ARIA only when native HTML semantics are insufficient. Wrong ARIA is worse than no ARIA.
|
|
183
|
+
|
|
184
|
+
### aria-label vs aria-labelledby
|
|
185
|
+
|
|
186
|
+
```tsx
|
|
187
|
+
// aria-label: inline string label — use when no visible label text exists
|
|
188
|
+
<button aria-label="Close modal">
|
|
189
|
+
<XIcon />
|
|
190
|
+
</button>
|
|
191
|
+
|
|
192
|
+
// aria-labelledby: references another element's text — use when a visible label exists
|
|
193
|
+
<section aria-labelledby="section-title">
|
|
194
|
+
<h2 id="section-title">Recent Orders</h2>
|
|
195
|
+
{/* content */}
|
|
196
|
+
</section>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### aria-describedby
|
|
200
|
+
|
|
201
|
+
```tsx
|
|
202
|
+
// Provides supplementary description beyond the label
|
|
203
|
+
<button
|
|
204
|
+
aria-describedby="delete-warning"
|
|
205
|
+
onClick={handleDelete}
|
|
206
|
+
>
|
|
207
|
+
Delete account
|
|
208
|
+
</button>
|
|
209
|
+
<p id="delete-warning">This action cannot be undone.</p>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### aria-live for Dynamic Content
|
|
213
|
+
|
|
214
|
+
```tsx
|
|
215
|
+
// Use aria-live to announce content that updates without a page reload
|
|
216
|
+
// polite: waits for user to finish current action before announcing
|
|
217
|
+
// assertive: interrupts immediately — use only for urgent errors
|
|
218
|
+
|
|
219
|
+
export function StatusMessage({ message, isError }: { message: string; isError?: boolean }) {
|
|
220
|
+
return (
|
|
221
|
+
<div role="status" aria-live={isError ? 'assertive' : 'polite'} aria-atomic="true">
|
|
222
|
+
{message}
|
|
223
|
+
</div>
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### aria-expanded and aria-controls
|
|
229
|
+
|
|
230
|
+
```tsx
|
|
231
|
+
export function Accordion({ title, children }: { title: string; children: React.ReactNode }) {
|
|
232
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
233
|
+
const contentId = useId();
|
|
234
|
+
|
|
235
|
+
return (
|
|
236
|
+
<div>
|
|
237
|
+
<button aria-expanded={isOpen} aria-controls={contentId} onClick={() => setIsOpen(prev => !prev)}>
|
|
238
|
+
{title}
|
|
239
|
+
</button>
|
|
240
|
+
<div id={contentId} hidden={!isOpen}>
|
|
241
|
+
{children}
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## Keyboard Navigation
|
|
249
|
+
|
|
250
|
+
Every interactive element must be reachable and operable by keyboard alone.
|
|
251
|
+
|
|
252
|
+
### Custom Dropdown
|
|
253
|
+
|
|
254
|
+
```tsx
|
|
255
|
+
export function Dropdown({ options, onSelect }: { options: string[]; onSelect: (value: string) => void }) {
|
|
256
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
257
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
258
|
+
const listId = useId();
|
|
259
|
+
|
|
260
|
+
if (!options.length) return null;
|
|
261
|
+
|
|
262
|
+
const handleKeyDown = (e: React.KeyboardEvent) => {
|
|
263
|
+
switch (e.key) {
|
|
264
|
+
case 'ArrowDown':
|
|
265
|
+
e.preventDefault();
|
|
266
|
+
setActiveIndex(i => Math.min(i + 1, options.length - 1));
|
|
267
|
+
break;
|
|
268
|
+
case 'ArrowUp':
|
|
269
|
+
e.preventDefault();
|
|
270
|
+
setActiveIndex(i => Math.max(i - 1, 0));
|
|
271
|
+
break;
|
|
272
|
+
case 'Enter':
|
|
273
|
+
case ' ':
|
|
274
|
+
e.preventDefault();
|
|
275
|
+
if (isOpen) onSelect(options[activeIndex]);
|
|
276
|
+
setIsOpen(prev => !prev);
|
|
277
|
+
break;
|
|
278
|
+
case 'Escape':
|
|
279
|
+
setIsOpen(false);
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
return (
|
|
285
|
+
<div
|
|
286
|
+
role="combobox"
|
|
287
|
+
aria-expanded={isOpen}
|
|
288
|
+
aria-haspopup="listbox"
|
|
289
|
+
aria-controls={listId}
|
|
290
|
+
tabIndex={0}
|
|
291
|
+
onKeyDown={handleKeyDown}
|
|
292
|
+
onClick={() => setIsOpen(prev => !prev)}
|
|
293
|
+
>
|
|
294
|
+
<span>{options[activeIndex]}</span>
|
|
295
|
+
{isOpen && (
|
|
296
|
+
<ul id={listId} role="listbox">
|
|
297
|
+
{options.map((option, index) => (
|
|
298
|
+
<li
|
|
299
|
+
key={option}
|
|
300
|
+
role="option"
|
|
301
|
+
aria-selected={index === activeIndex}
|
|
302
|
+
onClick={() => {
|
|
303
|
+
onSelect(option);
|
|
304
|
+
setIsOpen(false);
|
|
305
|
+
}}
|
|
306
|
+
>
|
|
307
|
+
{option}
|
|
308
|
+
</li>
|
|
309
|
+
))}
|
|
310
|
+
</ul>
|
|
311
|
+
)}
|
|
312
|
+
</div>
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## Focus Management
|
|
318
|
+
|
|
319
|
+
Focus must move logically when UI state changes — especially for modals and route transitions.
|
|
320
|
+
|
|
321
|
+
### Modal Focus Restoration
|
|
322
|
+
|
|
323
|
+
> This example covers initial focus and restoration. For a full focus trap (Tab/Shift+Tab cycling within the modal), use a library like [`focus-trap-react`](https://github.com/focus-trap/focus-trap-react) which handles edge cases like dynamic content and nested portals.
|
|
324
|
+
|
|
325
|
+
```tsx
|
|
326
|
+
export function Modal({ isOpen, onClose, title, children }: { isOpen: boolean; onClose: () => void; title: string; children: React.ReactNode }) {
|
|
327
|
+
const modalRef = useRef<HTMLDivElement>(null);
|
|
328
|
+
const previousFocusRef = useRef<HTMLElement | null>(null);
|
|
329
|
+
|
|
330
|
+
useEffect(() => {
|
|
331
|
+
if (isOpen) {
|
|
332
|
+
// Save currently focused element and move focus into modal
|
|
333
|
+
previousFocusRef.current = document.activeElement as HTMLElement;
|
|
334
|
+
modalRef.current?.focus();
|
|
335
|
+
} else {
|
|
336
|
+
// Restore focus to the element that opened the modal
|
|
337
|
+
previousFocusRef.current?.focus();
|
|
338
|
+
}
|
|
339
|
+
}, [isOpen]);
|
|
340
|
+
|
|
341
|
+
if (!isOpen) return null;
|
|
342
|
+
|
|
343
|
+
return (
|
|
344
|
+
<div ref={modalRef} role="dialog" aria-modal="true" aria-labelledby="modal-title" tabIndex={-1} onKeyDown={e => e.key === 'Escape' && onClose()}>
|
|
345
|
+
<h2 id="modal-title">{title}</h2>
|
|
346
|
+
{children}
|
|
347
|
+
<button onClick={onClose}>Close</button>
|
|
348
|
+
</div>
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
## Images and Icons
|
|
354
|
+
|
|
355
|
+
```tsx
|
|
356
|
+
// BAD: decorative icon announced as unlabeled image
|
|
357
|
+
<img src="/icon.svg" />
|
|
358
|
+
|
|
359
|
+
// GOOD: decorative image hidden from screen readers
|
|
360
|
+
<img src="/decoration.png" alt="" aria-hidden="true" />
|
|
361
|
+
|
|
362
|
+
// GOOD: meaningful image with descriptive alt text
|
|
363
|
+
<img src="/chart.png" alt="Monthly revenue increased 23% from January to March" />
|
|
364
|
+
|
|
365
|
+
// GOOD: icon button with accessible label
|
|
366
|
+
<button aria-label="Delete item">
|
|
367
|
+
<TrashIcon aria-hidden="true" />
|
|
368
|
+
</button>
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
## Reduced Motion
|
|
372
|
+
|
|
373
|
+
Respect users who have requested reduced motion in their OS settings.
|
|
374
|
+
|
|
375
|
+
```tsx
|
|
376
|
+
export function useReducedMotion(): boolean {
|
|
377
|
+
const [prefersReduced, setPrefersReduced] = useState(false);
|
|
378
|
+
|
|
379
|
+
useEffect(() => {
|
|
380
|
+
const mq = window.matchMedia('(prefers-reduced-motion: reduce)');
|
|
381
|
+
setPrefersReduced(mq.matches);
|
|
382
|
+
const handler = (e: MediaQueryListEvent) => setPrefersReduced(e.matches);
|
|
383
|
+
mq.addEventListener('change', handler);
|
|
384
|
+
return () => mq.removeEventListener('change', handler);
|
|
385
|
+
}, []);
|
|
386
|
+
|
|
387
|
+
return prefersReduced;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// Usage
|
|
391
|
+
export function AnimatedCard({ children }: { children: React.ReactNode }) {
|
|
392
|
+
const reduceMotion = useReducedMotion();
|
|
393
|
+
|
|
394
|
+
return (
|
|
395
|
+
<div
|
|
396
|
+
style={{
|
|
397
|
+
transition: reduceMotion ? 'none' : 'transform 300ms ease'
|
|
398
|
+
}}
|
|
399
|
+
>
|
|
400
|
+
{children}
|
|
401
|
+
</div>
|
|
402
|
+
);
|
|
403
|
+
}
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
## Anti-Patterns
|
|
407
|
+
|
|
408
|
+
```tsx
|
|
409
|
+
// BAD: onClick on non-interactive element with no keyboard support
|
|
410
|
+
<div onClick={handleClick}>Click me</div>
|
|
411
|
+
|
|
412
|
+
// BAD: aria-label on a div that has no role
|
|
413
|
+
<div aria-label="Navigation">...</div>
|
|
414
|
+
|
|
415
|
+
// BAD: placeholder used as a substitute for label
|
|
416
|
+
<input placeholder="Enter your email" />
|
|
417
|
+
|
|
418
|
+
// BAD: positive tabIndex creates unpredictable tab order
|
|
419
|
+
<button tabIndex={3}>Submit</button>
|
|
420
|
+
|
|
421
|
+
// BAD: aria-hidden on a focusable element — keyboard users get trapped
|
|
422
|
+
<button aria-hidden="true">Open</button>
|
|
423
|
+
|
|
424
|
+
// BAD: role="button" on div without keyboard handler
|
|
425
|
+
<div role="button" onClick={handleClick}>Submit</div>
|
|
426
|
+
// Missing: tabIndex={0}, onKeyDown for Enter/Space
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
## Checklist
|
|
430
|
+
|
|
431
|
+
Before submitting any interactive component for review:
|
|
432
|
+
|
|
433
|
+
- [ ] Every `<input>`, `<select>`, and `<textarea>` has a connected `<label>` via `htmlFor`/`id`
|
|
434
|
+
- [ ] Error messages are linked with `aria-describedby` and marked `role="alert"`
|
|
435
|
+
- [ ] No `onClick` on `<div>` or `<span>` without `role`, `tabIndex`, and `onKeyDown`
|
|
436
|
+
- [ ] Icon-only buttons have `aria-label`
|
|
437
|
+
- [ ] Decorative images use `alt=""` and `aria-hidden="true"`
|
|
438
|
+
- [ ] Modals restore focus on close (for full focus trapping with Tab/Shift+Tab cycling, use a library like `focus-trap-react`)
|
|
439
|
+
- [ ] Dynamic content updates use `aria-live`
|
|
440
|
+
- [ ] `prefers-reduced-motion` is respected for animations
|
|
441
|
+
|
|
442
|
+
## Related Skills
|
|
443
|
+
|
|
444
|
+
- `frontend-patterns` — general React component and state patterns
|
|
445
|
+
- `design-system` — design token and component consistency
|
|
446
|
+
- `motion-ui` — animation patterns with accessibility considerations
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ito-basket-compare
|
|
3
|
+
description: Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.
|
|
4
|
+
origin: ECC
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Itô Basket Compare
|
|
8
|
+
|
|
9
|
+
Use this skill to compare a basket, theme, or market set against a user's
|
|
10
|
+
knowledge base, portfolio notes, research memo, CRM context, or stated thesis.
|
|
11
|
+
|
|
12
|
+
This skill is read-only. It does not recommend trades. It helps a user inspect
|
|
13
|
+
fit, exposure, assumptions, and missing context before they decide what to do.
|
|
14
|
+
|
|
15
|
+
## Guardrails
|
|
16
|
+
|
|
17
|
+
- Do not provide investment advice or tell the user to buy, sell, hold, hedge,
|
|
18
|
+
lever, or size a trade.
|
|
19
|
+
- Do not execute, prepare, or submit orders.
|
|
20
|
+
- Do not use private documents unless the user explicitly points to them.
|
|
21
|
+
- Use `ITO_API_KEY` only for read-only Itô basket/market data after explicit
|
|
22
|
+
user request.
|
|
23
|
+
- If comparing against financials, preserve privacy and summarize only the
|
|
24
|
+
fields needed for the comparison.
|
|
25
|
+
|
|
26
|
+
## Comparison Modes
|
|
27
|
+
|
|
28
|
+
### Basket vs Knowledge Base
|
|
29
|
+
|
|
30
|
+
1. Identify the basket theme and underliers.
|
|
31
|
+
2. Retrieve the user's relevant notes, docs, or memory snippets.
|
|
32
|
+
3. Map each underlier to claims, sources, uncertainties, and stale assumptions.
|
|
33
|
+
4. Return aligned signals, conflicting signals, and missing research.
|
|
34
|
+
|
|
35
|
+
### Basket vs Portfolio Notes
|
|
36
|
+
|
|
37
|
+
1. Parse the user's watchlist, holdings summary, or exposure notes.
|
|
38
|
+
2. Compare themes, geographies, time horizons, and event outcomes.
|
|
39
|
+
3. Flag concentration, correlation, and duplicated narrative exposure.
|
|
40
|
+
4. Avoid recommendations; phrase output as inspection and questions.
|
|
41
|
+
|
|
42
|
+
### Basket vs Financial Context
|
|
43
|
+
|
|
44
|
+
1. Accept only user-provided or explicitly selected financial context.
|
|
45
|
+
2. Identify liquidity, drawdown, time-horizon, and constraint mismatches.
|
|
46
|
+
3. Ask for missing constraints instead of guessing.
|
|
47
|
+
|
|
48
|
+
## Output Contract
|
|
49
|
+
|
|
50
|
+
Use this structure:
|
|
51
|
+
|
|
52
|
+
1. Basket summary
|
|
53
|
+
2. Comparison target
|
|
54
|
+
3. Matches
|
|
55
|
+
4. Conflicts or stale assumptions
|
|
56
|
+
5. Missing context
|
|
57
|
+
6. User-action checklist
|
|
58
|
+
|
|
59
|
+
End with:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
This comparison is informational and not investment or trading advice.
|
|
63
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ito-data-atlas-agent
|
|
3
|
+
description: Design background Data Atlas style agents for Itô basket research, market discovery, parameter drafting, and human-in-the-loop editing. Use for architecture and workflow planning, not live order execution.
|
|
4
|
+
origin: ECC
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Itô Data Atlas Agent
|
|
8
|
+
|
|
9
|
+
Use this skill to design an agent that watches data sources, builds candidate
|
|
10
|
+
prediction-market baskets, drafts parameter changes, and hands the result to a
|
|
11
|
+
human for review.
|
|
12
|
+
|
|
13
|
+
This skill describes architecture and workflow. It does not run live trading.
|
|
14
|
+
|
|
15
|
+
## Guardrails
|
|
16
|
+
|
|
17
|
+
- Keep all execution behind explicit human approval.
|
|
18
|
+
- Require `ITO_API_KEY` only for read-only Itô data access unless a separate
|
|
19
|
+
private implementation explicitly adds execution controls.
|
|
20
|
+
- Do not persist private user data unless the target repo already has a storage
|
|
21
|
+
contract and the user asks for it.
|
|
22
|
+
- Do not expose private strategy logic, venue credentials, or local paths in
|
|
23
|
+
public docs.
|
|
24
|
+
|
|
25
|
+
## Architecture Pattern
|
|
26
|
+
|
|
27
|
+
Use four lanes:
|
|
28
|
+
|
|
29
|
+
1. Research collector: public web, X, GitHub, venue docs, API metadata, and
|
|
30
|
+
Itô read endpoints when gated access exists.
|
|
31
|
+
2. Basket drafter: turns sources into candidate underliers, weights, rules, and
|
|
32
|
+
questions.
|
|
33
|
+
3. Risk reviewer: checks data freshness, venue limits, resolution ambiguity,
|
|
34
|
+
compliance notes, and prompt-injection exposure.
|
|
35
|
+
4. Human editor: opens a chat or UI state where the user can approve, reject,
|
|
36
|
+
adjust, or ask for more research.
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
|
|
40
|
+
1. Define the user objective and excluded actions.
|
|
41
|
+
2. List data sources and access requirements.
|
|
42
|
+
3. Draft a basket spec with provenance for every underlier.
|
|
43
|
+
4. Produce editable parameters rather than executable orders.
|
|
44
|
+
5. Store an audit trail: inputs, model output, sources, and human decision.
|
|
45
|
+
|
|
46
|
+
## Useful Skill Chains
|
|
47
|
+
|
|
48
|
+
- `deep-research` for source collection.
|
|
49
|
+
- `x-api` for current social/event signal.
|
|
50
|
+
- `ito-market-intelligence` for venue and underlier context.
|
|
51
|
+
- `ito-basket-compare` for user knowledge-base matching.
|
|
52
|
+
- `prediction-market-risk-review` before any execution-capable integration.
|
|
53
|
+
|
|
54
|
+
## Output Contract
|
|
55
|
+
|
|
56
|
+
Return an implementation-ready workflow spec with:
|
|
57
|
+
|
|
58
|
+
- data sources
|
|
59
|
+
- access gates
|
|
60
|
+
- agent roles
|
|
61
|
+
- human approval points
|
|
62
|
+
- storage/audit boundary
|
|
63
|
+
- non-goals
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ito-market-intelligence
|
|
3
|
+
description: Research prediction-market events, venues, underliers, liquidity, and news context for Itô basket workflows. Use for read-only market intelligence, API-gated Itô exploration, and source-grounded prediction-market briefings without investment advice or live trading.
|
|
4
|
+
origin: ECC
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Itô Market Intelligence
|
|
8
|
+
|
|
9
|
+
Use this skill when a user wants prediction-market context, event discovery,
|
|
10
|
+
venue comparison, basket theme exploration, or an Itô API-backed market brief.
|
|
11
|
+
|
|
12
|
+
This is a public teaser skill. It can work with public sources by default. Any
|
|
13
|
+
Itô-backed data call requires explicit API access through `ITO_API_KEY`.
|
|
14
|
+
|
|
15
|
+
## Guardrails
|
|
16
|
+
|
|
17
|
+
- Do not provide investment, legal, tax, or trading advice.
|
|
18
|
+
- Do not place, cancel, route, or simulate live orders.
|
|
19
|
+
- Do not infer the user's financial situation unless they provide it.
|
|
20
|
+
- Treat Polymarket, Kalshi, Itô, X, Exa, GitHub, and web data as source inputs,
|
|
21
|
+
not as truth by themselves.
|
|
22
|
+
- Separate facts, market-implied signals, and your interpretation.
|
|
23
|
+
|
|
24
|
+
## Workflow
|
|
25
|
+
|
|
26
|
+
1. Clarify the market theme, venue, geography, and time horizon.
|
|
27
|
+
2. Gather public market data from venue docs/APIs or source-grounded research.
|
|
28
|
+
3. If `ITO_API_KEY` is present and the user explicitly asks for Itô data, call
|
|
29
|
+
only read endpoints and state that access is gated.
|
|
30
|
+
4. Normalize event, underlier, liquidity, fee, resolution, and data-latency
|
|
31
|
+
differences across venues.
|
|
32
|
+
5. Produce a decision brief:
|
|
33
|
+
- market/event summary
|
|
34
|
+
- available venues and underliers
|
|
35
|
+
- liquidity and data-quality caveats
|
|
36
|
+
- relevant news/source context
|
|
37
|
+
- open questions before any user action
|
|
38
|
+
|
|
39
|
+
## Useful Skill Chains
|
|
40
|
+
|
|
41
|
+
- Use `deep-research` or `exa-search` for source discovery.
|
|
42
|
+
- Use `x-api` for public social signal discovery when X access is configured.
|
|
43
|
+
- Use `market-research` for market sizing, competitors, or business use cases.
|
|
44
|
+
- Use `prediction-market-risk-review` before any workflow touches user capital,
|
|
45
|
+
portfolio data, or execution-capable credentials.
|
|
46
|
+
|
|
47
|
+
## Output Contract
|
|
48
|
+
|
|
49
|
+
Default to a compact brief with source links and a clear caveat:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
This is market intelligence, not investment or trading advice.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If access is missing, say:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
Itô live basket/API data requires gated access. Request an ITO_API_KEY before
|
|
59
|
+
using Itô-backed reads.
|
|
60
|
+
```
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ito-trade-planner
|
|
3
|
+
description: Build a non-advisory prediction-market trade planning worksheet for Itô or venue workflows. Use to inspect venues, underliers, constraints, order prerequisites, and manual execution steps without placing trades or recommending positions.
|
|
4
|
+
origin: ECC
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Itô Trade Planner
|
|
8
|
+
|
|
9
|
+
Use this skill when a user wants a structured worksheet for a prediction-market
|
|
10
|
+
idea, basket adjustment, venue comparison, or manual execution plan.
|
|
11
|
+
|
|
12
|
+
The skill is intentionally non-executing. It produces checklists and parameter
|
|
13
|
+
tables the user can review manually.
|
|
14
|
+
|
|
15
|
+
## Guardrails
|
|
16
|
+
|
|
17
|
+
- Do not say a trade is good, bad, optimal, or recommended.
|
|
18
|
+
- Do not provide investment advice or position sizing advice.
|
|
19
|
+
- Do not place, cancel, route, or sign orders.
|
|
20
|
+
- Do not request private keys, seed phrases, exchange passwords, or wallet
|
|
21
|
+
credentials.
|
|
22
|
+
- Require explicit user approval before any workflow moves from research to
|
|
23
|
+
execution-capable tooling.
|
|
24
|
+
|
|
25
|
+
## Planning Workflow
|
|
26
|
+
|
|
27
|
+
1. Restate the user's idea as a neutral hypothesis.
|
|
28
|
+
2. Identify markets, venues, underliers, resolution rules, fees, and data
|
|
29
|
+
freshness constraints.
|
|
30
|
+
3. If `ITO_API_KEY` is configured and requested, read Itô basket metadata.
|
|
31
|
+
4. Build a manual worksheet:
|
|
32
|
+
- market/underlier
|
|
33
|
+
- venue
|
|
34
|
+
- data source
|
|
35
|
+
- current observable price or status
|
|
36
|
+
- resolution rule
|
|
37
|
+
- liquidity caveat
|
|
38
|
+
- open questions
|
|
39
|
+
- manual action link or next review step
|
|
40
|
+
5. Run `prediction-market-risk-review` before discussing automation, keys,
|
|
41
|
+
venue auth, or capital constraints.
|
|
42
|
+
|
|
43
|
+
## Allowed Language
|
|
44
|
+
|
|
45
|
+
Use:
|
|
46
|
+
|
|
47
|
+
- "manual planning worksheet"
|
|
48
|
+
- "questions to answer before acting"
|
|
49
|
+
- "observable venue data"
|
|
50
|
+
- "risk and constraint review"
|
|
51
|
+
|
|
52
|
+
Avoid:
|
|
53
|
+
|
|
54
|
+
- "you should buy/sell"
|
|
55
|
+
- "best trade"
|
|
56
|
+
- "guaranteed"
|
|
57
|
+
- "risk-free"
|
|
58
|
+
- "optimal size"
|
|
59
|
+
|
|
60
|
+
## Output Contract
|
|
61
|
+
|
|
62
|
+
End every plan with:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
This is a planning worksheet, not investment or trading advice. Review venue
|
|
66
|
+
rules and make any trading decisions yourself.
|
|
67
|
+
```
|