telos-framework 0.7.2 → 0.8.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.
@@ -0,0 +1,345 @@
1
+ # Sub-Agent Mapping to Telos Levels
2
+
3
+ This document maps the 15 specialized sub-agents to the 9 Telos levels, showing which sub-agents each level can delegate to for specific tasks.
4
+
5
+ ## Sub-Agent Overview
6
+
7
+ All sub-agents are located in `templates/agents/sub-agents/` and are available for delegation via the Task tool.
8
+
9
+ ### Available Sub-Agents
10
+
11
+ 1. **api-design.md** - REST/GraphQL API design, authentication, validation
12
+ 2. **code-reviewer.md** - Code quality review, best practices validation
13
+ 3. **component-implementation.md** - UI component creation, accessibility, responsiveness
14
+ 4. **database-design.md** - Database schema, queries, optimization
15
+ 5. **devops.md** - Deployment, CI/CD, infrastructure, monitoring
16
+ 6. **documentation.md** - Technical documentation, guides, API docs
17
+ 7. **feature-implementation.md** - Feature development, business logic
18
+ 8. **infrastructure.md** - Cloud infrastructure, scalability, reliability
19
+ 9. **polish.md** - Code optimization, performance tuning, refinement
20
+ 10. **prd.md** - Product requirements documents, user stories
21
+ 11. **quality.md** - QA, accessibility, security, performance testing
22
+ 12. **refactoring.md** - Code restructuring, technical debt reduction
23
+ 13. **research.md** - Technical research, library comparison, best practices
24
+ 14. **security-audit.md** - Security review, vulnerability assessment
25
+ 15. **testing.md** - Test creation, test strategy, coverage
26
+
27
+ ## Telos Level Mapping
28
+
29
+ ### L9: Telos-Guardian (Ultimate Purpose)
30
+
31
+ **Primary Sub-Agents:**
32
+ - `prd.md` - Understanding product requirements at strategic level
33
+ - `research.md` - Strategic technology research and direction
34
+
35
+ **Use Cases:**
36
+ - Validating feature alignment with ultimate purpose
37
+ - Researching strategic technology decisions
38
+ - Understanding product vision from requirements
39
+
40
+ **Example Delegation:**
41
+ ```markdown
42
+ Use the research subagent to analyze whether adopting [technology] aligns with our ultimate purpose of [goal].
43
+ ```
44
+
45
+ ---
46
+
47
+ ### L8: Market-Analyst (Business Value)
48
+
49
+ **Primary Sub-Agents:**
50
+ - `prd.md` - Understanding market needs and user requirements
51
+ - `research.md` - Competitive analysis and market trends
52
+
53
+ **Use Cases:**
54
+ - Analyzing feature business value
55
+ - Competitive technology research
56
+ - Market validation of technical decisions
57
+
58
+ **Example Delegation:**
59
+ ```markdown
60
+ Use the prd subagent to create user stories that demonstrate business value for [feature].
61
+ ```
62
+
63
+ ---
64
+
65
+ ### L7: Insight-Synthesizer (Product Strategy)
66
+
67
+ **Primary Sub-Agents:**
68
+ - `prd.md` - Product requirements and feature specifications
69
+ - `research.md` - Feature research and best practices
70
+
71
+ **Use Cases:**
72
+ - Creating comprehensive PRDs
73
+ - Researching product features
74
+ - Defining product strategy
75
+
76
+ **Example Delegation:**
77
+ ```markdown
78
+ Use the prd subagent to create a comprehensive PRD for [feature] with user stories and acceptance criteria.
79
+ ```
80
+
81
+ ---
82
+
83
+ ### L6: UX-Simulator (Experience Design)
84
+
85
+ **Primary Sub-Agents:**
86
+ - `component-implementation.md` - UI component creation
87
+ - `research.md` - UX patterns and accessibility research
88
+
89
+ **Secondary Sub-Agents:**
90
+ - `quality.md` - Accessibility validation
91
+ - `testing.md` - User journey testing
92
+
93
+ **Use Cases:**
94
+ - Designing user interfaces
95
+ - Implementing accessible components
96
+ - Researching UX patterns
97
+
98
+ **Example Delegation:**
99
+ ```markdown
100
+ Use the component-implementation subagent to create an accessible [component] following WCAG 2.1 AA standards.
101
+ ```
102
+
103
+ ---
104
+
105
+ ### L5: Journey-Validator (Workflow Verification)
106
+
107
+ **Primary Sub-Agents:**
108
+ - `testing.md` - User journey and E2E testing
109
+ - `quality.md` - Workflow quality assurance
110
+
111
+ **Secondary Sub-Agents:**
112
+ - `component-implementation.md` - User interaction implementation
113
+
114
+ **Use Cases:**
115
+ - Creating user journey tests
116
+ - Validating workflow completion
117
+ - Testing user interactions
118
+
119
+ **Example Delegation:**
120
+ ```markdown
121
+ Use the testing subagent to create E2E tests that validate the [workflow] user journey.
122
+ ```
123
+
124
+ ---
125
+
126
+ ### L4: Integration-Contractor (API Contracts)
127
+
128
+ **Primary Sub-Agents:**
129
+ - `api-design.md` - REST/GraphQL API design
130
+ - `database-design.md` - Data contracts and schemas
131
+
132
+ **Secondary Sub-Agents:**
133
+ - `devops.md` - API deployment
134
+ - `documentation.md` - API documentation
135
+ - `testing.md` - API testing
136
+
137
+ **Use Cases:**
138
+ - Designing API endpoints
139
+ - Defining data contracts
140
+ - API documentation
141
+
142
+ **Example Delegation:**
143
+ ```markdown
144
+ Use the api-design subagent to design a RESTful API for [resource] with proper authentication and validation.
145
+ ```
146
+
147
+ ---
148
+
149
+ ### L3: Component-Architect (Component Design)
150
+
151
+ **Primary Sub-Agents:**
152
+ - `component-implementation.md` - Component creation and design
153
+ - `feature-implementation.md` - Feature-level components
154
+
155
+ **Secondary Sub-Agents:**
156
+ - `refactoring.md` - Component refactoring
157
+ - `quality.md` - Component quality review
158
+ - `testing.md` - Component testing
159
+
160
+ **Use Cases:**
161
+ - Creating reusable components
162
+ - Refactoring component architecture
163
+ - Component quality assurance
164
+
165
+ **Example Delegation:**
166
+ ```markdown
167
+ Use the component-implementation subagent to create a reusable [component] that follows our design system.
168
+ ```
169
+
170
+ ---
171
+
172
+ ### L2: Function-Author (Function Implementation)
173
+
174
+ **Primary Sub-Agents:**
175
+ - `feature-implementation.md` - Feature and function implementation
176
+ - `refactoring.md` - Function refactoring
177
+
178
+ **Secondary Sub-Agents:**
179
+ - `polish.md` - Code optimization
180
+ - `database-design.md` - Data access functions
181
+ - `testing.md` - Unit testing
182
+
183
+ **Use Cases:**
184
+ - Implementing business logic
185
+ - Refactoring functions
186
+ - Optimizing code performance
187
+
188
+ **Example Delegation:**
189
+ ```markdown
190
+ Use the feature-implementation subagent to implement the [function] with proper error handling and validation.
191
+ ```
192
+
193
+ ---
194
+
195
+ ### L1: Syntax-Linter (Code Quality)
196
+
197
+ **Primary Sub-Agents:**
198
+ - `code-reviewer.md` - Code quality review
199
+ - `quality.md` - Quality assurance
200
+ - `security-audit.md` - Security review
201
+
202
+ **Secondary Sub-Agents:**
203
+ - `testing.md` - Test quality validation
204
+ - `refactoring.md` - Code cleanup
205
+
206
+ **Use Cases:**
207
+ - Code quality review
208
+ - Security audits
209
+ - Compliance validation
210
+
211
+ **Example Delegation:**
212
+ ```markdown
213
+ Use the quality subagent to review [code] for quality, accessibility, security, and performance issues.
214
+ ```
215
+
216
+ ---
217
+
218
+ ## Cross-Cutting Sub-Agents
219
+
220
+ These sub-agents can be used by ANY Telos level as needed:
221
+
222
+ ### research.md
223
+ **Used by:** All levels
224
+ **Purpose:** Technical research, library comparison, best practices
225
+ **Example:** "Research the best state management library for React"
226
+
227
+ ### documentation.md
228
+ **Used by:** All levels
229
+ **Purpose:** Technical documentation, guides, README files
230
+ **Example:** "Document the API endpoints with OpenAPI specification"
231
+
232
+ ### devops.md
233
+ **Used by:** L4, L3, L2, L1
234
+ **Purpose:** Deployment, CI/CD, infrastructure
235
+ **Example:** "Set up CI/CD pipeline for automated testing and deployment"
236
+
237
+ ### infrastructure.md
238
+ **Used by:** L4, L3, L2
239
+ **Purpose:** Cloud infrastructure, scalability
240
+ **Example:** "Design scalable infrastructure for high-traffic application"
241
+
242
+ ### testing.md
243
+ **Used by:** All levels
244
+ **Purpose:** Test creation, test strategy
245
+ **Example:** "Create comprehensive test suite with unit, integration, and E2E tests"
246
+
247
+ ### quality.md
248
+ **Used by:** All levels
249
+ **Purpose:** Quality assurance, validation
250
+ **Example:** "Validate code quality, accessibility, and security"
251
+
252
+ ## Delegation Guidelines
253
+
254
+ ### When to Delegate
255
+
256
+ 1. **Specialization Needed** - Task requires deep expertise in a specific area
257
+ 2. **Time-Intensive** - Task would consume significant tokens if done inline
258
+ 3. **Parallel Work** - Multiple sub-agents can work on different aspects simultaneously
259
+ 4. **Separation of Concerns** - Keep validation logic separate from implementation
260
+
261
+ ### How to Delegate
262
+
263
+ Use the Task tool with the appropriate subagent:
264
+
265
+ ```markdown
266
+ Use the [subagent-name] subagent to [specific task description].
267
+ ```
268
+
269
+ ### Delegation Best Practices
270
+
271
+ 1. **Be Specific** - Provide clear, detailed instructions
272
+ 2. **Provide Context** - Share relevant codebase patterns and requirements
273
+ 3. **Set Expectations** - Clarify what deliverables you expect
274
+ 4. **Review Results** - Always review sub-agent output for alignment with Telos level requirements
275
+
276
+ ## Example Multi-Agent Workflows
277
+
278
+ ### Full-Stack Feature Implementation
279
+
280
+ 1. **L7 (Insight-Synthesizer)** → `prd.md` - Create feature PRD
281
+ 2. **L4 (Integration-Contractor)** → `api-design.md` - Design API endpoints
282
+ 3. **L4 (Integration-Contractor)** → `database-design.md` - Design data schema
283
+ 4. **L3 (Component-Architect)** → `component-implementation.md` - Create UI components
284
+ 5. **L2 (Function-Author)** → `feature-implementation.md` - Implement business logic
285
+ 6. **L1 (Syntax-Linter)** → `quality.md` - Quality review
286
+ 7. **L1 (Syntax-Linter)** → `security-audit.md` - Security review
287
+ 8. **L5 (Journey-Validator)** → `testing.md` - Create E2E tests
288
+
289
+ ### Code Quality Improvement
290
+
291
+ 1. **L1 (Syntax-Linter)** → `code-reviewer.md` - Initial code review
292
+ 2. **L1 (Syntax-Linter)** → `security-audit.md` - Security audit
293
+ 3. **L2 (Function-Author)** → `refactoring.md` - Refactor code
294
+ 4. **L2 (Function-Author)** → `polish.md` - Optimize performance
295
+ 5. **L1 (Syntax-Linter)** → `quality.md` - Final quality validation
296
+ 6. **All Levels** → `documentation.md` - Update documentation
297
+
298
+ ### New Technology Adoption
299
+
300
+ 1. **L9 (Telos-Guardian)** → `research.md` - Strategic technology research
301
+ 2. **L8 (Market-Analyst)** → `research.md` - Competitive analysis
302
+ 3. **L7 (Insight-Synthesizer)** → `prd.md` - Migration plan PRD
303
+ 4. **L4 (Integration-Contractor)** → `api-design.md` - API compatibility review
304
+ 5. **L3 (Component-Architect)** → `component-implementation.md` - Component migration
305
+ 6. **L1 (Syntax-Linter)** → `quality.md` - Quality validation
306
+ 7. **All Levels** → `documentation.md` - Update documentation
307
+
308
+ ---
309
+
310
+ ## Gap Analysis
311
+
312
+ After integrating these 15 sub-agents, the following areas are well-covered:
313
+
314
+ ✅ **Covered Areas:**
315
+ - API Design
316
+ - UI Components
317
+ - Code Quality
318
+ - Security
319
+ - Testing
320
+ - DevOps/Infrastructure
321
+ - Documentation
322
+ - Research
323
+ - Database Design
324
+ - Refactoring
325
+ - Feature Implementation
326
+ - Product Requirements
327
+
328
+ ❓ **Potential Gaps:**
329
+
330
+ The following specialized agents could be added if needed:
331
+
332
+ 1. **performance-optimization.md** - Dedicated performance tuning (partially covered by polish.md)
333
+ 2. **migration.md** - Data/code migration specialist
334
+ 3. **accessibility.md** - Dedicated accessibility expert (partially covered by quality.md)
335
+ 4. **internationalization.md** - i18n/l10n specialist
336
+ 5. **analytics.md** - Analytics implementation and tracking
337
+ 6. **ai-ml.md** - AI/ML integration specialist
338
+ 7. **mobile.md** - Mobile-specific development
339
+ 8. **design-system.md** - Design system creation and maintenance
340
+
341
+ These gaps are **not critical** as the existing sub-agents provide broad coverage. Additional specialized agents can be created as needed.
342
+
343
+ ---
344
+
345
+ *This mapping ensures that each Telos level can delegate effectively to specialized sub-agents, maintaining the purpose-driven architecture while leveraging deep domain expertise.*