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.
@@ -22,42 +22,9 @@ structure (L1), and generate all necessary files.
22
22
  This prevents confusion when the user answers one question and you misinterpret
23
23
  it as answering a different question.
24
24
 
25
- ## Step 0: Detect AI Platform & Create Config
25
+ ## Important Note
26
26
 
27
- **IMPORTANT**: Before proceeding, detect which AI coding assistant is running:
28
-
29
- 1. **Check environment indicators**:
30
- - Claude Code: Check if `.claude/` directory exists or if running from Claude
31
- slash command
32
- - Opencode: Check if `.opencode/` directory exists or `OPENCODE_SESSION` env
33
- var
34
- - Other: Neither detected
35
-
36
- 2. **If running from Claude Code AND no `CLAUDE.md` exists**:
37
- - Create `CLAUDE.md` with the Telos reference template (see section 4.3 for
38
- template)
39
- - Include note: "Auto-generated by Telos initialization"
40
-
41
- 3. **If `CLAUDE.md` exists but doesn't mention Telos**:
42
- - Prepend the Telos reference section (see section 4.3)
43
-
44
- 4. **Ask user which platform they want to initialize for**:
45
-
46
- Present ONLY this question and WAIT for response:
47
-
48
- ```
49
- Which AI coding platform would you like to initialize Telos for?
50
-
51
- 1. Claude Code (slash commands in `.claude/commands/telos/`)
52
- 2. Opencode (commands in `.opencode/command/telos/`)
53
- 3. Both
54
- 4. Skip command installation (manual setup)
55
-
56
- Your choice [1-4]:
57
- ```
58
-
59
- **IMPORTANT**: Do NOT preview next steps. Do NOT say "Next I'll...". STOP and
60
- WAIT for user response, then store it for Step 4.4.
27
+ Platform setup (slash commands, config files) was already completed by running `npx telos-framework init`. You don't need to ask about platforms or create command files - they already exist. Your job is to analyze the codebase and generate the `.telos/` hierarchy files.
61
28
 
62
29
  ## Step 1: Analyze Codebase
63
30
 
@@ -543,6 +510,50 @@ For each level (L9 → L1), create `.telos/agents/l[N]-[agent-name].md`:
543
510
  - Tools: [Detected linters - ESLint, Prettier, etc.]
544
511
  - Examples: Reject PR with linting errors
545
512
 
513
+ ### 4.2.1 Copy Sub-Agent Specialists
514
+
515
+ After creating the L1-L9 agent files, you MUST copy the specialized sub-agent files from the Telos framework templates.
516
+
517
+ **CRITICAL: Execute these bash commands immediately:**
518
+
519
+ ```bash
520
+ # Find telos-framework package location using Node module resolution
521
+ TELOS_PATH=$(node -p "require.resolve('telos-framework/package.json').replace('/package.json', '')")
522
+
523
+ # Create sub-agents directory
524
+ mkdir -p .telos/agents/sub-agents
525
+
526
+ # Copy all sub-agent files (15 specialized agents)
527
+ cp "$TELOS_PATH/templates/agents/sub-agents/"*.md .telos/agents/sub-agents/
528
+
529
+ # Copy sub-agent mapping guide
530
+ cp "$TELOS_PATH/templates/agents/SUB_AGENT_MAPPING.md" .telos/agents/
531
+ ```
532
+
533
+ **Verification:** After running these commands, confirm that `.telos/agents/sub-agents/` contains 15 markdown files and `.telos/agents/SUB_AGENT_MAPPING.md` exists.
534
+
535
+ **Sub-agents included:**
536
+ - api-design.md - REST/GraphQL API design
537
+ - code-reviewer.md - Code quality review
538
+ - component-implementation.md - UI component creation
539
+ - database-design.md - Database schema design
540
+ - devops.md - Deployment and CI/CD
541
+ - documentation.md - Technical documentation
542
+ - feature-implementation.md - Feature development
543
+ - infrastructure.md - Cloud infrastructure
544
+ - polish.md - Code optimization
545
+ - prd.md - Product requirements
546
+ - quality.md - Quality assurance
547
+ - refactoring.md - Code refactoring
548
+ - research.md - Technical research
549
+ - security-audit.md - Security review
550
+ - testing.md - Test creation
551
+
552
+ **Mapping file:**
553
+ - SUB_AGENT_MAPPING.md - Maps sub-agents to L1-L9 levels
554
+
555
+ These sub-agents can be invoked by the L1-L9 agents using the Task tool for specialized work.
556
+
546
557
  ### 4.3 Integrate with AI Assistant Configuration Files
547
558
 
548
559
  Check for and update existing AI assistant configuration files to reference
@@ -606,103 +617,13 @@ agent definitions.
606
617
  **If no AI assistant config files exist**, create `AGENTS.md` with Telos
607
618
  content.
608
619
 
609
- ### 4.4 Install Platform-Specific Commands
610
-
611
- Based on user's choice from Step 0:
612
-
613
- #### Option 1: Claude Code Commands
614
-
615
- Create slash commands in `.claude/commands/telos/`:
616
-
617
- **Files to create:**
618
-
619
- - `init.md` - This initialization command
620
- - `quick.md` - Quick initialization with auto-accept
621
- - `validate.md` - Validate code against Telos hierarchy
622
- - `status.md` - Show current Telos configuration
623
- - `reset.md` - Clear and reinitialize
624
-
625
- All use standard markdown format (already created by `telos init` CLI).
626
-
627
- #### Option 2: Opencode Commands
628
-
629
- Create commands in `.opencode/command/` using frontmatter format:
630
-
631
- **Template structure for Opencode:**
632
-
633
- ```markdown
634
- ---
635
- description: [Command description]
636
- ---
637
-
638
- [Command template/prompt here]
639
- ```
640
-
641
- **Files to create:**
642
-
643
- 1. `.opencode/command/telos-init.md`:
644
-
645
- ```markdown
646
- ---
647
- description: Initialize Telos multi-agent system for this project
648
- ---
649
-
650
- [Copy full content from .claude/commands/telos/init.md]
651
- ```
652
-
653
- 2. `.opencode/command/telos-quick.md`:
654
-
655
- ```markdown
656
- ---
657
- description: Quick Telos initialization with auto-accepted AI proposals
658
- ---
659
-
660
- [Copy full content from .claude/commands/telos/quick.md]
661
- ```
662
-
663
- 3. `.opencode/command/telos-validate.md`:
664
-
665
- ```markdown
666
- ---
667
- description: Validate current code against Telos purpose hierarchy
668
- ---
620
+ ### 4.4 Platform Commands Already Installed
669
621
 
670
- [Copy full content from .claude/commands/telos/validate.md]
671
- ```
622
+ **Note**: Platform-specific slash commands were already installed by `npx telos-framework init`. You don't need to create or modify command files - they already exist in:
623
+ - `.claude/commands/telos/` (if Claude Code was selected)
624
+ - `.opencode/command/` (if Opencode was selected)
672
625
 
673
- 4. `.opencode/command/telos-status.md`:
674
-
675
- ```markdown
676
- ---
677
- description: Show current Telos configuration and hierarchy
678
- ---
679
-
680
- [Copy full content from .claude/commands/telos/status.md]
681
- ```
682
-
683
- 5. `.opencode/command/telos-reset.md`:
684
-
685
- ```markdown
686
- ---
687
- description: Clear existing Telos installation and reinitialize
688
- ---
689
-
690
- [Copy full content from .claude/commands/telos/reset.md]
691
- ```
692
-
693
- **Note**: Opencode commands are installed directly in `.opencode/command/` with
694
- `telos-` prefix. This creates commands like `/telos-init` instead of
695
- `/telos/init`.
696
-
697
- #### Option 3: Both Platforms
698
-
699
- Create command files in both `.claude/commands/telos/` AND
700
- `.opencode/command/telos/`.
701
-
702
- #### Option 4: Skip Command Installation
703
-
704
- Only create `.telos/` directory structure and config file integrations. User
705
- will manually install commands later via `telos init` CLI.
626
+ Skip any command installation steps.
706
627
 
707
628
  ### 4.5 Create Orchestrator (Optional)
708
629
 
@@ -732,12 +653,15 @@ Once all files are generated, display:
732
653
 
733
654
  - `.telos/TELOS.md` - Ultimate purpose and hierarchy
734
655
  - `.telos/agents/l9-telos-guardian.md` through `l1-syntax-linter.md`
656
+ - `.telos/agents/sub-agents/` - 15 specialized sub-agents
657
+ - `.telos/agents/SUB_AGENT_MAPPING.md` - Sub-agent delegation guide
735
658
  - Updated AI assistant config files (AGENTS.md, CLAUDE.md, .cursorrules, etc.)
736
- - Platform commands: [List based on Step 0 choice]
737
- - Claude Code: `.claude/commands/telos/*.md` (5 commands)
738
- - Opencode: `.opencode/command/telos/*.md` (5 commands)
739
659
  - `logos/orchestrator.js` - Request router (if applicable)
740
660
 
661
+ **Platform commands** (already installed by CLI):
662
+ - Claude Code: `.claude/commands/telos/*.md` (5 commands)
663
+ - Opencode: `.opencode/command/telos-*.md` (5 commands)
664
+
741
665
  **Next steps:**
742
666
 
743
667
  1. Review the generated agent definitions in `.telos/agents/`
@@ -40,9 +40,31 @@ Create all files exactly as specified in `/telos-init` Step 4:
40
40
 
41
41
  - `.telos/TELOS.md`
42
42
  - `.telos/agents/l9-telos-guardian.md` through `l1-syntax-linter.md`
43
+ - `.telos/agents/sub-agents/` (15 specialized sub-agent files)
44
+ - `.telos/agents/SUB_AGENT_MAPPING.md` (sub-agent mapping guide)
43
45
  - `AGENTS.md` (if `.claude/` or `.opencode/` exists)
44
46
  - `logos/orchestrator.js` (if Node.js project)
45
47
 
48
+ ### Copy Sub-Agent Specialists
49
+
50
+ After generating the L1-L9 agent files, **EXECUTE these bash commands** to copy the specialized sub-agents:
51
+
52
+ ```bash
53
+ # Find telos-framework package location using Node module resolution
54
+ TELOS_PATH=$(node -p "require.resolve('telos-framework/package.json').replace('/package.json', '')")
55
+
56
+ # Create sub-agents directory
57
+ mkdir -p .telos/agents/sub-agents
58
+
59
+ # Copy all sub-agent files (15 specialized agents)
60
+ cp "$TELOS_PATH/templates/agents/sub-agents/"*.md .telos/agents/sub-agents/
61
+
62
+ # Copy sub-agent mapping guide
63
+ cp "$TELOS_PATH/templates/agents/SUB_AGENT_MAPPING.md" .telos/agents/
64
+ ```
65
+
66
+ **Verification:** Confirm that `.telos/agents/sub-agents/` contains 15 markdown files.
67
+
46
68
  ## Step 4: Display Summary
47
69
 
48
70
  Once complete, show:
@@ -66,7 +88,9 @@ Once complete, show:
66
88
 
67
89
  **Files created:**
68
90
  - `.telos/TELOS.md`
69
- - `.telos/agents/` (9 agent definitions)
91
+ - `.telos/agents/` (9 L1-L9 agent definitions)
92
+ - `.telos/agents/sub-agents/` (15 specialized sub-agents)
93
+ - `.telos/agents/SUB_AGENT_MAPPING.md`
70
94
  - `AGENTS.md`
71
95
  - `logos/orchestrator.js` (if applicable)
72
96
 
package/README.md CHANGED
@@ -111,16 +111,36 @@ Full integration with [OpenSpec](https://openspec.dev) workflow:
111
111
  - Validation uses OpenSpec archive
112
112
  - Telos lineage tracked throughout
113
113
 
114
- ### Technical Agent Delegation
114
+ ### Specialized Sub-Agent Delegation
115
115
 
116
- 9-level agents can delegate to specialized technical agents from
117
- [Claude Collective](https://github.com/alan-colver/claude-code-collective):
116
+ Each L1-L9 agent can delegate to 15 specialized sub-agents for deep technical expertise:
118
117
 
119
- - `research-agent` for technical investigation
120
- - `quality-agent` for comprehensive reviews
121
- - `testing-implementation-agent` for test suites
122
- - `devops-agent` for deployment
123
- - And more specialized agents
118
+ **Strategic & Planning:**
119
+ - `prd` - Product requirements and user stories
120
+ - `research` - Technical research and library comparison
121
+
122
+ **Implementation:**
123
+ - `api-design` - REST/GraphQL API design
124
+ - `component-implementation` - UI component creation
125
+ - `feature-implementation` - Feature development
126
+ - `database-design` - Database schema design
127
+
128
+ **Quality & Testing:**
129
+ - `code-reviewer` - Code quality review
130
+ - `quality` - Comprehensive QA (accessibility, security, performance)
131
+ - `security-audit` - Security vulnerability assessment
132
+ - `testing` - Test creation and strategy
133
+
134
+ **Operations & Documentation:**
135
+ - `devops` - Deployment and CI/CD
136
+ - `infrastructure` - Cloud infrastructure
137
+ - `documentation` - Technical documentation
138
+
139
+ **Optimization:**
140
+ - `refactoring` - Code restructuring
141
+ - `polish` - Performance optimization
142
+
143
+ All sub-agents integrated from [agents repository](https://github.com/accolver/agents/tree/main/agent)
124
144
 
125
145
  ## Commands
126
146
 
@@ -156,6 +176,9 @@ your-project/
156
176
  │ │ ├── LOGOS.md # Orchestrator instructions
157
177
  │ │ └── TOOLS.md # Tool registry and mappings
158
178
  │ ├── agents/ # Individual agent definitions (L1-L9)
179
+ │ │ ├── l9-telos-guardian.md through l1-syntax-linter.md
180
+ │ │ ├── sub-agents/ # 15 specialized sub-agents
181
+ │ │ └── SUB_AGENT_MAPPING.md # Sub-agent to level mapping
159
182
  │ └── templates/ # Platform-specific configs
160
183
  ├── .telos/ # Runtime state (gitignored)
161
184
  ├── TELOS.md # Symlink for visibility
@@ -106,6 +106,21 @@ Recommendation: MODIFY
106
106
  Modification needed: Ensure free tier preserves core value; premium only for advanced features
107
107
  \`\`\`
108
108
 
109
+ ## Sub-Agent Delegation
110
+
111
+ You can delegate specialized tasks to expert sub-agents using the Task tool:
112
+
113
+ **Primary Sub-Agents:**
114
+ - \`prd\` - Understanding product requirements at strategic level
115
+ - \`research\` - Strategic technology research and direction
116
+
117
+ **Example Delegation:**
118
+ \`\`\`
119
+ Use the research subagent to analyze whether adopting [technology] aligns with our ultimate purpose of ${l9.purpose}.
120
+ \`\`\`
121
+
122
+ See \`.telos/agents/SUB_AGENT_MAPPING.md\` for complete sub-agent documentation.
123
+
109
124
  ## Remember
110
125
 
111
126
  You are the guardian of meaning. Every line of code should ultimately serve our Telos. When in doubt, ask: "Why are we building this software?" The answer is always:
@@ -228,6 +243,26 @@ Status: FAIL
228
243
  Cannot proceed until critical issues resolved.
229
244
  \`\`\`
230
245
 
246
+ ## Sub-Agent Delegation
247
+
248
+ You can delegate specialized tasks to expert sub-agents using the Task tool:
249
+
250
+ **Primary Sub-Agents:**
251
+ - \`code-reviewer\` - Comprehensive code quality review
252
+ - \`quality\` - Quality assurance including accessibility, security, performance
253
+ - \`security-audit\` - Security vulnerability assessment
254
+
255
+ **Secondary Sub-Agents:**
256
+ - \`testing\` - Test quality validation
257
+ - \`refactoring\` - Code cleanup and refactoring
258
+
259
+ **Example Delegation:**
260
+ \`\`\`
261
+ Use the quality subagent to review [files] for quality, accessibility, security, and performance issues.
262
+ \`\`\`
263
+
264
+ See \`.telos/agents/SUB_AGENT_MAPPING.md\` for complete sub-agent documentation.
265
+
231
266
  ## Remember
232
267
 
233
268
  Clean code structure is the foundation. Without L1 integrity, higher-level abstractions crumble. Hold the line on quality.
@@ -354,6 +389,26 @@ Status: PASS
354
389
  Serves: L3 PricingComponent - enables dynamic pricing logic
355
390
  \`\`\`
356
391
 
392
+ ## Sub-Agent Delegation
393
+
394
+ You can delegate specialized tasks to expert sub-agents using the Task tool:
395
+
396
+ **Primary Sub-Agents:**
397
+ - \`feature-implementation\` - Feature and function implementation
398
+ - \`refactoring\` - Function refactoring and optimization
399
+
400
+ **Secondary Sub-Agents:**
401
+ - \`polish\` - Code optimization and performance tuning
402
+ - \`database-design\` - Data access function implementation
403
+ - \`testing\` - Unit test creation
404
+
405
+ **Example Delegation:**
406
+ \`\`\`
407
+ Use the feature-implementation subagent to implement the [function] with proper error handling and validation.
408
+ \`\`\`
409
+
410
+ See \`.telos/agents/SUB_AGENT_MAPPING.md\` for complete sub-agent documentation.
411
+
357
412
  ## Remember
358
413
 
359
414
  Functions are atoms of behavior. Each must be:
@@ -89,6 +89,14 @@ Serves: [confirms higher-level contribution]
89
89
 
90
90
  ${getIntegration(level)}
91
91
 
92
+ ## Sub-Agent Delegation
93
+
94
+ You can delegate specialized tasks to expert sub-agents using the Task tool:
95
+
96
+ ${getSubAgents(level)}
97
+
98
+ See \`.telos/agents/SUB_AGENT_MAPPING.md\` for complete sub-agent documentation.
99
+
92
100
  ## Remember
93
101
 
94
102
  Your work at ${level} is essential to the hierarchy. Maintain quality and alignment with the purpose: "${hierarchyData.purpose}"
@@ -193,4 +201,75 @@ function getIntegration(level) {
193
201
  return integration[level] || '';
194
202
  }
195
203
 
204
+ function getSubAgents(level) {
205
+ const subAgents = {
206
+ L3: `**Primary Sub-Agents:**
207
+ - \`component-implementation\` - Component creation and design
208
+ - \`feature-implementation\` - Feature-level component implementation
209
+
210
+ **Secondary Sub-Agents:**
211
+ - \`refactoring\` - Component refactoring
212
+ - \`quality\` - Component quality review
213
+ - \`testing\` - Component testing
214
+
215
+ **Example Delegation:**
216
+ \`\`\`
217
+ Use the component-implementation subagent to create a reusable [component] that follows our design system.
218
+ \`\`\``,
219
+ L4: `**Primary Sub-Agents:**
220
+ - \`api-design\` - REST/GraphQL API design and contracts
221
+ - \`database-design\` - Data schema and contract definition
222
+
223
+ **Secondary Sub-Agents:**
224
+ - \`devops\` - API deployment infrastructure
225
+ - \`documentation\` - API documentation
226
+ - \`testing\` - API and contract testing
227
+
228
+ **Example Delegation:**
229
+ \`\`\`
230
+ Use the api-design subagent to design a RESTful API for [resource] with proper authentication and validation.
231
+ \`\`\``,
232
+ L5: `**Primary Sub-Agents:**
233
+ - \`testing\` - User journey and E2E testing
234
+ - \`quality\` - Workflow quality assurance
235
+
236
+ **Secondary Sub-Agents:**
237
+ - \`component-implementation\` - User interaction implementation
238
+
239
+ **Example Delegation:**
240
+ \`\`\`
241
+ Use the testing subagent to create E2E tests that validate the [workflow] user journey.
242
+ \`\`\``,
243
+ L6: `**Primary Sub-Agents:**
244
+ - \`component-implementation\` - UI component creation with accessibility
245
+ - \`research\` - UX patterns and accessibility research
246
+
247
+ **Secondary Sub-Agents:**
248
+ - \`quality\` - Accessibility validation (WCAG 2.1 AA)
249
+ - \`testing\` - User journey testing
250
+
251
+ **Example Delegation:**
252
+ \`\`\`
253
+ Use the component-implementation subagent to create an accessible [component] following WCAG 2.1 AA standards.
254
+ \`\`\``,
255
+ L7: `**Primary Sub-Agents:**
256
+ - \`prd\` - Product requirements and feature specifications
257
+ - \`research\` - Feature research and best practices
258
+
259
+ **Example Delegation:**
260
+ \`\`\`
261
+ Use the prd subagent to create a comprehensive PRD for [feature] with user stories and acceptance criteria.
262
+ \`\`\``,
263
+ L8: `**Primary Sub-Agents:**
264
+ - \`prd\` - Understanding market needs and user requirements
265
+ - \`research\` - Competitive analysis and market trends
266
+
267
+ **Example Delegation:**
268
+ \`\`\`
269
+ Use the prd subagent to create user stories that demonstrate business value for [feature].
270
+ \`\`\``
271
+ };
272
+ return subAgents[level] || '';
273
+ }
274
+
196
275
  module.exports = { generateAllAgents };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telos-framework",
3
- "version": "0.7.2",
3
+ "version": "0.8.2",
4
4
  "description": "Telos-driven Multi-Agent Development Framework - A philosophically-grounded AI collective for purpose-aligned software development",
5
5
  "main": "index.js",
6
6
  "bin": {