harness-everything 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.github/workflows/ci.yml +12 -2
  4. package/AGENTS.md +36 -35
  5. package/CHANGELOG.md +51 -0
  6. package/README.md +2 -2
  7. package/benchmarks/results/reviews/pr142-verification.json +95 -0
  8. package/ci/action-gate.test.js +83 -3
  9. package/ci/doc-capability-consistency.test.js +3 -0
  10. package/ci/invariant-routing.test.js +87 -74
  11. package/ci/mechanism-2af-worktree-isolation.test.js +152 -0
  12. package/ci/mechanism-2ag-router-worktree-contract.test.js +44 -0
  13. package/ci/mechanism-2ah-workflow-lifecycle.test.js +140 -0
  14. package/ci/openai-plugin-package.test.js +9 -6
  15. package/ci/phase4-ensemble-memory.test.js +128 -10
  16. package/ci/router-workflow-plan.test.js +23 -0
  17. package/ci/workflow-execution-contract.test.js +133 -0
  18. package/ci/workflow-plan-consumers.test.js +18 -0
  19. package/docs/architecture.md +111 -114
  20. package/docs/mechanism-first-skill-mesh.md +92 -103
  21. package/docs/openai-plugin.md +1 -1
  22. package/docs/philosophy.md +40 -33
  23. package/docs/platform-capabilities.md +2 -2
  24. package/docs/reviews/pr-142-issue-131.md +89 -0
  25. package/docs/routing.md +61 -124
  26. package/docs/workflow-runtime.md +109 -0
  27. package/fable-mode/CONTRACT-FORMAT.md +3 -1
  28. package/fable-mode/SKILL.md +1 -1
  29. package/fable-mode/agents/fable-orchestrator.md +9 -7
  30. package/fable-mode/execution-guardrails/SKILL.md +1 -1
  31. package/fable-mode/fable-haiku/SKILL.md +1 -1
  32. package/fable-mode/fable-opus/SKILL.md +1 -1
  33. package/fable-mode/fable-sonnet/SKILL.md +1 -1
  34. package/fable-mode/scripts/workflow-plan-consumer.js +13 -8
  35. package/harness-everything/SKILL.md +11 -10
  36. package/harness-everything/references/triage-and-tiers.md +76 -107
  37. package/harness-everything/schemas/router-task-shape.schema.json +4 -2
  38. package/harness-everything/schemas/router-workflow-plan.schema.json +3 -2
  39. package/harness-everything/scripts/kernel-router-core.js +265 -0
  40. package/harness-everything/scripts/kernel-router.js +118 -223
  41. package/harness-everything/scripts/router-contract-core.js +633 -0
  42. package/harness-everything/scripts/router-contract.js +21 -581
  43. package/harness-everything/scripts/tier-router.js +19 -1
  44. package/hooks/hooks.json +25 -4
  45. package/hooks/scripts/action-gate.js +111 -2
  46. package/hooks/scripts/contract-test.js +27 -2
  47. package/hooks/scripts/lib/workflow-isolation.js +102 -0
  48. package/hooks/scripts/lib/workflow-runtime.js +254 -0
  49. package/hooks/scripts/state-persist.js +1 -0
  50. package/hooks/scripts/subagent-scope-guard.js +20 -3
  51. package/hooks/scripts/workflow-disposition.js +104 -0
  52. package/hooks/scripts/workflow-gate.js +56 -0
  53. package/hooks/scripts/workflow-stop-gate.js +44 -0
  54. package/multi-agent-workspace/SKILL.md +2 -2
  55. package/multi-agent-workspace/scripts/index_memory.js +107 -1
  56. package/opencode-plugin/plugin.json +1 -1
  57. package/package.json +2 -2
  58. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  59. package/plugins/harness-everything/hooks/hooks.json +44 -1
  60. package/plugins/harness-everything/hooks/scripts/action-gate.js +111 -2
  61. package/plugins/harness-everything/hooks/scripts/contract-test.js +27 -2
  62. package/plugins/harness-everything/hooks/scripts/lib/workflow-isolation.js +102 -0
  63. package/plugins/harness-everything/hooks/scripts/lib/workflow-runtime.js +254 -0
  64. package/plugins/harness-everything/hooks/scripts/state-persist.js +1 -0
  65. package/plugins/harness-everything/hooks/scripts/subagent-scope-guard.js +20 -3
  66. package/plugins/harness-everything/hooks/scripts/workflow-disposition.js +104 -0
  67. package/plugins/harness-everything/hooks/scripts/workflow-gate.js +56 -0
  68. package/plugins/harness-everything/hooks/scripts/workflow-stop-gate.js +44 -0
  69. package/plugins/harness-everything/plugin.json +1 -1
  70. package/plugins/harness-everything/scripts/lib/advisory-text.js +51 -54
  71. package/plugins/harness-everything/skills/fable-mode/CONTRACT-FORMAT.md +3 -1
  72. package/plugins/harness-everything/skills/fable-mode/SKILL.md +1 -1
  73. package/plugins/harness-everything/skills/fable-mode/agents/fable-orchestrator.md +9 -7
  74. package/plugins/harness-everything/skills/fable-mode/execution-guardrails/SKILL.md +1 -1
  75. package/plugins/harness-everything/skills/fable-mode/fable-haiku/SKILL.md +1 -1
  76. package/plugins/harness-everything/skills/fable-mode/fable-opus/SKILL.md +1 -1
  77. package/plugins/harness-everything/skills/fable-mode/fable-sonnet/SKILL.md +1 -1
  78. package/plugins/harness-everything/skills/fable-mode/scripts/workflow-plan-consumer.js +13 -8
  79. package/plugins/harness-everything/skills/harness-everything/SKILL.md +11 -10
  80. package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +76 -107
  81. package/plugins/harness-everything/skills/harness-everything/schemas/router-task-shape.schema.json +4 -2
  82. package/plugins/harness-everything/skills/harness-everything/schemas/router-workflow-plan.schema.json +3 -2
  83. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +265 -0
  84. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +118 -223
  85. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +633 -0
  86. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract.js +21 -581
  87. package/plugins/harness-everything/skills/harness-everything/scripts/tier-router.js +19 -1
  88. package/plugins/harness-everything/skills/multi-agent-workspace/SKILL.md +2 -2
  89. package/plugins/harness-everything/skills/multi-agent-workspace/scripts/index_memory.js +107 -1
  90. package/plugins/harness-everything/skills/self-evolve/SKILL.md +6 -6
  91. package/plugins/harness-everything/skills/self-evolve/references/memory-resolution.md +22 -33
  92. package/plugins/harness-everything/skills/self-evolve/scripts/persist-memory.js +336 -57
  93. package/plugins/harness-everything/skills/self-evolve/scripts/self-regression.js +1 -0
  94. package/plugins/harness-everything/skills/using-git-worktrees/SKILL.md +14 -16
  95. package/plugins/harness-everything/skills/using-git-worktrees/references/workflow-details.md +44 -85
  96. package/scripts/lib/advisory-text.js +51 -54
  97. package/self-evolve/SKILL.md +6 -6
  98. package/self-evolve/references/memory-resolution.md +22 -33
  99. package/self-evolve/scripts/persist-memory.js +336 -57
  100. package/self-evolve/scripts/self-regression.js +1 -0
  101. package/using-git-worktrees/SKILL.md +14 -16
  102. package/using-git-worktrees/references/workflow-details.md +44 -85
@@ -10,7 +10,7 @@
10
10
  "name": "harness-everything",
11
11
  "source": "./",
12
12
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
13
- "version": "0.8.0",
13
+ "version": "0.9.0",
14
14
  "author": {
15
15
  "name": "Miya Daniel"
16
16
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-everything",
3
3
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
4
- "version": "0.8.0",
4
+ "version": "0.9.0",
5
5
  "author": {
6
6
  "name": "Miya Daniel"
7
7
  },
@@ -70,8 +70,18 @@ jobs:
70
70
  - uses: actions/checkout@v7
71
71
  with:
72
72
  fetch-depth: 0
73
- - name: Install waza CLI
74
- run: curl -fsSL https://raw.githubusercontent.com/microsoft/waza/main/install.sh | bash
73
+ - name: Install pinned waza CLI
74
+ run: |
75
+ WAZA_VERSION=0.38.6
76
+ WAZA_SHA256=a799587795fd462411ca7c7af5faccee7e24f08e41d152c10738d31334d1c063
77
+ mkdir -p "$HOME/bin"
78
+ curl -fL --retry 3 --retry-all-errors \
79
+ -o "$HOME/bin/waza" \
80
+ "https://github.com/microsoft/waza/releases/download/v${WAZA_VERSION}/waza-linux-amd64"
81
+ echo "${WAZA_SHA256} $HOME/bin/waza" | sha256sum -c -
82
+ chmod +x "$HOME/bin/waza"
83
+ echo "$HOME/bin" >> "$GITHUB_PATH"
84
+ "$HOME/bin/waza" --version
75
85
  - name: Check every canonical SKILL.md passes waza readiness gates
76
86
  run: |
77
87
  fail=0
package/AGENTS.md CHANGED
@@ -4,20 +4,20 @@ description: Operating guide for AI agents working inside the Harness-everything
4
4
 
5
5
  # AGENTS.md — Working in This Repository
6
6
 
7
- You are modifying **Harness**: an orchestrated agent operating system (skills + hooks/plugins + routing) for AI coding agents. Changes here ship to real agent sessions; a vague `SKILL.md`, stale manifest, contradictory platform claim, or router suggestion that can be skipped without reading its flow can misroute other people's agents. Precision is the product.
7
+ You are modifying **Harness**: an orchestrated agent operating system (skills + hooks/plugins + routing) for AI coding agents. Changes here ship to real agent sessions; a vague `SKILL.md`, stale manifest, contradictory platform claim, or selected workflow that remains bypassable can misroute other people's agents. Precision is the product.
8
8
 
9
9
  ## Repository Layout
10
10
 
11
11
  | Path | What it is |
12
12
  |---|---|
13
13
  | `<skill-name>/SKILL.md` | One canonical skill per top-level directory. Frontmatter: `name`, `description`, `metadata.author`, `metadata.version`. |
14
- | `hooks/` | Claude Code lifecycle hook scripts and shared mechanisms such as circuit breaker, scope guard, and stop gate. Do not infer that every host packages every hook. |
15
- | `harness-everything/scripts/` | Runtime: kernel/tier routing, verification, bootstrap, self-heal. |
14
+ | `hooks/` | Claude Code lifecycle hook scripts and shared mechanisms such as circuit breaker, workflow/action/scope guards, and stop gates. Do not infer that every host packages every hook. |
15
+ | `harness-everything/scripts/` | Runtime: kernel/tier routing, workflow contract, verification, bootstrap, self-heal. |
16
16
  | `opencode-plugin/` | OpenCode native plugin implementation. Mechanism-tested, with partial live-host evidence for project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS); see the evidence boundary below. |
17
17
  | `.agents/plugins/` + `plugins/harness-everything/` | Local OpenAI/Codex marketplace + `.codex-plugin` package with canonical skill copies and packaged session/prompt hooks. |
18
18
  | `submission/openai/` | Public OpenAI Skills-only listing/test inputs. The public artifact does not include local `.codex-plugin` lifecycle hooks. |
19
19
  | `evals/<skill>/` | Trigger/routing eval per skill (waza format). Required for every canonical routed skill. |
20
- | `behavioral-evals/` | LLM-behavior cases run via headless CLI sessions. They can be run on demand and are also structurally validated by the weekly `behavioral-evals.yml` workflow; live cases run there only when the Claude CLI is available. |
20
+ | `behavioral-evals/` | LLM-behavior cases run via headless CLI sessions and structurally validated by CI. |
21
21
  | `benchmarks/` | BENCHMARK_SOP fixtures and recorded results. Evidence lives here or nowhere. |
22
22
  | `.claude-plugin/` | Claude Code plugin distribution manifests. Must list exactly the on-disk canonical skills. |
23
23
  | `docs/platform-capabilities.md` | Canonical current platform/install/enforcement/evidence matrix. |
@@ -27,43 +27,44 @@ You are modifying **Harness**: an orchestrated agent operating system (skills +
27
27
 
28
28
  ## OpenCode evidence boundary
29
29
 
30
- The retained [OpenCode evidence](benchmarks/results/live-host/opencode-2026-09-16/README.md) supports only the scoped loading and state effects above. The final snapshot is post-reset (`hardLock: false`, `count: 1`). Hard lock is only an interactive observation with no retained blocked-tool trace; reflection was operator-seeded, then agent-rewritten. Agent-controlled state deletion resets the breaker, so do not claim durable hard enforcement or behavioral effectiveness. `.mjs` auto-discovery is broken on this host version. Global scope, npm-package installation, and other host versions remain unverified.
30
+ 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 (`hardLock: false`, `count: 1`). Hard lock is only an interactive observation with no retained blocked-tool trace; reflection was operator-seeded, then agent-rewritten. Agent-controlled state deletion resets the breaker. Global scope, npm-package installation, and other OpenCode versions remain unverified.
31
31
 
32
32
  ## Non-Negotiable Change Rules
33
33
 
34
- 1. **Every canonical SKILL.md keeps ≤ 500 tokens** (hard CI gate) and must contain `## USE FOR:` and `## DO NOT USE FOR:` sections. Deep detail goes in the skill's `references/` or `guides/`.
35
- 2. **Descriptions are routing surfaces.** Two skills whose descriptions overlap enough that a router cannot distinguish them will fail `test:collision`. When adding a skill, differentiate its description from near neighbors deliberately.
36
- 3. **A new canonical skill ships with a routing eval** (`evals/<skill>/eval.yaml` + positive/negative tasks). The positive task's `description:` field must carry the skill's exact frontmatter description — waza's deterministic matcher requires it verbatim.
37
- 4. **Release version policy:** normal PRs do not manually bump package/plugin versions. `semantic-release` determines the next stable SemVer from Conventional Commits on `main`, and `scripts/sync-release-version.js` owns distribution-version synchronization. Skill frontmatter versions remain release metadata and must never exceed the package version's numeric base. Nested sub-skills (`<skill>/<sub>/SKILL.md`) inherit the parent skill's version and must always match it.
38
- 5. **Distribution manifests are generated facts, not opinions:** if you add/remove/rename a canonical skill, update/sync every distribution that copies or lists it. Run `npm run plugin:sync`, `npm run test:consistency`, and `npm run test:plugin:openai` rather than updating only `.claude-plugin/plugin.json`.
39
- 6. **Platform capability claims are tested contracts.** If host integration behavior changes, update `docs/platform-capabilities.md` and every affected current-state surface in the same change. Never turn package/mechanism evidence into a live-host claim, and never describe public Skills-only behavior as if it includes local lifecycle hooks.
40
- 7. **Runtime/workflow claims are generated facts.** `package.json`, `.nvmrc`, `Dockerfile`, and active `.github/workflows/*.yml` are parsed by `scripts/repository-contract.js`. After changing them, run `npm run docs:sync`; `test:repo-contract` rejects stale generated docs, unsupported action majors, Node runtimes below the support floor, or loss of the Node 22 compatibility lane.
41
- 8. **CHANGELOG.md keeps pending human-authored notes under `[Unreleased]`.** Do not create new alpha/beta/rc release headings; semantic-release owns stable release headings, tags, and release notes.
42
- 9. **Conventional Commit type is release input.** The final commit/squash title that lands on `main` must follow the convention. Breaking changes release major; `feat` releases minor; `fix`, `perf`, `refactor`, `build`, and `revert` release patch; `docs`, `test`, `ci`, `style`, and `chore` do not release by themselves.
43
- 10. **Router suggestions are mandatory to evaluate, advisory to execute.** Before skipping any suggested skill, read its complete `SKILL.md` entry and evaluate `USE FOR`, `DO NOT USE FOR`, workflow/basic flow, and hard rules. A name/description/router summary or “routine task” judgement is not enough. Using one suggestion does not waive read-before-skip for other omissions; unreadable suggestions are `unresolved/unavailable`, not silent skips. Do not turn this into a fixed TODO/TDD/Fable execution pipeline.
34
+ 1. **Every canonical SKILL.md keeps ≤ 500 tokens** (hard CI gate) and must contain `## USE FOR:` and `## DO NOT USE FOR:`. Deep detail goes in references/guides.
35
+ 2. **Descriptions are routing surfaces.** Differentiate neighboring skills deliberately; `test:collision` guards overlap.
36
+ 3. **A new canonical skill ships with a routing eval.** Positive task `description:` must exactly match the skill frontmatter description.
37
+ 4. **Release version policy:** normal PRs do not manually bump package/plugin versions. `semantic-release` owns stable SemVer and `scripts/sync-release-version.js` owns distribution synchronization. Nested sub-skills inherit their parent skill version.
38
+ 5. **Distribution manifests are generated facts:** add/remove/rename changes must sync every copied/listed distribution. Run `npm run plugin:sync`, `npm run test:consistency`, and `npm run test:plugin:openai`.
39
+ 6. **Platform capability claims are tested contracts.** Update `docs/platform-capabilities.md` with integration behavior changes. Package/mechanism evidence is not live-host evidence, and public Skills-only behavior does not include local lifecycle hooks.
40
+ 7. **Runtime/workflow claims are generated facts.** `package.json`, `.nvmrc`, Dockerfile, and active workflows feed `scripts/repository-contract.js`; run `npm run docs:sync` after relevant changes.
41
+ 8. **CHANGELOG.md keeps pending human-authored notes under `[Unreleased]`.** Semantic-release owns stable headings/tags/release notes.
42
+ 9. **Conventional Commit type is release input.** Breaking→major; `feat`→minor; `fix`/`perf`/`refactor`/`build`/`revert`→patch; docs/test/ci/style/chore do not release by themselves.
43
+ 10. **Selected workflow is mandatory; reasoning inside it stays flexible.** Before omitting a suggested skill, read/evaluate its complete `SKILL.md` flow. Suggested skills may be `not-applicable` with a flow-grounded reason, but a selected topology must be executed to resolution. Do not bypass it because the task feels simple/routine/already clear. Escape is limited to genuinely uncovered workflow scope or host-capability loss and requires explicit scope + evidence. Do not turn this into one universal TODO/TDD/Fable sequence.
44
+ 11. **Major mutation requires Git worktree isolation.** Read-only discovery may stay in the bound repository. Tier 3 / Fable source and artifact changes must target a verified linked worktree belonging to that repository; creation failure means `blocked`. Worktree isolation is separate from durable multi-agent workspace state. Scoped escape never waives it. See [workflow-runtime.md](docs/workflow-runtime.md) for the tested boundary and limitations.
44
45
 
45
46
  ## Verification Before You Claim Done
46
47
 
47
- Run the local gates that cover the same contract categories as CI:
48
+ Run the gates that cover the same contract categories as CI:
48
49
 
49
50
  ```bash
50
- npm test # self-regression: syntax, routing, mechanisms
51
- npm run test:mutations # focused mutation checks
52
- npm run test:mechanism # mechanism suites alone
53
- npm run test:consistency # manifests, versions, docs links, eval coverage + repository contract
54
- npm run test:repo-contract # runtime/workflow/action/schedule drift gate
55
- npm run test:docs:capabilities # platform documentation drift gate
56
- npm run test:references # executable/deep-dive references
57
- npm run test:release # release catalog + semantic-release/version-sync contract
58
- npm run test:collision # description collision detection
59
- npm run test:routing:skills # every positive skill route reaches its target
60
- npm run test:routing:invariants # kernel/read-before-skip routing contract
61
- npm run test:plugin:openai # local OpenAI/Codex plugin package
62
- npm run test:plugin:submission # public Skills-only submission inputs/bundle parity
51
+ npm test
52
+ npm run test:mutations
53
+ npm run test:mechanism
54
+ npm run test:consistency
55
+ npm run test:repo-contract
56
+ npm run test:docs:capabilities
57
+ npm run test:references
58
+ npm run test:release
59
+ npm run test:collision
60
+ npm run test:routing:skills
61
+ npm run test:routing:invariants
62
+ npm run test:plugin:openai
63
+ npm run test:plugin:submission
63
64
  npm run test:platform:compatibility
64
65
  ```
65
66
 
66
- If waza is installed (`~/bin/waza`), also run what CI runs:
67
+ If waza is installed (`~/bin/waza`), also run:
67
68
 
68
69
  ```bash
69
70
  waza check <skill-dir>
@@ -71,16 +72,16 @@ waza spec verify <skill> evals/<skill>/eval.yaml --fail --threshold 1
71
72
  waza tokens check
72
73
  ```
73
74
 
74
- Node.js 24 is the primary CI runtime across Ubuntu, Windows, and macOS. A separate Ubuntu Node.js 22 lane protects the advertised minimum runtime. See [docs/repository-contract.md](docs/repository-contract.md) for the generated current state.
75
+ Node.js 24 is primary CI across Ubuntu/Windows/macOS; a Node.js 22 lane protects the supported minimum. See [docs/repository-contract.md](docs/repository-contract.md).
75
76
 
76
- Do not report "it works" from reading code. Record which evidence layer you actually proved: package, deterministic mechanism, live host, or behavior.
77
+ Do not report "it works" from code reading. State the evidence layer proved: package, deterministic mechanism, live host, or behavior.
77
78
 
78
79
  ## Behavioral & Benchmark Evidence
79
80
 
80
- Deterministic mechanism tests prove the tested hook/plugin contract; they do **not** prove a real host loaded it or that agents behave differently. For behavior:
81
+ Deterministic mechanism tests prove the tested hook/plugin contract; they do **not** prove a real host loaded it or that behavior improved. For behavior:
81
82
 
82
83
  - `node behavioral-evals/run.js run --engine opencode` (or `--engine claude`) — on-demand, token-costing.
83
- - The weekly `behavioral-evals.yml` workflow always validates case structure and runs live cases only when its runner has the Claude CLI.
84
+ - Weekly behavioral workflow validates case structure and runs live cases only when its runner has the required CLI.
84
85
  - `node benchmarks/run.js scaffold <scenario>` → run both variants → `record` with evidence logs.
85
86
 
86
- For a live-host enforcement claim, preserve a host/session artifact showing the mechanism was actually loaded and fired. Results are committed where the relevant evidence workflow requires it. A benchmark run without a recorded result is indistinguishable from one that never happened.
87
+ For a live-host enforcement claim, preserve a host/session artifact showing the mechanism loaded and fired. For an effectiveness claim, use the paired evidence discipline in #71 rather than inferring improvement from mechanism presence.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,57 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [0.9.0](https://github.com/dyphn1/Harness-everything/compare/v0.8.1...v0.9.0) (2026-09-18)
6
+
7
+ ### Features
8
+
9
+ * **action-gate:** classify structured tool actions ([3502f42](https://github.com/dyphn1/Harness-everything/commit/3502f4200401be029250ac503ea283f90fd5552d))
10
+ * **action-gate:** package isolated MCP adapters ([81133db](https://github.com/dyphn1/Harness-everything/commit/81133db7fffc417fdc01530db01235dcfb32f3c7))
11
+ * **action-gate:** wire Claude MCP lifecycle ([27c9e72](https://github.com/dyphn1/Harness-everything/commit/27c9e72171f7a69d1f0797356feae71d50fa02b9))
12
+ * **memory:** add deterministic scoped retrieval ([2fb175c](https://github.com/dyphn1/Harness-everything/commit/2fb175c98274bf031fd54d6d3cace321a040d63e))
13
+ * **memory:** add deterministic scoped retrieval ([bfa158b](https://github.com/dyphn1/Harness-everything/commit/bfa158b2e519460b45cbf85796549816a32c826f))
14
+ * **memory:** detect explicit persistence intent ([f438543](https://github.com/dyphn1/Harness-everything/commit/f438543f2e27ef50f419fd52d51fc606e72bac61))
15
+ * **memory:** detect explicit persistence intent ([7b37cee](https://github.com/dyphn1/Harness-everything/commit/7b37ceeab58c239ab81f6310fcc6543e64c6f194))
16
+ * **memory:** enforce workflow-authorized persistence ([987ecd1](https://github.com/dyphn1/Harness-everything/commit/987ecd1c3e5bfc2564a2c8eb3280b717041c1cb9))
17
+ * **memory:** issue workflow-bound write capability ([93c001f](https://github.com/dyphn1/Harness-everything/commit/93c001facc11c30a97d83bcc6d1debbdd5dba25d))
18
+ * **memory:** issue workflow-bound write capability ([0034f1a](https://github.com/dyphn1/Harness-everything/commit/0034f1a58724f6cf76c3bbecc06dab7b43f6c464))
19
+ * **memory:** route bounded persistence requests ([bfabb4a](https://github.com/dyphn1/Harness-everything/commit/bfabb4a27aa9db9545136a450b76037241b1becd))
20
+ * **memory:** route bounded persistence requests ([1451b7a](https://github.com/dyphn1/Harness-everything/commit/1451b7a9f64cadb857223899dffa14ca427dfda4))
21
+ * **memory:** route explicit persistence authorization ([ea275cc](https://github.com/dyphn1/Harness-everything/commit/ea275cc1b60b7211607095d21136f50f49f602d6))
22
+ * **memory:** route explicit persistence authorization ([3fb9e23](https://github.com/dyphn1/Harness-everything/commit/3fb9e23e01361128f75df8d2aea9ef9e916e74d7))
23
+ * **memory:** schema persistence intent signal ([50dfb83](https://github.com/dyphn1/Harness-everything/commit/50dfb830ff0bb4e548d36115a55fda16d7e77f8b))
24
+ * **memory:** schema persistence intent signal ([4fdd410](https://github.com/dyphn1/Harness-everything/commit/4fdd410309974def42dbd13f9a46e94ca57673b3))
25
+ * **memory:** surface authorization invariant ([88f87a2](https://github.com/dyphn1/Harness-everything/commit/88f87a2be9942a00fd85e0e383dcc015ef101313))
26
+ * **memory:** surface authorization invariant ([00c7588](https://github.com/dyphn1/Harness-everything/commit/00c7588bbf5fbdefdc472e2a0e27a40b2c0ba91e))
27
+ * **runtime:** account failed verification rounds ([4bb3ea1](https://github.com/dyphn1/Harness-everything/commit/4bb3ea1a45661672e932ae758d77482a453c46ad))
28
+ * **runtime:** add run-scoped budget accounting ([b1dc987](https://github.com/dyphn1/Harness-everything/commit/b1dc9875701c81dcd4d92ac8a882a6e16fadb909))
29
+ * **runtime:** cap parallel dispatch batches ([0c587bc](https://github.com/dyphn1/Harness-everything/commit/0c587bc963370e50698626b647a0a69c96e63aec))
30
+ * **runtime:** cap parallel dispatch batches ([42f396f](https://github.com/dyphn1/Harness-everything/commit/42f396fb6f4e3d8f91d3b7b1027cdd3c3543a65e))
31
+ * **runtime:** enforce iterative mutation budget ([8b54044](https://github.com/dyphn1/Harness-everything/commit/8b54044f27cf05608a8e192857e0362e3ff5a207))
32
+ * **runtime:** enforce replan and revision budgets ([3fae99b](https://github.com/dyphn1/Harness-everything/commit/3fae99bb28e5f2354465936fba11e8f7406be4fd))
33
+ * **runtime:** enforce worker concurrency budget ([5a7de6d](https://github.com/dyphn1/Harness-everything/commit/5a7de6daa4292047c5a623b338551324689e84bd))
34
+ * **runtime:** make workflow limits numeric ([9295ee2](https://github.com/dyphn1/Harness-everything/commit/9295ee2f9ad043abce8dc07e9b88a1210f152286))
35
+ * **runtime:** make workflow limits numeric ([2409f5b](https://github.com/dyphn1/Harness-everything/commit/2409f5bce4dd338bf9f7496d0a4a00498a9ca1e4))
36
+ * **runtime:** schema numeric workflow budgets ([7fa7a55](https://github.com/dyphn1/Harness-everything/commit/7fa7a556bebf38257c4fdf8d0837acba5ae630ce))
37
+ * **runtime:** schema numeric workflow budgets ([9cc26a1](https://github.com/dyphn1/Harness-everything/commit/9cc26a1d352eeab03dc8dc973850476f7d60b080))
38
+
39
+ ## [0.8.1](https://github.com/dyphn1/Harness-everything/compare/v0.8.0...v0.8.1) (2026-09-17)
40
+
41
+ ### Bug Fixes
42
+
43
+ * **router:** enforce selected workflow lifecycle ([9f3394a](https://github.com/dyphn1/Harness-everything/commit/9f3394a3ff59aaa08428e12a9a2784e7541368c4))
44
+ * **workflow:** Close lifecycle isolation gaps ([96b58e7](https://github.com/dyphn1/Harness-everything/commit/96b58e7ce2e52312880663e59380038e4bf5f985)), closes [#131](https://github.com/dyphn1/Harness-everything/issues/131)
45
+ * **workflow:** Normalize Windows worktree paths ([18ee645](https://github.com/dyphn1/Harness-everything/commit/18ee645a1a7165d01d60a964947082ad0108b93c)), closes [#131](https://github.com/dyphn1/Harness-everything/issues/131)
46
+ * **workflow:** require worktree isolation for major mutations ([9ba0098](https://github.com/dyphn1/Harness-everything/commit/9ba0098adc94fe141fca2c03f07d0883d9a56b9b))
47
+
48
+ ## [Unreleased]
49
+
50
+ ### Fixed
51
+
52
+ - Make selected workflows persist across follow-up prompts, bind Fable runs to workflow/session identities, and require correlated stage evidence before completion (#131, #142).
53
+ - Enforce major-workflow Git worktree isolation at supported mutation hooks, check direct/patch targets and explicit shell paths, and retain isolation across scoped escape and blocked states.
54
+ - Provide bounded run entry/replan and per-stage escape commands; expose unsupported hosts and shell-sandbox limits without upgrading live-host evidence.
55
+
5
56
  ## [0.8.0](https://github.com/dyphn1/Harness-everything/compare/v0.7.0...v0.8.0) (2026-09-17)
6
57
 
7
58
  ### Features
package/README.md CHANGED
@@ -68,7 +68,7 @@ npx github:dyphn1/Harness-everything install
68
68
  1. **Use the selected surface's real mechanism:** Claude Code hooks, the local OpenAI plugin lifecycle hooks, OpenCode's plugin API, or advisory instructions depending on what you installed.
69
69
  2. **Preflight / session context where packaged:** Hook-capable surfaces can inject environment/session context automatically; advisory-only surfaces must not be described as if they do.
70
70
  3. **Verification boundary:** Completion claims require objective evidence; whether that boundary is mechanically invoked or explicitly called depends on the host surface.
71
- 4. **Mandatory evaluation, advisory execution:** Tier classification may suggest useful skills. Before skipping any suggested skill, the agent reads its complete `SKILL.md` entry/basic flow and evaluates applicability; execution remains agent-controlled afterward, so Harness still does not impose a universal TODO/TDD/Fable sequence.
71
+ 4. **Mandatory applicable workflow:** Evaluate each suggested skill's complete `SKILL.md` before omission, then resolve the selected topology with objective evidence. Reasoning and implementation remain flexible; escape applies only to a declared uncovered stage with evidence. Tier 3 / Fable mutation requires a verified Git worktree. See the [workflow runtime contract](docs/workflow-runtime.md) for entry, completion, and host limits. Harness does not impose one universal TODO/TDD/Fable sequence.
72
72
 
73
73
  ### What Gets Installed (and How to Remove It)
74
74
 
@@ -312,4 +312,4 @@ npm run test:plugin:openai
312
312
  npm run test:plugin:submission
313
313
  ```
314
314
 
315
- After intentional runtime/workflow changes, run `npm run docs:sync` and commit the regenerated repository contract. All script modifications must pass 100% cleanly before pushing to keep the runtime immunized against behavioral regression.
315
+ After intentional runtime/workflow changes, run `npm run docs:sync` and commit the regenerated repository contract. All script modifications must pass 100% cleanly before pushing to keep the runtime immunized against behavioral regression.
@@ -0,0 +1,95 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "baselineCommit": "8b99baec44745e171f078fe9eb3dac6fd812b5c8",
4
+ "reviewedRevision": "commit containing this report",
5
+ "evidenceLayer": "local deterministic mechanisms and packages",
6
+ "environment": {
7
+ "os": "win32",
8
+ "node": "v24.15.0",
9
+ "npm": "11.12.1"
10
+ },
11
+ "gates": [
12
+ {
13
+ "gate": "test",
14
+ "exitCode": 0,
15
+ "seconds": 76.007
16
+ },
17
+ {
18
+ "gate": "test:mutations",
19
+ "exitCode": 0,
20
+ "seconds": 5.309
21
+ },
22
+ {
23
+ "gate": "test:mechanism",
24
+ "exitCode": 0,
25
+ "seconds": 54.904
26
+ },
27
+ {
28
+ "gate": "test:consistency",
29
+ "exitCode": 0,
30
+ "seconds": 0.782
31
+ },
32
+ {
33
+ "gate": "test:repo-contract",
34
+ "exitCode": 0,
35
+ "seconds": 0.522
36
+ },
37
+ {
38
+ "gate": "test:docs:capabilities",
39
+ "exitCode": 0,
40
+ "seconds": 0.639
41
+ },
42
+ {
43
+ "gate": "test:references",
44
+ "exitCode": 0,
45
+ "seconds": 0.597
46
+ },
47
+ {
48
+ "gate": "test:release",
49
+ "exitCode": 0,
50
+ "seconds": 5.161
51
+ },
52
+ {
53
+ "gate": "test:collision",
54
+ "exitCode": 0,
55
+ "seconds": 0.481
56
+ },
57
+ {
58
+ "gate": "test:routing:skills",
59
+ "exitCode": 0,
60
+ "seconds": 2.926
61
+ },
62
+ {
63
+ "gate": "test:routing:invariants",
64
+ "exitCode": 0,
65
+ "seconds": 3.521
66
+ },
67
+ {
68
+ "gate": "test:plugin:openai",
69
+ "exitCode": 0,
70
+ "seconds": 4.225
71
+ },
72
+ {
73
+ "gate": "test:plugin:submission",
74
+ "exitCode": 0,
75
+ "seconds": 0.963
76
+ },
77
+ {
78
+ "gate": "test:platform:compatibility",
79
+ "exitCode": 0,
80
+ "seconds": 0.612
81
+ }
82
+ ],
83
+ "mechanismSuites": 44,
84
+ "lifecycleAssertions": {
85
+ "source": 50,
86
+ "openaiPackage": 50
87
+ },
88
+ "waza": {
89
+ "checks": 57,
90
+ "passed": 57
91
+ },
92
+ "liveHost": "not run for this change",
93
+ "behavioralEffectiveness": "not measured for this change",
94
+ "windowsPathRegression": "Native resolution equates Windows 8.3 and long path spellings; regression and final local self-regression passed."
95
+ }
@@ -139,6 +139,82 @@ try {
139
139
  });
140
140
  check(actionGate.evaluatePreToolUse(routerTrueSafe, { host: 'claude', sessionDir, ruleTable: table }).kind === 'allow', 'safe command is not gated solely because prompt router predicted risk');
141
141
 
142
+ const mcpDelete = {
143
+ session_id: 'phase5-test',
144
+ hook_event_name: 'PreToolUse',
145
+ tool_name: 'mcp__demo__delete_record',
146
+ tool_use_id: 'mcp-delete',
147
+ tool_input: {
148
+ record_id: 'record-123',
149
+ api_token: 'SHOULD_NOT_BE_PERSISTED',
150
+ actionDescriptor: { toolFamily: 'mcp', action: 'delete', resource: 'record:123' },
151
+ },
152
+ cwd: ROOT,
153
+ };
154
+ const mcpDeleteDecision = actionGate.evaluatePreToolUse(mcpDelete, { host: 'claude', sessionDir, ruleTable: table });
155
+ check(mcpDeleteDecision.kind === 'defer' && mcpDeleteDecision.rule.id === 'structured-delete', 'structured MCP delete is gated before execution');
156
+ const mcpDeleteAudit = readAudit(sessionDir, 'mcp-delete');
157
+ check(mcpDeleteAudit.actionDescriptor.toolFamily === 'mcp' && mcpDeleteAudit.actionDescriptor.action === 'delete', 'audit retains normalized structured action identity');
158
+ check(mcpDeleteAudit.actionDescriptor.payloadHash === actionGate.hashExact(actionGate.exactPayloadText(mcpDelete)), 'structured action audit binds to exact payload hash');
159
+ check(!JSON.stringify(mcpDeleteAudit).includes('SHOULD_NOT_BE_PERSISTED'), 'structured action audit does not persist raw secret arguments');
160
+
161
+ const mcpRead = {
162
+ ...mcpDelete,
163
+ tool_name: 'mcp__demo__get_record',
164
+ tool_use_id: 'mcp-read',
165
+ tool_input: { record_id: 'record-123' },
166
+ };
167
+ const mcpReadDecision = actionGate.evaluatePreToolUse(mcpRead, { host: 'claude', sessionDir, ruleTable: table });
168
+ check(mcpReadDecision.kind === 'allow' && mcpReadDecision.descriptor.classification === 'safe', 'read-only MCP fixture passes without a false gate');
169
+
170
+ const inferredMutation = {
171
+ ...mcpDelete,
172
+ tool_name: 'mcp__demo__update_issue',
173
+ tool_use_id: 'mcp-update',
174
+ tool_input: { issue_id: 135, title: 'changed' },
175
+ };
176
+ const inferredMutationDecision = actionGate.evaluatePreToolUse(inferredMutation, { host: 'claude', sessionDir, ruleTable: table });
177
+ check(inferredMutationDecision.kind === 'defer' && inferredMutationDecision.rule.id === 'structured-mutate', 'obvious structured mutation is classified from tool identity');
178
+
179
+ const localDelete = {
180
+ ...mcpDelete,
181
+ tool_name: 'local_delete_record',
182
+ tool_use_id: 'local-delete',
183
+ tool_input: {
184
+ record_id: 'record-456',
185
+ actionDescriptor: { toolFamily: 'local-function', action: 'delete', resource: 'record:456' },
186
+ },
187
+ };
188
+ const localDeleteDecision = actionGate.evaluatePreToolUse(localDelete, { host: 'claude', sessionDir, ruleTable: table });
189
+ check(localDeleteDecision.kind === 'defer' && localDeleteDecision.rule.id === 'structured-delete', 'non-shell local-function destructive fixture uses the same structured gate');
190
+
191
+ const opaqueRequired = {
192
+ ...mcpDelete,
193
+ tool_name: 'mcp__demo__opaque_action',
194
+ tool_use_id: 'mcp-opaque-required',
195
+ tool_input: { value: 1 },
196
+ workflowPlan: { actionGate: { required: true, reasonCodes: ['external-side-effect'], disposition: 'pending-approval' } },
197
+ };
198
+ const opaqueRequiredDecision = actionGate.evaluatePreToolUse(opaqueRequired, { host: 'claude', sessionDir, ruleTable: table });
199
+ check(opaqueRequiredDecision.kind === 'defer' && opaqueRequiredDecision.rule.id === 'structured-unknown-required', 'unknown structured action fails closed when workflow requires a gate');
200
+
201
+ const opaqueSafe = { ...opaqueRequired, tool_use_id: 'mcp-opaque-unrequired' };
202
+ delete opaqueSafe.workflowPlan;
203
+ check(actionGate.evaluatePreToolUse(opaqueSafe, { host: 'claude', sessionDir, ruleTable: table }).kind === 'allow', 'unknown structured action is not fabricated as destructive without a gate requirement');
204
+
205
+ const integrityPre = {
206
+ ...mcpDelete,
207
+ tool_use_id: 'mcp-integrity',
208
+ tool_input: { actionDescriptor: { toolFamily: 'mcp', action: 'delete', resource: 'record:A' }, record_id: 'A' },
209
+ };
210
+ actionGate.evaluatePreToolUse(integrityPre, { host: 'claude', sessionDir, ruleTable: table });
211
+ const integrityPost = actionGate.processEvent({
212
+ ...integrityPre,
213
+ hook_event_name: 'PostToolUse',
214
+ tool_input: { actionDescriptor: { toolFamily: 'mcp', action: 'delete', resource: 'record:B' }, record_id: 'B' },
215
+ }, { sessionDir });
216
+ check(integrityPost.record && integrityPost.record.disposition === 'integrity-violation', 'changed structured payload cannot reuse a prior approval/audit decision');
217
+
142
218
  const nonScratchTarget = process.platform === 'win32'
143
219
  ? 'C:\\workspace\\harness-project\\build'
144
220
  : '/opt/harness-project/build';
@@ -231,14 +307,18 @@ try {
231
307
 
232
308
  const canonicalHooks = JSON.parse(fs.readFileSync(path.join(ROOT, 'hooks', 'hooks.json'), 'utf8'));
233
309
  const canonicalPre = canonicalHooks.hooks.PreToolUse.find(group => group.id === 'harness:pre:action-gate');
234
- check(canonicalPre && canonicalPre.matcher === 'Bash|PowerShell', 'Claude hook manifest wires action-gate to Bash|PowerShell');
310
+ check(canonicalPre && canonicalPre.matcher === 'Bash|PowerShell|mcp__.*', 'Claude hook manifest wires action-gate to shell and MCP pre-action surfaces');
235
311
  check(canonicalHooks.hooks.PostToolUse.some(group => group.id === 'harness:post:action-gate-audit'), 'Claude hook manifest audits successful tool execution');
236
312
  check(canonicalHooks.hooks.PostToolUseFailure.some(group => group.id === 'harness:post-failure:action-gate-audit'), 'Claude hook manifest audits failed tool execution');
237
313
  check(canonicalHooks.hooks.Stop.some(group => group.id === 'harness:stop:action-gate-audit'), 'Claude hook manifest closes unresolved approvals on Stop');
238
314
 
239
315
  const pluginHooks = JSON.parse(fs.readFileSync(path.join(ROOT, 'plugins', 'harness-everything', 'hooks', 'hooks.json'), 'utf8'));
240
- const pluginPre = pluginHooks.hooks.PreToolUse.find(group => group.matcher === 'Bash|apply_patch');
241
- check(pluginPre && pluginPre.hooks.some(hook => /codex-action-gate-pre\.js/.test(hook.command)), 'OpenAI plugin wires the attribution-aware Codex action-gate adapter to Bash|apply_patch');
316
+ const pluginPre = pluginHooks.hooks.PreToolUse.find(group => group.matcher === 'Bash|apply_patch' && group.hooks.some(hook => /codex-action-gate-pre\.js/.test(hook.command)));
317
+ check(pluginPre && pluginPre.hooks.some(hook => /codex-action-gate-pre\.js/.test(hook.command)), 'OpenAI plugin preserves the attribution-aware Codex shell action-gate adapter');
318
+ const pluginMcpPre = pluginHooks.hooks.PreToolUse.find(group => group.matcher === 'mcp__.*' && group.hooks.some(hook => /codex-action-gate-pre\.js/.test(hook.command)));
319
+ const pluginMcpPost = pluginHooks.hooks.PostToolUse.find(group => group.matcher === 'mcp__.*' && group.hooks.some(hook => /codex-action-gate-post\.js/.test(hook.command)));
320
+ check(Boolean(pluginMcpPre), 'OpenAI plugin packages an isolated structured MCP pre-action adapter without widening unrelated hooks');
321
+ check(Boolean(pluginMcpPost), 'OpenAI plugin packages an isolated structured MCP post-action audit adapter');
242
322
  check(!Object.prototype.hasOwnProperty.call(pluginHooks.hooks, 'PostToolUseFailure'), 'Codex plugin does not declare unsupported PostToolUseFailure lifecycle event');
243
323
  const pluginPost = pluginHooks.hooks.PostToolUse.find(group => group.matcher === 'Bash|apply_patch');
244
324
  check(pluginPost && pluginPost.hooks.some(hook => /codex-action-gate-post\.js/.test(hook.command)), 'Codex plugin infers action-gate outcome from supported PostToolUse');
@@ -44,6 +44,7 @@ const CURRENT_SURFACES = [
44
44
  'docs/platform-capabilities.md',
45
45
  'docs/reflection.md',
46
46
  'docs/routing.md',
47
+ 'docs/workflow-runtime.md',
47
48
  'docs/troubleshooting.md',
48
49
  'docs/openai-plugin.md',
49
50
  'submission/openai/README.md',
@@ -59,6 +60,8 @@ const STALE_PATTERNS = [
59
60
  /Only possible on Claude Code \(the only platform with a hook\/exit-code execution system\)/i,
60
61
  /On platforms with no hook system at all \(Cursor, Copilot, Codex/i,
61
62
  /hooks[^\n]{0,100}Hard enforcement, Claude Code only/i,
63
+ /mandatory evaluation\s*[,/]\s*advisory execution/i,
64
+ /Tier-specific skills remain advisory/i,
62
65
  /Codex[^\n]{0,180}\.codex\/skills\//i,
63
66
  ];
64
67