harness-everything 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +8 -0
- package/README.md +7 -7
- package/VERIFICATION.md +3 -3
- package/ci/invariant-routing.test.js +58 -158
- package/ci/mechanism-2a-rule-of-3.test.js +73 -138
- package/ci/mechanism-2ac-atomic-commit-check.test.js +2 -2
- package/ci/mechanism-2af-worktree-isolation.test.js +38 -196
- package/ci/mechanism-2ah-workflow-lifecycle.test.js +20 -831
- package/ci/mechanism-2ai-workspace-fingerprint-batch.test.js +3 -4
- package/ci/mechanism-2b-boundary-guard.test.js +6 -16
- package/ci/mechanism-2e-scope-guard.test.js +8 -24
- package/ci/mechanism-2f-stop-gate.test.js +21 -75
- package/ci/mechanism-2n-opencode-plugin.test.js +13 -28
- package/ci/openai-plugin-package.test.js +8 -8
- package/ci/openai-plugin-runtime.test.js +2 -2
- package/ci/router-workflow-plan.test.js +6 -6
- package/ci/self-evolve-loop.test.js +4 -1
- package/ci/workflow-execution-contract.test.js +51 -129
- package/ci/workflow-plan-consumers-edge.test.js +1 -1
- package/ci/workflow-plan-consumers.test.js +6 -6
- package/docs/architecture.md +21 -21
- package/docs/enforcement-locks.md +41 -102
- package/docs/mechanism-first-skill-mesh.md +2 -2
- package/docs/philosophy.md +2 -2
- package/docs/platform-capabilities.md +3 -3
- package/docs/routing.md +14 -14
- package/docs/workflow-runtime.md +80 -110
- package/evals/harness-everything/tasks/positive-tier1.yaml +1 -1
- package/evals/harness-everything/tasks/positive-tier2.yaml +1 -1
- package/evals/harness-everything/tasks/positive-tier3.yaml +1 -1
- package/evals/using-git-worktrees/tasks/positive-trigger.yaml +1 -1
- package/fable-mode/SKILL.md +1 -1
- package/fable-mode/execution-guardrails/SKILL.md +1 -1
- package/fable-mode/fable-haiku/SKILL.md +1 -1
- package/fable-mode/fable-opus/SKILL.md +1 -1
- package/fable-mode/fable-sonnet/SKILL.md +1 -1
- package/fable-mode/scripts/workflow-plan-consumer.js +4 -3
- package/harness-everything/SKILL.md +11 -11
- package/harness-everything/references/triage-and-tiers.md +11 -11
- package/harness-everything/scripts/kernel-router-core.js +5 -5
- package/harness-everything/scripts/kernel-router.js +15 -17
- package/harness-everything/scripts/router-contract-core.js +1 -1
- package/hooks/hooks.json +10 -23
- package/hooks/scripts/atomic-commit-check.js +1 -1
- package/hooks/scripts/boundary-guard.js +4 -4
- package/hooks/scripts/contract-test.js +8 -11
- package/hooks/scripts/depth-guard.js +2 -2
- package/hooks/scripts/lib/workflow-runtime.js +24 -402
- package/hooks/scripts/rule-of-3-tracker.js +28 -31
- package/hooks/scripts/rule-of-3.js +4 -28
- package/hooks/scripts/state-persist.js +36 -136
- package/hooks/scripts/stop-gate.js +15 -48
- package/hooks/scripts/subagent-scope-guard.js +8 -8
- package/hooks/scripts/workflow-disposition.js +2 -10
- package/hooks/scripts/workflow-gate.js +33 -84
- package/hooks/scripts/workflow-mutation-denied.js +3 -15
- package/hooks/scripts/workflow-stop-gate.js +23 -38
- package/opencode-plugin/README.md +9 -10
- package/opencode-plugin/index.mjs +14 -30
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/hooks/hooks.json +3 -3
- package/plugins/harness-everything/hooks/scripts/atomic-commit-check.js +1 -1
- package/plugins/harness-everything/hooks/scripts/boundary-guard.js +4 -4
- package/plugins/harness-everything/hooks/scripts/contract-test.js +8 -11
- package/plugins/harness-everything/hooks/scripts/depth-guard.js +2 -2
- package/plugins/harness-everything/hooks/scripts/lib/workflow-runtime.js +24 -402
- package/plugins/harness-everything/hooks/scripts/rule-of-3-tracker.js +28 -31
- package/plugins/harness-everything/hooks/scripts/rule-of-3.js +4 -28
- package/plugins/harness-everything/hooks/scripts/state-persist.js +36 -136
- package/plugins/harness-everything/hooks/scripts/stop-gate.js +15 -48
- package/plugins/harness-everything/hooks/scripts/subagent-scope-guard.js +8 -8
- package/plugins/harness-everything/hooks/scripts/workflow-disposition.js +2 -10
- package/plugins/harness-everything/hooks/scripts/workflow-gate.js +33 -84
- package/plugins/harness-everything/hooks/scripts/workflow-mutation-denied.js +3 -15
- package/plugins/harness-everything/hooks/scripts/workflow-stop-gate.js +23 -38
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/scripts/lib/advisory-text.js +16 -29
- package/plugins/harness-everything/skills/fable-mode/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/execution-guardrails/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/fable-haiku/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/fable-opus/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/fable-sonnet/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/scripts/workflow-plan-consumer.js +4 -3
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +11 -11
- package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +11 -11
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +5 -5
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +15 -17
- package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +1 -1
- package/plugins/harness-everything/skills/using-git-worktrees/SKILL.md +5 -5
- package/scripts/lib/advisory-text.js +16 -29
- package/using-git-worktrees/SKILL.md +5 -5
package/docs/architecture.md
CHANGED
|
@@ -4,22 +4,22 @@ This document describes Harness runtime architecture and integration boundaries.
|
|
|
4
4
|
|
|
5
5
|
## Architectural Overview
|
|
6
6
|
|
|
7
|
-
Harness is a **behavior and workflow
|
|
7
|
+
Harness is a **behavior and workflow observer/router**, not a universal fixed workflow or scheduler. The router chooses a useful topology; the model remains free to adapt execution.
|
|
8
8
|
|
|
9
9
|
The minimal kernel establishes:
|
|
10
10
|
|
|
11
11
|
- scope/tier before mutation,
|
|
12
|
-
- a selected workflow topology when task evidence supports one,
|
|
12
|
+
- a selected workflow topology as planning guidance when task evidence supports one,
|
|
13
13
|
- applicability evaluation for every suggested skill before omission,
|
|
14
14
|
- objective evidence before completion,
|
|
15
15
|
- bounded re-plan/recovery after repeated failure,
|
|
16
|
-
- explicit
|
|
16
|
+
- explicit warnings/degraded/escape evidence instead of silent workflow deletion.
|
|
17
17
|
|
|
18
|
-
> **
|
|
18
|
+
> **Guidance-first workflow; flexible reasoning/implementation and execution.**
|
|
19
19
|
>
|
|
20
|
-
>
|
|
20
|
+
> Suggested skills and topology are evaluated from their real flows. Missing or skipped cognitive workflow steps produce evidence/reminders rather than persistent Harness locks.
|
|
21
21
|
|
|
22
|
-
This avoids both extremes:
|
|
22
|
+
This avoids both extremes: no universal Tier-2/Tier-3 pipeline and no maze of self-deadlocking cognitive gates.
|
|
23
23
|
|
|
24
24
|
```mermaid
|
|
25
25
|
flowchart TD
|
|
@@ -50,7 +50,7 @@ flowchart TD
|
|
|
50
50
|
- required invariants,
|
|
51
51
|
- suggested skills that require applicability evaluation,
|
|
52
52
|
- the visible routing checkpoint,
|
|
53
|
-
- a workflow
|
|
53
|
+
- a workflow guidance.
|
|
54
54
|
|
|
55
55
|
The router does not tell the model *how* to solve each stage. It decides what lifecycle shape is required. `direct-single`, `iterative-single`, `fable-staged`, `fable-parallel`, and `fable-multi-agent-workspace` remain deliberately small, non-overlapping topology choices.
|
|
56
56
|
|
|
@@ -58,7 +58,7 @@ The router does not tell the model *how* to solve each stage. It decides what li
|
|
|
58
58
|
|
|
59
59
|
Router suggestions remain useful domain/workflow knowledge, not a universal sequence. Before omission, the agent reads the complete `SKILL.md` entry and evaluates `USE FOR`, `DO NOT USE FOR`, workflow/basic flow, and hard rules. Name/description/router-summary or “routine task” is insufficient evidence.
|
|
60
60
|
|
|
61
|
-
The selected topology is
|
|
61
|
+
The selected topology is a structured planning aid; it does not become a persistent execution lock.
|
|
62
62
|
|
|
63
63
|
### Runtime workflow state
|
|
64
64
|
|
|
@@ -66,16 +66,16 @@ On host paths that can persist it, `kernel-router.js` records session-scoped `wo
|
|
|
66
66
|
|
|
67
67
|
For selected Fable topologies on Claude:
|
|
68
68
|
|
|
69
|
-
- `workflow-gate.js`
|
|
69
|
+
- `workflow-gate.js` observes supported mutation/worktree/Fable state and emits reminders;
|
|
70
70
|
- Fable owns stage contracts, `dependsOn`/`writeSet`, validated execution batches, objective per-stage checks, synthesis, cold verification, and bounded re-plans;
|
|
71
|
-
- `workflow-stop-gate.js`
|
|
72
|
-
- `workflow-disposition.js`
|
|
71
|
+
- `workflow-stop-gate.js` reports unresolved stage/verification evidence without rejecting Stop;
|
|
72
|
+
- `workflow-disposition.js` records explicit lifecycle/audit decisions; numeric budgets are no longer authoritative control state.
|
|
73
73
|
|
|
74
74
|
Other topologies use their own applicable mechanisms: loop budgets, regular verification stop-gates, action gates, and task-specific skills. Mechanism coverage is not assumed identical across hosts.
|
|
75
75
|
|
|
76
76
|
### Scoped runtime advisories and capabilities
|
|
77
77
|
|
|
78
|
-
Two kernel mechanisms
|
|
78
|
+
Two kernel mechanisms annotate plans without creating hard workflow enforcement:
|
|
79
79
|
|
|
80
80
|
- **Ensemble policy (`harness-everything/scripts/ensemble-policy.js`):** an advisory plan annotation, not a separate topology. It is selected only when uncertainty is high (or stakes are high) **and** the task asks for comparable outputs or preserves explicit disagreement **and** the selected strategy is already `fable-*`. Creative generation, mechanical bulk work, an explicit user prohibition, unavailable subagents, or a blocked base plan force exclusion. When selected, the plan caps at 3 candidates with `preserve-disagreement` synthesis, an independent verifier, and `parallel-self-consistency` pattern invariants. Covered by deterministic mechanism tests; no live-host effectiveness claim follows from the annotation alone.
|
|
81
81
|
- **Single-use memory capability (`kernel-router.js#issueMemoryCapability`):** when the selected plan permits memory writes, the router issues one capability token bound to `sessionId`/`workflowId` with a stored SHA-256 hash (`memoryAuthorization`, coordinator-only writer role, `usedAt` tracking). Plans with `memory.write === 'none'` receive no capability. This binds a memory write to the workflow that authorized it; it is not a general credential and proves nothing about a live host honoring the binding.
|
|
@@ -84,11 +84,11 @@ Two kernel mechanisms adjust plans without changing the mandatory-workflow contr
|
|
|
84
84
|
|
|
85
85
|
On the Claude hook path, three narrowly scoped `PreToolUse` guards sit alongside the workflow/action gates:
|
|
86
86
|
|
|
87
|
-
- `boundary-guard.js` (Grep/Glob/Read):
|
|
87
|
+
- `boundary-guard.js` (Grep/Glob/Read): warns about very large reads and noisy search roots; it fails open.
|
|
88
88
|
- `depth-guard.js` (Write): blocks overwriting an existing file that was never Read earlier in the session transcript. New files are unaffected. Fails open on parse/lookup errors.
|
|
89
89
|
- `context-compact.js`: estimates working-tree context pressure from `git status`/`git diff --numstat` so later stages can compact or halt before lost-in-the-middle degradation.
|
|
90
90
|
|
|
91
|
-
Shell mutation
|
|
91
|
+
Shell mutation observation is best-effort evidence for reminders. The old mutation-probe reservation/lock subsystem was retired by #190.
|
|
92
92
|
|
|
93
93
|
## Integration Touchpoints
|
|
94
94
|
|
|
@@ -98,23 +98,23 @@ Harness aligns to each host's actual lifecycle/tool APIs. Shared skill text defi
|
|
|
98
98
|
|
|
99
99
|
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.
|
|
100
100
|
|
|
101
|
-
### Claude Code — hook
|
|
101
|
+
### Claude Code — hook guidance plus explicit safety boundaries
|
|
102
102
|
|
|
103
103
|
The installer configures native lifecycle hooks and project skills.
|
|
104
104
|
|
|
105
105
|
- `SessionStart`: bootstrap/restoration.
|
|
106
|
-
- `UserPromptSubmit`: kernel routing +
|
|
107
|
-
- `PreToolUse`: workflow
|
|
106
|
+
- `UserPromptSubmit`: kernel routing + workflow guidance.
|
|
107
|
+
- `PreToolUse`: workflow/boundary/depth/scope reminders, plus separate action permission and Rule-of-3 boundaries.
|
|
108
108
|
- `PostToolUse`: outcomes, state, repeated-failure evidence, stage checks.
|
|
109
|
-
- `Stop`: action-gate audit
|
|
109
|
+
- `Stop`: action-gate audit plus non-blocking workflow/verification reminders.
|
|
110
110
|
|
|
111
|
-
These hooks make
|
|
111
|
+
These hooks make reminders observable; they do not promote cognitive workflow guidance into hard enforcement.
|
|
112
112
|
|
|
113
113
|
### OpenCode — plugin enforcement, scoped live verification
|
|
114
114
|
|
|
115
115
|
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.
|
|
116
116
|
|
|
117
|
-
This evidence does not establish the
|
|
117
|
+
This evidence predates #190 and does not establish behavioral effectiveness of the current guidance-first lifecycle.
|
|
118
118
|
|
|
119
119
|
### Cursor — skills plus advisory rules
|
|
120
120
|
|
|
@@ -161,7 +161,7 @@ flowchart TD
|
|
|
161
161
|
R -- No --> Block
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
The orchestrator
|
|
164
|
+
The orchestrator coordinates lifecycle and evidence; scope drift is reported for review rather than turned into a cognitive deadlock.
|
|
165
165
|
|
|
166
166
|
## Cognitive OS and Skill Mesh
|
|
167
167
|
|
|
@@ -1,114 +1,53 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
Harness
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
# Guidance and Safety Boundary Diagnostic Flows
|
|
2
|
+
|
|
3
|
+
Harness deliberately separates **cognitive guidance** from **authorization/safety boundaries**.
|
|
4
|
+
|
|
5
|
+
## Classification
|
|
6
|
+
|
|
7
|
+
| Mechanism | Behavior | Hard block? |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Workflow routing/state | Remind about selected topology, stale/blocked descriptive state, missing Fable correlation, or safer worktree usage | No |
|
|
10
|
+
| Iteration/revision/replan/worker guidance | Planning hints only | No |
|
|
11
|
+
| Verification / Stop | Remind when no successful verification is observed after an edit | No |
|
|
12
|
+
| Boundary guard | Warn about very large reads or noisy search roots | No |
|
|
13
|
+
| Depth guard | Remind when editing a file that has not been inspected | No |
|
|
14
|
+
| Subagent scope guard | Report ambiguous/out-of-scope changes for review | No |
|
|
15
|
+
| Atomic commit check | Warn when changes look broader than one atomic concern | No |
|
|
16
|
+
| Fable contract test | Record pass/fail/ambiguity/dependency evidence and warn | No |
|
|
17
|
+
| Rule of 3 | Third matching failure requires a zoom-out reflection before more mutation | **Yes — intentional cognitive boundary** |
|
|
18
|
+
| Action/permission gate | User/host authorization for destructive or external side effects | **Yes — trust boundary** |
|
|
19
|
+
|
|
20
|
+
## Rule of 3
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
same signature #1 -> record
|
|
24
|
+
same signature #2 -> record
|
|
25
|
+
same signature #3 -> pause mutation and require zoom-out
|
|
26
|
+
reflection accepted -> count resets
|
|
27
|
+
later #1/#2/#3 -> another zoom-out
|
|
25
28
|
```
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- **Pre-tool denial:** the requested operation did not run.
|
|
30
|
-
- **Post-tool tracking:** the operation ran and its outcome updated state.
|
|
31
|
-
- **Stop denial:** the turn cannot claim completion yet; it does not necessarily prevent the next tool call.
|
|
32
|
-
- **Approval request:** the exact destructive or external action waits for authorization; it is not a retry lock.
|
|
33
|
-
|
|
34
|
-
## Which mechanism stopped progress?
|
|
35
|
-
|
|
36
|
-
Start with the prefix in the error or hook message. Do not infer the mechanism only from the fact that a command did not run.
|
|
37
|
-
|
|
38
|
-
```mermaid
|
|
39
|
-
flowchart TD
|
|
40
|
-
A["Operation or completion blocked"] --> B{"Message prefix or condition"}
|
|
41
|
-
B -- "RULE OF 3" --> C["Repeated-failure circuit breaker"]
|
|
42
|
-
B -- "Workflow gate" --> D["Workflow entry, state,<br/>run, or worktree precondition"]
|
|
43
|
-
B -- "Action gate or permission" --> E["Exact side effect needs approval"]
|
|
44
|
-
B -- "Workflow Completion Gate" --> F["Selected workflow obligations unresolved"]
|
|
45
|
-
B -- "Stop Gate" --> G["Edits lack later successful verification"]
|
|
46
|
-
B -- "Boundary, depth, context,<br/>or scope guard" --> H["Guard-specific policy denial"]
|
|
47
|
-
C --> I["Follow Rule of 3 recovery flow"]
|
|
48
|
-
D --> J["Satisfy named workflow precondition"]
|
|
49
|
-
E --> K["Approve, reject, or change exact payload"]
|
|
50
|
-
F --> L["Resolve stages or report blocked state"]
|
|
51
|
-
G --> M["Run a relevant check or state why not applicable"]
|
|
52
|
-
H --> N["Follow the emitted guard reason"]
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
If a message has no Harness prefix, check the host permission system and the tool's own error before changing Harness state.
|
|
56
|
-
|
|
57
|
-
## Mechanism reference
|
|
58
|
-
|
|
59
|
-
| Mechanism | Trigger | What it blocks | State and persistence | Recovery |
|
|
60
|
-
|---|---|---|---|---|
|
|
61
|
-
| Rule of 3 | The same normalized shell failure signature reaches its category threshold. Defaults to 3; timeout and permission use 2; environment and dependency use 4. | Mutating tools. Read-only investigation remains available, and the required zoom-out report is the only permitted write. | Session-scoped `rule-of-3-state.json`. A second trip of the same signature after one accepted reflection becomes a human-decision hard lock. | First trip: produce a fresh valid `zoom-out-report.md`. Repeat trip: human runs `npm run harness:reset`, starts a new session, or uses `/clear`. |
|
|
62
|
-
| Workflow gate | Active workflow state or entry contract is incompatible with the requested mutation; examples include blocked/failed/satisfied state, missing correlated Fable run, or missing linked worktree for major work. | The requested mutation. Read-only commands and trusted workflow-controller commands have narrow exceptions. | Session workflow state. Major-workflow isolation is a hard precondition, not an automatic fallback. | Use the exact message: enter a linked worktree, start/replan through the controller, resolve blocked state, or submit a new task after satisfaction. |
|
|
63
|
-
| Action gate | A shell rule or structured destructive/external action matches the policy. | Only the exact action payload; its hash is used for audit correlation. | Approval/audit state records pending, executed, failed, or rejected disposition. | Approve or reject through the host flow, or change the action. Approval of one payload does not authorize a different payload. |
|
|
64
|
-
| Workflow completion gate | A selected workflow is stopping with unresolved stage, correlation, or verification obligations. | Completion. On a repeated stop-hook attempt it records a blocked state instead of looping forever. | `workflow-run.json` plus correlated stage/handoff state. | Resolve the named obligation. If genuinely blocked, report the blocker rather than claim completion. |
|
|
65
|
-
| Ordinary stop gate | A dirty tree contains edits with no later successful verification-like command. | Completion once per edit batch. It is intentionally a bounce, not a persistent cage. | `stop-gate-state.json` remembers the edit timestamp already bounced. | Run a targeted test/build/lint check, or explicitly state why verification is not applicable and stop again. |
|
|
66
|
-
| Boundary/depth/context/scope guards | A guard-specific read, write, context-pressure, or subagent-scope condition matches. | The matching tool or workflow step. | Mechanism-specific; these are not Rule of 3 counters. | Follow the emitted reason and the corresponding architecture documentation. |
|
|
67
|
-
|
|
68
|
-
## Rule of 3 state transitions
|
|
69
|
-
|
|
70
|
-
The tracker hashes a normalized failure together with category, file path, and command context. A different signature starts a new counter. A confirmed successful action clears recovery state.
|
|
71
|
-
|
|
72
|
-
```mermaid
|
|
73
|
-
stateDiagram-v2
|
|
74
|
-
[*] --> Counting
|
|
75
|
-
Counting --> Counting: same signature below threshold
|
|
76
|
-
Counting --> Reflecting: threshold reached
|
|
77
|
-
Reflecting --> Counting: valid fresh report with RESUME
|
|
78
|
-
Reflecting --> Escalating: valid fresh report with ESCALATE
|
|
79
|
-
Counting --> HardLocked: same signature trips after reflection
|
|
80
|
-
HardLocked --> [*]: human reset or new session
|
|
81
|
-
Counting --> [*]: confirmed success
|
|
82
|
-
Escalating --> HardLocked: mutation retried and signature trips again
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
A valid reflection report must be newer than the failure that tripped the breaker, contain `Goal`, `Failed Attempts`, `Verified Facts`, `Diagnosis`, and `Decision`, and end in a `RESUME` or `ESCALATE` decision. A stale report cannot release a later trip.
|
|
86
|
-
|
|
87
|
-
## Pre-tool ordering and overlapping denials
|
|
30
|
+
There are no category-specific 2/4 thresholds and no second-stage permanent hard lock.
|
|
88
31
|
|
|
89
|
-
|
|
32
|
+
## Workflow reminders
|
|
90
33
|
|
|
91
|
-
|
|
34
|
+
A workflow may be marked `blocked`, `failed`, or carry legacy `budget-exhausted` evidence. Those states are useful diagnostics but no longer cause `workflow-gate.js` to reject mutation.
|
|
92
35
|
|
|
93
|
-
|
|
94
|
-
2. After workflow entry is fixed, the action gate may still require approval for the same force push.
|
|
95
|
-
3. Rule of 3 is relevant only when repeated tracked failures reached the signature threshold; it should not be reset to bypass workflow or approval requirements.
|
|
36
|
+
Missing verification at Stop similarly produces a reminder rather than a bounce.
|
|
96
37
|
|
|
97
|
-
|
|
38
|
+
## Why #190 removed hard workflow enforcement
|
|
98
39
|
|
|
99
|
-
|
|
40
|
+
The previous numeric enforcement required mutation probes, stale-probe recovery, shared counters, exact-limit exceptions, shell classification, reset controllers, and a filesystem lock. #190 removed that chain instead of hardening it.
|
|
100
41
|
|
|
101
|
-
The
|
|
42
|
+
The design test is simple:
|
|
102
43
|
|
|
103
|
-
|
|
44
|
+
> If better cognitive guidance requires another lock, lease, heartbeat, counter-recovery protocol, or parser exception, prefer a reminder.
|
|
104
45
|
|
|
105
|
-
##
|
|
46
|
+
## Troubleshooting
|
|
106
47
|
|
|
107
|
-
|
|
48
|
+
When a Harness message appears:
|
|
108
49
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
- `hooks/scripts/stop-gate.js` — ordinary one-bounce verification behavior.
|
|
114
|
-
- [Harness Architecture](architecture.md) and [Workflow Runtime](workflow-runtime.md) — broader runtime contracts and limitations.
|
|
50
|
+
1. If it is a **Reminder**, use the evidence to improve the next action, but there is no Harness reset needed.
|
|
51
|
+
2. If it is the **Rule of 3** third-failure boundary, complete the requested zoom-out report.
|
|
52
|
+
3. If it is an **action/permission** decision, follow the host/user approval flow.
|
|
53
|
+
4. Do not edit Harness state files merely to recover from a numeric workflow limit; those limits are no longer enforced.
|
|
@@ -4,7 +4,7 @@ Harness coordinates independently useful skills through a small workflow runtime
|
|
|
4
4
|
|
|
5
5
|
The preferred shape is:
|
|
6
6
|
|
|
7
|
-
> **
|
|
7
|
+
> **guidance-first workflow + local skill autonomy + narrow runtime mechanisms**
|
|
8
8
|
|
|
9
9
|
Platform-specific enforcement claims remain bounded by [platform-capabilities.md](platform-capabilities.md).
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ A skill should answer:
|
|
|
19
19
|
3. **What workflow/mechanism do I expose?** A local flow, verifier, script, gate, or stable result when useful.
|
|
20
20
|
4. **What evidence means I am done?** A check, artifact, or explicit blocked state.
|
|
21
21
|
|
|
22
|
-
The router may surface several skills. Those suggestions must be evaluated from their actual `SKILL.md` flows before omission. They are **not** automatically all executed. Separately, the router selects one smallest sufficient outer topology. **The selected topology
|
|
22
|
+
The router may surface several skills. Those suggestions must be evaluated from their actual `SKILL.md` flows before omission. They are **not** automatically all executed. Separately, the router selects one smallest sufficient outer topology. **The selected topology guides the run.**
|
|
23
23
|
|
|
24
24
|
## Why Not One Global Skill Sequence?
|
|
25
25
|
|
package/docs/philosophy.md
CHANGED
|
@@ -9,14 +9,14 @@ The mechanism/enforcement boundary remains platform-specific; see [Platform Capa
|
|
|
9
9
|
## Core Philosophy: Constrain Lifecycle, Not Reasoning
|
|
10
10
|
|
|
11
11
|
1. **Reasoning autonomy remains high.** The model chooses implementation technique, tools, decomposition details, and tactics inside the selected workflow.
|
|
12
|
-
2. **Applicable workflow is
|
|
12
|
+
2. **Applicable workflow is guidance: routing should make useful structure visible without taking execution agency away from the model/user.
|
|
13
13
|
3. **Skill applicability is explicit.** Router-suggested skills are read/evaluated before omission. A suggestion can be `not-applicable` when its actual flow does not match; a selected topology is stronger and cannot simply be skipped.
|
|
14
14
|
4. **Escape is conditional, not default.** If the selected workflow genuinely cannot represent part of the task, record the uncovered scope and evidence, then allow model-defined handling only for that uncovered portion.
|
|
15
15
|
5. **Mechanisms beat stronger wording.** Important lifecycle transitions should use structured state, objective evidence, hooks/plugins, exit codes, and completion gates where the host supports them rather than escalating `MUST`/`CRITICAL` prose.
|
|
16
16
|
|
|
17
17
|
This principle can be summarized as:
|
|
18
18
|
|
|
19
|
-
> **
|
|
19
|
+
> **guidance-first applicable workflow; flexible reasoning/implementation inside it; evidence-backed escape only where the workflow does not cover the task.**
|
|
20
20
|
|
|
21
21
|
The goal is not to make the model less capable. It is to prevent capability/confidence from silently deleting engineering obligations such as verification, bounded re-planning, stage checks, documentation checks, or safety gates when those obligations are applicable.
|
|
22
22
|
|
|
@@ -19,9 +19,9 @@ All `liveHostVerification` rows except OpenCode are `Unknown`. OpenCode's row is
|
|
|
19
19
|
|
|
20
20
|
### Routing contract vs. host evidence
|
|
21
21
|
|
|
22
|
-
The repository routing contract uses **
|
|
22
|
+
The repository routing contract uses **guidance-first workflow selection**. Each suggested skill still requires reading its complete `SKILL.md` entry/basic flow before omission; the selected topology is planning guidance and unresolved evidence produces reminders rather than a persistent workflow lock. A name, description, router summary, tier label, or generic “routine task” judgement is not enough skip evidence; unreadable suggestions are `unresolved/unavailable`, not silent skips.
|
|
23
23
|
|
|
24
|
-
This is a **repository/agent contract**, not an automatic upgrade to any platform row below. A hook can prove that the contract was injected into a session; it does not prove the model actually read every suggested skill. Instruction-only surfaces can carry the same rule without mechanically enforcing it. Promoting this behavior to live-host compliance requires retained host/session evidence under the #82 compatibility program. The Claude and local OpenAI packages
|
|
24
|
+
This is a **repository/agent contract**, not an automatic upgrade to any platform row below. A hook can prove that the contract was injected into a session; it does not prove the model actually read every suggested skill. Instruction-only surfaces can carry the same rule without mechanically enforcing it. Promoting this behavior to live-host compliance requires retained host/session evidence under the #82 compatibility program. The 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.
|
|
25
25
|
|
|
26
26
|
## Current capability summary
|
|
27
27
|
|
|
@@ -88,7 +88,7 @@ The general installer merges shared files only through Harness-owned markers and
|
|
|
88
88
|
|
|
89
89
|
## OpenCode boundary
|
|
90
90
|
|
|
91
|
-
The OpenCode adapter uses the documented plugin API and has deterministic mechanism coverage. 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
|
|
91
|
+
The OpenCode adapter uses the documented plugin API and has deterministic mechanism coverage. 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 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). Global scope, npm-package installation, and other host versions remain unverified.
|
|
92
92
|
|
|
93
93
|
## Official sources
|
|
94
94
|
|
package/docs/routing.md
CHANGED
|
@@ -4,21 +4,21 @@ Harness classifies software work and selects the smallest sufficient execution t
|
|
|
4
4
|
|
|
5
5
|
The current architecture follows two coupled rules:
|
|
6
6
|
|
|
7
|
-
> **
|
|
7
|
+
> **Guidance-first workflow; flexible reasoning/implementation and execution.**
|
|
8
8
|
>
|
|
9
|
-
> **Skill applicability is evaluated explicitly;
|
|
9
|
+
> **Skill applicability is evaluated explicitly; skipped guidance should have a concise evidence-based reason.**
|
|
10
10
|
|
|
11
11
|
A strong model remains free to decide *how* to perform the work. It may not decide that an applicable selected lifecycle can be skipped because the task feels simple or already understood.
|
|
12
12
|
|
|
13
13
|
## Kernel invariants
|
|
14
14
|
|
|
15
|
-
For software/project work, Harness establishes
|
|
15
|
+
For software/project work, Harness establishes routing context and lightweight rails before broad mutation:
|
|
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
19
|
3. **Re-plan after repeated failure** — after three same-signature failures, stop micro-retrying and use a fresh diagnosis / `zoom-out`.
|
|
20
20
|
4. **Evaluate before omission** — read every suggested skill's complete `SKILL.md` entry before deciding applicability.
|
|
21
|
-
5. **
|
|
21
|
+
5. **Review selected workflow** — use it as planning guidance and surface unresolved evidence before claiming completion.
|
|
22
22
|
|
|
23
23
|
The model owns tools, implementation technique, reasoning, and decomposition details inside those rails.
|
|
24
24
|
|
|
@@ -30,8 +30,8 @@ kernel-router.js
|
|
|
30
30
|
├─ preserves tier + rationale + dynamic-skill recommendations
|
|
31
31
|
├─ emits required invariants + structured workflow plan
|
|
32
32
|
├─ requires applicability evaluation for suggested skills
|
|
33
|
-
├─
|
|
34
|
-
└─ exposes
|
|
33
|
+
├─ records the selected workflow guidance
|
|
34
|
+
└─ exposes warnings/degraded/escape evidence instead of silently hiding limitations
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
Use:
|
|
@@ -97,7 +97,7 @@ No universal `TODO → TDD → verification-loop` order is implied. But when a s
|
|
|
97
97
|
|
|
98
98
|
Typical triggers: repository-wide refactors, architecture/migration work, broad synthesis, or bounded delegation. The router may select `fable-staged`, `fable-parallel`, or `fable-multi-agent-workspace`.
|
|
99
99
|
|
|
100
|
-
A selected Fable topology is
|
|
100
|
+
A selected Fable topology is structured guidance for that run; dependency/write-set validation remains useful evidence, while missing workflow state does not hard-block execution.
|
|
101
101
|
|
|
102
102
|
Tier 3 does **not** automatically mean multi-agent. The smallest sufficient topology still wins.
|
|
103
103
|
|
|
@@ -107,25 +107,25 @@ Tier 3 does **not** automatically mean multi-agent. The smallest sufficient topo
|
|
|
107
107
|
|
|
108
108
|
Policy lives in `hooks/scripts/action-gate-rules.json`. Matched actions are handled according to host capability and configured policy; approved/executed payload identity is audited. `HARNESS_ACTION_GATE_POLICY=always-ask` forces Claude's ask path where supported. Unsupported host behavior must remain visible rather than being described as equivalent hard enforcement.
|
|
109
109
|
|
|
110
|
-
## Workflow lifecycle
|
|
110
|
+
## Workflow lifecycle reminders
|
|
111
111
|
|
|
112
112
|
The [workflow runtime contract](workflow-runtime.md) defines the executable boundary:
|
|
113
113
|
|
|
114
|
-
- `workflow-gate.js`
|
|
115
|
-
- `workflow-stop-gate.js`
|
|
114
|
+
- `workflow-gate.js` observes shell/direct mutation, Fable correlation, and major-workflow Git isolation and emits reminders.
|
|
115
|
+
- `workflow-stop-gate.js` reports unresolved stage/verification evidence without rejecting Stop.
|
|
116
116
|
- `workflow-disposition.js` starts/replans the run, records a scoped stage escape, or reports `blocked`.
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
Follow-up prompts retain useful evidence, but unresolved cognitive workflow state does not lock mutation or completion.
|
|
119
119
|
|
|
120
120
|
Direct/iterative verification milestones are checked, while semantic check quality and iteration budgeting remain executor obligations. Shell inspection does not contain arbitrary script side effects. Package/mechanism tests do not prove host loading or behavioral compliance; #82 owns retained live evidence.
|
|
121
121
|
|
|
122
122
|
## Cognitive OS relationship
|
|
123
123
|
|
|
124
|
-
`install-cognitive-os` remains the explanatory/manual entry point for Discover → Think → Try → Summarize → Record. It is a reasoning policy, not a peer skill that must be selected before domain work. The selected workflow
|
|
124
|
+
`install-cognitive-os` remains the explanatory/manual entry point for Discover → Think → Try → Summarize → Record. It is a reasoning policy, not a peer skill that must be selected before domain work. The selected workflow guidance informs lifecycle choices; the model retains execution freedom.
|
|
125
125
|
|
|
126
|
-
##
|
|
126
|
+
## Guidance and enforcement strength
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
Workflow guidance is intentionally non-blocking across hosts. Keep that separate from Rule-of-3 and explicit permission enforcement.
|
|
129
129
|
|
|
130
130
|
- **contract:** what the agent is required to do;
|
|
131
131
|
- **mechanism:** which transitions a packaged hook/plugin can block or observe;
|