opencode-agile-agent 1.0.1 → 1.0.2

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 (66) hide show
  1. package/README.md +61 -71
  2. package/bin/cli.js +344 -434
  3. package/bin/sync-templates.js +45 -0
  4. package/bin/validate-templates.js +44 -6
  5. package/package.json +2 -1
  6. package/templates/.opencode/ARCHITECTURE.md +82 -368
  7. package/templates/.opencode/README.md +110 -391
  8. package/templates/.opencode/agents/api-designer.md +45 -312
  9. package/templates/.opencode/agents/backend-specialist.md +46 -214
  10. package/templates/.opencode/agents/code-archaeologist.md +45 -260
  11. package/templates/.opencode/agents/context-gatherer.md +51 -0
  12. package/templates/.opencode/agents/database-architect.md +45 -212
  13. package/templates/.opencode/agents/debugger.md +45 -302
  14. package/templates/.opencode/agents/developer.md +45 -523
  15. package/templates/.opencode/agents/devops-engineer.md +45 -253
  16. package/templates/.opencode/agents/documentation-writer.md +45 -247
  17. package/templates/.opencode/agents/explorer-agent.md +49 -233
  18. package/templates/.opencode/agents/feature-lead.md +62 -302
  19. package/templates/.opencode/agents/frontend-specialist.md +46 -186
  20. package/templates/.opencode/agents/game-developer.md +45 -391
  21. package/templates/.opencode/agents/mobile-developer.md +45 -264
  22. package/templates/.opencode/agents/orchestrator.md +48 -463
  23. package/templates/.opencode/agents/penetration-tester.md +44 -254
  24. package/templates/.opencode/agents/performance-optimizer.md +45 -292
  25. package/templates/.opencode/agents/pr-reviewer.md +45 -468
  26. package/templates/.opencode/agents/product-manager.md +46 -225
  27. package/templates/.opencode/agents/project-planner.md +45 -248
  28. package/templates/.opencode/agents/qa-automation-engineer.md +45 -275
  29. package/templates/.opencode/agents/security-auditor.md +44 -258
  30. package/templates/.opencode/agents/seo-specialist.md +45 -266
  31. package/templates/.opencode/agents/system-analyst.md +48 -428
  32. package/templates/.opencode/agents/test-engineer.md +45 -229
  33. package/templates/.opencode/archive/README.md +24 -0
  34. package/templates/.opencode/commands/brainstorm.md +10 -0
  35. package/templates/.opencode/commands/create.md +11 -0
  36. package/templates/.opencode/commands/debug.md +10 -0
  37. package/templates/.opencode/commands/plan.md +9 -0
  38. package/templates/.opencode/commands/review.md +11 -0
  39. package/templates/.opencode/commands/status.md +9 -0
  40. package/templates/.opencode/commands/test.md +10 -0
  41. package/templates/.opencode/skills/api-patterns/SKILL.md +25 -149
  42. package/templates/.opencode/skills/brainstorming/SKILL.md +26 -242
  43. package/templates/.opencode/skills/clean-code/SKILL.md +27 -339
  44. package/templates/.opencode/skills/code-philosophy/SKILL.md +27 -499
  45. package/templates/.opencode/skills/context-archive/SKILL.md +47 -0
  46. package/templates/.opencode/skills/context-gathering/SKILL.md +51 -0
  47. package/templates/.opencode/skills/frontend-design/SKILL.md +26 -224
  48. package/templates/.opencode/skills/intelligent-routing/SKILL.md +25 -182
  49. package/templates/.opencode/skills/parallel-agents/SKILL.md +25 -261
  50. package/templates/.opencode/skills/plan-writing/SKILL.md +28 -238
  51. package/templates/.opencode/skills/redteam-validation/SKILL.md +33 -0
  52. package/templates/.opencode/skills/security-gate/SKILL.md +33 -0
  53. package/templates/.opencode/skills/systematic-debugging/SKILL.md +25 -197
  54. package/templates/.opencode/skills/testing-patterns/SKILL.md +25 -238
  55. package/templates/AGENTS.template.md +300 -426
  56. package/templates/.opencode/agents/product-owner.md +0 -264
  57. package/templates/.opencode/workflows/brainstorm.md +0 -110
  58. package/templates/.opencode/workflows/create.md +0 -108
  59. package/templates/.opencode/workflows/debug.md +0 -128
  60. package/templates/.opencode/workflows/deploy.md +0 -160
  61. package/templates/.opencode/workflows/enhance.md +0 -253
  62. package/templates/.opencode/workflows/orchestrate.md +0 -130
  63. package/templates/.opencode/workflows/plan.md +0 -163
  64. package/templates/.opencode/workflows/review.md +0 -135
  65. package/templates/.opencode/workflows/status.md +0 -102
  66. package/templates/.opencode/workflows/test.md +0 -146
@@ -1,426 +1,300 @@
1
- # AGENTS.md - [Project Name]
2
-
3
- > **Instructions for AI agents working on this project**
4
- >
5
- > This file defines _how_ to build. For _what_ to build, see feature requirements.
6
-
7
- ---
8
-
9
- ## Project Stack
10
-
11
- <!-- CUSTOMIZE THIS SECTION -->
12
-
13
- - **Framework:** [e.g., React, Vue, Next.js, NestJS, Express]
14
- - **Language:** [e.g., TypeScript, JavaScript, Python, Go]
15
- - **State Management:** [e.g., Redux, Pinia, Zustand, None]
16
- - **Routing:** [e.g., React Router, Vue Router, Next Router]
17
- - **HTTP Client:** [e.g., Axios, Fetch, SWR]
18
- - **Build Tool:** [e.g., Vite, Webpack, esbuild]
19
- - **Testing:** [e.g., Jest, Vitest, Mocha]
20
- - **Styling:** [e.g., Tailwind, CSS Modules, Styled Components]
21
-
22
- ---
23
-
24
- ## Core Documentation (CRITICAL)
25
-
26
- Before making architectural or styling decisions, **review** these documents:
27
-
28
- | Document | Purpose | Location |
29
- |----------|---------|----------|
30
- | API Standards | API response structure, error handling | `docs/api-standards.md` |
31
- | UI Standards | Styling rules, component patterns | `docs/ui-standards.md` |
32
- | Code Style | Linting, formatting rules | `.eslintrc.js`, `.prettierrc` |
33
- | Architecture | System design, data flow | `docs/architecture.md` |
34
- | Database | Schema, relationships | `docs/database.md` |
35
-
36
- ---
37
-
38
- ## Code Conventions
39
-
40
- ### File Naming
41
-
42
- <!-- CUSTOMIZE THESE PATTERNS -->
43
-
44
- | Type | Pattern | Example |
45
- |------|---------|---------|
46
- | Components | `PascalCase.tsx` | `UserCard.tsx` |
47
- | Pages | `PascalCasePage.tsx` | `LoginPage.tsx` |
48
- | Stores | `camelCase.store.ts` | `auth.store.ts` |
49
- | Hooks/Composables | `useCamelCase.ts` | `useAuth.ts` |
50
- | Types | `camelCase.types.ts` | `user.types.ts` |
51
- | Utils | `camelCase.utils.ts` | `date.utils.ts` |
52
- | API | `camelCase.api.ts` | `auth.api.ts` |
53
- | Tests | `*.test.ts` or `*.spec.ts` | `auth.test.ts` |
54
-
55
- ### Code Style
56
-
57
- <!-- CUSTOMIZE THESE RULES -->
58
-
59
- - **Indentation:** [2 spaces / 4 spaces / tabs]
60
- - **Quotes:** [single / double]
61
- - **Semicolons:** [required / none]
62
- - **Line Width:** [80 / 100 / 120]
63
- - **Trailing Commas:** [always / none / es5]
64
-
65
- ### TypeScript/JavaScript
66
-
67
- ```typescript
68
- // ✅ GOOD: Explicit types
69
- interface User {
70
- id: string;
71
- name: string;
72
- email: string;
73
- }
74
-
75
- function getUser(id: string): Promise<User> {
76
- return api.get(`/users/${id}`);
77
- }
78
-
79
- // ❌ BAD: Any type
80
- function getUser(id: any): any {
81
- return api.get(`/users/${id}`);
82
- }
83
- ```
84
-
85
- ### Error Handling
86
-
87
- ```typescript
88
- // GOOD: Unknown error with proper casting
89
- try {
90
- await saveUser(user);
91
- } catch (err: unknown) {
92
- const e = err as { response?: { data?: { message?: string } } };
93
- error.value = e.response?.data?.message ?? 'Operation failed';
94
- }
95
-
96
- // ❌ BAD: Any error
97
- try {
98
- await saveUser(user);
99
- } catch (err: any) {
100
- error.value = err.message;
101
- }
102
- ```
103
-
104
- ---
105
-
106
- ## Project-Specific Rules
107
-
108
- <!-- ADD YOUR CUSTOM RULES HERE -->
109
-
110
- ### Rule 1: [Rule Name]
111
-
112
- Description of the rule and why it exists.
113
-
114
- ```typescript
115
- // GOOD: Example
116
- // BAD: Anti-example
117
- ```
118
-
119
- ### Rule 2: [Rule Name]
120
-
121
- Description...
122
-
123
- ---
124
-
125
- ## Architecture Patterns
126
-
127
- ### State Management
128
-
129
- <!-- CUSTOMIZE FOR YOUR STATE SOLUTION -->
130
-
131
- ```typescript
132
- // Store pattern example
133
- export const useAuthStore = defineStore('auth', () => {
134
- // State
135
- const user = ref<User | null>(null);
136
- const loading = ref(false);
137
- const error = ref<string | null>(null);
138
-
139
- // Getters
140
- const isAuthenticated = computed(() => !!user.value);
141
-
142
- // Actions
143
- async function login(credentials: LoginDto): Promise<void> {
144
- loading.value = true;
145
- error.value = null;
146
- try {
147
- user.value = await authApi.login(credentials);
148
- } catch (err: unknown) {
149
- const e = err as { response?: { data?: { message?: string } } };
150
- error.value = e.response?.data?.message ?? 'Login failed';
151
- throw err;
152
- } finally {
153
- loading.value = false;
154
- }
155
- }
156
-
157
- return { user, loading, error, isAuthenticated, login };
158
- });
159
- ```
160
-
161
- ### API Layer
162
-
163
- ```typescript
164
- // ✅ API calls separated from components
165
- // src/api/user.api.ts
166
- import api from './axios';
167
-
168
- export const userApi = {
169
- getAll: () => api.get<User[]>('/users'),
170
- getById: (id: string) => api.get<User>(`/users/${id}`),
171
- create: (data: CreateUserDto) => api.post<User>('/users', data),
172
- update: (id: string, data: UpdateUserDto) => api.put<User>(`/users/${id}`, data),
173
- delete: (id: string) => api.delete(`/users/${id}`),
174
- };
175
- ```
176
-
177
- ### Component Structure
178
-
179
- ```typescript
180
- // ✅ Component with clear structure
181
- <script setup lang="ts">
182
- import { ref, computed } from 'vue';
183
- import type { User } from '@/types';
184
-
185
- // Props
186
- interface Props {
187
- user: User;
188
- readonly?: boolean;
189
- }
190
- const props = withDefaults(defineProps<Props>(), {
191
- readonly: false,
192
- });
193
-
194
- // Emits
195
- interface Emits {
196
- (e: 'update', user: User): void;
197
- (e: 'delete', id: string): void;
198
- }
199
- const emit = defineEmits<Emits>();
200
-
201
- // State
202
- const isEditing = ref(false);
203
-
204
- // Computed
205
- const displayName = computed(() =>
206
- props.user.name || 'Anonymous'
207
- );
208
-
209
- // Methods
210
- function handleUpdate() {
211
- emit('update', props.user);
212
- isEditing.value = false;
213
- }
214
- </script>
215
-
216
- <template>
217
- <div class="user-card">
218
- <!-- Template here -->
219
- </div>
220
- </template>
221
-
222
- <style scoped>
223
- /* Styles here */
224
- </style>
225
- ```
226
-
227
- ---
228
-
229
- ## Testing Standards
230
-
231
- ### Unit Tests
232
-
233
- ```typescript
234
- // Test structure
235
- describe('useAuthStore', () => {
236
- beforeEach(() => {
237
- // Setup
238
- });
239
-
240
- afterEach(() => {
241
- // Cleanup
242
- });
243
-
244
- it('should login successfully', async () => {
245
- // Arrange
246
- const credentials = { email: 'test@example.com', password: 'password' };
247
-
248
- // Act
249
- await authStore.login(credentials);
250
-
251
- // Assert
252
- expect(authStore.isAuthenticated).toBe(true);
253
- expect(authStore.user).toBeDefined();
254
- });
255
-
256
- it('should handle login error', async () => {
257
- // Test error case
258
- });
259
- });
260
- ```
261
-
262
- ### Test Coverage
263
-
264
- - **Minimum:** 70% coverage
265
- - **Target:** 80% coverage
266
- - **Critical paths:** 100% coverage (auth, payments, etc.)
267
-
268
- ---
269
-
270
- ## Git Workflow
271
-
272
- ### Commit Messages
273
-
274
- ```
275
- <type>(<scope>): <subject>
276
-
277
- <body>
278
-
279
- <footer>
280
- ```
281
-
282
- **Types:**
283
- - `feat`: New feature
284
- - `fix`: Bug fix
285
- - `refactor`: Code refactor
286
- - `docs`: Documentation
287
- - `test`: Tests
288
- - `chore`: Maintenance
289
-
290
- **Example:**
291
- ```
292
- feat(auth): add JWT refresh token support
293
-
294
- - Implement refresh token rotation
295
- - Add automatic token refresh on 401
296
- - Store tokens in httpOnly cookies
297
-
298
- Closes #123
299
- ```
300
-
301
- ### Branch Naming
302
-
303
- ```
304
- <type>/<ticket>-<short-description>
305
-
306
- Examples:
307
- - feature/AUTH-123-jwt-refresh
308
- - fix/PAY-456-payment-timeout
309
- - refactor/CORE-789-state-management
310
- ```
311
-
312
- ---
313
-
314
- ## Performance Guidelines
315
-
316
- ### Do's
317
-
318
- - Lazy load components and routes
319
- - Memoize expensive computations
320
- - Paginate large lists
321
- - Use virtual scrolling for long lists
322
- - Optimize images and assets
323
- - Cache API responses when appropriate
324
-
325
- ### Don'ts
326
-
327
- - Render all items in large lists
328
- - Call expensive functions in render
329
- - Watch large objects unnecessarily
330
- - Block the main thread
331
- - Make unnecessary API calls
332
- - Ignore bundle size warnings
333
-
334
- ---
335
-
336
- ## Security Guidelines
337
-
338
- ### Authentication & Authorization
339
-
340
- - Never store sensitive data in localStorage
341
- - Use httpOnly cookies for tokens
342
- - Implement CSRF protection
343
- - Validate all user input
344
- - Sanitize data before rendering
345
- - Use parameterized queries
346
-
347
- ### Data Validation
348
-
349
- ```typescript
350
- // ✅ Validate at boundaries
351
- import { z } from 'zod';
352
-
353
- const UserSchema = z.object({
354
- email: z.string().email(),
355
- name: z.string().min(2).max(100),
356
- age: z.number().min(0).max(150).optional(),
357
- });
358
-
359
- function createUser(data: unknown): User {
360
- return UserSchema.parse(data); // Throws on invalid
361
- }
362
- ```
363
-
364
- ---
365
-
366
- ## Accessibility (a11y)
367
-
368
- - Use semantic HTML
369
- - Provide alt text for images
370
- - Ensure keyboard navigation
371
- - Maintain color contrast ratios
372
- - Use ARIA labels when needed
373
- - Test with screen readers
374
-
375
- ---
376
-
377
- ## Key Reminders
378
-
379
- <!-- ADD PROJECT-SPECIFIC REMINDERS -->
380
-
381
- 1. **[Reminder 1]** - Description
382
- 2. **[Reminder 2]** - Description
383
- 3. **[Reminder 3]** - Description
384
-
385
- ---
386
-
387
- ## Quick Reference
388
-
389
- ### Commands
390
-
391
- ```bash
392
- # Development
393
- npm run dev # Start dev server
394
- npm run build # Production build
395
- npm run test # Run tests
396
- npm run lint # Lint check
397
- npm run format # Format code
398
- npm run type-check # TypeScript check
399
- ```
400
-
401
- ### Important Files
402
-
403
- ```
404
- src/
405
- ├── components/ # Reusable components
406
- ├── pages/ # Page components
407
- ├── stores/ # State management
408
- ├── api/ # API calls
409
- ├── types/ # TypeScript types
410
- ├── utils/ # Utility functions
411
- └── hooks/ # Custom hooks/composables
412
- ```
413
-
414
- ---
415
-
416
- ## Questions?
417
-
418
- When in doubt:
419
- 1. Check existing code for patterns
420
- 2. Read the relevant docs
421
- 3. Ask the team lead
422
- 4. Follow the principle of least surprise
423
-
424
- ---
425
-
426
- **Keep this file updated as the project evolves.**
1
+ # AGENTS.md - [Project Name]
2
+
3
+ > Instructions for AI agents working on this project.
4
+ >
5
+ > How to build lives here; what to build comes from feature specs.
6
+
7
+ ---
8
+
9
+ ## Project Stack
10
+
11
+ <!-- CUSTOMIZE THIS SECTION -->
12
+
13
+ - Framework: [e.g. React, Vue, Next.js, NestJS, Express]
14
+ - Language: [e.g. TypeScript, JavaScript, Python, Go]
15
+ - State Management: [e.g. Redux, Pinia, Zustand, None]
16
+ - Routing: [e.g. React Router, Vue Router, Next Router]
17
+ - HTTP Client: [e.g. Axios, Fetch, SWR]
18
+ - Build Tool: [e.g. Vite, Webpack, esbuild]
19
+ - Testing: [e.g. Jest, Vitest, Playwright]
20
+ - Styling: [e.g. Tailwind, CSS Modules, Styled Components]
21
+
22
+ ---
23
+
24
+ ## Core Documentation
25
+
26
+ Review these before making architectural or styling decisions:
27
+
28
+ | Document | Purpose | Location |
29
+ |----------|---------|----------|
30
+ | OpenCode README | Kit overview and flow | `.opencode/README.md` |
31
+ | OpenCode Architecture | Agent lifecycle and gates | `.opencode/ARCHITECTURE.md` |
32
+ | Agent prompts | Role-specific behavior | `.opencode/agents/*.md` |
33
+ | Commands | Custom slash commands | `.opencode/commands/*.md` |
34
+ | Rules | Shared coding standards | `.opencode/rules/*.md` |
35
+
36
+ ---
37
+
38
+ ## OpenCode Delivery Model
39
+
40
+ - Primary agent: `@feature-lead`
41
+ - First call: `@context-gatherer` maps the current project state before planning or proof.
42
+ - Other agents are subagents and are called with `@` awareness.
43
+ - Security-sensitive work: `@security-auditor` first, then `@penetration-tester` for redteam validation when needed.
44
+ - Compact context bundle:
45
+ - `proposal.md`: why, value, scope
46
+ - `goal.md`: target outcome, constraints, default choice
47
+ - `spec.md`: contract, data flow, edge cases, risks
48
+ - `task.md`: ordered checklist, dependencies, owners
49
+ - `important.md`: facts, blockers, links, decisions
50
+ - Archive completed bundles in `.opencode/archive/<feature-slug>/`.
51
+ - Default first: choose a safe default when the downside is small.
52
+ - Ask only when scope, security, or architecture changes materially.
53
+ - Keep handoffs compact and explicit.
54
+
55
+ ## Skill Design
56
+
57
+ - Keep each skill small, philosophy-first, and single-purpose.
58
+ - Put the trigger in the description field so agents can load it by intent.
59
+ - Prefer the smallest skill that answers the next decision.
60
+
61
+ ---
62
+
63
+ ## Code Conventions
64
+
65
+ ### File Naming
66
+
67
+ | Type | Pattern | Example |
68
+ |------|---------|---------|
69
+ | Components | `PascalCase.tsx` | `UserCard.tsx` |
70
+ | Pages | `PascalCasePage.tsx` | `LoginPage.tsx` |
71
+ | Stores | `camelCase.store.ts` | `auth.store.ts` |
72
+ | Hooks/Composables | `useCamelCase.ts` | `useAuth.ts` |
73
+ | Types | `camelCase.types.ts` | `user.types.ts` |
74
+ | Utils | `camelCase.utils.ts` | `date.utils.ts` |
75
+ | API | `camelCase.api.ts` | `auth.api.ts` |
76
+ | Tests | `*.test.ts` or `*.spec.ts` | `auth.test.ts` |
77
+
78
+ ### Code Style
79
+
80
+ - Indentation: [2 spaces / 4 spaces / tabs]
81
+ - Quotes: [single / double]
82
+ - Semicolons: [required / none]
83
+ - Line Width: [80 / 100 / 120]
84
+ - Trailing Commas: [always / none / es5]
85
+
86
+ ---
87
+
88
+ ## Project-Specific Rules
89
+
90
+ <!-- ADD YOUR CUSTOM RULES HERE -->
91
+
92
+ - [Add the defaults, tradeoffs, and exceptions for this project]
93
+ - [Call out anything the agents should never do]
94
+
95
+ ---
96
+
97
+ ## Architecture Patterns
98
+
99
+ ### State Management
100
+
101
+ <!-- CUSTOMIZE FOR YOUR STATE SOLUTION -->
102
+
103
+ - [Describe your store pattern]
104
+ - [Describe where state lives]
105
+ - [Describe how async work is handled]
106
+
107
+ ### API Layer
108
+
109
+ - [Describe request and response patterns]
110
+ - [Describe how errors are normalized]
111
+ - [Describe versioning or contract rules]
112
+
113
+ ### Component Structure
114
+
115
+ - [Describe component conventions]
116
+ - [Describe where logic belongs]
117
+ - [Describe how loading and error states appear]
118
+
119
+ ---
120
+
121
+ ## Testing Standards
122
+
123
+ - Unit tests: [what to test]
124
+ - Integration tests: [what to test]
125
+ - E2E tests: [critical flows]
126
+ - Quality gate: [coverage or manual verification target]
127
+
128
+ ---
129
+
130
+ ## Quick Reference
131
+
132
+ - Validate templates: `node bin/validate-templates.js`
133
+ - Sync templates: `node bin/sync-templates.js`
134
+ - Entry point: `@feature-lead`
135
+
136
+ ### Test Coverage
137
+
138
+ - **Minimum:** 70% coverage
139
+ - **Target:** 80% coverage
140
+ - **Critical paths:** 100% coverage (auth, payments, etc.)
141
+
142
+ ---
143
+
144
+ ## Git Workflow
145
+
146
+ ### Commit Messages
147
+
148
+ ```
149
+ <type>(<scope>): <subject>
150
+
151
+ <body>
152
+
153
+ <footer>
154
+ ```
155
+
156
+ **Types:**
157
+ - `feat`: New feature
158
+ - `fix`: Bug fix
159
+ - `refactor`: Code refactor
160
+ - `docs`: Documentation
161
+ - `test`: Tests
162
+ - `chore`: Maintenance
163
+
164
+ **Example:**
165
+ ```
166
+ feat(auth): add JWT refresh token support
167
+
168
+ - Implement refresh token rotation
169
+ - Add automatic token refresh on 401
170
+ - Store tokens in httpOnly cookies
171
+
172
+ Closes #123
173
+ ```
174
+
175
+ ### Branch Naming
176
+
177
+ ```
178
+ <type>/<ticket>-<short-description>
179
+
180
+ Examples:
181
+ - feature/AUTH-123-jwt-refresh
182
+ - fix/PAY-456-payment-timeout
183
+ - refactor/CORE-789-state-management
184
+ ```
185
+
186
+ ---
187
+
188
+ ## Performance Guidelines
189
+
190
+ ### Do's
191
+
192
+ - Lazy load components and routes
193
+ - Memoize expensive computations
194
+ - Paginate large lists
195
+ - Use virtual scrolling for long lists
196
+ - Optimize images and assets
197
+ - Cache API responses when appropriate
198
+
199
+ ### Don'ts
200
+
201
+ - Render all items in large lists
202
+ - Call expensive functions in render
203
+ - Watch large objects unnecessarily
204
+ - Block the main thread
205
+ - Make unnecessary API calls
206
+ - Ignore bundle size warnings
207
+
208
+ ---
209
+
210
+ ## Security Guidelines
211
+
212
+ ### Authentication & Authorization
213
+
214
+ - Never store sensitive data in localStorage
215
+ - Use httpOnly cookies for tokens
216
+ - Implement CSRF protection
217
+ - Validate all user input
218
+ - Sanitize data before rendering
219
+ - Use parameterized queries
220
+
221
+ ### Data Validation
222
+
223
+ ```typescript
224
+ // ✅ Validate at boundaries
225
+ import { z } from 'zod';
226
+
227
+ const UserSchema = z.object({
228
+ email: z.string().email(),
229
+ name: z.string().min(2).max(100),
230
+ age: z.number().min(0).max(150).optional(),
231
+ });
232
+
233
+ function createUser(data: unknown): User {
234
+ return UserSchema.parse(data); // Throws on invalid
235
+ }
236
+ ```
237
+
238
+ ---
239
+
240
+ ## Accessibility (a11y)
241
+
242
+ - Use semantic HTML
243
+ - Provide alt text for images
244
+ - Ensure keyboard navigation
245
+ - Maintain color contrast ratios
246
+ - Use ARIA labels when needed
247
+ - Test with screen readers
248
+
249
+ ---
250
+
251
+ ## Key Reminders
252
+
253
+ <!-- ADD PROJECT-SPECIFIC REMINDERS -->
254
+
255
+ 1. **[Reminder 1]** - Description
256
+ 2. **[Reminder 2]** - Description
257
+ 3. **[Reminder 3]** - Description
258
+
259
+ ---
260
+
261
+ ## Quick Reference
262
+
263
+ ### Commands
264
+
265
+ ```bash
266
+ # Development
267
+ npm run dev # Start dev server
268
+ npm run build # Production build
269
+ npm run test # Run tests
270
+ npm run lint # Lint check
271
+ npm run format # Format code
272
+ npm run type-check # TypeScript check
273
+ ```
274
+
275
+ ### Important Files
276
+
277
+ ```
278
+ src/
279
+ ├── components/ # Reusable components
280
+ ├── pages/ # Page components
281
+ ├── stores/ # State management
282
+ ├── api/ # API calls
283
+ ├── types/ # TypeScript types
284
+ ├── utils/ # Utility functions
285
+ └── hooks/ # Custom hooks/composables
286
+ ```
287
+
288
+ ---
289
+
290
+ ## Questions?
291
+
292
+ When in doubt:
293
+ 1. Check existing code for patterns
294
+ 2. Read the relevant docs
295
+ 3. Ask the team lead
296
+ 4. Follow the principle of least surprise
297
+
298
+ ---
299
+
300
+ **Keep this file updated as the project evolves.**