harness-everything 0.55.0 → 0.55.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.
@@ -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.55.0",
13
+ "version": "0.55.1",
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.55.0",
4
+ "version": "0.55.1",
5
5
  "author": {
6
6
  "name": "Miya Daniel"
7
7
  },
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [0.55.1](https://github.com/dyphn1/Harness-everything/compare/v0.55.0...v0.55.1) (2026-11-20)
6
+
7
+ ### Bug Fixes
8
+
9
+ * align first-stage report and verification contracts ([d6de493](https://github.com/dyphn1/Harness-everything/commit/d6de4938ddce7cd6139627ab567fbade526de6b7))
10
+
5
11
  ## [0.55.0](https://github.com/dyphn1/Harness-everything/compare/v0.54.1...v0.55.0) (2026-11-20)
6
12
 
7
13
  ### Features
@@ -18,14 +18,30 @@ const codexHooksCompat = require('../scripts/codex-hooks-compat');
18
18
  // A fake host runner does not mock the compatibility installer's filesystem
19
19
  // writes. Fail closed if any case forgets to pass its explicit temporary home.
20
20
  const realInstall = codexHooksCompat.install;
21
+ function isInsideTempRoot(root, target, pathApi = path) {
22
+ const relative = pathApi.relative(root, target);
23
+ const outside = relative === '..' || relative.startsWith('..' + pathApi.sep) || pathApi.isAbsolute(relative);
24
+ return relative !== '' && !outside;
25
+ }
26
+
21
27
  codexHooksCompat.install = options => {
22
28
  assert(options && options.codexHome, 'tests must supply an explicit temporary Codex home');
23
- const relative = path.relative(os.tmpdir(), path.resolve(options.codexHome));
24
- assert(relative && !relative.startsWith('..') && !path.isAbsolute(relative),
29
+ assert(isInsideTempRoot(os.tmpdir(), path.resolve(options.codexHome)),
25
30
  'test Codex home must be inside the temporary directory');
26
31
  return realInstall(options);
27
32
  };
28
33
 
34
+ for (const [target, inside] of [
35
+ ['D:\\repo', false],
36
+ ['D:\\repo\\..cache', true],
37
+ ['D:\\repo\\child', true],
38
+ ['D:\\other', false],
39
+ ['D:\\', false],
40
+ ['C:\\temp', false],
41
+ ]) {
42
+ assert.strictEqual(isInsideTempRoot('D:\\repo', target, path.win32), inside, target);
43
+ }
44
+
29
45
 
30
46
  function fakeHost({ claudeInstalled = false, codexInstalled = false, codexPluginSourcePath = path.join(ROOT, 'plugins', 'harness-everything'), codexPluginSourceType = 'local', codexAvailableOnly = false, claudeMarketplace = true, codexMarketplace = true, unknownClaudePluginState = false, unknownClaudeYesFlag = false, unknownClaudeJsonFlag = false, clapCodexJsonFlag = false, missingCodexPluginCommand = false, codexHooksError = null } = {}) {
31
47
  const calls = [];
@@ -56,11 +56,21 @@ function assertScopeGating({ ci, release, governance }) {
56
56
  assert.ok(classifier, 'the ci-change-scope job exists');
57
57
  assert.ok(selfRegression, 'the self-regression job exists');
58
58
 
59
- // Only self-regression may be gated by the classifier. Other jobs, their
60
- // steps and later added ungated jobs are deliberately left unpinned.
59
+ // Every dependency chain that could inherit the docs-only skip has a first
60
+ // job that needs the classifier or self-regression.
61
+ const scopeJobs = [CHANGE_SCOPE_JOB, 'self-regression'];
62
+ // Match needs.job and needs['job'] references while skipping quoted strings.
63
+ const needsReference = /'(?:[^']|'')*'|(?<![\w.-])needs\s*(?:\.\s*([\w-]+)|\[\s*'([\w-]+)'\s*\])/gi;
61
64
  for (const [jobId, job] of Object.entries(jobs)) {
62
- if (jobId === CHANGE_SCOPE_JOB || jobId === 'self-regression') continue;
63
- assert.ok(!Object.hasOwn(job, 'if'), `${jobId} must not be gated`);
65
+ if (scopeJobs.includes(jobId)) continue;
66
+ const needs = Array.isArray(job.needs) ? job.needs : [job.needs];
67
+ for (const scopeJob of scopeJobs) {
68
+ assert.ok(!needs.includes(scopeJob), `${jobId} must not depend on ${scopeJob}`);
69
+ }
70
+ for (const [, dotJob, bracketJob] of String(job.if ?? '').matchAll(needsReference)) {
71
+ const dependency = dotJob ?? bracketJob;
72
+ assert.ok(!scopeJobs.includes(dependency?.toLowerCase()), `${jobId} must not reference scope-gated jobs in its condition`);
73
+ }
64
74
  }
65
75
 
66
76
  // The classifier runs only on pull requests and wires its scope output.
@@ -244,13 +254,17 @@ test('real Git merge-base diff includes earlier code, deletions, both rename end
244
254
  }
245
255
  });
246
256
 
247
- test('the workflow gates only self-regression and fails open on every uncertain dependency/output state', () => {
257
+ function readScopeWorkflows() {
248
258
  const readWorkflow = file => yaml.load(fs.readFileSync(path.join(ROOT, file), 'utf8'));
249
- assertScopeGating({
259
+ return {
250
260
  ci: readWorkflow('.github/workflows/ci.yml'),
251
261
  release: readWorkflow('.github/workflows/release.yml'),
252
262
  governance: readWorkflow('.github/workflows/doc-governance.yml'),
253
- });
263
+ };
264
+ }
265
+
266
+ test('the workflow gates only self-regression and fails open on every uncertain dependency/output state', () => {
267
+ assertScopeGating(readScopeWorkflows());
254
268
 
255
269
  const gateCases = [
256
270
  ['successful docs-only classifier', false, 'success', 'docs-only', false],
@@ -272,6 +286,53 @@ test('the workflow gates only self-regression and fails open on every uncertain
272
286
  assert.equal(classifyChangeSet('push', 'a'.repeat(40), 'b'.repeat(40), { runGit: unusedGitForWorkflow }), 'full');
273
287
  });
274
288
 
289
+ test('the oracle accepts jobs with independent conditions and dependencies', () => {
290
+ const workflows = readScopeWorkflows();
291
+ const jobs = workflows.ci.jobs;
292
+ jobs['pilot-offline-evidence'].if = "${{ github.event_name == 'push' }}";
293
+ jobs['extra-check'] = {
294
+ 'runs-on': 'ubuntu-latest',
295
+ steps: [{ run: 'echo check' }],
296
+ };
297
+ assertScopeGating(workflows);
298
+
299
+ jobs['extra-check'].needs = 'pilot-offline-evidence';
300
+ jobs['extra-check'].if = "${{ github.head_ref == 'docs-only' && contains(github.event.pull_request.body, 'needs.ci-change-scope') }}";
301
+ assertScopeGating(workflows);
302
+ });
303
+
304
+ test('the oracle rejects additional jobs wired to scope gating', () => {
305
+ for (const [job, expected] of [
306
+ [{ needs: CHANGE_SCOPE_JOB }, /must not depend on ci-change-scope/],
307
+ [{ needs: ['self-regression'] }, /must not depend on self-regression/],
308
+ [{ if: "needs.ci-change-scope.outputs.scope != 'docs-only'" }, /must not reference scope-gated jobs/],
309
+ [{ if: "needs[ 'ci-change-scope' ].outputs.scope != 'docs-only'" }, /must not reference scope-gated jobs/],
310
+ ]) {
311
+ const workflows = readScopeWorkflows();
312
+ workflows.ci.jobs['extra-check'] = job;
313
+ workflows.ci.jobs['downstream-check'] = { needs: 'extra-check' };
314
+ assert.throws(() => assertScopeGating(workflows), expected);
315
+ }
316
+ });
317
+
318
+ test('the oracle retains the existing scope-gating invariants', () => {
319
+ for (const [mutate, expected] of [
320
+ [({ ci }) => { delete ci.jobs['self-regression'].needs; }, /deep-equal/],
321
+ [({ ci }) => { ci.jobs['self-regression'].if = "${{ needs.ci-change-scope.outputs.scope != 'docs-only' }}"; }, /fallback predicate/],
322
+ [({ ci }) => { ci.jobs[CHANGE_SCOPE_JOB].outputs.scope = '${{ steps.wrong.outputs.scope }}'; }, /steps\.scope\.outputs\.scope/],
323
+ [({ ci }) => { ci.jobs[CHANGE_SCOPE_JOB].steps.find(step => step.id === 'scope').env.PR_BASE_SHA = ''; }, /base\.sha/],
324
+ [({ ci }) => { ci.jobs['self-regression'].strategy.matrix.os.pop(); }, /macos-latest/],
325
+ [({ ci }) => { ci.on.push['paths-ignore'] = ['docs/**']; }, /no workflow-level paths-ignore filter/],
326
+ [({ release }) => { release.jobs.gate.uses = './.github/workflows/other.yml'; }, /\.\/\.github\/workflows\/ci\.yml/],
327
+ [({ release }) => { release.jobs.gate.needs = CHANGE_SCOPE_JOB; }, /release\.yml job gate must not depend on the classifier/],
328
+ [({ governance }) => { Object.values(governance.jobs)[0].if = SELF_REGRESSION_IF; }, /doc-governance\.yml job .* must not be gated/],
329
+ ]) {
330
+ const workflows = readScopeWorkflows();
331
+ mutate(workflows);
332
+ assert.throws(() => assertScopeGating(workflows), expected);
333
+ }
334
+ });
335
+
275
336
  function unusedGitForWorkflow() {
276
337
  throw new Error('the release caller is a push/dispatch, so no PR diff may authorize a skip');
277
338
  }
@@ -14,11 +14,21 @@ const FIXED_DATE = '2000-01-01T00:00:00Z';
14
14
 
15
15
  function isOutside(root, target, pathApi = path) {
16
16
  const relative = pathApi.relative(root, target);
17
- return relative.startsWith('..') || pathApi.isAbsolute(relative);
17
+ return relative === '..' || relative.startsWith('..' + pathApi.sep) || pathApi.isAbsolute(relative);
18
18
  }
19
19
 
20
- assert.equal(isOutside('D:\\repo', 'C:\\tmp\\fixture', path.win32), true, 'cross-drive fixtures are outside');
21
- assert.equal(isOutside('D:\\repo', path.win32.join('D:\\repo', 'fixture'), path.win32), false, 'same-drive children are inside');
20
+ test('temporary fixture containment respects Windows path segments and drives', () => {
21
+ for (const [target, outside] of [
22
+ ['D:\\repo', false],
23
+ ['D:\\repo\\..cache', false],
24
+ ['D:\\repo\\child', false],
25
+ ['D:\\other', true],
26
+ ['D:\\', true],
27
+ ['C:\\temp', true],
28
+ ]) {
29
+ assert.equal(isOutside('D:\\repo', target, path.win32), outside, target);
30
+ }
31
+ });
22
32
 
23
33
  function gitEnv(tempRoot) {
24
34
  const env = { ...process.env };
@@ -1,6 +1,6 @@
1
1
  # Error Handling — three-view overview
2
2
 
3
- > **Canonical map** for [#437](https://github.com/dyphn1/Harness-everything/issues/437) (concept and decisions) and [#402](https://github.com/dyphn1/Harness-everything/issues/402) (implementation). Moved from `discussion/437-*` on 2026-11-18; concept decisions still change only through #437. Action identities live in [nodes.yaml](./nodes.yaml); its `links` must match View 1. Level 2/3 documents marked *proposed* describe designs, not shipped behaviour, unless they name the shipped script.
3
+ > **Canonical map** for [#437](https://github.com/dyphn1/Harness-everything/issues/437) (concept and decisions) and [#402](https://github.com/dyphn1/Harness-everything/issues/402) (implementation). Moved from `discussion/437-*` on 2026-11-18; concept decisions still change only through #437. Action identities live in [nodes.yaml](./nodes.yaml); its `links` must match View 1. Levels 1 and 2 describe the proposed workflow. The Level 3 [E-0002 W1 report writer](./details/e0002-report-writer.md) shipped in [#462](https://github.com/dyphn1/Harness-everything/pull/462).
4
4
 
5
5
  An Overview contains **three distinct views**. Their responsibilities must not be merged into a single linear picture:
6
6
 
@@ -18,7 +18,7 @@ An Overview contains **three distinct views**. Their responsibilities must not b
18
18
  - **P2-2 · Registry mapping:** use [the lightweight document/relationship registry](./registry.md) to relate Layer → Document → relevant detail while keeping the existing [Action identities](./nodes.yaml). Registry references are for **lookup/lazy loading**, not a second set of workflow arrows or Action IDs.
19
19
  - **P2-3 · Action handoff:** do **not** impose mandatory input/output schemas on general Actions or behavior blocks. An Action guides what to do and keeps legitimate Agent discretion; concrete Script/CLI/API boundaries document inputs, outputs and return codes only when required (see the E-0002 [Level 3 report writer contract](./details/e0002-report-writer.md)).
20
20
 
21
- This is a **discussion-only** mapping. No evidence yet establishes View/Level confusion; no new global validation gate, loader, governance process or runtime Script exists. Measure Error Handling effectiveness only after the full mechanism including Hook/Skill delivery is integrated.
21
+ This mapping records design decisions. Measure Error Handling effectiveness after the full mechanism, including Hook/Skill delivery, is integrated.
22
22
 
23
23
  ## Level 2 — magnified behavior blocks (E-0002 example)
24
24
 
@@ -26,16 +26,16 @@ This is a **discussion-only** mapping. No evidence yet establishes View/Level co
26
26
 
27
27
  The E-0002 example expands two blocks: **ASSESS (A Capture, B Triage, C Identify)** and **RESPOND (D Decide, E Treat, F Deliver, G Accept)**. It retains Level 1's branching authority, including the distinction **unidentified → Hold** versus **identified/non-blocking → Defer**. Script/CLI return codes let Agent handle unmet constraints **inside the relevant block**; no extra Level 1 control loop is introduced. The Level 1 Action sequence and recurrence boundary remain authoritative.
28
28
 
29
- **Action priority:** tell Agent what to do, not just how to document the last mistake. Here a proposed scoped writer/checker would take truthful content/status, consume `codex exec -o` **as script-mediated raw input**, write/check the final report, and return actionable failure codes. A failed treatment result still reaches the **Deliver and Accept** outcome for the current occurrence. Delivering a reusable command now and exposing it through Hook/Skill in a future relevant task are **different time contexts**, not contradictory Action ordering.
29
+ For a required E-0002 report, use the shipped W1 writer/checker (`npm run report -- write` and `npm run report -- check`). Supply the report content and status, then check the finished file. For `codex exec -o`, supply the raw output through `--from-codex-output`. A failed treatment result still reaches **Deliver and Accept** for the current occurrence.
30
30
 
31
31
  ## Level 3 — optional procedure, CLI/Script contract and evidence
32
32
 
33
33
  Read only the details required for the current Action/block:
34
34
  - [Capture evidence and artifact provenance](./details/e0002-capture-evidence.md): raw report vs final turn, source and unknowns.
35
- - [Treat report writer and `-o` script contract](./details/e0002-report-writer.md): candidate commands, deterministic validation, return codes, negative cases and host-boundary handling.
35
+ - [Treat report writer and `-o` script contract](./details/e0002-report-writer.md): runnable commands, validation, return codes, negative cases and host-boundary handling.
36
36
  - [Existing E-0002 ledger](../../.agents/harness-everything/errors/E-0002-report-missing-terminal-status.md) and [ROUTE-001](../adr/ROUTE-001-error-lesson-delivery.md): existing evidence and delivery background, not duplicated as another store.
37
37
 
38
- **Status:** this is a discussion draft. Level 1 activity / Action identity / Error Ledger / live Hooks are **unchanged**; the proposed CLI has **not** been implemented. A structural PASS from a script is not a substantive task PASS. The integrated Error Handling + Hook system must exist before measuring recurrence and total cost.
38
+ W1 runs locally through `scripts/report-writer.js`. Hook/Skill disclosure ([#394](https://github.com/dyphn1/Harness-everything/issues/394)) and future node/registry expansion remain proposals. A successful CLI check confirms report structure. Use task evidence to assess the underlying result.
39
39
 
40
40
  ## Decision — Error occurrence and recurrence boundary
41
41
 
@@ -1,12 +1,12 @@
1
1
  # E-0002 Treat — Level 3 report-writer contract and test cases
2
2
 
3
- > **Proposed design / Level 3 supporting contract, NOT an implemented CLI.** Companion to the [E-0002 Level 2 Action Map](../actions/e0002-action-map.md) and [Level 1](../README.md) in [#437](https://github.com/dyphn1/Harness-everything/issues/437) and the Error Handling subtree [#402](https://github.com/dyphn1/Harness-everything/issues/402). This specifies **what the agent should do next time** and **which mechanical operation should prevent a repeat**. The proposed commands below do not exist yet; this document does not change production hooks, report rules or ledger state.
3
+ > **Shipped W1 CLI.** [#462](https://github.com/dyphn1/Harness-everything/pull/462) added `scripts/report-writer.js`, exposed through `npm run report`. This is the Level 3 contract for the report operation in the proposed [Level 2 Action Map](../actions/e0002-action-map.md) and [Level 1 workflow](../README.md). Hook/Skill disclosure and future node/registry expansion remain proposals.
4
4
 
5
5
  ## Problem to prevent
6
6
 
7
7
  **E-0002** (`report-protocol`) recurs when a report lacks its required **raw, column-zero, terminal** `STATUS: DONE` or `STATUS: BLOCKED: <reason>` line, or when a harness-label appears after it. Some failures happen in `codex exec -o` outputs where the report is also the final turn text. Previous instructions and reminders were not enough: the next agent can make the same mistake again.
8
8
 
9
- **Treatment direction (proposal):** stop using free-form report editing for the terminal protocol. The **agent supplies report content and an evidence-grounded status**, while one **scoped CLI/script writes and verifies the final report file**. Preserve free-form content authoring; restrict only the structured output operation. Do not add a global document governor, second Error Ledger, automatic report generation for unrelated tasks, or a count-driven lock.
9
+ The agent supplies the report body and an evidence-grounded status. The writer assembles and verifies the final report, including the terminal STATUS line.
10
10
 
11
11
  **Action ownership:** A Capture records facts; B Triage and C Identify establish the case; D Decide chooses treatment. **E Treat defines/applies the mechanical report-writing method**; F Deliver gives the agent a concise instruction and the available CLI; G Accept checks its result. This is an **E-0002-specific Action detail**, not a second Level 1 flow or a claim that all classes have the same treatment.
12
12
 
@@ -32,46 +32,52 @@ flowchart TD
32
32
  F --> G["G · Accept against applicable contract<br/>and separate task evidence"]
33
33
  ```
34
34
 
35
- The E-0002 report script is **proposed, not deployed**. The Agent determines outcome; a mechanical script owns report assembly, validation and useful errors. The response block may choose a fitting operation without creating a new Level 1 branch. A failed script result does **not** bypass F/G or count as a successful report; unresolved evidence is delivered and the occurrence remains open.
35
+ A nonzero exit leaves the report operation unresolved. Deliver the evidence through F/G and keep the occurrence open until the applicable acceptance conditions are met.
36
36
 
37
- ## Agent-facing procedure — proposed operational contract
37
+ ## Agent-facing procedure
38
38
 
39
39
  For a step **explicitly required to produce a report**:
40
40
 
41
41
  1. **Perform the work and collect evidence.** The agent must decide the true task/packet status based on observed results. `DONE` is not inferred by the CLI from a successful invocation; `BLOCKED` requires an actual reason. A completed RED experiment is not automatically product GREEN.
42
- 2. **Prepare only the free-form body** in a staging file. Do not add a terminal STATUS line or a harness-label to that body. If the host's `-o` captures the turn's final text, treat it as **script input / raw staging output**, not the finished report.
43
- 3. **Call the report writer** with the body path, final output path, and explicit status; the writer adds exactly one terminal STATUS line and writes the complete report atomically.
42
+ 2. **Choose the input mode.** Use `--body-file` for a staged body, `--context` for inline text, or `--from-codex-output` for the raw file captured by `codex exec -o`. Keep STATUS lines and harness-label comments out of ordinary body inputs.
43
+ 3. **Call the report writer** with the chosen input, final output path, and explicit status. The writer publishes the report atomically with one terminal STATUS line.
44
44
  4. **Check the written file**, not merely the CLI stdout, and retain the result as evidence. Do not append to the finalized report; to revise, change the body and call the writer again.
45
- 5. **Return the report reference and verified result** to the caller. A separate final turn keeps its own applicable host label contract. For any shared raw `-o` output, the **script** must apply an explicit host-aware extraction contract before writing the final report; return nonzero with raw evidence if it cannot do so. Do not silently strip arbitrary metadata or declare a contract exception deployed.
45
+ 5. **Return the report reference and verified result** to the caller. Keep the raw `-o` file as evidence. A separate final turn follows its applicable host label contract.
46
46
 
47
- ### Proposed command interface — design examples, NOT currently executable
47
+ ### Runnable command examples
48
+
49
+ Run these from the repository root. The output directory must already exist. The body file and raw Codex output are inputs from the report-writing task.
48
50
 
49
51
  ```bash
50
52
  # Positive result: content is provided by the agent; STATUS is written by the tool
51
- harness report write --body-file work/report-body.md --output reports/review.md --status DONE
52
- harness report check --file reports/review.md
53
+ npm run report -- write --body-file work/report-body.md --output reports/review.md --status DONE
54
+ npm run report -- check --file reports/review.md
53
55
 
54
56
  # Blocked result: same writer; explicit failure reason is required
55
- harness report write --body-file work/report-body.md --output reports/review.md --status BLOCKED --reason "required verification unavailable"
56
- harness report check --file reports/review.md
57
+ npm run report -- write --context "Verification could not run." --output reports/review.md --status BLOCKED --reason "required verification unavailable"
58
+ npm run report -- check --file reports/review.md
59
+
60
+ # Raw Codex output uses a separate input and final report path
61
+ npm run report -- write --from-codex-output work/codex-raw.md --output reports/review.md --status DONE
62
+ npm run report -- check --file reports/review.md
57
63
  ```
58
64
 
59
- These are **candidate CLI verbs**, not a mandate to create a global `harness` binary. A small repository-local Node.js script with equivalent `write` / `check` operations is sufficient for the first vertical slice. The agent-facing instruction should reference the **actual installed command and version**, not copy these placeholders as if working already.
65
+ The same subcommands and flags work with `node scripts/report-writer.js`.
60
66
 
61
67
  ### Minimal writer and checker contract
62
68
 
63
69
  | Responsibility | Expected behavior |
64
70
  | --- | --- |
65
- | `write` input | Existing body file, designated report output path, explicit `DONE` / `BLOCKED`, mandatory non-empty reason for `BLOCKED` |
71
+ | `write` input | Exactly one of `--body-file`, `--context`, or `--from-codex-output`, plus `--output` and explicit `--status`. A blocked result requires a nonempty `--reason` or `--error`. |
66
72
  | `write` output | Preserve body content, add a single newline-separated terminal control line at **column zero**, write atomically, fail without corrupting the previous target |
67
73
  | Structural validation | On the finished output, check exactly one terminal protocol line, nothing after it (including hidden label), and read-back matches what was written |
68
74
  | Containing structured fields | Reject conflicting column-zero terminal STATUS lines and harness-label metadata in the submitted body; make the conflict explicit rather than silently discarding unknown content |
69
75
  | Artifact roles | `codex exec -o` writes raw output as **script input**; the script converts and verifies the designated final report according to a host-aware contract. If ambiguous, return nonzero; no hidden manual rewrite |
70
- | Failure outcome | Nonzero exit + actionable diagnostics; Agent may revise within Treat or deliver outstanding evidence via F/G; no automatic `DONE`, preserve prior target and raw source |
76
+ | Failure outcome | Nonzero exit with diagnostics. Validation failures before publication preserve the prior report and raw input. A read-back failure after publication requires coordinator disposition. |
71
77
  | Scope | Operate on explicitly designated report output only; do not rewrite unrelated files, judge semantic success, touch the Ledger, or automatically change permissions |
72
78
  | Revision | Re-run `write` using the edited body + true status; never mutate the terminal report with ordinary append commands |
73
79
 
74
- **Design constraint:** `-o` must be handled as script-mediated output. Parsing host metadata is a deterministic responsibility of the proposed script under a defined contract. If the script cannot distinguish required protocol from host-owned label safely, **return nonzero** with the original raw output and let the Agent handle that result; do not imply an unimplemented exception has shipped.
80
+ In `--from-codex-output` mode, the writer can remove one terminal harness-label comment containing a JSON object. If the raw input already includes a STATUS line, it must match the requested status and be terminal or immediately precede the label. Invalid input returns nonzero and preserves the raw file.
75
81
 
76
82
  ## Interaction with other Actions and existing facilities
77
83
 
@@ -87,11 +93,11 @@ flowchart LR
87
93
  The future Hook/Skill reference is **not** a G feedback/recurrence edge, nor does F make future tasks part of this same Error Occurrence. A new recurrence starts as a **new Capture**; a correction after nonzero exit remains within the current local Action block when permitted.
88
94
 
89
95
  - **#359:** existing E-0002 Ledger remains class/history authority; do not create a second database.
90
- - **#394 / ROUTE-001:** Hook provides the **available command only when relevant**; it does not enforce task success or select the disposition. A retired lesson reminder does not remove still-needed operational instructions.
91
- - **#437:** scoped CLI/script is a proposed deterministic validator, **not** a mandatory global document controller. Validation failures are returned for Agent handling, not converted to hidden branching rules.
96
+ - **#394 / ROUTE-001:** the proposed Hook/Skill disclosure would surface the available command when relevant. A retired lesson reminder does not remove still-needed operational instructions.
97
+ - **#437:** the scoped writer returns validation failures for the agent to handle in the applicable Action.
92
98
  - **Decide/Accept:** when a machine-checkable condition or approval is not met, the script returns nonzero with the unmet requirement. The Agent can revise appropriately or preserve unresolved status. Owner authorization cannot be fabricated by a script, and a zero script exit code never proves substantive task correctness.
93
99
 
94
- ## Proposed acceptance before implementation
100
+ ## Acceptance cases
95
101
 
96
102
  | Test case | Expected observable result |
97
103
  | --- | --- |
@@ -106,11 +112,3 @@ The future Hook/Skill reference is **not** a G feedback/recurrence edge, nor doe
106
112
  | Writer produces compliant format but underlying result is wrong | Structural PASS only; review/behavior acceptance stays separate |
107
113
 
108
114
  **What to measure:** E-0002 recurrence in later **real report-writing tasks**, whether the agent actually invoked the designated writer, structural violations after invocation, and elapsed/tool/review cost relative to hand-writing. Do not declare E-0002 rooted out merely because a diagram or a one-off check exists.
109
-
110
- ## Owner discussion items
111
-
112
- 1. Should the first implementation be a small Node.js `report write/check` script under the existing repository, rather than a new global CLI? **Recommended: yes.**
113
- 2. For `codex exec -o`, route raw output to a **script**, and let the script generate/check the final report. No manual coordinator rewrite or output-contract exception is assumed.
114
- 3. Define the **script's host-aware input/output and extraction contract** for shared `-o` artifacts; ambiguous input returns nonzero, not guessed normalization.
115
-
116
- This design leaves A Capture focused on facts and E Treat on the executable operation: the next agent receives a repeatable action, **validated return codes**, and a way to handle a failed condition, not merely an explanation of the last mistake.
@@ -41,7 +41,7 @@ The [Action identity registry](./nodes.yaml) is the only proposed source for the
41
41
  | `EH-overview` | `EH-activity-source` | Same Level 1 representation | Open when UML source/notation is needed; not a new Level |
42
42
  | `EH-overview` | `E0002-actions` | Context-specific expansion: **E-0002** | Open when handling this Error Class/context, rather than loading all Action Maps |
43
43
  | `E0002-actions` | `E0002-capture` | Detail supporting Capture / evidence | Read when raw evidence/provenance is required |
44
- | `E0002-actions` | `E0002-writer` | Detail supporting Treat / Report CLI | Read when producing or validating a report through the proposed script |
44
+ | `E0002-actions` | `E0002-writer` | Detail supporting Treat / Report CLI | Read when producing or validating a report through the shipped W1 script |
45
45
  | `E0002-actions` | `E0002-ledger` | Existing class evidence / history | Read for Identify/history relevance; do not copy or reclassify the ledger |
46
46
 
47
47
  **Maintenance contract (lightweight):** when a document moves, update its **Table A path**; Table B continues to refer to the same local key. When a new Level 2 behavior block or Level 3 reference is added, add only the relevant row and reference. Removing an obsolete procedure removes its registry relationship without rewriting Level 1. **Do not re-encode Mermaid/PlantUML execution arrows as registry edges**: the source diagrams own flow semantics, while the tables own *navigation/lookup*.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-enforcement",
3
3
  "description": "Repository inventory for the opencode enforcement plugin and its standalone helper",
4
- "version": "0.55.0",
4
+ "version": "0.55.1",
5
5
  "runtime": "index.mjs",
6
6
  "hooks": {
7
7
  "verify": "hooks/verify.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "0.55.0",
3
+ "version": "0.55.1",
4
4
  "description": "Harness OS: An Orchestrated Agent Operating System for AI-driven Development",
5
5
  "main": "harness-everything/scripts/bootstrap.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "0.55.0",
3
+ "version": "0.55.1",
4
4
  "description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
5
5
  "author": {
6
6
  "name": "Miya Daniel",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "harness-everything",
4
- "version": "0.55.0",
4
+ "version": "0.55.1",
5
5
  "description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
6
6
  "author": {
7
7
  "name": "Miya Daniel",
package/sbom.cdx.json CHANGED
@@ -2,23 +2,23 @@
2
2
  "$schema": "https://cyclonedx.org/schema/bom-1.7.schema.json",
3
3
  "bomFormat": "CycloneDX",
4
4
  "specVersion": "1.7",
5
- "serialNumber": "urn:uuid:88917d13-bddd-5e04-939a-2a15464c6baa",
5
+ "serialNumber": "urn:uuid:dbc90d9f-0498-595b-b8b6-338a5bf5e7d8",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-11-20T03:38:35.301Z",
8
+ "timestamp": "2026-11-20T09:32:23.222Z",
9
9
  "tools": [
10
10
  {
11
11
  "vendor": "Harness Everything",
12
12
  "name": "generate-sbom.js",
13
- "version": "0.55.0"
13
+ "version": "0.55.1"
14
14
  }
15
15
  ],
16
16
  "component": {
17
17
  "type": "application",
18
- "bom-ref": "pkg:npm/harness-everything@0.55.0",
18
+ "bom-ref": "pkg:npm/harness-everything@0.55.1",
19
19
  "name": "harness-everything",
20
- "version": "0.55.0",
21
- "purl": "pkg:npm/harness-everything@0.55.0"
20
+ "version": "0.55.1",
21
+ "purl": "pkg:npm/harness-everything@0.55.1"
22
22
  }
23
23
  },
24
24
  "components": [
@@ -2033,7 +2033,7 @@
2033
2033
  ]
2034
2034
  },
2035
2035
  {
2036
- "ref": "pkg:npm/harness-everything@0.55.0",
2036
+ "ref": "pkg:npm/harness-everything@0.55.1",
2037
2037
  "dependsOn": [
2038
2038
  "pkg:npm/%40commitlint/cli@19.8.1",
2039
2039
  "pkg:npm/%40commitlint/config-conventional@19.8.1",