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

Function runL3Design

scripts/context-execution-benchmark.mjs:1312–1331  ·  view source on GitHub ↗
({ claudeCommand, model, cwd, tier })

Source from the content-addressed store, hash-verified

1310}
1311
1312async function runL3Design({ claudeCommand, model, cwd, tier }) {
1313 const prompt = buildL3DesignPrompt(tier);
1314 const args = buildClaudeArgs({ cwd, model });
1315 const { stdout, exitCode } = await spawnCapture(claudeCommand, args, {
1316 cwd,
1317 input: prompt,
1318 timeoutMs: CLAUDE_TIMEOUT_MS,
1319 allowFailure: true,
1320 });
1321 const parsed = parseClaudeJson(stdout);
1322 const verdict = parseDesignVerdict(parsed.result ?? stdout);
1323 return {
1324 usage: parsed.usage,
1325 durationMs: parsed.durationMs,
1326 costUsd: parsed.costUsd,
1327 specCoverage: verdict ? safeRatio(verdict.requirementsCovered, verdict.requirementsTotal) : 0,
1328 designDoc: parsed.result ?? '',
1329 exitCode,
1330 };
1331}
1332
1333/**
1334 * L3 Build Phase: Claude reads compressed handoff context → implements → tests.

Callers 1

runL3Function · 0.85

Calls 6

buildClaudeArgsFunction · 0.90
spawnCaptureFunction · 0.90
parseClaudeJsonFunction · 0.90
safeRatioFunction · 0.90
buildL3DesignPromptFunction · 0.85
parseDesignVerdictFunction · 0.85

Tested by

no test coverage detected