feat: add ask_chatgpt prompt builder

This commit is contained in:
2026-06-11 15:37:42 +01:00
parent 4132aa4552
commit 008f38e630
4 changed files with 328 additions and 2 deletions
+39
View File
@@ -172,6 +172,45 @@ Requirements:
- Test that the prompt is a non-empty string.
- Test that the prompt does not include tool-specific content (review/code/debug/architecture).
### Task 3.3 - ask_chatgpt prompt builder
Create `src/prompts/ask-chatgpt.js`.
Requirements:
- Export a `buildAskChatGptPrompt(input)` function that returns a tool-specific prompt for the ask_chatgpt MCP tool.
- Compose with `buildBasePrompt()` — call it internally and append the result with `---` separator.
- The final prompt has two parts: [base system prompt] + [ask_chatgpt user instructions].
- Instruct ChatGPT to answer the question directly, act as a second-opinion advisor, identify assumptions, identify risks, suggest safer approaches, state uncertainty clearly.
- Support `expectedOutput` — if provided, append "Expected output: <value>" to the task section.
- Question is required; throw TypeError when missing or empty.
- No review_plan, review_code, debug_issue, or architecture_review content yet.
Create `test/prompts/ask-chatgpt.test.js`.
Requirements:
- ~27 tests covering base composition, ask_chatgpt instructions, optional field append/omit, expectedOutput present/absent, tool-specific guard, input validation, and full integration.
- No MCP code. No OpenAI calls. Pure prompt string assertions only.
Status: ✅ Complete
### Task 3.4 - review_plan prompt builder (NEXT)
Create `src/prompts/review-plan.js`.
Requirements:
- Export a `buildReviewPlanPrompt(input)` function that returns a tool-specific prompt for the review_plan MCP tool.
- Compose with `buildBasePrompt()` — call it internally and append the result with `---` separator.
- Instruct ChatGPT to review a proposed implementation plan before Claude Code acts.
- Look for: missing steps, unsafe assumptions, scope creep, better sequencing, test gaps.
- No other tool prompts yet (debug_issue, architecture_review, etc.).
Create `test/prompts/review-plan.test.js`.
Requirements:
- Mirror structure of ask-chatgpt tests: base composition, review_plan-specific instructions, optional fields, expectedOutput, input validation, tool guard, full integration.
Status: ⬜ Pending
---
Phase 2 complete. Phase 3 in progress.