@cloverleaf/reference-impl 0.10.0 → 0.10.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/VERSION +1 -1
- package/dist/qa-report.mjs +11 -11
- package/lib/qa-report.ts +12 -12
- package/package.json +1 -1
- package/prompts/qa.md +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.10.
|
|
1
|
+
0.10.1
|
package/dist/qa-report.mjs
CHANGED
|
@@ -30,17 +30,6 @@ function renderRow(r) {
|
|
|
30
30
|
</tr>
|
|
31
31
|
`;
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Read a QA runs JSON file (array of QaRunResult), render the HTML report, and write it to
|
|
35
|
-
* outHtmlPath, creating the parent directory if needed. Lets QA write its report via the
|
|
36
|
-
* cloverleaf-cli bin instead of importing a monorepo dist path.
|
|
37
|
-
*/
|
|
38
|
-
export function writeQaReportFromFile(runsJsonPath, outHtmlPath) {
|
|
39
|
-
const runs = JSON.parse(readFileSync(runsJsonPath, 'utf-8'));
|
|
40
|
-
const html = renderQaReport(runs);
|
|
41
|
-
mkdirSync(dirname(outHtmlPath), { recursive: true });
|
|
42
|
-
writeFileSync(outHtmlPath, html, 'utf-8');
|
|
43
|
-
}
|
|
44
33
|
export function renderQaReport(runs) {
|
|
45
34
|
const empty = runs.length === 0
|
|
46
35
|
? `<p class="empty">No runs / results.</p>`
|
|
@@ -79,3 +68,14 @@ export function renderQaReport(runs) {
|
|
|
79
68
|
</body>
|
|
80
69
|
</html>`;
|
|
81
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Read a QA runs JSON file (array of QaRunResult), render the HTML report, and write it to
|
|
73
|
+
* outHtmlPath, creating the parent directory if needed. Lets QA write its report via the
|
|
74
|
+
* cloverleaf-cli bin instead of importing a monorepo dist path.
|
|
75
|
+
*/
|
|
76
|
+
export function writeQaReportFromFile(runsJsonPath, outHtmlPath) {
|
|
77
|
+
const runs = JSON.parse(readFileSync(runsJsonPath, 'utf-8'));
|
|
78
|
+
const html = renderQaReport(runs);
|
|
79
|
+
mkdirSync(dirname(outHtmlPath), { recursive: true });
|
|
80
|
+
writeFileSync(outHtmlPath, html, 'utf-8');
|
|
81
|
+
}
|
package/lib/qa-report.ts
CHANGED
|
@@ -42,18 +42,6 @@ function renderRow(r: QaRunResult): string {
|
|
|
42
42
|
`;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
/**
|
|
46
|
-
* Read a QA runs JSON file (array of QaRunResult), render the HTML report, and write it to
|
|
47
|
-
* outHtmlPath, creating the parent directory if needed. Lets QA write its report via the
|
|
48
|
-
* cloverleaf-cli bin instead of importing a monorepo dist path.
|
|
49
|
-
*/
|
|
50
|
-
export function writeQaReportFromFile(runsJsonPath: string, outHtmlPath: string): void {
|
|
51
|
-
const runs = JSON.parse(readFileSync(runsJsonPath, 'utf-8')) as QaRunResult[];
|
|
52
|
-
const html = renderQaReport(runs);
|
|
53
|
-
mkdirSync(dirname(outHtmlPath), { recursive: true });
|
|
54
|
-
writeFileSync(outHtmlPath, html, 'utf-8');
|
|
55
|
-
}
|
|
56
|
-
|
|
57
45
|
export function renderQaReport(runs: QaRunResult[]): string {
|
|
58
46
|
const empty = runs.length === 0
|
|
59
47
|
? `<p class="empty">No runs / results.</p>`
|
|
@@ -92,3 +80,15 @@ export function renderQaReport(runs: QaRunResult[]): string {
|
|
|
92
80
|
</body>
|
|
93
81
|
</html>`;
|
|
94
82
|
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Read a QA runs JSON file (array of QaRunResult), render the HTML report, and write it to
|
|
86
|
+
* outHtmlPath, creating the parent directory if needed. Lets QA write its report via the
|
|
87
|
+
* cloverleaf-cli bin instead of importing a monorepo dist path.
|
|
88
|
+
*/
|
|
89
|
+
export function writeQaReportFromFile(runsJsonPath: string, outHtmlPath: string): void {
|
|
90
|
+
const runs = JSON.parse(readFileSync(runsJsonPath, 'utf-8')) as QaRunResult[];
|
|
91
|
+
const html = renderQaReport(runs);
|
|
92
|
+
mkdirSync(dirname(outHtmlPath), { recursive: true });
|
|
93
|
+
writeFileSync(outHtmlPath, html, 'utf-8');
|
|
94
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloverleaf/reference-impl",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Reference implementation of the Cloverleaf methodology as Claude Code skills. Implements the Tight Loop (Implementer + Reviewer).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/prompts/qa.md
CHANGED
|
@@ -9,7 +9,7 @@ You are the Cloverleaf QA agent. Your job: run the appropriate test suites for a
|
|
|
9
9
|
- **Base branch**: {{base_branch}}
|
|
10
10
|
- **Repo root**: {{repo_root}}
|
|
11
11
|
- **Diff from base**: {{diff}}
|
|
12
|
-
- **QA rules (JSON)**: {{qa_rules}} —
|
|
12
|
+
- **QA rules (JSON)**: {{qa_rules}} — a JSON object `{ rules: [...] }` whose `rules` is a list of `{cwd, match, command}` entries. Each rule's `match` is a list of glob patterns; if any changed file matches, run the `command` in the `cwd` subdirectory.
|
|
13
13
|
|
|
14
14
|
## Contract note
|
|
15
15
|
|