harness-everything 0.54.1 → 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.
Files changed (41) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +2 -1
  3. package/CHANGELOG.md +23 -0
  4. package/README.md +1 -0
  5. package/ci/mechanism-2ao-plugin-sync.test.js +18 -2
  6. package/ci/mechanism-349-ci-change-scope.test.js +68 -7
  7. package/ci/mechanism-check-packet-write-set.test.js +13 -3
  8. package/ci/mechanism-error-ledger-oracle.test.js +222 -0
  9. package/ci/mechanism-error-ledger-promote.test.js +520 -0
  10. package/ci/mechanism-error-ledger-scan.test.js +640 -0
  11. package/ci/mechanism-errors-sync-root.test.js +215 -0
  12. package/ci/openai-plugin-package.test.js +1 -1
  13. package/docs/error-handling/README.md +5 -5
  14. package/docs/error-handling/details/e0002-report-writer.md +25 -27
  15. package/docs/error-handling/registry.md +1 -1
  16. package/docs/workflows/error-ledger-bootstrap.md +23 -0
  17. package/error-ledger-bootstrap/SKILL.md +33 -0
  18. package/error-ledger-bootstrap/references/workflow.md +79 -0
  19. package/error-ledger-bootstrap/scripts/promote.js +613 -0
  20. package/error-ledger-bootstrap/scripts/scan.js +654 -0
  21. package/evals/error-ledger-bootstrap/eval.yaml +26 -0
  22. package/evals/error-ledger-bootstrap/tasks/negative-error-handling-map.yaml +16 -0
  23. package/evals/error-ledger-bootstrap/tasks/negative-trigger.yaml +16 -0
  24. package/evals/error-ledger-bootstrap/tasks/positive-trigger.yaml +15 -0
  25. package/harness-everything/SKILL.md +1 -1
  26. package/harness-everything/references/skill-registry.md +1 -0
  27. package/harness-everything/scripts/routing-keywords.json +11 -0
  28. package/opencode-plugin/plugin.json +1 -1
  29. package/package.json +1 -1
  30. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  31. package/plugins/harness-everything/plugin.json +1 -1
  32. package/plugins/harness-everything/skills/error-ledger-bootstrap/SKILL.md +33 -0
  33. package/plugins/harness-everything/skills/error-ledger-bootstrap/references/workflow.md +79 -0
  34. package/plugins/harness-everything/skills/error-ledger-bootstrap/scripts/promote.js +613 -0
  35. package/plugins/harness-everything/skills/error-ledger-bootstrap/scripts/scan.js +654 -0
  36. package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
  37. package/plugins/harness-everything/skills/harness-everything/references/skill-registry.md +1 -0
  38. package/plugins/harness-everything/skills/harness-everything/scripts/routing-keywords.json +11 -0
  39. package/sbom.cdx.json +7 -7
  40. package/scripts/error-ledger-oracle.js +257 -0
  41. package/scripts/errors-sync.js +175 -12
@@ -0,0 +1,16 @@
1
+ id: negative-error-ledger-bootstrap-map-001
2
+ name: Explain the general Error Handling map
3
+ description: A conceptual Error Handling map request should not route to ledger bootstrap.
4
+ tags:
5
+ - negative-trigger
6
+ inputs:
7
+ prompt: "Explain the Error Handling overview's three views and A–G flow in docs/error-handling/README.md. I want a conceptual walkthrough of the process, not an inventory of this repository."
8
+ expected:
9
+ should_trigger: false
10
+ graders:
11
+ - type: text
12
+ name: not-contains-keywords
13
+ config:
14
+ contains:
15
+ - "candidate report"
16
+ - "promote.js"
@@ -0,0 +1,16 @@
1
+ id: negative-error-ledger-bootstrap-self-evolve-001
2
+ name: Persist one lesson after a verified fix
3
+ description: A single verified lesson should route to self-evolve, not repository-wide ledger bootstrap.
4
+ tags:
5
+ - negative-trigger
6
+ inputs:
7
+ prompt: "Use self-evolve to persist one verified lesson as a defensive memory rule after a bug fix; do not perform a repository-wide inventory."
8
+ expected:
9
+ should_trigger: false
10
+ graders:
11
+ - type: text
12
+ name: not-contains-keywords
13
+ config:
14
+ contains:
15
+ - "candidate report"
16
+ - "promote.js"
@@ -0,0 +1,15 @@
1
+ id: positive-error-ledger-bootstrap-001
2
+ name: Bootstrap a local candidate report
3
+ description: "Bootstrap a local error ledger for an existing repository by inventorying candidate lessons, obtaining item-level owner approval, and promoting approved entries."
4
+ tags:
5
+ - positive-trigger
6
+ inputs:
7
+ prompt: "Bootstrap a local error ledger for this existing repository. Inventory local Git history and selected project lessons into a candidate report, keep the report local, and wait for item-level owner approval before writing records."
8
+ expected:
9
+ should_trigger: true
10
+ graders:
11
+ - type: text
12
+ name: contains-keywords
13
+ config:
14
+ contains:
15
+ - "candidate report"
@@ -4,7 +4,7 @@ description: "Route software/project work through Harness: classify tier/topolog
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.52.0
7
+ version: 0.55.0
8
8
  ---
9
9
 
10
10
  # Harness Everything
@@ -33,6 +33,7 @@ Every skill in this repository is reachable from this router. If a task matches
33
33
  | `to-tickets` | Tier 2/3 (advisory, never a gate) | Breaking a `to-spec` feature spec (or an already-settled plan/conversation) into tracer-bullet tickets with declared blocking edges. Reuses `to-spec`'s own `check-project-docs.js` gate — never a second setup interview. Explicit-invoke only — never auto-executed. |
34
34
  | `zoom-out` | Circuit breaker | Rule of 3 trips (§3). |
35
35
  | `self-evolve` | Evolution | Post-breaker resolution or major breakthrough (§4). |
36
+ | `error-ledger-bootstrap` | Error ledger | Inventory local lessons for an existing repository and promote only owner-approved entries. |
36
37
  | `find-skills` | Meta | No static/generated/already-installed skill covers the user's need (checked live via `npx skills list`, not manifest-cached) — searches skills.sh/`npx skills` and, only with explicit approval, applies it ephemerally via a self-expiring OS-temp cache (`scripts/use-skill.js`, the default — zero persistent footprint) or, only if the user wants to keep it, installs via `npx skills add` (the rare exception). Deliberately not manifest-tracked or router-auto-surfaced like `self-evolve`'s `generated[]` — third-party content isn't lifecycle-owned by Harness the way self-authored skills are. |
37
38
  | `skill-style` | Meta | Authoring or modifying any SKILL.md in this repository — the terse Skill Contract format spec. |
38
39
  | `skill-creator` | Meta | Creating a new skill from scratch, auditing/refactoring an existing SKILL.md, or `self-evolve`'s dynamic skill generation step (§4) — the fuller authoring, quality-checklist, and testing workflow built on `skill-style`. |
@@ -563,6 +563,17 @@
563
563
  "find-skills"
564
564
  ]
565
565
  },
566
+ {
567
+ "id": "error-ledger-bootstrap",
568
+ "keywords": [
569
+ "error ledger",
570
+ "ledger bootstrap",
571
+ "error-ledger-bootstrap"
572
+ ],
573
+ "bindings": [
574
+ "error-ledger-bootstrap"
575
+ ]
576
+ },
566
577
  {
567
578
  "id": "security",
568
579
  "keywords": [
@@ -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.54.1",
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.54.1",
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.54.1",
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.54.1",
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",
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: error-ledger-bootstrap
3
+ description: "Bootstrap a local error ledger for an existing repository by inventorying candidate lessons, obtaining item-level owner approval, and promoting approved entries."
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: Miya Daniel
7
+ version: 0.55.0
8
+ ---
9
+
10
+ # Error Ledger Bootstrap
11
+
12
+ ## Skill Contract
13
+
14
+ | Component | Specification |
15
+ | --- | --- |
16
+ | Trigger / Input | An existing repository that needs an initial error-ledger inventory. |
17
+ | Expected Output | A local candidate report and, after approval, ledger records plus index. |
18
+ | Mutation | Inventory is read-only; write only owner-approved items. |
19
+ | Privacy | Keep memory, instructions, and reports local; never upload them. |
20
+
21
+ ## USE FOR:
22
+ - Inventory candidate lessons for an existing repository's error ledger.
23
+ - Promote individually owner-approved candidates into that repository's ledger.
24
+
25
+ ## DO NOT USE FOR:
26
+ - Persisting one lesson after a fix (use `self-evolve`).
27
+ - Explaining or changing the general Error Handling map or A–G flow.
28
+
29
+ ## Workflow
30
+
31
+ Scan → classify candidates locally (`UNVERIFIED` when uncertain) → obtain owner approval per item → promote → index.
32
+
33
+ Deep dive: <this-skill-dir>/references/workflow.md
@@ -0,0 +1,79 @@
1
+ # Error Ledger Bootstrap Workflow
2
+
3
+ ## Inventory sources and privacy
4
+
5
+ Run `node "<this-skill-dir>/scripts/scan.js" --root "<target repo>"` with only the source options you intend to use. The scanner reads local Git history, repository `AGENTS.md` / `CLAUDE.md` instructions, and selected local memory or instruction files. Automatic memory is used only when the local memory directory can be associated with the target repository. Global instructions are included only when named with `--instructions <path>`.
6
+ At least two distinct `fix`/`revert` commits touching `*.md` or `docs/**` paths create documentation candidates.
7
+ `--tracker <file.json>` accepts a top-level JSON array saved offline, for example `gh issue list --json number,title,labels,body > issues.json`. The scanner never calls GitHub.
8
+ Bug/regression/flake labels or `fix`/`bug` title prefixes qualify; reports keep the issue reference and matching repo-existing paths, never issue bodies.
9
+
10
+ - `--memory <path>` selects local memory files; repeat it to select more paths.
11
+ - `--instructions <path>` explicitly selects local instruction files; repeat as needed.
12
+ - `--tracker <file.json>` selects an offline issue export; repeat it for additional files.
13
+ - `--no-memory` disables memory and instruction sources; docs and tracker sources remain enabled.
14
+ - `--hide-ledger` excludes existing error-ledger files from the scan.
15
+ - `--home <dir>` changes the local home used to resolve automatic memory.
16
+
17
+ Treat memory and instructions as private input. A local report may include opaque source IDs, a neutral generated title or a short summary the operator reviewed locally, and only site paths verified to exist in the target repository. Keep raw source text, excerpts, private filenames and paths, credentials, and personal identifiers out of both report formats. The scanner emits reports outside the target repository: by default, into a private temporary directory; `--out <dir>` must also resolve outside the target, including through symlinks. Keep both reports local, including for company repositories.
18
+
19
+ ## Classify candidates locally
20
+
21
+ The report is an inventory of leads, not a ledger. Candidates start as `UNVERIFIED`; retain that status until evidence establishes an actual error class. During local classification, an operator may add a short reviewed summary. For each candidate, record the expected and observed behavior, affected sites, root-cause rule, and evidence that supports the classification. A recurring class needs independent occurrences, such as distinct commits or sources; repeated references to the same incident do not establish recurrence. Linked tests are attachments that may help locate evidence, not incidents themselves. Keep missing history unknown rather than treating it as zero. Do not write a record or index entry while classifying.
22
+
23
+ ## Owner approval and promotion
24
+
25
+ Obtain explicit owner approval for each candidate. Bind the approval to the exact report with `candidateId` (the candidate's 20-character report ID) and `reportSha256` (the SHA-256 of the report file's exact bytes). A private-memory lead cannot be promoted based only on the memory note or an uncorroborated site: require independent durable provenance. Keep opaque local IDs and uncorroborated sites out of the E-record and index; write only record content from the owner-reviewed approval payload.
26
+
27
+ The top-level approval JSON has `schemaVersion: 1`, a 20-character hexadecimal `candidateId`, a 64-character hexadecimal `reportSha256` of the exact report bytes, an absolute canonical `targetRoot` matching `--target`, a non-empty `approvedBy`, and a parseable `approvedAt` timestamp. Its `record` object has a kebab-case `signature`; non-empty `class`, `title`, `violates`, and `sourcesNote`; `scope` of `in`, `out`, or `unresolved`; `status` of `open`, `lesson`, or `mechanism`; and `sites`, an array of existing target-repository files named by relative paths without absolute paths or `.` or `..` components. Do not put absolute paths in `approvedBy`, `approvedAt`, or the record text fields. The approved candidate must occur exactly once in the report, and the selected and approved site files must exist in the target.
28
+
29
+ Use this complete example as the approval file structure, replacing the sample candidate ID and digest with the exact report values, `targetRoot` with the target's absolute canonical path, and the approver, timestamp, and reviewed record content with the owner's approval:
30
+
31
+ ```json
32
+ {
33
+ "schemaVersion": 1,
34
+ "candidateId": "0123456789abcdef0123",
35
+ "reportSha256": "0000000000000000000000000000000000000000000000000000000000000000",
36
+ "targetRoot": "/absolute/path/to/target",
37
+ "approvedBy": "Owner Name",
38
+ "approvedAt": "2026-11-20T00:00:00.000Z",
39
+ "record": {
40
+ "signature": "documented-fixture-bootstrap",
41
+ "class": "process",
42
+ "title": "Documented fixture bootstrap",
43
+ "violates": "Describe the observed expected-versus-actual behavior",
44
+ "scope": "in",
45
+ "status": "lesson",
46
+ "sites": ["README.md"],
47
+ "sourcesNote": "Summarize the owner-reviewed evidence and lesson."
48
+ }
49
+ }
50
+ ```
51
+
52
+ Do not promote an unapproved, changed, or stale candidate. Keep full candidate reports and private inputs out of E-records, PRs, shared logs, and uploads.
53
+
54
+ Promotion requires the target to already contain `.agents/harness-everything/errors/`. Before the first promotion, create that directory once:
55
+
56
+ ```sh
57
+ mkdir -p "<target repo>/.agents/harness-everything/errors"
58
+ ```
59
+
60
+ Promotion refuses when the directory is absent. No index file is needed beforehand; successful promotion updates the index through the sync command below.
61
+
62
+ Before promotion, resolve a trusted local Harness checkout containing `scripts/errors-sync.js` and verify its Node dependencies are installed. The current sync script requires `js-yaml`; a read-only preflight is:
63
+
64
+ ```sh
65
+ test -f "<Harness checkout>/scripts/errors-sync.js"
66
+ node -e "require.resolve('js-yaml', {paths: [process.argv[1]]})" "<Harness checkout>"
67
+ ```
68
+
69
+ Promote with the packaged script:
70
+
71
+ ```sh
72
+ node "<this-skill-dir>/scripts/promote.js" --target "<target repo>" --report "<report.json>" --approval "<approval.json>" --harness "<Harness checkout>"
73
+ ```
74
+
75
+ Promotion writes one approved `E-xxxx-<slug>.md` record and updates the target index by running `node "<Harness checkout>/scripts/errors-sync.js" --root "<target repo>"`. The checkout's `--root` option is required so the target index, not the Harness checkout's own index, is regenerated. If no trusted checkout or dependency set is available, stop before promotion and leave the report local. Recover by checking out the trusted Harness source locally, running `npm ci` in that checkout, repeating the read-only preflight, then retrying the approved promotion.
76
+
77
+ ## Windows paths
78
+
79
+ Quote paths passed to Node, especially when they contain spaces, and use the full repository path for `--root`. Keep explicit report output outside the target repository; the scanner resolves symlinks and checks containment. Do not determine containment with a bare `path.relative(...).startsWith('..')`: another drive can produce an absolute relative result, and a child named `..cache` is still inside. When writing path tests, use the same canonical root as the product and exercise Windows rules with `path.win32` on every host.