harness-everything 0.39.0 → 0.40.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +7 -0
- package/code-review/SKILL.md +3 -3
- package/code-review/references/review-playbook.md +4 -0
- package/code-review/templates/finding.template.md +6 -0
- package/evals/zoom-out/tasks/negative-first-edge-case-review.yaml +16 -0
- package/evals/zoom-out/tasks/positive-repair-loop.yaml +15 -0
- package/harness-everything/SKILL.md +1 -1
- package/harness-everything/scripts/routing-keywords.json +4 -0
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +2 -1
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/skills/code-review/SKILL.md +3 -3
- package/plugins/harness-everything/skills/code-review/references/review-playbook.md +4 -0
- package/plugins/harness-everything/skills/code-review/templates/finding.template.md +6 -0
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/routing-keywords.json +4 -0
- package/plugins/harness-everything/skills/zoom-out/SKILL.md +4 -3
- package/plugins/harness-everything/skills/zoom-out/references/circuit-breaker.md +7 -0
- package/plugins/harness-everything/skills/zoom-out/templates/zoom-out-report.template.md +4 -2
- package/sbom.cdx.json +7 -7
- package/scripts/errors-sync.js +90 -0
- package/zoom-out/SKILL.md +4 -3
- package/zoom-out/references/circuit-breaker.md +7 -0
- package/zoom-out/templates/zoom-out-report.template.md +4 -2
|
@@ -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.
|
|
13
|
+
"version": "0.40.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.
|
|
4
|
+
"version": "0.40.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Miya Daniel"
|
|
7
7
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.40.0](https://github.com/dyphn1/Harness-everything/compare/v0.39.0...v0.40.0) (2026-10-23)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **errors:** add repository error ledger with generated index ([346716b](https://github.com/dyphn1/Harness-everything/commit/346716b14f2ac01c1968df9c3658db756fb86bf7)), closes [#325](https://github.com/dyphn1/Harness-everything/issues/325)
|
|
10
|
+
* **routing:** surface zoom-out for repair-loop cues ([7ff7d66](https://github.com/dyphn1/Harness-everything/commit/7ff7d6689d711a3bac9e9a25b6a42f1f30fcd3ae))
|
|
11
|
+
|
|
5
12
|
## [0.39.0](https://github.com/dyphn1/Harness-everything/compare/v0.38.0...v0.39.0) (2026-10-21)
|
|
6
13
|
|
|
7
14
|
### Features
|
package/code-review/SKILL.md
CHANGED
|
@@ -4,7 +4,7 @@ description: "Independently review a PR, diff or finished implementation for cor
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.40.0
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Code Review
|
|
@@ -30,10 +30,10 @@ Independently review completed changes for correctness, contract violations, and
|
|
|
30
30
|
|
|
31
31
|
## Workflow
|
|
32
32
|
|
|
33
|
-
1. Pin repository, contract, base/head, changed scope, and CI state; inspect relevant callers and consumers.
|
|
33
|
+
1. Pin repository, verbatim acceptance contract, base/head, changed scope, and CI state; inspect relevant callers and consumers.
|
|
34
34
|
2. Independently trace behavior and test applicable counterexamples. Separate severity from safety conditions.
|
|
35
35
|
3. Report only supported findings with evidence tier, smallest correction, regression, and positive control. Use `<this-skill-dir>/templates/finding.template.md`.
|
|
36
|
-
4. On re-review, disposition every prior finding at the new HEAD, then inspect for regressions.
|
|
36
|
+
4. On re-review, disposition every prior finding at the new HEAD, re-trace the acceptance path, then inspect for regressions.
|
|
37
37
|
5. Keep review read-only unless explicitly authorized. Do not claim “bug-free.”
|
|
38
38
|
|
|
39
39
|
In the interim, bind explicitly on an existing review step: `{"stepType":"review","optionalBindings":["code-review"]}`.
|
|
@@ -5,6 +5,7 @@ Use this checklist for the applicable risks; do not force irrelevant categories.
|
|
|
5
5
|
## Establish scope and evidence
|
|
6
6
|
|
|
7
7
|
- [ ] Pin repository, PR, base/head SHA, user requirement or PRD/ADR, changed files, relevant callers/callees, and current CI state. Avoid unrelated checkout areas.
|
|
8
|
+
- [ ] Quote the acceptance clauses and owner bounds verbatim, with their source. Keep them apart from the chosen implementation (designs, existing tests) and the evidence: a design choice or a test expectation is not a requirement.
|
|
8
9
|
- [ ] Make an independent pass. Treat author explanations and tests as leads, not proof; derive expected behavior from contracts and source.
|
|
9
10
|
- [ ] Label evidence honestly: **executed/reproduced** (command, result, environment, SHA); **source-traced** (concrete path and preconditions); **inconclusive** (missing facts or ambiguous semantics; do not present as a proven blocker).
|
|
10
11
|
- [ ] Inventory user-facing entry points and configuration handoffs (CLI flags, cwd, path spellings, config loading). Exercise them end-to-end, not only the recently edited internals.
|
|
@@ -24,10 +25,13 @@ Use this checklist for the applicable risks; do not force irrelevant categories.
|
|
|
24
25
|
- [ ] When output text changes, compare the intended changed lines with literal templates; do not exclude changed lines from assertions.
|
|
25
26
|
- [ ] Dedupe findings. Use P1 for severe merge blockers, P2 for meaningful correctness/contract defects, P3 for low-risk issues; avoid speculation.
|
|
26
27
|
- [ ] For each finding, include exact path:line or diff anchor at HEAD SHA, trigger, observed behavior, violated contract and impact, evidence tier, smallest fix, negative regression, positive control, and disposition.
|
|
28
|
+
- [ ] Name the exact acceptance clause each finding violates, with a witness (starting state, input, expected result, actual result) and the trust assumption. A finding that maps to no clause gets scope `unresolved` for the owner; do not drop it, and do not present it as a blocker. Record severity and scope separately.
|
|
27
29
|
|
|
28
30
|
## Re-review and conclude
|
|
29
31
|
|
|
30
32
|
- [ ] Pin the new HEAD. Disposition every prior finding separately: resolved, still open, superseded, or inconclusive. Then inspect fix-induced side effects and new changes.
|
|
33
|
+
- [ ] Re-trace one normal acceptance path end to end plus the consumers the fix affects, even when the request names only the last fix. A diff-only re-review misses unchanged sites that make the same decision.
|
|
34
|
+
- [ ] If this round and the previous one each found new defects in the same decision class, say so and recommend `zoom-out` (site inventory against the violated clause) before another point fix.
|
|
31
35
|
- [ ] Stay read-only unless the user/workflow explicitly authorizes action. Do not edit, comment, label, or merge on review authority alone.
|
|
32
36
|
- [ ] Summarize scope/SHA, CI, covered and unexamined risks, fixed/open/new counts, and evidence-grounded merge recommendation. “No actionable findings in examined scope” does not mean “bug-free.” Distinguish repository tests from live-host evidence.
|
|
33
37
|
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
- Repository / PR:
|
|
6
6
|
- Base SHA → reviewed HEAD SHA:
|
|
7
7
|
- Requirement / PRD / ADR:
|
|
8
|
+
- Scope anchor (acceptance clauses and owner bounds, verbatim, with source):
|
|
9
|
+
- Prior rounds (findings per decision class, for re-review):
|
|
8
10
|
- Changed files and relevant callers/consumers:
|
|
9
11
|
- CI state and commands observed:
|
|
10
12
|
- Counterexample categories covered:
|
|
@@ -17,6 +19,9 @@
|
|
|
17
19
|
- **Location:** `<path>:<line or diff anchor> @ <HEAD SHA>`
|
|
18
20
|
- **Trigger:** <minimal input, state transition, or interleaving>
|
|
19
21
|
- **Behavior → impact:** <observed or source-traced behavior and violated contract>
|
|
22
|
+
- **Violates:** <exact acceptance clause from the scope anchor>
|
|
23
|
+
- **Witness:** <starting state → input → expected result → actual result; trust assumption>
|
|
24
|
+
- **Scope:** <in-scope | out-of-scope (known limit) | unresolved (owner decision)>
|
|
20
25
|
- **Evidence tier:** <executed/reproduced | source-traced | inconclusive; include exact command/result or preconditions>
|
|
21
26
|
- **Minimal correction:** <smallest feasible fix>
|
|
22
27
|
- **Regression:** Negative case: <case that fails before fix>; positive control: <valid behavior that remains valid>
|
|
@@ -30,4 +35,5 @@
|
|
|
30
35
|
- **CI evidence:**
|
|
31
36
|
- **Covered / unexamined risks:**
|
|
32
37
|
- **Findings:** <fixed / open / new counts on re-review>
|
|
38
|
+
- **Convergence:** <new findings per decision class this round vs the previous round; recommend `zoom-out` when a class keeps producing new findings>
|
|
33
39
|
- **Conclusion:** <merge recommendation grounded in evidence; “no actionable findings in examined scope” is not a claim of bug-free code>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
id: negative-first-edge-case-review-001
|
|
2
|
+
name: A first review finding an edge case is ordinary review
|
|
3
|
+
description: One edge case in the first review does not establish repeated repair rounds.
|
|
4
|
+
tags:
|
|
5
|
+
- negative-trigger
|
|
6
|
+
inputs:
|
|
7
|
+
prompt: "Review this PR for the first time. The reviewer found one edge case in an unchanged state reader. Assess the finding against the acceptance clause and trace the affected consumers. No earlier review or corrective round has taken place."
|
|
8
|
+
expected:
|
|
9
|
+
should_trigger: false
|
|
10
|
+
graders:
|
|
11
|
+
- type: text
|
|
12
|
+
name: not-contains-keywords
|
|
13
|
+
config:
|
|
14
|
+
contains:
|
|
15
|
+
- "circuit breaker tripped"
|
|
16
|
+
- "reflection report"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
id: positive-repair-loop-001
|
|
2
|
+
name: Successful review commands still expose a repair loop
|
|
3
|
+
description: "Reflect-first circuit breaker - after 3 failures, stop edits, rebuild the full picture with read-only tools, write a fact-check report, then resume or escalate. USE FOR: \"you are stuck in a loop\", \"the same error keeps failing\", \"rethink your assumptions\". DO NOT USE FOR: \"routine single-failure debugging\", \"greenfield planning without failures\"."
|
|
4
|
+
tags:
|
|
5
|
+
- positive-trigger
|
|
6
|
+
inputs:
|
|
7
|
+
prompt: "Every review round finds a new edge case. In two consecutive review/fix rounds for the same feature, each review found a new defect in the same acceptance decision: whether the checker is trusted. The first fix covered invocation; the next review found an unchanged state reader making that decision differently. All commands succeeded. Review both findings and the affected consumers before choosing the next correction."
|
|
8
|
+
expected:
|
|
9
|
+
should_trigger: true
|
|
10
|
+
graders:
|
|
11
|
+
- type: text
|
|
12
|
+
name: contains-keywords
|
|
13
|
+
config:
|
|
14
|
+
contains:
|
|
15
|
+
- "zoom-out"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harness-everything",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
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": {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"tdd:quality": "node tdd/scripts/quality-gate.js",
|
|
18
18
|
"repo:contract": "node scripts/repository-contract.js",
|
|
19
19
|
"docs:sync": "node scripts/sync-current-docs.js",
|
|
20
|
+
"errors:sync": "node scripts/errors-sync.js",
|
|
20
21
|
"test:repo-contract": "node ci/repository-contract.test.js",
|
|
21
22
|
"test:consistency": "node ci/consistency-check.js && node ci/doc-capability-consistency.test.js && node ci/repository-contract.test.js && node ci/mechanism-2ao-plugin-sync.test.js && node ci/prompt-contract-regressions.test.js",
|
|
22
23
|
"test:docs:capabilities": "node ci/doc-capability-consistency.test.js",
|
|
@@ -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.
|
|
4
|
+
"version": "0.40.0",
|
|
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",
|
|
@@ -4,7 +4,7 @@ description: "Independently review a PR, diff or finished implementation for cor
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.40.0
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Code Review
|
|
@@ -30,10 +30,10 @@ Independently review completed changes for correctness, contract violations, and
|
|
|
30
30
|
|
|
31
31
|
## Workflow
|
|
32
32
|
|
|
33
|
-
1. Pin repository, contract, base/head, changed scope, and CI state; inspect relevant callers and consumers.
|
|
33
|
+
1. Pin repository, verbatim acceptance contract, base/head, changed scope, and CI state; inspect relevant callers and consumers.
|
|
34
34
|
2. Independently trace behavior and test applicable counterexamples. Separate severity from safety conditions.
|
|
35
35
|
3. Report only supported findings with evidence tier, smallest correction, regression, and positive control. Use `<this-skill-dir>/templates/finding.template.md`.
|
|
36
|
-
4. On re-review, disposition every prior finding at the new HEAD, then inspect for regressions.
|
|
36
|
+
4. On re-review, disposition every prior finding at the new HEAD, re-trace the acceptance path, then inspect for regressions.
|
|
37
37
|
5. Keep review read-only unless explicitly authorized. Do not claim “bug-free.”
|
|
38
38
|
|
|
39
39
|
In the interim, bind explicitly on an existing review step: `{"stepType":"review","optionalBindings":["code-review"]}`.
|
|
@@ -5,6 +5,7 @@ Use this checklist for the applicable risks; do not force irrelevant categories.
|
|
|
5
5
|
## Establish scope and evidence
|
|
6
6
|
|
|
7
7
|
- [ ] Pin repository, PR, base/head SHA, user requirement or PRD/ADR, changed files, relevant callers/callees, and current CI state. Avoid unrelated checkout areas.
|
|
8
|
+
- [ ] Quote the acceptance clauses and owner bounds verbatim, with their source. Keep them apart from the chosen implementation (designs, existing tests) and the evidence: a design choice or a test expectation is not a requirement.
|
|
8
9
|
- [ ] Make an independent pass. Treat author explanations and tests as leads, not proof; derive expected behavior from contracts and source.
|
|
9
10
|
- [ ] Label evidence honestly: **executed/reproduced** (command, result, environment, SHA); **source-traced** (concrete path and preconditions); **inconclusive** (missing facts or ambiguous semantics; do not present as a proven blocker).
|
|
10
11
|
- [ ] Inventory user-facing entry points and configuration handoffs (CLI flags, cwd, path spellings, config loading). Exercise them end-to-end, not only the recently edited internals.
|
|
@@ -24,10 +25,13 @@ Use this checklist for the applicable risks; do not force irrelevant categories.
|
|
|
24
25
|
- [ ] When output text changes, compare the intended changed lines with literal templates; do not exclude changed lines from assertions.
|
|
25
26
|
- [ ] Dedupe findings. Use P1 for severe merge blockers, P2 for meaningful correctness/contract defects, P3 for low-risk issues; avoid speculation.
|
|
26
27
|
- [ ] For each finding, include exact path:line or diff anchor at HEAD SHA, trigger, observed behavior, violated contract and impact, evidence tier, smallest fix, negative regression, positive control, and disposition.
|
|
28
|
+
- [ ] Name the exact acceptance clause each finding violates, with a witness (starting state, input, expected result, actual result) and the trust assumption. A finding that maps to no clause gets scope `unresolved` for the owner; do not drop it, and do not present it as a blocker. Record severity and scope separately.
|
|
27
29
|
|
|
28
30
|
## Re-review and conclude
|
|
29
31
|
|
|
30
32
|
- [ ] Pin the new HEAD. Disposition every prior finding separately: resolved, still open, superseded, or inconclusive. Then inspect fix-induced side effects and new changes.
|
|
33
|
+
- [ ] Re-trace one normal acceptance path end to end plus the consumers the fix affects, even when the request names only the last fix. A diff-only re-review misses unchanged sites that make the same decision.
|
|
34
|
+
- [ ] If this round and the previous one each found new defects in the same decision class, say so and recommend `zoom-out` (site inventory against the violated clause) before another point fix.
|
|
31
35
|
- [ ] Stay read-only unless the user/workflow explicitly authorizes action. Do not edit, comment, label, or merge on review authority alone.
|
|
32
36
|
- [ ] Summarize scope/SHA, CI, covered and unexamined risks, fixed/open/new counts, and evidence-grounded merge recommendation. “No actionable findings in examined scope” does not mean “bug-free.” Distinguish repository tests from live-host evidence.
|
|
33
37
|
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
- Repository / PR:
|
|
6
6
|
- Base SHA → reviewed HEAD SHA:
|
|
7
7
|
- Requirement / PRD / ADR:
|
|
8
|
+
- Scope anchor (acceptance clauses and owner bounds, verbatim, with source):
|
|
9
|
+
- Prior rounds (findings per decision class, for re-review):
|
|
8
10
|
- Changed files and relevant callers/consumers:
|
|
9
11
|
- CI state and commands observed:
|
|
10
12
|
- Counterexample categories covered:
|
|
@@ -17,6 +19,9 @@
|
|
|
17
19
|
- **Location:** `<path>:<line or diff anchor> @ <HEAD SHA>`
|
|
18
20
|
- **Trigger:** <minimal input, state transition, or interleaving>
|
|
19
21
|
- **Behavior → impact:** <observed or source-traced behavior and violated contract>
|
|
22
|
+
- **Violates:** <exact acceptance clause from the scope anchor>
|
|
23
|
+
- **Witness:** <starting state → input → expected result → actual result; trust assumption>
|
|
24
|
+
- **Scope:** <in-scope | out-of-scope (known limit) | unresolved (owner decision)>
|
|
20
25
|
- **Evidence tier:** <executed/reproduced | source-traced | inconclusive; include exact command/result or preconditions>
|
|
21
26
|
- **Minimal correction:** <smallest feasible fix>
|
|
22
27
|
- **Regression:** Negative case: <case that fails before fix>; positive control: <valid behavior that remains valid>
|
|
@@ -30,4 +35,5 @@
|
|
|
30
35
|
- **CI evidence:**
|
|
31
36
|
- **Covered / unexamined risks:**
|
|
32
37
|
- **Findings:** <fixed / open / new counts on re-review>
|
|
38
|
+
- **Convergence:** <new findings per decision class this round vs the previous round; recommend `zoom-out` when a class keeps producing new findings>
|
|
33
39
|
- **Conclusion:** <merge recommendation grounded in evidence; “no actionable findings in examined scope” is not a claim of bug-free code>
|
|
@@ -4,7 +4,7 @@ description: "Reflect-first circuit breaker - after 3 failures, stop edits, rebu
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.40.0
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Zoom Out (Circuit Breaker)
|
|
@@ -15,7 +15,7 @@ Stop repeated failures, rebuild the facts, and choose a safe next step.
|
|
|
15
15
|
|
|
16
16
|
| Component | Specification |
|
|
17
17
|
| :--- | :--- |
|
|
18
|
-
| **Trigger / Input** | Three same-signature failures or an explicit loop/rethink request. |
|
|
18
|
+
| **Trigger / Input** | Three same-signature failures, a repair loop, or an explicit loop/rethink request. |
|
|
19
19
|
| **Expected Output** | Fact-checked report ending in `RESUME` or `ESCALATE`. |
|
|
20
20
|
| **State Mutations** | Writes the session `zoom-out-report.md`; reset may clear breaker state. |
|
|
21
21
|
| **Enforcement Gate** | `<skills-repo-root>/hooks/scripts/rule-of-3.js` plus a valid report; a later three-failure cycle requests another reflection. |
|
|
@@ -25,12 +25,13 @@ Stop repeated failures, rebuild the facts, and choose a safe next step.
|
|
|
25
25
|
1. After three same-signature failures, stop edits and do not ask the user yet.
|
|
26
26
|
2. Use read-only tools to restate the goal and check files, configuration, and logs.
|
|
27
27
|
3. Fill `<this-skill-dir>/templates/zoom-out-report.template.md` and end with `RESUME` or `ESCALATE`.
|
|
28
|
-
4. Resume only on an untried path; escalate genuine user decisions with options.
|
|
28
|
+
4. Resume only on an untried path; escalate genuine user decisions with options. Repair loop: inventory sites first.
|
|
29
29
|
5. If three more matching failures occur, run another zoom-out cycle. `npm run harness:reset` is only an optional manual state clear; record the insight with `self-evolve`.
|
|
30
30
|
|
|
31
31
|
## USE FOR:
|
|
32
32
|
- "you are stuck in a loop"
|
|
33
33
|
- "the same error keeps failing"
|
|
34
|
+
- "every round finds a new edge case"
|
|
34
35
|
- "rethink your assumptions"
|
|
35
36
|
|
|
36
37
|
## DO NOT USE FOR:
|
|
@@ -27,6 +27,13 @@ flowchart TD
|
|
|
27
27
|
## 1. Triggers
|
|
28
28
|
- **Rule of 3 (Repeated Failures)**: Attempting to fix the same error or test failure 3 times without progress.
|
|
29
29
|
- **Divergence**: Fixing one bug repeatedly introduces new secondary errors.
|
|
30
|
+
- **Repair loop (feature level)**: Two consecutive review or fix rounds on the same feature each surface new defects in the same decision class (for example "is this the trusted checker?"), even though every command succeeded.
|
|
31
|
+
- The Rule of 3 hook cannot see this. It counts same-signature command failures in one session. Successful review findings do not increment it, and unrelated successes can leave an existing count in place. New sessions and different failure signatures do not accumulate a feature's review history.
|
|
32
|
+
- The signal comes from review history: prior findings and their dispositions, the round count per class in an error ledger, or the reviewer noticing the pattern. It is a prompt to reflect, not a lock. The hook gate in the skill contract applies only to the three-failure trigger.
|
|
33
|
+
- "Same decision class" means the same acceptance decision under the same trust assumptions, possibly at different sites. "Same directory" or "validation" is too broad. Count a repeated or renamed finding once, and treat missing history as unknown, not zero.
|
|
34
|
+
- Phase 2 here means: list every finding so far by decision class, state the acceptance clause each violates, and inventory every site (callers, state readers, Stop consumers) that makes the same decision. Findings that map to no acceptance clause stay `unresolved` for the owner instead of becoming new fixes.
|
|
35
|
+
- RESUME by using the inventory to choose the smallest justified correction (which may be one shared fix, or no code change), then re-trace one normal end-to-end acceptance path. Unresolved findings need scope adjudication, not speculative repairs.
|
|
36
|
+
- A one-shot reviewer cannot see the previous round on its own. The packet carries the current acceptance anchor, a link to the previous comparable report with its revision, the prior finding IDs and dispositions, and the fix made since.
|
|
30
37
|
- **Goal Drift**: Execution strays far from the initial task objective.
|
|
31
38
|
- **User Instruction**: The user requests a step back ("zoom out", "step back", "stop and think").
|
|
32
39
|
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
## Failed Attempts
|
|
5
5
|
<attempt → underlying assumption → observed outcome>
|
|
6
|
-
**Failure Category:** <syntax|environment|test|timeout|permission|dependency|unknown>
|
|
6
|
+
**Failure Category:** <syntax|environment|test|timeout|permission|dependency|repair-loop|unknown>
|
|
7
|
+
**Repair-loop rounds (repair loop only):** <round → new finding → decision class → violated acceptance clause or `unresolved`>
|
|
7
8
|
|
|
8
9
|
## Verified Facts
|
|
9
10
|
<facts re-checked in Phase 2 with file paths>
|
|
10
11
|
**Files Checked:** <list at least 3 related files you actually read>
|
|
11
|
-
**Error Message Verified:** <copy the exact error message from the last failure>
|
|
12
|
+
**Error Message Verified:** <copy the exact error message from the last failure; for a repair loop with no error, write `none` and cite the latest finding instead>
|
|
13
|
+
**Sites Inventoried (repair loop only):** <every site making the same decision, including unchanged callers and consumers>
|
|
12
14
|
|
|
13
15
|
## Diagnosis
|
|
14
16
|
<comprehensive explanation of root cause>
|
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:
|
|
5
|
+
"serialNumber": "urn:uuid:ec1ab676-b0e1-5aa7-869d-8317e5674765",
|
|
6
6
|
"version": 1,
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-10-
|
|
8
|
+
"timestamp": "2026-10-23T07:24:05.300Z",
|
|
9
9
|
"tools": [
|
|
10
10
|
{
|
|
11
11
|
"vendor": "Harness Everything",
|
|
12
12
|
"name": "generate-sbom.js",
|
|
13
|
-
"version": "0.
|
|
13
|
+
"version": "0.40.0"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
16
|
"component": {
|
|
17
17
|
"type": "application",
|
|
18
|
-
"bom-ref": "pkg:npm/harness-everything@0.
|
|
18
|
+
"bom-ref": "pkg:npm/harness-everything@0.40.0",
|
|
19
19
|
"name": "harness-everything",
|
|
20
|
-
"version": "0.
|
|
21
|
-
"purl": "pkg:npm/harness-everything@0.
|
|
20
|
+
"version": "0.40.0",
|
|
21
|
+
"purl": "pkg:npm/harness-everything@0.40.0"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"components": [
|
|
@@ -2033,7 +2033,7 @@
|
|
|
2033
2033
|
]
|
|
2034
2034
|
},
|
|
2035
2035
|
{
|
|
2036
|
-
"ref": "pkg:npm/harness-everything@0.
|
|
2036
|
+
"ref": "pkg:npm/harness-everything@0.40.0",
|
|
2037
2037
|
"dependsOn": [
|
|
2038
2038
|
"pkg:npm/%40commitlint/cli@19.8.1",
|
|
2039
2039
|
"pkg:npm/%40commitlint/config-conventional@19.8.1",
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
// Regenerates .agents/harness-everything/errors/index.jsonl from the E-*.md records.
|
|
5
|
+
// `--check` compares instead of writing. Not wired into CI or hooks on purpose.
|
|
6
|
+
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const yaml = require('js-yaml');
|
|
10
|
+
|
|
11
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
12
|
+
const DIR = path.join(ROOT, '.agents', 'harness-everything', 'errors');
|
|
13
|
+
const INDEX = path.join(DIR, 'index.jsonl');
|
|
14
|
+
const RECORD = /^E-\d{4}-[a-z0-9-]+\.md$/;
|
|
15
|
+
const REQUIRED = ['id', 'signature', 'class', 'scope', 'status'];
|
|
16
|
+
const SCOPES = new Set(['in', 'out', 'unresolved']);
|
|
17
|
+
const STATUSES = new Set(['open', 'lesson', 'mechanism']);
|
|
18
|
+
|
|
19
|
+
function parseRecord(file) {
|
|
20
|
+
const text = fs.readFileSync(path.join(DIR, file), 'utf8').replace(/\r\n/g, '\n');
|
|
21
|
+
const match = /^---\n([\s\S]*?)\n---\n/.exec(text);
|
|
22
|
+
if (!match) throw new Error(`${file}: missing YAML frontmatter`);
|
|
23
|
+
const meta = yaml.load(match[1]);
|
|
24
|
+
if (!meta || typeof meta !== 'object') throw new Error(`${file}: frontmatter is not a mapping`);
|
|
25
|
+
for (const key of REQUIRED) {
|
|
26
|
+
if (meta[key] === undefined || meta[key] === null || meta[key] === '') throw new Error(`${file}: missing ${key}`);
|
|
27
|
+
}
|
|
28
|
+
if (!file.startsWith(`${meta.id}-`)) throw new Error(`${file}: id ${meta.id} does not match the file name`);
|
|
29
|
+
if (!SCOPES.has(meta.scope)) throw new Error(`${file}: scope must be in, out or unresolved`);
|
|
30
|
+
if (!STATUSES.has(meta.status)) throw new Error(`${file}: status must be open, lesson or mechanism`);
|
|
31
|
+
const episodes = Array.isArray(meta.episodes) ? meta.episodes : [];
|
|
32
|
+
return {
|
|
33
|
+
id: meta.id,
|
|
34
|
+
signature: meta.signature,
|
|
35
|
+
class: meta.class,
|
|
36
|
+
title: meta.title || null,
|
|
37
|
+
scope: meta.scope,
|
|
38
|
+
status: meta.status,
|
|
39
|
+
sites: Array.isArray(meta.sites) ? meta.sites : [],
|
|
40
|
+
violates: meta.violates || null,
|
|
41
|
+
mechanism_ref: meta.mechanism_ref || null,
|
|
42
|
+
episodes: episodes.length,
|
|
43
|
+
rounds: episodes.map(e => ({
|
|
44
|
+
episode: e.episode || null,
|
|
45
|
+
// Round 0 is discovery, so the attempt count is the highest round number.
|
|
46
|
+
rounds: Array.isArray(e.rounds) ? Math.max(0, ...e.rounds.map(r => Number(r.round) || 0)) : null,
|
|
47
|
+
closed: e.closed === true,
|
|
48
|
+
})),
|
|
49
|
+
file: path.posix.join('.agents/harness-everything/errors', file),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function render() {
|
|
54
|
+
const files = fs.readdirSync(DIR).filter(f => RECORD.test(f)).sort();
|
|
55
|
+
const ids = new Set();
|
|
56
|
+
const lines = files.map(file => {
|
|
57
|
+
const record = parseRecord(file);
|
|
58
|
+
if (ids.has(record.id)) throw new Error(`${file}: duplicate id ${record.id}`);
|
|
59
|
+
ids.add(record.id);
|
|
60
|
+
return JSON.stringify(record);
|
|
61
|
+
});
|
|
62
|
+
return lines.length ? `${lines.join('\n')}\n` : '';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function main() {
|
|
66
|
+
const check = process.argv.includes('--check');
|
|
67
|
+
let next;
|
|
68
|
+
try {
|
|
69
|
+
next = render();
|
|
70
|
+
} catch (error) {
|
|
71
|
+
console.error(`errors:sync: ${error.message}`);
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
74
|
+
const rel = path.relative(ROOT, INDEX).replace(/\\/g, '/');
|
|
75
|
+
if (check) {
|
|
76
|
+
const current = fs.existsSync(INDEX) ? fs.readFileSync(INDEX, 'utf8') : null;
|
|
77
|
+
if (current !== next) {
|
|
78
|
+
console.error(`${rel} is stale. Run npm run errors:sync.`);
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
console.log(`${rel} is current.`);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
fs.writeFileSync(INDEX, next, 'utf8');
|
|
85
|
+
console.log(`Updated ${rel}`);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (require.main === module) main();
|
|
89
|
+
|
|
90
|
+
module.exports = { render };
|
package/zoom-out/SKILL.md
CHANGED
|
@@ -4,7 +4,7 @@ description: "Reflect-first circuit breaker - after 3 failures, stop edits, rebu
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.40.0
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Zoom Out (Circuit Breaker)
|
|
@@ -15,7 +15,7 @@ Stop repeated failures, rebuild the facts, and choose a safe next step.
|
|
|
15
15
|
|
|
16
16
|
| Component | Specification |
|
|
17
17
|
| :--- | :--- |
|
|
18
|
-
| **Trigger / Input** | Three same-signature failures or an explicit loop/rethink request. |
|
|
18
|
+
| **Trigger / Input** | Three same-signature failures, a repair loop, or an explicit loop/rethink request. |
|
|
19
19
|
| **Expected Output** | Fact-checked report ending in `RESUME` or `ESCALATE`. |
|
|
20
20
|
| **State Mutations** | Writes the session `zoom-out-report.md`; reset may clear breaker state. |
|
|
21
21
|
| **Enforcement Gate** | `<skills-repo-root>/hooks/scripts/rule-of-3.js` plus a valid report; a later three-failure cycle requests another reflection. |
|
|
@@ -25,12 +25,13 @@ Stop repeated failures, rebuild the facts, and choose a safe next step.
|
|
|
25
25
|
1. After three same-signature failures, stop edits and do not ask the user yet.
|
|
26
26
|
2. Use read-only tools to restate the goal and check files, configuration, and logs.
|
|
27
27
|
3. Fill `<this-skill-dir>/templates/zoom-out-report.template.md` and end with `RESUME` or `ESCALATE`.
|
|
28
|
-
4. Resume only on an untried path; escalate genuine user decisions with options.
|
|
28
|
+
4. Resume only on an untried path; escalate genuine user decisions with options. Repair loop: inventory sites first.
|
|
29
29
|
5. If three more matching failures occur, run another zoom-out cycle. `npm run harness:reset` is only an optional manual state clear; record the insight with `self-evolve`.
|
|
30
30
|
|
|
31
31
|
## USE FOR:
|
|
32
32
|
- "you are stuck in a loop"
|
|
33
33
|
- "the same error keeps failing"
|
|
34
|
+
- "every round finds a new edge case"
|
|
34
35
|
- "rethink your assumptions"
|
|
35
36
|
|
|
36
37
|
## DO NOT USE FOR:
|
|
@@ -27,6 +27,13 @@ flowchart TD
|
|
|
27
27
|
## 1. Triggers
|
|
28
28
|
- **Rule of 3 (Repeated Failures)**: Attempting to fix the same error or test failure 3 times without progress.
|
|
29
29
|
- **Divergence**: Fixing one bug repeatedly introduces new secondary errors.
|
|
30
|
+
- **Repair loop (feature level)**: Two consecutive review or fix rounds on the same feature each surface new defects in the same decision class (for example "is this the trusted checker?"), even though every command succeeded.
|
|
31
|
+
- The Rule of 3 hook cannot see this. It counts same-signature command failures in one session. Successful review findings do not increment it, and unrelated successes can leave an existing count in place. New sessions and different failure signatures do not accumulate a feature's review history.
|
|
32
|
+
- The signal comes from review history: prior findings and their dispositions, the round count per class in an error ledger, or the reviewer noticing the pattern. It is a prompt to reflect, not a lock. The hook gate in the skill contract applies only to the three-failure trigger.
|
|
33
|
+
- "Same decision class" means the same acceptance decision under the same trust assumptions, possibly at different sites. "Same directory" or "validation" is too broad. Count a repeated or renamed finding once, and treat missing history as unknown, not zero.
|
|
34
|
+
- Phase 2 here means: list every finding so far by decision class, state the acceptance clause each violates, and inventory every site (callers, state readers, Stop consumers) that makes the same decision. Findings that map to no acceptance clause stay `unresolved` for the owner instead of becoming new fixes.
|
|
35
|
+
- RESUME by using the inventory to choose the smallest justified correction (which may be one shared fix, or no code change), then re-trace one normal end-to-end acceptance path. Unresolved findings need scope adjudication, not speculative repairs.
|
|
36
|
+
- A one-shot reviewer cannot see the previous round on its own. The packet carries the current acceptance anchor, a link to the previous comparable report with its revision, the prior finding IDs and dispositions, and the fix made since.
|
|
30
37
|
- **Goal Drift**: Execution strays far from the initial task objective.
|
|
31
38
|
- **User Instruction**: The user requests a step back ("zoom out", "step back", "stop and think").
|
|
32
39
|
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
## Failed Attempts
|
|
5
5
|
<attempt → underlying assumption → observed outcome>
|
|
6
|
-
**Failure Category:** <syntax|environment|test|timeout|permission|dependency|unknown>
|
|
6
|
+
**Failure Category:** <syntax|environment|test|timeout|permission|dependency|repair-loop|unknown>
|
|
7
|
+
**Repair-loop rounds (repair loop only):** <round → new finding → decision class → violated acceptance clause or `unresolved`>
|
|
7
8
|
|
|
8
9
|
## Verified Facts
|
|
9
10
|
<facts re-checked in Phase 2 with file paths>
|
|
10
11
|
**Files Checked:** <list at least 3 related files you actually read>
|
|
11
|
-
**Error Message Verified:** <copy the exact error message from the last failure>
|
|
12
|
+
**Error Message Verified:** <copy the exact error message from the last failure; for a repair loop with no error, write `none` and cite the latest finding instead>
|
|
13
|
+
**Sites Inventoried (repair loop only):** <every site making the same decision, including unchanged callers and consumers>
|
|
12
14
|
|
|
13
15
|
## Diagnosis
|
|
14
16
|
<comprehensive explanation of root cause>
|