@walwal-harness/cli 5.5.0 → 5.5.2
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/bin/init.js
CHANGED
|
@@ -101,27 +101,38 @@ function scaffoldHarness() {
|
|
|
101
101
|
ensureDir(path.join(HARNESS_DIR, 'archive'));
|
|
102
102
|
ensureDir(path.join(HARNESS_DIR, 'gotchas'));
|
|
103
103
|
|
|
104
|
-
// Copy gotchas —
|
|
104
|
+
// Copy gotchas — preserve any existing file that has accumulated entries.
|
|
105
|
+
// Dispatcher appends `### [G-NNN] ...` entries directly; we must NEVER overwrite
|
|
106
|
+
// a file that has such entries, or user learning history is lost.
|
|
105
107
|
const gotchasSrc = path.join(PKG_ROOT, 'gotchas');
|
|
106
108
|
if (fs.existsSync(gotchasSrc)) {
|
|
107
|
-
const
|
|
109
|
+
const ENTRY_PATTERN = /^### \[G-\d+\]/m; // Gotcha entry heading
|
|
110
|
+
const CUSTOM_MARKER = '## Custom Gotchas'; // Legacy marker still supported
|
|
108
111
|
const files = fs.readdirSync(gotchasSrc);
|
|
109
112
|
for (const file of files) {
|
|
110
113
|
const destPath = path.join(HARNESS_DIR, 'gotchas', file);
|
|
111
114
|
const srcPath = path.join(gotchasSrc, file);
|
|
112
|
-
if (fileExists(destPath)
|
|
113
|
-
// Preserve user-added custom section
|
|
114
|
-
const existing = fs.readFileSync(destPath, 'utf8');
|
|
115
|
-
const customIdx = existing.indexOf(CUSTOM_MARKER);
|
|
116
|
-
const userCustom = customIdx !== -1 ? existing.substring(customIdx) : '';
|
|
117
|
-
let newContent = fs.readFileSync(srcPath, 'utf8');
|
|
118
|
-
if (userCustom) {
|
|
119
|
-
newContent = newContent.trimEnd() + '\n\n' + userCustom;
|
|
120
|
-
}
|
|
121
|
-
fs.writeFileSync(destPath, newContent);
|
|
122
|
-
} else {
|
|
115
|
+
if (!fileExists(destPath)) {
|
|
123
116
|
copyFile(srcPath, destPath);
|
|
117
|
+
continue;
|
|
124
118
|
}
|
|
119
|
+
if (!file.endsWith('.md')) continue;
|
|
120
|
+
|
|
121
|
+
const existing = fs.readFileSync(destPath, 'utf8');
|
|
122
|
+
const hasEntries = ENTRY_PATTERN.test(existing);
|
|
123
|
+
const hasCustomSection = existing.indexOf(CUSTOM_MARKER) !== -1;
|
|
124
|
+
|
|
125
|
+
if (hasEntries || hasCustomSection) {
|
|
126
|
+
// User has accumulated data — DO NOT overwrite. Skip silently.
|
|
127
|
+
// README.md is the only exception (system doc, regenerated below).
|
|
128
|
+
if (file === 'README.md') {
|
|
129
|
+
copyFile(srcPath, destPath);
|
|
130
|
+
}
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// File exists but is just the scaffold template — safe to refresh
|
|
135
|
+
copyFile(srcPath, destPath);
|
|
125
136
|
}
|
|
126
137
|
}
|
|
127
138
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walwal-harness/cli",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.2",
|
|
4
4
|
"description": "Production harness for AI agent engineering — Solo/Team mode, Planner, Generator(BE/FE), Evaluator chain (Code-Quality → Functional → Visual), optional Brainstormer. Supports React, Next.js, and Flutter FE stacks.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"walwal-harness": "bin/init.js"
|
|
@@ -271,7 +271,7 @@ render_team_features() {
|
|
|
271
271
|
($q[0].queue.in_progress // {}) as $prog |
|
|
272
272
|
.features[] |
|
|
273
273
|
.id as $fid |
|
|
274
|
-
(.name // .description // "?" | if length > 18 then .[0:16] + ".." else . end) as $fname |
|
|
274
|
+
(.name // .title // .description // "?" | if length > 18 then .[0:16] + ".." else . end) as $fname |
|
|
275
275
|
(if ($fid | IN($passed[])) then "P"
|
|
276
276
|
elif $prog[$fid] then "I|\($prog[$fid].team)|\($prog[$fid].phase)"
|
|
277
277
|
elif ($fid | IN($failed[])) then "F"
|
|
@@ -111,7 +111,7 @@ render_progress() {
|
|
|
111
111
|
while [ $i -lt "$total_features" ]; do
|
|
112
112
|
local fid fname passes be_pass fe_pass eval_func_pass eval_visual_pass
|
|
113
113
|
fid=$(jq -r ".features[$i].id // \"F-$((i+1))\"" "$FEATURES")
|
|
114
|
-
fname=$(jq -r ".features[$i].name // .features[$i].description // \"Feature $((i+1))\"" "$FEATURES")
|
|
114
|
+
fname=$(jq -r ".features[$i].name // .features[$i].title // .features[$i].description // \"Feature $((i+1))\"" "$FEATURES")
|
|
115
115
|
passes=$(jq -r ".features[$i].passes // [] | .[]" "$FEATURES" 2>/dev/null)
|
|
116
116
|
|
|
117
117
|
# Truncate name to 20 chars
|