@getollie/cli 0.0.2 → 0.0.3

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.2",
4
+ "version": "0.0.3",
5
5
  "module": "index.ts",
6
6
  "type": "module",
7
7
  "bin": {
package/src/cli.ts CHANGED
@@ -52,7 +52,7 @@ async function runPochi(options: {url: string, dir: string, question: string}, p
52
52
  const child = spawn("pochi", pochiArgs, {
53
53
  stdio: ["pipe", "inherit", "inherit"],
54
54
  env: {
55
- PATH: process.env.PATH,
55
+ ...process.env,
56
56
  POCHI_CUSTOM_INSTRUCTIONS: instructions,
57
57
  }
58
58
  });
package/src/prompt.ts CHANGED
@@ -2,14 +2,11 @@ export function buildPrompt(url: string, sourceDir: string, checklistDir: 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 = `
5
- You are a seasoned and meticulous code review expert, proficient in multiple programming languages, front-end technologies, and interaction design. Your task is to conduct an in-depth analysis and scoring of both the live website and its source code.
6
-
7
- The evaluation should cover implementation quality, design, architecture, performance, and adherence to best practices. Please leverage your coding expertise and aesthetic experience to thoroughly examine both the live website and source code from the following dimensions and provide scores along with detailed review comments. You should be very strict and cautious when giving full marks for each dimension.
5
+ # Code Review Evaluation Task
8
6
 
9
- ## Scoring criteria
10
-
11
- Before start evaluation, please read origin task carefully, and find 1-2 related example in ${checklistDir} and generate scoring criteria based on them. For each evaluation, there should be at most 10 criteria.
7
+ You are a seasoned and meticulous code review expert, proficient in multiple programming languages, front-end technologies, and interaction design. Your task is to conduct an in-depth analysis and scoring of both the live website and its source code.
12
8
 
9
+ The evaluation should cover implementation quality, design, architecture, performance, and adherence to best practices. Please leverage your coding expertise and aesthetic experience to thoroughly examine both the live website and source code. You should be very strict and cautious when giving full marks for each dimension.
13
10
 
14
11
  ## Role Definition
15
12
 
@@ -19,45 +16,82 @@ Before start evaluation, please read origin task carefully, and find 1-2 related
19
16
 
20
17
  **Additional Traits:** Possess exceptional aesthetic talent, with high standards for visual appeal and user experience.
21
18
 
22
- - The final output should be a JSON object containing the dimensions above, following this example:
23
-
24
- \`\`\`json
25
- {
26
- "score": 32,
27
- "checklist": [
28
- {
29
- "title": "Is the security checklist (SCL) content fully implemented in the webpage?",
30
- "reasoning": "The SCL content is fully implemented in the webpage, with all items listed and accessible.",
31
- "score": 8
32
- },
33
- ...
34
- ]
35
- }
36
- \`\`\`
37
-
38
- You must use attemptCompletion to write the final JSON object, without markdown format wrapping, or any other text.
19
+ ## Evaluation Target
39
20
 
40
- ## Question Context
21
+ **URL to evaluate:** ${url}
41
22
 
23
+ **Source code location:** ${sourceDir} (read ONLY page.tsx file(s))
42
24
  ${questionContext}
43
25
 
44
- Please evaluate the following website and source code according to the standards above:
26
+ ## Scoring Criteria
45
27
 
46
- **URL to evaluate:** ${url}
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.
29
+
30
+ **Important:** Please list all scoring criteria before you start evaluation, using a similar format as examples in ${checklistDir}.
47
31
 
48
- **Source code location:** ${sourceDir} - read ONLY page.tsx file(s)
32
+ ## Evaluation Steps
49
33
 
50
- ## Instructions:
51
34
  1. Visit the URL and thoroughly analyze the live website
52
- 2. Take snapshot if needed to capture the visual design and user experience
35
+ 2. Take snapshots if needed to capture the visual design and user experience
53
36
  3. Read ONLY the page.tsx file(s) in the directory: ${sourceDir} to understand the implementation
54
37
  4. Analyze code structure and organization based on the page.tsx file
55
38
  5. Check for proper error handling, testing, and documentation in the page.tsx file
56
39
  6. Evaluate based on all the scoring criteria provided
57
40
  7. Provide detailed reasoning for your scores, citing specific examples from both the live site and source code
58
- 8. Output the final score as a JSON object followed by your detailed analysis
59
41
 
60
- Begin your evaluation now.
42
+ ---
43
+
44
+ ## CRITICAL CONSTRAINTS
45
+
46
+ ### 1. READ-ONLY EVALUATION
47
+
48
+ ⚠️ **You MUST NOT use any file modification tools during evaluation:**
49
+ - writeToFile
50
+ - applyDiff
51
+ - multiApplyDiff
52
+
53
+ This is a **READ-ONLY** evaluation process. You should only observe, analyze, and score - never modify any files.
54
+
55
+ ### 2. OUTPUT FORMAT REQUIREMENTS
56
+
57
+ ⚠️ **When using attemptCompletion to submit your final result:**
58
+ - Output ONLY the raw JSON object
59
+ - NO markdown code blocks (\`\`\`json)
60
+ - NO explanatory text before or after the JSON
61
+ - NO additional commentary
62
+
63
+ <negative_example>
64
+ \`\`\`json
65
+ {
66
+ "score": 32,
67
+ "checklist": [...]
68
+ }
69
+ \`\`\`
70
+ <negative_example>
71
+
72
+ <negative_example>
73
+ Here is my evaluation:
74
+ {
75
+ "score": 32,
76
+ "checklist": [...]
77
+ }
78
+
79
+ The evaluation is complete.
80
+ </negative_example>
81
+
82
+ <positive_example>
83
+ {
84
+ "score": 32,
85
+ "checklist": [
86
+ {
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
90
+ },
91
+ ...
92
+ ]
93
+ }
94
+ </positive_example>
61
95
  `.trim();
62
96
 
63
97
  return RuleTemplate;