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.
Files changed (47) hide show
  1. package/README.md +32 -791
  2. package/SKILL.md +36 -657
  3. package/bootstrap/TELO3.md +17 -0
  4. package/cli.js +223 -42
  5. package/hooks/inject-contract.mjs +23 -0
  6. package/hooks/session-start.example.json +15 -0
  7. package/index.js +48 -14
  8. package/package.json +32 -69
  9. package/references/accessibility-quality.md +92 -272
  10. package/references/ai-behavior.md +70 -332
  11. package/references/anti-slop.md +71 -0
  12. package/references/document-specification.md +110 -419
  13. package/references/legal-compliance.md +90 -395
  14. package/references/performance-quality.md +100 -351
  15. package/references/privacy-compliance.md +88 -464
  16. package/references/project-audit.md +79 -440
  17. package/references/security-quality.md +68 -220
  18. package/references/seo-quality.md +83 -339
  19. package/references/smart-skill-delegation.md +73 -419
  20. package/references/token-optimization.md +83 -450
  21. package/references/ui-quality.md +106 -481
  22. package/references/workflow.md +91 -447
  23. package/scripts/postinstall.mjs +27 -0
  24. package/src/activate.js +159 -0
  25. package/src/context.js +72 -0
  26. package/src/find-context.js +41 -0
  27. package/src/init.js +38 -0
  28. package/src/install.js +128 -0
  29. package/src/paths.js +20 -0
  30. package/src/status.js +30 -0
  31. package/src/tokens.js +10 -0
  32. package/src/validate.js +220 -0
  33. package/src/version.js +12 -0
  34. package/templates/architecture.md +17 -398
  35. package/templates/design.md +22 -631
  36. package/templates/memory.md +13 -351
  37. package/templates/prd.md +15 -295
  38. package/templates/rules.md +20 -600
  39. package/templates/tasks.md +10 -210
  40. package/AI-CONTEXT.md +0 -272
  41. package/ONBOARDING-SKILL.md +0 -738
  42. package/SKILL-METADATA.json +0 -237
  43. package/scripts/init-project-context.sh +0 -139
  44. package/scripts/validate-project-context.sh +0 -164
  45. package/skills/telo3/SKILL.md +0 -315
  46. package/skills/telo3-context/SKILL.md +0 -272
  47. package/skills/telo3-onboarding/SKILL.md +0 -738
@@ -1,451 +1,105 @@
1
- # Smart Skill & MCP Delegation
1
+ # Smart Skill and MCP Delegation
2
+ **Load when:** about to implement a non-trivial capability (payments, auth, design-to-code, browser automation, docs lookup, audits) and deciding whether to delegate.
2
3
 
3
- > Intelligent use of other skills, MCP tools, and external capabilities.
4
+ Core rule: use the right tool for the job. Inspect what actually exists in the CURRENT environment; never assume a tool is available.
4
5
 
5
- ---
6
+ ## Inspect Before Implementing
6
7
 
7
- ## Core Principle
8
+ Before building a non-trivial capability yourself, check what is actually available:
9
+ - Skills: the environment's skill list/directory.
10
+ - MCP tools: connected MCP servers and their tool lists.
11
+ - Subagents: available agent types and their capabilities.
12
+ - Plugins/extensions: installed capability packs.
8
13
 
9
- **Use the right tool for the job. Delegate when specialized skills exist.**
14
+ Ask: does a skill already cover this? Does an MCP tool handle it? Would a subagent do it better? Only then decide. Use real listings and tool metadata — there is no discovery API to call; inspect, then decide.
10
15
 
11
- ---
16
+ ## Delegate / Don't Delegate
12
17
 
13
- ## Skill Discovery & Usage
18
+ | Delegate when | Do it directly when |
19
+ |---|---|
20
+ | Specialized knowledge: SEO, accessibility, security, performance audits | Simple, straightforward task |
21
+ | Complex domain: legal, medical/health, financial calculations | Context already loaded; faster to do directly |
22
+ | Better tooling: design-to-code, API docs, database schemas | No relevant tool exists |
23
+ | Current library documentation needed | Setup cost exceeds implementation cost |
24
+ | Third-party integration (payments, auth, cloud) with a configured tool | Tiny change (a few minutes of work) |
14
25
 
15
- ### Before Implementing Yourself
26
+ Never rewrite functionality a tool already provides. Never force delegation for simple work.
16
27
 
17
- **Ask:**
18
- 1. Does a skill already exist for this?
19
- 2. Is there an MCP tool that handles this?
20
- 3. Would another AI agent do this better?
28
+ ## Typical Tool Fits (only if present)
21
29
 
22
- **Check:**
23
- - Your AI's skills directory
24
- - Available MCP servers
25
- - Your AI's plugin/extension system
26
- - Sub-agent capabilities
30
+ | Need | Tool category (example) |
31
+ |---|---|
32
+ | Current library docs | Documentation MCP (e.g., context7) |
33
+ | Design implementation | Design integration (e.g., Figma MCP/skill) |
34
+ | Payments | Payments MCP (e.g., Stripe) |
35
+ | Authentication | Auth integration skill/MCP (e.g., provider tooling) |
36
+ | Cloud patterns | Cloud knowledge MCP (e.g., AWS) |
37
+ | Browser automation | Browser MCP (e.g., Playwright) |
38
+ | Pre-built SaaS patterns | SaaS builder skill, if installed |
27
39
 
28
- ---
40
+ Examples are illustrative — confirm availability first; fall back to manual work or web search when absent. Prefer current tool-fetched documentation over stale training data.
29
41
 
30
- ## When to Use Other Skills
42
+ ## Subagent Delegation (if the environment provides them)
31
43
 
32
- ### Use Existing Skills When:
44
+ | Agent type | Use for | Skip for |
45
+ |---|---|---|
46
+ | Context gatherer | New codebase; feature spanning many files; cross-module bug investigation; architecture understanding | Single-file changes; code you already know; quick fixes |
47
+ | Task executor | Independent subtask parallel to main work; well-defined isolated tasks | Tightly coupled work needing shared state |
48
+ | Platform documentation | AI-specific features; configuration questions; platform docs | General programming; project-specific code issues |
33
49
 
34
- ✅ **Specialized knowledge needed:**
35
- - SEO optimization → SEO skill
36
- - Accessibility audit → A11y skill
37
- - Security review → Security skill
38
- - Performance analysis → Performance skill
50
+ ## Delegation Scenarios
39
51
 
40
- ✅ **Complex domain:**
41
- - Legal compliance → Legal skill (if available)
42
- - Medical/health → Health skill (if available)
43
- - Financial calculations → Finance skill (if available)
52
+ | Request | Inspect → decide |
53
+ |---|---|
54
+ | "Implement this Figma design" | Design tool present → extract tokens/components via tool, then integrate + verify. Absent → manual from design.md. |
55
+ | "Next.js App Router with auth" | Docs MCP present → fetch current documentation, not stale training data. Absent → web search. |
56
+ | "Why is checkout failing?" | Investigation subagent present → delegate end-to-end trace, then fix root cause yourself. Absent → targeted file inspection. |
44
57
 
45
- ✅ **Better tooling:**
46
- - Design implementation → Figma skill
47
- - API documentation → OpenAPI skill
48
- - Database schema → Database skill
58
+ ## Integrate and Verify
49
59
 
50
- ### Don't Use Other Skills When:
51
- - Simple, straightforward tasks
52
- - Already have context loaded
53
- - Faster to do directly
54
- - No relevant skill exists
60
+ Delegation does not transfer accountability. After a tool/subagent returns:
61
+ 1. Review the output against requirements, rules.md, and design.md.
62
+ 2. Integrate it into the project yourself (imports, wiring, conventions).
63
+ 3. Run/verify the changed behavior; check regressions in related features.
64
+ 4. Update memory.md/tasks.md; record decisions.
55
65
 
56
- ---
66
+ ## Missing Capability
57
67
 
58
- ## MCP Server Usage
68
+ If the task needs an unavailable tool:
69
+ 1. State the capability the task needs.
70
+ 2. Recommend the specific server/skill; show minimal real configuration (e.g., an `mcpServers` entry in the client's MCP config with command/args).
71
+ 3. Note the reconnect/restart requirement.
72
+ 4. Let the user choose: configure and delegate, or proceed manually.
59
73
 
60
- ### Check Available MCP Servers
74
+ Don't install or configure anything without authorization.
61
75
 
62
- **Before starting complex tasks:**
63
- ```
64
- Available MCP servers:
65
- - context7: Library documentation lookup
66
- - figma: Design implementation
67
- - stripe: Payment integration
68
- - aws-knowledge: AWS best practices
69
- - playwright: Browser automation
70
- ```
71
-
72
- **Use MCP when:**
73
- - Need current documentation (context7)
74
- - Implementing from designs (figma)
75
- - Integrating third-party services (stripe, aws)
76
- - Need specialized tooling (playwright)
77
-
78
- ### Recommend MCP Configuration
79
-
80
- **If task needs unavailable MCP:**
81
- ```
82
- This task needs [X] capability.
83
-
84
- Recommend: Install [MCP-server-name]
85
-
86
- Setup:
87
- 1. Add to your AI's MCP configuration (e.g., mcp.json):
88
- {
89
- "mcpServers": {
90
- "server-name": {
91
- "command": "uvx",
92
- "args": ["package-name@latest"]
93
- }
94
- }
95
- }
96
-
97
- 2. Restart Kiro or reconnect MCP servers
98
-
99
- Then I can use [specific capability] to complete this efficiently.
100
- ```
101
-
102
- ---
103
-
104
- ## Kiro Powers Usage
105
-
106
- ### Check Powers Before Implementation
107
-
108
- **For common integrations:**
109
-
110
- | Task | Check Power | Why |
111
- |------|-------------|-----|
112
- | Design to code | figma power | Connect Figma → code |
113
- | API docs lookup | context7 power | Current library docs |
114
- | SaaS features | saas-builder power | Pre-built patterns |
115
- | Payment integration | (via saas-builder) | Stripe integration |
116
- | Cloud deployment | (via saas-builder) | AWS patterns |
117
-
118
- **Usage:**
119
- ```
120
- Task: Implement Stripe checkout
121
-
122
- Check: saas-builder power (includes Stripe MCP)
123
- Use: Built-in Stripe patterns + MCP tools
124
- Result: Faster, tested, secure implementation
125
- ```
126
-
127
- ---
128
-
129
- ## Sub-Agent Delegation
130
-
131
- ### Use context-gatherer When:
132
- - New to codebase (understand before changing)
133
- - Complex feature spanning many files
134
- - Investigating bugs across modules
135
- - Understanding architecture patterns
136
-
137
- **Don't use for:**
138
- - Simple single-file changes
139
- - Code you already understand
140
- - Quick fixes
141
-
142
- ### Use general-task-execution When:
143
- - Independent subtask while you work on main task
144
- - Parallel work streams
145
- - Well-defined isolated task
146
-
147
- ### Use documentation When:
148
- - User asks about AI-specific features
149
- - Questions about configuration
150
- - Platform-specific documentation needed
151
-
152
- **Never use for:**
153
- - General programming questions
154
- - Project-specific code issues
155
-
156
- ---
157
-
158
- ## Smart Delegation Examples
159
-
160
- ### Example 1: Design Implementation
161
-
162
- **Scenario:** "Implement this Figma design"
163
-
164
- **Smart approach:**
165
- ```
166
- Checking for figma power... Found.
167
-
168
- Using figma power:
169
- - Extract design tokens
170
- - Map components
171
- - Generate code with design system
172
-
173
- More accurate than manual implementation.
174
- ```
175
-
176
- **Dumb approach:**
177
- ```
178
- Let me manually inspect the Figma link and guess the colors...
179
- ```
180
-
181
- ### Example 2: Library Documentation
182
-
183
- **Scenario:** "How do I use Next.js App Router with authentication?"
184
-
185
- **Smart approach:**
186
- ```
187
- Using context7 MCP (via context7 power):
188
- - Query: "Next.js App Router authentication patterns"
189
- - Get current documentation
190
- - Implement with latest best practices
191
- ```
192
-
193
- **Dumb approach:**
194
- ```
195
- Based on my training data from 2023...
196
- ```
197
-
198
- ### Example 3: Complex Investigation
199
-
200
- **Scenario:** "Why is the checkout flow failing?"
201
-
202
- **Smart approach:**
203
- ```
204
- Delegating to context-gatherer:
205
- - Investigate checkout flow end-to-end
206
- - Trace data flow
207
- - Identify failure points
208
-
209
- Will implement fix after understanding root cause.
210
- ```
211
-
212
- **Dumb approach:**
213
- ```
214
- Let me read every file in the codebase...
215
- ```
216
-
217
- ---
218
-
219
- ## Skill Recommendation Framework
220
-
221
- ### When Task Starts
222
-
223
- **Mental checklist:**
224
- 1. Is this my core competency? (code, architecture, docs)
225
- 2. Or specialized domain? (design, payments, cloud, SEO)
226
- 3. Does skill/MCP exist for specialized domain?
227
- 4. Would it be faster/better to use that?
228
-
229
- ### Recommendation Template
230
-
231
- **If better tool exists:**
232
- ```
233
- Task: [X]
234
-
235
- Better approach: Use [skill/MCP/power]
236
-
237
- Reason: [Why it's better]
238
-
239
- Setup needed: [If any]
240
-
241
- Recommend proceeding with [tool] instead of manual implementation?
242
- ```
243
-
244
- ### User Decision Point
245
-
246
- **Let user choose:**
247
- - Proceed with specialized tool (better)
248
- - Proceed manually (faster if already set up)
249
-
250
- ---
251
-
252
- ## Configuration Recommendations
253
-
254
- ### Proactive Setup Suggestions
255
-
256
- **When you notice opportunity:**
257
- ```
258
- Note: This project could benefit from [X] MCP server.
259
-
260
- Use case: [Specific benefit]
261
-
262
- Setup:
263
- [Exact configuration]
264
-
265
- Worth configuring? Can improve [Y] tasks by [Z]%.
266
- ```
267
-
268
- ### Project-Specific Optimization
269
-
270
- **After understanding project:**
271
- ```
272
- Project Optimization Recommendations:
273
-
274
- 1. Figma Power: You have Figma designs
275
- - Auto-sync design tokens
276
- - Component generation
277
- - Setup: [instructions]
278
-
279
- 2. Context7: Multiple external libraries
280
- - Always current docs
281
- - Faster API lookup
282
- - Setup: Already available in Kiro
283
-
284
- 3. Custom Skill: [Domain-specific]
285
- - Create skill for [repeated pattern]
286
- - Saves time on [X] type tasks
287
- ```
288
-
289
- ---
290
-
291
- ## Adaptive Behavior
292
-
293
- ### Learn from Project Patterns
294
-
295
- **If you notice:**
296
- - Frequent Figma → code tasks → Recommend figma power
297
- - Many API integrations → Recommend context7
298
- - Repeated security audits → Recommend security skill
299
- - Complex state management → Recommend architecture review skill
300
-
301
- ### Build Skill Recommendation Memory
302
-
303
- **In memory.md:**
304
- ```markdown
305
- ## Recommended Skills/Tools
306
-
307
- - **Figma Power:** Design implementation tasks (50% of UI work)
308
- - **Context7:** Library docs lookup (saves ~5 min per lookup)
309
- - **Custom SEO Skill:** Frequent SEO audits needed
76
+ ## Decision Flow
310
77
 
311
- ## MCP Servers to Configure
78
+ 1. Core coding task? → Do it directly.
79
+ 2. Specialized skill/MCP/subagent actually available? No → manual.
80
+ 3. Already configured? Yes → use it.
81
+ 4. Setup time < task time? Yes → recommend setup, then use. No → manual; note the opportunity for future.
312
82
 
313
- - [ ] Stripe MCP: Payment features planned (Phase 2)
314
- - [ ] AWS Knowledge: Deployment optimization needed
315
- ```
316
-
317
- ---
318
-
319
- ## Token Efficiency with Delegation
320
-
321
- ### Delegation Saves Tokens
322
-
323
- **Example: Design implementation**
324
-
325
- **Manual (High Tokens):**
326
- - Read design.md thoroughly
327
- - Inspect existing components
328
- - Extract colors, spacing, patterns manually
329
- - Implement component
330
- - Verify against design
331
- - **Tokens:** ~2000
332
-
333
- **Delegated (Low Tokens):**
334
- - Use figma power
335
- - Extract design automatically
336
- - Generate component
337
- - Review output
338
- - **Tokens:** ~300
339
-
340
- ### When Delegation Costs More
341
-
342
- **Don't delegate if:**
343
- - Setup time > implementation time
344
- - Simple task (< 5 min)
345
- - Already have full context
346
- - No suitable tool exists
347
-
348
- ---
349
-
350
- ## Smart Tool Selection Matrix
351
-
352
- | Task Type | Primary Tool | Fallback | Skip Delegation |
353
- |-----------|--------------|----------|-----------------|
354
- | Code changes | Direct implementation | - | Always do directly |
355
- | Design → Code | Figma power | Manual | If no Figma file |
356
- | Library docs | Context7 MCP | Web search | If simple/known |
357
- | Architecture investigation | context-gatherer | Manual inspection | If < 3 files |
358
- | SEO audit | SEO skill | Manual checklist | If not applicable |
359
- | Security audit | Security skill | Manual review | For tiny changes |
360
- | Payment integration | Stripe MCP | Manual API | If simple endpoint |
361
- | Complex investigation | context-gatherer | Read files | If already know area |
362
-
363
- ---
364
-
365
- ## Efficiency Decision Tree
83
+ ## Recommendation Format
366
84
 
367
85
  ```
368
- New Task
369
- ↓
370
- Is it core coding task?
371
- YES → Do it directly
372
- NO ↓
373
-
374
- Is there specialized skill/MCP?
375
- NO → Do it manually
376
- YES ↓
377
-
378
- Is tool already configured?
379
- YES → Use tool (faster + better)
380
- NO ↓
381
-
382
- Is setup time < task time?
383
- YES → Recommend setup → Use tool
384
- NO → Do manually, note for future
86
+ Better tool: <name>
87
+ Benefit: <concrete improvement>
88
+ Setup: <quick steps or "already available">
89
+ Use it? (tool vs manual — user chooses)
385
90
  ```
386
91
 
387
- ---
388
-
389
- ## Communication: Tool Recommendations
390
-
391
- ### Concise Format
392
-
393
- **When recommending tool:**
394
- ```
395
- Better tool exists: [name]
396
-
397
- Benefit: [X] faster, [Y] more accurate
398
-
399
- Setup: [Quick instructions or "already available"]
400
-
401
- Use it? [Y/n]
402
- ```
403
-
404
- **Caveman mode:**
405
- ```
406
- [Tool name] better for this.
407
- Setup: [1 line]
408
- Use?
409
- ```
410
-
411
- ---
412
-
413
- ## Self-Awareness: Know Your Limits
414
-
415
- ### You're Best At:
416
- - Writing code
417
- - Following patterns
418
- - Maintaining consistency
419
- - Implementing requirements
420
- - Refactoring
421
- - Documentation
422
-
423
- ### You're Not Best At:
424
- - Current library docs (use context7)
425
- - Design precision (use figma power)
426
- - Deep architecture investigation (use context-gatherer)
427
- - Specialized domains (use domain skills)
428
-
429
- **Be honest:** Recommend better tools when they exist.
430
-
431
- ---
92
+ Ultra-concise variant only if the user opted into caveman mode.
432
93
 
433
- ## Summary
94
+ ## Adaptive Recommendations
434
95
 
435
- **Smart AI behavior:**
96
+ - Repeated design-to-code tasks → recommend the design tool; many API integrations → docs MCP; repeated audits → matching quality skill; complex state management → architecture review skill.
97
+ - Record in memory.md: recommended skills/tools with their use cases, and MCP servers worth configuring for planned work (as pending items, not assumptions).
436
98
 
437
- 1. **Check available skills/MCP before implementing**
438
- 2. **Delegate specialized tasks to specialized tools**
439
- 3. **Recommend configuration for repeated patterns**
440
- 4. **Be token-efficient: delegation often saves tokens**
441
- 5. **Know your strengths: code well, delegate smartly**
99
+ ## Token Economics
442
100
 
443
- **Dumb AI behavior:**
101
+ Delegation often saves tokens: automated extraction/generation replaces manual reading of designs, docs, and components. It costs more when setup exceeds implementation, the task is trivial, full context is already loaded, or no suitable tool exists. Measure, don't assume.
444
102
 
445
- 1. Do everything manually
446
- 2. Ignore available tools
447
- 3. Never recommend optimization
448
- 4. Waste tokens on duplicate work
449
- 5. Pretend to know everything
103
+ ## Know Your Limits
450
104
 
451
- **Goal:** Use right tool for each job. Maximize efficiency. Deliver better results faster.
105
+ Strong: writing code, following patterns, consistency, implementing requirements, refactoring, documentation. Weaker: current library docs, design precision, deep multi-file investigation, specialized domains — recommend the better tool honestly instead of guessing.