| 521 | } |
| 522 | |
| 523 | function buildPrompt(mode, contextFile, contextText) { |
| 524 | return [ |
| 525 | 'You are running a local Comet context-compression benchmark.', |
| 526 | `Mode: ${mode}`, |
| 527 | `Context source: ${contextFile}`, |
| 528 | 'Use only the inline Comet handoff context below. Do not call tools and do not inspect files.', |
| 529 | 'Evaluate whether an implementation agent could complete the note-board task from this context.', |
| 530 | 'Return only compact JSON with this exact shape:', |
| 531 | '{"completed":true,"specFacts":8,"driftedFacts":0,"acceptanceCriteriaTotal":4,"acceptanceCriteriaMet":4}', |
| 532 | 'Definitions:', |
| 533 | '- completed: true only if the requirements are clear enough to implement without asking follow-up questions.', |
| 534 | '- specFacts: count of concrete requirement/scenario facts you used.', |
| 535 | '- driftedFacts: count of facts you stated that conflict with the OpenSpec source.', |
| 536 | '- acceptanceCriteriaTotal: number of acceptance scenarios in the spec.', |
| 537 | '- acceptanceCriteriaMet: number of scenarios preserved clearly enough in the context for implementation.', |
| 538 | '', |
| 539 | '<comet_handoff_context>', |
| 540 | contextText, |
| 541 | '</comet_handoff_context>', |
| 542 | ].join('\n'); |
| 543 | } |
| 544 | |
| 545 | function renderMarkdownReport(report) { |
| 546 | const lines = [ |