feat: add debug_issue tool handler

This commit is contained in:
2026-06-12 09:50:48 +01:00
parent 8e95ea0e5f
commit fe2192ec7c
5 changed files with 554 additions and 8 deletions
+16 -1
View File
@@ -329,7 +329,7 @@ Create `src/tools/review-plan.js` and `test/tools/review-plan.test.js`.
Status: ✅ Complete
### Task 4.3 - review_code tool handler (NEXT)
### Task 4.3 - review_code tool handler
Create `src/tools/review-code.js` and `test/tools/review-code.test.js`.
@@ -357,6 +357,21 @@ Create `src/tools/debug-issue.js` and `test/tools/debug-issue.test.js`.
- OpenAI errors pass through `String(err)` unchanged (no wrapping/reformatting).
- Mirror 4.1/4.2/4.3 structure: ~28 orchestration-only tests covering the same test categories.
Status: ✅ Complete
### Task 4.5 - architecture_review tool handler
Create `src/tools/architecture-review.js` and `test/tools/architecture-review.test.js`.
**Requirements:**
- Export `handleArchitectureReview(input, deps)` as standalone dependency-injected function.
- Execution order: validateToolInput → loadConfig → checkContextBudget → buildArchitectureReviewPrompt → createOpenAIClient → sendOpenAIResponse.
- Inject only 3 external deps: `loadConfig`, `createOpenAIClient`, `sendOpenAIResponse`. Internal utilities imported directly.
- If budget check fails (`ok: false`), immediately return that result — do not call buildArchitectureReviewPrompt or create client.
- All paths return structured `{ ok, answer|error, warnings }` — never throws to caller.
- OpenAI errors pass through `String(err)` unchanged (no wrapping/reformatting).
- Mirror 4.1/4.2/4.3/4.4 structure: ~28 orchestration-only tests covering the same test categories.
Status: ⬜ Pending
---