telos-framework 0.1.4 → 0.3.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 (104) hide show
  1. package/.claude/agents/behavioral-transformation-agent.md +144 -0
  2. package/.claude/agents/command-system-agent.md +335 -0
  3. package/.claude/agents/completion-gate.md +71 -0
  4. package/.claude/agents/component-implementation-agent.md +174 -0
  5. package/.claude/agents/devops-agent.md +128 -0
  6. package/.claude/agents/dynamic-agent-creator.md +103 -0
  7. package/.claude/agents/enhanced-project-manager-agent.md +145 -0
  8. package/.claude/agents/enhanced-quality-gate.md +54 -0
  9. package/.claude/agents/feature-implementation-agent.md +148 -0
  10. package/.claude/agents/functional-testing-agent.md +51 -0
  11. package/.claude/agents/hook-integration-agent.md +204 -0
  12. package/.claude/agents/infrastructure-implementation-agent.md +175 -0
  13. package/.claude/agents/lib/research-analyzer.js +470 -0
  14. package/.claude/agents/metrics-collection-agent.md +374 -0
  15. package/.claude/agents/npx-package-agent.md +246 -0
  16. package/.claude/agents/polish-implementation-agent.md +151 -0
  17. package/.claude/agents/prd-agent.md +76 -0
  18. package/.claude/agents/prd-mvp.md +101 -0
  19. package/.claude/agents/prd-research-agent.md +482 -0
  20. package/.claude/agents/quality-agent.md +128 -0
  21. package/.claude/agents/readiness-gate.md +104 -0
  22. package/.claude/agents/research-agent.md +173 -0
  23. package/.claude/agents/routing-agent.md +108 -0
  24. package/.claude/agents/task-checker.md +163 -0
  25. package/.claude/agents/task-executor.md +107 -0
  26. package/.claude/agents/task-orchestrator.md +343 -0
  27. package/.claude/agents/tdd-validation-agent.md +187 -0
  28. package/.claude/agents/testing-implementation-agent.md +151 -0
  29. package/.claude/agents/van-maintenance-agent.md +64 -0
  30. package/.claude/agents/workflow-agent.md +87 -0
  31. package/.claude/commands/autocompact.md +41 -0
  32. package/.claude/commands/continue-handoff.md +98 -0
  33. package/.claude/commands/mock.md +45 -0
  34. package/.claude/commands/reset-handoff.md +59 -0
  35. package/.claude/commands/telos/init.md +326 -0
  36. package/.claude/commands/telos/quick.md +90 -0
  37. package/.claude/commands/telos/reset.md +100 -0
  38. package/.claude/commands/telos/status.md +170 -0
  39. package/.claude/commands/telos/validate.md +143 -0
  40. package/.claude/commands/tm/add-dependency/add-dependency.md +55 -0
  41. package/.claude/commands/tm/add-subtask/add-subtask.md +76 -0
  42. package/.claude/commands/tm/add-subtask/convert-task-to-subtask.md +71 -0
  43. package/.claude/commands/tm/add-task/add-task.md +78 -0
  44. package/.claude/commands/tm/analyze-complexity/analyze-complexity.md +121 -0
  45. package/.claude/commands/tm/clear-subtasks/clear-all-subtasks.md +93 -0
  46. package/.claude/commands/tm/clear-subtasks/clear-subtasks.md +86 -0
  47. package/.claude/commands/tm/complexity-report/complexity-report.md +117 -0
  48. package/.claude/commands/tm/expand/expand-all-tasks.md +51 -0
  49. package/.claude/commands/tm/expand/expand-task.md +49 -0
  50. package/.claude/commands/tm/fix-dependencies/fix-dependencies.md +81 -0
  51. package/.claude/commands/tm/generate/generate-tasks.md +121 -0
  52. package/.claude/commands/tm/help.md +81 -0
  53. package/.claude/commands/tm/init/init-project-quick.md +46 -0
  54. package/.claude/commands/tm/init/init-project.md +50 -0
  55. package/.claude/commands/tm/learn.md +103 -0
  56. package/.claude/commands/tm/list/list-tasks-by-status.md +39 -0
  57. package/.claude/commands/tm/list/list-tasks-with-subtasks.md +29 -0
  58. package/.claude/commands/tm/list/list-tasks.md +43 -0
  59. package/.claude/commands/tm/models/setup-models.md +51 -0
  60. package/.claude/commands/tm/models/view-models.md +51 -0
  61. package/.claude/commands/tm/next/next-task.md +66 -0
  62. package/.claude/commands/tm/parse-prd/parse-prd-with-research.md +48 -0
  63. package/.claude/commands/tm/parse-prd/parse-prd.md +49 -0
  64. package/.claude/commands/tm/remove-dependency/remove-dependency.md +62 -0
  65. package/.claude/commands/tm/remove-subtask/remove-subtask.md +84 -0
  66. package/.claude/commands/tm/remove-task/remove-task.md +107 -0
  67. package/.claude/commands/tm/set-status/to-cancelled.md +55 -0
  68. package/.claude/commands/tm/set-status/to-deferred.md +47 -0
  69. package/.claude/commands/tm/set-status/to-done.md +44 -0
  70. package/.claude/commands/tm/set-status/to-in-progress.md +36 -0
  71. package/.claude/commands/tm/set-status/to-pending.md +32 -0
  72. package/.claude/commands/tm/set-status/to-review.md +40 -0
  73. package/.claude/commands/tm/setup/install-taskmaster.md +117 -0
  74. package/.claude/commands/tm/setup/quick-install-taskmaster.md +22 -0
  75. package/.claude/commands/tm/show/show-task.md +82 -0
  76. package/.claude/commands/tm/status/project-status.md +64 -0
  77. package/.claude/commands/tm/sync-readme/sync-readme.md +117 -0
  78. package/.claude/commands/tm/tm-main.md +146 -0
  79. package/.claude/commands/tm/update/update-single-task.md +119 -0
  80. package/.claude/commands/tm/update/update-task.md +72 -0
  81. package/.claude/commands/tm/update/update-tasks-from-id.md +108 -0
  82. package/.claude/commands/tm/utils/analyze-project.md +97 -0
  83. package/.claude/commands/tm/validate-dependencies/validate-dependencies.md +71 -0
  84. package/.claude/commands/tm/workflows/auto-implement-tasks.md +97 -0
  85. package/.claude/commands/tm/workflows/command-pipeline.md +77 -0
  86. package/.claude/commands/tm/workflows/smart-workflow.md +55 -0
  87. package/.claude/commands/van.md +150 -0
  88. package/.claude/docs/README.md +214 -0
  89. package/.claude/docs/TROUBLESHOOTING.md +126 -0
  90. package/.claude/hooks/block-destructive-commands.sh +243 -0
  91. package/.claude/hooks/collective-metrics.sh +291 -0
  92. package/.claude/hooks/directive-enforcer.sh +117 -0
  93. package/.claude/hooks/load-behavioral-system.sh +49 -0
  94. package/.claude/hooks/routing-executor.sh +4 -0
  95. package/.claude/hooks/test-driven-handoff.sh +653 -0
  96. package/.claude/settings.json +125 -0
  97. package/README.md +39 -15
  98. package/lib/commands/init-state.js +102 -0
  99. package/lib/commands/init.js +58 -95
  100. package/lib/installers/memory-files.js +77 -0
  101. package/lib/installers/slash-commands.js +77 -0
  102. package/package.json +7 -2
  103. package/templates/AGENTS.md +79 -0
  104. package/templates/CLAUDE.md +54 -0
@@ -0,0 +1,125 @@
1
+ {
2
+ "deniedTools": [
3
+ "mcp__task-master__initialize_project"
4
+ ],
5
+ "hooks": {
6
+ "SessionStart": [
7
+ {
8
+ "matcher": "startup",
9
+ "hooks": [
10
+ {
11
+ "type": "command",
12
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/load-behavioral-system.sh"
13
+ }
14
+ ]
15
+ },
16
+ {
17
+ "matcher": "resume",
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/load-behavioral-system.sh"
22
+ }
23
+ ]
24
+ },
25
+ {
26
+ "matcher": "clear",
27
+ "hooks": [
28
+ {
29
+ "type": "command",
30
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/load-behavioral-system.sh"
31
+ }
32
+ ]
33
+ }
34
+ ],
35
+ "PreToolUse": [
36
+ {
37
+ "matcher": "Bash",
38
+ "hooks": [
39
+ {
40
+ "type": "command",
41
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/block-destructive-commands.sh"
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "matcher": "Write|Edit|MultiEdit",
47
+ "hooks": [
48
+ {
49
+ "type": "command",
50
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/directive-enforcer.sh"
51
+ },
52
+ {
53
+ "type": "command",
54
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/collective-metrics.sh"
55
+ }
56
+ ]
57
+ },
58
+ {
59
+ "matcher": ".*",
60
+ "hooks": [
61
+ {
62
+ "type": "command",
63
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/collective-metrics.sh"
64
+ }
65
+ ]
66
+ }
67
+ ],
68
+ "PostToolUse": [
69
+ {
70
+ "matcher": "Task",
71
+ "hooks": [
72
+ {
73
+ "type": "command",
74
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/test-driven-handoff.sh"
75
+ },
76
+ {
77
+ "type": "command",
78
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/collective-metrics.sh"
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "matcher": "Write|Edit|MultiEdit",
84
+ "hooks": [
85
+ {
86
+ "type": "command",
87
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/collective-metrics.sh"
88
+ }
89
+ ]
90
+ }
91
+ ],
92
+ "SubagentStop": [
93
+ {
94
+ "matcher": "mock-.*",
95
+ "hooks": [
96
+ {
97
+ "type": "command",
98
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/mock-deliverable-generator.sh"
99
+ },
100
+ {
101
+ "type": "command",
102
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/test-driven-handoff.sh"
103
+ },
104
+ {
105
+ "type": "command",
106
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/collective-metrics.sh"
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "matcher": ".*",
112
+ "hooks": [
113
+ {
114
+ "type": "command",
115
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/test-driven-handoff.sh"
116
+ },
117
+ {
118
+ "type": "command",
119
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/collective-metrics.sh"
120
+ }
121
+ ]
122
+ }
123
+ ]
124
+ }
125
+ }
package/README.md CHANGED
@@ -66,22 +66,35 @@ telos init
66
66
 
67
67
  ## Quick Start
68
68
 
69
- ### 1. Initialize Your Project
69
+ ### 1. Install Telos Commands
70
70
 
71
71
  ```bash
72
72
  cd your-project
73
73
  telos init
74
74
  ```
75
75
 
76
- The interactive initialization will:
76
+ This installs Telos slash commands to `.claude/commands/telos/` and sets up
77
+ `AGENTS.md` and `CLAUDE.md` templates.
77
78
 
78
- - Capture your project's ultimate purpose (Telos)
79
- - Decompose it into a 9-level hierarchy
80
- - Discover available tools and MCP servers
81
- - Generate adapted agent definitions
82
- - Create platform-specific configurations
79
+ ### 2. Initialize with AI
83
80
 
84
- ### 2. Start Development
81
+ Open your project in Claude Code (or your AI coding assistant) and run:
82
+
83
+ ```
84
+ /telos-init
85
+ ```
86
+
87
+ The AI will:
88
+
89
+ - Analyze your codebase (README, package files, source structure)
90
+ - Propose a complete 9-level purpose hierarchy
91
+ - Auto-generate technical layers (L1-L4) from detected tools
92
+ - Ask you to review strategic layers (L9-L5)
93
+ - Generate all agent definitions and configuration files
94
+
95
+ **Time: ~2 minutes** (vs. 10 minutes with CLI prompts)
96
+
97
+ ### 3. Start Development
85
98
 
86
99
  Your AI assistants now operate as a coherent multi-agent collective:
87
100
 
@@ -101,10 +114,10 @@ L1 Syntax-Linter: Ensures code quality
101
114
  (Bottom-up validation confirms alignment)
102
115
  ```
103
116
 
104
- ### 3. Validate Alignment
117
+ ### 4. Validate Alignment
105
118
 
106
- ```bash
107
- telos validate
119
+ ```
120
+ /telos-validate
108
121
  ```
109
122
 
110
123
  Check that all work traces back to your ultimate Telos.
@@ -155,14 +168,25 @@ Full integration with [OpenSpec](https://openspec.dev) workflow:
155
168
 
156
169
  ## Commands
157
170
 
171
+ ### CLI Commands
172
+
158
173
  ```bash
159
- telos init # Initialize Telos in your project
160
- telos status # Show current configuration
161
- telos rediscover # Update tool detection
162
- telos validate # Check Telos alignment
174
+ telos init # Install Telos slash commands and memory files
163
175
  telos --help # Show all commands
164
176
  ```
165
177
 
178
+ ### Slash Commands (AI-Native)
179
+
180
+ Use these in Claude Code, OpenCode, or Cursor:
181
+
182
+ ```
183
+ /telos-init # Initialize Telos with AI-driven analysis
184
+ /telos-quick # Fast initialization (auto-accept AI proposals)
185
+ /telos-validate # Check code alignment with purpose hierarchy
186
+ /telos-status # Show current Telos configuration
187
+ /telos-reset # Clear and reinitialize
188
+ ```
189
+
166
190
  ## Project Structure
167
191
 
168
192
  After initialization:
@@ -0,0 +1,102 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const STATE_FILE = '.telos-init-state.json';
5
+
6
+ /**
7
+ * Get the state file path for the current directory
8
+ */
9
+ function getStateFilePath(cwd = process.cwd()) {
10
+ return path.join(cwd, STATE_FILE);
11
+ }
12
+
13
+ /**
14
+ * Load existing initialization state if present
15
+ */
16
+ function loadState(cwd = process.cwd()) {
17
+ const statePath = getStateFilePath(cwd);
18
+
19
+ if (!fs.existsSync(statePath)) {
20
+ return null;
21
+ }
22
+
23
+ try {
24
+ const content = fs.readFileSync(statePath, 'utf8');
25
+ return JSON.parse(content);
26
+ } catch (error) {
27
+ return null;
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Save initialization state
33
+ */
34
+ function saveState(state, cwd = process.cwd()) {
35
+ const statePath = getStateFilePath(cwd);
36
+
37
+ try {
38
+ fs.writeFileSync(statePath, JSON.stringify(state, null, 2), 'utf8');
39
+ return true;
40
+ } catch (error) {
41
+ return false;
42
+ }
43
+ }
44
+
45
+ /**
46
+ * Update specific phase data in state
47
+ */
48
+ function updatePhase(phase, data, cwd = process.cwd()) {
49
+ const currentState = loadState(cwd) || { phases: {}, timestamp: new Date().toISOString() };
50
+
51
+ currentState.phases[phase] = {
52
+ ...data,
53
+ completedAt: new Date().toISOString()
54
+ };
55
+ currentState.lastPhase = phase;
56
+ currentState.lastUpdated = new Date().toISOString();
57
+
58
+ return saveState(currentState, cwd);
59
+ }
60
+
61
+ /**
62
+ * Clear initialization state (call on successful completion)
63
+ */
64
+ function clearState(cwd = process.cwd()) {
65
+ const statePath = getStateFilePath(cwd);
66
+
67
+ try {
68
+ if (fs.existsSync(statePath)) {
69
+ fs.unlinkSync(statePath);
70
+ }
71
+ return true;
72
+ } catch (error) {
73
+ return false;
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Check if a specific phase is completed
79
+ */
80
+ function isPhaseComplete(state, phase) {
81
+ return !!(state && state.phases && state.phases[phase]);
82
+ }
83
+
84
+ /**
85
+ * Get phase data if it exists
86
+ */
87
+ function getPhaseData(state, phase) {
88
+ if (state && state.phases && state.phases[phase]) {
89
+ return state.phases[phase].data;
90
+ }
91
+ return null;
92
+ }
93
+
94
+ module.exports = {
95
+ loadState,
96
+ saveState,
97
+ updatePhase,
98
+ clearState,
99
+ isPhaseComplete,
100
+ getPhaseData,
101
+ getStateFilePath
102
+ };
@@ -1,117 +1,80 @@
1
1
  const chalk = require('chalk');
2
- const ora = require('ora');
3
2
  const path = require('path');
4
- const { discoverTelos } = require('../discovery/telos-discovery');
5
- const { buildHierarchy } = require('../discovery/hierarchy-builder');
6
- const { generateTelosMd } = require('../generators/telos-md-generator');
7
- const { generateL9Agent, generateL1Agent, generateL2Agent } = require('../generators/agent-generator');
8
- const { generateAllAgents } = require('../generators/all-agents-generator');
9
- const { scanProject } = require('../discovery/code-scanner');
10
- const { discoverMcpServers, mapMcpToCapabilities } = require('../discovery/mcp-discovery');
11
- const { mapToolsToLevels, getToolRecommendations } = require('../discovery/tool-mapper');
12
- const { generateToolsMd } = require('../generators/tools-md-generator');
13
- const { generateLogosMd } = require('../generators/logos-md-generator');
14
- const { consolidateAgents } = require('../generators/agents-md-generator');
15
- const { detectPlatforms, getPlatformConfig } = require('../platform/platform-detector');
16
- const { createSymlinks } = require('../platform/symlink-creator');
3
+ const { installSlashCommands } = require('../installers/slash-commands');
4
+ const { setupMemoryFiles } = require('../installers/memory-files');
17
5
 
18
6
  async function initCommand(options) {
19
- console.log(chalk.bold.cyan('\n╔════════════════════════════════════════╗'));
20
- console.log(chalk.bold.cyan('║ Telos Multi-Agent Initialization ║'));
21
- console.log(chalk.bold.cyan('╚════════════════════════════════════════╝\n'));
7
+ console.log(chalk.bold.cyan('\n╔══════════════════════════════════════════╗'));
8
+ console.log(chalk.bold.cyan('║ Telos Framework Installation ║'));
9
+ console.log(chalk.bold.cyan('╚══════════════════════════════════════════╝\n'));
22
10
 
23
11
  try {
24
- const telosData = await discoverTelos(options);
25
-
26
- let hierarchy;
27
-
28
- if (options.quick) {
29
- const spinner = ora('Building purpose hierarchy...').start();
30
- hierarchy = await buildHierarchy(telosData, options);
31
- spinner.succeed('Purpose hierarchy built');
32
- } else {
33
- hierarchy = await buildHierarchy(telosData, options);
34
- console.log(chalk.green('\n✓ Purpose hierarchy built\n'));
35
- }
36
-
37
- const spinner = ora('Generating TELOS.md...').start();
38
- const telosPath = path.join(process.cwd(), 'telos', 'content', 'TELOS.md');
39
- await generateTelosMd(hierarchy, telosPath);
40
- spinner.succeed(`Generated ${telosPath}`);
41
-
42
- spinner.start('Generating L9 Telos-Guardian agent...');
43
- const l9AgentPath = path.join(process.cwd(), 'telos', 'agents', 'l9-telos-guardian.md');
44
- await generateL9Agent(hierarchy, l9AgentPath);
45
- spinner.succeed(`Generated ${l9AgentPath}`);
46
-
47
- console.log(chalk.green('\n✓ Phase 1: Telos Discovery Complete\n'));
48
-
49
- spinner.start('Scanning project for tools and frameworks...');
50
- const projectScan = await scanProject(process.cwd());
51
- spinner.succeed('Project scan complete');
52
-
53
- spinner.start('Discovering MCP servers...');
54
- const mcpServers = await discoverMcpServers();
55
- const mcpCapabilities = mapMcpToCapabilities(mcpServers);
56
- spinner.succeed(`Found ${mcpServers.length} MCP server(s)`);
57
-
58
- spinner.start('Mapping tools to agent levels...');
59
- const levelTools = mapToolsToLevels(projectScan, mcpCapabilities);
60
- const recommendations = getToolRecommendations(levelTools);
61
- spinner.succeed('Tool mapping complete');
62
-
63
- spinner.start('Generating TOOLS.md...');
64
- const toolsPath = path.join(process.cwd(), 'telos', 'content', 'TOOLS.md');
65
- await generateToolsMd(levelTools, projectScan, mcpServers, recommendations, toolsPath);
66
- spinner.succeed(`Generated ${toolsPath}`);
12
+ const projectRoot = process.cwd();
67
13
 
68
- console.log(chalk.green('\n✓ Phase 2: Tool Discovery Complete\n'));
14
+ console.log(chalk.cyan('Installing Telos slash commands...\n'));
69
15
 
70
- spinner.start('Generating all agent definitions...');
71
- const agentsDir = path.join(process.cwd(), 'telos', 'agents');
16
+ const commandResults = await installSlashCommands(projectRoot);
72
17
 
73
- await generateL1Agent(hierarchy, levelTools.L1.tools, path.join(agentsDir, 'l1-syntax-linter.md'));
74
- await generateL2Agent(hierarchy, levelTools.L2.tools, path.join(agentsDir, 'l2-function-author.md'));
75
- await generateAllAgents(hierarchy, levelTools, agentsDir);
76
-
77
- spinner.succeed('Generated all 9 agent definitions');
78
-
79
- console.log(chalk.green('\n✓ Phase 3: Agent Generation Complete\n'));
80
-
81
- spinner.start('Generating Logos orchestrator documentation...');
82
- const logosPath = path.join(process.cwd(), 'telos', 'content', 'LOGOS.md');
83
- await generateLogosMd(logosPath);
84
- spinner.succeed(`Generated ${logosPath}`);
85
-
86
- console.log(chalk.green('\n✓ Phase 4: Logos Orchestrator Complete\n'));
18
+ for (const { platform, results } of commandResults) {
19
+ const successful = results.filter(r => r.success);
20
+ if (successful.length > 0) {
21
+ console.log(chalk.green(`✓ Installed ${successful.length} command(s) for ${platform}:`));
22
+ successful.forEach(r => {
23
+ console.log(chalk.dim(` - /telos-${r.file.replace('.md', '')}`));
24
+ });
25
+ }
26
+
27
+ const failed = results.filter(r => !r.success);
28
+ if (failed.length > 0) {
29
+ console.log(chalk.yellow(`⚠ Failed to install ${failed.length} command(s):`));
30
+ failed.forEach(r => {
31
+ console.log(chalk.dim(` - ${r.file}: ${r.error}`));
32
+ });
33
+ }
34
+ }
87
35
 
88
- spinner.start('Consolidating agents into AGENTS.md...');
89
- const agentsMdPath = path.join(process.cwd(), 'telos', 'content', 'AGENTS.md');
90
- await consolidateAgents(agentsDir, agentsMdPath);
91
- spinner.succeed(`Generated ${agentsMdPath}`);
36
+ console.log(chalk.cyan('\nSetting up memory files...\n'));
92
37
 
93
- spinner.start('Detecting platforms and creating symlinks...');
94
- const platforms = await detectPlatforms(process.cwd());
95
- let symlinkCount = 0;
38
+ const memoryResults = await setupMemoryFiles(projectRoot);
96
39
 
97
- for (const platform of platforms) {
98
- const config = getPlatformConfig(platform.name);
99
- const results = await createSymlinks(process.cwd(), config);
100
- symlinkCount += results.filter(r => r.success).length;
40
+ if (memoryResults.agents.created) {
41
+ console.log(chalk.green('✓ Created AGENTS.md'));
42
+ } else if (memoryResults.agents.updated) {
43
+ console.log(chalk.green('✓ Updated AGENTS.md with Telos content'));
44
+ } else {
45
+ console.log(chalk.dim('✓ AGENTS.md already contains Telos content'));
101
46
  }
102
47
 
103
- spinner.succeed(`Created ${symlinkCount} platform symlink(s) for ${platforms.map(p => p.name).join(', ')}`);
48
+ if (memoryResults.claude.created) {
49
+ console.log(chalk.green('✓ Created CLAUDE.md'));
50
+ } else if (memoryResults.claude.updated) {
51
+ console.log(chalk.green('✓ Updated CLAUDE.md with Telos instructions'));
52
+ } else {
53
+ console.log(chalk.dim('✓ CLAUDE.md already contains Telos content'));
54
+ }
104
55
 
105
- console.log(chalk.green('\n✓ Phase 5: Platform Configuration Complete\n'));
106
-
107
- console.log(chalk.cyan('Your Telos has been captured in:'));
108
- console.log(chalk.bold(` ${telosPath}\n`));
56
+ console.log(chalk.bold.cyan('\n╔══════════════════════════════════════════╗'));
57
+ console.log(chalk.bold.cyan('║ Installation Complete! ║'));
58
+ console.log(chalk.bold.cyan('╚══════════════════════════════════════════╝\n'));
59
+
60
+ console.log(chalk.bold.white('Next steps:\n'));
61
+ console.log(chalk.white('1. Open this project in Claude Code (or your AI coding assistant)'));
62
+ console.log(chalk.white('2. Run the slash command: ') + chalk.bold.green('/telos-init'));
63
+ console.log(chalk.white('3. Follow the interactive setup to configure your purpose hierarchy\n'));
64
+
65
+ console.log(chalk.dim('Available commands after initialization:'));
66
+ console.log(chalk.dim(' /telos-init - Initialize Telos with interactive review'));
67
+ console.log(chalk.dim(' /telos-quick - Quick initialization (auto-accept AI proposals)'));
68
+ console.log(chalk.dim(' /telos-validate - Check code alignment with purpose'));
69
+ console.log(chalk.dim(' /telos-status - Show current Telos configuration'));
70
+ console.log(chalk.dim(' /telos-reset - Clear and reinitialize\n'));
109
71
 
110
72
  } catch (error) {
111
- console.error(chalk.red('\n✗ Initialization failed:'), error.message);
73
+ console.error(chalk.red('\n✗ Installation failed:'), error.message);
112
74
  if (options.verbose) {
113
- console.error(error);
75
+ console.error(error.stack);
114
76
  }
77
+ console.log(chalk.yellow('\nPlease check the error and try again.\n'));
115
78
  process.exit(1);
116
79
  }
117
80
  }
@@ -0,0 +1,77 @@
1
+ const fs = require('fs').promises;
2
+ const path = require('path');
3
+
4
+ async function fileExists(filePath) {
5
+ try {
6
+ await fs.access(filePath);
7
+ return true;
8
+ } catch {
9
+ return false;
10
+ }
11
+ }
12
+
13
+ async function readTemplate(templateName) {
14
+ const templatePath = path.join(__dirname, '../../templates', templateName);
15
+ return await fs.readFile(templatePath, 'utf-8');
16
+ }
17
+
18
+ async function createAgentsMd(projectRoot) {
19
+ const agentsMdPath = path.join(projectRoot, 'AGENTS.md');
20
+
21
+ if (await fileExists(agentsMdPath)) {
22
+ const existingContent = await fs.readFile(agentsMdPath, 'utf-8');
23
+
24
+ if (existingContent.includes('Telos Framework')) {
25
+ return { created: false, updated: false, path: agentsMdPath, reason: 'already-exists' };
26
+ }
27
+
28
+ const template = await readTemplate('AGENTS.md');
29
+ const updatedContent = existingContent + '\n\n' + template;
30
+ await fs.writeFile(agentsMdPath, updatedContent);
31
+
32
+ return { created: false, updated: true, path: agentsMdPath };
33
+ }
34
+
35
+ const template = await readTemplate('AGENTS.md');
36
+ await fs.writeFile(agentsMdPath, template);
37
+
38
+ return { created: true, updated: false, path: agentsMdPath };
39
+ }
40
+
41
+ async function createClaudeMd(projectRoot) {
42
+ const claudeMdPath = path.join(projectRoot, 'CLAUDE.md');
43
+
44
+ if (await fileExists(claudeMdPath)) {
45
+ const existingContent = await fs.readFile(claudeMdPath, 'utf-8');
46
+
47
+ if (existingContent.includes('Telos Framework')) {
48
+ return { created: false, updated: false, path: claudeMdPath, reason: 'already-exists' };
49
+ }
50
+
51
+ const template = await readTemplate('CLAUDE.md');
52
+ const updatedContent = existingContent + '\n\n' + template;
53
+ await fs.writeFile(claudeMdPath, updatedContent);
54
+
55
+ return { created: false, updated: true, path: claudeMdPath };
56
+ }
57
+
58
+ const template = await readTemplate('CLAUDE.md');
59
+ await fs.writeFile(claudeMdPath, template);
60
+
61
+ return { created: true, updated: false, path: claudeMdPath };
62
+ }
63
+
64
+ async function setupMemoryFiles(projectRoot) {
65
+ const results = {
66
+ agents: await createAgentsMd(projectRoot),
67
+ claude: await createClaudeMd(projectRoot)
68
+ };
69
+
70
+ return results;
71
+ }
72
+
73
+ module.exports = {
74
+ createAgentsMd,
75
+ createClaudeMd,
76
+ setupMemoryFiles
77
+ };
@@ -0,0 +1,77 @@
1
+ const fs = require('fs').promises;
2
+ const path = require('path');
3
+ const chalk = require('chalk');
4
+
5
+ async function detectPlatform(projectRoot) {
6
+ const claudeDir = path.join(projectRoot, '.claude');
7
+ const opencodeDir = path.join(projectRoot, '.opencode');
8
+
9
+ const hasClaudeDir = await fs.access(claudeDir).then(() => true).catch(() => false);
10
+ const hasOpencodeDir = await fs.access(opencodeDir).then(() => true).catch(() => false);
11
+
12
+ const platforms = [];
13
+ if (hasClaudeDir) platforms.push('claude');
14
+ if (hasOpencodeDir) platforms.push('opencode');
15
+
16
+ if (platforms.length === 0) {
17
+ platforms.push('claude');
18
+ }
19
+
20
+ return platforms;
21
+ }
22
+
23
+ async function ensureDirectories(projectRoot, platform) {
24
+ const commandsDir = platform === 'claude'
25
+ ? path.join(projectRoot, '.claude', 'commands', 'telos')
26
+ : path.join(projectRoot, '.opencode', 'command', 'telos');
27
+
28
+ await fs.mkdir(commandsDir, { recursive: true });
29
+ return commandsDir;
30
+ }
31
+
32
+ async function copyCommandFiles(projectRoot, platform) {
33
+ const sourceDir = path.join(__dirname, '../../.claude/commands/telos');
34
+ const targetDir = await ensureDirectories(projectRoot, platform);
35
+
36
+ const commandFiles = [
37
+ 'init.md',
38
+ 'quick.md',
39
+ 'reset.md',
40
+ 'validate.md',
41
+ 'status.md'
42
+ ];
43
+
44
+ const results = [];
45
+ for (const file of commandFiles) {
46
+ const sourcePath = path.join(sourceDir, file);
47
+ const targetPath = path.join(targetDir, file);
48
+
49
+ try {
50
+ await fs.copyFile(sourcePath, targetPath);
51
+ results.push({ file, success: true, path: targetPath });
52
+ } catch (error) {
53
+ results.push({ file, success: false, error: error.message });
54
+ }
55
+ }
56
+
57
+ return results;
58
+ }
59
+
60
+ async function installSlashCommands(projectRoot) {
61
+ const platforms = await detectPlatform(projectRoot);
62
+
63
+ const allResults = [];
64
+ for (const platform of platforms) {
65
+ const results = await copyCommandFiles(projectRoot, platform);
66
+ allResults.push({ platform, results });
67
+ }
68
+
69
+ return allResults;
70
+ }
71
+
72
+ module.exports = {
73
+ detectPlatform,
74
+ ensureDirectories,
75
+ copyCommandFiles,
76
+ installSlashCommands
77
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telos-framework",
3
- "version": "0.1.4",
3
+ "version": "0.3.0",
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": {
@@ -24,7 +24,10 @@
24
24
  "claude",
25
25
  "cursor",
26
26
  "copilot",
27
- "orchestrator"
27
+ "orchestrator",
28
+ "claude-code-plugin",
29
+ "slash-commands",
30
+ "ai-native"
28
31
  ],
29
32
  "author": "Alan Colver",
30
33
  "license": "MIT",
@@ -40,6 +43,8 @@
40
43
  "bin/",
41
44
  "lib/",
42
45
  "logos/",
46
+ ".claude/",
47
+ "templates/",
43
48
  "LICENSE",
44
49
  "README.md",
45
50
  "USAGE.md"