@welluable/orch 1.0.0 → 1.1.0
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/lib/stage-summary.js +36 -3
- package/package.json +3 -2
package/lib/stage-summary.js
CHANGED
|
@@ -24,11 +24,44 @@ export function splitStageSummary(raw) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* Split a one-paragraph summary into sentence-sized bullet lines. Splits at
|
|
28
|
+
* a `.`/`!`/`?` only when it's followed by whitespace and then a capital
|
|
29
|
+
* letter or digit, so periods inside filenames/versions (e.g. "status.md")
|
|
30
|
+
* don't cause a false split.
|
|
31
|
+
*/
|
|
32
|
+
function splitSummaryIntoBullets(summary) {
|
|
33
|
+
const normalized = summary.replace(/\s+/g, ' ').trim();
|
|
34
|
+
if (!normalized) return [];
|
|
35
|
+
return normalized
|
|
36
|
+
.split(/(?<=[.!?])\s+(?=[A-Z0-9])/)
|
|
37
|
+
.map((sentence) => sentence.trim())
|
|
38
|
+
.filter(Boolean);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Print a titled, bulleted block for a stage's summary paragraph, e.g.:
|
|
43
|
+
*
|
|
44
|
+
* ──────────
|
|
45
|
+
* triage
|
|
46
|
+
* ──────────
|
|
47
|
+
* • Sentence one.
|
|
48
|
+
* • Sentence two.
|
|
49
|
+
*
|
|
50
|
+
* No-op when summary is empty so stages that return no summary don't print
|
|
51
|
+
* a broken block.
|
|
29
52
|
*/
|
|
30
53
|
export function printStageSummary(label, summary) {
|
|
31
54
|
if (!summary) return;
|
|
55
|
+
|
|
56
|
+
const title = ` ${label} `;
|
|
57
|
+
const rule = '─'.repeat(title.length);
|
|
58
|
+
|
|
59
|
+
console.log();
|
|
60
|
+
console.log(rule);
|
|
61
|
+
console.log(title);
|
|
62
|
+
console.log(rule);
|
|
63
|
+
for (const bullet of splitSummaryIntoBullets(summary)) {
|
|
64
|
+
console.log(` • ${bullet}`);
|
|
65
|
+
}
|
|
32
66
|
console.log();
|
|
33
|
-
console.log(`[${label}] summary: ${summary}`);
|
|
34
67
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@welluable/orch",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "CLI orchestrator: triage → research → plan → implement",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "main.js",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"test": "node --test \"test/**/*.test.js\"",
|
|
17
17
|
"commit": "agn 'commit with a detailed message and push'",
|
|
18
|
-
"docs": "orch --quick 'Update README.md and orch --help so they match the current CLI. Only update what changes and add what is missing.' --agent agn"
|
|
18
|
+
"docs": "orch --quick 'Update README.md and orch --help so they match the current CLI. Only update what changes and add what is missing.' --agent agn",
|
|
19
|
+
"release": "orch --quick 'Bump the minor version in package.json and package-lock.json, then publish to npm.' --agent agn"
|
|
19
20
|
},
|
|
20
21
|
"keywords": [],
|
|
21
22
|
"author": "",
|