harness-everything 0.55.3 → 0.55.4

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 (170) 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 +13 -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/doc-obligations/reconciliation-s2b/wiring/legacy-off-golden.json +0 -6
  16. package/ci/invariant-routing.test.js +26 -5
  17. package/ci/lib/opencode-verification-loader.js +3 -5
  18. package/ci/mechanism-2a-rule-of-3.test.js +111 -97
  19. package/ci/mechanism-2n-opencode-plugin.test.js +68 -206
  20. package/ci/mechanism-2p-opencode-v2-entrypoint.test.js +47 -28
  21. package/ci/mechanism-2w-platform-compatibility.test.js +1 -0
  22. package/ci/mechanism-32-paired-benchmark.test.js +1 -2
  23. package/ci/mechanism-33-issues-205-207.test.js +1 -1
  24. package/ci/mechanism-338-opencode-async.test.js +18 -49
  25. package/ci/mechanism-36-verify-timeout.test.js +3 -189
  26. package/ci/mechanism-39-opencode-verify-outcomes.test.js +56 -323
  27. package/ci/mechanism-397-opencode-observations.test.js +6 -7
  28. package/ci/mechanism-codex-hook-results.test.js +9 -5
  29. package/ci/mechanism-prb-outline-review.test.js +1 -13
  30. package/ci/mechanism-system-one-router.test.js +1 -1
  31. package/ci/openai-plugin-package.test.js +30 -7
  32. package/ci/openai-plugin-runtime.test.js +64 -32
  33. package/ci/prompt-contract-regressions.test.js +1 -5
  34. package/ci/self-evolve-loop.test.js +51 -51
  35. package/ci/workflow-execution-contract.test.js +3 -6
  36. package/docker-verify.sh +1 -117
  37. package/docs/architecture.md +9 -7
  38. package/docs/document-lifecycle.md +1 -1
  39. package/docs/enforcement-locks.md +12 -10
  40. package/docs/mechanism-first-skill-mesh.md +2 -2
  41. package/docs/openai-plugin.md +3 -3
  42. package/docs/philosophy.md +1 -1
  43. package/docs/platform-capabilities.md +2 -2
  44. package/docs/platform-compatibility.json +2 -2
  45. package/docs/reflection.md +1 -1
  46. package/docs/routing.md +2 -2
  47. package/docs/system-one-suggestion-gates.md +4 -4
  48. package/docs/troubleshooting.md +9 -35
  49. package/docs/workflow-runtime.md +19 -18
  50. package/docs/workflows/environment-detection.md +11 -9
  51. package/docs/workflows/fable-discipline.md +6 -5
  52. package/docs/workflows/fable-mode.md +6 -5
  53. package/docs/workflows/harness-everything.md +5 -5
  54. package/docs/workflows/improve-codebase-architecture.md +10 -8
  55. package/docs/workflows/install-cognitive-os.md +5 -5
  56. package/docs/workflows/tdd.md +9 -9
  57. package/docs/workflows/zoom-out.md +20 -30
  58. package/environment-detection/SKILL.md +2 -2
  59. package/environment-detection/references/shell-syntax-rules.md +1 -1
  60. package/eval-harness/SKILL.md +1 -1
  61. package/eval-harness/references/scoring-rubric.md +3 -3
  62. package/evals/zoom-out/eval.yaml +2 -2
  63. package/evals/zoom-out/tasks/negative-productive-iteration.yaml +15 -0
  64. package/evals/zoom-out/tasks/negative-trivial-edit.yaml +6 -6
  65. package/evals/zoom-out/tasks/positive-first-failure.yaml +15 -0
  66. package/evals/zoom-out/tasks/positive-repair-loop.yaml +1 -1
  67. package/fable-discipline/SKILL.md +3 -3
  68. package/fable-discipline/references/discipline-rules.md +1 -1
  69. package/fable-mode/SKILL.md +1 -1
  70. package/fable-mode/execution-guardrails/SKILL.md +2 -4
  71. package/fable-mode/execution-guardrails/references/guardrail-rules.md +3 -3
  72. package/fable-mode/fable-haiku/SKILL.md +1 -1
  73. package/fable-mode/fable-opus/SKILL.md +2 -2
  74. package/fable-mode/fable-sonnet/SKILL.md +1 -1
  75. package/fable-mode/references/execution-phases.md +2 -2
  76. package/harness-everything/SKILL.md +3 -3
  77. package/harness-everything/references/router-workflow-plan.md +2 -2
  78. package/harness-everything/references/skill-registry.md +2 -2
  79. package/harness-everything/references/triage-and-tiers.md +5 -5
  80. package/harness-everything/scripts/bootstrap.js +1 -26
  81. package/harness-everything/scripts/kernel-router-core.js +2 -3
  82. package/harness-everything/scripts/kernel-router.js +1 -1
  83. package/harness-everything/scripts/router-contract-core.js +1 -1
  84. package/harness-everything/scripts/routing-keywords.json +0 -2
  85. package/hooks/hooks.json +0 -33
  86. package/hooks/scripts/lib/harness-state.js +5 -6
  87. package/hooks/scripts/lib/learning-opportunity.js +3 -13
  88. package/hooks/scripts/openai-session-start.js +2 -4
  89. package/improve-codebase-architecture/SKILL.md +3 -3
  90. package/improve-codebase-architecture/guides/refactoring-workflow.md +5 -4
  91. package/install-cognitive-os/SKILL.md +3 -3
  92. package/opencode-plugin/README.md +12 -43
  93. package/opencode-plugin/index.mjs +21 -368
  94. package/opencode-plugin/plugin.json +1 -1
  95. package/package.json +1 -4
  96. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  97. package/plugins/harness-everything/hooks/hooks.json +0 -14
  98. package/plugins/harness-everything/hooks/scripts/lib/harness-state.js +5 -6
  99. package/plugins/harness-everything/hooks/scripts/lib/learning-opportunity.js +3 -13
  100. package/plugins/harness-everything/hooks/scripts/lib/workspace.js +2 -2
  101. package/plugins/harness-everything/hooks/scripts/openai-session-start.js +2 -4
  102. package/plugins/harness-everything/hooks/session-start.js +2 -4
  103. package/plugins/harness-everything/plugin.json +1 -1
  104. package/plugins/harness-everything/scripts/lib/advisory-text.js +2 -2
  105. package/plugins/harness-everything/scripts/lib/workspace.js +2 -2
  106. package/plugins/harness-everything/skills/environment-detection/SKILL.md +2 -2
  107. package/plugins/harness-everything/skills/environment-detection/references/shell-syntax-rules.md +1 -1
  108. package/plugins/harness-everything/skills/eval-harness/SKILL.md +1 -1
  109. package/plugins/harness-everything/skills/eval-harness/references/scoring-rubric.md +3 -3
  110. package/plugins/harness-everything/skills/fable-discipline/SKILL.md +3 -3
  111. package/plugins/harness-everything/skills/fable-discipline/references/discipline-rules.md +1 -1
  112. package/plugins/harness-everything/skills/fable-mode/SKILL.md +1 -1
  113. package/plugins/harness-everything/skills/fable-mode/execution-guardrails/SKILL.md +2 -4
  114. package/plugins/harness-everything/skills/fable-mode/execution-guardrails/references/guardrail-rules.md +3 -3
  115. package/plugins/harness-everything/skills/fable-mode/fable-haiku/SKILL.md +1 -1
  116. package/plugins/harness-everything/skills/fable-mode/fable-opus/SKILL.md +2 -2
  117. package/plugins/harness-everything/skills/fable-mode/fable-sonnet/SKILL.md +1 -1
  118. package/plugins/harness-everything/skills/fable-mode/references/execution-phases.md +2 -2
  119. package/plugins/harness-everything/skills/harness-everything/SKILL.md +3 -3
  120. package/plugins/harness-everything/skills/harness-everything/references/router-workflow-plan.md +2 -2
  121. package/plugins/harness-everything/skills/harness-everything/references/skill-registry.md +2 -2
  122. package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +5 -5
  123. package/plugins/harness-everything/skills/harness-everything/scripts/bootstrap.js +1 -26
  124. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +2 -3
  125. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +1 -1
  126. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +1 -1
  127. package/plugins/harness-everything/skills/harness-everything/scripts/routing-keywords.json +0 -2
  128. package/plugins/harness-everything/skills/improve-codebase-architecture/SKILL.md +3 -3
  129. package/plugins/harness-everything/skills/improve-codebase-architecture/guides/refactoring-workflow.md +5 -4
  130. package/plugins/harness-everything/skills/install-cognitive-os/SKILL.md +3 -3
  131. package/plugins/harness-everything/skills/self-evolve/SKILL.md +1 -1
  132. package/plugins/harness-everything/skills/self-evolve/references/memory-resolution.md +3 -3
  133. package/plugins/harness-everything/skills/self-evolve/schemas/lesson-candidate.schema.json +4 -1
  134. package/plugins/harness-everything/skills/self-evolve/scripts/lesson-candidate.js +1 -0
  135. package/plugins/harness-everything/skills/skill-creator/SKILL.md +1 -1
  136. package/plugins/harness-everything/skills/skill-creator/references/quality-checklist.md +1 -1
  137. package/plugins/harness-everything/skills/skill-creator/references/quality-principles.md +4 -4
  138. package/plugins/harness-everything/skills/tdd/SKILL.md +2 -2
  139. package/plugins/harness-everything/skills/tdd/references/core-discipline.md +3 -5
  140. package/plugins/harness-everything/skills/todo-driven-workflow/SKILL.md +2 -2
  141. package/plugins/harness-everything/skills/zoom-out/SKILL.md +14 -26
  142. package/plugins/harness-everything/skills/zoom-out/references/circuit-breaker.md +18 -62
  143. package/references/platform-advisory-template.md +3 -9
  144. package/sbom.cdx.json +7 -7
  145. package/scripts/lib/advisory-text.js +2 -2
  146. package/scripts/lib/workspace.js +2 -2
  147. package/self-evolve/SKILL.md +1 -1
  148. package/self-evolve/references/memory-resolution.md +3 -3
  149. package/self-evolve/schemas/lesson-candidate.schema.json +4 -1
  150. package/self-evolve/scripts/lesson-candidate.js +1 -0
  151. package/skill-creator/SKILL.md +1 -1
  152. package/skill-creator/references/quality-checklist.md +1 -1
  153. package/skill-creator/references/quality-principles.md +4 -4
  154. package/submission/openai/test-cases.json +5 -5
  155. package/tdd/SKILL.md +2 -2
  156. package/tdd/references/core-discipline.md +3 -5
  157. package/todo-driven-workflow/SKILL.md +2 -2
  158. package/zoom-out/SKILL.md +14 -26
  159. package/zoom-out/references/circuit-breaker.md +18 -62
  160. package/behavioral-evals/opencode-hardlock-live.js +0 -17
  161. package/behavioral-evals/opencode-reflection-gate-live.js +0 -342
  162. package/ci/mechanism-31-opencode-hardlock-evidence.test.js +0 -82
  163. package/evals/zoom-out/tasks/negative-first-edge-case-review.yaml +0 -16
  164. package/evals/zoom-out/tasks/positive-repeated-failure.yaml +0 -15
  165. package/hooks/scripts/reset-circuit-breaker.js +0 -30
  166. package/hooks/scripts/rule-of-3-tracker.js +0 -165
  167. package/hooks/scripts/rule-of-3.js +0 -171
  168. package/plugins/harness-everything/hooks/scripts/reset-circuit-breaker.js +0 -30
  169. package/plugins/harness-everything/hooks/scripts/rule-of-3-tracker.js +0 -165
  170. package/plugins/harness-everything/hooks/scripts/rule-of-3.js +0 -171
@@ -4,7 +4,7 @@ description: Discovers and transforms shallow or bloated modules into deep, SRP-
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.30.3
7
+ version: 0.55.4
8
8
  ---
9
9
 
10
10
  # Improve Codebase Architecture (Deep & SRP Refactoring)
@@ -16,14 +16,14 @@ metadata:
16
16
  | **Trigger / Input** | "refactor architecture", "split object/class", "apply SRP", tech debt |
17
17
  | **Expected Output** | SRP proposal, Characterization Test safety net, TDD-guided extraction. |
18
18
  | **State Mutations** | Extracts classes/functions/objects; adds characterization tests. |
19
- | **Enforcement Gate** | Scan docs first; Characterization Tests before refactoring untested code; 3 same-signature failures → rollback + `zoom-out`. |
19
+ | **Enforcement Gate** | Scan docs first; Characterization Tests before refactoring untested code. |
20
20
 
21
21
  ## Workflow
22
22
 
23
23
  1. `[Discover]`: no blind refactoring — scan `CONTEXT.md`, `docs/adr/`, core interfaces first. Targets: SRP violations (>300 lines / >10 complexity), shallow modules, coupled seams.
24
24
  2. `[Think]`: present the Deepening & SRP proposal (object splitting + seam abstraction) until approved.
25
25
  3. `[Try]`: launch `tdd`; Characterization Tests first if legacy code lacks tests; extract incrementally, verifying tests after each change.
26
- 4. `[Summarize]`/`[Self-Evolve]`: 3 same-signature failures → rollback + `zoom-out`; record traps in `self-evolve`.
26
+ 4. `[Summarize]`/`[Self-Evolve]`: if evidence changes the refactor diagnosis, optionally use `zoom-out` at the first meaningful signal; productive iteration may continue when attempts add evidence or narrow the cause. Roll back only when checks show a regression, and record useful traps in `self-evolve`.
27
27
 
28
28
  Deep dive: <this-skill-dir>/references/README.md
29
29
 
@@ -23,10 +23,11 @@ flowchart TD
23
23
  CheckTest -- No Tests --> WriteCharTest[Write Characterization Tests First] --> Execute
24
24
  CheckTest -- Tests Pass --> Execute[5. Execute Refactoring via TDD]
25
25
 
26
- Execute --> ErrorsCheck{6. Cascading Errors > 3?}
26
+ Execute --> ErrorsCheck{Did results change the diagnosis?}
27
27
 
28
- ErrorsCheck -- Yes --> Rollback[Rollback Changes & Trigger zoom-out]
28
+ ErrorsCheck -- Yes --> Reassess[Choose whether to reassess, revise, or roll back]
29
29
  ErrorsCheck -- No --> Complete[Refactoring Complete & Record Lessons in self-evolve]
30
+ Reassess --> Execute
30
31
  ```
31
32
 
32
33
  ## 1. Architectural Exploration & Discovery `[Discover]`
@@ -47,8 +48,8 @@ Use consistent domain terminology (Module, Interface, Implementation, Depth, Sea
47
48
  - **Iron Rule of Refactoring**: MUST be done under the safety net of test coverage. If there are no tests, the first step MUST be to "write Characterization Tests for the legacy code" before modifying the architecture.
48
49
  - **Extract Safely**: Extract objects/functions incrementally, verifying test suite execution after each atomic change.
49
50
 
50
- ## 4. Circuit Breaker & Evolution `[Summarize]` & `[Self-Evolve]`
51
- - If refactoring triggers more than 3 cascading compilation errors that cannot be fixed immediately, trigger the `zoom-out` circuit breaker and Rollback.
51
+ ## 4. Reassessment & Evolution `[Summarize]` & `[Self-Evolve]`
52
+ - When results contradict an assumption or leave the next check unclear, an agent may choose `zoom-out` to review evidence and update the diagnosis. Continue when iterations narrow the cause and justify the next action; roll back when checks show a regression.
52
53
  - Write the discovered coupling traps into `self-evolve` memory, ensuring future newly generated code does not repeat the same mistakes.
53
54
 
54
55
  ## Reference Guides
@@ -4,7 +4,7 @@ description: "Explain or explicitly apply the Harness cognitive policy: Discover
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.19.1
7
+ version: 0.55.4
8
8
  ---
9
9
 
10
10
  # Agent Cognitive OS
@@ -27,14 +27,14 @@ The Cognitive OS is policy, not a required peer-skill selection. Supported runti
27
27
  | **Input** | Explicit cognitive-loop use, or a host without automatic Harness kernel context. |
28
28
  | **Output** | Evidence-grounded work without a fixed domain-skill sequence. |
29
29
  | **State** | None directly. |
30
- | **Gate** | Completion claims need evidence; repeated same-signature failures require re-planning. |
30
+ | **Gate** | Completion claims need evidence; agents may reassess when evidence changes the diagnosis. |
31
31
 
32
32
  ## Core Loop
33
33
 
34
34
  1. `[Discover]` Verify relevant workspace state.
35
35
  2. `[Think]` Establish intent, scope, and failure modes.
36
36
  3. `[Try]` Make the smallest useful change and gather evidence.
37
- 4. `[Summarize]` Ground conclusions in tool output; after 3 same-signature failures use `zoom-out`.
37
+ 4. `[Summarize]` Ground conclusions in tool output; use `zoom-out` when evidence warrants a fresh diagnosis.
38
38
  5. `[Record]` Record milestones only when evidence supports them.
39
39
 
40
40
  Domain skills may define their own tactics and phases. They do not need to invoke this skill first as long as the Harness invariants remain satisfied.
@@ -1,17 +1,15 @@
1
- # Harness Guidance + Rule-of-3 Plugin for opencode
1
+ # Harness Guidance and Verification Plugin for OpenCode
2
2
 
3
- Adds lifecycle guidance, verification reminders, and the Rule-of-3 zoom-out boundary in opencode, addressing the
4
- limitation that skills are otherwise advisory-only on that platform.
3
+ Adds edit tracking, verification reminders, prompt routing, and observation hooks for OpenCode.
5
4
 
6
- > **Evidence boundary:** the plugin is implemented against opencode's real plugin API and covered by deterministic mechanism tests. Live plugin loading remains unverified beyond one scoped surface: retained evidence supports project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS) — [live-host evidence](../benchmarks/results/live-host/opencode-2026-09-16/README.md). The retained snapshot predates #190 and is historical evidence only: its final snapshot was post-reset; the old hard-lock was only an interactive observation, with no retained blocked-tool trace. Current behavior has no permanent post-reflection hard lock; only the third matching verification failure pauses edits for reflection. Reflection was operator-seeded, then agent-rewritten, so no behavioral-effectiveness claim is made. Global scope, npm-package installation, and other host versions remain unverified. See [`../docs/platform-capabilities.md`](../docs/platform-capabilities.md).
5
+ > **Evidence boundary:** the plugin is covered by deterministic mechanism tests. Live plugin loading remains unverified beyond one scoped surface: retained evidence supports project-scope `.js` 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 retained snapshot is historical: its final state was post-reset; the hard-lock was only an interactive observation with no retained blocked-tool trace. Reflection was operator-seeded, then agent-rewritten, so no behavioral-effectiveness claim is made. The current plugin does not force reflection or block edits based on verification history. Global scope, npm-package installation, and other host versions remain unverified. See [`../docs/platform-capabilities.md`](../docs/platform-capabilities.md).
7
6
 
8
7
  ## Problem
9
8
 
10
- Harness now keeps workflow/productivity rules advisory on both Claude Code and opencode. Explicit permission boundaries and the third-failure Rule-of-3 reflection are the intentional blocking exceptions. In opencode, skills
9
+ Harness keeps workflow and productivity guidance advisory on both Claude Code and OpenCode. Explicit permission boundaries remain independent contracts. In OpenCode, skills
11
10
  only SUGGEST rules (soft guidance). This means:
12
11
  - Under pressure, agents can bypass skills
13
12
  - Verification can be skipped
14
- - Circuit breaker patterns don't trigger
15
13
 
16
14
  ## The plugin
17
15
 
@@ -24,7 +22,7 @@ see issue #37 for how that was found and fixed. **Naming caveat (issue
24
22
  #127):** opencode's discovery glob only matches `*.js`/`*.ts`, so the file
25
23
  must be copied to a `.js` name when installed - see Installation below.
26
24
 
27
- It implements three lifecycle mechanisms across opencode's real hooks:
25
+ It implements edit tracking and verification reminders across OpenCode's hooks:
28
26
 
29
27
  The V1 factory follows opencode's plugin contract directly: the named
30
28
  `HarnessEnforcement` export is an async factory receiving the opencode context
@@ -61,13 +59,11 @@ by `HARNESS_VERIFY_TIMEOUT_MS`. It reports progress every 15 seconds in the
61
59
  plugin log. No later script starts after the budget expires. Each run is
62
60
  classified as `pass` (exit 0), `test_failure` (a real nonzero exit), `timeout`
63
61
  (the sequence deadline expired), or `execution_error` (spawn failure, external
64
- signal, or cancellation). Only `test_failure` advances the Rule-of-3 counter.
62
+ signal, or cancellation). The follow-up describes the verification outcome.
65
63
 
66
64
  | Resource | Bound / behavior |
67
65
  |---|---|
68
66
  | Retained output | First and last 2,000 characters per stream; the final diagnostic shares a 2,000-character budget across streams, plus labels/elision markers |
69
- | Failure identity | Incremental whitespace-normalized digest of both complete streams; first recognized test marker and suite context tracked separately |
70
- | Marker parsing | First 4,096 characters of each line; an overlong marker/context selects the complete-stream digest; ordinary long banners preserve later complete markers |
71
67
  | Timeout/cancel | Terminate the shell/npm/script process group, then force-kill after 150 ms on POSIX; Windows uses `taskkill /T /F` |
72
68
  | Concurrent lifecycle | Duplicate idle events share the active run; a code edit or session reset aborts it; an idle arriving during cancellation waits for cleanup before verifying the newer edits; the V2 event stream continues consuming cancellation events; disposal awaits active child cleanup; stale results cannot clear newer edits or recreate deleted state |
73
69
 
@@ -77,31 +73,10 @@ budget, child cleanup and concurrent hooks; these are deterministic mechanism
77
73
  evidence, not a new live-host verification claim. Processes deliberately
78
74
  escaping the process group are outside this cleanup boundary.
79
75
 
80
- ### 3. Rule-of-3 zoom-out boundary (`tool.execute.before` + the verification observer above)
81
-
82
- Enforces Rule of 3 on repeated verification failures (same failing command +
83
- normalized failure evidence: the first test-level failing marker - TAP
84
- `not ok`, node:test/jest symbols, Jest test blocks, assertion lines - over the
85
- streamed stdout **and** stderr, with a preceding suite header such as
86
- Jest's `FAIL <file>` carried as context so different tests in one file stay
87
- distinct; without a test-level marker the signature falls back to a digest of
88
- those complete streams, never to a suite header alone; the diagnostic retention bound does not limit the stream digest; not
89
- arbitrary tool failures, since
90
- `tool.execute.after` has no normalized success/failure field to key a
91
- signature on for tools in general):
92
- - 3rd failure on the same signature forces a reflection message instead of a
93
- retry nudge
94
- - the follow-up asks for a tokenized `zoom-out-report.md` artifact with the
95
- required reflection sections; the artifact is accepted through the real
96
- edit hook and records `lastReflection`
97
- - after a valid reflection, the signature count resets; another three matching failures trigger another zoom-out
98
- - `npm run harness:reset` remains an optional manual state clear; a repeated cycle does not create a permanent second-stage lock
99
-
100
76
  Idle handling is bounded: after a failed verification, the plugin records that
101
77
  the follow-up is pending and ignores repeated `session.idle` events until a new
102
78
  code edit arrives. If prompt delivery fails, the exact follow-up text is saved
103
- and retried on the next idle event without re-running verification or adding a
104
- new breaker failure. A reflection artifact itself does not count as a code edit.
79
+ and retried on the next idle event without re-running verification.
105
80
 
106
81
  ## Installation
107
82
 
@@ -192,21 +167,15 @@ recovery. Session IDs such as `.` or `..` are hashed
192
167
  into safe child names, and reset only removes a path proven to remain under the
193
168
  session root.
194
169
 
195
- The reflection report is `zoom-out-report.md` in the session state directory.
196
- It must contain `## Goal`, `## Failed Attempts`, `## Verified Facts`,
197
- `## Diagnosis`, `## Decision`, with the first non-empty line under `## Decision`
198
- starting with `RESUME:` or `ESCALATE:`, and the token supplied in the
199
- forced-reflection prompt. `apply_patch` reflection writes are accepted when
200
- their patch target names the report file.
201
-
202
170
  ## Testing
203
171
 
204
172
  `ci/mechanism-2n-opencode-plugin.test.js` imports `index.mjs` and drives its
205
173
  exported hooks directly with a mock `client`/`event` context - the same shape
206
- opencode's plugin loader passes in - covering the edit → idle → follow-up →
207
- reflection-artifact → retry → fresh three-failure cycle, repeated-idle idempotency,
208
- session isolation, reset behavior, legacy-state migration, corrupt-state
209
- fail-closed behavior, and patch-based reflection writes.
174
+ OpenCode's plugin loader passes in - covering edit → idle → reminder, repeated
175
+ failures, legacy pending state remaining inert, prompt-delivery retry,
176
+ repeated-idle idempotency, session isolation, reset behavior, and legacy-state
177
+ migration. `ci/mechanism-2p-opencode-v2-entrypoint.test.js` exercises the same
178
+ edit and legacy-state paths through the default V2 export.
210
179
 
211
180
  It does not launch a real opencode process; the test remains a deterministic
212
181
  hook-sequence check against the documented and source-verified hook signatures.