telo3-ai 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AI-CONTEXT.md +263 -0
- package/LICENSE +21 -0
- package/ONBOARDING-SKILL.md +728 -0
- package/README.md +801 -0
- package/SKILL-METADATA.json +237 -0
- package/SKILL.md +666 -0
- package/cli.js +84 -0
- package/index.js +65 -0
- package/package.json +97 -0
- package/references/accessibility-quality.md +278 -0
- package/references/ai-behavior.md +363 -0
- package/references/document-specification.md +425 -0
- package/references/legal-compliance.md +408 -0
- package/references/performance-quality.md +351 -0
- package/references/privacy-compliance.md +494 -0
- package/references/project-audit.md +468 -0
- package/references/security-quality.md +254 -0
- package/references/seo-quality.md +347 -0
- package/references/smart-skill-delegation.md +451 -0
- package/references/token-optimization.md +481 -0
- package/references/ui-quality.md +491 -0
- package/references/workflow.md +474 -0
- package/scripts/init-project-context.sh +139 -0
- package/scripts/validate-project-context.sh +164 -0
- package/templates/architecture.md +418 -0
- package/templates/design.md +654 -0
- package/templates/memory.md +368 -0
- package/templates/prd.md +320 -0
- package/templates/rules.md +619 -0
- package/templates/tasks.md +220 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
# Performance Quality Standards
|
|
2
|
+
|
|
3
|
+
> Performance optimization framework focusing on Core Web Vitals and user experience.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Core Web Vitals
|
|
8
|
+
|
|
9
|
+
### 1. LCP (Largest Contentful Paint)
|
|
10
|
+
**Measures:** Loading performance
|
|
11
|
+
**Target:** < 2.5 seconds
|
|
12
|
+
**Good:** < 2.5s | **Needs Improvement:** 2.5-4s | **Poor:** > 4s
|
|
13
|
+
|
|
14
|
+
**How to improve:**
|
|
15
|
+
- Optimize images (WebP/AVIF, proper sizing)
|
|
16
|
+
- Reduce server response time (TTFB)
|
|
17
|
+
- Remove render-blocking resources
|
|
18
|
+
- Use CDN
|
|
19
|
+
- Implement caching
|
|
20
|
+
- Preload critical resources
|
|
21
|
+
|
|
22
|
+
### 2. INP (Interaction to Next Paint)
|
|
23
|
+
**Replaces:** FID (First Input Delay)
|
|
24
|
+
**Measures:** Responsiveness
|
|
25
|
+
**Target:** < 200ms
|
|
26
|
+
**Good:** < 200ms | **Needs Improvement:** 200-500ms | **Poor:** > 500ms
|
|
27
|
+
|
|
28
|
+
**How to improve:**
|
|
29
|
+
- Minimize JavaScript execution
|
|
30
|
+
- Break up long tasks
|
|
31
|
+
- Optimize event handlers
|
|
32
|
+
- Use web workers for heavy computation
|
|
33
|
+
- Debounce/throttle frequent events
|
|
34
|
+
- Code split large bundles
|
|
35
|
+
|
|
36
|
+
### 3. CLS (Cumulative Layout Shift)
|
|
37
|
+
**Measures:** Visual stability
|
|
38
|
+
**Target:** < 0.1
|
|
39
|
+
**Good:** < 0.1 | **Needs Improvement:** 0.1-0.25 | **Poor:** > 0.25
|
|
40
|
+
|
|
41
|
+
**How to improve:**
|
|
42
|
+
- Set image dimensions (width/height)
|
|
43
|
+
- Set dimensions for ads/embeds
|
|
44
|
+
- Avoid inserting content above existing content
|
|
45
|
+
- Use CSS transforms for animations
|
|
46
|
+
- Preload fonts
|
|
47
|
+
- Reserve space for dynamic content
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Performance Audit Checklist
|
|
52
|
+
|
|
53
|
+
### Images
|
|
54
|
+
- [ ] Images optimized (compressed)
|
|
55
|
+
- [ ] Modern formats (WebP, AVIF with fallbacks)
|
|
56
|
+
- [ ] Appropriate sizing (no giant images scaled down)
|
|
57
|
+
- [ ] Lazy loading for below-the-fold images
|
|
58
|
+
- [ ] Responsive images (`srcset`, `sizes`)
|
|
59
|
+
- [ ] Image dimensions set (prevent CLS)
|
|
60
|
+
- [ ] Critical images preloaded
|
|
61
|
+
|
|
62
|
+
### JavaScript
|
|
63
|
+
- [ ] Minimize JavaScript bundle size
|
|
64
|
+
- [ ] Code splitting implemented
|
|
65
|
+
- [ ] Tree shaking enabled
|
|
66
|
+
- [ ] Unused code removed
|
|
67
|
+
- [ ] Third-party scripts minimized
|
|
68
|
+
- [ ] Scripts loaded async/defer where appropriate
|
|
69
|
+
- [ ] No render-blocking JavaScript
|
|
70
|
+
|
|
71
|
+
### CSS
|
|
72
|
+
- [ ] Critical CSS inlined
|
|
73
|
+
- [ ] Unused CSS removed
|
|
74
|
+
- [ ] CSS minified
|
|
75
|
+
- [ ] No render-blocking stylesheets (or minimal)
|
|
76
|
+
|
|
77
|
+
### Fonts
|
|
78
|
+
- [ ] Font files optimized (woff2)
|
|
79
|
+
- [ ] Fonts preloaded
|
|
80
|
+
- [ ] `font-display: swap` used
|
|
81
|
+
- [ ] System fonts considered (fastest)
|
|
82
|
+
- [ ] Subsetting used if applicable
|
|
83
|
+
|
|
84
|
+
### Caching
|
|
85
|
+
- [ ] Static assets cached (long cache lifetime)
|
|
86
|
+
- [ ] Cache-Control headers set
|
|
87
|
+
- [ ] Service worker implemented (if applicable)
|
|
88
|
+
- [ ] CDN used for static assets
|
|
89
|
+
|
|
90
|
+
### Server
|
|
91
|
+
- [ ] Fast server response time (TTFB < 200ms)
|
|
92
|
+
- [ ] HTTP/2 or HTTP/3 enabled
|
|
93
|
+
- [ ] Compression enabled (gzip/brotli)
|
|
94
|
+
- [ ] Database queries optimized
|
|
95
|
+
- [ ] API responses cached where appropriate
|
|
96
|
+
|
|
97
|
+
### Rendering
|
|
98
|
+
- [ ] Server-side rendering or static generation (for public content)
|
|
99
|
+
- [ ] Avoid layout shifts
|
|
100
|
+
- [ ] Minimize reflows/repaints
|
|
101
|
+
- [ ] Use CSS transforms for animations (GPU-accelerated)
|
|
102
|
+
|
|
103
|
+
### Third-Party Resources
|
|
104
|
+
- [ ] Minimize third-party scripts
|
|
105
|
+
- [ ] Load third-party scripts async
|
|
106
|
+
- [ ] Consider self-hosting third-party resources
|
|
107
|
+
- [ ] Use facade technique for embeds (YouTube, etc.)
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Image Optimization
|
|
112
|
+
|
|
113
|
+
### Format Selection
|
|
114
|
+
- **WebP:** Good balance (support: 95%+)
|
|
115
|
+
- **AVIF:** Best compression (support: 85%+, use with fallback)
|
|
116
|
+
- **JPEG:** Fallback for photos
|
|
117
|
+
- **PNG:** Fallback for graphics with transparency
|
|
118
|
+
- **SVG:** Vector graphics (icons, logos)
|
|
119
|
+
|
|
120
|
+
### Responsive Images
|
|
121
|
+
|
|
122
|
+
```html
|
|
123
|
+
<img
|
|
124
|
+
src="/image.jpg"
|
|
125
|
+
srcset="
|
|
126
|
+
/image-320w.jpg 320w,
|
|
127
|
+
/image-640w.jpg 640w,
|
|
128
|
+
/image-1280w.jpg 1280w
|
|
129
|
+
"
|
|
130
|
+
sizes="(max-width: 640px) 100vw, 640px"
|
|
131
|
+
alt="Description"
|
|
132
|
+
width="640"
|
|
133
|
+
height="480"
|
|
134
|
+
loading="lazy"
|
|
135
|
+
/>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Next.js Image Optimization
|
|
139
|
+
|
|
140
|
+
```jsx
|
|
141
|
+
import Image from 'next/image';
|
|
142
|
+
|
|
143
|
+
<Image
|
|
144
|
+
src="/image.jpg"
|
|
145
|
+
alt="Description"
|
|
146
|
+
width={640}
|
|
147
|
+
height={480}
|
|
148
|
+
loading="lazy" // or "eager" for above-fold
|
|
149
|
+
placeholder="blur"
|
|
150
|
+
blurDataURL="..."
|
|
151
|
+
/>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Code Splitting
|
|
157
|
+
|
|
158
|
+
### Dynamic Imports
|
|
159
|
+
|
|
160
|
+
```javascript
|
|
161
|
+
// Lazy load component
|
|
162
|
+
const HeavyComponent = lazy(() => import('./HeavyComponent'));
|
|
163
|
+
|
|
164
|
+
// Lazy load library
|
|
165
|
+
button.addEventListener('click', async () => {
|
|
166
|
+
const {default: library} = await import('heavy-library');
|
|
167
|
+
library.doSomething();
|
|
168
|
+
});
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Route-Based Splitting
|
|
172
|
+
Next.js automatically code-splits by page.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Font Loading Strategy
|
|
177
|
+
|
|
178
|
+
### Option 1: System Fonts (Fastest)
|
|
179
|
+
```css
|
|
180
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Option 2: Self-Hosted Fonts
|
|
184
|
+
```css
|
|
185
|
+
@font-face {
|
|
186
|
+
font-family: 'Inter';
|
|
187
|
+
src: url('/fonts/inter.woff2') format('woff2');
|
|
188
|
+
font-display: swap;
|
|
189
|
+
font-weight: 400;
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Option 3: next/font (Next.js)
|
|
194
|
+
```javascript
|
|
195
|
+
import { Inter } from 'next/font/google';
|
|
196
|
+
|
|
197
|
+
const inter = Inter({ subsets: ['latin'], display: 'swap' });
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Lazy Loading
|
|
203
|
+
|
|
204
|
+
### Images
|
|
205
|
+
```html
|
|
206
|
+
<img src="image.jpg" alt="Description" loading="lazy">
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Components (React)
|
|
210
|
+
```javascript
|
|
211
|
+
const LazyComponent = React.lazy(() => import('./Component'));
|
|
212
|
+
|
|
213
|
+
<Suspense fallback={<LoadingSpinner />}>
|
|
214
|
+
<LazyComponent />
|
|
215
|
+
</Suspense>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Intersection Observer (Custom)
|
|
219
|
+
```javascript
|
|
220
|
+
const observer = new IntersectionObserver((entries) => {
|
|
221
|
+
entries.forEach(entry => {
|
|
222
|
+
if (entry.isIntersecting) {
|
|
223
|
+
// Load resource
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
observer.observe(element);
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Measuring Performance
|
|
234
|
+
|
|
235
|
+
### Tools
|
|
236
|
+
- **Lighthouse** (Chrome DevTools) — Comprehensive audit
|
|
237
|
+
- **PageSpeed Insights** — Google's tool
|
|
238
|
+
- **WebPageTest** — Detailed analysis
|
|
239
|
+
- **Chrome DevTools Performance tab** — Profiling
|
|
240
|
+
- **Real User Monitoring (RUM)** — Actual user data
|
|
241
|
+
|
|
242
|
+
### Metrics to Track
|
|
243
|
+
- Largest Contentful Paint (LCP)
|
|
244
|
+
- Interaction to Next Paint (INP)
|
|
245
|
+
- Cumulative Layout Shift (CLS)
|
|
246
|
+
- Time to First Byte (TTFB)
|
|
247
|
+
- First Contentful Paint (FCP)
|
|
248
|
+
- Total Blocking Time (TBT)
|
|
249
|
+
- Bundle size
|
|
250
|
+
- Page load time
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Performance Budget
|
|
255
|
+
|
|
256
|
+
Set limits to prevent regression:
|
|
257
|
+
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"budgets": [
|
|
261
|
+
{
|
|
262
|
+
"resourceSizes": [
|
|
263
|
+
{"resourceType": "script", "budget": 300},
|
|
264
|
+
{"resourceType": "image", "budget": 500},
|
|
265
|
+
{"resourceType": "total", "budget": 1000}
|
|
266
|
+
],
|
|
267
|
+
"timings": [
|
|
268
|
+
{"metric": "interactive", "budget": 3000},
|
|
269
|
+
{"metric": "first-contentful-paint", "budget": 1500}
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Common Performance Mistakes
|
|
279
|
+
|
|
280
|
+
❌ Unoptimized images
|
|
281
|
+
❌ No lazy loading
|
|
282
|
+
❌ Large JavaScript bundles
|
|
283
|
+
❌ Render-blocking resources
|
|
284
|
+
❌ Missing image dimensions (CLS)
|
|
285
|
+
❌ Too many third-party scripts
|
|
286
|
+
❌ No caching strategy
|
|
287
|
+
❌ Unminified assets
|
|
288
|
+
❌ Synchronous loading of everything
|
|
289
|
+
❌ No code splitting
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Performance Documentation Template
|
|
294
|
+
|
|
295
|
+
```markdown
|
|
296
|
+
## Performance
|
|
297
|
+
|
|
298
|
+
### Core Web Vitals
|
|
299
|
+
- **LCP:** [Current score]
|
|
300
|
+
- **INP:** [Current score]
|
|
301
|
+
- **CLS:** [Current score]
|
|
302
|
+
- **Status:** [Good / Needs improvement]
|
|
303
|
+
|
|
304
|
+
### Optimization Status
|
|
305
|
+
- **Images:** [Optimized (WebP/AVIF) / Needs work]
|
|
306
|
+
- **Code splitting:** [Implemented / Not implemented]
|
|
307
|
+
- **Lazy loading:** [Implemented / Partial]
|
|
308
|
+
- **Caching:** [Configured / Needs configuration]
|
|
309
|
+
- **Fonts:** [Optimized / Using system fonts]
|
|
310
|
+
|
|
311
|
+
### Bundle Size
|
|
312
|
+
- **Total JavaScript:** [Size] KB
|
|
313
|
+
- **Total CSS:** [Size] KB
|
|
314
|
+
- **Budget:** [Target sizes]
|
|
315
|
+
|
|
316
|
+
### Performance Budget
|
|
317
|
+
- **Defined:** [Yes/No]
|
|
318
|
+
- **Enforced:** [Yes/No]
|
|
319
|
+
|
|
320
|
+
### Monitoring
|
|
321
|
+
- **Tool:** [e.g., Lighthouse, Web Vitals, RUM]
|
|
322
|
+
- **Frequency:** [e.g., On every deploy]
|
|
323
|
+
|
|
324
|
+
### Known Issues
|
|
325
|
+
- [List performance issues or "None known"]
|
|
326
|
+
|
|
327
|
+
### Next Steps
|
|
328
|
+
- [ ] [Performance task 1]
|
|
329
|
+
- [ ] [Performance task 2]
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## Quick Wins
|
|
335
|
+
|
|
336
|
+
1. Optimize images (WebP + lazy load)
|
|
337
|
+
2. Add image dimensions (prevent CLS)
|
|
338
|
+
3. Remove unused JavaScript/CSS
|
|
339
|
+
4. Enable compression (gzip/brotli)
|
|
340
|
+
5. Use CDN for static assets
|
|
341
|
+
6. Preload critical resources
|
|
342
|
+
7. Lazy load below-the-fold content
|
|
343
|
+
8. Minimize third-party scripts
|
|
344
|
+
9. Use `font-display: swap`
|
|
345
|
+
10. Set performance budget
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
**Summary:** Performance is a feature, not an afterthought. Focus on Core Web Vitals. Optimize images, minimize JavaScript, prevent layout shifts, and measure continuously.
|
|
350
|
+
|
|
351
|
+
**Remember:** Don't optimize prematurely—measure first, then optimize where it matters most to users.
|