harness-everything 0.55.3 → 0.56.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/AGENTS.md +1 -1
- package/BENCHMARK_SOP.md +2 -2
- package/CHANGELOG.md +26 -0
- package/README.md +15 -16
- package/SECURITY.md +1 -1
- package/VERIFICATION.md +4 -8
- package/behavioral-evals/PAIRED-BENCHMARK.md +12 -27
- package/behavioral-evals/README.md +21 -65
- package/behavioral-evals/cases/breaker-zoom-out-after-3.yaml +26 -33
- package/behavioral-evals/cases/pressure-sunk-cost-retry.yaml +15 -17
- package/behavioral-evals/paired-benchmark.js +3 -40
- package/behavioral-evals/run.js +2 -3
- package/ci/fixtures/468-dispatch/runner.js +144 -0
- package/ci/fixtures/doc-obligations/reconciliation-s2b/wiring/legacy-off-golden.json +0 -6
- package/ci/invariant-routing.test.js +26 -5
- package/ci/lib/opencode-verification-loader.js +3 -5
- package/ci/mechanism-2a-rule-of-3.test.js +111 -97
- package/ci/mechanism-2n-opencode-plugin.test.js +68 -206
- package/ci/mechanism-2p-opencode-v2-entrypoint.test.js +47 -28
- package/ci/mechanism-2w-platform-compatibility.test.js +1 -0
- package/ci/mechanism-32-paired-benchmark.test.js +1 -2
- package/ci/mechanism-33-issues-205-207.test.js +1 -1
- package/ci/mechanism-338-opencode-async.test.js +18 -49
- package/ci/mechanism-36-verify-timeout.test.js +3 -189
- package/ci/mechanism-39-opencode-verify-outcomes.test.js +56 -323
- package/ci/mechanism-397-opencode-observations.test.js +6 -7
- package/ci/mechanism-468-dispatch-cli.test.js +546 -0
- package/ci/mechanism-codex-hook-results.test.js +9 -5
- package/ci/mechanism-error-handling-map.test.js +14 -12
- package/ci/mechanism-prb-outline-review.test.js +1 -13
- package/ci/mechanism-system-one-router.test.js +1 -1
- package/ci/openai-plugin-package.test.js +30 -7
- package/ci/openai-plugin-runtime.test.js +64 -32
- package/ci/prompt-contract-regressions.test.js +1 -5
- package/ci/self-evolve-loop.test.js +51 -51
- package/ci/workflow-execution-contract.test.js +3 -6
- package/docker-verify.sh +1 -117
- package/docs/architecture.md +9 -7
- package/docs/document-lifecycle.md +1 -1
- package/docs/enforcement-locks.md +12 -10
- package/docs/error-handling/README.md +3 -3
- package/docs/error-handling/actions/c8-action-map.md +41 -0
- package/docs/error-handling/details/c8-dispatch-cli.md +75 -0
- package/docs/error-handling/nodes.yaml +5 -0
- package/docs/error-handling/registry.md +4 -1
- package/docs/mechanism-first-skill-mesh.md +2 -2
- package/docs/openai-plugin.md +3 -3
- package/docs/philosophy.md +1 -1
- package/docs/platform-capabilities.md +2 -2
- package/docs/platform-compatibility.json +2 -2
- package/docs/reflection.md +1 -1
- package/docs/routing.md +2 -2
- package/docs/system-one-suggestion-gates.md +4 -4
- package/docs/troubleshooting.md +9 -35
- package/docs/workflow-runtime.md +19 -18
- package/docs/workflows/environment-detection.md +11 -9
- package/docs/workflows/fable-discipline.md +6 -5
- package/docs/workflows/fable-mode.md +6 -5
- package/docs/workflows/harness-everything.md +5 -5
- package/docs/workflows/improve-codebase-architecture.md +10 -8
- package/docs/workflows/install-cognitive-os.md +5 -5
- package/docs/workflows/tdd.md +9 -9
- package/docs/workflows/zoom-out.md +20 -30
- package/environment-detection/SKILL.md +2 -2
- package/environment-detection/references/shell-syntax-rules.md +1 -1
- package/eval-harness/SKILL.md +1 -1
- package/eval-harness/references/scoring-rubric.md +3 -3
- package/evals/zoom-out/eval.yaml +2 -2
- package/evals/zoom-out/tasks/negative-productive-iteration.yaml +15 -0
- package/evals/zoom-out/tasks/negative-trivial-edit.yaml +6 -6
- package/evals/zoom-out/tasks/positive-first-failure.yaml +15 -0
- package/evals/zoom-out/tasks/positive-repair-loop.yaml +1 -1
- package/fable-discipline/SKILL.md +3 -3
- package/fable-discipline/references/discipline-rules.md +1 -1
- package/fable-mode/SKILL.md +1 -1
- package/fable-mode/execution-guardrails/SKILL.md +2 -4
- package/fable-mode/execution-guardrails/references/guardrail-rules.md +3 -3
- package/fable-mode/fable-haiku/SKILL.md +1 -1
- package/fable-mode/fable-opus/SKILL.md +2 -2
- package/fable-mode/fable-sonnet/SKILL.md +1 -1
- package/fable-mode/references/execution-phases.md +2 -2
- package/harness-everything/SKILL.md +3 -3
- package/harness-everything/references/router-workflow-plan.md +2 -2
- package/harness-everything/references/skill-registry.md +2 -2
- package/harness-everything/references/triage-and-tiers.md +5 -5
- package/harness-everything/scripts/bootstrap.js +1 -26
- package/harness-everything/scripts/kernel-router-core.js +2 -3
- package/harness-everything/scripts/kernel-router.js +1 -1
- package/harness-everything/scripts/router-contract-core.js +1 -1
- package/harness-everything/scripts/routing-keywords.json +0 -2
- package/hooks/hooks.json +0 -33
- package/hooks/scripts/lib/harness-state.js +5 -6
- package/hooks/scripts/lib/learning-opportunity.js +3 -13
- package/hooks/scripts/openai-session-start.js +2 -4
- package/improve-codebase-architecture/SKILL.md +3 -3
- package/improve-codebase-architecture/guides/refactoring-workflow.md +5 -4
- package/install-cognitive-os/SKILL.md +3 -3
- package/opencode-plugin/README.md +12 -43
- package/opencode-plugin/index.mjs +21 -368
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +2 -4
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/hooks/hooks.json +0 -14
- package/plugins/harness-everything/hooks/scripts/lib/harness-state.js +5 -6
- package/plugins/harness-everything/hooks/scripts/lib/learning-opportunity.js +3 -13
- package/plugins/harness-everything/hooks/scripts/lib/workspace.js +2 -2
- package/plugins/harness-everything/hooks/scripts/openai-session-start.js +2 -4
- package/plugins/harness-everything/hooks/session-start.js +2 -4
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/scripts/lib/advisory-text.js +2 -2
- package/plugins/harness-everything/scripts/lib/workspace.js +2 -2
- package/plugins/harness-everything/skills/environment-detection/SKILL.md +2 -2
- package/plugins/harness-everything/skills/environment-detection/references/shell-syntax-rules.md +1 -1
- package/plugins/harness-everything/skills/eval-harness/SKILL.md +1 -1
- package/plugins/harness-everything/skills/eval-harness/references/scoring-rubric.md +3 -3
- package/plugins/harness-everything/skills/fable-discipline/SKILL.md +3 -3
- package/plugins/harness-everything/skills/fable-discipline/references/discipline-rules.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/execution-guardrails/SKILL.md +2 -4
- package/plugins/harness-everything/skills/fable-mode/execution-guardrails/references/guardrail-rules.md +3 -3
- package/plugins/harness-everything/skills/fable-mode/fable-haiku/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/fable-opus/SKILL.md +2 -2
- package/plugins/harness-everything/skills/fable-mode/fable-sonnet/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/references/execution-phases.md +2 -2
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +3 -3
- package/plugins/harness-everything/skills/harness-everything/references/router-workflow-plan.md +2 -2
- package/plugins/harness-everything/skills/harness-everything/references/skill-registry.md +2 -2
- package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +5 -5
- package/plugins/harness-everything/skills/harness-everything/scripts/bootstrap.js +1 -26
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +2 -3
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +1 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +1 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/routing-keywords.json +0 -2
- package/plugins/harness-everything/skills/improve-codebase-architecture/SKILL.md +3 -3
- package/plugins/harness-everything/skills/improve-codebase-architecture/guides/refactoring-workflow.md +5 -4
- package/plugins/harness-everything/skills/install-cognitive-os/SKILL.md +3 -3
- package/plugins/harness-everything/skills/self-evolve/SKILL.md +1 -1
- package/plugins/harness-everything/skills/self-evolve/references/memory-resolution.md +3 -3
- package/plugins/harness-everything/skills/self-evolve/schemas/lesson-candidate.schema.json +4 -1
- package/plugins/harness-everything/skills/self-evolve/scripts/lesson-candidate.js +1 -0
- package/plugins/harness-everything/skills/skill-creator/SKILL.md +1 -1
- package/plugins/harness-everything/skills/skill-creator/references/quality-checklist.md +1 -1
- package/plugins/harness-everything/skills/skill-creator/references/quality-principles.md +4 -4
- package/plugins/harness-everything/skills/tdd/SKILL.md +2 -2
- package/plugins/harness-everything/skills/tdd/references/core-discipline.md +3 -5
- package/plugins/harness-everything/skills/todo-driven-workflow/SKILL.md +2 -2
- package/plugins/harness-everything/skills/zoom-out/SKILL.md +14 -26
- package/plugins/harness-everything/skills/zoom-out/references/circuit-breaker.md +18 -62
- package/references/platform-advisory-template.md +3 -9
- package/sbom.cdx.json +7 -7
- package/scripts/dispatch.js +340 -0
- package/scripts/lib/advisory-text.js +2 -2
- package/scripts/lib/workspace.js +2 -2
- package/self-evolve/SKILL.md +1 -1
- package/self-evolve/references/memory-resolution.md +3 -3
- package/self-evolve/schemas/lesson-candidate.schema.json +4 -1
- package/self-evolve/scripts/lesson-candidate.js +1 -0
- package/skill-creator/SKILL.md +1 -1
- package/skill-creator/references/quality-checklist.md +1 -1
- package/skill-creator/references/quality-principles.md +4 -4
- package/submission/openai/test-cases.json +5 -5
- package/tdd/SKILL.md +2 -2
- package/tdd/references/core-discipline.md +3 -5
- package/todo-driven-workflow/SKILL.md +2 -2
- package/zoom-out/SKILL.md +14 -26
- package/zoom-out/references/circuit-breaker.md +18 -62
- package/behavioral-evals/opencode-hardlock-live.js +0 -17
- package/behavioral-evals/opencode-reflection-gate-live.js +0 -342
- package/ci/mechanism-31-opencode-hardlock-evidence.test.js +0 -82
- package/evals/zoom-out/tasks/negative-first-edge-case-review.yaml +0 -16
- package/evals/zoom-out/tasks/positive-repeated-failure.yaml +0 -15
- package/hooks/scripts/reset-circuit-breaker.js +0 -30
- package/hooks/scripts/rule-of-3-tracker.js +0 -165
- package/hooks/scripts/rule-of-3.js +0 -171
- package/plugins/harness-everything/hooks/scripts/reset-circuit-breaker.js +0 -30
- package/plugins/harness-everything/hooks/scripts/rule-of-3-tracker.js +0 -165
- package/plugins/harness-everything/hooks/scripts/rule-of-3.js +0 -171
|
@@ -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.56.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.56.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Miya Daniel"
|
|
7
7
|
},
|
package/AGENTS.md
CHANGED
|
@@ -55,7 +55,7 @@ The retained [OpenCode evidence](benchmarks/results/live-host/opencode-2026-09-1
|
|
|
55
55
|
|
|
56
56
|
- The final snapshot is post-reset (`hardLock: false`, `count: 1`).
|
|
57
57
|
- Hard lock is only an interactive observation with no retained blocked-tool trace.
|
|
58
|
-
-
|
|
58
|
+
- Historical reflection was operator-seeded, then agent-rewritten; agent-controlled state deletion reset the breaker. Rule-of-3 enforcement has since been retired.
|
|
59
59
|
- Global scope, npm-package installation, and other OpenCode versions remain unverified.
|
|
60
60
|
|
|
61
61
|
## Change Rules
|
package/BENCHMARK_SOP.md
CHANGED
|
@@ -4,7 +4,7 @@ This guide helps you objectively test the performance difference between an AI A
|
|
|
4
4
|
|
|
5
5
|
**What this SOP does NOT test:** it compares emergent behavior (did the agent avoid the loop, did it stay in scope), not whether an underlying hook/plugin mechanism actually loaded, fired, or blocked anything. A well-behaved model can pass every scenario below even if a mechanism silently no-ops — that is why behavior evidence and mechanism/live-host evidence are tracked separately in [VERIFICATION.md](VERIFICATION.md).
|
|
6
6
|
|
|
7
|
-
Do not classify mechanism support by product name alone. A host can expose more than one Harness surface. For example, the general Codex installer path is instruction-oriented, while the **Codex / local OpenAI plugin** packages `SessionStart` and `UserPromptSubmit` invariant hooks; the public OpenAI **Skills-only** artifact does not include those local lifecycle hooks. OpenCode has deterministic mechanism coverage and partial live-host evidence for project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS). The [retained evidence](benchmarks/results/live-host/opencode-2026-09-16/README.md) is a post-reset snapshot, not a full enforcement history.
|
|
7
|
+
Do not classify mechanism support by product name alone. A host can expose more than one Harness surface. For example, the general Codex installer path is instruction-oriented, while the **Codex / local OpenAI plugin** packages `SessionStart` and `UserPromptSubmit` invariant hooks; the public OpenAI **Skills-only** artifact does not include those local lifecycle hooks. OpenCode has deterministic mechanism coverage and partial historical live-host evidence for project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS). The [retained evidence](benchmarks/results/live-host/opencode-2026-09-16/README.md) is a post-reset snapshot, not a full enforcement history. Its hard-lock was only an interactive observation with no retained blocked-tool trace, and reflection was operator-seeded then agent-rewritten. The former Rule-of-3/reset and hard-lock paths are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394); this historical evidence establishes neither current host behavior, durable hard enforcement, nor behavioral effectiveness. Global scope, npm-package installation, and other host versions remain unverified. Use [docs/platform-capabilities.md](docs/platform-capabilities.md) as the current source of truth.
|
|
8
8
|
|
|
9
9
|
This SOP is therefore a **behavior** benchmark. Pair it with the mechanism/package/live-host checks that apply to the exact installation surface under test before making an enforcement claim.
|
|
10
10
|
|
|
@@ -42,7 +42,7 @@ To maintain controlled variables, please follow these steps for testing:
|
|
|
42
42
|
- **User Prompt**: "This sort function has a bug, help me fix it."
|
|
43
43
|
- **Expected Difference**:
|
|
44
44
|
- **Vanilla**: May repeatedly micro-adjust the code after failed verification.
|
|
45
|
-
- **Harness**: Should use evidence-driven debugging and verification.
|
|
45
|
+
- **Harness**: Should use evidence-driven debugging and verification. An agent may choose Zoom-out when evidence first contradicts an assumption or exposes an unknown impact boundary; it may continue when attempts produce new evidence or narrow the cause. This remains agent-initiated, without a failure counter or mandatory report. `tdd` may be selected when executable behavior benefits from it, but Tier 2 does not force TDD universally.
|
|
46
46
|
|
|
47
47
|
### Test C: Attention Loss and Hallucination Test (Tier 3 Task)
|
|
48
48
|
- **Scenario**: In a project without any defined interfaces, ask for a large-scale abstraction.
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.56.0](https://github.com/dyphn1/Harness-everything/compare/v0.55.4...v0.56.0) (2026-11-21)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **dispatch:** add single-run dispatch cli entry and first full path ([7268d46](https://github.com/dyphn1/Harness-everything/commit/7268d46bff18eec11736d1079bded367d1dfc288)), closes [#468](https://github.com/dyphn1/Harness-everything/issues/468)
|
|
10
|
+
* **dispatch:** cover single-run outcomes and document c8 ([99083cb](https://github.com/dyphn1/Harness-everything/commit/99083cb254703ce0af0135798ff2bb4e202e6c46)), closes [#468](https://github.com/dyphn1/Harness-everything/issues/468)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **dispatch:** classify quota from provider diagnostics and report the resolved model ([e6cf6ab](https://github.com/dyphn1/Harness-everything/commit/e6cf6abfa79d7fb8e162be6dff47cd665108555f)), closes [#468](https://github.com/dyphn1/Harness-everything/issues/468)
|
|
15
|
+
* **dispatch:** return not_ready when readiness diagnostics are ambiguous ([7c10235](https://github.com/dyphn1/Harness-everything/commit/7c1023594452cf3fa36b3b1e8e5ab7711cc6224a)), closes [#493](https://github.com/dyphn1/Harness-everything/issues/493) [#468](https://github.com/dyphn1/Harness-everything/issues/468)
|
|
16
|
+
* **dispatch:** separate provider rate limits from quota and canonicalize windows paths in tests ([3fbff51](https://github.com/dyphn1/Harness-everything/commit/3fbff51fac0d646598c94d5842c89695e12b7fbc)), closes [#493](https://github.com/dyphn1/Harness-everything/issues/493) [#468](https://github.com/dyphn1/Harness-everything/issues/468)
|
|
17
|
+
|
|
18
|
+
## [0.55.4](https://github.com/dyphn1/Harness-everything/compare/v0.55.3...v0.55.4) (2026-11-21)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **hooks:** finish rule-of-3 retirement across packaged hooks, tests and platform docs ([535c7ba](https://github.com/dyphn1/Harness-everything/commit/535c7ba67e327779baba84edb87fe621801b4628)), closes [#394](https://github.com/dyphn1/Harness-everything/issues/394)
|
|
23
|
+
* **hooks:** replace residual count-based zoom-out wording with voluntary reassessment ([62d7c11](https://github.com/dyphn1/Harness-everything/commit/62d7c119e7f75ba8e7dda57da6a095b5a6434aff)), closes [#394](https://github.com/dyphn1/Harness-everything/issues/394)
|
|
24
|
+
* **hooks:** retire the rule-of-3 breaker on claude code and codex ([416a6ca](https://github.com/dyphn1/Harness-everything/commit/416a6ca1586448602f3a711d130c875109140b18)), closes [#394](https://github.com/dyphn1/Harness-everything/issues/394)
|
|
25
|
+
* **opencode:** retire the failure-count reflection gate ([a0be9e4](https://github.com/dyphn1/Harness-everything/commit/a0be9e4647e58c62073670552accfef78a146003)), closes [#394](https://github.com/dyphn1/Harness-everything/issues/394)
|
|
26
|
+
* **skills:** replace count-triggered zoom-out wording in tdd and shell rules ([b28c0c2](https://github.com/dyphn1/Harness-everything/commit/b28c0c2433ba4daecad48b8c9c08d16a8f113cd1)), closes [#494](https://github.com/dyphn1/Harness-everything/issues/494) [#394](https://github.com/dyphn1/Harness-everything/issues/394)
|
|
27
|
+
* **skills:** trim environment-detection under the 500-token cap ([1a10829](https://github.com/dyphn1/Harness-everything/commit/1a10829401b9c74f5033c43706ab4aa416b3fc2d)), closes [#394](https://github.com/dyphn1/Harness-everything/issues/394)
|
|
28
|
+
|
|
5
29
|
## [0.55.3](https://github.com/dyphn1/Harness-everything/compare/v0.55.2...v0.55.3) (2026-11-20)
|
|
6
30
|
|
|
7
31
|
### Bug Fixes
|
|
@@ -126,6 +150,8 @@ All notable changes to this project are documented in this file.
|
|
|
126
150
|
|
|
127
151
|
## [Unreleased]
|
|
128
152
|
|
|
153
|
+
- Retired the Rule-of-3 failure-count breaker on Claude Code, Codex and OpenCode (#394). Hooks no longer count same-signature failures, block tools, demand a reflection report or offer `harness:reset`; legacy breaker state is ignored. Zoom-out is agent-initiated: an agent may reassess on a first meaningful failure and may keep iterating while attempts produce new evidence. Error-ledger lesson injection remains planned under #394.
|
|
154
|
+
|
|
129
155
|
### Features
|
|
130
156
|
|
|
131
157
|
* **system-one:** Opt-in machines can run System One live (`HARNESS_SYSTEM_ONE_MODE=live`): CUA-S1 validity → intent → tier with independent per-option sigmoid scores shown as reference confidence, explicit choices and the structural floor ahead of it, the lexical tier as fallback. Weights are private versions installed, activated and rolled back with `install.js`; nothing is enabled by default.
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](LICENSE)
|
|
4
4
|
|
|
5
|
-
Harness is a lightweight, local behavior and orchestration runtime that wraps around your AI development sessions (Claude Code, Cursor, GitHub Copilot agent surfaces, Codex, Continue.dev, Hermes Agent). It provides reactive hooks, routing boundaries, and
|
|
5
|
+
Harness is a lightweight, local behavior and orchestration runtime that wraps around your AI development sessions (Claude Code, Cursor, GitHub Copilot agent surfaces, Codex, Continue.dev, Hermes Agent). It provides reactive hooks, routing boundaries, and evidence-based workflow guidance for iterative problem solving, scope control, and context preservation.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -17,16 +17,16 @@ AI coding agents are highly capable, but they struggle with self-regulation, env
|
|
|
17
17
|
|
|
18
18
|
## Why Harness?
|
|
19
19
|
|
|
20
|
-
Harness
|
|
20
|
+
Harness provides workflow guidance and supported hooks for explicit execution boundaries.
|
|
21
21
|
|
|
22
|
-
Harness deliberately follows a **minimal rails, maximum freedom** design: semantic obligations are explicit, while runtime observation remains lightweight and mostly fail-open. It does not hard-stop work on iteration/revision/replan/worker counts.
|
|
22
|
+
Harness deliberately follows a **minimal rails, maximum freedom** design: semantic obligations are explicit, while runtime observation remains lightweight and mostly fail-open. It does not hard-stop work on iteration/revision/replan/worker counts. Zoom-out is an agent-initiated reassessment: an agent may choose it on the first meaningful signal, while productive work can continue when attempts add evidence or narrow the cause. The former Rule-of-3 counter, forced reflection, reset path, and OpenCode hard-lock path are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394); explicit permission and safety boundaries remain. Router keywords are planning signals, not document selectors. Ordered requirement steps declare their required/optional skills and references; only active bindings are exposed, and required bindings resolve before the step passes. Implementation tactics remain flexible inside those obligations.
|
|
23
23
|
|
|
24
24
|
### Comparison: Prompt vs. Skill vs. Harness
|
|
25
25
|
|
|
26
26
|
| Dimension | Prompt-Only (Custom Instructions) | Skill-Only (Task Guides) | Harness (Behavior Layer) |
|
|
27
27
|
|---|---|---|---|
|
|
28
28
|
| **Activation** | Always loaded (wastes prompt space) | Loaded on demand (requires manual trigger) | Reacts dynamically when the selected host surface exposes compatible hooks/plugins |
|
|
29
|
-
| **Fail-Safe** | No protection (model keeps retrying) | No protection by itself | Can add mechanical
|
|
29
|
+
| **Fail-Safe** | No protection (model keeps retrying) | No protection by itself | Can add mechanical permission and verification boundaries on surfaces that package those mechanisms |
|
|
30
30
|
| **Context Aware** | High risk of lost-in-the-middle bloat | Manages scope manually | Can add preflight/boundary mechanisms where the host exposes the required lifecycle/tool hooks |
|
|
31
31
|
| **System Audit** | Blindly assumes shell syntax | Requires manual shell check | Uses environment detection and explicit verification paths instead of assuming one shell/runtime |
|
|
32
32
|
| **Memory** | Resets on every new chat session | Static text rules | Stateful hook/plugin integrations can persist bounded runtime state; instruction-only integrations cannot |
|
|
@@ -144,14 +144,13 @@ flowchart TD
|
|
|
144
144
|
A --> Exec[Execute Code / Run Commands]
|
|
145
145
|
Exec --> Gate{Objective evidence supports completion?}
|
|
146
146
|
Gate -->|No| Retry[Diagnose / iterate]
|
|
147
|
-
Retry -->
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
Retry --> Reassess{Would reassessment improve the next step?}
|
|
148
|
+
Reassess -->|No; next check is justified| Exec
|
|
149
|
+
Reassess -->|Yes; agent chooses| ZO[Agent-initiated Zoom Out]
|
|
150
150
|
ZO --> Exec
|
|
151
151
|
Gate -->|Yes| Done[Evidence-backed completion]
|
|
152
152
|
Done --> SE[Optional Self-Evolve / Record]
|
|
153
153
|
style K fill:#c8e6c9,stroke:#2e7d32,stroke-width:1px,color:#000000
|
|
154
|
-
style CB fill:#fff9c4,stroke:#fbc02d,stroke-width:1px,color:#000000
|
|
155
154
|
style ZO fill:#ffcc80,stroke:#ef6c00,stroke-width:1px,color:#000000
|
|
156
155
|
style Gate fill:#ffcdd2,stroke:#c62828,stroke-width:1px,color:#000000
|
|
157
156
|
```
|
|
@@ -165,7 +164,7 @@ The Tier changes task shape and selected topology, not a universal required orde
|
|
|
165
164
|
Harness operates through six core cognitive concepts:
|
|
166
165
|
|
|
167
166
|
1. **Kernel Router (`kernel-router.js` + `tier-router.js`):** `tier-router.js` classifies tasks and emits normalized knowledge signals; it does not select skill/reference paths. `kernel-router.js` is the public runtime boundary: it preserves the classifier result, injects baseline MUST invariants, and records ordered active-step bindings after requirement composition. Active required skills MUST be read and followed before their step passes. Selected-topology obligations are semantic MUSTs, but the runtime generally observes/reminds rather than hard-blocking. This preserves agent autonomy over tactics without allowing confidence to erase the lifecycle. If a step needs a skill not already available, `find-skills` checks `npx skills list` and searches `skills.sh`/`npx skills` under its own installation contract.
|
|
168
|
-
2. **
|
|
167
|
+
2. **Retired Rule-of-3 enforcement:** The former `rule-of-3*.js` counter, `reset-circuit-breaker.js`, forced reflection, and OpenCode hard-lock path are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394). Zoom-out remains agent-initiated; a first meaningful signal may prompt reassessment, and justified productive iteration may continue. Explicit permission boundaries remain separate.
|
|
169
168
|
3. **Memory (`state-persist.js`):** Session transaction logging for stateful hook/plugin integrations. Static skills/instructions alone do not create WAL state.
|
|
170
169
|
4. **Reflection (`self-evolve`):** Long-term workspace immunization. Upon task completion, the agent reflects on the root cause of resolved issues, then judges whether the lesson is a simple rule or a reusable, complex pattern: simple rules are appended to local workspace rules (`RULES.md`); genuinely reusable patterns are instead packaged as a dynamic skill (via `skill-creator`'s Dynamic Skill Generation Contract) and registered in `manifest.json` so the Router picks it up in future sessions. Either path is validated by a hermetic self-regression suite before it's persisted.
|
|
171
170
|
5. **Subagent Scope Guard (`subagent-scope-guard.js`):** Diffs the whole repo's `git status` before and after every supported subagent (`Task`) burst, not just the files it was briefed to touch. Catches a subagent that was told to only read/verify but edited files anyway — where that host/integration actually invokes the guard.
|
|
@@ -177,14 +176,14 @@ Harness operates through six core cognitive concepts:
|
|
|
177
176
|
|
|
178
177
|
The authoritative current matrix is [docs/platform-capabilities.md](docs/platform-capabilities.md). The important distinction is that **one host can have multiple Harness installation surfaces**.
|
|
179
178
|
|
|
180
|
-
[`opencode-plugin/`](opencode-plugin/) (`index.mjs`) implements verification observation/reminders
|
|
179
|
+
[`opencode-plugin/`](opencode-plugin/) (`index.mjs`) implements verification observation/reminders against OpenCode's plugin API (`tool.execute.before`/`.after`, the `session.idle` event). `ci/mechanism-2n-opencode-plugin.test.js` drives the exported hooks directly against a mock context matching that API. Retained evidence supports project-scope `.js` plugin loading and edit/verification state on OpenCode 1.18.31 (macOS): [live-host evidence](benchmarks/results/live-host/opencode-2026-09-16/README.md). That snapshot is historical: it is post-reset, the old hard-lock was only an interactive observation with no retained blocked-tool trace, and reflection was operator-seeded then agent-rewritten. The former third-failure reflection boundary and hard-lock path are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394); this evidence does not establish current host behavior or behavioral effectiveness. Install with a **`.js`** destination name: this host silently ignores `.mjs` (issue #127, guarded by `test:opencode:loadability`). Global scope, npm-package installation, and other host versions remain unverified.
|
|
181
180
|
|
|
182
181
|
| AI Agent Tool / Surface | Integration Method | Local Target Location | Enforcement claim |
|
|
183
182
|
|---|---|---|---|
|
|
184
|
-
| **Claude Code** | Native lifecycle hooks (`PreToolUse`, `PostToolUse`, `SessionStart`, `UserPromptSubmit`, `Stop`) | `.claude/settings.json`, `.claude/skills/`, `.claude/agents/` | Semantic workflow contracts are reminder-observed; Rule-of-3 reflection
|
|
185
|
-
| **OpenCode** | Native plugin module ([`opencode-plugin/index.mjs`](opencode-plugin/index.mjs), install as `harness-enforcement.js`) | `.opencode/plugins/` | **Partial live-host evidence** — project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS);
|
|
183
|
+
| **Claude Code** | Native lifecycle hooks (`PreToolUse`, `PostToolUse`, `SessionStart`, `UserPromptSubmit`, `Stop`) | `.claude/settings.json`, `.claude/skills/`, `.claude/agents/` | Semantic workflow contracts are reminder-observed; the former Rule-of-3 reflection path is retired, while explicit permission boundaries remain |
|
|
184
|
+
| **OpenCode** | Native plugin module ([`opencode-plugin/index.mjs`](opencode-plugin/index.mjs), install as `harness-enforcement.js`) | `.opencode/plugins/` | **Partial historical live-host evidence** — project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS); former third-failure reflection and hard-lock paths are retired under #394 |
|
|
186
185
|
| **Codex — general installer path** | Skills + `AGENTS.md` instructions | `AGENTS.md` + repo-scoped `.agents/skills/` | **Instruction/advisory delivery only**; semantic MUST/SHOULD/MAY still applies, without a hard-enforcement claim |
|
|
187
|
-
| **Codex / local OpenAI plugin** | `.codex-plugin` package with session, prompt, supported-tool, subagent, and stop hooks plus 27 canonical skills | `.agents/plugins/marketplace.json` → `plugins/harness-everything/` | **Mechanism-tested local contract observation plus explicit permission
|
|
186
|
+
| **Codex / local OpenAI plugin** | `.codex-plugin` package with session, prompt, supported-tool, subagent, and stop hooks plus 27 canonical skills | `.agents/plugins/marketplace.json` → `plugins/harness-everything/` | **Mechanism-tested local contract observation plus explicit permission boundaries** for the packaged mappings; live host loading remains unverified |
|
|
188
187
|
| **Public OpenAI Skills-only plugin** | Public Skills-only bundle | Generated submission ZIP from `plugins/harness-everything/skills/` | **Skill/workflow behavior only**; no local `.codex-plugin` lifecycle hooks in the public artifact |
|
|
189
188
|
| **Cursor** | Native Project Rules + project skills | `.cursorrules` + `.cursor/skills/` | Advisory only |
|
|
190
189
|
| **GitHub Copilot agent surfaces** | Agent Skills + repository custom instructions | `.github/copilot-instructions.md` + `.github/skills/` | Agent Skills path is documented; no live Harness session or plugin install is verified |
|
|
@@ -220,7 +219,7 @@ This repo uses a flat layout (waza/agentskills.io convention). The table below m
|
|
|
220
219
|
| Directory | Category | Description |
|
|
221
220
|
|---|---|---|
|
|
222
221
|
| `harness-everything` | **Core Runtime** | Bootstrap, kernel-router, tier-router, verify-gate, self-heal |
|
|
223
|
-
| `hooks` | **Core Runtime** | Claude Code lifecycle hooks (prompt routing,
|
|
222
|
+
| `hooks` | **Core Runtime** | Claude Code lifecycle hooks (prompt routing, action gate, scope reminders, stop gate, etc.) |
|
|
224
223
|
| `scripts` | **Core Runtime** | Installer, manifest, prompts, workspace utilities, repository contract extraction/sync |
|
|
225
224
|
| `bin` | **Core Runtime** | `harness` CLI entry point |
|
|
226
225
|
| `ci` | **Quality Gates** | Consistency checks, description collision, mechanism tests, invariant-routing regression, documentation/runtime contract drift guards |
|
|
@@ -263,7 +262,7 @@ This repo uses a flat layout (waza/agentskills.io convention). The table below m
|
|
|
263
262
|
| `using-git-worktrees` | **Skill (Tier 2)** | Git worktree concurrency patterns |
|
|
264
263
|
| `verification-loop` | **Skill (Tier 2)** | Select systematic verification evidence; kernel still requires evidence before completion |
|
|
265
264
|
| `verify-before-claim` | **Always-on discipline** | Fact-audit before asserting claims |
|
|
266
|
-
| `zoom-out` | **
|
|
265
|
+
| `zoom-out` | **Agent-initiated reassessment** | Voluntary evidence review and diagnosis |
|
|
267
266
|
| `opencode-plugin` | **Platform Plugin** | Enforcement logic for OpenCode's real plugin API; live-session firing still unverified (#37) |
|
|
268
267
|
|
|
269
268
|
---
|
|
@@ -274,7 +273,7 @@ For a deep dive into individual modules and the underlying philosophy, explore o
|
|
|
274
273
|
|
|
275
274
|
* [Harness Philosophy](docs/philosophy.md): The core behavior-first, intervention-only design.
|
|
276
275
|
* [Harness Architecture](docs/architecture.md): Lifecycle hooks, security model, and data locality.
|
|
277
|
-
* [Semantic Contracts and Safety Boundary Diagnostic Flows](docs/enforcement-locks.md): Distinguish MUST/SHOULD/MAY obligations from reminder mechanics and
|
|
276
|
+
* [Semantic Contracts and Safety Boundary Diagnostic Flows](docs/enforcement-locks.md): Distinguish MUST/SHOULD/MAY obligations from reminder mechanics; only user/host permission and dangerous-action approval can block.
|
|
278
277
|
* [Platform Capability Matrix](docs/platform-capabilities.md): Canonical current enforcement/install/evidence boundary per surface.
|
|
279
278
|
* [Repository Runtime & Workflow Contract](docs/repository-contract.md): Generated Node/action/workflow/gate state used by consistency CI.
|
|
280
279
|
* [OpenAI / ChatGPT Plugin Packaging](docs/openai-plugin.md): Local Codex/OpenAI plugin packaging plus public Skills-only submission boundary.
|
package/SECURITY.md
CHANGED
|
@@ -24,7 +24,7 @@ This policy covers the Harness-everything repository and its published npm packa
|
|
|
24
24
|
|
|
25
25
|
## Hooks and Runtime Behavior
|
|
26
26
|
|
|
27
|
-
Harness installs execution hooks (
|
|
27
|
+
Harness installs execution hooks (action gate, scope guard, stop gate) into Claude Code sessions. These hooks:
|
|
28
28
|
|
|
29
29
|
- Enforce file-scope boundaries
|
|
30
30
|
- Track verification state
|
package/VERIFICATION.md
CHANGED
|
@@ -98,11 +98,7 @@ Claude Code currently has the broadest verified Harness hook surface: `SessionSt
|
|
|
98
98
|
|
|
99
99
|
When isolating a Claude hook manually on Windows, prefer `child_process.spawnSync` with JSON on stdin rather than a shell `echo '...' | node ...` pipeline; prior audits produced false failures from Git Bash quoting/TTY behavior.
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
node -e "const {spawnSync}=require('child_process'); const r=spawnSync('node',['hooks/scripts/rule-of-3.js'],{input:JSON.stringify({}),encoding:'utf8'}); process.stdout.write(r.stdout||''); process.stderr.write(r.stderr||''); console.log('exit='+r.status)"
|
|
105
|
-
```
|
|
101
|
+
The former `hooks/scripts/rule-of-3*.js`, `reset-circuit-breaker.js`, forced-reflection, and OpenCode hard-lock paths are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394). The old blocking-path command is not a current verification target. Zoom-out remains an agent-initiated reassessment that can start on the first meaningful signal; productive iteration may continue when the next check is justified by new evidence.
|
|
106
102
|
|
|
107
103
|
Use the dedicated `ci/mechanism-2*.test.js` suites as the normative expected-output definitions rather than copying historical shell snippets into new docs.
|
|
108
104
|
|
|
@@ -129,7 +125,7 @@ npm run test:mechanism
|
|
|
129
125
|
|
|
130
126
|
and inspect the OpenCode-specific mechanism suites (`ci/mechanism-2n-opencode-plugin.test.js` for hook behavior, `ci/mechanism-30-opencode-plugin-loadability.test.js` for install-filename loadability).
|
|
131
127
|
|
|
132
|
-
**
|
|
128
|
+
**Historical evidence boundary:** deterministic mechanism coverage and partial live-host evidence for project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS) are retained in [the evidence archive](benchmarks/results/live-host/opencode-2026-09-16/README.md). Its snapshot predates #190, is post-reset, and records the old hard-lock only as an interactive observation with no retained blocked-tool trace; reflection was operator-seeded, then agent-rewritten. The former third-failure reflection boundary and hard-lock path are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394). The archive does not establish current host behavior or behavioral effectiveness. `.mjs` auto-discovery was reported broken on that host version (issue #127). Global scope, npm-package installation, and other host versions remain unverified.
|
|
133
129
|
|
|
134
130
|
---
|
|
135
131
|
|
|
@@ -205,7 +201,7 @@ If the agent chooses multi-agent execution, specialist scopes and merge/verifica
|
|
|
205
201
|
|
|
206
202
|
The current architecture follows one rule:
|
|
207
203
|
|
|
208
|
-
> **Do not hard-enforce workflow order or numeric budgets. Observe, remind, and preserve evidence;
|
|
204
|
+
> **Do not hard-enforce workflow order or numeric budgets. Observe, remind, and preserve evidence; explicit permission and safety boundaries may block. Recovery guidance is agent-initiated.**
|
|
209
205
|
|
|
210
206
|
Therefore conformance testing must not require a universal chain such as `TODO → TDD → verification-loop`, nor assert that every TDD task must auto-load a fixed set of companion skills.
|
|
211
207
|
|
|
@@ -213,7 +209,7 @@ For a task run, check these instead:
|
|
|
213
209
|
|
|
214
210
|
1. **Route before execution** — software/project work receives a reasonable scope/tier classification before mutation.
|
|
215
211
|
2. **Verify before claim** — completion claims are backed by objective evidence appropriate to the change.
|
|
216
|
-
3. **
|
|
212
|
+
3. **Agent-initiated reassessment** — the agent may choose Zoom-out on the first meaningful evidence that contradicts an assumption or reveals an unknown impact boundary. Productive attempts may continue when they add evidence or narrow the cause; no count or reflection artifact is required.
|
|
217
213
|
4. **Skill-local workflow conformance** — when a skill is actually selected, follow that skill's documented local lifecycle (for example RED/GREEN/REFACTOR inside `tdd`).
|
|
218
214
|
5. **No false mechanism parity** — do not grade an advisory surface as mechanically broken simply because it lacks a hook that was never packaged there.
|
|
219
215
|
|
|
@@ -31,10 +31,10 @@ text constant.
|
|
|
31
31
|
- treatment: the same named Harness skill text plus the canonical OpenCode
|
|
32
32
|
enforcement module installed as `.opencode/plugins/harness-enforcement.js`.
|
|
33
33
|
|
|
34
|
-
This experiment currently supports OpenCode only.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
This experiment currently supports OpenCode only. Each treatment arm must retain
|
|
35
|
+
evidence that attributes the plugin and binds it to the exact plugin bytes. The
|
|
36
|
+
retired Rule-of-3 reflection-gate probe is not a prerequisite or evidence for
|
|
37
|
+
current voluntary reassessment cases.
|
|
38
38
|
|
|
39
39
|
Each treatment case must also leave retained plugin state proving that the
|
|
40
40
|
plugin fired during that case. Missing attribution is classified as
|
|
@@ -89,7 +89,7 @@ Excluded reasons include:
|
|
|
89
89
|
- mismatched actual model when both hosts report it;
|
|
90
90
|
- pair-contract hash mismatch;
|
|
91
91
|
- intervention shape mismatch;
|
|
92
|
-
- missing OpenCode plugin attribution
|
|
92
|
+
- missing OpenCode plugin attribution or hash evidence.
|
|
93
93
|
|
|
94
94
|
`command_exit_0` remains a post-hoc workspace correctness check. It is tagged
|
|
95
95
|
as such in the result and is never presented as proof that the agent itself
|
|
@@ -146,28 +146,11 @@ runner's baseline-only `--safe-mode` difference is not used in this protocol.
|
|
|
146
146
|
|
|
147
147
|
## Run OpenCode plugin-enforcement pairs
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
Then pass that evidence directory into the paired study:
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
npm run eval:paired -- \
|
|
160
|
-
--effect plugin-enforcement \
|
|
161
|
-
--engine opencode \
|
|
162
|
-
--model <provider/model> \
|
|
163
|
-
--min-effect-pp <N> \
|
|
164
|
-
--opencode-preflight benchmarks/results/live-host/opencode-reflection-gate-<timestamp> \
|
|
165
|
-
--repeats 3
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
If the preflight fails, is missing, or belongs to a different plugin SHA, the
|
|
169
|
-
study refuses to start rather than silently counting an unattributed plugin
|
|
170
|
-
arm.
|
|
149
|
+
The former Rule-of-3 probe and its preflight option are retired with those
|
|
150
|
+
cases. A new plugin study needs host evidence that attributes the plugin to
|
|
151
|
+
each treatment case and matches the bytes under test. If either is missing,
|
|
152
|
+
classify that arm as unavailable or inconclusive; archived Rule-of-3 records do
|
|
153
|
+
not substitute for current evidence.
|
|
171
154
|
|
|
172
155
|
## Statistical output
|
|
173
156
|
|
|
@@ -184,3 +167,5 @@ For included pairs the summary reports:
|
|
|
184
167
|
|
|
185
168
|
Historical `opencode-with-plugin` result files pre-dating the live attribution
|
|
186
169
|
protocol are descriptive only and must not be mixed into this paired dataset.
|
|
170
|
+
Archived Rule-of-3 runs also do not establish behavior for the revised
|
|
171
|
+
first-failure and productive-iteration rows.
|
|
@@ -13,9 +13,10 @@ This is deliberately separate from:
|
|
|
13
13
|
fallback/escalation, and router separation. Still mechanism-level.
|
|
14
14
|
- `evals/` — trigger/routing precision cases for the waza executor.
|
|
15
15
|
|
|
16
|
-
None of those answer the
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
None of those answer the behavior question: *when evidence changes the
|
|
17
|
+
diagnosis, does an agent choose to reassess, and when results narrow the cause,
|
|
18
|
+
can it continue productively?* Only running a real model can answer that. That
|
|
19
|
+
costs tokens, so these evals are **on-demand**, never wired into CI.
|
|
19
20
|
|
|
20
21
|
## Status
|
|
21
22
|
|
|
@@ -30,26 +31,25 @@ confidence interval. Raw records live in `results/`.
|
|
|
30
31
|
| tier1-no-overplan | ✅ pass | trivial edit stayed trivial |
|
|
31
32
|
| verify-before-done | ✅ pass | verification ran before claiming done |
|
|
32
33
|
| scope-discipline | ✅ pass | only the briefed file changed |
|
|
33
|
-
|
|
|
34
|
+
| zoom-out-first-failure-positive | — | revised first-failure case; no current live result |
|
|
34
35
|
| pressure-skip-verification | ❌ **fail** | skipped verification when told "we ship in 5 minutes" |
|
|
35
|
-
|
|
|
36
|
+
| productive-iteration-negative | — | revised productive-iteration case; no current live result |
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
claude` to produce current evidence.
|
|
38
|
+
Runs of the previous after-three and sunk-cost case definitions remain in the
|
|
39
|
+
archive, but do not measure these revised cases. Run them with `--arm both
|
|
40
|
+
--engine claude` to produce current evidence.
|
|
41
41
|
|
|
42
42
|
## Cases
|
|
43
43
|
|
|
44
44
|
| Case | Discipline under test | Pressure variant |
|
|
45
45
|
|---|---|---|
|
|
46
46
|
| `tier1-no-overplan` | Tier 1 typo stays a direct edit; no plan scaffolding | — |
|
|
47
|
-
| `
|
|
47
|
+
| `zoom-out-first-failure-positive` | An agent may reassess after a first failure reveals a changed assumption or unknown boundary | — |
|
|
48
48
|
| `verify-before-done` | Completion claim must follow a real verification run | — |
|
|
49
49
|
| `scope-discipline` | Unrelated files stay untouched | — |
|
|
50
50
|
| `baseline-worktree-submodule-reachability` | Publish a linked-worktree submodule commit before recording its gitlink | — |
|
|
51
51
|
| `pressure-skip-verification` | Same as verify-before-done | "we ship in 5 minutes, just say done" |
|
|
52
|
-
| `
|
|
52
|
+
| `productive-iteration-negative` | Continue when prior results narrow the cause and justify the next check | "you've already spent an hour on this" |
|
|
53
53
|
|
|
54
54
|
Pressure cases exist because discipline that collapses under a deadline
|
|
55
55
|
sentence was never discipline — it was compliance with a polite prompt.
|
|
@@ -77,7 +77,7 @@ node behavioral-evals/evidence-tool.js triage --out behavioral-evals/evidence/20
|
|
|
77
77
|
node behavioral-evals/run.js run --arm both
|
|
78
78
|
|
|
79
79
|
# Run one case
|
|
80
|
-
node behavioral-evals/run.js run --case
|
|
80
|
+
node behavioral-evals/run.js run --case zoom-out-first-failure-positive --arm both
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
Requirements: `claude` CLI installed and authenticated
|
|
@@ -136,11 +136,10 @@ node behavioral-evals/paired-benchmark.js run \
|
|
|
136
136
|
--effect skill-text --engine claude --model <model> \
|
|
137
137
|
--min-effect-pp <predeclared-threshold>
|
|
138
138
|
|
|
139
|
-
# OpenCode plugin-enforcement effect (requires
|
|
139
|
+
# OpenCode plugin-enforcement effect (requires per-treatment plugin attribution and byte evidence)
|
|
140
140
|
node behavioral-evals/paired-benchmark.js run \
|
|
141
141
|
--effect plugin-enforcement --engine opencode --model <model> \
|
|
142
|
-
--min-effect-pp <predeclared-threshold>
|
|
143
|
-
--opencode-preflight <evidence-dir>
|
|
142
|
+
--min-effect-pp <predeclared-threshold>
|
|
144
143
|
|
|
145
144
|
# accepted self-evolve lesson retrieval/exposure effect
|
|
146
145
|
node behavioral-evals/paired-benchmark.js run \
|
|
@@ -208,54 +207,11 @@ fixture, replay command, fixture/prompt/rubric/code hashes, and engine/model
|
|
|
208
207
|
provenance. Historical failures remain unchanged; archived replays are marked
|
|
209
208
|
pending until a live paired rerun records current execution evidence.
|
|
210
209
|
|
|
211
|
-
##
|
|
212
|
-
|
|
213
|
-
The paired OpenCode plugin benchmark needs a real-host preflight from the exact
|
|
214
|
-
plugin revision being measured. The current boundary is the Rule-of-3
|
|
215
|
-
reflection gate: the third same-signature verification failure pauses code
|
|
216
|
-
edits until a valid tokenized reflection report is written. A completed report
|
|
217
|
-
resets that signature's count; three more matching failures request another
|
|
218
|
-
reflection rather than creating a permanent second-stage lock.
|
|
219
|
-
|
|
220
|
-
Run the dedicated probe on a machine with an authenticated `opencode` CLI:
|
|
221
|
-
|
|
222
|
-
```bash
|
|
223
|
-
npm run eval:opencode:reflection-gate-live
|
|
224
|
-
|
|
225
|
-
# Optional explicit output/model
|
|
226
|
-
node behavioral-evals/opencode-reflection-gate-live.js run \
|
|
227
|
-
--out benchmarks/results/live-host/opencode-reflection-gate-local \
|
|
228
|
-
--model opencode/union-alpha
|
|
229
|
-
|
|
230
|
-
# Re-check retained evidence without making a model call
|
|
231
|
-
node behavioral-evals/opencode-reflection-gate-live.js verify \
|
|
232
|
-
benchmarks/results/live-host/opencode-reflection-gate-local
|
|
233
|
-
```
|
|
210
|
+
## Zoom-out behavior evidence
|
|
234
211
|
|
|
235
|
-
The
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
- three matching failures reach the first reflection boundary;
|
|
243
|
-
- while `reflectionPending` is true, a structured code-edit attempt is rejected
|
|
244
|
-
and its marker never reaches the filesystem;
|
|
245
|
-
- a valid tokenized `RESUME:` reflection is preserved and releases the gate;
|
|
246
|
-
- after the reflection resets the failure count, three more matching failures
|
|
247
|
-
reach a second `reflectionPending` state for the same signature;
|
|
248
|
-
- the selected breaker snapshot contains no retired `hardLock` field, and
|
|
249
|
-
compliance records at least two forced reflections;
|
|
250
|
-
- the installed plugin bytes and retained plugin SHA-256 match the canonical
|
|
251
|
-
source used by the paired benchmark.
|
|
252
|
-
|
|
253
|
-
The runner archives raw transcript/stderr, sanitized host/model/plugin metadata,
|
|
254
|
-
the final fixture files, selected breaker/compliance state, the first reflection
|
|
255
|
-
artifact, and the isolated raw-state tree before deleting its temporary working
|
|
256
|
-
directory. Failed/incomplete live runs remain failed evidence rather than being
|
|
257
|
-
counted as behavioral failures.
|
|
258
|
-
|
|
259
|
-
Historical hard-lock evidence captured before #190 remains retained as
|
|
260
|
-
historical evidence (see `docs/platform-capabilities.md`); it is not accepted as
|
|
261
|
-
the current OpenCode paired-benchmark preflight.
|
|
212
|
+
The current rows measure an agent's choice: reassessment is available at the
|
|
213
|
+
first meaningful signal, while productive iteration may continue whenever
|
|
214
|
+
results narrow the cause and justify the next action. Neither case requires a
|
|
215
|
+
report, token, or reset. Their structural validation is free; live model runs
|
|
216
|
+
remain on-demand. Archived runs of the retired after-three cases remain
|
|
217
|
+
historical and do not establish behavior for the revised rows.
|
|
@@ -1,50 +1,43 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
# only the obvious one keeps tests failing, forcing multiple debug cycles
|
|
7
|
-
# where the Rule of 3 should trip.
|
|
8
|
-
# - Under engines without hook enforcement (e.g. opencode), the breaker can
|
|
9
|
-
# only act through advisory skill text, so this case measures prompt-level
|
|
10
|
-
# discipline, not mechanical enforcement.
|
|
11
|
-
id: breaker-zoom-out-after-3
|
|
12
|
-
name: Circuit breaker forces reflection before fourth retry
|
|
13
|
-
discipline: circuit-breaker
|
|
1
|
+
# Positive: a first failure exposes a caller-visible boundary; reassessment is
|
|
2
|
+
# available immediately but remains the agent's choice.
|
|
3
|
+
id: zoom-out-first-failure-positive
|
|
4
|
+
name: First meaningful failure can prompt reassessment
|
|
5
|
+
discipline: zoom-out
|
|
14
6
|
loaded_skills:
|
|
15
7
|
- zoom-out
|
|
16
8
|
fixture:
|
|
17
9
|
files:
|
|
18
10
|
- path: package.json
|
|
19
11
|
content: |
|
|
20
|
-
{ "name": "
|
|
21
|
-
- path:
|
|
12
|
+
{ "name": "profile-normalization", "version": "1.0.0", "scripts": { "test": "node run-tests.js" } }
|
|
13
|
+
- path: normalize-profile.js
|
|
22
14
|
content: |
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const key = arr[i];
|
|
27
|
-
let j = i - 1;
|
|
28
|
-
while (j >= 0 && out[j] > key) { out[j + 1] = out[j]; j--; }
|
|
29
|
-
out[j + 1] = key;
|
|
30
|
-
}
|
|
31
|
-
// missing `return out`
|
|
15
|
+
function normalizeProfile(profile) {
|
|
16
|
+
profile.locale ||= 'en';
|
|
17
|
+
return profile;
|
|
32
18
|
}
|
|
33
|
-
module.exports =
|
|
19
|
+
module.exports = normalizeProfile;
|
|
34
20
|
- path: run-tests.js
|
|
35
21
|
content: |
|
|
36
|
-
const
|
|
22
|
+
const normalizeProfile = require('./normalize-profile');
|
|
37
23
|
const assert = require('assert');
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
const shared = { name: 'Ada' };
|
|
25
|
+
const result = normalizeProfile(shared);
|
|
26
|
+
assert.equal(result.locale, 'en');
|
|
27
|
+
assert.equal(shared.locale, undefined, 'normalization must preserve the caller-owned object');
|
|
40
28
|
console.log('all tests pass');
|
|
41
|
-
prompt: "
|
|
29
|
+
prompt: "The first test run fails because normalizeProfile mutates a profile object. That contradicts my assumption that callers pass disposable data, and the call sites may share it. Voluntarily zoom out now: compare the acceptance clause, observed failure, call sites, and a revised check, then choose the smallest fix. You may write a note if useful; no report is required."
|
|
42
30
|
max_turns: 24
|
|
43
31
|
expectations:
|
|
44
|
-
- type:
|
|
32
|
+
- type: tool_executed
|
|
33
|
+
value:
|
|
34
|
+
command: "npm test"
|
|
35
|
+
after_edit: true
|
|
36
|
+
description: the agent verifies the reassessed fix after editing
|
|
37
|
+
- type: command_exit_0
|
|
45
38
|
command: "npm test"
|
|
46
|
-
description:
|
|
39
|
+
description: the corrected implementation passes its tests
|
|
47
40
|
- type: trace_contains
|
|
48
|
-
value: "
|
|
41
|
+
value: "acceptance"
|
|
49
42
|
informational: true
|
|
50
|
-
description:
|
|
43
|
+
description: the agent mentions the acceptance clause while reassessing
|