harness-everything 0.55.2 → 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 (177) 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 +22 -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 +32 -6
  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 +64 -9
  28. package/ci/mechanism-check-packet-write-set.test.js +163 -8
  29. package/ci/mechanism-codex-hook-results.test.js +9 -5
  30. package/ci/mechanism-prb-outline-review.test.js +1 -13
  31. package/ci/mechanism-system-one-router.test.js +1 -1
  32. package/ci/openai-plugin-package.test.js +30 -7
  33. package/ci/openai-plugin-runtime.test.js +64 -32
  34. package/ci/prompt-contract-regressions.test.js +1 -5
  35. package/ci/router-workflow-plan.test.js +8 -8
  36. package/ci/self-evolve-loop.test.js +51 -51
  37. package/ci/workflow-execution-contract.test.js +3 -6
  38. package/code-review/SKILL.md +1 -1
  39. package/code-review/templates/finding.template.md +17 -1
  40. package/docker-verify.sh +1 -117
  41. package/docs/architecture.md +9 -7
  42. package/docs/document-lifecycle.md +1 -1
  43. package/docs/enforcement-locks.md +12 -10
  44. package/docs/mechanism-first-skill-mesh.md +2 -2
  45. package/docs/openai-plugin.md +3 -3
  46. package/docs/philosophy.md +1 -1
  47. package/docs/platform-capabilities.md +4 -3
  48. package/docs/platform-compatibility.json +2 -2
  49. package/docs/reflection.md +1 -1
  50. package/docs/routing.md +2 -2
  51. package/docs/system-one-suggestion-gates.md +4 -4
  52. package/docs/troubleshooting.md +9 -35
  53. package/docs/workflow-runtime.md +19 -18
  54. package/docs/workflows/environment-detection.md +11 -9
  55. package/docs/workflows/fable-discipline.md +6 -5
  56. package/docs/workflows/fable-mode.md +6 -5
  57. package/docs/workflows/harness-everything.md +5 -5
  58. package/docs/workflows/improve-codebase-architecture.md +10 -8
  59. package/docs/workflows/install-cognitive-os.md +5 -5
  60. package/docs/workflows/tdd.md +9 -9
  61. package/docs/workflows/zoom-out.md +20 -30
  62. package/environment-detection/SKILL.md +2 -2
  63. package/environment-detection/references/shell-syntax-rules.md +1 -1
  64. package/eval-harness/SKILL.md +1 -1
  65. package/eval-harness/references/scoring-rubric.md +3 -3
  66. package/evals/zoom-out/eval.yaml +2 -2
  67. package/evals/zoom-out/tasks/negative-productive-iteration.yaml +15 -0
  68. package/evals/zoom-out/tasks/negative-trivial-edit.yaml +6 -6
  69. package/evals/zoom-out/tasks/positive-first-failure.yaml +15 -0
  70. package/evals/zoom-out/tasks/positive-repair-loop.yaml +1 -1
  71. package/fable-discipline/SKILL.md +3 -3
  72. package/fable-discipline/references/discipline-rules.md +1 -1
  73. package/fable-mode/SKILL.md +1 -1
  74. package/fable-mode/execution-guardrails/SKILL.md +2 -4
  75. package/fable-mode/execution-guardrails/references/guardrail-rules.md +3 -3
  76. package/fable-mode/fable-haiku/SKILL.md +1 -1
  77. package/fable-mode/fable-opus/SKILL.md +2 -2
  78. package/fable-mode/fable-sonnet/SKILL.md +1 -1
  79. package/fable-mode/references/execution-phases.md +2 -2
  80. package/harness-everything/SKILL.md +3 -3
  81. package/harness-everything/references/router-workflow-plan.md +2 -2
  82. package/harness-everything/references/skill-registry.md +2 -2
  83. package/harness-everything/references/triage-and-tiers.md +5 -5
  84. package/harness-everything/scripts/bootstrap.js +1 -26
  85. package/harness-everything/scripts/kernel-router-core.js +2 -3
  86. package/harness-everything/scripts/kernel-router.js +1 -1
  87. package/harness-everything/scripts/router-contract-core.js +1 -1
  88. package/harness-everything/scripts/routing-keywords.json +0 -2
  89. package/hooks/hooks.json +0 -33
  90. package/hooks/scripts/lib/harness-state.js +5 -6
  91. package/hooks/scripts/lib/learning-opportunity.js +3 -13
  92. package/hooks/scripts/openai-session-start.js +2 -4
  93. package/improve-codebase-architecture/SKILL.md +3 -3
  94. package/improve-codebase-architecture/guides/refactoring-workflow.md +5 -4
  95. package/install-cognitive-os/SKILL.md +3 -3
  96. package/opencode-plugin/README.md +18 -43
  97. package/opencode-plugin/index.mjs +52 -380
  98. package/opencode-plugin/plugin.json +1 -1
  99. package/package.json +1 -4
  100. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  101. package/plugins/harness-everything/hooks/hooks.json +0 -14
  102. package/plugins/harness-everything/hooks/scripts/lib/harness-state.js +5 -6
  103. package/plugins/harness-everything/hooks/scripts/lib/learning-opportunity.js +3 -13
  104. package/plugins/harness-everything/hooks/scripts/lib/workspace.js +2 -2
  105. package/plugins/harness-everything/hooks/scripts/openai-session-start.js +2 -4
  106. package/plugins/harness-everything/hooks/session-start.js +2 -4
  107. package/plugins/harness-everything/plugin.json +1 -1
  108. package/plugins/harness-everything/scripts/lib/advisory-text.js +2 -2
  109. package/plugins/harness-everything/scripts/lib/workspace.js +2 -2
  110. package/plugins/harness-everything/skills/code-review/SKILL.md +1 -1
  111. package/plugins/harness-everything/skills/code-review/templates/finding.template.md +17 -1
  112. package/plugins/harness-everything/skills/environment-detection/SKILL.md +2 -2
  113. package/plugins/harness-everything/skills/environment-detection/references/shell-syntax-rules.md +1 -1
  114. package/plugins/harness-everything/skills/eval-harness/SKILL.md +1 -1
  115. package/plugins/harness-everything/skills/eval-harness/references/scoring-rubric.md +3 -3
  116. package/plugins/harness-everything/skills/fable-discipline/SKILL.md +3 -3
  117. package/plugins/harness-everything/skills/fable-discipline/references/discipline-rules.md +1 -1
  118. package/plugins/harness-everything/skills/fable-mode/SKILL.md +1 -1
  119. package/plugins/harness-everything/skills/fable-mode/execution-guardrails/SKILL.md +2 -4
  120. package/plugins/harness-everything/skills/fable-mode/execution-guardrails/references/guardrail-rules.md +3 -3
  121. package/plugins/harness-everything/skills/fable-mode/fable-haiku/SKILL.md +1 -1
  122. package/plugins/harness-everything/skills/fable-mode/fable-opus/SKILL.md +2 -2
  123. package/plugins/harness-everything/skills/fable-mode/fable-sonnet/SKILL.md +1 -1
  124. package/plugins/harness-everything/skills/fable-mode/references/execution-phases.md +2 -2
  125. package/plugins/harness-everything/skills/harness-everything/SKILL.md +3 -3
  126. package/plugins/harness-everything/skills/harness-everything/references/router-workflow-plan.md +2 -2
  127. package/plugins/harness-everything/skills/harness-everything/references/skill-registry.md +2 -2
  128. package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +5 -5
  129. package/plugins/harness-everything/skills/harness-everything/scripts/bootstrap.js +1 -26
  130. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +2 -3
  131. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +1 -1
  132. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +1 -1
  133. package/plugins/harness-everything/skills/harness-everything/scripts/routing-keywords.json +0 -2
  134. package/plugins/harness-everything/skills/improve-codebase-architecture/SKILL.md +3 -3
  135. package/plugins/harness-everything/skills/improve-codebase-architecture/guides/refactoring-workflow.md +5 -4
  136. package/plugins/harness-everything/skills/install-cognitive-os/SKILL.md +3 -3
  137. package/plugins/harness-everything/skills/self-evolve/SKILL.md +1 -1
  138. package/plugins/harness-everything/skills/self-evolve/references/memory-resolution.md +3 -3
  139. package/plugins/harness-everything/skills/self-evolve/schemas/lesson-candidate.schema.json +4 -1
  140. package/plugins/harness-everything/skills/self-evolve/scripts/lesson-candidate.js +1 -0
  141. package/plugins/harness-everything/skills/skill-creator/SKILL.md +1 -1
  142. package/plugins/harness-everything/skills/skill-creator/references/quality-checklist.md +1 -1
  143. package/plugins/harness-everything/skills/skill-creator/references/quality-principles.md +4 -4
  144. package/plugins/harness-everything/skills/tdd/SKILL.md +2 -2
  145. package/plugins/harness-everything/skills/tdd/references/core-discipline.md +3 -5
  146. package/plugins/harness-everything/skills/todo-driven-workflow/SKILL.md +2 -2
  147. package/plugins/harness-everything/skills/zoom-out/SKILL.md +14 -26
  148. package/plugins/harness-everything/skills/zoom-out/references/circuit-breaker.md +18 -62
  149. package/references/platform-advisory-template.md +3 -9
  150. package/sbom.cdx.json +7 -7
  151. package/scripts/check-packet-write-set.js +76 -1
  152. package/scripts/lib/advisory-text.js +2 -2
  153. package/scripts/lib/workspace.js +2 -2
  154. package/self-evolve/SKILL.md +1 -1
  155. package/self-evolve/references/memory-resolution.md +3 -3
  156. package/self-evolve/schemas/lesson-candidate.schema.json +4 -1
  157. package/self-evolve/scripts/lesson-candidate.js +1 -0
  158. package/skill-creator/SKILL.md +1 -1
  159. package/skill-creator/references/quality-checklist.md +1 -1
  160. package/skill-creator/references/quality-principles.md +4 -4
  161. package/submission/openai/test-cases.json +5 -5
  162. package/tdd/SKILL.md +2 -2
  163. package/tdd/references/core-discipline.md +3 -5
  164. package/todo-driven-workflow/SKILL.md +2 -2
  165. package/zoom-out/SKILL.md +14 -26
  166. package/zoom-out/references/circuit-breaker.md +18 -62
  167. package/behavioral-evals/opencode-hardlock-live.js +0 -17
  168. package/behavioral-evals/opencode-reflection-gate-live.js +0 -342
  169. package/ci/mechanism-31-opencode-hardlock-evidence.test.js +0 -82
  170. package/evals/zoom-out/tasks/negative-first-edge-case-review.yaml +0 -16
  171. package/evals/zoom-out/tasks/positive-repeated-failure.yaml +0 -15
  172. package/hooks/scripts/reset-circuit-breaker.js +0 -30
  173. package/hooks/scripts/rule-of-3-tracker.js +0 -165
  174. package/hooks/scripts/rule-of-3.js +0 -171
  175. package/plugins/harness-everything/hooks/scripts/reset-circuit-breaker.js +0 -30
  176. package/plugins/harness-everything/hooks/scripts/rule-of-3-tracker.js +0 -165
  177. package/plugins/harness-everything/hooks/scripts/rule-of-3.js +0 -171
@@ -4,7 +4,7 @@ description: Enforce fable-mode context discipline as a shadow guard. Use for st
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.30.8
7
+ version: 0.55.4
8
8
  ---
9
9
 
10
10
  # Fable Discipline (Macro Task Discipline & Safety Net)
@@ -16,7 +16,7 @@ metadata:
16
16
  | **Trigger / Input** | Background shadow for the whole duration `fable-mode` is active — not a standalone trigger. |
17
17
  | **Expected Output** | State compaction after milestones; authorized commit-boundary guidance; a state manifest at every sub-agent handoff. |
18
18
  | **State Mutations** | None of its own — constrains how `fable-mode` and `multi-agent-workspace` mutate state. |
19
- | **Enforcement Gate** | Build divergence is a warning signal: surface it and recommend `zoom-out`. Rule-of-3 owns mandatory reflection. |
19
+ | **Guidance** | Surface build divergence as a warning; an agent may choose `zoom-out` to reassess it. |
20
20
 
21
21
  Shadow guard for `fable-mode`: **MUST** run in the background for its whole duration.
22
22
 
@@ -36,6 +36,6 @@ Shadow guard for `fable-mode`: **MUST** run in the background for its whole dura
36
36
  1. **Anti-context bloat**: After each milestone, **MUST** compact state and decisions; avoid irrelevant broad reads.
37
37
  2. **Physical boundaries**: **MUST** know the CWD. If commits are authorized, independent logic blocks **SHOULD** remain separate; otherwise leave changes uncommitted.
38
38
  3. **Agent handoff**: Outgoing agents **MUST** leave a state manifest; incoming agents **MUST** verify it first.
39
- 4. **Divergence signal**: **MUST** surface diverging errors and recommend `zoom-out`; **SHOULD** map the dependency graph. Divergence alone does not hard-stop execution.
39
+ 4. **Divergence signal**: Divergence is a warning signal; **MUST** surface diverging errors and recommend `zoom-out`; **SHOULD** map the dependency graph. Divergence alone does not hard-stop execution.
40
40
 
41
41
  Deep dive: <this-skill-dir>/references/discipline-rules.md
@@ -19,4 +19,4 @@ When `fable-mode` spawns and switches between different sub-agents via `multi-ag
19
19
  ## 4. Divergence Signal
20
20
  - Large tasks easily generate the sunk cost fallacy of "I think it's almost fixed, let me try one more time."
21
21
  - If Build Errors exhibit a divergent trend (the more you fix, the more it breaks), surface the regression immediately and recommend `zoom-out`; divergence alone is not a hard stop.
22
- - Organize the error dependency graph for the human. Mandatory reflection remains owned by Rule-of-3 after repeated same-signature failures, or by explicit user/host permission boundaries.
22
+ - Organize the error dependency graph for the human. An agent may choose `zoom-out` whenever evidence changes the diagnosis; explicit user/host permission boundaries retain their own authority.
@@ -4,7 +4,7 @@ description: "Stage large tasks through plans, named fable agents, failable chec
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.54.1
7
+ version: 0.55.4
8
8
  ---
9
9
 
10
10
  # Fable Mode
@@ -4,13 +4,11 @@ description: "Reference guardrails for verified warnings and safe replacements;
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.54.1
7
+ version: 0.55.4
8
8
  ---
9
9
 
10
10
  # Execution Guardrails
11
11
 
12
- **USE FOR**: Raising warnings or flagging problems, search-and-replace/regex file edits, batching minor caveats, reporting capability limits.
13
-
14
12
  | Component | Spec |
15
13
  | :--- | :--- |
16
14
  | **Trigger / Input** | Turn raising a warning or performing search-and-replace edits. |
@@ -35,7 +33,7 @@ metadata:
35
33
  2. **Warning batching.** Collect minor concerns and list them together in the next natural report or handoff; their count alone MUST NOT stop, pause, or return the worker/stage. An independently material, confirmed concern may stop the current stage and be surfaced immediately.
36
34
  3. **Find-and-replace safety** — Prefer structured edit tools over shell `sed`; anchor with unique context or `\bword\b` boundaries; verify file integrity post-edit. Never replace-all blindly.
37
35
 
38
- Repeated matching execution failures remain governed by Rule-of-3 / `zoom-out`; warning batching never substitutes for that recovery path.
36
+ When evidence changes the diagnosis, an agent may choose `zoom-out`; warning batching does not create a stop rule.
39
37
 
40
38
  This nested file is reference-only, not an always-on carrier; rules apply only when an active carrier injects them.
41
39
 
@@ -37,9 +37,9 @@ keep working and preserve the batch for the report instead of creating a second
37
37
  breaker.
38
38
 
39
39
  A concern that independently meets the verify-before-flag bar and is material on its own
40
- may stop the current stage and be surfaced immediately. Repeated matching execution
41
- failures are governed separately by Rule-of-3 -> zoom-out -> RESUME/ESCALATE. The
42
- warning threshold governs minor-concern reporting only.
40
+ may stop the current stage and be surfaced immediately. An agent may also choose
41
+ `zoom-out` when evidence changes the diagnosis; neither this guidance nor the warning
42
+ threshold forces a pause or report. The warning threshold governs minor-concern reporting only.
43
43
 
44
44
  ## 3. Find-and-replace safety
45
45
 
@@ -4,7 +4,7 @@ description: "Reference mechanical behavior profile (legacy alias haiku) for bul
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.54.1
7
+ version: 0.55.4
8
8
  ---
9
9
 
10
10
  # Fable Mode — Haiku
@@ -4,7 +4,7 @@ description: "Reference orchestrator behavior profile (legacy alias opus) for st
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.54.1
7
+ version: 0.55.4
8
8
  ---
9
9
 
10
10
  # Fable Mode — Opus
@@ -32,7 +32,7 @@ metadata:
32
32
 
33
33
  1. Resolve legacy alias `opus` to the `orchestrator` behavior profile through `<this-skill-dir>/../scripts/model-selector.js`.
34
34
  2. Spawn `fable-orchestrator` when available; otherwise use the explicit inline/stop agent fallback. The runtime-model floor is advisory and never changes the profile.
35
- 3. The orchestrator owns scope boundaries, advisory replan guidance (never a hard stop), stage contracts, named worker delegation, and escalation; it never produces artifacts itself. After three same-signature failures, Rule-of-3 / `zoom-out` is mandatory.
35
+ 3. The orchestrator owns scope boundaries, advisory replan guidance (never a hard stop), stage contracts, named worker delegation, and escalation; it never produces artifacts itself. Agents may choose `zoom-out` whenever evidence warrants a fresh diagnosis.
36
36
  4. Cold-review high-stakes deliverables with `fable-verifier`; report every unverified stage.
37
37
 
38
38
  Use `<this-skill-dir>/../references/model-matrix.md` for behavior-profile aliases, runtime floors, audit fields, and fallback policy.
@@ -4,7 +4,7 @@ description: "Reference reasoning behavior profile (legacy alias sonnet/sonnect)
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.54.1
7
+ version: 0.55.4
8
8
  ---
9
9
 
10
10
  # Fable Mode — Sonnet
@@ -18,8 +18,8 @@ Read relevant files and sources before producing an artifact. Record the
18
18
  authorized write scope. Give each stage an objective, dependencies, write set,
19
19
  expected output, exact check command, and pass condition. Required and optional
20
20
  bindings belong on the stage that needs them. Replans are advisory and do not
21
- halt tools or Stop; after three same-signature failures, use Rule-of-3
22
- `zoom-out`.
21
+ halt tools or Stop. An agent may choose `zoom-out` when evidence changes the
22
+ diagnosis; productive stages may continue while their next actions are justified.
23
23
 
24
24
  ## Profiles and delegation
25
25
 
@@ -4,7 +4,7 @@ description: "Route software/project work through Harness: classify tier/topolog
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.55.2
7
+ version: 0.55.4
8
8
  ---
9
9
 
10
10
  # Harness Everything
@@ -19,10 +19,10 @@ metadata:
19
19
  ## Invariants
20
20
  1. **Route (MUST)** — scope/tier plus selected/deferred topology.
21
21
  2. **Verify (MUST)** — objective evidence via `verify-gate.js --json`.
22
- 3. **Zoom out (MUST)** — after 3 same-signature failures, use `zoom-out`.
22
+ 3. **Loop awareness (MUST)** — reconsider assumptions when evidence shows stagnation; numeric iteration values MAY guide but never hard-stop.
23
23
  4. **Bind knowledge by step (MUST)** — ordered steps declare required/optional skills/references; only the active step's bindings load and resolve.
24
24
  5. **Surface status (MUST)** — non-trivial work renders `### 🚦 Harness Status` with bold `Current`, `Read / Evidence`, `Next`; `Risk / Blocked` optional.
25
- 6. **Keep agency** — required obligations are MUST; tactics MAY adapt. Numeric planning MAY guide, never hard-stop; only Rule-of-3 reflection and explicit user/host permission boundaries may block.
25
+ 6. **Keep agency** — required obligations are MUST; tactics MAY adapt. Only explicit user/host permission boundaries may block.
26
26
  7. **Windows PowerShell (MUST)** — `Get-Content -Encoding UTF8 -Raw`; npm `.cmd` shims (`npx.cmd`); never weaken `ExecutionPolicy`.
27
27
 
28
28
  ## Workflow
@@ -61,7 +61,7 @@ If the structured contract is missing or invalid, the kernel emits a degraded/un
61
61
 
62
62
  Tier 3 alone never implies a persistent workspace. Likewise, an `independent` label alone is insufficient for `fable-parallel`: the write set must also be `read-only` or `disjoint`.
63
63
 
64
- The Phase 2 `iterative-single` plan exposes **8 iterations** as advisory planning guidance, not a machine-enforced stop. Continue when evidence justifies it; the separate rule-of-3 repeated-failure reflection gate remains the hard boundary.
64
+ The Phase 2 `iterative-single` plan exposes **8 iterations** as advisory planning guidance, not a machine-enforced stop. The existing `loop-awareness` obligation covers stagnation; an agent may start a zoom-out at the first meaningful signal, and productive iteration may continue at any attempt.
65
65
 
66
66
  ## Explicit user choice and prohibitions
67
67
 
@@ -110,7 +110,7 @@ This does not choose a topology and does not itself enforce the gate. Phase 5 ow
110
110
 
111
111
  Examples:
112
112
 
113
- - `loop-awareness` and `objective-verification` are mandatory for `iterative-single`, on top of the base `scope-lock`, `verify-before-claim`, and `replan-after-repeated-failure`;
113
+ - `loop-awareness` and `objective-verification` are mandatory for `iterative-single`, on top of the base `scope-lock` and `verify-before-claim`;
114
114
  - TDD and verification-loop bindings are declared on behavior-change and verification steps, respectively;
115
115
  - `stage-contracts` and `cold-verification` are mandatory for Fable topologies;
116
116
  - domain skills and references are bound only to steps that need them;
@@ -31,8 +31,8 @@ Every skill in this repository is reachable from this router. If a task matches
31
31
  | `grill-with-docs` | Tier 3 | Documenting decisions (ADR / CONTEXT) before large designs. |
32
32
  | `to-spec` | Tier 2/3 (advisory, never a gate) | Synthesizing the (already-settled) conversation into whichever doc shape fits — feature spec, CLI/API reference, schema doc, or dev doc — published to this repo's issue tracker. Explicit-invoke only — never auto-executed. |
33
33
  | `to-tickets` | Tier 2/3 (advisory, never a gate) | Breaking a `to-spec` feature spec (or an already-settled plan/conversation) into tracer-bullet tickets with declared blocking edges. Reuses `to-spec`'s own `check-project-docs.js` gate — never a second setup interview. Explicit-invoke only — never auto-executed. |
34
- | `zoom-out` | Circuit breaker | Rule of 3 trips (§3). |
35
- | `self-evolve` | Evolution | Post-breaker resolution or major breakthrough (§4). |
34
+ | `zoom-out` | Diagnosis | Agent-initiated reassessment when evidence undermines an assumption, exposes an unknown impact boundary, or the user asks for it. |
35
+ | `self-evolve` | Evolution | Capture verified reusable lessons or major breakthroughs (§4). |
36
36
  | `error-ledger-bootstrap` | Error ledger | Inventory local lessons for an existing repository and promote only owner-approved entries. |
37
37
  | `find-skills` | Meta | No static/generated/already-installed skill covers the user's need (checked live via `npx skills list`, not manifest-cached) — searches skills.sh/`npx skills` and, only with explicit approval, applies it ephemerally via a self-expiring OS-temp cache (`scripts/use-skill.js`, the default — zero persistent footprint) or, only if the user wants to keep it, installs via `npx skills add` (the rare exception). Deliberately not manifest-tracked or router-auto-surfaced like `self-evolve`'s `generated[]` — third-party content isn't lifecycle-owned by Harness the way self-authored skills are. |
38
38
  | `skill-style` | Meta | Authoring or modifying any SKILL.md in this repository — the terse Skill Contract format spec. |
@@ -2,7 +2,7 @@
2
2
 
3
3
  Harness uses tiers to estimate scope and select the smallest sufficient execution topology. A tier is **not** a fixed TODO/TDD/Fable pipeline. Once the router selects an applicable topology, however, that topology becomes the run's execution contract.
4
4
 
5
- > Architecture rule: **Contract-first lifecycle; flexible reasoning/implementation; semantic MUSTs may be reminder-observed, while only Rule-of-3 reflection and explicit permission boundaries may hard-block.**
5
+ > Architecture rule: **Contract-first lifecycle; flexible reasoning/implementation; semantic MUSTs may be reminder-observed, while explicit permission boundaries may hard-block.**
6
6
 
7
7
  ## 0. When Harness Routing Applies
8
8
 
@@ -40,7 +40,7 @@ The kernel protects lifecycle obligations without micromanaging model reasoning.
40
40
 
41
41
  1. **Route before execution** — establish task scope/tier and the smallest justified topology.
42
42
  2. **Verify before claim** — completion requires objective evidence appropriate to the change.
43
- 3. **Re-plan on repetition** — after three same-signature failures, stop micro-retrying and use a fresh diagnosis / `zoom-out`.
43
+ 3. **Loop awareness** — reconsider assumptions or re-plan when evidence shows stagnation; numeric iteration values MAY guide but never hard-stop.
44
44
  4. **Bind knowledge by step** — compose ordered requirement steps and declare required/optional skills or references before execution.
45
45
  5. **Resolve selected workflow** — selected-topology required obligations are semantic MUSTs; implementation tactics MAY adapt where the contract allows.
46
46
  6. **Surface status** — non-trivial software/project work MUST use the single Harness Status format at required phase boundaries.
@@ -134,7 +134,7 @@ flowchart LR
134
134
  Y --> S[Summarize]
135
135
  S --> R[Record]
136
136
  S -- evidence insufficient --> T
137
- Y -- same failure x3 --> Z[Zoom Out]
137
+ Y -- evidence shows stagnation --> Z[Agent may use zoom-out]
138
138
  Z --> T
139
139
  ```
140
140
 
@@ -144,11 +144,11 @@ This describes a reasoning policy. The workflow contract governs lifecycle oblig
144
144
 
145
145
  | Host mode | Expected behavior |
146
146
  |---|---|
147
- | Lifecycle hooks available | Kernel records the selected semantic workflow contract. PreToolUse/Stop hooks observe/remind; Rule-of-3 and permission gates are the intentional blocking exceptions. |
147
+ | Lifecycle hooks available | Kernel records the selected semantic workflow contract. PreToolUse/Stop hooks observe/remind; explicit permission gates are the intentional blocking exceptions. |
148
148
  | Instruction-only / advisory delivery | Agent receives the same MUST/SHOULD/MAY semantic contract without lifecycle observations or hard-enforcement claims. |
149
149
  | Manual use | Invoke `harness-everything` / `harness next`, then execute the selected topology explicitly. |
150
150
 
151
- On Claude and the local OpenAI package, supported hooks observe workflow/worktree/verification state and emit reminders. Rule-of-3 reflection and explicit action/permission gates remain separate blocking boundaries.
151
+ On Claude and the local OpenAI package, supported hooks observe workflow/worktree/verification state and emit reminders. Explicit action/permission gates remain separate blocking boundaries.
152
152
 
153
153
  Never turn mechanism/package evidence into a cross-host live-enforcement claim. #82 owns host-specific retained evidence.
154
154
 
@@ -62,37 +62,12 @@ if (!isManagedWorkspace(root)) {
62
62
  // grow forever.
63
63
  pruneStaleSessions(root);
64
64
 
65
- // The manual escape hatch (reset-circuit-breaker.js) and any CLI tool that
66
- // can't see a session_id, resolve "current session" through
65
+ // CLI tools that can't see a session_id resolve the current session through
67
66
  // this pointer.
68
67
  writeCurrentSession(root, sessionId);
69
68
 
70
69
  const harnessDir = getSessionDir(root, sessionId);
71
70
 
72
- // The Rule of 3 circuit breaker (hooks/scripts/rule-of-3.js) locks all
73
- // Bash/Edit/Write calls once tripped; the only in-session exits are a valid
74
- // zoom-out reflection report or a human reset. A new SessionStart means the
75
- // human has taken over (new session, /clear, /compact) and reviewed the
76
- // situation, so it's safe to clear here. The stale reflection report goes
77
- // with it - it belongs to the previous loop, not this session.
78
- const circuitBreakerFile = path.join(harnessDir, 'rule-of-3-state.json');
79
- if (fs.existsSync(circuitBreakerFile)) {
80
- try {
81
- fs.unlinkSync(circuitBreakerFile);
82
- console.log("Rule of 3 circuit breaker state cleared for new session.");
83
- } catch (err) {
84
- // Ignore; worst case the breaker stays tripped until manually reset.
85
- }
86
- }
87
- const zoomOutReportFile = path.join(harnessDir, 'zoom-out-report.md');
88
- if (fs.existsSync(zoomOutReportFile)) {
89
- try {
90
- fs.unlinkSync(zoomOutReportFile);
91
- } catch (err) {
92
- // Ignore; rule-of-3.js already rejects reports older than the last failure.
93
- }
94
- }
95
-
96
71
  // Same reasoning: a stale subagent-scope baseline from a previous session
97
72
  // would make the first Task burst of this session diff against the wrong
98
73
  // starting point.
@@ -26,7 +26,6 @@ const INVARIANT_TEXT = {
26
26
  'environment-alignment': 'MUST establish relevant OS/shell/toolchain/host facts before relying on environment-sensitive behavior.',
27
27
  'verify-before-claim': 'MUST verify before claim with objective evidence appropriate to the change.',
28
28
  'visible-status-updates': 'MUST render the single Markdown Harness Status with a visible heading, bullet-aligned bold labels, Current, Read / Evidence, and Next; add Risk / Blocked only when materially applicable.',
29
- 'replan-after-repeated-failure': 'MUST stop micro-retrying after 3 same-signature failures and zoom out/re-diagnose.',
30
29
  'loop-awareness': 'MUST reconsider assumptions/re-plan when evidence shows iterative stagnation; numeric iteration values MAY guide but never hard-stop.',
31
30
  'objective-verification': 'MUST use an objective check for iterative work; self-critique alone is not verification.',
32
31
  'stage-contracts': 'When Fable is selected, stages MUST have explicit stage contracts and pass conditions.',
@@ -181,7 +180,7 @@ function printKernelContract(plan) {
181
180
  console.log('\n=> ROUTING DEGRADATION: Structured routing is degraded. Keep the strategy deferred unless independent evidence supports a route; do not silently downgrade to Tier 1/direct execution.');
182
181
  }
183
182
 
184
- console.log('\n=> ORCHESTRATION POLICY: Selected-topology required obligations and applicable skill core contracts are semantic MUSTs; implementation tactics MAY adapt. Lifecycle hooks observe/remind rather than hard-block, except user/host permission boundaries and the Rule-of-3 zoom-out.');
183
+ console.log('\n=> ORCHESTRATION POLICY: Selected-topology required obligations and applicable skill core contracts are semantic MUSTs; implementation tactics MAY adapt. Lifecycle hooks observe/remind rather than hard-block, except explicit user/host permission boundaries.');
185
184
  }
186
185
 
187
186
  function printRetainedWorkflow(plan, workflow, activeStep = null, activeStages = []) {
@@ -219,7 +218,7 @@ function printRetainedWorkflow(plan, workflow, activeStep = null, activeStages =
219
218
  console.log(' - Active step: planning/execution obligations; step bindings are not composed or started yet.');
220
219
  }
221
220
  console.log(' - Harness Status stays MUST: one block with Current, Read / Evidence, and Next; add Risk / Blocked only when material. Turn label stays MUST.');
222
- console.log(' - Permission boundary and Rule-of-3 remain active; this reminder is non-blocking.');
221
+ console.log(' - Explicit user/host permission boundaries remain active.');
223
222
  }
224
223
 
225
224
  function route(prompt, stdinPayload) {
@@ -118,7 +118,7 @@ function persistWorkflow(contract, payload, prompt) {
118
118
  guidance: {
119
119
  mode: 'semantic-contract',
120
120
  reasoningPolicy: 'model-controls-how',
121
- hardBoundaries: ['rule-of-3-reflection', 'user-host-permission'],
121
+ hardBoundaries: ['user-host-permission'],
122
122
  },
123
123
  };
124
124
  if (selected && ['tier2', 'tier3'].includes(plan.tier)) {
@@ -325,7 +325,7 @@ function selectWorkflowStrategy(input = {}) {
325
325
  function planMetadataForStrategy(strategy) {
326
326
  const base = {
327
327
  patterns: ['router'],
328
- requiredInvariants: ['scope-lock', 'environment-alignment', 'verify-before-claim', 'replan-after-repeated-failure', 'visible-status-updates'],
328
+ requiredInvariants: ['scope-lock', 'environment-alignment', 'verify-before-claim', 'visible-status-updates'],
329
329
  suggestedSkills: [],
330
330
  knowledgeSignals: [],
331
331
  maxIterations: null,
@@ -607,8 +607,6 @@
607
607
  "error repeats",
608
608
  "infinite loop",
609
609
  "cease fire",
610
- "rule-of-3",
611
- "rule of 3",
612
610
  "every round finds a new edge case",
613
611
  "every review round finds a new edge case",
614
612
  "又陷入反覆修正",
package/hooks/hooks.json CHANGED
@@ -69,17 +69,6 @@
69
69
  "description": "Require explicit approval for destructive or external side effects",
70
70
  "id": "harness:pre:action-gate"
71
71
  },
72
- {
73
- "matcher": "Bash|PowerShell|Edit|Write|apply_patch",
74
- "hooks": [
75
- {
76
- "type": "command",
77
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/rule-of-3.js\""
78
- }
79
- ],
80
- "description": "Rule of 3 Circuit Breaker - Prevents micro-error looping",
81
- "id": "harness:pre:rule-of-3"
82
- },
83
72
  {
84
73
  "matcher": "Grep|Glob|Read",
85
74
  "hooks": [
@@ -211,17 +200,6 @@
211
200
  "description": "Record execution of an approved action-gate payload",
212
201
  "id": "harness:post:action-gate-audit"
213
202
  },
214
- {
215
- "matcher": "Bash|PowerShell|apply_patch",
216
- "hooks": [
217
- {
218
- "type": "command",
219
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/rule-of-3-tracker.js\""
220
- }
221
- ],
222
- "description": "Track error signatures for Rule of 3",
223
- "id": "harness:post:rule-of-3-tracker"
224
- },
225
203
  {
226
204
  "matcher": "Edit|Write|Bash|PowerShell|apply_patch",
227
205
  "hooks": [
@@ -300,17 +278,6 @@
300
278
  "description": "Record that an approved action-gate payload executed but failed",
301
279
  "id": "harness:post-failure:action-gate-audit"
302
280
  },
303
- {
304
- "matcher": "Bash|PowerShell|apply_patch",
305
- "hooks": [
306
- {
307
- "type": "command",
308
- "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/rule-of-3-tracker.js\""
309
- }
310
- ],
311
- "description": "Track failed tool error signatures for Rule of 3",
312
- "id": "harness:post-failure:rule-of-3-tracker"
313
- },
314
281
  {
315
282
  "matcher": "Bash|PowerShell|apply_patch",
316
283
  "hooks": [
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- // Shared path resolution for Harness runtime state (hook JSON, circuit-breaker
3
- // counters, handoff/verification timestamps, etc).
2
+ // Shared path resolution for Harness runtime state (hook JSON,
3
+ // handoff/verification timestamps, etc).
4
4
  //
5
5
  // Lives under a single user-global root - `getWorkspaceStateDir()` from
6
6
  // scripts/lib/workspace.js, i.e. `~/.agents/harness-everything/workspaces/
@@ -17,8 +17,8 @@
17
17
  // workspace, once, the first time that workspace is seen again.
18
18
  //
19
19
  // Session state keys under `sessions/<id>/` so two sessions open on the same
20
- // workspace never share (and stomp) each other's edit/verify timestamps or
21
- // breaker counts. Invocations with no session_id (manual terminal runs,
20
+ // workspace never share (and stomp) each other's edit/verify timestamps.
21
+ // Invocations with no session_id (manual terminal runs,
22
22
  // VERIFICATION.md recipes) fall into a fixed `sessions/default/` bucket
23
23
  // rather than a random one, so manual testing stays predictable.
24
24
  const fs = require('fs');
@@ -229,8 +229,7 @@ function writeCurrentSession(root, sessionId) {
229
229
  fs.mkdirSync(stateRoot, { recursive: true });
230
230
  fs.writeFileSync(path.join(stateRoot, CURRENT_SESSION_FILE), sessionId, 'utf8');
231
231
  } catch (err) {
232
- // Best-effort - only the manual reset-circuit-breaker.js escape hatch
233
- // depends on this, and it fails open too.
232
+ // Session binding is best effort; state pointer failure must not break startup.
234
233
  }
235
234
  }
236
235
 
@@ -11,7 +11,7 @@ const {
11
11
  const { emitLessonTelemetry } = require('./telemetry');
12
12
 
13
13
  const SCHEMA_VERSION = 1;
14
- const TRIGGERS = new Set(['rule-of-3-recovery', 'verifier-fail-pass']);
14
+ const TRIGGERS = new Set(['verifier-fail-pass']);
15
15
 
16
16
  function atomicWriteJson(filePath, value) {
17
17
  fs.mkdirSync(path.dirname(filePath), { recursive: true });
@@ -56,14 +56,6 @@ function sourceIds(values) {
56
56
  }
57
57
 
58
58
  function minimalEvidence(triggerType, evidence = {}) {
59
- if (triggerType === 'rule-of-3-recovery') {
60
- return {
61
- failureSignature: safeId(evidence.failureSignature),
62
- failureCategory: safeText(evidence.failureCategory, 40),
63
- zoomOutCycles: Number.isInteger(evidence.zoomOutCycles) ? evidence.zoomOutCycles : 1,
64
- recovered: evidence.recovered === true,
65
- };
66
- }
67
59
  if (triggerType === 'verifier-fail-pass') {
68
60
  return {
69
61
  planId: safeId(evidence.planId),
@@ -108,11 +100,9 @@ function createLearningOpportunity(payload, input = {}) {
108
100
  state: 'proposed',
109
101
  trigger: {
110
102
  type: triggerType,
111
- reasonCodes: triggerType === 'rule-of-3-recovery'
112
- ? ['repeated-failure', 'zoom-out-completed', 'verified-subsequent-success']
113
- : ['verifier-failed', 'later-verifier-pass'],
103
+ reasonCodes: ['verifier-failed', 'later-verifier-pass'],
114
104
  sourceEventIds: ids,
115
- evidenceClass: triggerType === 'verifier-fail-pass' ? 'objective-transition' : 'runtime-recovery',
105
+ evidenceClass: 'objective-transition',
116
106
  },
117
107
  provenance: {
118
108
  sessionId,
@@ -17,7 +17,7 @@ const POLICY = [
17
17
  'Cross-cutting invariants:',
18
18
  '- Route before execution: establish task scope before mutating work.',
19
19
  '- Verify before claim: require objective evidence appropriate to the change.',
20
- '- Re-plan on repetition: after 3 same-signature failures, zoom out instead of repeating the same attempt.',
20
+ '- Reassess when evidence warrants it: an agent may choose zoom-out at the first meaningful signal or later; productive iteration may continue when attempts add evidence, narrow the cause, and justify the next check.',
21
21
  'Domain skills are advisory. Do not enforce a universal workflow order; choose the smallest useful skill/tool set.'
22
22
  ].join('\n');
23
23
 
@@ -35,7 +35,7 @@ function removeIfPresent(file) {
35
35
  try {
36
36
  if (fs.existsSync(file)) fs.unlinkSync(file);
37
37
  } catch (err) {
38
- // Session reset is best effort; a stale breaker must never block startup.
38
+ // Session cleanup is best effort.
39
39
  }
40
40
  }
41
41
 
@@ -61,8 +61,6 @@ function main() {
61
61
  pruneStaleSessions(root);
62
62
  writeCurrentSession(root, sessionId);
63
63
  const sessionDir = getSessionDir(root, sessionId);
64
- removeIfPresent(path.join(sessionDir, 'rule-of-3-state.json'));
65
- removeIfPresent(path.join(sessionDir, 'zoom-out-report.md'));
66
64
  removeIfPresent(path.join(sessionDir, 'subagent-scope-state.json'));
67
65
  additionalContext += handoffContext(sessionDir);
68
66
  } catch (err) {
@@ -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.