From bf14cf7b8013964e227bb93cc53fd37f9b7c95d5 Mon Sep 17 00:00:00 2001 From: Huynh Dang Khoa Date: Fri, 6 Feb 2026 22:13:15 +0700 Subject: [PATCH] chore: update prompt --- .github/workflows/daily-leetcode.yml | 2 +- scripts/prompt-template.md | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/daily-leetcode.yml b/.github/workflows/daily-leetcode.yml index 66cdbec..f9c661e 100644 --- a/.github/workflows/daily-leetcode.yml +++ b/.github/workflows/daily-leetcode.yml @@ -114,7 +114,7 @@ jobs: with: mode: 'agent' claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - direct_prompt: | + prompt: | Read the file `prompt.txt` in the repository root. It contains a LeetCode problem and detailed instructions for generating a DSA-coach analysis with progressive hints, a Go solution, and Go table-driven tests. diff --git a/scripts/prompt-template.md b/scripts/prompt-template.md index 6a5d36c..2e06864 100644 --- a/scripts/prompt-template.md +++ b/scripts/prompt-template.md @@ -65,6 +65,7 @@ Space Complexity: O(...) ### Output Section 2: solution.go Write a correct, clean Go solution. Requirements: + - Use `package main` - Define any needed types (TreeNode, ListNode, etc.) inline in the file - Include a brief comment at the top explaining the approach @@ -81,10 +82,12 @@ Write a correct, clean Go solution. Requirements: ### Output Section 3: solution_test.go Write table-driven tests in Go. Requirements: + - Use `package main` - Extract ALL examples from the problem description as test cases - Add at least 2 additional edge case tests beyond the examples - Use descriptive test names like "example 1: description", "edge case: empty input" +- Ensure test cases are correct by verifying against your solution - Follow the testing pattern below - {{TEST_FILE_NAMING_NOTE}} @@ -94,7 +97,7 @@ Write table-driven tests in Go. Requirements: ---TESTS_END--- ``` -## Important Rules +## **Important Rules** 1. The solution MUST compile and pass all generated tests. 2. Aim for an optimal or near-optimal time complexity solution.