harness-everything 0.15.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 +23 -0
- package/README.md +7 -7
- package/VERIFICATION.md +3 -3
- package/bin/cli.js +17 -0
- 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-2al-codex-hooks-compat.test.js +286 -0
- 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 +19 -3
- package/docs/platform-compatibility.json +4 -4
- 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 +4 -2
- 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/codex-hooks-compat.js +521 -0
- package/scripts/lib/advisory-text.js +16 -29
- package/using-git-worktrees/SKILL.md +5 -5
|
@@ -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
|
|
|
@@ -64,6 +64,22 @@ Codex has two paths that must not be collapsed:
|
|
|
64
64
|
|
|
65
65
|
The package is tested at the mechanism layer and remains subject to the host’s hook review/trust flow. A fresh host session is still required before claiming that a particular ChatGPT/Codex installation loaded and fired the hooks or that the model followed read-before-skip.
|
|
66
66
|
|
|
67
|
+
### Explicit Codex user-hook compatibility fallback
|
|
68
|
+
|
|
69
|
+
Current Codex documentation supports plugin-bundled hooks, so native plugin mounting remains the preferred path. Some host/source combinations have nevertheless failed to expose enabled plugin hooks for review/entry attribution (#122 and upstream Codex reports). Harness therefore provides an **explicit compatibility fallback**, not an automatic replacement for native plugin hooks:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
harness codex-hooks install
|
|
73
|
+
harness codex-hooks status
|
|
74
|
+
harness codex-hooks uninstall
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The fallback copies the current packaged runtime into `$CODEX_HOME/harness-everything/compat-hooks/` and merges absolute-path entries into `$CODEX_HOME/hooks.json`. It does **not** modify `config.toml`, trust hashes, approval policy, or hook enablement. Codex must still show/review/trust the resulting non-managed hooks through its normal `/hooks` flow.
|
|
78
|
+
|
|
79
|
+
Ownership is deliberately strict: update/uninstall removes only exact entries recorded in the Harness compatibility manifest. If an installed Harness entry was edited after installation, the operation fails closed rather than overwriting or deleting that user-modified entry. Unrelated pre-existing and later-added user hooks are preserved.
|
|
80
|
+
|
|
81
|
+
This fallback solves only plugin-source discovery/mounting. It does not claim to repair a Codex carrier that fails to dispatch `PreToolUse` at all; those host-level execution-path limitations remain a live compatibility boundary.
|
|
82
|
+
|
|
67
83
|
The public OpenAI Skills-only plugin is narrower again. Its ZIP contains the packaged `skills/` tree and referenced files, but not the local `.codex-plugin` lifecycle hooks. Public submission readiness is therefore a package/form contract, not evidence of public-directory approval or live hook execution.
|
|
68
84
|
|
|
69
85
|
## Install/uninstall ownership boundary
|
|
@@ -72,7 +88,7 @@ The general installer merges shared files only through Harness-owned markers and
|
|
|
72
88
|
|
|
73
89
|
## OpenCode boundary
|
|
74
90
|
|
|
75
|
-
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.
|
|
76
92
|
|
|
77
93
|
## Official sources
|
|
78
94
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "harness-platform-compatibility-v1",
|
|
3
|
-
"last_reviewed": "2026-09-
|
|
3
|
+
"last_reviewed": "2026-09-19",
|
|
4
4
|
"status_vocabulary": {
|
|
5
5
|
"Supported": "An official or native mechanism exists and the Harness behavior is verified.",
|
|
6
6
|
"Mechanism verified": "Harness package, adapter, or installer checks pass, but a real host run is not confirmed.",
|
|
@@ -109,13 +109,13 @@
|
|
|
109
109
|
"standaloneSkills": {"status": "Supported", "paths": {"project": [".agents/skills"], "global": ["~/.agents/skills"]}},
|
|
110
110
|
"pluginSupport": {"status": "Mechanism verified", "paths": {"manifest": ["plugin.json", ".codex-plugin/plugin.json"]}},
|
|
111
111
|
"bundledSkills": {"status": "Mechanism verified", "notes": "The local package contains a root skills/ tree."},
|
|
112
|
-
"hooksLifecycle": {"status": "Mechanism verified", "notes": "Codex
|
|
112
|
+
"hooksLifecycle": {"status": "Mechanism verified", "notes": "Codex officially supports plugin-bundled hooks and the local package is mechanism-tested. The plugin intentionally does not declare unsupported PostToolUseFailure; Codex uses documented PostToolUse semantics instead. Harness also provides an explicit user-config compatibility fallback that copies the packaged runtime and merges exact-owned entries into $CODEX_HOME/hooks.json without changing trust/config.toml. Neither path is promoted to live verified until a real host exposes and executes the hooks."},
|
|
113
113
|
"projectScope": {"status": "Mechanism verified", "paths": {"skills": [".agents/skills"], "instructions": ["AGENTS.md"]}},
|
|
114
114
|
"globalScope": {"status": "Mechanism verified", "paths": {"skills": ["~/.agents/skills"]}},
|
|
115
|
-
"installUninstallSymmetry": {"status": "Mechanism verified", "notes": "Harness installer
|
|
115
|
+
"installUninstallSymmetry": {"status": "Mechanism verified", "notes": "General Harness installer ownership is mechanism-tested. The optional codex-hooks compatibility fallback separately has exact-entry update/uninstall ownership tests and preserves unrelated user hooks; live Codex trust/dispatch still requires host evidence."},
|
|
116
116
|
"assetsReferences": {"status": "Mechanism verified", "notes": "Packaged skill references are checked and remain inside the package."},
|
|
117
117
|
"updateSync": {"status": "Unknown", "notes": "A real marketplace refresh has not been run in a Codex host."},
|
|
118
|
-
"liveHostVerification": {"status": "Unknown", "notes": "No preserved Codex plugin/session artifact is
|
|
118
|
+
"liveHostVerification": {"status": "Unknown", "notes": "No preserved Codex plugin/session artifact proves current bundled-hook entry. Native plugin mounting is preferred; the explicit user-hook fallback is mechanism-verified only and does not solve host carriers that bypass hook dispatch."}
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
{
|
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;
|
package/docs/workflow-runtime.md
CHANGED
|
@@ -1,122 +1,92 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Workflow Runtime
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
obligations; agents still choose tools, reasoning, and implementation inside it.
|
|
5
|
-
Skill suggestions require individual applicability evaluation, not one universal
|
|
6
|
-
skill sequence. Git mutation isolation and durable multi-agent workspace state
|
|
7
|
-
are separate concerns.
|
|
3
|
+
Harness uses workflow state to **observe, explain, and remind**. It is not a numeric-budget scheduler.
|
|
8
4
|
|
|
9
|
-
##
|
|
5
|
+
## Product rule
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
Harness session state. It includes a unique `workflowId`, complete plan, prompt
|
|
13
|
-
hash (no prompt text), revision count, and scoped exceptions. Unresolved work
|
|
14
|
-
survives follow-up/status prompts; a weaker route cannot erase it. A stronger
|
|
15
|
-
route blocks mutation until an explicit replan. A new task after `satisfied`
|
|
16
|
-
gets a new identity. Invalid recorded state fails closed with a diagnostic.
|
|
7
|
+
The runtime follows **minimal rails, maximum freedom**:
|
|
17
8
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
- routing selects a useful topology and suggested skills;
|
|
10
|
+
- workflow state records useful evidence and unresolved obligations;
|
|
11
|
+
- verification hooks remind when evidence is missing;
|
|
12
|
+
- worktree/isolation checks warn when a safer execution shape is available;
|
|
13
|
+
- iteration, revision, replan, and worker counts are planning hints only.
|
|
23
14
|
|
|
24
|
-
|
|
25
|
-
`deferred` means no topology has been selected. Legacy `active`/`escaped` records
|
|
26
|
-
remain subject to isolation and cannot supply a correlated run implicitly.
|
|
15
|
+
None of those cognitive workflow conditions should trap a session or require a reset command.
|
|
27
16
|
|
|
28
|
-
|
|
29
|
-
by the router. This one file is allowed as runtime bootstrap data before entry;
|
|
30
|
-
the exception does not authorize changing workflow state or source artifacts.
|
|
31
|
-
Use the [stage schema](../fable-mode/CONTRACT-FORMAT.md); each stage needs an
|
|
32
|
-
objective `checkCommand` and `passCondition`. If the plan requires independent
|
|
33
|
-
verification, declare a read-only `fable-verifier` stage depending on every
|
|
34
|
-
other stage. Then run the displayed controller with the host session id:
|
|
17
|
+
The two intentionally separate hard boundaries are:
|
|
35
18
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
```
|
|
19
|
+
1. **Rule of 3** — the third matching failure pauses mutation until a zoom-out reflection is written;
|
|
20
|
+
2. **user/host permission and dangerous-action approval** — authorization boundaries such as the action gate.
|
|
39
21
|
|
|
40
|
-
|
|
41
|
-
root, even when tool execution has moved to a linked worktree. The run records
|
|
42
|
-
both `workflowId` and `sessionId`; matching only strategy or creation time is
|
|
43
|
-
insufficient. `start` creates contracts, not agents. Fable retains ownership of
|
|
44
|
-
worker dispatch, dependency/write-set scheduling, and synthesis.
|
|
45
|
-
|
|
46
|
-
## Isolation boundary
|
|
47
|
-
|
|
48
|
-
Before Tier 3 or Fable source/artifact mutation, the gate verifies a registered
|
|
49
|
-
linked Git worktree with the same common Git directory as the bound repository.
|
|
50
|
-
It checks the tool's execution directory and actual Edit/Write/apply_patch paths,
|
|
51
|
-
including move destinations, relative traversal, and symlink/junction resolution.
|
|
52
|
-
Unknown direct targets, Git metadata, and nested repositories are rejected.
|
|
53
|
-
Read-only discovery and a literal `git worktree add` transition remain available
|
|
54
|
-
before entry. Prefer an already-ignored path or sibling path for setup; never
|
|
55
|
-
edit the primary tree's ignore file just to establish mandatory isolation.
|
|
56
|
-
|
|
57
|
-
Shell recognition is conservative: redirects, substitutions, chained commands,
|
|
58
|
-
and side-effect options are not accepted as read-only. Mutation-capable shell
|
|
59
|
-
execution requires an isolated working-directory field, with explicit outside
|
|
60
|
-
paths and directory changes rejected. **This is not a filesystem sandbox**:
|
|
61
|
-
arbitrary scripts, aliases/configuration, indirect variable paths, and races can
|
|
62
|
-
have effects a hook cannot infer. OS/host sandboxing is needed to contain them.
|
|
63
|
-
Agent-writable state is also not tamper-proof. These mechanisms prevent tested
|
|
64
|
-
bypasses; they do not establish durable containment against a malicious agent.
|
|
65
|
-
|
|
66
|
-
## Mutation probes
|
|
67
|
-
|
|
68
|
-
Shell-effect accounting is keyed per tool call, not per command text. The gate
|
|
69
|
-
registers a pending probe per shell tool-use identity (`workflow-isolation.js`),
|
|
70
|
-
`state-persist.js` settles probes in a single ordered handler, and
|
|
71
|
-
`workflow-mutation-denied.js` discards the probe when that shell execution is
|
|
72
|
-
denied — a denial is never recorded as an observed mutation. Staging-insensitive
|
|
73
|
-
fingerprinting keeps the comparison on visible content, so metadata-only Git
|
|
74
|
-
operations do not register as workspace effects. These lifecycle semantics are
|
|
75
|
-
covered by deterministic workflow mechanism tests (`ci/mechanism-2ah-*`); live
|
|
76
|
-
host loading and behavioral improvement still require separately retained host
|
|
77
|
-
traces and paired evaluations.
|
|
78
|
-
|
|
79
|
-
## Escape, replan, and completion
|
|
80
|
-
|
|
81
|
-
Escape names one stage in the correlated run and records the uncovered scope,
|
|
82
|
-
evidence, and `workflow-uncovered-scope` or `host-capability-unavailable` reason:
|
|
22
|
+
## Runtime flow
|
|
83
23
|
|
|
84
24
|
```text
|
|
85
|
-
|
|
86
|
-
|
|
25
|
+
route
|
|
26
|
+
-> selected workflow guidance
|
|
27
|
+
-> execute freely
|
|
28
|
+
-> observe edits / verification / stage evidence
|
|
29
|
+
-> emit reminders when evidence is weak
|
|
30
|
+
-> complete or continue
|
|
31
|
+
|
|
32
|
+
same failure signature x3
|
|
33
|
+
-> zoom-out reflection required
|
|
34
|
+
-> reflection accepted
|
|
35
|
+
-> normal execution resumes
|
|
87
36
|
```
|
|
88
37
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
38
|
+
There is no `budget-exhausted -> blocked -> reset-budget` lifecycle.
|
|
39
|
+
|
|
40
|
+
## Numeric guidance
|
|
41
|
+
|
|
42
|
+
Router plans may still expose values such as:
|
|
43
|
+
|
|
44
|
+
- `maxIterations`
|
|
45
|
+
- `maxRevisionRounds`
|
|
46
|
+
- `maxReplans`
|
|
47
|
+
- `maxWorkers`
|
|
48
|
+
|
|
49
|
+
These are **advisory defaults**, useful for prompts, diagnostics, or planning. Runtime hooks do not maintain authoritative counters, reserve mutation capacity, or reject the Nth event.
|
|
50
|
+
|
|
51
|
+
A long loop should produce a message such as:
|
|
52
|
+
|
|
53
|
+
> Iterative work is getting long; verify assumptions or consider re-planning.
|
|
54
|
+
|
|
55
|
+
It should not create a lock.
|
|
56
|
+
|
|
57
|
+
## Mutation observation
|
|
58
|
+
|
|
59
|
+
The previous mutation-probe subsystem and `.mutation-probes.lock` were removed by #190. Shell classification is now best-effort evidence for reminders. A false positive/negative must not deadlock work.
|
|
60
|
+
|
|
61
|
+
Direct edits can still update `lastMutationAt`. Shell outcomes can update handoff evidence heuristically. Missing or ambiguous evidence degrades reminder quality, not execution availability.
|
|
62
|
+
|
|
63
|
+
## Completion
|
|
64
|
+
|
|
65
|
+
`workflow-stop-gate.js` and `stop-gate.js` are reminder surfaces. When verification or Fable stage evidence is incomplete they report the missing evidence and return success to the host.
|
|
66
|
+
|
|
67
|
+
A workflow may retain `blocked` as a descriptive status recorded by the controller or legacy state, but workflow hooks do not use that value as a persistent execution lock.
|
|
68
|
+
|
|
69
|
+
## Fable and worktrees
|
|
70
|
+
|
|
71
|
+
Fable stage graphs, dependencies, write sets, and objective checks remain useful planning/evidence structures. `maxWorkers` no longer chunks ready stages as a hard concurrency cap.
|
|
72
|
+
|
|
73
|
+
For major work, a linked worktree remains strongly recommended. Missing isolation is surfaced prominently, but Harness-owned cognitive workflow hooks do not turn it into a self-deadlocking runtime state.
|
|
74
|
+
|
|
75
|
+
## Legacy state
|
|
76
|
+
|
|
77
|
+
Existing sessions may contain `budget.state = "budget-exhausted"`, old counters, or mutation-probe files from earlier versions. Current runtime code treats the budget API as advisory compatibility only and creates no new mutation-probe state.
|
|
78
|
+
|
|
79
|
+
Starting a fresh session remains the cleanest way to discard old evidence, but it is no longer required to recover from numeric budget exhaustion.
|
|
80
|
+
|
|
81
|
+
## Testing contract
|
|
82
|
+
|
|
83
|
+
Regression tests should prove:
|
|
84
|
+
|
|
85
|
+
- reminders fire when relevant;
|
|
86
|
+
- commands/Stop remain available;
|
|
87
|
+
- no mutation-probe lock or reservation state is created;
|
|
88
|
+
- `exec_command` verification can update `lastVerifyAt`;
|
|
89
|
+
- Rule of 3 trips exactly at three matching failures;
|
|
90
|
+
- a valid reflection resets the cycle;
|
|
91
|
+
- a later three-failure cycle requests another reflection rather than a permanent hard lock;
|
|
92
|
+
- permission/dangerous-action boundaries remain separate and intact.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
id: positive-trivial-tier1-001
|
|
2
2
|
name: Trivial edit routes to Tier 1
|
|
3
|
-
description: "Route software/project work through the Harness kernel: classify Tier 1/2/3,
|
|
3
|
+
description: "Route software/project work through the Harness kernel: classify Tier 1/2/3, surface planning guidance and applicable skills, then let the agent choose tactics. Use for software triage, routing, and re-routing; not general Q&A or non-software writing."
|
|
4
4
|
tags:
|
|
5
5
|
- positive-trigger
|
|
6
6
|
- tier-1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
id: positive-standard-tier2-001
|
|
2
2
|
name: Standard bug fix routes to Tier 2
|
|
3
|
-
description: "Route software/project work through the Harness kernel: classify Tier 1/2/3,
|
|
3
|
+
description: "Route software/project work through the Harness kernel: classify Tier 1/2/3, surface planning guidance and applicable skills, then let the agent choose tactics. Use for software triage, routing, and re-routing; not general Q&A or non-software writing."
|
|
4
4
|
tags:
|
|
5
5
|
- positive-trigger
|
|
6
6
|
- tier-2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
id: positive-macro-tier3-001
|
|
2
2
|
name: Architectural task routes to Tier 3
|
|
3
|
-
description: "Route software/project work through the Harness kernel: classify Tier 1/2/3,
|
|
3
|
+
description: "Route software/project work through the Harness kernel: classify Tier 1/2/3, surface planning guidance and applicable skills, then let the agent choose tactics. Use for software triage, routing, and re-routing; not general Q&A or non-software writing."
|
|
4
4
|
tags:
|
|
5
5
|
- positive-trigger
|
|
6
6
|
- tier-3
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
id: positive-using-git-worktrees-001
|
|
2
2
|
name: On-scope prompt triggers using-git-worktrees
|
|
3
|
-
description: "Use when starting feature work needing isolation or before implementation plans -
|
|
3
|
+
description: "Use when starting feature work needing isolation or before implementation plans - recommends an isolated workspace via native tools or git worktree fallback"
|
|
4
4
|
tags:
|
|
5
5
|
- positive-trigger
|
|
6
6
|
inputs:
|
package/fable-mode/SKILL.md
CHANGED
|
@@ -180,8 +180,9 @@ function dependencyBatches(stages, validateWrites, maxBatchSize = Infinity) {
|
|
|
180
180
|
return batches;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
function topologicalBatches(stages,
|
|
184
|
-
|
|
183
|
+
function topologicalBatches(stages, _maxWorkers) {
|
|
184
|
+
// maxWorkers is an advisory planning hint, not a runtime concurrency lock (#190).
|
|
185
|
+
return dependencyBatches(stages, true);
|
|
185
186
|
}
|
|
186
187
|
|
|
187
188
|
function sequentialBatches(stages) {
|
|
@@ -197,7 +198,7 @@ function validateRouterPlan(routerContract) {
|
|
|
197
198
|
if (plan.strategySelection !== 'selected') throw new Error(`workflow strategy is not selected: ${plan.strategySelection}`);
|
|
198
199
|
if (!FABLE_STRATEGIES.has(plan.strategy)) throw new Error(`workflow strategy is not a Fable consumer topology: ${plan.strategy}`);
|
|
199
200
|
if (plan.fallback && plan.fallback.disposition === 'blocked') {
|
|
200
|
-
|
|
201
|
+
console.error(`[Fable Reminder] plan reports blocked/degraded capability: ${(plan.fallback.reasonCodes || []).join(', ') || 'unspecified reason'}`);
|
|
201
202
|
}
|
|
202
203
|
if (plan.strategy === 'fable-parallel' && (!plan.parallelism || plan.parallelism.allowed !== true)) {
|
|
203
204
|
throw new Error('fable-parallel requires workflowPlan.parallelism.allowed=true');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: harness-everything
|
|
3
|
-
description: "Route software/project work through the Harness kernel: classify Tier 1/2/3,
|
|
3
|
+
description: "Route software/project work through the Harness kernel: classify Tier 1/2/3, surface planning guidance and applicable skills, then let the agent choose tactics. Use for software triage, routing, and re-routing; not general Q&A or non-software writing."
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.16.1
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Harness Everything
|
|
@@ -19,20 +19,20 @@ Kernel routing entry.
|
|
|
19
19
|
- General Q&A or non-software writing.
|
|
20
20
|
|
|
21
21
|
## Invariants
|
|
22
|
-
1. **Route before execution** — establish scope/tier and
|
|
23
|
-
2. **Verify before claim** —
|
|
24
|
-
3. **
|
|
22
|
+
1. **Route before execution** — establish scope/tier and useful workflow guidance.
|
|
23
|
+
2. **Verify before claim** — seek objective evidence before saying work is done.
|
|
24
|
+
3. **Zoom out on repetition** — after 3 same-signature failures, use `zoom-out`.
|
|
25
25
|
4. **Evaluate before omission** — read each suggested skill's `SKILL.md` before deciding applicability.
|
|
26
|
-
5. **
|
|
26
|
+
5. **Keep agency** — workflow state and numeric limits guide; they do not hard-stop execution.
|
|
27
27
|
|
|
28
28
|
## Workflow
|
|
29
29
|
1. Reuse kernel output, or run `node "<this-skill-dir>/scripts/kernel-router.js" "<prompt summary>"`.
|
|
30
30
|
2. Surface the **Harness Routing Checkpoint**.
|
|
31
|
-
3. Read each suggested `SKILL.md`; evaluate `USE FOR`, `DO NOT USE FOR`, workflow/basic flow, and hard rules.
|
|
32
|
-
4.
|
|
33
|
-
5.
|
|
34
|
-
6.
|
|
31
|
+
3. Read each suggested `SKILL.md`; evaluate `USE FOR`, `DO NOT USE FOR`, workflow/basic flow, and hard rules.
|
|
32
|
+
4. Use the selected topology as planning guidance. Choose, combine, reorder, or skip steps when evidence supports doing so.
|
|
33
|
+
5. Prefer worktree isolation for broad/Tier-3 mutation and objective verification before completion.
|
|
34
|
+
6. If guidance is not useful, explain the reason briefly and continue; no Harness reset is required.
|
|
35
35
|
|
|
36
|
-
**Rule:**
|
|
36
|
+
**Rule:** guidance may become louder when evidence is weak, but only Rule-of-3 reflection and explicit user/host permission boundaries may block.
|
|
37
37
|
|
|
38
38
|
Deep dive: <this-skill-dir>/references/triage-and-tiers.md
|