@getollie/cli 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@getollie/cli",
3
3
  "private": "false",
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "module": "index.ts",
6
6
  "type": "module",
7
7
  "bin": {
package/src/cli.ts CHANGED
@@ -47,9 +47,10 @@ program
47
47
  await program.parseAsync(ollieArgs);
48
48
 
49
49
  async function runPochi(options: {url: string, dir: string, question: string}, pochiArgs: string[]): Promise<number> {
50
- const instructions = buildPrompt(options.url, options.dir, getChecklistDir(), options.question);
50
+ const instructions = buildPrompt(options.url, options.dir, options.question);
51
51
  return new Promise((resolve, reject) => {
52
52
  const child = spawn("pochi", pochiArgs, {
53
+ cwd: getChecklistDir(),
53
54
  stdio: ["pipe", "inherit", "inherit"],
54
55
  env: {
55
56
  ...process.env,
package/src/prompt.ts CHANGED
@@ -1,4 +1,4 @@
1
- export function buildPrompt(url: string, sourceDir: string, checklistDir: string, question: string): string {
1
+ export function buildPrompt(url: string, sourceDir: string, question: string): string {
2
2
  const questionContext = question ? `\nThe source directory and URL were created in response to the following task:\n"${question}"\n` : '';
3
3
 
4
4
  const RuleTemplate = `
@@ -25,9 +25,22 @@ ${questionContext}
25
25
 
26
26
  ## Scoring Criteria
27
27
 
28
- Before starting the evaluation, please read the original task carefully, and find 3-4 related examples in ${checklistDir} to generate scoring criteria based on them. For each evaluation, there should be at most 10 criteria.
28
+ Before starting the evaluation, you need to generate scoring criteria based on the original question:
29
+ - DO NOT USE readFile BEFORE you have located the checklist, you MUST get the filepath in system-reminder or listFiles first, otherwise you will likely get the error as the file doesn't exist.
30
+ - use listFiles with recursive on current working directory to locate the checklist that's most related to the original task.
31
+ - Find 3-4 related examples to generate scoring criteria based on them, there should be at most 10 criteria.
32
+ - You write down scoring criteria using executeCommand with "echo".
29
33
 
30
- **Important:** Please list all scoring criteria before you start evaluation, using a similar format as examples in ${checklistDir}.
34
+ Example:
35
+ {
36
+ "checklist": [
37
+ {
38
+ "title": "Are download and project application features properly implemented?",
39
+ "description": "Check whether the code provides functionality to download individual or multiple sound effects in common formats (WAV, MP3) and the ability to apply selected effects to audio projects (e.g., timeline integration, batch processing). Deduct 3 points for each missing download format, 5 points if there's no batch download option, and 4 points if project application functionality is incomplete. The full score is 10 points."
40
+ },
41
+ ...
42
+ ]
43
+ }
31
44
 
32
45
  ## Evaluation Steps
33
46
 
@@ -37,6 +50,7 @@ Before starting the evaluation, please read the original task carefully, and fin
37
50
  4. Analyze code structure and organization based on the page.tsx file
38
51
  5. Check for proper error handling, testing, and documentation in the page.tsx file
39
52
  6. Evaluate based on all the scoring criteria provided
53
+ 7. Always generate the reasoning first, then wrap up the score.
40
54
  7. Provide detailed reasoning for your scores, citing specific examples from both the live site and source code
41
55
 
42
56
  ---
@@ -63,8 +77,8 @@ This is a **READ-ONLY** evaluation process. You should only observe, analyze, an
63
77
  <negative_example>
64
78
  \`\`\`json
65
79
  {
66
- "score": 32,
67
80
  "checklist": [...]
81
+ "score": 32,
68
82
  }
69
83
  \`\`\`
70
84
  <negative_example>
@@ -72,24 +86,39 @@ This is a **READ-ONLY** evaluation process. You should only observe, analyze, an
72
86
  <negative_example>
73
87
  Here is my evaluation:
74
88
  {
75
- "score": 32,
76
89
  "checklist": [...]
90
+ "score": 32,
77
91
  }
78
92
 
79
93
  The evaluation is complete.
80
94
  </negative_example>
81
95
 
96
+ You shall not put score before the reasoning.
97
+ <negative_example>
98
+ {
99
+ "checklist": [
100
+ {
101
+ ...
102
+ "score": 1,
103
+ "reasoning": "..."
104
+ },
105
+ ...
106
+ ],
107
+ }
108
+ </negative_example>
109
+
82
110
  <positive_example>
83
111
  {
84
- "score": 32,
85
112
  "checklist": [
86
113
  {
87
- "title": "Is the security checklist (SCL) content fully implemented in the webpage?",
88
- "reasoning": "The SCL content is fully implemented in the webpage, with all items listed and accessible.",
89
- "score": 8
114
+ "title": "Are download and project application features properly implemented?",
115
+ "description": "Check whether the code provides functionality to download individual or multiple sound effects in common formats (WAV, MP3) and the ability to apply selected effects to audio projects (e.g., timeline integration, batch processing). Deduct 3 points for each missing download format, 5 points if there's no batch download option, and 4 points if project application functionality is incomplete. The full score is 10 points.",
116
+ "reasoning": "The code implements download functionality for WAV and MP3 formats, but lacks batch download and project application features. Deducting 5 points for batch download and 4 points for project application, resulting in a score of 1 points.",
117
+ "score": 1
90
118
  },
91
119
  ...
92
- ]
120
+ ],
121
+ "score": 32
93
122
  }
94
123
  </positive_example>
95
124
  `.trim();