You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/vscode-extension/src/node/shopify-magic-prompts/base.ts
+23-12Lines changed: 23 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -17,23 +17,34 @@ export function basePrompt(textEditor: TextEditor): string {
17
17
<objective>Optimal Theme Development</objective>
18
18
</prompt_metadata>
19
19
<focus_areas>
20
-
<area>Enhancing readability, conciseness, and efficiency while maintaining the same functionality</area>
21
-
<area>Leveraging new features in Liquid, including filters, tags, and objects</area>
22
-
<area>Be pragmatic and don't suggest without a really good reason</area>
23
-
<area>Combine multiple operations into one to improve readability and performance -- for example, use the find filter instead of where and first, if find is a valid filter</area>
24
-
<area>You should not suggest changes to the code that impact only HTML -- they should be focused on Liquid and Theme features.</area>
25
-
<area>You should not talk about whitespaces and the style of the code; leave that to the linter!</area>
26
-
<area>**Do not suggest to keep** something that is already valid</area>
20
+
<area>**Improve the conciseness and efficiency of Liquid code** while maintaining the same functionality</area>
21
+
<area>**Leverage the most appropriate Liquid** features (filters, tags, and objects); sometimes a filter can achieve the same result as a block of code</area>
22
+
<area>Avoid logic that matches the default behavior (especially for filters)</area>
23
+
<area>Improve readability, but **be pragmatic** and **do not suggest unless there's a strong reason**</area>
24
+
<area>Use filters for operations that perform the same function as a filter</area>
25
+
<area>Use unless for negative conditions</area>
27
26
</focus_areas>
28
27
<ensurance>
29
-
<point>The new code you propose contain full lines of valid code and keep the correct indentation, scope, and style format as the original code</point>
30
-
<point>Scopes are defined by the opened by "{%", "{{" with the matching closing element "%}" or "}}"</point>
31
-
<point>The range must include the closing element ("%}","}}") for every opening element ("{%","{{")</point>
28
+
<point>**Suggest only valid Liquid**</point>
29
+
<point>Suggested code must be different from the original code (not considering Liquid hyphens)</point>
30
+
<point>**Do not suggest code styling changes**; whitespaces, blank lines, it's best to leave that to the linter!</point>
31
+
<point>**Do not suggest refactorings** about combining variables</point>
32
+
<point>**Do not suggest refactorings** about Liquid hyphens</point>
33
+
<point>**Do not suggest keeping** something that is already good</point>
34
+
<point>**Do not suggest refactor** content_for using render</point>
35
+
<point>**Do not suggest** changes that impact **only readability**</point>
36
+
<point>**Do not suggest** something that **changes the logic/functionality**</point>
37
+
<point>**Do not make up or create** new invalid Shopify Liquid features (filters, tags, objects, etc.)</point>
38
+
<point>**Do not suggest** changes that affect only **HTML**—focus on Liquid and Theme features instead</point>
39
+
<point>Do not suggest the default filter with settings with a default value</point>
40
+
<point>The new code you propose should contain full lines of valid code and maintain the correct indentation, scope, and style format as the original code</point>
41
+
<point>Scopes are defined by the opening of "{%" or "{{" with the matching closing element "%}" or "}}"</point>
42
+
<point>The range must include the closing element ("%}", "}}") for every opening element ("{%", "{{")</point>
32
43
<point>Code suggestions cannot overlap in line numbers. If you have multiple suggestions for the same code chunk, merge them into a single suggestion</point>
33
44
<point>Make full-scope suggestions that consider the entire context of the code you are modifying, keeping the logical scope of the code valid</point>
34
45
<point>The resulting code must work and should not break existing HTML tags or Liquid syntax</point>
35
-
<point>The suggestions are specific, actionable, and align with the best practices in Liquid and Shopify theme development</point>
36
-
<point>Add a maximum of ${numberOfSuggestions} distinct suggestions to the array</point>
46
+
<point>The suggestions should be specific, actionable, and align with the best practices in Liquid and Shopify theme development</point>
47
+
<point>You must have zero up to a maximum of ${numberOfSuggestions} distinct suggestions to the array</point>
37
48
</ensurance>
38
49
<references>
39
50
Use the <theme_architecture>, <liquid_rules>, and Shopify.dev context as a reference. Do not make up new information.
0 commit comments