Skip to content

Instantly share code, notes, and snippets.

@borodicht
Created January 12, 2026 09:57
Show Gist options
  • Select an option

  • Save borodicht/fd30a62006319f1d3058df851a18bf0e to your computer and use it in GitHub Desktop.

Select an option

Save borodicht/fd30a62006319f1d3058df851a18bf0e to your computer and use it in GitHub Desktop.
// STAGE. AI BUG REPORT (DESIGN-TIME)
String checklist = FilesUtil.read("checklist_login.txt");
String testcases = FilesUtil.read("generated/testcases.json");
String codeReview = FilesUtil.read("generated/code_review.txt");
String bugPrompt = FilesUtil.read("prompts/04_bug_report.txt")
.replace("{{CHECKLIST}}", checklist)
.replace("{{TESTCASES}}", testcases)
.replace("{{REVIEW}}", codeReview);
FilesUtil.write("generated/bug_report_prompt.txt", bugPrompt);
String rawBug = MistralClient.call(bugPrompt);
FilesUtil.write("generated/bug_report_raw.json", rawBug);
String bugText = extractAssistantContent(rawBug);
FilesUtil.write("generated/bug_report_llm.txt", bugText);
String pureBugJson = JsonExtractor.extractJson(bugText);
FilesUtil.write("generated/bug_report.json", pureBugJson);
System.out.println("Bug report saved: generated/bug_report.json");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment