()
| 210 | } |
| 211 | |
| 212 | async createTemplates(): Promise<void> { |
| 213 | const templateNames = [ |
| 214 | 'requirements-template.md', |
| 215 | 'design-template.md', |
| 216 | 'tasks-template.md', |
| 217 | 'product-template.md', |
| 218 | 'tech-template.md', |
| 219 | 'structure-template.md', |
| 220 | 'bug-report-template.md', |
| 221 | 'bug-analysis-template.md', |
| 222 | 'bug-verification-template.md' |
| 223 | ]; |
| 224 | |
| 225 | for (const templateName of templateNames) { |
| 226 | const sourceFile = join(this.markdownTemplatesDir, templateName); |
| 227 | const destFile = join(this.templatesDir, templateName); |
| 228 | |
| 229 | try { |
| 230 | // Delete existing file if it exists to ensure clean replacement |
| 231 | try { |
| 232 | await fs.unlink(destFile); |
| 233 | } catch { |
| 234 | // File might not exist, which is fine |
| 235 | } |
| 236 | |
| 237 | const templateContent = await fs.readFile(sourceFile, 'utf-8'); |
| 238 | await fs.writeFile(destFile, templateContent, 'utf-8'); |
| 239 | } catch (error) { |
| 240 | console.error(`Failed to copy template ${templateName}:`, error); |
| 241 | throw error; |
| 242 | } |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | // NOTE: Script creation removed in v1.2.5 - task command generation now uses NPX command |
| 247 |
no outgoing calls
no test coverage detected