harness-everything 0.8.0 → 0.8.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/.github/workflows/ci.yml +12 -2
- package/AGENTS.md +36 -35
- package/CHANGELOG.md +17 -0
- package/README.md +2 -2
- package/benchmarks/results/reviews/pr142-verification.json +95 -0
- package/ci/action-gate.test.js +1 -1
- package/ci/doc-capability-consistency.test.js +3 -0
- package/ci/invariant-routing.test.js +87 -74
- package/ci/mechanism-2af-worktree-isolation.test.js +152 -0
- package/ci/mechanism-2ag-router-worktree-contract.test.js +44 -0
- package/ci/mechanism-2ah-workflow-lifecycle.test.js +140 -0
- package/ci/openai-plugin-package.test.js +9 -6
- package/ci/workflow-execution-contract.test.js +60 -0
- package/docs/architecture.md +111 -114
- package/docs/mechanism-first-skill-mesh.md +92 -103
- package/docs/openai-plugin.md +1 -1
- package/docs/philosophy.md +40 -33
- package/docs/platform-capabilities.md +2 -2
- package/docs/reviews/pr-142-issue-131.md +89 -0
- package/docs/routing.md +61 -124
- package/docs/workflow-runtime.md +109 -0
- package/fable-mode/CONTRACT-FORMAT.md +3 -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 +3 -1
- package/harness-everything/SKILL.md +11 -10
- package/harness-everything/references/triage-and-tiers.md +76 -107
- package/harness-everything/scripts/kernel-router-core.js +263 -0
- package/harness-everything/scripts/kernel-router.js +97 -225
- package/harness-everything/scripts/router-contract-core.js +612 -0
- package/harness-everything/scripts/router-contract.js +21 -581
- package/hooks/hooks.json +22 -1
- package/hooks/scripts/contract-test.js +24 -2
- package/hooks/scripts/lib/workflow-isolation.js +102 -0
- package/hooks/scripts/lib/workflow-runtime.js +102 -0
- package/hooks/scripts/state-persist.js +1 -0
- package/hooks/scripts/workflow-disposition.js +97 -0
- package/hooks/scripts/workflow-gate.js +53 -0
- package/hooks/scripts/workflow-stop-gate.js +44 -0
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +2 -2
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/hooks/hooks.json +20 -1
- package/plugins/harness-everything/hooks/scripts/contract-test.js +24 -2
- package/plugins/harness-everything/hooks/scripts/lib/workflow-isolation.js +102 -0
- package/plugins/harness-everything/hooks/scripts/lib/workflow-runtime.js +102 -0
- package/plugins/harness-everything/hooks/scripts/state-persist.js +1 -0
- package/plugins/harness-everything/hooks/scripts/workflow-disposition.js +97 -0
- package/plugins/harness-everything/hooks/scripts/workflow-gate.js +53 -0
- package/plugins/harness-everything/hooks/scripts/workflow-stop-gate.js +44 -0
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/scripts/lib/advisory-text.js +51 -54
- package/plugins/harness-everything/skills/fable-mode/CONTRACT-FORMAT.md +3 -1
- 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 +3 -1
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +11 -10
- package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +76 -107
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +263 -0
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +97 -225
- package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +612 -0
- package/plugins/harness-everything/skills/harness-everything/scripts/router-contract.js +21 -581
- package/plugins/harness-everything/skills/using-git-worktrees/SKILL.md +14 -16
- package/plugins/harness-everything/skills/using-git-worktrees/references/workflow-details.md +44 -85
- package/scripts/lib/advisory-text.js +51 -54
- package/using-git-worktrees/SKILL.md +14 -16
- package/using-git-worktrees/references/workflow-details.md +44 -85
package/docs/architecture.md
CHANGED
|
@@ -1,150 +1,154 @@
|
|
|
1
1
|
# Harness Architecture
|
|
2
2
|
|
|
3
|
-
This document describes
|
|
4
|
-
|
|
5
|
-
---
|
|
3
|
+
This document describes Harness runtime architecture and integration boundaries. Current host capability/evidence claims are centralized in [platform-capabilities.md](platform-capabilities.md); package wiring is not live-host proof.
|
|
6
4
|
|
|
7
5
|
## Architectural Overview
|
|
8
6
|
|
|
9
|
-
Harness is a **
|
|
7
|
+
Harness is a **behavior and workflow supervisor**, not one universal fixed workflow. The router chooses the smallest sufficient execution topology; once selected, that topology becomes a lifecycle contract. The model retains freedom over reasoning, tools, and implementation technique inside the contract.
|
|
10
8
|
|
|
11
|
-
The
|
|
9
|
+
The minimal kernel establishes:
|
|
12
10
|
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
11
|
+
- scope/tier before mutation,
|
|
12
|
+
- a selected workflow topology when task evidence supports one,
|
|
13
|
+
- applicability evaluation for every suggested skill before omission,
|
|
14
|
+
- objective evidence before completion,
|
|
15
|
+
- bounded re-plan/recovery after repeated failure,
|
|
16
|
+
- explicit blocked/degraded/escape state instead of silent workflow deletion.
|
|
18
17
|
|
|
19
|
-
> **
|
|
18
|
+
> **Mandatory applicable workflow; flexible reasoning/implementation inside it.**
|
|
20
19
|
>
|
|
21
|
-
>
|
|
20
|
+
> A suggested skill can be `not-applicable` after evaluating its real flow. A selected topology cannot be replaced with a direct path merely because the model is confident. Escape is only for genuinely uncovered workflow scope and requires evidence.
|
|
22
21
|
|
|
23
|
-
This
|
|
22
|
+
This avoids both extremes: the old universal Tier-2/Tier-3 pipeline and a purely advisory system where the model can rationalize away verification, staging, documentation, or other applicable obligations.
|
|
24
23
|
|
|
25
24
|
```mermaid
|
|
26
25
|
flowchart TD
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Choice --> Tools[Tool calls / edits / tests]
|
|
44
|
-
Tools --> Evidence{Evidence supports completion?}
|
|
45
|
-
Evidence -- Yes --> Done[Evidence-backed completion]
|
|
46
|
-
Evidence -- No --> Retry[Diagnose / iterate]
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
subgraph Defense [Runtime Boundaries]
|
|
50
|
-
Retry --> CB{Same-signature failure x3?}
|
|
51
|
-
CB -- No --> Tools
|
|
52
|
-
CB -- Yes --> ZO[zoom-out / fresh diagnosis]
|
|
53
|
-
ZO --> Tools
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
subgraph Learning [Optional Learning / State]
|
|
57
|
-
Done --> Record[Record / self-evolve when useful]
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
style Kernel fill:#eceff1,stroke:#37474f,stroke-width:2px,color:#000000
|
|
61
|
-
style Defense fill:#fff9c4,stroke:#fbc02d,stroke-width:2px,color:#000000
|
|
62
|
-
style Learning fill:#e3f2fd,stroke:#1e88e5,stroke-width:2px,color:#000000
|
|
26
|
+
U([User Request]) --> B[Session bootstrap / environment]
|
|
27
|
+
B --> K[kernel-router.js]
|
|
28
|
+
K --> T[tier-router.js<br/>classification + task shape]
|
|
29
|
+
T --> P[Structured workflow plan]
|
|
30
|
+
P --> A{Strategy selected?}
|
|
31
|
+
A -- No / deferred --> D[Preserve invariants<br/>choose smallest justified workflow]
|
|
32
|
+
A -- Yes --> C[ACTIVE workflow contract]
|
|
33
|
+
C --> S{Suggested skills?}
|
|
34
|
+
S -- Yes --> E[Read SKILL.md<br/>resolve applicability]
|
|
35
|
+
S -- No --> X[Execute topology]
|
|
36
|
+
E --> X
|
|
37
|
+
X --> V{Required stage/check resolved?}
|
|
38
|
+
V -- Yes --> Done[Evidence-backed completion]
|
|
39
|
+
V -- No --> R[Diagnose / bounded re-plan]
|
|
40
|
+
R --> X
|
|
41
|
+
R -- topology cannot cover scope --> Esc[Evidence-backed escape<br/>uncovered scope only]
|
|
63
42
|
```
|
|
64
43
|
|
|
65
44
|
### Router responsibilities
|
|
66
45
|
|
|
67
|
-
`kernel-router.js` is the public runtime entry
|
|
46
|
+
`kernel-router.js` is the public runtime entry. It consumes the structured classifier contract and exposes:
|
|
68
47
|
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
48
|
+
- tier + rationale,
|
|
49
|
+
- selected/deferred execution strategy,
|
|
50
|
+
- required invariants,
|
|
51
|
+
- suggested skills that require applicability evaluation,
|
|
52
|
+
- the visible routing checkpoint,
|
|
53
|
+
- a workflow execution contract.
|
|
73
54
|
|
|
74
|
-
|
|
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.
|
|
75
56
|
|
|
76
|
-
|
|
57
|
+
### Skill applicability vs. topology execution
|
|
77
58
|
|
|
78
|
-
|
|
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.
|
|
79
60
|
|
|
80
|
-
|
|
61
|
+
The selected topology is stronger. Once selected, it must be entered and resolved unless the runtime records a permitted workflow escape with uncovered scope + evidence. Covered obligations survive the escape.
|
|
81
62
|
|
|
82
|
-
|
|
63
|
+
### Runtime workflow state
|
|
83
64
|
|
|
84
|
-
|
|
65
|
+
On host paths that can persist it, `kernel-router.js` records session-scoped `workflow-run.json` with the selected strategy and lifecycle state. Prompt text is not persisted; only a content hash is retained for correlation.
|
|
85
66
|
|
|
86
|
-
|
|
67
|
+
For selected Fable topologies on Claude:
|
|
87
68
|
|
|
88
|
-
`
|
|
69
|
+
- `workflow-gate.js` checks supported shell/direct mutation, actual direct/patch targets, and registered Git worktree isolation before major-workflow mutation; Fable also requires a run bound to the workflow/session identity;
|
|
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` rejects completion while correlated stage contracts remain unresolved;
|
|
72
|
+
- `workflow-disposition.js` starts/replans within budget, records blockers, and permits only declared-stage evidence-backed escape (`workflow-uncovered-scope` or `host-capability-unavailable`). Covered obligations, isolation, and independent verification survive escape. See [runtime transitions and limitations](workflow-runtime.md).
|
|
89
73
|
|
|
90
|
-
|
|
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.
|
|
91
75
|
|
|
92
|
-
|
|
76
|
+
## Integration Touchpoints
|
|
93
77
|
|
|
94
|
-
|
|
78
|
+
Harness aligns to each host's actual lifecycle/tool APIs. Shared skill text defines a contract; only supported host mechanisms can mechanically block or observe particular transitions.
|
|
95
79
|
|
|
96
|
-
|
|
80
|
+
### Runtime state vs. skill content
|
|
97
81
|
|
|
98
|
-
|
|
82
|
+
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.
|
|
99
83
|
|
|
100
|
-
###
|
|
84
|
+
### Claude Code — hook-enforced mechanisms
|
|
101
85
|
|
|
102
86
|
The installer configures native lifecycle hooks and project skills.
|
|
103
87
|
|
|
104
|
-
- `SessionStart`:
|
|
105
|
-
- `UserPromptSubmit`:
|
|
106
|
-
- `PreToolUse`:
|
|
107
|
-
- `PostToolUse`:
|
|
108
|
-
- `Stop`:
|
|
88
|
+
- `SessionStart`: bootstrap/restoration.
|
|
89
|
+
- `UserPromptSubmit`: kernel routing + active workflow contract.
|
|
90
|
+
- `PreToolUse`: workflow bypass gate, action gate, rule-of-3, boundary/depth/context guards, subagent scope guard.
|
|
91
|
+
- `PostToolUse`: outcomes, state, repeated-failure evidence, stage checks.
|
|
92
|
+
- `Stop`: action-gate audit, selected-Fable completion gate, and ordinary verify-before-claim stop gate.
|
|
93
|
+
|
|
94
|
+
These hooks make some lifecycle obligations mechanically enforceable. They still do not prove a real session loaded/fired them; live evidence remains separate.
|
|
109
95
|
|
|
110
|
-
|
|
96
|
+
### OpenCode — plugin enforcement, scoped live verification
|
|
111
97
|
|
|
112
|
-
|
|
98
|
+
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.
|
|
113
99
|
|
|
114
|
-
|
|
100
|
+
This evidence does not establish the new mandatory-workflow lifecycle on OpenCode. That requires its own adapter/evidence before parity is claimed.
|
|
115
101
|
|
|
116
|
-
###
|
|
102
|
+
### Cursor — skills plus advisory rules
|
|
117
103
|
|
|
118
|
-
|
|
104
|
+
Cursor receives project skills and advisory rules. The semantic workflow contract can be stated, but unsupported lifecycle transitions are not mechanically enforced.
|
|
119
105
|
|
|
120
|
-
###
|
|
106
|
+
### GitHub Copilot agent surfaces — skills plus advisory instructions
|
|
121
107
|
|
|
122
|
-
|
|
108
|
+
Copilot receives Agent Skills/repository instructions. No Harness-specific live hook-enforcement claim is made from repository text alone.
|
|
123
109
|
|
|
124
|
-
###
|
|
110
|
+
### Codex / local OpenAI plugin
|
|
125
111
|
|
|
126
|
-
Codex has
|
|
112
|
+
Codex has multiple distinct Harness surfaces:
|
|
127
113
|
|
|
128
|
-
- The general `--codex` installer
|
|
129
|
-
- The
|
|
114
|
+
- The general `--codex` installer writes repo-scoped `.agents/skills/` plus `AGENTS.md`; when consumed only as instructions, workflow enforcement is advisory/instruction-governed.
|
|
115
|
+
- The **Codex / local OpenAI plugin** under `plugins/harness-everything/` packages canonical skills plus session/prompt/supported-tool/subagent/stop hooks. The package includes workflow-gate adapters, but this is mechanism/package evidence until a live Codex session proves loading/firing.
|
|
116
|
+
- The public OpenAI **Skills-only** artifact excludes local `.codex-plugin` lifecycle hooks; it carries reusable workflow knowledge, not local hard gates.
|
|
130
117
|
|
|
131
|
-
|
|
118
|
+
Do not infer Claude parity from package similarity.
|
|
132
119
|
|
|
133
|
-
|
|
120
|
+
### Continue.dev — rules documented, standalone discovery uncertain
|
|
134
121
|
|
|
135
|
-
|
|
122
|
+
Continue uses native rule files; standalone skill discovery remains separately bounded by the capability matrix.
|
|
136
123
|
|
|
137
|
-
|
|
124
|
+
### Hermes Agent — trusted skills plus advisory context
|
|
138
125
|
|
|
139
|
-
|
|
126
|
+
Hermes uses trusted project/global skill surfaces plus advisory context. Trust/loading and lifecycle enforcement remain host-specific.
|
|
140
127
|
|
|
141
|
-
|
|
128
|
+
## Fable Execution Architecture
|
|
142
129
|
|
|
143
|
-
|
|
130
|
+
Fable is the execution owner for selected `fable-*` topologies.
|
|
131
|
+
|
|
132
|
+
```mermaid
|
|
133
|
+
flowchart TD
|
|
134
|
+
P[Selected Fable plan] --> M[Stage map<br/>dependsOn + writeSet]
|
|
135
|
+
M --> B{Validated batch?}
|
|
136
|
+
B -- No --> Block[Blocked / re-plan]
|
|
137
|
+
B -- Yes --> W[Named workers]
|
|
138
|
+
W --> C[Objective stage checks]
|
|
139
|
+
C --> S[Synthesis barrier]
|
|
140
|
+
S --> V{Verification pass?}
|
|
141
|
+
V -- Yes --> D[Delivery evidence]
|
|
142
|
+
V -- No --> R{Re-plan budget remains?}
|
|
143
|
+
R -- Yes --> M
|
|
144
|
+
R -- No --> Block
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
The orchestrator controls lifecycle and completion; workers do not create peer-to-peer meshes or widen their own write scope. The model remains creative inside each bounded stage, while stage existence/checks/termination are contract state.
|
|
144
148
|
|
|
145
149
|
## Cognitive OS and Skill Mesh
|
|
146
150
|
|
|
147
|
-
The Cognitive OS
|
|
151
|
+
The Cognitive OS remains a reasoning policy:
|
|
148
152
|
|
|
149
153
|
```mermaid
|
|
150
154
|
flowchart LR
|
|
@@ -157,32 +161,25 @@ flowchart LR
|
|
|
157
161
|
Z --> T
|
|
158
162
|
```
|
|
159
163
|
|
|
160
|
-
A domain skill may
|
|
161
|
-
|
|
162
|
-
This separation solves the peer-skill routing problem: a strong host may correctly decide that a task primarily needs `tdd` or `security-review`; that choice is allowed. What it cannot silently erase is the routing/evidence/retry contract or dismiss other suggestions without evaluating their actual skill flows.
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## Security Model & Data Locality
|
|
167
|
-
|
|
168
|
-
Harness runs with a local-first, zero-trust model:
|
|
164
|
+
A domain skill may define RED/GREEN/REFACTOR or another local lifecycle. The selected Harness topology supplies the outer execution contract; domain skills supply tactics/stages when applicable.
|
|
169
165
|
|
|
170
|
-
|
|
171
|
-
2. **Credential protection:** scripts do not require storing user secrets; interactive credentials remain human-controlled.
|
|
172
|
-
3. **Small hook surface:** hook scripts are local Node.js programs and should stay fast and auditable.
|
|
173
|
-
4. **Explicit enforcement labels:** unsupported/advisory behavior must not be documented as hard enforcement.
|
|
174
|
-
5. **Deterministic regression:** mechanism and routing behavior is tested with executable CI gates rather than inferred from documentation.
|
|
166
|
+
## Security and Data Locality
|
|
175
167
|
|
|
176
|
-
|
|
168
|
+
1. **No Harness telemetry service:** project code/state is not uploaded by Harness runtime scripts.
|
|
169
|
+
2. **Credential protection:** credentials remain human/host controlled.
|
|
170
|
+
3. **Small mechanism surface:** hooks should remain fast and auditable.
|
|
171
|
+
4. **Explicit enforcement labels:** instruction, mechanism, and live evidence are distinct.
|
|
172
|
+
5. **Deterministic regression:** workflow/routing/hook contracts are executable CI gates.
|
|
173
|
+
6. **No silent widening:** workflow escape cannot widen authorization, permissions, or external side effects.
|
|
177
174
|
|
|
178
175
|
## Validation Boundary
|
|
179
176
|
|
|
180
|
-
|
|
177
|
+
Validation is layered:
|
|
181
178
|
|
|
182
|
-
- syntax/reference/
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
-
|
|
179
|
+
- syntax/reference/package checks prove package integrity;
|
|
180
|
+
- routing tests prove plan and workflow-contract semantics;
|
|
181
|
+
- mechanism tests prove supported hook/plugin behavior;
|
|
182
|
+
- live-host evidence proves a specific host actually loaded/fired the mechanism;
|
|
183
|
+
- paired behavioral evaluation (#71) is required before claiming the new lifecycle improves outcomes.
|
|
187
184
|
|
|
188
|
-
The architecture
|
|
185
|
+
The architecture diagrams are part of the contract. A runtime orchestration change must update these docs and tests in the same change.
|
|
@@ -1,170 +1,159 @@
|
|
|
1
1
|
# Mechanism-First Skill Mesh
|
|
2
2
|
|
|
3
|
-
Harness
|
|
3
|
+
Harness coordinates independently useful skills through a small workflow runtime. It does **not** make every skill part of one universal DAG, but it also does not leave selected execution topology to model discretion.
|
|
4
4
|
|
|
5
|
-
The preferred shape is
|
|
5
|
+
The preferred shape is:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
> **mandatory applicable workflow + local skill autonomy + narrow runtime mechanisms**
|
|
8
|
+
|
|
9
|
+
Platform-specific enforcement claims remain bounded by [platform-capabilities.md](platform-capabilities.md).
|
|
8
10
|
|
|
9
11
|
## Design Intent
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
Each skill remains understandable/executable on its own, while the kernel provides an outer lifecycle contract.
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
A skill should answer:
|
|
14
16
|
|
|
15
|
-
1. **When should I activate?**
|
|
16
|
-
2. **What do I protect?** The
|
|
17
|
-
3. **What mechanism do I expose?**
|
|
18
|
-
4. **What
|
|
17
|
+
1. **When should I activate?** Clear `USE FOR` / `DO NOT USE FOR` applicability.
|
|
18
|
+
2. **What do I protect?** The failure mode or engineering discipline it addresses.
|
|
19
|
+
3. **What workflow/mechanism do I expose?** A local flow, verifier, script, gate, or stable result when useful.
|
|
20
|
+
4. **What evidence means I am done?** A check, artifact, or explicit blocked state.
|
|
19
21
|
|
|
20
|
-
|
|
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 is mandatory for the run.**
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
## Why Not One Global Skill Sequence?
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
A universal TODO/TDD/Fable sequence would:
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
- add prompt/runtime overhead to small tasks;
|
|
29
|
+
- confuse domain skills with orchestration topology;
|
|
30
|
+
- suppress useful model judgment inside stages;
|
|
31
|
+
- fail poorly on hosts that cannot enforce the same lifecycle APIs.
|
|
27
32
|
|
|
28
|
-
|
|
29
|
-
- It can turn skills into a centralized workflow runner instead of a federation of local engineering disciplines.
|
|
30
|
-
- It can make the model optimize for satisfying the template rather than making the best next engineering move.
|
|
31
|
-
- It adds prompt weight on platforms where the mechanism cannot actually enforce the block.
|
|
33
|
+
So Harness separates **topology** from **capabilities/domain skills**:
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
```text
|
|
36
|
+
tier / task shape
|
|
37
|
+
+
|
|
38
|
+
selected execution topology
|
|
39
|
+
+
|
|
40
|
+
applicable skills/capabilities
|
|
41
|
+
+
|
|
42
|
+
required invariants/gates
|
|
43
|
+
```
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
The topology is the lifecycle contract. Skills are resolved for applicability within/around that contract.
|
|
36
46
|
|
|
37
47
|
## Mechanisms Over Prose
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
Prefer short structured state, tool results, exit codes, and objective evidence over stronger prompt wording.
|
|
40
50
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- **Short:** the result should be easy for the model to keep in active attention.
|
|
44
|
-
- **Actionable:** the output should name the next constraint, gate, or recommended skill.
|
|
45
|
-
- **Non-authoritarian about execution:** the mechanism may require an evaluation step without forcing a universal workflow sequence.
|
|
46
|
-
- **Portable:** hook-capable platforms can run the mechanism automatically; hook-less platforms can call the same script explicitly.
|
|
47
|
-
|
|
48
|
-
Example shape:
|
|
51
|
+
Example:
|
|
49
52
|
|
|
50
53
|
```text
|
|
51
54
|
HARNESS_DECISION
|
|
52
55
|
tier: 2
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
strategy: iterative-single
|
|
57
|
+
workflow_state: active
|
|
58
|
+
required: route-before-execution, objective-verification, loop-budget
|
|
59
|
+
suggest: tdd, verification-loop
|
|
60
|
+
suggestion_policy: evaluate-applicability
|
|
61
|
+
escape_policy: workflow-uncovered-scope-only
|
|
57
62
|
```
|
|
58
63
|
|
|
59
|
-
This
|
|
60
|
-
|
|
61
|
-
---
|
|
64
|
+
This says what must happen without prescribing private reasoning or exact implementation tactics.
|
|
62
65
|
|
|
63
|
-
|
|
66
|
+
Good mechanisms are:
|
|
64
67
|
|
|
65
|
-
|
|
68
|
+
- **short** enough to remain salient;
|
|
69
|
+
- **actionable** with an explicit next state;
|
|
70
|
+
- **failable** when a requirement is unmet;
|
|
71
|
+
- **bounded** by host capability/evidence;
|
|
72
|
+
- **non-prescriptive about HOW** unless a safety/contract requirement needs it.
|
|
66
73
|
|
|
67
|
-
|
|
74
|
+
## Skill Autonomy Contract
|
|
68
75
|
|
|
69
|
-
|
|
70
|
-
- **Local workflow:** the skill should contain enough guidance to execute without reading the whole Harness ecosystem.
|
|
71
|
-
- **Mechanism hook:** if a script can make the skill more reliable, expose it as an optional or required command.
|
|
72
|
-
- **Neighbor links:** when another skill is commonly needed, recommend it by name and explain why.
|
|
73
|
-
- **Exit discipline:** if the skill reaches a blocking state, it should say what evidence is missing or what human decision is needed.
|
|
76
|
+
Every skill should retain:
|
|
74
77
|
|
|
75
|
-
|
|
78
|
+
- an independent trigger;
|
|
79
|
+
- a local workflow;
|
|
80
|
+
- objective/failable checks where possible;
|
|
81
|
+
- explicit neighbor links rather than hidden dependencies;
|
|
82
|
+
- blocked/exit discipline.
|
|
76
83
|
|
|
77
|
-
|
|
84
|
+
Read-before-omission exists so the agent can inspect this local contract without loading the entire ecosystem. If the skill flow applies, follow it; reading a skill is not permission to discard an applicable discipline because the model believes it already knows the answer.
|
|
78
85
|
|
|
79
86
|
## Coordination Patterns
|
|
80
87
|
|
|
81
|
-
Harness should coordinate skills through small, composable patterns.
|
|
82
|
-
|
|
83
88
|
### Router Decision
|
|
84
89
|
|
|
85
|
-
`harness-everything/scripts/kernel-router.js`
|
|
90
|
+
`harness-everything/scripts/kernel-router.js` emits tier, strategy, invariants, skill suggestions, and an execution contract.
|
|
86
91
|
|
|
87
|
-
|
|
92
|
+
- Suggested skills: read and resolve applicability (`use`, `not-applicable`, `unresolved/unavailable`).
|
|
93
|
+
- Selected topology: execute to resolution (`active` → verified/satisfied, blocked, or explicit evidence-backed escape).
|
|
88
94
|
|
|
89
|
-
|
|
95
|
+
Names/descriptions/router summaries or “routine task” judgements cannot resolve applicability by themselves.
|
|
90
96
|
|
|
91
|
-
|
|
97
|
+
### Fable Stage Contracts
|
|
98
|
+
|
|
99
|
+
For `fable-*` strategies, Fable owns stage lifecycle: `dependsOn`, `writeSet`, validated batches, objective checks, synthesis, cold verification, and bounded re-planning. The parent cannot replace a selected Fable topology with direct editing on hook-capable paths that package the workflow gate.
|
|
92
100
|
|
|
93
101
|
### Verification Gate
|
|
94
102
|
|
|
95
|
-
`verification-loop
|
|
103
|
+
`verification-loop`, `verify-gate.js`, ordinary stop-gates, and Fable stage evidence provide objective completion signals. Verification is not an optional courtesy when selected/applicable workflow state requires it.
|
|
96
104
|
|
|
97
105
|
### Recovery Gate
|
|
98
106
|
|
|
99
|
-
|
|
107
|
+
Rule-of-3 stops repeated same-signature micro-retries and requires a new diagnosis. Fable verification failures return to bounded re-planning; budget exhaustion becomes blocked instead of endless iteration.
|
|
100
108
|
|
|
101
|
-
###
|
|
109
|
+
### Action Gate
|
|
102
110
|
|
|
103
|
-
|
|
111
|
+
Irreversible/external side effects are orthogonal to topology and require their pre-action gate where supported. Workflow escape never widens permissions or bypasses action approval.
|
|
104
112
|
|
|
105
|
-
|
|
113
|
+
### Self-Evolve
|
|
106
114
|
|
|
107
|
-
|
|
115
|
+
Learning should consume verified lifecycle evidence (escape, re-plan, recovery, recurrence), not operate as a side door around the active workflow.
|
|
108
116
|
|
|
109
|
-
|
|
117
|
+
## Platform Strategy
|
|
110
118
|
|
|
111
|
-
| Platform class |
|
|
119
|
+
| Platform class | Workflow contract | Mechanical enforcement |
|
|
112
120
|
| --- | --- | --- |
|
|
113
|
-
| Hook/plugin-capable
|
|
114
|
-
| CLI/tool-capable
|
|
115
|
-
| Prompt-only
|
|
121
|
+
| Hook/plugin-capable | Same selected-workflow contract | Supported transitions can be blocked/observed by packaged mechanisms |
|
|
122
|
+
| CLI/tool-capable without lifecycle hooks | Same contract stated/called explicitly | Instruction/mechanism guided; no automatic blocking claim |
|
|
123
|
+
| Prompt-only | Same semantic obligations | Self-regulated only |
|
|
116
124
|
|
|
117
|
-
|
|
125
|
+
Contract semantics and enforcement evidence are separate. Claude currently packages the broadest Harness lifecycle surface. The local OpenAI/Codex plugin packages supported adapters but requires live-host evidence before parity claims. The public OpenAI Skills-only artifact carries skill/workflow knowledge without local lifecycle hooks. OpenCode has its own plugin path and evidence boundaries.
|
|
118
126
|
|
|
119
|
-
|
|
127
|
+
## Hook-Less Paths
|
|
120
128
|
|
|
121
|
-
|
|
129
|
+
Two explicit commands provide high-signal state without pretending hooks exist:
|
|
122
130
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
Implemented today, both wired into `bin/cli.js` and referenced by name in the advisory text each platform's installer writes (`scripts/lib/advisory-text.js`):
|
|
128
|
-
|
|
129
|
-
- `npx github:dyphn1/Harness-everything next "<prompt>"`: runs the Harness routing path and prints the recommended tier, invariant contract, and matching knowledge/skill suggestions. Every suggested skill must then be read/evaluated before omission.
|
|
130
|
-
- `npx github:dyphn1/Harness-everything verify`: wraps `verify-gate.js`, running the target project's own lint/test scripts and exiting non-zero on failure. This is the explicit hook-less verification path; it is not equivalent to claiming that a host automatically runs a `Stop` hook.
|
|
131
|
-
|
|
132
|
-
Both resolve their target scripts relative to the CLI's own package install, not the caller's cwd, so they work the same way regardless of which platform-specific directory (`.codex/skills/`, `.cursor/skills/`, `.github/skills/`, ...) a copy of the `harness-everything` skill also happens to be sitting in — a fixed relative path like `harness-everything/scripts/tier-router.js` would silently point at nothing depending on which platform installed it.
|
|
133
|
-
|
|
134
|
-
Not yet implemented — still aspirational, do not reference these as if they exist until they're built:
|
|
135
|
-
|
|
136
|
-
- `harness recover`: summarize repeated failure signatures and recommend `zoom-out` when needed. Hook-less paths do not collect failure signatures the way the Claude Code `PostToolUse` mechanism does, so there is no reliable state to summarize yet.
|
|
137
|
-
- `harness skills`: list installed, generated, and matching skills for the current workspace.
|
|
138
|
-
|
|
139
|
-
These commands let instruction-only Codex installs, Cursor, Copilot, Continue, and Hermes receive high-signal mechanical feedback without forcing them into a single scripted conversation shape.
|
|
131
|
+
```bash
|
|
132
|
+
npx github:dyphn1/Harness-everything next "<prompt>"
|
|
133
|
+
npx github:dyphn1/Harness-everything verify
|
|
134
|
+
```
|
|
140
135
|
|
|
141
|
-
|
|
136
|
+
`next` emits the routing/workflow contract. `verify` runs the explicit verification path. Instruction-only hosts must treat these requirements as real even though the host cannot mechanically prevent skipping them.
|
|
142
137
|
|
|
143
138
|
## Anti-Goals
|
|
144
139
|
|
|
145
140
|
Harness should not become:
|
|
146
141
|
|
|
147
|
-
-
|
|
148
|
-
-
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
The mesh should remain local, legible, and cooperative.
|
|
155
|
-
|
|
156
|
-
---
|
|
142
|
+
- one global DAG containing every skill;
|
|
143
|
+
- a mandatory response-template system;
|
|
144
|
+
- a command-only framework whose skills are unreadable without runtime code;
|
|
145
|
+
- a hidden daemon with broad authority;
|
|
146
|
+
- a system that claims cross-host hard enforcement from package text;
|
|
147
|
+
- a recommendation system where selected workflows can be rationalized away.
|
|
157
148
|
|
|
158
149
|
## Practical Authoring Rules
|
|
159
150
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
6. Let the model choose wording and presentation unless the skill truly needs a specific artifact format.
|
|
168
|
-
7. Document neighboring skills as recommendations, not hidden execution dependencies, unless the dependency is required for safety. Router-surfaced recommendations still inherit mandatory evaluation before omission.
|
|
151
|
+
1. Keep skills independently understandable/executable.
|
|
152
|
+
2. Put applicability/basic flow in `SKILL.md`; deep detail belongs in references.
|
|
153
|
+
3. Add mechanisms when they make behavior more reliable than prose.
|
|
154
|
+
4. Make checks failable and evidence-based.
|
|
155
|
+
5. Put gates at real transition boundaries: before mutation/side effects, after repeated failure, before completion, before persistence.
|
|
156
|
+
6. Let the model choose HOW inside the contract.
|
|
157
|
+
7. Treat workflow escape as a measured coverage gap, not convenience.
|
|
169
158
|
|
|
170
|
-
The result should feel like
|
|
159
|
+
The result should feel like a capable engineer operating inside explicit lifecycle obligations rather than either a scripted automaton or an unconstrained model that can skip its own process.
|