@xsft/panels 0.6.0 → 0.7.1
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/README.md +8 -4
- package/bin/panels.js +13 -10
- package/lib/args.js +5 -1
- package/lib/judge.js +42 -57
- package/lib/report.js +16 -37
- package/lib/table.js +336 -108
- package/package.json +19 -6
- package/prompts/judge-system-prompt.txt +16 -36
- package/schema/report.json +11 -97
package/package.json
CHANGED
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsft/panels",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Run a panel of AI judges from cross.software/panels against a target.",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"bin": {
|
|
8
|
-
|
|
7
|
+
"bin": {
|
|
8
|
+
"panels": "bin/panels.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin",
|
|
12
|
+
"lib",
|
|
13
|
+
"prompts",
|
|
14
|
+
"schema",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
9
17
|
"license": "UNLICENSED",
|
|
10
|
-
"engines": {
|
|
11
|
-
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=20"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"test": "node --test test/*.test.js"
|
|
23
|
+
},
|
|
12
24
|
"dependencies": {
|
|
13
25
|
"@homebridge/node-pty-prebuilt-multiarch": "0.14.1",
|
|
14
26
|
"@xterm/addon-serialize": "0.14.0",
|
|
15
|
-
"@xterm/headless": "6.0.0"
|
|
27
|
+
"@xterm/headless": "6.0.0",
|
|
28
|
+
"figlet": "1.12.0"
|
|
16
29
|
}
|
|
17
30
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
You are one judge in a run of a panel. A panel is a named list of criteria. You score one
|
|
1
|
+
You are one judge in a run of a panel. A panel is a named list of criteria. You score one criterion against a target, and you point out what is wrong and where.
|
|
2
2
|
|
|
3
3
|
YOUR INPUTS
|
|
4
4
|
|
|
5
5
|
The user message gives you:
|
|
6
|
-
-
|
|
6
|
+
- Your criterion: its rank, its name, its one-line description, and its body. Follow the body as written.
|
|
7
7
|
- The target: the text that the engineer typed after the panel name, unchanged. It can be a URL, a path, a branch, a pull request, or a sentence.
|
|
8
8
|
- The brief: a file path, or "none supplied".
|
|
9
9
|
- The sources: paths or URLs, or "none".
|
|
@@ -12,11 +12,11 @@ Your working directory is the folder where the engineer ran the command.
|
|
|
12
12
|
|
|
13
13
|
THE TARGET
|
|
14
14
|
|
|
15
|
-
Find out what the target names, and reach it with your tools: read files, run git read commands, open URLs. When you cannot reach the target, or cannot do a test of the body with your tools,
|
|
15
|
+
Find out what the target names, and reach it with your tools: read files, run git read commands, open URLs. When you cannot reach the target, or cannot do a test of the body with your tools, name the test at the end of your verdict after "Not checked:" with the reason. Then score as the body says for that case. Never score what you did not see.
|
|
16
16
|
|
|
17
17
|
ORDER
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Before you read the brief or the sources, do every step that the body puts before them. Keep the records and tables that the body asks for in your own notes; they do not go in the answer.
|
|
20
20
|
|
|
21
21
|
HOW TO SCORE
|
|
22
22
|
|
|
@@ -27,57 +27,37 @@ HOW TO SCORE
|
|
|
27
27
|
|
|
28
28
|
EVIDENCE
|
|
29
29
|
|
|
30
|
-
- Each claim needs evidence that the engineer can check: a URL, a file and line, a quote, or a command and its output.
|
|
30
|
+
- Each claim needs evidence that the engineer can check: a URL, a file and line, a quote, or a command and its output. Put the place in brackets inside the verdict, such as (index.html:90).
|
|
31
31
|
- Give no credit for intent. A promise in a comment, a doc, or the brief is not done work.
|
|
32
32
|
- No evidence for a level means the lower level.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
THE VERDICT
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
- Below score 4, list each fix that score 4 needs: the problem, the change, and the place.
|
|
36
|
+
One paragraph: what holds, then what is wrong and where, each place in brackets, then "Not checked:" and the tests you could not do, when there are any. Judge; do not propose fixes. The fixes are the job of the engineer.
|
|
38
37
|
|
|
39
38
|
PROHIBITIONS
|
|
40
39
|
|
|
41
40
|
- Do not change the body, the levels, or the caps.
|
|
42
41
|
- Do not score a fault that the body gives to another criterion.
|
|
43
|
-
- Do not write or change files
|
|
42
|
+
- Do not write or change files, except the answer file when the user message names one.
|
|
43
|
+
- Do not start sub-agents.
|
|
44
44
|
- Do not submit forms, send messages, or post data.
|
|
45
45
|
- Do not read the .panels folder. It holds earlier reports.
|
|
46
46
|
|
|
47
47
|
OUTPUT
|
|
48
48
|
|
|
49
|
-
Return one JSON object and nothing else
|
|
49
|
+
Return one JSON object and nothing else:
|
|
50
50
|
|
|
51
51
|
{
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"score": integer 1 to 4,
|
|
56
|
-
"verdict": string, one sentence of 30 words or less,
|
|
57
|
-
"records": [{ "name": string, "columns": [string], "rows": [[string]] }],
|
|
58
|
-
"evidence": [{ "claim": string, "where": string, "quote": string or null }],
|
|
59
|
-
"notChecked": [{ "test": string, "reason": string }],
|
|
60
|
-
"fixes": [{ "problem": string, "change": string, "where": string }]
|
|
61
|
-
}]
|
|
52
|
+
"name": string, the name of your criterion,
|
|
53
|
+
"score": integer 1 to 4,
|
|
54
|
+
"verdict": string, one paragraph
|
|
62
55
|
}
|
|
63
56
|
|
|
64
|
-
Example
|
|
57
|
+
Example:
|
|
65
58
|
|
|
66
59
|
{
|
|
67
|
-
"
|
|
68
|
-
"criterion": "Original design assets",
|
|
60
|
+
"name": "Original design assets",
|
|
69
61
|
"score": 2,
|
|
70
|
-
"verdict": "The hero shows the real app, and the
|
|
71
|
-
"records": [{
|
|
72
|
-
"name": "asset table",
|
|
73
|
-
"columns": ["asset", "provenance", "product test", "verdict"],
|
|
74
|
-
"rows": [["feature icons (6)", "class \"lucide\"", "generic symbols", "generic"]]
|
|
75
|
-
}],
|
|
76
|
-
"evidence": [{ "claim": "The icons come from Lucide.", "where": "src/components/Features.tsx:3", "quote": "import { Zap } from \"lucide-react\"" }],
|
|
77
|
-
"notChecked": [{ "test": "reverse image search of hero.webp", "reason": "the target is on localhost" }],
|
|
78
|
-
"fixes": [{
|
|
79
|
-
"problem": "Library icons carry the feature grid.",
|
|
80
|
-
"change": "Draw each icon as an object of this product.",
|
|
81
|
-
"where": "src/components/Features.tsx, home section #features"
|
|
82
|
-
}]
|
|
62
|
+
"verdict": "The hero shows the real app, and the cutaway hotel and the team scenes are original and share one idea (public/assets/hotel-world). Every content icon is a generic Lucide symbol (src/components/Features.tsx:3), which caps the band at 6. Not checked: a reverse image search of hero.webp, the target is on localhost."
|
|
83
63
|
}
|
package/schema/report.json
CHANGED
|
@@ -2,122 +2,36 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"type": "object",
|
|
4
4
|
"additionalProperties": false,
|
|
5
|
-
"required": ["
|
|
5
|
+
"required": ["panel", "target", "status", "criteria"],
|
|
6
6
|
"properties": {
|
|
7
|
-
"
|
|
8
|
-
"panel": {
|
|
9
|
-
"type": "object",
|
|
10
|
-
"additionalProperties": false,
|
|
11
|
-
"required": ["owner", "name", "version"],
|
|
12
|
-
"properties": {
|
|
13
|
-
"owner": { "type": "string" },
|
|
14
|
-
"name": { "type": "string" },
|
|
15
|
-
"version": { "type": "integer" }
|
|
16
|
-
}
|
|
17
|
-
},
|
|
7
|
+
"panel": { "type": "string", "description": "owner/name@version" },
|
|
18
8
|
"target": { "type": "string" },
|
|
19
|
-
"
|
|
20
|
-
"harness": { "enum": ["claude", "codex"] },
|
|
21
|
-
"size": { "type": "integer", "minimum": 1 },
|
|
9
|
+
"status": { "enum": ["pass", "fail", "error"] },
|
|
22
10
|
"criteria": {
|
|
23
11
|
"type": "array",
|
|
12
|
+
"description": "One item per criterion of the panel, in panel order. A criterion whose judge failed has score null and the error as its verdict.",
|
|
24
13
|
"items": {
|
|
25
14
|
"type": "object",
|
|
26
15
|
"additionalProperties": false,
|
|
27
|
-
"required": ["
|
|
16
|
+
"required": ["name", "score", "verdict"],
|
|
28
17
|
"properties": {
|
|
29
|
-
"rank": { "type": "integer" },
|
|
30
18
|
"name": { "type": "string" },
|
|
31
19
|
"score": { "type": ["integer", "null"], "minimum": 1, "maximum": 4 },
|
|
32
|
-
"
|
|
33
|
-
"type": "array",
|
|
34
|
-
"items": {
|
|
35
|
-
"type": "object",
|
|
36
|
-
"additionalProperties": false,
|
|
37
|
-
"required": ["judge", "result"],
|
|
38
|
-
"properties": {
|
|
39
|
-
"judge": { "type": "integer" },
|
|
40
|
-
"result": { "$ref": "#/$defs/judgeResult" }
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"errors": {
|
|
48
|
-
"type": "array",
|
|
49
|
-
"items": {
|
|
50
|
-
"type": "object",
|
|
51
|
-
"additionalProperties": false,
|
|
52
|
-
"required": ["judge", "message"],
|
|
53
|
-
"properties": {
|
|
54
|
-
"judge": { "type": "integer" },
|
|
55
|
-
"message": { "type": "string" }
|
|
20
|
+
"verdict": { "type": "string" }
|
|
56
21
|
}
|
|
57
22
|
}
|
|
58
23
|
}
|
|
59
24
|
},
|
|
60
25
|
"$defs": {
|
|
61
|
-
"
|
|
26
|
+
"criterion": {
|
|
27
|
+
"description": "The answer of one judge: one criterion object. The name is fixed to the criterion of the judge.",
|
|
62
28
|
"type": "object",
|
|
63
29
|
"additionalProperties": false,
|
|
64
|
-
"required": ["
|
|
30
|
+
"required": ["name", "score", "verdict"],
|
|
65
31
|
"properties": {
|
|
66
|
-
"
|
|
67
|
-
"criterion": { "type": "string" },
|
|
32
|
+
"name": { "type": "string" },
|
|
68
33
|
"score": { "type": "integer", "minimum": 1, "maximum": 4 },
|
|
69
|
-
"verdict": { "type": "string" }
|
|
70
|
-
"records": {
|
|
71
|
-
"type": "array",
|
|
72
|
-
"items": {
|
|
73
|
-
"type": "object",
|
|
74
|
-
"additionalProperties": false,
|
|
75
|
-
"required": ["name", "columns", "rows"],
|
|
76
|
-
"properties": {
|
|
77
|
-
"name": { "type": "string" },
|
|
78
|
-
"columns": { "type": "array", "items": { "type": "string" } },
|
|
79
|
-
"rows": { "type": "array", "items": { "type": "array", "items": { "type": "string" } } }
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"evidence": {
|
|
84
|
-
"type": "array",
|
|
85
|
-
"items": {
|
|
86
|
-
"type": "object",
|
|
87
|
-
"additionalProperties": false,
|
|
88
|
-
"required": ["claim", "where", "quote"],
|
|
89
|
-
"properties": {
|
|
90
|
-
"claim": { "type": "string" },
|
|
91
|
-
"where": { "type": "string" },
|
|
92
|
-
"quote": { "type": ["string", "null"] }
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
"notChecked": {
|
|
97
|
-
"type": "array",
|
|
98
|
-
"items": {
|
|
99
|
-
"type": "object",
|
|
100
|
-
"additionalProperties": false,
|
|
101
|
-
"required": ["test", "reason"],
|
|
102
|
-
"properties": {
|
|
103
|
-
"test": { "type": "string" },
|
|
104
|
-
"reason": { "type": "string" }
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
"fixes": {
|
|
109
|
-
"type": "array",
|
|
110
|
-
"items": {
|
|
111
|
-
"type": "object",
|
|
112
|
-
"additionalProperties": false,
|
|
113
|
-
"required": ["problem", "change", "where"],
|
|
114
|
-
"properties": {
|
|
115
|
-
"problem": { "type": "string" },
|
|
116
|
-
"change": { "type": "string" },
|
|
117
|
-
"where": { "type": "string" }
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
34
|
+
"verdict": { "type": "string", "minLength": 1, "description": "One paragraph: what holds, what is wrong and where (the place in brackets), and \"Not checked: ...\" at the end when something was not checked." }
|
|
121
35
|
}
|
|
122
36
|
}
|
|
123
37
|
}
|