MCPcopy
hub / github.com/rpamis/comet / buildL3DesignPrompt

Function buildL3DesignPrompt

scripts/context-execution-benchmark.mjs:1288–1310  ·  view source on GitHub ↗

* L3 Design Phase: Claude reads spec → produces Design Doc. * Returns { designDoc, specCoverage, usage, durationMs, costUsd }.

(tier)

Source from the content-addressed store, hash-verified

1286 * Returns { designDoc, specCoverage, usage, durationMs, costUsd }.
1287 */
1288function 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
1312async function runL3Design({ claudeCommand, model, cwd, tier }) {
1313 const prompt = buildL3DesignPrompt(tier);

Callers 1

runL3DesignFunction · 0.85

Calls 1

l3ReqCountForFunction · 0.85

Tested by

no test coverage detected