( pattern: Pattern, tool: Tool, targetDir: string, templatesRoot: string, dryRun: boolean, )
| 222 | } |
| 223 | |
| 224 | async function scaffoldObservability( |
| 225 | pattern: Pattern, |
| 226 | tool: Tool, |
| 227 | targetDir: string, |
| 228 | templatesRoot: string, |
| 229 | dryRun: boolean, |
| 230 | ) { |
| 231 | const budgetPath = path.join(targetDir, 'loop-budget.md'); |
| 232 | const runLogTemplate = path.join(templatesRoot, 'loop-run-log.md.template'); |
| 233 | const runLogPath = path.join(targetDir, 'loop-run-log.md'); |
| 234 | |
| 235 | if (!(await exists(budgetPath))) { |
| 236 | const content = buildLoopBudgetMd(pattern); |
| 237 | if (dryRun) { |
| 238 | console.log(` would write: ${budgetPath}`); |
| 239 | } else { |
| 240 | await writeFile(budgetPath, content); |
| 241 | console.log(` created: loop-budget.md`); |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | if (!(await exists(runLogPath))) { |
| 246 | await copyFile(runLogTemplate, runLogPath, dryRun); |
| 247 | } |
| 248 | |
| 249 | await copyTemplateSkill(templatesRoot, 'SKILL.md.loop-budget', targetDir, tool, 'loop-budget', dryRun); |
| 250 | } |
| 251 | |
| 252 | async function scaffoldConstraints( |
| 253 | targetDir: string, |
no test coverage detected