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.
Files changed (179) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/AGENTS.md +1 -1
  4. package/BENCHMARK_SOP.md +2 -2
  5. package/CHANGELOG.md +26 -0
  6. package/README.md +15 -16
  7. package/SECURITY.md +1 -1
  8. package/VERIFICATION.md +4 -8
  9. package/behavioral-evals/PAIRED-BENCHMARK.md +12 -27
  10. package/behavioral-evals/README.md +21 -65
  11. package/behavioral-evals/cases/breaker-zoom-out-after-3.yaml +26 -33
  12. package/behavioral-evals/cases/pressure-sunk-cost-retry.yaml +15 -17
  13. package/behavioral-evals/paired-benchmark.js +3 -40
  14. package/behavioral-evals/run.js +2 -3
  15. package/ci/fixtures/468-dispatch/runner.js +144 -0
  16. package/ci/fixtures/doc-obligations/reconciliation-s2b/wiring/legacy-off-golden.json +0 -6
  17. package/ci/invariant-routing.test.js +26 -5
  18. package/ci/lib/opencode-verification-loader.js +3 -5
  19. package/ci/mechanism-2a-rule-of-3.test.js +111 -97
  20. package/ci/mechanism-2n-opencode-plugin.test.js +68 -206
  21. package/ci/mechanism-2p-opencode-v2-entrypoint.test.js +47 -28
  22. package/ci/mechanism-2w-platform-compatibility.test.js +1 -0
  23. package/ci/mechanism-32-paired-benchmark.test.js +1 -2
  24. package/ci/mechanism-33-issues-205-207.test.js +1 -1
  25. package/ci/mechanism-338-opencode-async.test.js +18 -49
  26. package/ci/mechanism-36-verify-timeout.test.js +3 -189
  27. package/ci/mechanism-39-opencode-verify-outcomes.test.js +56 -323
  28. package/ci/mechanism-397-opencode-observations.test.js +6 -7
  29. package/ci/mechanism-468-dispatch-cli.test.js +546 -0
  30. package/ci/mechanism-codex-hook-results.test.js +9 -5
  31. package/ci/mechanism-error-handling-map.test.js +14 -12
  32. package/ci/mechanism-prb-outline-review.test.js +1 -13
  33. package/ci/mechanism-system-one-router.test.js +1 -1
  34. package/ci/openai-plugin-package.test.js +30 -7
  35. package/ci/openai-plugin-runtime.test.js +64 -32
  36. package/ci/prompt-contract-regressions.test.js +1 -5
  37. package/ci/self-evolve-loop.test.js +51 -51
  38. package/ci/workflow-execution-contract.test.js +3 -6
  39. package/docker-verify.sh +1 -117
  40. package/docs/architecture.md +9 -7
  41. package/docs/document-lifecycle.md +1 -1
  42. package/docs/enforcement-locks.md +12 -10
  43. package/docs/error-handling/README.md +3 -3
  44. package/docs/error-handling/actions/c8-action-map.md +41 -0
  45. package/docs/error-handling/details/c8-dispatch-cli.md +75 -0
  46. package/docs/error-handling/nodes.yaml +5 -0
  47. package/docs/error-handling/registry.md +4 -1
  48. package/docs/mechanism-first-skill-mesh.md +2 -2
  49. package/docs/openai-plugin.md +3 -3
  50. package/docs/philosophy.md +1 -1
  51. package/docs/platform-capabilities.md +2 -2
  52. package/docs/platform-compatibility.json +2 -2
  53. package/docs/reflection.md +1 -1
  54. package/docs/routing.md +2 -2
  55. package/docs/system-one-suggestion-gates.md +4 -4
  56. package/docs/troubleshooting.md +9 -35
  57. package/docs/workflow-runtime.md +19 -18
  58. package/docs/workflows/environment-detection.md +11 -9
  59. package/docs/workflows/fable-discipline.md +6 -5
  60. package/docs/workflows/fable-mode.md +6 -5
  61. package/docs/workflows/harness-everything.md +5 -5
  62. package/docs/workflows/improve-codebase-architecture.md +10 -8
  63. package/docs/workflows/install-cognitive-os.md +5 -5
  64. package/docs/workflows/tdd.md +9 -9
  65. package/docs/workflows/zoom-out.md +20 -30
  66. package/environment-detection/SKILL.md +2 -2
  67. package/environment-detection/references/shell-syntax-rules.md +1 -1
  68. package/eval-harness/SKILL.md +1 -1
  69. package/eval-harness/references/scoring-rubric.md +3 -3
  70. package/evals/zoom-out/eval.yaml +2 -2
  71. package/evals/zoom-out/tasks/negative-productive-iteration.yaml +15 -0
  72. package/evals/zoom-out/tasks/negative-trivial-edit.yaml +6 -6
  73. package/evals/zoom-out/tasks/positive-first-failure.yaml +15 -0
  74. package/evals/zoom-out/tasks/positive-repair-loop.yaml +1 -1
  75. package/fable-discipline/SKILL.md +3 -3
  76. package/fable-discipline/references/discipline-rules.md +1 -1
  77. package/fable-mode/SKILL.md +1 -1
  78. package/fable-mode/execution-guardrails/SKILL.md +2 -4
  79. package/fable-mode/execution-guardrails/references/guardrail-rules.md +3 -3
  80. package/fable-mode/fable-haiku/SKILL.md +1 -1
  81. package/fable-mode/fable-opus/SKILL.md +2 -2
  82. package/fable-mode/fable-sonnet/SKILL.md +1 -1
  83. package/fable-mode/references/execution-phases.md +2 -2
  84. package/harness-everything/SKILL.md +3 -3
  85. package/harness-everything/references/router-workflow-plan.md +2 -2
  86. package/harness-everything/references/skill-registry.md +2 -2
  87. package/harness-everything/references/triage-and-tiers.md +5 -5
  88. package/harness-everything/scripts/bootstrap.js +1 -26
  89. package/harness-everything/scripts/kernel-router-core.js +2 -3
  90. package/harness-everything/scripts/kernel-router.js +1 -1
  91. package/harness-everything/scripts/router-contract-core.js +1 -1
  92. package/harness-everything/scripts/routing-keywords.json +0 -2
  93. package/hooks/hooks.json +0 -33
  94. package/hooks/scripts/lib/harness-state.js +5 -6
  95. package/hooks/scripts/lib/learning-opportunity.js +3 -13
  96. package/hooks/scripts/openai-session-start.js +2 -4
  97. package/improve-codebase-architecture/SKILL.md +3 -3
  98. package/improve-codebase-architecture/guides/refactoring-workflow.md +5 -4
  99. package/install-cognitive-os/SKILL.md +3 -3
  100. package/opencode-plugin/README.md +12 -43
  101. package/opencode-plugin/index.mjs +21 -368
  102. package/opencode-plugin/plugin.json +1 -1
  103. package/package.json +2 -4
  104. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  105. package/plugins/harness-everything/hooks/hooks.json +0 -14
  106. package/plugins/harness-everything/hooks/scripts/lib/harness-state.js +5 -6
  107. package/plugins/harness-everything/hooks/scripts/lib/learning-opportunity.js +3 -13
  108. package/plugins/harness-everything/hooks/scripts/lib/workspace.js +2 -2
  109. package/plugins/harness-everything/hooks/scripts/openai-session-start.js +2 -4
  110. package/plugins/harness-everything/hooks/session-start.js +2 -4
  111. package/plugins/harness-everything/plugin.json +1 -1
  112. package/plugins/harness-everything/scripts/lib/advisory-text.js +2 -2
  113. package/plugins/harness-everything/scripts/lib/workspace.js +2 -2
  114. package/plugins/harness-everything/skills/environment-detection/SKILL.md +2 -2
  115. package/plugins/harness-everything/skills/environment-detection/references/shell-syntax-rules.md +1 -1
  116. package/plugins/harness-everything/skills/eval-harness/SKILL.md +1 -1
  117. package/plugins/harness-everything/skills/eval-harness/references/scoring-rubric.md +3 -3
  118. package/plugins/harness-everything/skills/fable-discipline/SKILL.md +3 -3
  119. package/plugins/harness-everything/skills/fable-discipline/references/discipline-rules.md +1 -1
  120. package/plugins/harness-everything/skills/fable-mode/SKILL.md +1 -1
  121. package/plugins/harness-everything/skills/fable-mode/execution-guardrails/SKILL.md +2 -4
  122. package/plugins/harness-everything/skills/fable-mode/execution-guardrails/references/guardrail-rules.md +3 -3
  123. package/plugins/harness-everything/skills/fable-mode/fable-haiku/SKILL.md +1 -1
  124. package/plugins/harness-everything/skills/fable-mode/fable-opus/SKILL.md +2 -2
  125. package/plugins/harness-everything/skills/fable-mode/fable-sonnet/SKILL.md +1 -1
  126. package/plugins/harness-everything/skills/fable-mode/references/execution-phases.md +2 -2
  127. package/plugins/harness-everything/skills/harness-everything/SKILL.md +3 -3
  128. package/plugins/harness-everything/skills/harness-everything/references/router-workflow-plan.md +2 -2
  129. package/plugins/harness-everything/skills/harness-everything/references/skill-registry.md +2 -2
  130. package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +5 -5
  131. package/plugins/harness-everything/skills/harness-everything/scripts/bootstrap.js +1 -26
  132. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +2 -3
  133. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +1 -1
  134. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +1 -1
  135. package/plugins/harness-everything/skills/harness-everything/scripts/routing-keywords.json +0 -2
  136. package/plugins/harness-everything/skills/improve-codebase-architecture/SKILL.md +3 -3
  137. package/plugins/harness-everything/skills/improve-codebase-architecture/guides/refactoring-workflow.md +5 -4
  138. package/plugins/harness-everything/skills/install-cognitive-os/SKILL.md +3 -3
  139. package/plugins/harness-everything/skills/self-evolve/SKILL.md +1 -1
  140. package/plugins/harness-everything/skills/self-evolve/references/memory-resolution.md +3 -3
  141. package/plugins/harness-everything/skills/self-evolve/schemas/lesson-candidate.schema.json +4 -1
  142. package/plugins/harness-everything/skills/self-evolve/scripts/lesson-candidate.js +1 -0
  143. package/plugins/harness-everything/skills/skill-creator/SKILL.md +1 -1
  144. package/plugins/harness-everything/skills/skill-creator/references/quality-checklist.md +1 -1
  145. package/plugins/harness-everything/skills/skill-creator/references/quality-principles.md +4 -4
  146. package/plugins/harness-everything/skills/tdd/SKILL.md +2 -2
  147. package/plugins/harness-everything/skills/tdd/references/core-discipline.md +3 -5
  148. package/plugins/harness-everything/skills/todo-driven-workflow/SKILL.md +2 -2
  149. package/plugins/harness-everything/skills/zoom-out/SKILL.md +14 -26
  150. package/plugins/harness-everything/skills/zoom-out/references/circuit-breaker.md +18 -62
  151. package/references/platform-advisory-template.md +3 -9
  152. package/sbom.cdx.json +7 -7
  153. package/scripts/dispatch.js +340 -0
  154. package/scripts/lib/advisory-text.js +2 -2
  155. package/scripts/lib/workspace.js +2 -2
  156. package/self-evolve/SKILL.md +1 -1
  157. package/self-evolve/references/memory-resolution.md +3 -3
  158. package/self-evolve/schemas/lesson-candidate.schema.json +4 -1
  159. package/self-evolve/scripts/lesson-candidate.js +1 -0
  160. package/skill-creator/SKILL.md +1 -1
  161. package/skill-creator/references/quality-checklist.md +1 -1
  162. package/skill-creator/references/quality-principles.md +4 -4
  163. package/submission/openai/test-cases.json +5 -5
  164. package/tdd/SKILL.md +2 -2
  165. package/tdd/references/core-discipline.md +3 -5
  166. package/todo-driven-workflow/SKILL.md +2 -2
  167. package/zoom-out/SKILL.md +14 -26
  168. package/zoom-out/references/circuit-breaker.md +18 -62
  169. package/behavioral-evals/opencode-hardlock-live.js +0 -17
  170. package/behavioral-evals/opencode-reflection-gate-live.js +0 -342
  171. package/ci/mechanism-31-opencode-hardlock-evidence.test.js +0 -82
  172. package/evals/zoom-out/tasks/negative-first-edge-case-review.yaml +0 -16
  173. package/evals/zoom-out/tasks/positive-repeated-failure.yaml +0 -15
  174. package/hooks/scripts/reset-circuit-breaker.js +0 -30
  175. package/hooks/scripts/rule-of-3-tracker.js +0 -165
  176. package/hooks/scripts/rule-of-3.js +0 -171
  177. package/plugins/harness-everything/hooks/scripts/reset-circuit-breaker.js +0 -30
  178. package/plugins/harness-everything/hooks/scripts/rule-of-3-tracker.js +0 -165
  179. package/plugins/harness-everything/hooks/scripts/rule-of-3.js +0 -171
@@ -17,7 +17,7 @@ The minimal kernel establishes:
17
17
  - a selected workflow topology as a semantic execution contract when task evidence supports one,
18
18
  - ordered requirement decomposition and step-scoped knowledge bindings,
19
19
  - objective evidence before completion,
20
- - bounded re-plan/recovery after repeated failure,
20
+ - agent-initiated reassessment when evidence warrants it, while productive work can continue,
21
21
  - explicit warnings/degraded/escape evidence instead of silent workflow deletion;
22
22
  - one mandatory user-visible Harness Status protocol for non-trivial work, independent of execution topology.
23
23
 
@@ -122,7 +122,7 @@ Harness aligns to each host's actual lifecycle/tool APIs. Shared skill text defi
122
122
 
123
123
  ### Runtime state vs. skill content
124
124
 
125
- Runtime state includes hook metadata, workflow lifecycle, circuit-breaker counters, handoff/verification evidence, and WAL-style session state. Skill content is independently discoverable and remains useful on instruction-only surfaces.
125
+ Runtime state includes hook metadata, workflow lifecycle, handoff/verification evidence, and WAL-style session state. Skill content is independently discoverable and remains useful on instruction-only surfaces.
126
126
 
127
127
  ### Claude Code — hook observation plus explicit safety boundaries
128
128
 
@@ -130,15 +130,15 @@ The installer configures native lifecycle hooks and project skills.
130
130
 
131
131
  - `SessionStart`: bootstrap/restoration.
132
132
  - `UserPromptSubmit`: kernel routing + semantic workflow contract.
133
- - `PreToolUse`: workflow/boundary/depth/scope reminders (all advisory, fail-open), plus the separate `action-gate.js` permission boundary and the Rule-of-3 same-signature-failure boundary.
134
- - `PostToolUse`: outcomes, state, repeated-failure evidence, stage checks.
133
+ - `PreToolUse`: workflow/boundary/depth/scope reminders (all advisory, fail-open), plus the separate `action-gate.js` permission boundary.
134
+ - `PostToolUse`: outcomes, state, stage checks.
135
135
  - `Stop`: action-gate audit plus non-blocking workflow/verification reminders.
136
136
 
137
- Cognitive workflow contracts (boundary/depth/scope/commit/workflow guards) are made observable, not hard-enforced — [#190](https://github.com/dyphn1/Harness-everything/issues/190) downgraded their `exit(2)` blocking to reminders. `action-gate.js` and the Rule-of-3 zoom-out boundary are the two mechanisms that still hard-block on this hook path; #190 explicitly scoped both out of that downgrade as user/host permission and dangerous-action safety boundaries.
137
+ Cognitive workflow contracts (boundary/depth/scope/commit/workflow guards) are made observable, not hard-enforced — [#190](https://github.com/dyphn1/Harness-everything/issues/190) downgraded their `exit(2)` blocking to reminders. `action-gate.js` remains the explicit user/host permission and dangerous-action safety boundary. The former Rule-of-3 counter and forced zoom-out path are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394).
138
138
 
139
139
  ### OpenCode — plugin enforcement, scoped live verification
140
140
 
141
- The retained [OpenCode evidence](../benchmarks/results/live-host/opencode-2026-09-16/README.md) supports **project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS)**. The final snapshot is **post-reset**. Hard-lock is an **interactive observation** with **no retained blocked-tool trace**; reflection was **operator-seeded** and then agent-rewritten. Global scope, npm-package installation, and other OpenCode versions remain unverified.
141
+ The retained [OpenCode evidence](../benchmarks/results/live-host/opencode-2026-09-16/README.md) supports **project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS)**. The final snapshot is **post-reset**. The old hard-lock was an **interactive observation** with **no retained blocked-tool trace**; reflection was **operator-seeded** and then agent-rewritten. The former third-failure reflection and hard-lock paths are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394); the snapshot does not establish current host behavior. Global scope, npm-package installation, and other OpenCode versions remain unverified.
142
142
 
143
143
  This evidence predates #190 and does not establish behavioral effectiveness of the current contract-first lifecycle.
144
144
 
@@ -200,7 +200,9 @@ flowchart LR
200
200
  Y --> S[Summarize]
201
201
  S --> R[Record]
202
202
  S -- insufficient evidence --> T
203
- Y -- same failure x3 --> Z[Zoom Out]
203
+ Y --> A{Would reassessment improve the next step?}
204
+ A -->|yes; agent chooses| Z[Agent-initiated Zoom Out]
205
+ A -->|no; next check is justified| Y
204
206
  Z --> T
205
207
  ```
206
208
 
@@ -58,7 +58,7 @@ default-OFF gate, and F4 (#358) adds limited positive credit for `doc-lint` and
58
58
  - **Minimum trusted producer (3b deliverable):** Phase 3b ships the pilot-local adapter that derives the VCS baseline and candidate identity, active task scope, parsed config bytes (`configDigest` bound rather than presence-checked), PRD root, execution/verification provenance and independent reviewer identity from host state (see *Phase 3b minimum trust boundary* below). `checkDocObligations()` only proves agreement with caller-supplied values; without this producer, a 3b PASS would promote caller-attested claims. Any input the producer cannot establish stays `unknown`/`unavailable` and MUST NOT pass. Phase 3c broadens adversarial H3 validation and adds paired architectural evaluation; it does not supply the minimum producer.
59
59
  - **Pilot topology and unsupported paths:** the pilot is limited to non-Fable typed-step workflows (`stepBindingsEnabled === true`, set when typed steps exist and the strategy is not `fable-*`). Fable stage-contract paths (`fable-staged`, `fable-parallel`, `fable-multi-agent-workspace`) and workflows without the typed-step contract are explicitly **not integrated / unavailable** for doc-MUST reconciliation: a `stage-binding` disposition is never doc verification, and no fallback may mark a doc MUST satisfied. Unsupported paths report that state rather than silently passing.
60
60
  - **Negative acceptance case:** for a doc-governed typed plan whose applicable MUST is failing or unknown, no boundary may report PASS: `step --disposition pass` on the verification step, `obligation --obligation-id execute|verify --disposition pass --evidence 'done'`, and final completion must all fail closed, report the unsatisfied obligation ids, and leave aggregate `verify` pending. A loaded skill plus free-text evidence is not verification. A RED fixture covers ordered `doc-change → review → verification` with reviewer/command evidence missing first and valid later: the authored `doc-change` step advances, aggregate/final PASS stays blocked until the later evidence satisfies the MUST, and neither a premature PASS nor a deadlock occurs.
61
- - **Compatibility:** preserve existing non-document step bindings, authorization/Rule-of-3 semantics, old persisted plans and no new Stop/tool lock. Source and installed plugin copies must behave consistently.
61
+ - **Compatibility:** preserve existing non-document step bindings, authorization and safety boundaries, old persisted plans and no new Stop/tool lock. The former Rule-of-3 counter and forced-reflection path are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394). Source and installed plugin copies must behave consistently.
62
62
  - **Pre-integration work:** the baseline-bound tombstone/rename-pair evidence required by #335 shipped in #342; the remaining pre-integration work is the reconciliation contract above. #331 / draft PR #333 is a parallel host-config safety correction; neither requires the broad #320 migration.
63
63
 
64
64
  ### Phase 3c — architecture promotion gate for #320 (planned, not shipped)
@@ -16,20 +16,22 @@ Harness deliberately separates **semantic obligation strength** from **mechanica
16
16
  | Subagent declared scope / unexpected writes | **MUST** respect and reconcile | Report ambiguous/out-of-scope changes | No |
17
17
  | Commit scope | Staged diff review **MUST**; split unrelated concerns **SHOULD** | Atomic-commit reminder | No |
18
18
  | Fable stage/check/synthesis/verifier | **MUST** when selected | Record pass/fail/ambiguity/dependency evidence and remind | No |
19
- | Rule of 3 | Third matching failure **MUST** trigger zoom-out | Pause mutation until reflection | **Yes — intentional cognitive boundary** |
19
+ | Zoom-out reassessment | **MAY** reassess at the first meaningful signal or later; productive iteration may continue when attempts add evidence or narrow the cause | Agent-directed guidance | No |
20
20
  | Action/permission gate | Approval **MUST** precede governed side effects | Host/user authorization | **Yes — trust boundary** |
21
21
 
22
- ## Rule of 3
22
+ ## Voluntary reassessment
23
23
 
24
- ```text
25
- same signature #1 -> record
26
- same signature #2 -> record
27
- same signature #3 -> pause mutation and require zoom-out
28
- reflection accepted -> count resets
29
- later #1/#2/#3 -> another zoom-out
24
+ ```mermaid
25
+ flowchart TD
26
+ Signal["First meaningful signal or later"] --> Decide{"Would reassessment improve the next step?"}
27
+ Decide -->|Yes| Review["Revisit goal, assumptions, and evidence"]
28
+ Decide -->|No| Continue["Continue with a justified next check"]
29
+ Review --> Continue
30
30
  ```
31
31
 
32
- There are no category-specific 2/4 thresholds and no second-stage permanent hard lock.
32
+ An agent may reassess at the first meaningful signal or later. A run may
33
+ continue when attempts add evidence, narrow the cause, and justify the next
34
+ check. Neither a failure count nor review history forces a pause.
33
35
 
34
36
  ## Workflow reminders
35
37
 
@@ -50,6 +52,6 @@ The design test is simple:
50
52
  When a Harness message appears:
51
53
 
52
54
  1. If it is a **Reminder**, use the evidence to improve the next action, but there is no Harness reset needed.
53
- 2. If it is the **Rule of 3** third-failure boundary, complete the requested zoom-out report.
55
+ 2. If evidence suggests a fresh diagnosis would improve the next step, an agent may choose zoom-out; productive iteration may continue when attempts add evidence or narrow the cause.
54
56
  3. If it is an **action/permission** decision, follow the host/user approval flow.
55
57
  4. Do not edit Harness state files merely to recover from a numeric workflow limit; those limits are no longer enforced.
@@ -10,7 +10,7 @@ An Overview contains **three distinct views**. Their responsibilities must not b
10
10
  | **2. System architecture / composition** | Explain how Actions, sub-activities and existing capabilities fit together | Process grouping, owner/reviewer authority, reuse of existing ledger and delivery |
11
11
  | **3. Action Flowchart / Timeline** | Explain how one Action actually works | Inputs, decisions, outcomes, and handoff to the next Action |
12
12
 
13
- **Cross-view convention:** **ASSESS** and **RESPOND** group the same Actions in Views 1 and 2; Action **D · Decide disposition** is expanded in View 3. Node IDs are local to each diagram, and A–G are drawing-local aliases, not persistent identifiers. The seven Action IDs in `nodes.yaml` remain the only proposed persistent identities.
13
+ **Cross-view convention:** **ASSESS** and **RESPOND** group the same Actions in Views 1 and 2; Action **D · Decide disposition** is expanded in View 3. Node IDs are local to each diagram, and A–G are drawing-local aliases, not persistent identifiers. H records the subordinate C8 dispatcher under **E · Treat**; it adds no View 1 flow edge. The seven View 1 identities remain the only top-level process actions.
14
14
 
15
15
  ## Final P2 decisions — preserve tested diagrams, use lightweight references
16
16
 
@@ -224,9 +224,9 @@ flowchart TD
224
224
 
225
225
  Inputs: an identified error class, evidence, current step, and budget. Output: the selected treatment direction (Converge / Avoid / owner-approved Tolerate) or unresolved decision. `Treat` owns the actual intervention and predeclared acceptance conditions; `Decide` does not silently implement fixes.
226
226
 
227
- ## Action identity prototype (unchanged)
227
+ ## Action identity prototype
228
228
 
229
- See [nodes.yaml](./nodes.yaml) for the same seven identities as in the initial branch commit. **No existing identifier or name is regenerated by redrawing the diagrams.**
229
+ See [nodes.yaml](./nodes.yaml) for the seven View 1 identities and H, the subordinate C8 dispatch identity under E · Treat. **No existing identifier or name is regenerated by redrawing the diagrams.**
230
230
 
231
231
  - `identifier`: `ERR-YYYYMMDD-UUIDv4` (category at creation / creation date / UUID). Immutable once accepted; GUID supplies collision resistance; date and category are descriptive, not each a uniqueness guarantee.
232
232
  - `name`: separate human/agent-readable meaning; the diagrams show this instead of UUIDs.
@@ -0,0 +1,41 @@
1
+ # C8 — Level 2 Action Map (single-run dispatch)
2
+
3
+ > **Implemented coordinator CLI; not a shared launcher.** C8 is a supporting identity under E · Treat. It adds no Level 1 branch, hook, or distributed plugin command. The [Level 3 contract](../details/c8-dispatch-cli.md) owns concrete options and return codes.
4
+
5
+ One invocation selects one runner and model, checks readiness, executes once, and validates fresh delivery.
6
+
7
+ ```mermaid
8
+ flowchart TD
9
+ INPUT["Coordinator supplies runner, model, packet, worktree, scratch and report"] --> VALID{"Inputs valid?"}
10
+ VALID -->|"no"| REFUSE["10 INVALID_INPUT / 11 UNSAFE_SCRATCH"]
11
+ VALID -->|"yes"| READY["Probe the selected runner"]
12
+ READY --> READY_RESULT{"Readiness result?"}
13
+ READY_RESULT -->|"provider throttling"| RATE_LIMITED["13 RUNNER_RATE_LIMITED; no run"]
14
+ READY_RESULT -->|"explicit usage or quota exhaustion"| QUOTA["13 RUNNER_QUOTA; no run"]
15
+ READY_RESULT -->|"missing, other failure, timed out or no READY"| NOT_READY["12 NOT_READY; no run"]
16
+ READY_RESULT -->|"READY"| RUN["Execute once; no retry or fallback"]
17
+ RUN --> RUN_RESULT{"Execution result?"}
18
+ RUN_RESULT -->|"failure or timeout"| RUN_FAILED["15 RUN_FAILED / RUN_TIMEOUT"]
19
+ RUN_RESULT -->|"success"| REPORT{"Fresh report validates?"}
20
+ REPORT -->|"no"| INVALID["16 REPORT_INVALID"]
21
+ REPORT -->|"valid BLOCKED"| BLOCKED["17 WORKER_BLOCKED; preserve reason"]
22
+ REPORT -->|"valid DONE"| DONE["0 DONE"]
23
+ ```
24
+
25
+ ## Coordinator behavior
26
+
27
+ - Choose the runner and its model explicitly. A throttling result says “Reduce concurrency on the affected key or retry later.” A quota result says “Select an authorized runner or model with available quota.” The CLI never switches runners or retries.
28
+ - Other readiness failures return `12 NOT_READY` with “Readiness failed. Keep the available child evidence.” and start no execution.
29
+ - Keep packet and worktree selection with the coordinator. Scratch must be absolute and outside every Git repository or worktree, including linked worktrees and symlinked ancestors.
30
+ - Use `--dry-run` to validate and inspect the planned argv and cwd. It starts no child and creates no scratch or report.
31
+ - Treat readiness, execution, and report validation as separate outcomes. A zero runner exit does not create a DONE report.
32
+ - Codex raw output goes through the report writer. The writer strips a valid terminal host label and checks the final report. OpenCode must create a fresh report that passes the same check.
33
+ - Deliver logs and raw Codex output for failed attempts. Do not present an unvalidated OpenCode file as a completed report.
34
+
35
+ ## Evidence boundary
36
+
37
+ The OpenCode ANSI `Error:` stderr envelope and exit 1 are live-traced. The provider 429 body is from the retained OpenCode log, and a live 429 reproduction remains unchecked. OpenCode usage/quota cause text is also retained log evidence. Codex classification rows are fixture-only; no live Codex 429 or usage-limit trace is claimed.
38
+
39
+ ## Boundary
40
+
41
+ This single-run CLI does not select scratch automatically, manage its lifecycle, enforce launch-path policy, reserve or cap provider keys, or reject packets that need worker `gh`/network access. Those guarantees belong to #466. No live provider run or packaged plugin command is claimed here.
@@ -0,0 +1,75 @@
1
+ # C8 — Level 3 single-run dispatch CLI contract
2
+
3
+ This detail implements the C8 action map for one coordinator-selected runner attempt. It does not provide launcher policy or a live provider integration.
4
+
5
+ ## Invocation
6
+
7
+ ```sh
8
+ npm run --silent dispatch -- --runner <codex|opencode> --model <id> \
9
+ --packet <path> --worktree <git-root> --scratch <absolute-external-path> \
10
+ --report <path> [--dry-run] [--json]
11
+ ```
12
+
13
+ `node scripts/dispatch.js` accepts the same options. `--help` prints this short synopsis. The coordinator supplies every value; packet and report paths may be relative to the worktree or absolute. The worktree must be an existing Git root. Scratch must be absolute and outside every Git repository/worktree. A pre-existing report path is rejected as invalid input.
14
+
15
+ | Option | Meaning |
16
+ | --- | --- |
17
+ | `--runner` | Required explicit selection: `codex` or `opencode`. |
18
+ | `--model` | Required model id for that runner. |
19
+ | `--packet` | Required existing packet file, resolved from the worktree when relative. |
20
+ | `--worktree` | Required existing Git repository or worktree root; child cwd. |
21
+ | `--scratch` | Required absolute path outside all Git repository/worktree roots; child `TMPDIR`. |
22
+ | `--report` | Required fresh report path, resolved from the worktree when relative. |
23
+ | `--dry-run` | Validate inputs and return planned argv/cwd; no child or filesystem writes. |
24
+ | `--json` | Return one JSON object on stdout, including refusals. |
25
+ | `--help` | Return the short usage synopsis with exit 0. |
26
+
27
+ In JSON mode the common shape is `{ok, code, phase, message}` with resolved `runner`, `model`, and existing `evidence` paths when available. Dry run also returns `argv` and `cwd`; Codex's generated raw-output argument uses a `<run-id>` placeholder. Human-mode refusals go to stderr. Child logs and raw output stay in evidence files, not in the JSON result.
28
+
29
+ ## Exit and JSON codes
30
+
31
+ | Exit | JSON `code` | Meaning |
32
+ | --- | --- | --- |
33
+ | `0` | `HELP`, `DRY_RUN_OK`, `DONE` | Help, validated dry run, or a fresh validated DONE report. |
34
+ | `1` | `INTERNAL_ERROR` | Unexpected application failure outside a named phase result. |
35
+ | `10` | `INVALID_INPUT` | Bad/missing option, runner/model, packet/worktree, or a report path that already exists. |
36
+ | `11` | `UNSAFE_SCRATCH` | Scratch is relative, an existing scratch path is not a directory, or it is inside a Git repository/worktree. |
37
+ | `12` | `NOT_READY` | Selected executable is missing or readiness failed, timed out, or omitted `READY`. No run starts. |
38
+ | `13` | `RUNNER_RATE_LIMITED` | The selected runner's failed readiness stderr has a recognized provider throttling diagnostic. No run starts. |
39
+ | `13` | `RUNNER_QUOTA` | The selected runner's failed readiness stderr has an explicit usage/quota exhaustion diagnostic. No run starts. |
40
+ | `15` | `RUN_FAILED`, `RUN_TIMEOUT` | Execution could not start, returned nonzero, timed out, or failed during execution. |
41
+ | `16` | `REPORT_INVALID` | Fresh raw/report input is missing, stale delivery appeared before execution, the writer rejected input, or final validation failed. |
42
+ | `17` | `WORKER_BLOCKED` | A fresh report passed validation with terminal `STATUS: BLOCKED: <reason>`. The reason is retained. |
43
+
44
+ | Readiness code | Coordinator message |
45
+ | --- | --- |
46
+ | `RUNNER_RATE_LIMITED` | Reduce concurrency on the affected key or retry later. |
47
+ | `RUNNER_QUOTA` | Select an authorized runner or model with available quota. |
48
+ | `NOT_READY` | Readiness failed. Keep the available child evidence. |
49
+
50
+ ## Readiness classification and evidence
51
+
52
+ Classification requires a full runner-specific diagnostic line on the failed readiness child's stderr after ANSI stripping. Only a normal nonzero exit is eligible; zero exits, signals, timeouts, stdout, quoted text, a different envelope, and partial or bare `429` text do not receive provider credit. Everything else, including local/cache errors, invalid `--quota`, header timeout, or a missing/ambiguous diagnostic, returns `12 NOT_READY`. The JSON `code` distinguishes throttling from usage/quota exhaustion.
53
+
54
+ | Runner / outcome | Recognized stderr line | Evidence |
55
+ | --- | --- | --- |
56
+ | OpenCode provider rate limit | `Error: Provider request failed with HTTP 429: {"status":429,"title":"Too Many Requests"}` | The ANSI `Error:` stderr envelope and exit 1 are live-traced. The 429 body is from the retained OpenCode log; a live 429 reproduction remains unchecked. |
57
+ | OpenCode usage/quota exhaustion | `Error: Free usage limit reached. Free models work in OpenCode (https://opencode.ai); subscribe to OpenCode Go to keep going: https://opencode.ai/go` | The stderr envelope is live-traced; the cause is from the retained OpenCode log. |
58
+ | Codex provider rate limit | `ERROR: Provider request failed with HTTP 429: {"status":429,"title":"Too Many Requests"}` | Fixture-only; no retained live Codex 429 trace. |
59
+ | Codex usage/quota exhaustion | `ERROR: Free usage limit reached. Free models work in OpenCode (https://opencode.ai); subscribe to OpenCode Go to keep going: https://opencode.ai/go` | Fixture-only; no retained live Codex usage-limit trace. |
60
+
61
+ Each invocation uses one selected runner and one readiness attempt. A `12` or `13` refusal starts no execution, report writer, fallback, or retry; available child evidence remains available to the coordinator.
62
+
63
+ Codex writes raw output with `codex exec -o`; it must contain an explicit terminal DONE or BLOCKED status. `report-writer --from-codex-output` strips an optional valid terminal host label, writes the final report, and `report-writer check` validates it. OpenCode is asked to write the report path directly; the path must remain absent through readiness and the resulting file must pass `report-writer check`. A valid BLOCKED report returns 17. Failed execution returns 15 and preserves its logs/raw output; it may have changed the worktree.
64
+
65
+ ## Evidence boundary
66
+
67
+ | Layer | What it establishes | What it does not establish |
68
+ | --- | --- | --- |
69
+ | Fixture | The real Node entry with stubbed child runners exercises argv, cwd, closed stdin, readiness, quota, timeout, fresh delivery, report writing/checking, and exit/JSON outcomes. | No real provider behavior or live host behavior. |
70
+ | Checkout/package entry | The npm script invokes the checked-in entry, and documented options work through that entry; named repository gates validate local consistency and portability. | No installed npm tarball or distributed plugin integration. |
71
+ | Live (channel probe only) | `opencode run --auto -m <model>`, the exact C8 OpenCode readiness argv, against failing nvidia models on OpenCode 2.1.4 (2026-11-21): provider errors reach stderr as one ANSI `Error: <message>` line, exit 1, empty stdout. | Not a C8 dispatch: no live 429 or quota reproduction (the 429 and quota bodies come from the retained OpenCode log), no Codex provider call, no host dispatch or live report delivery. |
72
+
73
+ ## #466 boundary
74
+
75
+ #466 owns automatic `TMPDIR` selection and lifecycle, enforcement across launch paths, per-key admission/reservation, and refusing packets that declare worker `gh`/network needs. This CLI accepts coordinator-supplied inputs for one attempt and cannot certify those launcher guarantees. It also does not add a distributed plugin command or run a live provider.
@@ -1,5 +1,6 @@
1
1
  # Canonical Action identity source for the Error Handling map (#437 concept, #402 implementation).
2
2
  # A-G are drawing-local aliases, NOT identity or ordered numbering.
3
+ # H is the subordinate C8 dispatch identity under E · Treat; it adds no View 1 flow edge.
3
4
  # IDs use creation category/date/UUIDv4 and never change. Names can change independently.
4
5
  # status: proposed | accepted | retired.
5
6
  # links: Action-to-Action control flow of View 1 in README.md, where the path between the two
@@ -35,6 +36,10 @@ actions:
35
36
  identifier: ERR-20261112-5f7496e6-5e1a-4628-b818-5292dd011580
36
37
  name: Accept and retire
37
38
  status: proposed
39
+ H:
40
+ identifier: ERR-20261120-333c36f7-24f5-4523-b604-7be7981728e1
41
+ name: "One-shot runner dispatch"
42
+ status: proposed
38
43
  links:
39
44
  - { from: A, to: B }
40
45
  - { from: B, to: C }
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Identity source — reuse the existing Action table
8
8
 
9
- The [Action identity registry](./nodes.yaml) is the only proposed source for the seven existing Action identities. Their UUIDs and names are **not copied into this file**, so edits to Action identity do not require changing two registries. A–G are drawing-local aliases, never global identifiers.
9
+ The [Action identity registry](./nodes.yaml) is the only proposed source for the seven View 1 Action identities and the subordinate C8 dispatch identity H. Their UUIDs and names are **not copied into this file**, so edits to Action identity do not require changing two registries. A–G remain the View 1 drawing aliases; H adds no Level 1 flow edge.
10
10
 
11
11
  ## Table A — document registry (where to look)
12
12
 
@@ -31,6 +31,8 @@ The [Action identity registry](./nodes.yaml) is the only proposed source for the
31
31
  | `C6-template` | Template · packet briefing | [templates/packet-briefing.md](./templates/packet-briefing.md) | Copy per packet; every field filled or `N/A: <reason>` |
32
32
  | `C7-actions` | Level 2 · C7 write-set | [actions/c7-action-map.md](./actions/c7-action-map.md) | Did the slice stay inside its write-set |
33
33
  | `C7-detail` | Level 3 · C7 checker | [details/c7-write-set-check.md](./details/c7-write-set-check.md) | `scripts/check-packet-write-set.js`, run by the coordinator before accepting a slice |
34
+ | `C8-actions` | Level 2 · C8 single-run dispatch | [actions/c8-action-map.md](./actions/c8-action-map.md) | One coordinator-selected runner attempt and its outcomes |
35
+ | `C8-detail` | Level 3 · C8 CLI contract | [details/c8-dispatch-cli.md](./details/c8-dispatch-cli.md) | Invocation, exit/JSON behavior, evidence limits, and the #466 boundary |
34
36
 
35
37
  `Local reference` values are **table-local lookup keys only**, not new stable Action IDs, graph node identities, persistent state, or workflow instructions.
36
38
 
@@ -43,6 +45,7 @@ The [Action identity registry](./nodes.yaml) is the only proposed source for the
43
45
  | `E0002-actions` | `E0002-capture` | Detail supporting Capture / evidence | Read when raw evidence/provenance is required |
44
46
  | `E0002-actions` | `E0002-writer` | Detail supporting Treat / Report CLI | Read when producing or validating a report through the shipped W1 script |
45
47
  | `E0002-actions` | `E0002-ledger` | Existing class evidence / history | Read for Identify/history relevance; do not copy or reclassify the ledger |
48
+ | `C8-actions` | `C8-detail` | Concrete coordinator CLI contract | Read when invoking or verifying the single-run dispatch CLI |
46
49
 
47
50
  **Maintenance contract (lightweight):** when a document moves, update its **Table A path**; Table B continues to refer to the same local key. When a new Level 2 behavior block or Level 3 reference is added, add only the relevant row and reference. Removing an obsolete procedure removes its registry relationship without rewriting Level 1. **Do not re-encode Mermaid/PlantUML execution arrows as registry edges**: the source diagrams own flow semantics, while the tables own *navigation/lookup*.
48
51
 
@@ -105,7 +105,7 @@ For `fable-*` strategies, Fable owns stage lifecycle: `dependsOn`, `writeSet`, v
105
105
 
106
106
  ### Recovery Gate
107
107
 
108
- Rule-of-3 stops repeated same-signature micro-retries and requires a new diagnosis. Fable verification failures return to bounded re-planning; budget exhaustion becomes blocked instead of endless iteration.
108
+ Zoom-out is agent-initiated: an agent may reassess when evidence contradicts an assumption or reveals an unknown impact boundary, including on the first failure. Productive attempts may continue when they add evidence or narrow the cause. Fable verification failures return to bounded re-planning; budget exhaustion becomes blocked instead of endless iteration.
109
109
 
110
110
  ### Action Gate
111
111
 
@@ -153,7 +153,7 @@ Harness should not become:
153
153
  2. Put applicability/basic flow in `SKILL.md`; deep detail belongs in references.
154
154
  3. Add mechanisms when they make behavior more reliable than prose.
155
155
  4. Make checks failable and evidence-based.
156
- 5. Put gates at real transition boundaries: before mutation/side effects, after repeated failure, before completion, before persistence.
156
+ 5. Put checks at real transition boundaries: before mutation/side effects, when evidence warrants reassessment, before completion, before persistence.
157
157
  6. Let the model choose HOW inside the contract.
158
158
  7. Treat workflow escape as a measured coverage gap, not convenience.
159
159
 
@@ -17,9 +17,9 @@ flowchart TD
17
17
  Q --> V{Objective evidence?}
18
18
  V -->|yes| D[Evidence-backed completion]
19
19
  V -->|no| R[Diagnose and retry]
20
- R --> F{Same-signature failure x3?}
21
- F -->|no| E
22
- F -->|yes| Z[Zoom out / re-plan]
20
+ R --> F{Would reassessment improve the next step?}
21
+ F -->|no; next check is justified| E
22
+ F -->|yes; agent chooses| Z[Agent-initiated Zoom out]
23
23
  Z --> E
24
24
 
25
25
  S[SessionStart hook] --> C[Cognitive OS policy]
@@ -78,7 +78,7 @@ Relevant environment discovery is a conditional **MUST**: establish OS, shell, p
78
78
 
79
79
  ### 2. Guardrails — Lifecycle Boundaries
80
80
 
81
- Circuit breakers, action gates, workflow gates, scope guards, and completion gates protect specific transitions. They **SHOULD** remain narrow and evidence-driven. On integration surfaces that expose the required lifecycle/tool hooks, Harness can mechanically block supported violations; elsewhere the same contract is instruction-governed and must not be mislabeled hard enforcement.
81
+ Action gates, scope guards, and completion checks protect specific transitions. They **SHOULD** remain narrow and evidence-driven. Explicit user/host permission and safety boundaries can block supported operations; workflow and recovery guidance remains agent-directed. The former Rule-of-3 counter and forced-reflection path are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394).
82
82
 
83
83
  ### 3. Context Preservation — Progressive Disclosure
84
84
 
@@ -44,7 +44,7 @@ The workflow plan controller rejects present non-array required/optional binding
44
44
 
45
45
  The repository routing contract uses **step-scoped workflow selection**. Normalized keyword/domain signals help compose ordered requirements but never select or load document paths. Each step/stage declares its required and optional skill/reference bindings; only active bindings are disclosed, and required bindings resolve before the step/stage passes. Unknown or unavailable required bindings stay visible and unresolved; missing evidence produces reminders rather than a persistent workflow lock.
46
46
 
47
- This is a **repository/agent contract**, not an automatic upgrade to any platform row below. A hook can prove that the contract was injected and record an agent's binding disposition; neither proves that a live host actually loaded or followed the referenced content. Instruction-only surfaces can carry the same rule without mechanically enforcing it. Promoting behavior to live-host compliance requires retained host/session evidence under the #82 compatibility program. Claude and local OpenAI packages carry workflow entry/completion **reminders** plus separate Rule-of-3/permission boundaries, but this package/mechanism change does not upgrade `platform-compatibility.json` live-host status values. See [workflow runtime](workflow-runtime.md) for scope, worktree isolation, and failure behavior. OpenCode and instruction-only/public Skills-only surfaces do not acquire equivalent runtime gating. Shell inspection is not a filesystem sandbox; absent hooks, agent-writable state, and indirect script effects remain limits.
47
+ This is a **repository/agent contract**, not an automatic upgrade to any platform row below. A hook can prove that the contract was injected and record an agent's binding disposition; neither proves that a live host actually loaded or followed the referenced content. Instruction-only surfaces can carry the same rule without mechanically enforcing it. Promoting behavior to live-host compliance requires retained host/session evidence under the #82 compatibility program. Claude and local OpenAI packages carry workflow entry/completion **reminders** plus independent permission boundaries, but this package/mechanism change does not upgrade `platform-compatibility.json` live-host status values. See [workflow runtime](workflow-runtime.md) for scope, worktree isolation, and failure behavior. OpenCode and instruction-only/public Skills-only surfaces do not acquire equivalent runtime gating. Shell inspection is not a filesystem sandbox; absent hooks, agent-writable state, and indirect script effects remain limits.
48
48
 
49
49
  ### Action-gate mechanism vs. host semantic boundary
50
50
 
@@ -208,7 +208,7 @@ mechanism evidence only; no live-host hook-fire or mismatch-handling artifact
208
208
  exists. Retained
209
209
  evidence supports project-scope `.js` loading and edit/verification state on
210
210
  OpenCode 1.18.31 (macOS): [live-host evidence](../benchmarks/results/live-host/opencode-2026-09-16/README.md). The
211
- retained snapshot predates #190 and remains historical evidence only. Current OpenCode removes the permanent post-reflection hard lock; only the third-failure reflection boundary pauses edits. Reflection was operator-seeded, then agent-rewritten, so do not promote this into a behavioral-effectiveness claim. `.mjs` auto-discovery is broken on this host version (issue #127). npm-package installation and behavioral V2-hook fire remain unverified.
211
+ retained snapshot predates #190 and remains historical evidence only. The forced Rule-of-3 reflection gate has since been retired; current package and mechanism checks cover that retirement, but no post-retirement live-host run is preserved. The old reflection was operator-seeded, then agent-rewritten, so it proves no behavioral effect. `.mjs` auto-discovery is broken on this host version (issue #127). npm-package installation and behavioral V2-hook fire remain unverified.
212
212
 
213
213
  The plugin verification runner uses asynchronous child processes with a shared
214
214
  sequence budget and bounded streamed diagnostics. Deterministic mechanism
@@ -174,13 +174,13 @@
174
174
  "standaloneSkills": {"status": "Supported", "paths": {"project": [".opencode/skills", ".agents/skills", ".claude/skills"], "global": ["~/.config/opencode/skills", "~/.agents/skills", "~/.claude/skills"]}},
175
175
  "pluginSupport": {"status": "Partial", "paths": {"project": [".opencode/plugins"], "global": ["~/.config/opencode/plugins"]}, "notes": "Live verified scoped: project-scope install of the plugin copied under a .js filename loads on OpenCode 1.18.31 (macOS) and edit/verification state effects are retained (benchmarks/results/live-host/opencode-2026-09-16/README.md). The host discovery silently ignores .mjs install names (issue #127). Global scope and npm-package installation remain mechanism-only."},
176
176
  "bundledSkills": {"status": "Partial", "notes": "Harness provides a standalone enforcement module; it is not an OpenCode bundled-skill package."},
177
- "hooksLifecycle": {"status": "Partial", "notes": "Live-host evidence covers project-scope .js loading and edit/verification state (edit tracking, forced verification, breaker failure recording) on OpenCode 1.18.31 (macOS); hard lock is only an interactive observation with no retained blocked-tool trace and the final snapshot is post-reset (benchmarks/results/live-host/opencode-2026-09-16/README.md). Global scope, npm-package installation, and other host versions remain mechanism-tested."},
177
+ "hooksLifecycle": {"status": "Partial", "notes": "Historical live-host evidence covers project-scope .js loading and edit/verification state (including then-active breaker failure recording) on OpenCode 1.18.31 (macOS). That snapshot predates the Rule-of-3 retirement; current retirement coverage is package/mechanism evidence only, with no post-retirement live-host trace. Hard lock was only an interactive observation with no retained blocked-tool trace and the final snapshot is post-reset (benchmarks/results/live-host/opencode-2026-09-16/README.md). Global scope, npm-package installation, and other host versions remain mechanism-tested."},
178
178
  "projectScope": {"status": "Partial", "paths": {"skills": [".opencode/skills", ".agents/skills"], "plugins": [".opencode/plugins"]}, "notes": "Plugin loading at project scope and edit/verification state are live-verified via the retained host session artifact; standalone skill discovery remains path-contract verified."},
179
179
  "globalScope": {"status": "Mechanism verified", "paths": {"skills": ["~/.config/opencode/skills", "~/.agents/skills"], "plugins": ["~/.config/opencode/plugins"]}},
180
180
  "installUninstallSymmetry": {"status": "Unknown", "notes": "The adapter is manually copied; Harness does not own an OpenCode install/uninstall flow."},
181
181
  "assetsReferences": {"status": "Mechanism verified", "notes": "The adapter is self-contained and skill references are separately checked."},
182
182
  "updateSync": {"status": "Unknown", "notes": "No live OpenCode refresh or npm plugin update is preserved."},
183
- "liveHostVerification": {"status": "Partial", "evidence": "benchmarks/results/live-host/opencode-2026-09-16/README.md", "notes": "Retained evidence supports project-scope .js plugin loading and edit/verification state on OpenCode 1.18.31 (macOS), not durable hard enforcement: final snapshot is post-reset (hardLock: false), hard lock only an interactive observation with no retained blocked-tool trace, reflection operator-seeded, agent-controlled state deletion resets the breaker. Global scope, npm-package installation, and other host versions remain unverified."}
183
+ "liveHostVerification": {"status": "Partial", "evidence": "benchmarks/results/live-host/opencode-2026-09-16/README.md", "notes": "Retained historical evidence supports project-scope .js plugin loading and edit/verification state on OpenCode 1.18.31 (macOS), not durable hard enforcement: final snapshot is post-reset (hardLock: false), hard lock only an interactive observation with no retained blocked-tool trace, reflection was operator-seeded, and agent-controlled state deletion reset the former breaker. The snapshot predates the Rule-of-3 retirement and does not establish current post-retirement behavior; current coverage is package/mechanism evidence only, with no retained live-host trace. Global scope, npm-package installation, and other host versions remain unverified."}
184
184
  }
185
185
  },
186
186
  {
@@ -21,7 +21,7 @@ On a surface that packages those mechanisms:
21
21
  * **Handoff checkpoint:** a session checkpoint can record pending/failed state for later recovery.
22
22
  * **Session-start recovery:** a compatible session-start hook can surface that checkpoint back to the agent.
23
23
 
24
- This is a runtime integration feature, not a property of every Harness skill installation. The **Codex / local OpenAI plugin** packages the session/prompt hooks plus the supported-tool `state-persist.js` / circuit-breaker / `PostToolUse` runtime and stop/subagent adapters. That is mechanism-tested package coverage, not proof that a live host loaded every hook. The public OpenAI **Skills-only** artifact has no local `.codex-plugin` lifecycle hooks at all.
24
+ This is a runtime integration feature, not a property of every Harness skill installation. The **Codex / local OpenAI plugin** packages the session/prompt hooks plus the supported-tool `state-persist.js` / `PostToolUse` runtime and stop/subagent adapters. The former Rule-of-3 tracker, forced reflection, and reset path are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394). Package-level mechanism coverage does not prove that a live host loaded every hook. The public OpenAI **Skills-only** artifact has no local `.codex-plugin` lifecycle hooks at all.
25
25
 
26
26
  ---
27
27
 
package/docs/routing.md CHANGED
@@ -16,7 +16,7 @@ For software/project work, Harness establishes routing context and lightweight r
16
16
 
17
17
  1. **Route before execution** — establish scope/tier and the smallest justified topology.
18
18
  2. **Verify before claim** — completion requires objective evidence appropriate to the change.
19
- 3. **Re-plan after repeated failure** — after three same-signature failures, stop micro-retrying and use a fresh diagnosis / `zoom-out`.
19
+ 3. **Loop awareness** — reconsider assumptions or re-plan when evidence shows stagnation; numeric iteration values MAY guide but never hard-stop.
20
20
  4. **Bind knowledge by step** — compose ordered requirement steps and declare their required/optional skill or reference bindings before execution.
21
21
  5. **Resolve selected workflow** — satisfy the selected topology's required obligations before completion; tactics MAY adapt, but required lifecycle evidence cannot be silently skipped.
22
22
  6. **Surface status** — non-trivial work MUST keep the user informed through the single Harness Status format at required phase boundaries.
@@ -184,7 +184,7 @@ Keep semantic strength separate from runtime mechanics:
184
184
  - **mechanism:** which transitions a packaged hook/plugin can block, observe, or remind about;
185
185
  - **live evidence:** whether a real host actually loaded/fired that mechanism.
186
186
 
187
- A semantic MUST does not require a hard lock. Outside Rule-of-3 reflection and explicit permission/safety boundaries, lifecycle hooks stay fail-open/reminder-oriented.
187
+ A semantic MUST does not require a hard lock. Outside explicit permission/safety boundaries, lifecycle hooks stay fail-open/reminder-oriented.
188
188
 
189
189
  Instruction-only integrations receive the same semantic contract through instructions, but must not be labeled hard-enforced. Kernel emission alone does not prove model compliance. #82 owns host-specific retained evidence.
190
190
 
@@ -29,8 +29,8 @@ change follows this document (docs → RED → GREEN) in its own commit.
29
29
  not exact accuracy.
30
30
  3. **Deterministic controls stay outside learned scoring.** Tier structural
31
31
  floor, explicit workflow requests, action/security approval, scope and
32
- memory ownership and the Rule of 3 are unchanged. Abstention always falls
33
- back to the lexical path.
32
+ memory ownership are unchanged. Abstention always falls back to the
33
+ lexical path.
34
34
 
35
35
  ## Readout per stage
36
36
 
@@ -126,8 +126,8 @@ on `actionable` prompts.
126
126
  conversation context. Agent-written dispatch packets and worker instructions
127
127
  are ordinary prompts; their audience does not make them invalid. The small
128
128
  model judges the prompt text itself, without trying to recover missing
129
- context. Deterministic controls (action gates, scope and memory ownership,
130
- the Rule of 3) apply unchanged. The noise-gate experiment (#265)
129
+ context. Deterministic controls (action gates, scope and memory ownership)
130
+ apply unchanged. The noise-gate experiment (#265)
131
131
  showed that tier labels given to such prompts from session context were
132
132
  what kept a text-only model unsure.
133
133
 
@@ -112,23 +112,9 @@ npx.cmd github:dyphn1/Harness-everything uninstall
112
112
  npx.cmd github:dyphn1/Harness-everything install
113
113
  ```
114
114
 
115
- ### Circuit Breaker Tripping Too Often
115
+ ### Retired Rule-of-3 and reset paths
116
116
 
117
- **Symptom:** `RULE OF 3 CIRCUIT BREAKER TRIGGERED!` frequently
118
-
119
- **Solution:**
120
- 1. This is normal behavior on an integration surface that actually packages the circuit-breaker hooks: Harness is protecting you from infinite loops.
121
- 2. Follow the zoom-out instructions in the error message.
122
- 3. If it's a false positive on the Claude Code hook path, check the error signature:
123
- ```bash
124
- cat .claude/harness-everything/state/sessions/default/rule-of-3-state.json
125
- ```
126
- 4. Reset if needed:
127
- ```bash
128
- npm run harness:reset
129
- ```
130
-
131
- Do not expect this Claude Code state file merely because Harness skills or an instruction-only platform integration are installed.
117
+ The former `hooks/scripts/rule-of-3*.js`, `reset-circuit-breaker.js`, forced report/unlock path, and OpenCode hard-lock path are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394). Old breaker messages or state files are historical; they are not a current retry counter or reset workflow. Zoom-out is agent-initiated and can be chosen on the first meaningful signal; productive work may continue when the next check is justified by evidence. See [the Zoom-out workflow](workflows/zoom-out.md).
132
118
 
133
119
  ## Platform-Specific Issues
134
120
 
@@ -262,19 +248,11 @@ Do not troubleshoot a missing `SessionStart` or `UserPromptSubmit` hook in the p
262
248
  **Symptom:** Terminal commands feel slower on a hook-enabled integration.
263
249
 
264
250
  **Solution:**
265
- 1. Check Claude Code hook execution time where applicable:
266
- ```bash
267
- time node hooks/scripts/rule-of-3.js < /dev/null
268
- ```
269
- 2. If >200ms, check for:
251
+ 1. Check the host's diagnostics for the active hook path.
252
+ 2. If execution remains slow, check for:
270
253
  - Large state files
271
254
  - Network calls in hooks
272
255
  - Complex file operations
273
- 3. Reset state if appropriate:
274
- ```bash
275
- rm -rf .claude/harness-everything/state/sessions/
276
- ```
277
-
278
256
  ### High Memory Usage
279
257
 
280
258
  **Symptom:** Node.js processes consuming too much memory
@@ -293,19 +271,15 @@ Do not troubleshoot a missing `SessionStart` or `UserPromptSubmit` hook in the p
293
271
 
294
272
  ```bash
295
273
  export HARNESS_DEBUG=1
296
- node hooks/scripts/rule-of-3.js < payload.json
297
274
  ```
298
275
 
276
+ The former Rule-of-3 hook and its state diagnostics are retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394); this flag does not provide a current breaker trace.
277
+
299
278
  ### Check State Files
300
279
 
301
280
  ```bash
302
- # Claude Code hook-path state example
303
- cat .claude/harness-everything/state/sessions/default/rule-of-3-state.json
281
+ # Claude Code hook-path handoff state example
304
282
  cat .claude/harness-everything/state/sessions/default/handoff-state.json
305
-
306
- # Reset Claude hook-path state
307
- rm -rf .claude/harness-everything/state/sessions/
308
- npm run harness:reset
309
283
  ```
310
284
 
311
285
  ### Manual Hook Testing
@@ -364,8 +338,8 @@ cat .claude/settings.json | grep -A 20 "hooks" >> harness-diagnostic.txt 2>/dev/
364
338
  - **Solution:** Confirm the platform/integration surface first; on a supported stateful hook path, state is created on first use
365
339
 
366
340
  ### "Zoom-out report not found"
367
- - **Cause:** Circuit breaker tripped but no report written
368
- - **Solution:** Follow the zoom-out instructions in the error message
341
+ - **Cause:** An old Rule-of-3 integration expected a compulsory report; that path is retired under [#394](https://github.com/dyphn1/Harness-everything/issues/394).
342
+ - **Solution:** Use [the agent-initiated Zoom-out guidance](workflows/zoom-out.md) when evidence warrants reassessment; no special report or reset is required.
369
343
 
370
344
  ---
371
345
 
@@ -33,25 +33,26 @@ The unified status shape uses a visible Markdown hierarchy:
33
33
 
34
34
  Keep one short evidence item inline; use nested evidence bullets when multiple items improve scanability. Emit it before substantive execution, after major phases, on material direction changes, at meaningful long-running phase boundaries, and before final completion.
35
35
 
36
- The two intentionally separate hard boundaries are:
36
+ The explicit hard boundary is:
37
37
 
38
- 1. **Rule of 3** — the third matching failure pauses mutation until a zoom-out reflection is written;
39
- 2. **user/host permission and dangerous-action approval** — authorization boundaries such as the action gate.
38
+ **User/host permission and dangerous-action approval** — authorization boundaries such as the action gate.
39
+
40
+ Zoom-out is agent-initiated. An agent may reassess at the first meaningful
41
+ signal or later; productive iteration may continue when attempts add evidence,
42
+ narrow the cause, and justify the next check.
40
43
 
41
44
  ## Runtime flow
42
45
 
43
- ```text
44
- route
45
- -> selected workflow semantic contract
46
- -> execute with model-chosen tactics
47
- -> observe edits / verification / stage evidence
48
- -> emit reminders when evidence is weak
49
- -> complete only when MUST obligations resolve
50
-
51
- same failure signature x3
52
- -> zoom-out reflection required
53
- -> reflection accepted
54
- -> normal execution resumes
46
+ ```mermaid
47
+ flowchart TD
48
+ Route["Route and resolve the selected workflow contract"] --> Execute["Execute with model-chosen tactics"]
49
+ Execute --> Observe["Observe edit, verification, and stage evidence"]
50
+ Observe --> Remind["Emit reminders when evidence is weak"]
51
+ Remind --> Complete["Complete when required obligations resolve"]
52
+ Observe --> Signal["Evidence conflicts with an assumption or leaves the next check unclear"]
53
+ Signal --> Reassess["Agent may choose zoom-out at the first meaningful signal"]
54
+ Observe --> Productive["Attempts add evidence or narrow the cause"]
55
+ Productive --> Continue["Productive iteration may continue with a justified next check"]
55
56
  ```
56
57
 
57
58
  There is no `budget-exhausted -> blocked -> reset-budget` lifecycle.
@@ -128,7 +129,7 @@ Regression tests **MUST** prove:
128
129
  - commands/Stop remain available;
129
130
  - no mutation-probe lock or reservation state is created;
130
131
  - `exec_command` verification can update `lastVerifyAt`;
131
- - Rule of 3 trips exactly at three matching failures;
132
- - a valid reflection resets the cycle;
133
- - a later three-failure cycle requests another reflection rather than a permanent hard lock;
132
+ - reassessment is available at the first meaningful signal;
133
+ - productive iteration may continue when attempts add evidence or narrow the cause;
134
+ - no recurrence counter, reflection token, compulsory report, reset, or escalation state is created;
134
135
  - permission/dangerous-action boundaries remain separate and intact.