* Check if the installation is complete by verifying all required files and directories exist * This prevents treating incomplete installations as complete ones
()
| 64 | * This prevents treating incomplete installations as complete ones |
| 65 | */ |
| 66 | async isInstallationComplete(): Promise<boolean> { |
| 67 | try { |
| 68 | // First check if .claude directory exists |
| 69 | if (!await this.claudeDirectoryExists()) { |
| 70 | return false; |
| 71 | } |
| 72 | |
| 73 | // Check all required directories |
| 74 | const requiredDirectories = [ |
| 75 | this.commandsDir, |
| 76 | this.specsDir, |
| 77 | this.templatesDir, |
| 78 | this.steeringDir, |
| 79 | this.bugsDir |
| 80 | ]; |
| 81 | |
| 82 | // Agents are now mandatory |
| 83 | requiredDirectories.push(this.agentsDir); |
| 84 | |
| 85 | for (const dir of requiredDirectories) { |
| 86 | try { |
| 87 | await fs.access(dir); |
| 88 | } catch { |
| 89 | return false; |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | // Check all required command files |
| 94 | const requiredCommands = [ |
| 95 | 'spec-create.md', |
| 96 | 'spec-execute.md', |
| 97 | 'spec-status.md', |
| 98 | 'spec-list.md', |
| 99 | 'spec-steering-setup.md', |
| 100 | 'bug-create.md', |
| 101 | 'bug-analyze.md', |
| 102 | 'bug-fix.md', |
| 103 | 'bug-verify.md', |
| 104 | 'bug-status.md' |
| 105 | ]; |
| 106 | |
| 107 | for (const commandFile of requiredCommands) { |
| 108 | try { |
| 109 | await fs.access(join(this.commandsDir, commandFile)); |
| 110 | } catch { |
| 111 | return false; |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | // Check all required template files |
| 116 | const requiredTemplates = [ |
| 117 | 'requirements-template.md', |
| 118 | 'design-template.md', |
| 119 | 'tasks-template.md', |
| 120 | 'product-template.md', |
| 121 | 'tech-template.md', |
| 122 | 'structure-template.md', |
| 123 | 'bug-report-template.md', |
no test coverage detected