* L3 Design Phase: Claude reads spec → produces Design Doc. * Returns { designDoc, specCoverage, usage, durationMs, costUsd }.
(tier)
| 1286 | * Returns { designDoc, specCoverage, usage, durationMs, costUsd }. |
| 1287 | */ |
| 1288 | function buildL3DesignPrompt(tier) { |
| 1289 | const reqCount = l3ReqCountFor(tier); |
| 1290 | return [ |
| 1291 | 'You are a senior engineer producing a Design Doc for a dictionary module.', |
| 1292 | '', |
| 1293 | 'Read the spec at openspec/changes/dict-benchmark/specs/dictionary/spec.md', |
| 1294 | '', |
| 1295 | 'Produce a Design Doc that:', |
| 1296 | '1. Summarizes the problem and goals', |
| 1297 | '2. Lists architectural decisions (data structure, API design, error handling)', |
| 1298 | '3. Maps each ADDED Requirement to a concrete implementation approach', |
| 1299 | '4. Identifies risks, edge cases, and open questions', |
| 1300 | '', |
| 1301 | 'Save the Design Doc to docs/superpowers/specs/dict-design.md', |
| 1302 | '', |
| 1303 | 'At the end of the Design Doc, include a JSON block:', |
| 1304 | '```json', |
| 1305 | '{"requirementsCovered":N,"requirementsTotal":N}', |
| 1306 | '```', |
| 1307 | `Where requirementsTotal = ${reqCount} (number of ADDED Requirements in the spec),`, |
| 1308 | 'requirementsCovered = how many you addressed in the Design Doc.', |
| 1309 | ].join('\n'); |
| 1310 | } |
| 1311 | |
| 1312 | async function runL3Design({ claudeCommand, model, cwd, tier }) { |
| 1313 | const prompt = buildL3DesignPrompt(tier); |
no test coverage detected