@@ -8,43 +8,53 @@ Vibe Coding
88-----------
991 . In a Linux or macOS shell, set your present working directory to Matcha's
1010 [ scripts] ( ../../scripts ) directory. Enter the command
11- ` ./create-single-source-file-programs.sh ` , which creates a copy of the Matcha
12- test suite and supporting software stack all concatenated into one file:
13- test-suite.F90 in [ build/single-file-programs] ( ../../build/single-file-programs ) .
14- 2 . Compile and execute test-suite.F90 to check that the output reports that
11+ ` ./create-single-source-file-programs.sh ` , which creates a copy of the
12+ Matcha test suite and supporting software stack all concatenated into one
13+ file in the following path relative to the project's root directory:
14+ "./build/single-file-programs/test-suite.F90".
15+ 3 . Compile and execute test-suite.F90 to check that the output reports that
1516 all tests pass. For example, enter
1617 ``` bash
1718 gfortran -fcoarray=single -o test-suite test-suite.F90
1819 ./test-suite
1920 ```
20- 3 . Use the contents of [ vibe-coding/README.md] ( ./vibe-coding/README.md ) as your
21+ 4 . Use the contents of [ vibe-coding/README.md] ( ./vibe-coding/README.md ) as your
2122 prompt to a large language model (LLM).
22- 4 . In test-suite.F90, replace the lines beginning and ending with
23+ 5 . Use an editor to edit the test-suite.F90 lines beginning and ending with
2324 ` module procedure laplacian ` and ` end procedure laplacian ` , respectively,
24- with the LLM's response.
25- 5 . Compile test-suite.F90 as in step 2 again.
26- 6 . If test-suite.F90 doesn't compile or if running the compiled program does not
27- produce output indicating that all tests pass, then start over start over at
28- step 1 but when you reach step 3, append the following to the aforementioned
29- prompt:
30- b. The previous iteration's compile-time or run-time error messages,
31- a. "Please fix the above errors generated by the following response to my
32- previous prompt:",
33- c. The LLM-generated code from the previous iteration.
25+ replacing those lines with the LLM's response.
26+ 6 . Compile test-suite.F90 as in step 2 again.
27+ 7 . If the test-suite program doesn't compile or if running the compiled
28+ program doesn't produce output indicating that all tests pass, then start
29+ over at step 1 but when you reach step 3, edit the prompt as follows:
30+ * Append the previous iteration's compile-time error message(s) or run-time
31+ error message(s) or test output.
32+ * Append the text "Please fix the above errors that were generated by
33+ compiling the following candidate solution to this prompt:". If the
34+ program compiled but runtime errors resulted, replace "compiling" with
35+ "running" in the previous sentence. If the program ran without errors,
36+ but tests failed replace "compiling" with "running" and replace "errors"
37+ with "test failures".
38+ * Append LLM-generated code from the previous iteration.
3439
3540Idiomatic Vibe Coding
3641---------------------
37- Follow the [ vibe coding] ( #vibe-coding ) steps except as described below.
38-
39- * In your first prompt, attach the file test-suite.F90 with the lines
40- from ` module procedure laplacian ` to ` end procedure ` removed.
41- Rename the file test-suite.txt if the LLM rejects .F90 file extensions.
42- Add the text "Inserting your response into subdmodule subdomain_s,
43- and compiling and running the attached program must generate output
44- indicating that all tests pass."
45- * If inserting the LLM's repsonse into subdomain_s leads to compile-time or
46- runtime errors or if any tests fail, attach the file containing the program
47- with the LLM's response inserted. Add the text "Please fix the attached
48- program, which contains a candidate solution to the above prompt. The candidate
49- solution generates the following messages:" Insert any compile-time or
50- runtime error messages or test output.
42+ Follow the [ vibe coding] ( #vibe-coding ) steps except as described below:
43+ * In your first prompt, attach test-suite.F90 with the lines from
44+ ` module procedure laplacian ` to ` end procedure laplacian ` removed. If the
45+ LLM rejects ".F90" file extensions, change the name to "test-suite.txt".
46+ Appened following to the prompt: "Inserting a correct response to this
47+ prompt into the subdmodule subdomain_s and then compiling and running the
48+ attached program must generate output indicating that all tests pass."
49+ * In subsequent iterations, if replacing the laplacian procedure with the
50+ LLM's most recent response leads to compile-time or runtime errors or if any
51+ tests fail, update the test-suite program, replacing laplacian with the most
52+ recent LLM response. Attach the updated program to each prompt.
53+ * In the second bullet of vibe coding step 7, replace the suggested text wit
54+ "Please fix the above errors that were generated by compiling the attached
55+ program, which contains an incorrect laplacian procedure." If the program
56+ compiled but runtime errors resulted, replace "compiling" with "running" in
57+ the previous sentence. If the program ran without errors, but tests failed,
58+ replace "compiling" with "running" and replace "errors" with "test failures".
59+ * Skip the third bullet in vibe coding step 7 because with idiomatic vibe
60+ coding, the complete software stack is contained in an attachment.
0 commit comments