telo3-ai 5.0.7 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -791
- package/SKILL.md +36 -657
- package/bootstrap/TELO3.md +17 -0
- package/cli.js +223 -42
- package/hooks/inject-contract.mjs +23 -0
- package/hooks/session-start.example.json +15 -0
- package/index.js +48 -14
- package/package.json +32 -69
- package/references/accessibility-quality.md +92 -272
- package/references/ai-behavior.md +70 -332
- package/references/anti-slop.md +71 -0
- package/references/document-specification.md +110 -419
- package/references/legal-compliance.md +90 -395
- package/references/performance-quality.md +100 -351
- package/references/privacy-compliance.md +88 -464
- package/references/project-audit.md +79 -440
- package/references/security-quality.md +68 -220
- package/references/seo-quality.md +83 -339
- package/references/smart-skill-delegation.md +73 -419
- package/references/token-optimization.md +83 -450
- package/references/ui-quality.md +106 -481
- package/references/workflow.md +91 -447
- package/scripts/postinstall.mjs +27 -0
- package/src/activate.js +159 -0
- package/src/context.js +72 -0
- package/src/find-context.js +41 -0
- package/src/init.js +38 -0
- package/src/install.js +128 -0
- package/src/paths.js +20 -0
- package/src/status.js +30 -0
- package/src/tokens.js +10 -0
- package/src/validate.js +220 -0
- package/src/version.js +12 -0
- package/templates/architecture.md +17 -398
- package/templates/design.md +22 -631
- package/templates/memory.md +13 -351
- package/templates/prd.md +15 -295
- package/templates/rules.md +20 -600
- package/templates/tasks.md +10 -210
- package/AI-CONTEXT.md +0 -272
- package/ONBOARDING-SKILL.md +0 -738
- package/SKILL-METADATA.json +0 -237
- package/scripts/init-project-context.sh +0 -139
- package/scripts/validate-project-context.sh +0 -164
- package/skills/telo3/SKILL.md +0 -315
- package/skills/telo3-context/SKILL.md +0 -272
- package/skills/telo3-onboarding/SKILL.md +0 -738
|
@@ -1,351 +1,100 @@
|
|
|
1
|
-
# Performance Quality
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
- [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
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.
|
|
1
|
+
# Performance Quality
|
|
2
|
+
**Load when:** any page/app speed work, Core Web Vitals issues, image/font/JS optimization, or performance review.
|
|
3
|
+
|
|
4
|
+
Measure first: profile before optimizing; never micro-optimize unmeasured code. Optimize where it matters most to users, then re-measure. Performance is a feature, not an afterthought.
|
|
5
|
+
|
|
6
|
+
## Core Web Vitals targets
|
|
7
|
+
| Metric | Measures | Good | Needs improvement | Poor |
|
|
8
|
+
|---|---|---|---|---|
|
|
9
|
+
| LCP (Largest Contentful Paint) | Loading | < 2.5s | 2.5-4s | > 4s |
|
|
10
|
+
| INP (Interaction to Next Paint; replaces FID) | Responsiveness | < 200ms | 200-500ms | > 500ms |
|
|
11
|
+
| CLS (Cumulative Layout Shift) | Visual stability | < 0.1 | 0.1-0.25 | > 0.25 |
|
|
12
|
+
|
|
13
|
+
### LCP fixes
|
|
14
|
+
- Optimize images (WebP/AVIF, proper sizing).
|
|
15
|
+
- Reduce server response time (TTFB).
|
|
16
|
+
- Remove render-blocking resources.
|
|
17
|
+
- Use CDN; implement caching.
|
|
18
|
+
- Preload critical resources.
|
|
19
|
+
|
|
20
|
+
### INP fixes
|
|
21
|
+
- Minimize JavaScript execution; break up long tasks.
|
|
22
|
+
- Optimize event handlers; debounce/throttle frequent events.
|
|
23
|
+
- Web workers for heavy computation.
|
|
24
|
+
- Code-split large bundles.
|
|
25
|
+
|
|
26
|
+
### CLS fixes
|
|
27
|
+
- Set image dimensions; set dimensions for ads/embeds.
|
|
28
|
+
- Never insert content above existing content.
|
|
29
|
+
- CSS transforms for animations; preload fonts.
|
|
30
|
+
- Reserve space for dynamic content.
|
|
31
|
+
|
|
32
|
+
## Images
|
|
33
|
+
- Compress all images; correct sizing — no giant images scaled down.
|
|
34
|
+
- AVIF: best compression (~85%+ support; use with fallback).
|
|
35
|
+
- WebP: good balance (~95%+ support).
|
|
36
|
+
- JPEG fallback for photos; PNG fallback for transparency; SVG for icons/logos.
|
|
37
|
+
- Responsive images: `srcset` + `sizes` (e.g. 320w/640w/1280w variants).
|
|
38
|
+
- Set width/height attributes (prevents CLS).
|
|
39
|
+
- `loading="lazy"` below the fold; preload critical/above-fold images.
|
|
40
|
+
- Next.js: `next/image` with width/height, `loading="lazy"` (eager above fold), `placeholder="blur"` + blurDataURL.
|
|
41
|
+
|
|
42
|
+
## JavaScript
|
|
43
|
+
- Minimize bundle size; remove unused code; tree shaking enabled.
|
|
44
|
+
- Code splitting: React.lazy + dynamic `import()` for components.
|
|
45
|
+
- Lazy-import heavy libraries on interaction (e.g. inside a click handler).
|
|
46
|
+
- Next.js code-splits per route automatically.
|
|
47
|
+
- Minimize third-party scripts; async/defer where appropriate; no render-blocking JS.
|
|
48
|
+
- Lazy components: React.lazy + Suspense fallback; IntersectionObserver for custom lazy loading.
|
|
49
|
+
|
|
50
|
+
## CSS
|
|
51
|
+
- Inline critical CSS; remove unused CSS; minify.
|
|
52
|
+
- Eliminate or minimize render-blocking stylesheets.
|
|
53
|
+
|
|
54
|
+
## Fonts
|
|
55
|
+
- System fonts fastest: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif`.
|
|
56
|
+
- Self-host optimized woff2 via `@font-face`; `font-display: swap`.
|
|
57
|
+
- Preload fonts; subset when applicable.
|
|
58
|
+
- Next.js: `next/font` (e.g. `Inter({ subsets: ['latin'], display: 'swap' })`).
|
|
59
|
+
|
|
60
|
+
## Caching
|
|
61
|
+
- Long cache lifetimes for static assets; set Cache-Control headers.
|
|
62
|
+
- Service worker if applicable; CDN for static assets.
|
|
63
|
+
|
|
64
|
+
## Server
|
|
65
|
+
- TTFB < 200ms; HTTP/2 or HTTP/3 enabled.
|
|
66
|
+
- gzip/brotli compression enabled.
|
|
67
|
+
- Optimize database queries; cache API responses where appropriate.
|
|
68
|
+
|
|
69
|
+
## Rendering & Third Parties
|
|
70
|
+
- SSR or static generation for public content.
|
|
71
|
+
- Avoid layout shifts; minimize reflows/repaints.
|
|
72
|
+
- CSS transforms for animations (GPU-accelerated).
|
|
73
|
+
- Minimize third-party scripts; load async; consider self-hosting.
|
|
74
|
+
- Facade technique for embeds (YouTube, etc.): lightweight placeholder until interaction.
|
|
75
|
+
|
|
76
|
+
## Performance Budget (example limits — set and enforce to prevent regression)
|
|
77
|
+
| Resource / metric | Budget |
|
|
78
|
+
|---|---|
|
|
79
|
+
| Script | 300 KB |
|
|
80
|
+
| Image | 500 KB |
|
|
81
|
+
| Total | 1000 KB |
|
|
82
|
+
| Time to interactive | 3000 ms |
|
|
83
|
+
| First contentful paint | 1500 ms |
|
|
84
|
+
|
|
85
|
+
## Measure & Monitor
|
|
86
|
+
- Tools: Lighthouse (Chrome DevTools), PageSpeed Insights, WebPageTest.
|
|
87
|
+
- Chrome DevTools Performance tab for profiling; Real User Monitoring (RUM) for actual user data.
|
|
88
|
+
- Track: LCP, INP, CLS, TTFB, FCP, Total Blocking Time (TBT), bundle size, page load time.
|
|
89
|
+
- Re-measure on every deploy.
|
|
90
|
+
|
|
91
|
+
## Common Mistakes
|
|
92
|
+
- Unoptimized images; no lazy loading; missing image dimensions (CLS).
|
|
93
|
+
- Large JavaScript bundles; no code splitting; render-blocking resources.
|
|
94
|
+
- Too many third-party scripts; synchronous loading of everything.
|
|
95
|
+
- No caching strategy; unminified assets.
|
|
96
|
+
|
|
97
|
+
## Record in project docs
|
|
98
|
+
- Current LCP/INP/CLS scores and status; optimization status (images, splitting, lazy loading, caching, fonts).
|
|
99
|
+
- JS/CSS bundle sizes vs budget; budget defined/enforced.
|
|
100
|
+
- Monitoring tool and frequency; known issues; next steps.
|