harness-everything 0.54.1 → 0.55.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.
Files changed (35) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +2 -1
  3. package/CHANGELOG.md +17 -0
  4. package/README.md +1 -0
  5. package/ci/mechanism-error-ledger-oracle.test.js +222 -0
  6. package/ci/mechanism-error-ledger-promote.test.js +520 -0
  7. package/ci/mechanism-error-ledger-scan.test.js +640 -0
  8. package/ci/mechanism-errors-sync-root.test.js +215 -0
  9. package/ci/openai-plugin-package.test.js +1 -1
  10. package/docs/workflows/error-ledger-bootstrap.md +23 -0
  11. package/error-ledger-bootstrap/SKILL.md +33 -0
  12. package/error-ledger-bootstrap/references/workflow.md +79 -0
  13. package/error-ledger-bootstrap/scripts/promote.js +613 -0
  14. package/error-ledger-bootstrap/scripts/scan.js +654 -0
  15. package/evals/error-ledger-bootstrap/eval.yaml +26 -0
  16. package/evals/error-ledger-bootstrap/tasks/negative-error-handling-map.yaml +16 -0
  17. package/evals/error-ledger-bootstrap/tasks/negative-trigger.yaml +16 -0
  18. package/evals/error-ledger-bootstrap/tasks/positive-trigger.yaml +15 -0
  19. package/harness-everything/SKILL.md +1 -1
  20. package/harness-everything/references/skill-registry.md +1 -0
  21. package/harness-everything/scripts/routing-keywords.json +11 -0
  22. package/opencode-plugin/plugin.json +1 -1
  23. package/package.json +1 -1
  24. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  25. package/plugins/harness-everything/plugin.json +1 -1
  26. package/plugins/harness-everything/skills/error-ledger-bootstrap/SKILL.md +33 -0
  27. package/plugins/harness-everything/skills/error-ledger-bootstrap/references/workflow.md +79 -0
  28. package/plugins/harness-everything/skills/error-ledger-bootstrap/scripts/promote.js +613 -0
  29. package/plugins/harness-everything/skills/error-ledger-bootstrap/scripts/scan.js +654 -0
  30. package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
  31. package/plugins/harness-everything/skills/harness-everything/references/skill-registry.md +1 -0
  32. package/plugins/harness-everything/skills/harness-everything/scripts/routing-keywords.json +11 -0
  33. package/sbom.cdx.json +7 -7
  34. package/scripts/error-ledger-oracle.js +257 -0
  35. package/scripts/errors-sync.js +175 -12
@@ -10,7 +10,7 @@
10
10
  "name": "harness-everything",
11
11
  "source": "./",
12
12
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
13
- "version": "0.54.1",
13
+ "version": "0.55.0",
14
14
  "author": {
15
15
  "name": "Miya Daniel"
16
16
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-everything",
3
3
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
4
- "version": "0.54.1",
4
+ "version": "0.55.0",
5
5
  "author": {
6
6
  "name": "Miya Daniel"
7
7
  },
@@ -24,6 +24,7 @@
24
24
  "skills": [
25
25
  "./multi-agent-workspace",
26
26
  "./code-review",
27
+ "./error-ledger-bootstrap",
27
28
  "./environment-detection",
28
29
  "./eval-harness",
29
30
  "./fable-discipline",
package/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [0.55.0](https://github.com/dyphn1/Harness-everything/compare/v0.54.1...v0.55.0) (2026-11-20)
6
+
7
+ ### Features
8
+
9
+ * **errors:** add a local scanner for ledger bootstrap candidates ([b34be38](https://github.com/dyphn1/Harness-everything/commit/b34be38145348176c63f0faf26fd071115e1485f)), closes [#479](https://github.com/dyphn1/Harness-everything/issues/479)
10
+ * **errors:** add the error-ledger-bootstrap skill with routing eval ([71e64c3](https://github.com/dyphn1/Harness-everything/commit/71e64c3ba691b2c5f3c8647976c46a27a9916445)), closes [#479](https://github.com/dyphn1/Harness-everything/issues/479)
11
+ * **errors:** promote an owner-approved candidate into a target ledger ([7c8b672](https://github.com/dyphn1/Harness-everything/commit/7c8b6723f0120559805fddf9e54ea8eb8e2e8a86)), closes [#479](https://github.com/dyphn1/Harness-everything/issues/479)
12
+ * **errors:** scan repeated doc fixes and offline tracker exports ([5e36882](https://github.com/dyphn1/Harness-everything/commit/5e368829464abe8f5f66129045fe685f31ae5950)), closes [#479](https://github.com/dyphn1/Harness-everything/issues/479)
13
+ * **errors:** sync the ledger index of a target repository with --root ([0973bec](https://github.com/dyphn1/Harness-everything/commit/0973bec75a0f45b4cd4de0c9ef158c75f0186ed5)), closes [#479](https://github.com/dyphn1/Harness-everything/issues/479)
14
+
15
+ ### Bug Fixes
16
+
17
+ * **errors:** close the pr 483 owner review findings ([7e35a65](https://github.com/dyphn1/Harness-everything/commit/7e35a6574bd450ebe67e866a555ad8bfd15c355d))
18
+ * **errors:** confine ledger index writes to the target ledger ([410231c](https://github.com/dyphn1/Harness-everything/commit/410231c88addb1ce8ce6666784aa05c926709d8e)), closes [#479](https://github.com/dyphn1/Harness-everything/issues/479)
19
+ * **errors:** keep private memory labels opaque in bootstrap reports ([c61f080](https://github.com/dyphn1/Harness-everything/commit/c61f08060193bb4030c21f310e197e5012b7800c)), closes [#479](https://github.com/dyphn1/Harness-everything/issues/479)
20
+ * **errors:** label the oracle unmatched share as a path-overlap proxy ([79cb92c](https://github.com/dyphn1/Harness-everything/commit/79cb92c81fae064a60c11c8bb2dc3b2868800be9)), closes [#479](https://github.com/dyphn1/Harness-everything/issues/479)
21
+
5
22
  ## [0.54.1](https://github.com/dyphn1/Harness-everything/compare/v0.54.0...v0.54.1) (2026-11-20)
6
23
 
7
24
  ### Bug Fixes
package/README.md CHANGED
@@ -239,6 +239,7 @@ This repo uses a flat layout (waza/agentskills.io convention). The table below m
239
239
  | `references` | **Documentation** | Shared checklists (security, performance, definition-of-done) |
240
240
  | `multi-agent-workspace` | **Skill (Tier 3)** | Scaffold a verified multi-agent workspace and select bounded specialists from an external catalog without vendoring the full roster |
241
241
  | `code-review` | **Skill (Tier 2)** | Independent, evidence-tiered PR/diff code review (read-only by default) |
242
+ | `error-ledger-bootstrap` | **Skill (Tier 2)** | Inventory local lessons and promote owner-approved error-ledger entries |
242
243
  | `environment-detection` | **Foundation** | Preflight: detect OS, shell, package manager |
243
244
  | `eval-harness` | **Skill (Tier 2)** | Evaluate agent outputs against rubrics |
244
245
  | `fable-discipline` | **Skill (Tier 3)** | Fable execution guardrails when Fable is selected |
@@ -0,0 +1,222 @@
1
+ 'use strict';
2
+
3
+ const assert = require('node:assert/strict');
4
+ const childProcess = require('node:child_process');
5
+ const crypto = require('node:crypto');
6
+ const fs = require('node:fs');
7
+ const os = require('node:os');
8
+ const path = require('node:path');
9
+
10
+ const ROOT = path.resolve(__dirname, '..');
11
+ const SCRIPT = path.join(ROOT, 'scripts', 'error-ledger-oracle.js');
12
+ const TMP = fs.realpathSync.native(fs.mkdtempSync(path.join(os.tmpdir(), 'harness-error-ledger-oracle-')));
13
+ process.on('exit', () => fs.rmSync(TMP, { recursive: true, force: true }));
14
+
15
+ function write(file, value) {
16
+ fs.mkdirSync(path.dirname(file), { recursive: true });
17
+ fs.writeFileSync(file, value);
18
+ }
19
+
20
+ function makeFixture(name, records, candidates) {
21
+ const root = path.join(TMP, name);
22
+ const ledger = path.join(root, 'errors');
23
+ const report = path.join(root, 'scan-report.json');
24
+ fs.mkdirSync(ledger, { recursive: true });
25
+ for (const record of records) {
26
+ const sites = record.sites.map(site => ` - ${JSON.stringify(site)}`).join('\n');
27
+ write(path.join(ledger, `${record.id}-fixture.md`), [
28
+ '---', `id: ${record.id}`, 'sites:', sites, '---',
29
+ '', record.lesson || `PRIVATE_RECORD_BODY_${record.id}`, ''
30
+ ].join('\n'));
31
+ }
32
+ write(report, `${JSON.stringify({
33
+ schemaVersion: 1,
34
+ candidates: candidates.map(candidate => ({
35
+ kind: 'error-candidate',
36
+ id: candidate.id,
37
+ title: candidate.title || `PRIVATE_CANDIDATE_TITLE_${candidate.id}`,
38
+ sites: candidate.sites,
39
+ sources: [{ type: 'memory', title: 'PRIVATE_MEMORY_SOURCE_TITLE' }]
40
+ }))
41
+ }, null, 2)}\n`);
42
+ return { root, ledger, report };
43
+ }
44
+
45
+ function snapshot(dir) {
46
+ const entries = [];
47
+ function visit(current, relative = '') {
48
+ for (const entry of fs.readdirSync(current, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
49
+ const child = path.join(current, entry.name);
50
+ const childRelative = path.join(relative, entry.name);
51
+ if (entry.isDirectory()) visit(child, childRelative);
52
+ else entries.push([childRelative, crypto.createHash('sha256').update(fs.readFileSync(child)).digest('hex')]);
53
+ }
54
+ }
55
+ visit(dir);
56
+ return entries;
57
+ }
58
+
59
+ function run(fixture, options = []) {
60
+ const env = { ...process.env, HOME: TMP, USERPROFILE: TMP };
61
+ delete env.HARNESS_SYSTEM_ONE_MODE;
62
+ const result = childProcess.spawnSync(process.execPath, [
63
+ SCRIPT, '--report', fixture.report, '--ledger', fixture.ledger, ...options
64
+ ], { cwd: ROOT, encoding: 'utf8', env });
65
+ assert.ifError(result.error);
66
+ return result;
67
+ }
68
+
69
+ function jsonResult(result, expectedStatus = 0) {
70
+ assert.strictEqual(result.status, expectedStatus,
71
+ `oracle exit ${result.status}; expected ${expectedStatus}; stderr: ${result.stderr}`);
72
+ if (expectedStatus === 0) assert.strictEqual(result.stderr, '', 'successful oracle runs do not write stderr');
73
+ return expectedStatus === 0 ? JSON.parse(result.stdout) : null;
74
+ }
75
+
76
+ const fixture = makeFixture('main', [
77
+ { id: 'E-0001', sites: ['parser/parser.js (PR #448 branch; not on main at bd986013)'] },
78
+ { id: 'E-0002', sites: ['dir-only'] },
79
+ { id: 'E-0003', sites: ['boundary/a/bc.js'] },
80
+ { id: 'E-0004', sites: ['/private/absolute.js (PR #448)', 'C:\\private\\absolute.js', '../outside.js', 'https://example.invalid/a/path'] },
81
+ { id: 'E-0005', sites: ['shared/file.js'] },
82
+ { id: 'E-0006', sites: ['shared/file.js'] },
83
+ { id: 'E-0007', sites: ['other/never.js'] },
84
+ { id: 'E-0008', sites: ['parent/child.js'] }
85
+ ], [
86
+ { id: 'candidate-exact', sites: ['./parser\\parser.js'] },
87
+ { id: 'candidate-child', sites: ['dir-only/sub/module.js'] },
88
+ { id: 'candidate-boundary', sites: ['boundary/a/b'] },
89
+ { id: 'candidate-shared', sites: ['shared/file.js'] },
90
+ { id: 'candidate-parent', sites: ['parent'] }
91
+ ]);
92
+
93
+ const ledgerBefore = snapshot(fixture.ledger);
94
+ const reportBefore = fs.readFileSync(fixture.report);
95
+ const result = run(fixture, ['--json']);
96
+ const payload = jsonResult(result);
97
+
98
+ assert.deepStrictEqual(Object.keys(payload).sort(),
99
+ ['counts', 'rates', 'metricNote', 'nonComparable', 'linked', 'unlinked', 'sharedPathHits'].sort());
100
+ assert.deepStrictEqual(payload.counts, {
101
+ records: 8,
102
+ comparableRecords: 7,
103
+ linkedRecords: 5,
104
+ candidates: 5,
105
+ unmatchedCandidates: 1
106
+ });
107
+ assert.deepStrictEqual(payload.rates, { recallAll: 5 / 8, recallComparable: 5 / 7, unmatchedShare: 1 / 5 });
108
+ assert.match(payload.metricNote, /path overlap is a proxy and may link distinct lessons/i);
109
+ assert.match(payload.metricNote, /recall \(all\) = linked records \/ all records/i);
110
+ assert.match(payload.metricNote, /recall \(comparable\) = linked records \/ comparable records/i);
111
+ assert.deepStrictEqual(payload.nonComparable, ['E-0004']);
112
+ assert.deepStrictEqual(payload.linked, [
113
+ { id: 'E-0001', candidateIds: ['candidate-exact'] },
114
+ { id: 'E-0002', candidateIds: ['candidate-child'] },
115
+ { id: 'E-0005', candidateIds: ['candidate-shared'] },
116
+ { id: 'E-0006', candidateIds: ['candidate-shared'] },
117
+ { id: 'E-0008', candidateIds: ['candidate-parent'] }
118
+ ]);
119
+ assert.deepStrictEqual(payload.unlinked, ['E-0003', 'E-0004', 'E-0007'],
120
+ 'a/bc.js does not match the directory a/b at a segment boundary');
121
+ assert.deepStrictEqual(payload.sharedPathHits, [{
122
+ site: 'shared/file.js',
123
+ recordIds: ['E-0005', 'E-0006'],
124
+ candidateIds: ['candidate-shared']
125
+ }]);
126
+ assert.ok(!result.stdout.includes('PRIVATE_RECORD_BODY_') && !result.stdout.includes('PRIVATE_CANDIDATE_TITLE_') &&
127
+ !result.stdout.includes('PRIVATE_MEMORY_SOURCE_TITLE'), 'output contains ids and counts, not record bodies or memory titles');
128
+ assert.deepStrictEqual(snapshot(fixture.ledger), ledgerBefore, 'the fixture ledger is byte-identical after a run');
129
+ assert.deepStrictEqual(fs.readFileSync(fixture.report), reportBefore, 'the scan report is byte-identical after a run');
130
+
131
+ const markdown = run(fixture);
132
+ assert.strictEqual(markdown.status, 0, `Markdown output failed: ${markdown.stderr}`);
133
+ assert.match(markdown.stdout, /^Path overlap is a proxy/i);
134
+ assert.match(markdown.stdout, /\n\n\| Metric \| Value \|/);
135
+ assert.ok(markdown.stdout.includes('recall (all)') &&
136
+ markdown.stdout.includes('unmatched candidate share (path overlap)'));
137
+ assert.match(markdown.stdout, /path overlap is a proxy and may link distinct lessons/i);
138
+ assert.match(markdown.stdout, /recall \(all\) = linked records \/ all records/i);
139
+ assert.match(markdown.stdout, /recall \(comparable\) = linked records \/ comparable records/i);
140
+
141
+ const saved = path.join(fixture.root, 'oracle.json');
142
+ const savedResult = run(fixture, ['--json', '--out', saved]);
143
+ jsonResult(savedResult);
144
+ assert.deepStrictEqual(JSON.parse(fs.readFileSync(saved, 'utf8')), payload, '--out saves the JSON output');
145
+
146
+ const blocked = run(fixture, ['--json', '--out', path.join(fixture.ledger, 'forbidden.json')]);
147
+ assert.strictEqual(blocked.status, 2, 'an output path inside the ledger is rejected');
148
+ assert.match(blocked.stderr, /inside the ledger directory/);
149
+ assert.deepStrictEqual(snapshot(fixture.ledger), ledgerBefore, 'a rejected output path leaves every ledger byte unchanged');
150
+ const reportOverwrite = run(fixture, ['--json', '--out', fixture.report]);
151
+ assert.strictEqual(reportOverwrite.status, 2, 'the scan report cannot be used as an output path');
152
+ assert.deepStrictEqual(fs.readFileSync(fixture.report), reportBefore, 'a rejected output path leaves the scan report unchanged');
153
+ const reportHardlink = path.join(fixture.root, 'report-hardlink.json');
154
+ try {
155
+ fs.linkSync(fixture.report, reportHardlink);
156
+ const hardlinkOverwrite = run(fixture, ['--json', '--out', reportHardlink]);
157
+ assert.strictEqual(hardlinkOverwrite.status, 2, 'a hard link to the scan report cannot be used as output');
158
+ assert.deepStrictEqual(fs.readFileSync(fixture.report), reportBefore, 'a rejected hard link leaves the scan report unchanged');
159
+ } catch (error) {
160
+ if (!['EPERM', 'EACCES', 'ENOTSUP', 'ENOSYS', 'EINVAL'].includes(error.code)) throw error;
161
+ }
162
+ const ledgerAlias = path.join(fixture.root, 'errors-alias');
163
+ try {
164
+ fs.symlinkSync(fixture.ledger, ledgerAlias, 'dir');
165
+ const aliasOutput = run(fixture, ['--json', '--out', path.join(ledgerAlias, 'forbidden.json')]);
166
+ assert.strictEqual(aliasOutput.status, 2, 'a symlinked path into the ledger is rejected');
167
+ assert.deepStrictEqual(snapshot(fixture.ledger), ledgerBefore, 'a symlinked output cannot write into the ledger');
168
+ } catch (error) {
169
+ if (!['EPERM', 'EACCES', 'ENOTSUP', 'ENOSYS', 'EINVAL'].includes(error.code)) throw error;
170
+ }
171
+ const danglingAlias = path.join(fixture.root, 'dangling-output');
172
+ try {
173
+ fs.symlinkSync(path.join(fixture.ledger, 'new-record.md'), danglingAlias);
174
+ const danglingOutput = run(fixture, ['--json', '--out', danglingAlias]);
175
+ assert.strictEqual(danglingOutput.status, 2, 'a dangling symlink into the ledger is rejected');
176
+ assert.deepStrictEqual(snapshot(fixture.ledger), ledgerBefore, 'a dangling symlink cannot create a ledger file');
177
+ } catch (error) {
178
+ if (!['EPERM', 'EACCES', 'ENOTSUP', 'ENOSYS', 'EINVAL'].includes(error.code)) throw error;
179
+ }
180
+
181
+ const zero = makeFixture('zero-candidates', [
182
+ { id: 'E-0009', sites: ['src/never-linked.js'] }
183
+ ], []);
184
+ const zeroPayload = jsonResult(run(zero, ['--json']));
185
+ assert.strictEqual(zeroPayload.rates.unmatchedShare, null, 'unmatched share is null when there are no candidates');
186
+ assert.strictEqual(zeroPayload.counts.unmatchedCandidates, 0);
187
+ const zeroMarkdown = run(zero);
188
+ assert.strictEqual(zeroMarkdown.status, 0, `zero-candidate Markdown output failed: ${zeroMarkdown.stderr}`);
189
+ assert.match(zeroMarkdown.stdout, /\| unmatched candidate share \(path overlap\) \| n\/a \|/);
190
+
191
+ const differentLessons = makeFixture('same-path-different-lessons', [
192
+ { id: 'E-0012', sites: ['shared/ambiguous.js'], lesson: 'Database deadlock handling' }
193
+ ], [
194
+ { id: 'candidate-different-lesson', sites: ['shared/ambiguous.js'], title: 'CSS formatting only' }
195
+ ]);
196
+ const differentLessonPayload = jsonResult(run(differentLessons, ['--json']));
197
+ assert.deepStrictEqual(differentLessonPayload.linked, [
198
+ { id: 'E-0012', candidateIds: ['candidate-different-lesson'] }
199
+ ], 'same-file candidates link even when their lesson text differs');
200
+ assert.strictEqual(differentLessonPayload.rates.unmatchedShare, 0,
201
+ 'path overlap alone cannot identify a semantically unrelated candidate');
202
+ assert.match(differentLessonPayload.metricNote, /may link distinct lessons/i);
203
+
204
+ const windows = makeFixture('windows', [
205
+ { id: 'E-0010', sites: ['Src\\Parser.JS'] },
206
+ { id: 'E-0011', sites: ['C:\\repo\\src'] }
207
+ ], [
208
+ { id: 'candidate-win-case', sites: ['src/parser.js'] },
209
+ { id: 'candidate-other-drive', sites: ['D:/repo/src/file.js'] }
210
+ ]);
211
+ const windowsPayload = jsonResult(run(windows, ['--json', '--platform', 'win32']));
212
+ assert.deepStrictEqual(windowsPayload.linked, [
213
+ { id: 'E-0010', candidateIds: ['candidate-win-case'] }
214
+ ], 'win32 matching ignores case and never treats C: and D: paths as contained');
215
+ assert.deepStrictEqual(windowsPayload.nonComparable, ['E-0011']);
216
+
217
+ try {
218
+ fs.rmSync(TMP, { recursive: true, force: true });
219
+ } catch (error) {
220
+ process.stderr.write(`temporary fixture cleanup failed: ${error.message}\n`);
221
+ process.exitCode = 1;
222
+ }