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,474 +1,118 @@
1
1
  # AI Coding Workflow
2
+ **Load when:** planning complex work or resolving lifecycle/verification uncertainty; routine tasks use the small core.
2
3
 
3
- > Detailed workflow for AI agents working with the project context system.
4
+ Core loop: read context → inspect code → plan → implement → verify → update context. Understand before changing; follow before innovating; document after completing.
4
5
 
5
- ---
6
+ ## Before Coding
6
7
 
7
- ## Core Workflow: Read → Plan → Code → Update
8
+ 1. Load task-relevant context via the selective-loading map (token-optimization.md). memory.md first; skip docs the task doesn't need.
9
+ 2. Inspect actual code: target files; related files (imports, types, utilities); similar implemented features; existing tests; build/env/deploy config. Use read, search, grep, file tree — never code against assumptions.
10
+ 3. Extract: abstractions to reuse, established patterns, naming conventions, error-handling patterns, security boundaries. Flag code smells, debt, and doc/code inconsistencies.
11
+ 4. Check alignment before planning:
8
12
 
9
- ```
10
- ┌─────────────────────────────────────────────────────────────┐
11
- │ USER REQUEST RECEIVED │
12
- └──────────────────────┬──────────────────────────────────────┘
13
- ▼
14
- ┌──────────────────────────────────────────────────────────────┐
15
- │ STEP 1: READ PROJECT CONTEXT │
16
- │ • prd.md → Requirements │
17
- │ • architecture.md → System structure │
18
- │ • rules.md → Engineering standards │
19
- │ • design.md → Visual patterns │
20
- │ • tasks.md → Planned work │
21
- │ • memory.md → Current state │
22
- └──────────────────────┬───────────────────────────────────────┘
23
- ▼
24
- ┌──────────────────────────────────────────────────────────────┐
25
- │ STEP 2: INSPECT ACTUAL CODE │
26
- │ • Affected files and surrounding context │
27
- │ • Existing patterns and abstractions │
28
- │ • Related components │
29
- └──────────────────────┬───────────────────────────────────────┘
30
- ▼
31
- ┌──────────────────────────────────────────────────────────────┐
32
- │ STEP 3: ANALYZE & PLAN │
33
- │ • What is the goal? │
34
- │ • Which files need to change? │
35
- │ • What are the implications? │
36
- │ • Does this align with architecture? │
37
- │ • Does this follow rules? │
38
- │ • Does this match design? │
39
- │ • Security/privacy/performance/legal concerns? │
40
- └──────────────────────┬───────────────────────────────────────┘
41
- ▼
42
- ┌──────────────────────────────────────────────────────────────┐
43
- │ STEP 4: IMPLEMENT │
44
- │ • Follow existing patterns │
45
- │ • Reuse existing abstractions │
46
- │ • Stay scoped (no unrelated changes) │
47
- │ • Maintain security, privacy, accessibility │
48
- └──────────────────────┬───────────────────────────────────────┘
49
- ▼
50
- ┌──────────────────────────────────────────────────────────────┐
51
- │ STEP 5: VERIFY │
52
- │ • Does it work? │
53
- │ • Are there regressions? │
54
- │ • Do tests pass? │
55
- └──────────────────────┬───────────────────────────────────────┘
56
- ▼
57
- ┌──────────────────────────────────────────────────────────────┐
58
- │ STEP 6: UPDATE PROJECT CONTEXT │
59
- │ • tasks.md → Mark complete, add new tasks │
60
- │ • memory.md → Document decisions, state changes │
61
- │ • Other docs → If architecture/rules/design changed │
62
- └───────────────────────────────────────────────────────────────┘
63
- ```
13
+ | Check | Questions |
14
+ |---|---|
15
+ | Product (prd.md) | Aligns with requirements? In scope or scope change? Target user? |
16
+ | Technical (architecture.md) | Architecture suitable? Constraints/limitations? Dependencies? |
17
+ | Standards (rules.md) | Coding standards? Required security? Accessibility? Privacy implications? |
18
+ | Design (design.md) | Patterns/components to reuse? Consistent with visual language? |
19
+ | Status (tasks.md, memory.md) | Already started? Related work in progress? Historical context? |
64
20
 
65
- ---
21
+ 5. For non-trivial work, write a scoped plan:
66
22
 
67
- ## Step 1: Read Project Context
23
+ | Plan field | Content |
24
+ |---|---|
25
+ | Goal | One clear statement of what must be done |
26
+ | Files to change | Each file + what changes |
27
+ | New files | Each file + purpose |
28
+ | Approach | Ordered steps |
29
+ | Considerations | Security, privacy, performance, accessibility |
30
+ | Risks | Each risk + mitigation |
68
31
 
69
- ### What to Read
32
+ Reading method: skim structure → deep-read relevant sections → note unknowns → check for conflicts. Red flags — vague/incomplete docs, docs conflicting with code, undocumented decisions, unclear security/privacy implications — resolve by inspecting code or asking the user before proceeding.
70
33
 
71
- | Scenario | Read |
72
- |----------|------|
73
- | **New to project** | All six documents |
74
- | **Adding feature** | prd.md, architecture.md, design.md, tasks.md, memory.md |
75
- | **Fixing bug** | architecture.md, rules.md, memory.md, tasks.md |
76
- | **Refactoring** | architecture.md, rules.md, memory.md |
77
- | **UI work** | design.md, architecture.md, rules.md, memory.md |
78
- | **Security/privacy** | rules.md, memory.md, architecture.md, prd.md |
34
+ ### Task Size
79
35
 
80
- ### How to Read
36
+ | Size | Read | Plan |
37
+ |---|---|---|
38
+ | Tiny (1 file, obvious) | Affected file only | None |
39
+ | Medium (few files, clear pattern) | memory.md + relevant doc + affected files | Brief outline |
40
+ | Large/complex | Relevant context subset + affected code | Scoped plan; clarify only consequential missing decisions |
81
41
 
82
- 1. **Skim first** to understand structure
83
- 2. **Deep read** relevant sections
84
- 3. **Note unknowns** — what's unclear or missing?
85
- 4. **Check for conflicts** — does documentation match your understanding?
42
+ New to the project? Read the short current memory first; discover only context relevant to the request. Use all six only for an explicit comprehensive onboarding/audit.
86
43
 
87
- ### Red Flags
44
+ ## During Implementation
88
45
 
89
- - 🚩 Documentation is vague or incomplete
90
- - 🚩 Documentation conflicts with code
91
- - 🚩 Important decisions are not documented
92
- - 🚩 Security/privacy implications are unclear
46
+ - Make surgical diffs; change only what the task requires.
47
+ - Follow existing patterns; reuse existing abstractions — consistency over cleverness, DRY.
48
+ - No drive-by refactors, no unrequested features, no new dependencies without demonstrated need.
49
+ - Protect secrets and data: validate input, enforce authorization, no hardcoded secrets or environment-specific values. Document that a secret is needed, never its value.
50
+ - Accessible by default: semantic HTML, keyboard navigation, ARIA.
51
+ - Privacy-conscious: minimize data collection; document third-party sharing.
52
+ - Performance-aware: optimize images, lazy load, minimize JavaScript.
53
+ - Handle errors appropriately; meaningful names; small focused functions; comments explain why, not what.
93
54
 
94
- **Action:** Ask user or inspect code to clarify before proceeding.
55
+ ## After Implementation
95
56
 
96
- ---
57
+ 1. Verify changed behavior: run/execute it; check edge cases and graceful error handling.
58
+ 2. Check regressions in related features; run existing unit/integration/E2E tests if available.
59
+ 3. Security: input validated, secrets protected, authorization enforced.
60
+ 4. UI: keyboard and screen-reader accessible, sufficient contrast. Privacy: collection documented, third-party requests justified, consent where required. Performance: images optimized, lazy loading, no unnecessary re-renders.
61
+ 5. Update context (below), then report result → changes → verification.
62
+ 6. On failure: diagnose → fix → re-verify. After 2–3 failed attempts, switch approach or ask the user.
97
63
 
98
- ## Step 2: Inspect Actual Code
64
+ ### Context Updates
99
65
 
100
- ### What to Inspect
66
+ | Doc | When |
67
+ |---|---|
68
+ | tasks.md | Always after meaningful work — mark complete, add discovered tasks |
69
+ | memory.md | Always — decisions, state changes, key files changed, workarounds |
70
+ | architecture.md / design.md / rules.md / prd.md | Only if architecture / design patterns / standards / requirements actually changed |
101
71
 
102
- 1. **Target files** — Files that need to change
103
- 2. **Related files** — Components, utilities, types used by target files
104
- 3. **Pattern examples** — Similar features already implemented
105
- 4. **Tests** — Existing test patterns
106
- 5. **Configuration** — Build, environment, deployment configs
72
+ Skip updates for trivial changes, already-documented planned refactors, and bug fixes that add no context. Entry formats:
73
+ - tasks.md "Completed Recently": `[x] Feature — date, brief summary`.
74
+ - memory.md recent work: date, what was done, key decision, files changed.
75
+ - architecture.md decision record: decision, rationale, status.
107
76
 
108
- ### Inspection Tools
77
+ ## Quality Gates (all pass before "done")
109
78
 
110
- - **Read files** — Understand current implementation
111
- - **Search codebase** — Find patterns, similar features
112
- - **Grep** — Find usage of functions, components, patterns
113
- - **File tree** — Understand organization
79
+ - [ ] Works — executed/tested, not merely written
80
+ - [ ] Follows rules.md
81
+ - [ ] Matches architecture.md and design.md
82
+ - [ ] Security considered; privacy, accessibility (UI), performance as applicable
83
+ - [ ] No regressions in related features
84
+ - [ ] memory.md + tasks.md updated; other docs updated if changed
85
+ - [ ] No secrets committed; no unrelated changes
114
86
 
115
- ### What to Look For
87
+ ## Quality Signals
116
88
 
117
- - ✅ Existing abstractions to reuse
118
- - ✅ Established patterns to follow
119
- - ✅ Naming conventions in use
120
- - ✅ Error handling patterns
121
- - ✅ Security boundaries
122
- - ⚠️ Code smells or technical debt
123
- - ⚠️ Inconsistencies with documentation
89
+ - High: follows patterns; reuses abstractions; clear names; proper error handling; secure and accessible by default; documented decisions; current context.
90
+ - Low: ignores patterns; duplicates code; unrelated edits; magic numbers/unclear names; missing error handling; vulnerabilities; inaccessible UI; undocumented decisions; stale context.
124
91
 
125
- ---
92
+ ## Verification Ladder
126
93
 
127
- ## Step 3: Analyze & Plan
94
+ Code written ≠ runs ≠ tested ≠ verified in the user's actual environment. Claim only the level actually reached; label anything unverified.
128
95
 
129
- ### Key Questions
96
+ ## Task Playbooks
130
97
 
131
- #### Product Alignment
132
- - Does this request align with documented requirements? (prd.md)
133
- - Is this in scope or a scope change?
134
- - Who is the target user for this feature?
98
+ | Task | Sequence |
99
+ |---|---|
100
+ | Feature | prd scope → tasks planned? → architecture fit → design components → rules → implement → verify → update tasks+memory |
101
+ | Bugfix | memory known issue? → architecture → inspect code for root cause → rules → fix → verify no regressions → add regression test if possible → update tasks+memory |
102
+ | Refactor | memory debt → architecture intent → rules → ensure tests exist first → incremental changes, verify each → update architecture if structure changed → memory |
103
+ | Security/privacy | rules → memory → architecture boundaries → prd privacy requirements → implement → security/privacy verification → memory decisions → rules if new patterns |
135
104
 
136
- #### Technical Feasibility
137
- - Is the current architecture suitable for this? (architecture.md)
138
- - Are there technical constraints or limitations?
139
- - What are the dependencies?
140
-
141
- #### Engineering Standards
142
- - What coding standards apply? (rules.md)
143
- - What security measures are required?
144
- - What accessibility requirements exist?
145
- - What privacy implications exist?
146
-
147
- #### Design Consistency
148
- - What design patterns apply? (design.md)
149
- - What components should be reused?
150
- - Is this consistent with visual language?
151
-
152
- #### Implementation Status
153
- - Has this been started? (tasks.md)
154
- - Are there related tasks in progress?
155
- - Is there historical context? (memory.md)
156
-
157
- ### Planning Template
158
-
159
- ```
160
- GOAL: [Clear statement of what needs to be done]
161
-
162
- FILES TO CHANGE:
163
- - [file1]: [what changes]
164
- - [file2]: [what changes]
165
-
166
- NEW FILES NEEDED:
167
- - [file1]: [purpose]
168
-
169
- APPROACH:
170
- 1. [Step 1]
171
- 2. [Step 2]
172
- 3. [Step 3]
173
-
174
- CONSIDERATIONS:
175
- - Security: [concerns]
176
- - Privacy: [concerns]
177
- - Performance: [concerns]
178
- - Accessibility: [concerns]
179
-
180
- RISKS:
181
- - [Risk 1]: [mitigation]
182
- ```
183
-
184
- ---
185
-
186
- ## Step 4: Implement
187
-
188
- ### Implementation Principles
189
-
190
- 1. **Follow existing patterns** — Consistency over cleverness
191
- 2. **Reuse abstractions** — DRY (Don't Repeat Yourself)
192
- 3. **Stay scoped** — Change only what's necessary
193
- 4. **No surprises** — Follow documented architecture and rules
194
- 5. **Security first** — Validate input, protect secrets, check authorization
195
- 6. **Accessible by default** — Semantic HTML, keyboard navigation, ARIA
196
- 7. **Privacy-conscious** — Minimize data collection, document third-party sharing
197
- 8. **Performance-aware** — Optimize images, lazy load, minimize JavaScript
198
-
199
- ### Implementation Checklist
200
-
201
- #### Before Writing Code
202
- - [ ] I've read relevant project context
203
- - [ ] I've inspected existing code
204
- - [ ] I understand the goal
205
- - [ ] I have a clear plan
206
-
207
- #### While Writing Code
208
- - [ ] Following existing patterns
209
- - [ ] Reusing existing abstractions
210
- - [ ] Not modifying unrelated code
211
- - [ ] Validating user input
212
- - [ ] Handling errors appropriately
213
- - [ ] Adding accessibility attributes
214
- - [ ] Optimizing for performance
215
- - [ ] Protecting sensitive data
216
- - [ ] Following design system
217
-
218
- #### Code Quality
219
- - [ ] Meaningful variable/function names
220
- - [ ] Small, focused functions
221
- - [ ] Appropriate comments (why, not what)
222
- - [ ] No hardcoded secrets
223
- - [ ] No hardcoded environment-specific values
224
-
225
- ---
226
-
227
- ## Step 5: Verify
228
-
229
- ### Verification Steps
230
-
231
- 1. **Functional verification**
232
- - Does it work as intended?
233
- - Does it handle edge cases?
234
- - Does it handle errors gracefully?
235
-
236
- 2. **Regression check**
237
- - Did I break existing functionality?
238
- - Do related features still work?
239
-
240
- 3. **Run tests** (if available)
241
- - Do unit tests pass?
242
- - Do integration tests pass?
243
- - Do E2E tests pass?
244
-
245
- 4. **Security check**
246
- - Is user input validated?
247
- - Are secrets protected?
248
- - Is authorization enforced?
249
-
250
- 5. **Accessibility check**
251
- - Is it keyboard accessible?
252
- - Does it work with screen readers?
253
- - Is color contrast sufficient?
254
-
255
- 6. **Privacy check**
256
- - Is data collection documented?
257
- - Are third-party requests justified?
258
- - Is consent obtained where required?
259
-
260
- 7. **Performance check**
261
- - Are images optimized?
262
- - Is lazy loading implemented?
263
- - Are there unnecessary re-renders?
264
-
265
- ### When Verification Fails
266
-
267
- 1. **Diagnose** the issue
268
- 2. **Fix** the problem
269
- 3. **Re-verify** thoroughly
270
- 4. **If stuck** after 2-3 attempts, try a different approach or ask user
271
-
272
- ---
273
-
274
- ## Step 6: Update Project Context
275
-
276
- ### When to Update
277
-
278
- ✅ **Always update:**
279
- - tasks.md — Mark completed work
280
- - memory.md — Document important decisions
281
-
282
- ✅ **Update if changed:**
283
- - architecture.md — If architecture changed
284
- - rules.md — If engineering standards changed
285
- - design.md — If design patterns changed
286
- - prd.md — If requirements changed
287
-
288
- ❌ **Don't update for:**
289
- - Trivial changes
290
- - Planned refactoring (already documented)
291
- - Bug fixes that don't add context
292
-
293
- ### What to Update
294
-
295
- #### tasks.md
296
- ```markdown
297
- ## Recently Completed
298
- - [x] **Feature name** — Completed [Date]
299
- - Brief summary of what was implemented
300
- ```
301
-
302
- #### memory.md
303
- ```markdown
304
- ## Recent Work
305
- - **[Date]:** Implemented [feature]
306
- - Details: [Brief description]
307
- - Decision: [Important decision made]
308
- - Files changed: [Key files]
309
- ```
310
-
311
- #### architecture.md (if architecture changed)
312
- ```markdown
313
- ## Architectural Decisions
314
- ### [Date]: [Decision Title]
315
- **Decision:** [What changed]
316
- **Rationale:** [Why]
317
- **Status:** Accepted
318
- ```
319
-
320
- ---
321
-
322
- ## Special Workflows
323
-
324
- ### Workflow: Adding a New Feature
325
-
326
- 1. **Check prd.md** — Is this in scope?
327
- 2. **Check tasks.md** — Is it already planned?
328
- 3. **Read architecture.md** — How does it fit?
329
- 4. **Read design.md** — What components/patterns apply?
330
- 5. **Read rules.md** — What standards apply?
331
- 6. **Implement** following existing patterns
332
- 7. **Verify** functionality and quality
333
- 8. **Update tasks.md** and **memory.md**
334
-
335
- ### Workflow: Fixing a Bug
336
-
337
- 1. **Check memory.md** — Is this a known bug?
338
- 2. **Read architecture.md** — Understand the system
339
- 3. **Inspect code** — Find the root cause
340
- 4. **Read rules.md** — Follow standards for the fix
341
- 5. **Implement** the fix
342
- 6. **Verify** the fix doesn't cause regressions
343
- 7. **Add tests** (if possible) to prevent regression
344
- 8. **Update tasks.md** (remove from bug list) and **memory.md**
345
-
346
- ### Workflow: Refactoring Code
347
-
348
- 1. **Check memory.md** — Are there known issues or technical debt?
349
- 2. **Read architecture.md** — Understand the intended structure
350
- 3. **Read rules.md** — Follow refactoring guidelines
351
- 4. **Ensure tests exist** before refactoring
352
- 5. **Refactor incrementally** — Small changes
353
- 6. **Verify after each change** — Tests still pass
354
- 7. **Update architecture.md** if structure changed significantly
355
- 8. **Update memory.md** — Document technical debt addressed
356
-
357
- ### Workflow: Security/Privacy Changes
358
-
359
- 1. **Read rules.md** — Security and privacy guidelines
360
- 2. **Read memory.md** — Existing security/privacy context
361
- 3. **Read architecture.md** — Security boundaries
362
- 4. **Read prd.md** — Privacy requirements
363
- 5. **Implement** with security/privacy best practices
364
- 6. **Verify** — Security check, privacy check
365
- 7. **Update memory.md** — Document security/privacy decisions
366
- 8. **Update rules.md** if new security patterns established
367
-
368
- ### Workflow: Handling Documentation Conflicts
369
-
370
- **When documentation and code disagree:**
371
-
372
- 1. **Inspect actual implementation** — Code is truth for current state
373
- 2. **Identify discrepancy** — What's different and why?
374
- 3. **Determine which is correct:**
375
- - If code is correct → Update documentation
376
- - If documentation is correct → Ask user before changing code
377
- - If neither is clear → Ask user
378
- 4. **Update** the incorrect source
379
- 5. **Document in memory.md** if it's an important change
380
-
381
- ---
382
-
383
- ## Quality Gates
384
-
385
- ### Before Marking Work Complete
386
-
387
- - [ ] Functionality verified
388
- - [ ] No regressions
389
- - [ ] Tests pass (if applicable)
390
- - [ ] Security checked
391
- - [ ] Privacy checked
392
- - [ ] Accessibility checked (if UI change)
393
- - [ ] Performance checked (if applicable)
394
- - [ ] Project context updated
395
- - [ ] No secrets committed
396
- - [ ] No unrelated changes
397
-
398
- ### Signs of High-Quality Work
399
-
400
- ✅ Follows existing patterns
401
- ✅ Reuses existing abstractions
402
- ✅ Clear, meaningful names
403
- ✅ Appropriate error handling
404
- ✅ Secure by default
405
- ✅ Accessible by default
406
- ✅ Well-documented decisions
407
- ✅ Updated project context
408
-
409
- ### Signs of Low-Quality Work
410
-
411
- ❌ Ignores existing patterns
412
- ❌ Duplicates existing code
413
- ❌ Modifies unrelated code
414
- ❌ Magic numbers and unclear names
415
- ❌ Missing error handling
416
- ❌ Security vulnerabilities
417
- ❌ Inaccessible UI
418
- ❌ Undocumented decisions
419
- ❌ Stale project context
420
-
421
- ---
422
-
423
- ## Common Mistakes to Avoid
424
-
425
- ### 1. Coding Before Understanding
426
- ❌ **Wrong:** Jump directly to writing code
427
- ✅ **Right:** Read context → Inspect code → Plan → Code
428
-
429
- ### 2. Inventing Requirements
430
- ❌ **Wrong:** Assume what the user wants
431
- ✅ **Right:** Check prd.md, ask if unclear
432
-
433
- ### 3. Ignoring Existing Patterns
434
- ❌ **Wrong:** Implement a feature your own way
435
- ✅ **Right:** Follow established patterns from codebase
436
-
437
- ### 4. Modifying Unrelated Code
438
- ❌ **Wrong:** Refactor unrelated code "while you're there"
439
- ✅ **Right:** Stay scoped to the current task
440
-
441
- ### 5. Forgetting to Update Context
442
- ❌ **Wrong:** Complete work without updating docs
443
- ✅ **Right:** Always update tasks.md and memory.md
444
-
445
- ### 6. Fabricating Information
446
- ❌ **Wrong:** Invent features, statistics, or compliance claims
447
- ✅ **Right:** Document only what exists or is planned
448
-
449
- ### 7. Storing Secrets
450
- ❌ **Wrong:** Add API keys to project context
451
- ✅ **Right:** Document that secrets are needed, not the secrets themselves
452
-
453
- ### 8. Ignoring Security/Privacy
454
- ❌ **Wrong:** Assume it's handled elsewhere
455
- ✅ **Right:** Proactively validate input, protect data, check permissions
456
-
457
- ---
458
-
459
- ## Summary
460
-
461
- **The workflow is simple:**
462
-
463
- 1. **Read** project context
464
- 2. **Inspect** actual code
465
- 3. **Plan** the implementation
466
- 4. **Code** following patterns and standards
467
- 5. **Verify** quality and correctness
468
- 6. **Update** project context
469
-
470
- **The goal is simple:**
471
-
472
- **Understand before changing. Follow before innovating. Document after completing.**
473
-
474
- This workflow transforms AI agents from code generators into effective engineering partners.
105
+ ## Documentation Conflicts
106
+
107
+ Inspect actual implementation (code is truth for current state) → identify the discrepancy → code correct: update the stale doc; doc correct: ask user before changing code; unclear: ask user → record important resolutions in memory.md.
108
+
109
+ ## Common Mistakes
110
+
111
+ - Coding before understanding — read context, inspect code, plan first.
112
+ - Inventing requirements — check prd.md; ask if unclear.
113
+ - Ignoring existing patterns — follow established codebase conventions.
114
+ - Modifying unrelated code — stay scoped; no "clean up while here".
115
+ - Forgetting context updates — always update tasks.md and memory.md.
116
+ - Fabricating features, statistics, or compliance claims — document only what exists or is planned.
117
+ - Storing secrets in context docs — document that secrets are needed, never their values.
118
+ - Assuming security/privacy is handled elsewhere — validate input, protect data, check permissions.
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Safe, additive setup so `npm i telo3-ai` is the only command a user types.
4
+ * Installs the durable project skill and activates the always-on contract in
5
+ * the invoking project. Never clobbers user content, never fails the install.
6
+ * Skips global installs, opt-out, and the package's own directory.
7
+ * @license MIT
8
+ */
9
+ import { resolve, dirname } from 'node:path';
10
+ import { fileURLToPath } from 'node:url';
11
+ import { installSkill } from '../src/install.js';
12
+ import { activate } from '../src/activate.js';
13
+
14
+ const SOURCE = resolve(dirname(fileURLToPath(import.meta.url)), '..');
15
+
16
+ try {
17
+ const global = process.env.npm_config_global === 'true';
18
+ const target = resolve(process.env.INIT_CWD || process.cwd());
19
+ if (!global && !process.env.TELO3_SKIP && target !== SOURCE) {
20
+ const installed = installSkill(target, { agent: 'auto' });
21
+ activate(target, { skillPath: installed.skillPath });
22
+ process.stdout.write('Telo3 ready. Say "telo3" once in your AI chat.\n');
23
+ }
24
+ } catch {
25
+ // Additive convenience only — never break `npm install`.
26
+ process.stdout.write('Telo3 installed. Run "npx telo3-ai" in your project to finish setup.\n');
27
+ }